whisper.cat/weboasis/editors/editor/scripts.min.js
2023-10-05 23:28:32 +11:00

6 lines
1.6 MiB

!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],c=0,s=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++)0!==o[t[f]]&&(n=!1);n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={0:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,(function(r){return e[r]}).bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="assets/";var f=window.webpackJsonp=window.webpackJsonp||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var p=i;t()}([]);
//# sourceMappingURL=runtime-es5.1bcf810bbcc97f9faad1.js.map
function _createForOfIteratorHelper(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=_unsupportedIterableToArray(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 r,o,i=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return i=t.done,t},e:function(t){a=!0,o=t},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(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)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),t}(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+5Eg":function(t,e,n){var r=n("wA6s"),o=n("6XUM"),i=n("M7Xk").onFreeze,a=n("cZY6"),c=n("rG8t"),u=Object.seal;r({target:"Object",stat:!0,forced:c((function(){u(1)})),sham:!a},{seal:function(t){return u&&o(t)?u(i(t)):t}})},"+IJR":function(t,e,n){n("wA6s")({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},"/AsP":function(t,e,n){var r=n("yIiL"),o=n("SDMg"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},"/GqU":function(t,e,n){var r=n("RK3t"),o=n("HYAF");t.exports=function(t){return r(o(t))}},"/Ybd":function(t,e,n){var r=n("T69T"),o=n("XdSI"),i=n("F26l"),a=n("LdO1"),c=Object.defineProperty;e.f=r?c:function(t,e,n){if(i(t),e=a(e,!0),i(n),o)try{return c(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"/b8u":function(t,e,n){var r=n("STAE");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"0BK2":function(t,e){t.exports={}},"0Dky":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"0Ds2":function(t,e,n){var r=n("m41k")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(o){}}return!1}},"0GbY":function(t,e,n){var r=n("Qo9l"),o=n("2oRo"),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},"0eef":function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},"0luR":function(t,e,n){"use strict";var r=n("wA6s"),o=n("T69T"),i=n("ocAm"),a=n("OG5q"),c=n("6XUM"),u=n("/Ybd").f,s=n("NIlc"),f=i.Symbol;if(o&&"function"==typeof f&&(!("description"in f.prototype)||void 0!==f().description)){var l={},p=function t(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),n=this instanceof t?new f(e):void 0===e?f():f(e);return""===e&&(l[n]=!0),n};s(p,f);var h=p.prototype=f.prototype;h.constructor=p;var v=h.toString,d="Symbol(test)"==String(f("test")),g=/^Symbol\((.*)\)[^)]+$/;u(h,"description",{configurable:!0,get:function(){var t=c(this)?this.valueOf():this,e=v.call(t);if(a(l,t))return"";var n=d?e.slice(7,-1):e.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},"149L":function(t,e,n){var r=n("Ew/G");t.exports=r("document","documentElement")},"1p6F":function(t,e,n){var r=n("6XUM"),o=n("ezU2"),i=n("m41k")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},"2MGJ":function(t,e,n){var r=n("ocAm"),o=n("aJMj"),i=n("OG5q"),a=n("Fqhe"),c=n("6urC"),u=n("XH/I"),s=u.get,f=u.enforce,l=String(String).split("String");(t.exports=function(t,e,n,c){var u=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),f(n).source=l.join("string"==typeof e?e:"")),t!==r?(u?!p&&t[e]&&(s=!0):delete t[e],s?t[e]=n:o(t,e,n)):s?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||c(this)}))},"2RDa":function(t,e,n){var r,o=n("F26l"),i=n("5y2d"),a=n("aAjO"),c=n("yQMY"),u=n("149L"),s=n("qx7X"),f=n("/AsP")("IE_PROTO"),l=function(){},p=function(t){return"<script>"+t+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(o){}var t,e;h=r?function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=s("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};c[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=o(t),n=new l,l.prototype=null,n[f]=t):n=h(),void 0===e?n:i(n,e)}},"2oRo":function(t,e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||Function("return this")()},"33Wh":function(t,e,n){var r=n("yoRg"),o=n("eDl+");t.exports=Object.keys||function(t){return r(t,o)}},"3caY":function(t,e,n){var r=n("wA6s"),o=Math.asinh,i=Math.log,a=Math.sqrt;r({target:"Math",stat:!0,forced:!(o&&1/o(0)>0)},{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):i(e+a(e*e+1)):e}})},"3vMK":function(t,e,n){"use strict";var r=n("6XUM"),o=n("/Ybd"),i=n("wIVT"),a=n("m41k")("hasInstance"),c=Function.prototype;a in c||o.f(c,a,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},"3xQm":function(t,e,n){var r,o,i,a,c,u,s,f,l=n("ocAm"),p=n("7gGY").f,h=n("ezU2"),v=n("Ox9q").set,d=n("tuHh"),g=l.MutationObserver||l.WebKitMutationObserver,y=l.process,m=l.Promise,b="process"==h(y),w=p(l,"queueMicrotask"),k=w&&w.value;k||(r=function(){var t,e;for(b&&(t=y.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(n){throw o?a():i=void 0,n}}i=void 0,t&&t.enter()},b?a=function(){y.nextTick(r)}:g&&!d?(c=!0,u=document.createTextNode(""),new g(r).observe(u,{characterData:!0}),a=function(){u.data=c=!c}):m&&m.resolve?(s=m.resolve(void 0),f=s.then,a=function(){f.call(s,r)}):a=function(){v.call(l,r)}),t.exports=k||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},4:function(t,e,n){n("mRIq"),n("R0gw"),t.exports=n("hN/g")},"48xZ":function(t,e,n){var r=n("n/2t"),o=Math.abs,i=Math.pow,a=i(2,-52),c=i(2,-23),u=i(2,127)*(2-c),s=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=o(t),f=r(t);return i<s?f*(i/s/c+1/a-1/a)*s*c:(n=(e=(1+c/a)*i)-(e-i))>u||n!=n?f*(1/0):f*n}},"4GtL":function(t,e,n){"use strict";var r=n("VCQ8"),o=n("7Oj1"),i=n("xpLY"),a=Math.min;t.exports=[].copyWithin||function(t,e){var n=r(this),c=i(n.length),u=o(t,c),s=o(e,c),f=arguments.length>2?arguments[2]:void 0,l=a((void 0===f?c:o(f,c))-s,c-u),p=1;for(s<u&&u<s+l&&(p=-1,s+=l-1,u+=l-1);l-- >0;)s in n?n[u]=n[s]:delete n[u],u+=p,s+=p;return n}},"4Kt7":function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("sub")},{sub:function(){return o(this,"sub","","")}})},"4NCC":function(t,e,n){var r=n("ocAm"),o=n("jnLS").trim,i=n("xFZC"),a=r.parseInt,c=/^[+-]?0[Xx]/,u=8!==a(i+"08")||22!==a(i+"0x16");t.exports=u?function(t,e){var n=o(String(t));return a(n,e>>>0||(c.test(n)?16:10))}:a},"4PyY":function(t,e,n){var r={};r[n("m41k")("toStringTag")]="z",t.exports="[object z]"===String(r)},"4axp":function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("blink")},{blink:function(){return o(this,"blink","","")}})},"5MmU":function(t,e,n){var r=n("m41k"),o=n("pz+c"),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},"5eAq":function(t,e,n){var r=n("wA6s"),o=n("vZCr");r({target:"Number",stat:!0,forced:Number.parseFloat!=o},{parseFloat:o})},"5y2d":function(t,e,n){var r=n("T69T"),o=n("/Ybd"),i=n("F26l"),a=n("ZRqE");t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),c=r.length,u=0;c>u;)o.f(t,n=r[u++],e[n]);return t}},"5zDw":function(t,e,n){var r=n("wA6s"),o=n("4NCC");r({target:"Number",stat:!0,forced:Number.parseInt!=o},{parseInt:o})},"6CEi":function(t,e,n){"use strict";var r=n("wA6s"),o=n("kk6e").find,i=n("A1Hp"),a=n("w2hq"),c=!0,u=a("find");"find"in[]&&Array(1).find((function(){c=!1})),r({target:"Array",proto:!0,forced:c||!u},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("find")},"6CJb":function(t,e,n){"use strict";var r=n("rG8t");t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},"6JNq":function(t,e,n){var r=n("UTVS"),o=n("Vu81"),i=n("Bs8V"),a=n("m/L8");t.exports=function(t,e){for(var n=o(e),c=a.f,u=i.f,s=0;s<n.length;s++){var f=n[s];r(t,f)||c(t,f,u(e,f))}}},"6XUM":function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},"6fhQ":function(t,e,n){"use strict";var r=n("wA6s"),o=n("Neub"),i=n("VCQ8"),a=n("rG8t"),c=n("6CJb"),u=[],s=u.sort,f=a((function(){u.sort(void 0)})),l=a((function(){u.sort(null)})),p=c("sort");r({target:"Array",proto:!0,forced:f||!l||!p},{sort:function(t){return void 0===t?s.call(i(this)):s.call(i(this),o(t))}})},"6lQQ":function(t,e,n){"use strict";var r=n("wA6s"),o=n("OXtp").indexOf,i=n("6CJb"),a=n("w2hq"),c=[].indexOf,u=!!c&&1/[1].indexOf(1,-0)<0,s=i("indexOf"),f=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:u||!s||!f},{indexOf:function(t){return u?c.apply(this,arguments)||0:o(this,t,arguments.length>1?arguments[1]:void 0)}})},"6oxo":function(t,e,n){var r=n("wA6s"),o=Math.log,i=Math.LN2;r({target:"Math",stat:!0},{log2:function(t){return o(t)/i}})},"6q6p":function(t,e,n){"use strict";var r=n("wA6s"),o=n("6XUM"),i=n("erNl"),a=n("7Oj1"),c=n("xpLY"),u=n("EMtK"),s=n("DYg9"),f=n("m41k"),l=n("lRyB"),p=n("w2hq"),h=l("slice"),v=p("slice",{ACCESSORS:!0,0:0,1:2}),d=f("species"),g=[].slice,y=Math.max;r({target:"Array",proto:!0,forced:!h||!v},{slice:function(t,e){var n,r,f,l=u(this),p=c(l.length),h=a(t,p),v=a(void 0===e?p:e,p);if(i(l)&&("function"!=typeof(n=l.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[d])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(l,h,v);for(r=new(void 0===n?Array:n)(y(v-h,0)),f=0;h<v;h++,f++)h in l&&s(r,f,l[h]);return r.length=f,r}})},"6urC":function(t,e,n){var r=n("KBkW"),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return o.call(t)}),t.exports=r.inspectSource},"7/lX":function(t,e,n){var r=n("F26l"),o=n("JI1L");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(i){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},"76gj":function(t,e,n){var r=n("Ew/G"),o=n("KkqW"),i=n("busr"),a=n("F26l");t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},"7K3S":function(t,e){"document"in window.self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(t){"use strict";if("Element"in t){var e=t.Element.prototype,n=Object,r=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array.prototype.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},i=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},a=function(t,e){if(""===e)throw new i("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new i("INVALID_CHARACTER_ERR","String contains an invalid character");return o.call(t,e)},c=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],o=0,i=n.length;o<i;o++)this.push(n[o]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},u=c.prototype=[],s=function(){return new c(this)};if(i.prototype=Error.prototype,u.item=function(t){return this[t]||null},u.contains=function(t){return-1!==a(this,t+="")},u.add=function(){var t,e=arguments,n=0,r=e.length,o=!1;do{-1===a(this,t=e[n]+"")&&(this.push(t),o=!0)}while(++n<r);o&&this._updateClassName()},u.remove=function(){var t,e,n=arguments,r=0,o=n.length,i=!1;do{for(e=a(this,t=n[r]+"");-1!==e;)this.splice(e,1),i=!0,e=a(this,t)}while(++r<o);i&&this._updateClassName()},u.toggle=function(t,e){var n=this.contains(t+=""),r=n?!0!==e&&"remove":!1!==e&&"add";return r&&this[r](t),!0===e||!1===e?e:!n},u.toString=function(){return this.join(" ")},n.defineProperty){var f={get:s,enumerable:!0,configurable:!0};try{n.defineProperty(e,"classList",f)}catch(l){void 0!==l.number&&-2146823252!==l.number||(f.enumerable=!1,n.defineProperty(e,"classList",f))}}else n.prototype.__defineGetter__&&e.__defineGetter__("classList",s)}}(window.self),function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,r=arguments.length;for(n=0;n<r;n++)e.call(this,t=arguments[n])}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}())},"7Oj1":function(t,e,n){var r=n("vDBE"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},"7aOP":function(t,e,n){var r=n("F26l"),o=n("6XUM"),i=n("oB0/");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},"7gGY":function(t,e,n){var r=n("T69T"),o=n("gn9T"),i=n("uSMZ"),a=n("EMtK"),c=n("LdO1"),u=n("OG5q"),s=n("XdSI"),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e,!0),s)try{return f(t,e)}catch(n){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},"8+YH":function(t,e,n){n("94Vg")("search")},"815a":function(t,e,n){n("94Vg")("unscopables")},"8CeQ":function(t,e,n){var r=n("ocAm");n("shqn")(r.JSON,"JSON",!0)},"8aNu":function(t,e,n){var r=n("2MGJ");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},"8iOR":function(t,e,n){var r=n("wA6s"),o=Math.atanh,i=Math.log;r({target:"Math",stat:!0,forced:!(o&&1/o(-0)<0)},{atanh:function(t){return 0==(t=+t)?t:i((1+t)/(1-t))/2}})},"8xKV":function(t,e,n){"use strict";var r=n("wA6s"),o=n("vDBE"),i=n("hH+7"),a=n("EMWV"),c=n("rG8t"),u=1..toFixed,s=Math.floor,f=function t(e,n,r){return 0===n?r:n%2==1?t(e,n-1,r*e):t(e*e,n/2,r)};r({target:"Number",proto:!0,forced:u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c((function(){u.call({})}))},{toFixed:function(t){var e,n,r,c,u=i(this),l=o(t),p=[0,0,0,0,0,0],h="",v="0",d=function(t,e){for(var n=-1,r=e;++n<6;)p[n]=(r+=t*p[n])%1e7,r=s(r/1e7)},g=function(t){for(var e=6,n=0;--e>=0;)p[e]=s((n+=p[e])/t),n=n%t*1e7},y=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==p[t]){var n=String(p[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e};if(l<0||l>20)throw RangeError("Incorrect fraction digits");if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(h="-",u=-u),u>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(u*f(2,69,1))-69)<0?u*f(2,-e,1):u/f(2,e,1),n*=4503599627370496,(e=52-e)>0){for(d(0,n),r=l;r>=7;)d(1e7,0),r-=7;for(d(f(10,r,1),0),r=e-1;r>=23;)g(1<<23),r-=23;g(1<<r),d(1,1),g(2),v=y()}else d(0,n),d(1<<-e,0),v=y()+a.call("0",l);return l>0?h+((c=v.length)<=l?"0."+a.call("0",l-c)+v:v.slice(0,c-l)+"."+v.slice(c-l)):h+v}})},"8ydS":function(t,e,n){n("wA6s")({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},"93I0":function(t,e,n){var r=n("VpIT"),o=n("kOOl"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},"94Vg":function(t,e,n){var r=n("E7aN"),o=n("OG5q"),i=n("aGCb"),a=n("/Ybd").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},"9kNm":function(t,e,n){n("94Vg")("toPrimitive")},A1Hp:function(t,e,n){var r=n("m41k"),o=n("2RDa"),i=n("/Ybd"),a=r("unscopables"),c=Array.prototype;null==c[a]&&i.f(c,a,{configurable:!0,value:o(null)}),t.exports=function(t){c[a][t]=!0}},A2ZE:function(t,e,n){var r=n("HAuM");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},A7hN:function(t,e,n){var r=n("wA6s"),o=n("rG8t"),i=n("VCQ8"),a=n("wIVT"),c=n("cwa4");r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!c},{getPrototypeOf:function(t){return a(i(t))}})},"Ay+M":function(t,e,n){var r=n("wA6s"),o=n("vZCr");r({global:!0,forced:parseFloat!=o},{parseFloat:o})},B6y2:function(t,e,n){var r=n("I+eb"),o=n("b1O7").values;r({target:"Object",stat:!0},{values:function(t){return o(t)}})},BaTD:function(t,e,n){n("wA6s")({target:"String",proto:!0},{repeat:n("EMWV")})},BcWx:function(t,e,n){"use strict";var r=n("wA6s"),o=n("rG8t"),i=n("DYg9");r({target:"Array",stat:!0,forced:o((function(){function t(){}return!(Array.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},BnCb:function(t,e,n){n("wA6s")({target:"Math",stat:!0},{sign:n("n/2t")})},Bs8V:function(t,e,n){var r=n("g6v/"),o=n("0eef"),i=n("XGwC"),a=n("/GqU"),c=n("wE6v"),u=n("UTVS"),s=n("DPsx"),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e,!0),s)try{return f(t,e)}catch(n){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},COcp:function(t,e,n){n("wA6s")({target:"Number",stat:!0},{isInteger:n("Nvxz")})},CW9j:function(t,e,n){"use strict";var r=n("F26l"),o=n("LdO1");t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),"number"!==t)}},CwIO:function(t,e,n){var r=n("wA6s"),o=Math.hypot,i=Math.abs,a=Math.sqrt;r({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,r,o=0,c=0,u=arguments.length,s=0;c<u;)s<(n=i(arguments[c++]))?(o=o*(r=s/n)*r+1,s=n):o+=n>0?(r=n/s)*r:n;return s===1/0?1/0:s*a(o)}})},"D+RQ":function(t,e,n){"use strict";var r=n("T69T"),o=n("ocAm"),i=n("MkZA"),a=n("2MGJ"),c=n("OG5q"),u=n("ezU2"),s=n("K6ZX"),f=n("LdO1"),l=n("rG8t"),p=n("2RDa"),h=n("KkqW").f,v=n("7gGY").f,d=n("/Ybd").f,g=n("jnLS").trim,y=o.Number,m=y.prototype,b="Number"==u(p(m)),w=function(t){var e,n,r,o,i,a,c,u,s=f(t,!1);if("string"==typeof s&&s.length>2)if(43===(e=(s=g(s)).charCodeAt(0))||45===e){if(88===(n=s.charCodeAt(2))||120===n)return NaN}else if(48===e){switch(s.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+s}for(a=(i=s.slice(2)).length,c=0;c<a;c++)if((u=i.charCodeAt(c))<48||u>o)return NaN;return parseInt(i,r)}return+s};if(i("Number",!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var k,E=function t(e){var n=arguments.length<1?0:e,r=this;return r instanceof t&&(b?l((function(){m.valueOf.call(r)})):"Number"!=u(r))?s(new y(w(n)),r,t):w(n)},S=r?h(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;S.length>x;x++)c(y,k=S[x])&&!c(E,k)&&d(E,k,v(y,k));E.prototype=m,m.constructor=E,a(o,"Number",E)}},D3bo:function(t,e,n){var r,o,i=n("ocAm"),a=n("T/Kj"),c=i.process,u=c&&c.versions,s=u&&u.v8;s?o=(r=s.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),t.exports=o&&+o},D94X:function(t,e,n){var r=n("wA6s"),o=n("n/2t"),i=Math.abs,a=Math.pow;r({target:"Math",stat:!0},{cbrt:function(t){return o(t=+t)*a(i(t),1/3)}})},DAme:function(t,e,n){"use strict";var r=n("8aNu"),o=n("M7Xk").getWeakData,i=n("F26l"),a=n("6XUM"),c=n("SM6+"),u=n("Rn6E"),s=n("kk6e"),f=n("OG5q"),l=n("XH/I"),p=l.set,h=l.getterFor,v=s.find,d=s.findIndex,g=0,y=function(t){return t.frozen||(t.frozen=new m)},m=function(){this.entries=[]},b=function(t,e){return v(t.entries,(function(t){return t[0]===e}))};m.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=d(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,s){var l=t((function(t,r){c(t,l,e),p(t,{type:e,id:g++,frozen:void 0}),null!=r&&u(r,t[s],t,n)})),v=h(e),d=function(t,e,n){var r=v(t),a=o(i(e),!0);return!0===a?y(r).set(e,n):a[r.id]=n,t};return r(l.prototype,{delete:function(t){var e=v(this);if(!a(t))return!1;var n=o(t);return!0===n?y(e).delete(t):n&&f(n,e.id)&&delete n[e.id]},has:function(t){var e=v(this);if(!a(t))return!1;var n=o(t);return!0===n?y(e).has(t):n&&f(n,e.id)}}),r(l.prototype,n?{get:function(t){var e=v(this);if(a(t)){var n=o(t);return!0===n?y(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return d(this,t,e)}}:{add:function(t){return d(this,t,!0)}}),l}}},DGHb:function(t,e,n){"use strict";var r=n("wA6s"),o=n("rG8t"),i=n("VCQ8"),a=n("LdO1");r({target:"Date",proto:!0,forced:o((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=i(this),n=a(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},DPsx:function(t,e,n){var r=n("g6v/"),o=n("0Dky"),i=n("zBJ4");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},DYg9:function(t,e,n){"use strict";var r=n("LdO1"),o=n("/Ybd"),i=n("uSMZ");t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},Djps:function(t,e,n){n("wA6s")({target:"Math",stat:!0},{log1p:n("O3xq")})},DscF:function(t,e,n){var r=n("wA6s"),o=n("w4Hq"),i=n("A1Hp");r({target:"Array",proto:!0},{fill:o}),i("fill")},E7aN:function(t,e,n){var r=n("ocAm");t.exports=r},E8Ab:function(t,e,n){"use strict";var r=n("Neub"),o=n("6XUM"),i=[].slice,a={},c=function(t,e,n){if(!(e in a)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";a[e]=Function("C,a","return new C("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=i.call(arguments,1),a=function r(){var o=n.concat(i.call(arguments));return this instanceof r?c(e,o.length,o):e.apply(t,o)};return o(e.prototype)&&(a.prototype=e.prototype),a}},EIBq:function(t,e,n){var r=n("m41k")("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(c){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(c){}return n}},EMWV:function(t,e,n){"use strict";var r=n("vDBE"),o=n("hmpk");t.exports="".repeat||function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},EMtK:function(t,e,n){var r=n("tUdv"),o=n("hmpk");t.exports=function(t){return r(o(t))}},EQZg:function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},ERXZ:function(t,e,n){n("94Vg")("match")},EntM:function(t,e,n){var r=n("wA6s"),o=n("T69T");r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:n("5y2d")})},"Ew/G":function(t,e,n){var r=n("E7aN"),o=n("ocAm"),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},"F/TS":function(t,e,n){var r=n("mN5b"),o=n("pz+c"),i=n("m41k")("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},F26l:function(t,e,n){var r=n("6XUM");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},F4rZ:function(t,e,n){"use strict";var r=n("wA6s"),o=n("rG8t"),i=n("erNl"),a=n("6XUM"),c=n("VCQ8"),u=n("xpLY"),s=n("DYg9"),f=n("JafA"),l=n("lRyB"),p=n("m41k"),h=n("D3bo"),v=p("isConcatSpreadable"),d=h>=51||!o((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),g=l("concat"),y=function(t){if(!a(t))return!1;var e=t[v];return void 0!==e?!!e:i(t)};r({target:"Array",proto:!0,forced:!d||!g},{concat:function(t){var e,n,r,o,i,a=c(this),l=f(a,0),p=0;for(e=-1,r=arguments.length;e<r;e++)if(y(i=-1===e?a:arguments[e])){if(p+(o=u(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,p++)n in i&&s(l,p,i[n])}else{if(p>=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(l,p++,i)}return l.length=p,l}})},FU1i:function(t,e,n){"use strict";var r=n("wA6s"),o=n("kk6e").map,i=n("lRyB"),a=n("w2hq"),c=i("map"),u=a("map");r({target:"Array",proto:!0,forced:!c||!u},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},"FeI/":function(t,e,n){"use strict";var r=n("wA6s"),o=n("kk6e").every,i=n("6CJb"),a=n("w2hq"),c=i("every"),u=a("every");r({target:"Array",proto:!0,forced:!c||!u},{every:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},Fqhe:function(t,e,n){var r=n("ocAm"),o=n("aJMj");t.exports=function(t,e){try{o(r,t,e)}catch(n){r[t]=e}return e}},"G+Rx":function(t,e,n){var r=n("0GbY");t.exports=r("document","documentElement")},G1Vw:function(t,e,n){"use strict";var r,o,i,a=n("wIVT"),c=n("aJMj"),u=n("OG5q"),s=n("m41k"),f=n("g9hI"),l=s("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=a(a(i)))!==Object.prototype&&(r=o):p=!0),null==r&&(r={}),f||u(r,l)||c(r,l,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},G7bs:function(t,e,n){var r=n("vDBE"),o=n("hmpk"),i=function(t){return function(e,n){var i,a,c=String(o(e)),u=r(n),s=c.length;return u<0||u>=s?t?"":void 0:(i=c.charCodeAt(u))<55296||i>56319||u+1===s||(a=c.charCodeAt(u+1))<56320||a>57343?t?c.charAt(u):i:t?c.slice(u,u+2):a-56320+(i-55296<<10)+65536}};t.exports={codeAt:i(!1),charAt:i(!0)}},HAuM:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},HSQg:function(t,e,n){"use strict";n("SC6u");var r=n("2MGJ"),o=n("rG8t"),i=n("m41k"),a=n("qjkP"),c=n("aJMj"),u=i("species"),s=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),f="$0"==="a".replace(/./,"$0"),l=i("replace"),p=!!/./[l]&&""===/./[l]("a","$0"),h=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,l){var v=i(t),d=!o((function(){var e={};return e[v]=function(){return 7},7!=""[t](e)})),g=d&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[v]=/./[v]),n.exec=function(){return e=!0,null},n[v](""),!e}));if(!d||!g||"replace"===t&&(!s||!f||p)||"split"===t&&!h){var y=/./[v],m=n(v,""[t],(function(t,e,n,r,o){return e.exec===a?d&&!o?{done:!0,value:y.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:f,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=m[1];r(String.prototype,t,m[0]),r(RegExp.prototype,v,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}l&&c(RegExp.prototype[v],"sham",!0)}},HYAF:function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},"I+eb":function(t,e,n){var r=n("2oRo"),o=n("Bs8V").f,i=n("kRJp"),a=n("busE"),c=n("zk60"),u=n("6JNq"),s=n("lMq5");t.exports=function(t,e){var n,f,l,p,h,v=t.target,d=t.global,g=t.stat;if(n=d?r:g?r[v]||c(v,{}):(r[v]||{}).prototype)for(f in e){if(p=e[f],l=t.noTargetGet?(h=o(n,f))&&h.value:n[f],!s(d?f:v+(g?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;u(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(n,f,p,t)}}},I8vh:function(t,e,n){var r=n("ppGB"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},IBH3:function(t,e,n){"use strict";var r=n("tcQx"),o=n("VCQ8"),i=n("ipMl"),a=n("5MmU"),c=n("xpLY"),u=n("DYg9"),s=n("F/TS");t.exports=function(t){var e,n,f,l,p,h,v=o(t),d="function"==typeof this?this:Array,g=arguments.length,y=g>1?arguments[1]:void 0,m=void 0!==y,b=s(v),w=0;if(m&&(y=r(y,g>2?arguments[2]:void 0,2)),null==b||d==Array&&a(b))for(n=new d(e=c(v.length));e>w;w++)h=m?y(v[w],w):v[w],u(n,w,h);else for(p=(l=b.call(v)).next,n=new d;!(f=p.call(l)).done;w++)h=m?i(l,y,[f.value,w],!0):f.value,u(n,w,h);return n.length=w,n}},IPby:function(t,e,n){var r=n("wA6s"),o=n("EMtK"),i=n("xpLY");r({target:"String",stat:!0},{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],c=0;n>c;)a.push(String(e[c++])),c<r&&a.push(String(arguments[c]));return a.join("")}})},IQbc:function(t,e,n){"use strict";var r=n("wA6s"),o=n("vyNX").right,i=n("6CJb"),a=n("w2hq"),c=i("reduceRight"),u=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!u},{reduceRight:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},IXlp:function(t,e,n){var r=n("wA6s"),o=n("O3xq"),i=Math.acosh,a=Math.log,c=Math.sqrt,u=Math.LN2;r({target:"Math",stat:!0,forced:!i||710!=Math.floor(i(Number.MAX_VALUE))||i(1/0)!=1/0},{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?a(t)+u:o(t-1+c(t-1)*c(t+1))}})},IzYO:function(t,e,n){var r=n("wA6s"),o=n("cZY6"),i=n("rG8t"),a=n("6XUM"),c=n("M7Xk").onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:i((function(){u(1)})),sham:!o},{freeze:function(t){return u&&a(t)?u(c(t)):t}})},J4zY:function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("fixed")},{fixed:function(){return o(this,"tt","","")}})},JBy8:function(t,e,n){var r=n("yoRg"),o=n("eDl+").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},JHhb:function(t,e,n){"use strict";var r=n("Ew/G"),o=n("/Ybd"),i=n("m41k"),a=n("T69T"),c=i("species");t.exports=function(t){var e=r(t);a&&e&&!e[c]&&(0,o.f)(e,c,{configurable:!0,get:function(){return this}})}},JI1L:function(t,e,n){var r=n("6XUM");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},JTJg:function(t,e,n){"use strict";var r=n("I+eb"),o=n("WjRb"),i=n("HYAF");r({target:"String",proto:!0,forced:!n("qxPZ")("includes")},{includes:function(t){return!!~String(i(this)).indexOf(o(t),arguments.length>1?arguments[1]:void 0)}})},JafA:function(t,e,n){var r=n("6XUM"),o=n("erNl"),i=n("m41k")("species");t.exports=function(t,e){var n;return o(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},JhPs:function(t,e,n){var r=n("wA6s"),o=n("pn4C");r({target:"Math",stat:!0,forced:o!=Math.expm1},{expm1:o})},JkSk:function(t,e,n){"use strict";var r=n("rG8t");function o(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=r((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},"Jt/z":function(t,e,n){"use strict";var r=n("wA6s"),o=n("kk6e").findIndex,i=n("A1Hp"),a=n("w2hq"),c=!0,u=a("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){c=!1})),r({target:"Array",proto:!0,forced:c||!u},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("findIndex")},K1Z7:function(t,e,n){"use strict";var r=n("HSQg"),o=n("F26l"),i=n("xpLY"),a=n("hmpk"),c=n("dPn5"),u=n("unYP");r("match",1,(function(t,e,n){return[function(e){var n=a(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var a=o(t),s=String(this);if(!a.global)return u(a,s);var f=a.unicode;a.lastIndex=0;for(var l,p=[],h=0;null!==(l=u(a,s));){var v=String(l[0]);p[h]=v,""===v&&(a.lastIndex=c(s,i(a.lastIndex),f)),h++}return 0===h?null:p}]}))},K1dl:function(t,e,n){var r=n("ocAm");t.exports=r.Promise},K6ZX:function(t,e,n){var r=n("6XUM"),o=n("7/lX");t.exports=function(t,e,n){var i,a;return o&&"function"==typeof(i=e.constructor)&&i!==n&&r(a=i.prototype)&&a!==n.prototype&&o(t,a),t}},KBkW:function(t,e,n){var r=n("ocAm"),o=n("Fqhe"),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},KMug:function(t,e,n){var r=n("wA6s"),o=n("rG8t"),i=n("6XUM"),a=Object.isFrozen;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isFrozen:function(t){return!i(t)||!!a&&a(t)}})},KkqW:function(t,e,n){var r=n("vVmn"),o=n("aAjO").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},KlhL:function(t,e,n){"use strict";var r=n("T69T"),o=n("rG8t"),i=n("ZRqE"),a=n("busr"),c=n("gn9T"),u=n("VCQ8"),s=n("tUdv"),f=Object.assign,l=Object.defineProperty;t.exports=!f||o((function(){if(r&&1!==f({b:1},f(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=f({},t)[n]||"abcdefghijklmnopqrst"!=i(f({},e)).join("")}))?function(t,e){for(var n=u(t),o=arguments.length,f=1,l=a.f,p=c.f;o>f;)for(var h,v=s(arguments[f++]),d=l?i(v).concat(l(v)):i(v),g=d.length,y=0;g>y;)h=d[y++],r&&!p.call(v,h)||(n[h]=v[h]);return n}:f},KsdI:function(t,e,n){n("94Vg")("iterator")},L4l2:function(t,e,n){"use strict";var r=n("wA6s"),o=n("s8qp"),i=n("hmpk");r({target:"String",proto:!0,forced:!n("0Ds2")("includes")},{includes:function(t){return!!~String(i(this)).indexOf(o(t),arguments.length>1?arguments[1]:void 0)}})},LRWt:function(t,e,n){n("F4rZ"),n("NX+v"),n("SNUk"),n("c/8x"),n("0luR"),n("Pfbg"),n("V+F/"),n("KsdI"),n("ERXZ"),n("YOJ4"),n("S3W2"),n("8+YH"),n("uKyN"),n("Vi1R"),n("9kNm"),n("ZQqA"),n("815a"),n("OVXS"),n("8CeQ");var r=n("E7aN");t.exports=r.Symbol},LdO1:function(t,e,n){var r=n("6XUM");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},M1AK:function(t,e,n){var r=n("wA6s"),o=Math.floor,i=Math.log,a=Math.LOG2E;r({target:"Math",stat:!0},{clz32:function(t){return(t>>>=0)?31-o(i(t+.5)*a):32}})},M7Xk:function(t,e,n){var r=n("yQMY"),o=n("6XUM"),i=n("OG5q"),a=n("/Ybd").f,c=n("SDMg"),u=n("cZY6"),s=c("meta"),f=0,l=Object.isExtensible||function(){return!0},p=function(t){a(t,s,{value:{objectID:"O"+ ++f,weakData:{}}})},h=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,s)){if(!l(t))return"F";if(!e)return"E";p(t)}return t[s].objectID},getWeakData:function(t,e){if(!i(t,s)){if(!l(t))return!0;if(!e)return!1;p(t)}return t[s].weakData},onFreeze:function(t){return u&&h.REQUIRED&&l(t)&&!i(t,s)&&p(t),t}};r[s]=!0},MjoC:function(t,e,n){var r=n("T69T"),o=n("/Ybd").f,i=Function.prototype,a=i.toString,c=/^\s*function ([^ (]*)/;r&&!("name"in i)&&o(i,"name",{configurable:!0,get:function(){try{return a.call(this).match(c)[1]}catch(t){return""}}})},MkZA:function(t,e,n){var r=n("rG8t"),o=/#|\.prototype\./,i=function(t,e){var n=c[a(t)];return n==s||n!=u&&("function"==typeof e?r(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},u=i.NATIVE="N",s=i.POLYFILL="P";t.exports=i},"N+g0":function(t,e,n){var r=n("g6v/"),o=n("m/L8"),i=n("glrk"),a=n("33Wh");t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),c=r.length,u=0;c>u;)o.f(t,n=r[u++],e[n]);return t}},NIlc:function(t,e,n){var r=n("OG5q"),o=n("76gj"),i=n("7gGY"),a=n("/Ybd");t.exports=function(t,e){for(var n=o(e),c=a.f,u=i.f,s=0;s<n.length;s++){var f=n[s];r(t,f)||c(t,f,u(e,f))}}},"NX+v":function(t,e,n){var r=n("4PyY"),o=n("2MGJ"),i=n("azxr");r||o(Object.prototype,"toString",i,{unsafe:!0})},Neub:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},Nvxz:function(t,e,n){var r=n("6XUM"),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},O3xq:function(t,e){var n=Math.log;t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:n(1+t)}},OG5q:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},OVXS:function(t,e,n){n("shqn")(Math,"Math",!0)},OXtp:function(t,e,n){var r=n("EMtK"),o=n("xpLY"),i=n("7Oj1"),a=function(t){return function(e,n,a){var c,u=r(e),s=o(u.length),f=i(a,s);if(t&&n!=n){for(;s>f;)if((c=u[f++])!=c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},OjQg:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},Ox9q:function(t,e,n){var r,o,i,a=n("ocAm"),c=n("rG8t"),u=n("ezU2"),s=n("tcQx"),f=n("149L"),l=n("qx7X"),p=n("tuHh"),h=a.location,v=a.setImmediate,d=a.clearImmediate,g=a.process,y=a.MessageChannel,m=a.Dispatch,b=0,w={},k=function(t){if(w.hasOwnProperty(t)){var e=w[t];delete w[t],e()}},E=function(t){return function(){k(t)}},S=function(t){k(t.data)},x=function(t){a.postMessage(t+"",h.protocol+"//"+h.host)};v&&d||(v=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return w[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(b),b},d=function(t){delete w[t]},"process"==u(g)?r=function(t){g.nextTick(E(t))}:m&&m.now?r=function(t){m.now(E(t))}:y&&!p?(i=(o=new y).port2,o.port1.onmessage=S,r=s(i.postMessage,i,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||c(x)?r="onreadystatechange"in l("script")?function(t){f.appendChild(l("script")).onreadystatechange=function(){f.removeChild(this),k(t)}}:function(t){setTimeout(E(t),0)}:(r=x,a.addEventListener("message",S,!1))),t.exports={set:v,clear:d}},PbJR:function(t,e,n){var r=n("wA6s"),o=n("4NCC");r({global:!0,forced:parseInt!=o},{parseInt:o})},Pf6x:function(t,e,n){n("wA6s")({target:"Math",stat:!0},{fround:n("48xZ")})},Pfbg:function(t,e,n){n("94Vg")("hasInstance")},PmIt:function(t,e,n){"use strict";var r=n("HSQg"),o=n("1p6F"),i=n("F26l"),a=n("hmpk"),c=n("p82S"),u=n("dPn5"),s=n("xpLY"),f=n("unYP"),l=n("qjkP"),p=n("rG8t"),h=[].push,v=Math.min,d=!p((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(a(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===t)return[r];if(!o(t))return e.call(r,t,i);for(var c,u,s,f=[],p=0,v=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(c=l.call(v,r))&&!((u=v.lastIndex)>p&&(f.push(r.slice(p,c.index)),c.length>1&&c.index<r.length&&h.apply(f,c.slice(1)),s=c[0].length,p=u,f.length>=i));)v.lastIndex===c.index&&v.lastIndex++;return p===r.length?!s&&v.test("")||f.push(""):f.push(r.slice(p)),f.length>i?f.slice(0,i):f}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var o=a(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,n):r.call(String(o),e,n)},function(t,o){var a=n(r,t,this,o,r!==e);if(a.done)return a.value;var l=i(t),p=String(this),h=c(l,RegExp),g=l.unicode,y=new h(d?l:"^(?:"+l.source+")",(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(d?"y":"g")),m=void 0===o?4294967295:o>>>0;if(0===m)return[];if(0===p.length)return null===f(y,p)?[p]:[];for(var b=0,w=0,k=[];w<p.length;){y.lastIndex=d?w:0;var E,S=f(y,d?p:p.slice(w));if(null===S||(E=v(s(y.lastIndex+(d?0:w)),p.length))===b)w=u(p,w,g);else{if(k.push(p.slice(b,w)),k.length===m)return k;for(var x=1;x<=S.length-1;x++)if(k.push(S[x]),k.length===m)return k;w=b=E}}return k.push(p.slice(b)),k}]}),!d)},Q4jj:function(t,e,n){"use strict";var r=n("wA6s"),o=n("vyNX").left,i=n("6CJb"),a=n("w2hq"),c=i("reduce"),u=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!u},{reduce:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},QFgE:function(t,e,n){var r=n("wA6s"),o=n("rG8t"),i=Math.imul;r({target:"Math",stat:!0,forced:o((function(){return-5!=i(4294967295,5)||2!=i.length}))},{imul:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},QUoj:function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},"QVG+":function(t,e,n){var r=n("wA6s"),o=n("rG8t"),i=n("6XUM"),a=Object.isSealed;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isSealed:function(t){return!i(t)||!!a&&a(t)}})},QcXc:function(t,e,n){var r=n("xpLY"),o=n("EMWV"),i=n("hmpk"),a=Math.ceil,c=function(t){return function(e,n,c){var u,s,f=String(i(e)),l=f.length,p=void 0===c?" ":String(c),h=r(n);return h<=l||""==p?f:((s=o.call(p,a((u=h-l)/p.length))).length>u&&(s=s.slice(0,u)),t?f+s:s+f)}};t.exports={start:c(!1),end:c(!0)}},Qo9l:function(t,e,n){var r=n("2oRo");t.exports=r},R0gw:function(t,e,n){var r,o;void 0===(o="function"==typeof(r=function(){"use strict";var t,e,n,r,o,i;function a(){t=Zone.__symbol__,e=Object[t("defineProperty")]=Object.defineProperty,n=Object[t("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,r=Object.create,o=t("unconfigurables"),Object.defineProperty=function(t,e,n){if(u(t,e))throw new TypeError("Cannot assign to read only property '"+e+"' of "+t);var r=n.configurable;return"prototype"!==e&&(n=s(t,e,n)),f(t,e,n,r)},Object.defineProperties=function(t,e){return Object.keys(e).forEach((function(n){Object.defineProperty(t,n,e[n])})),t},Object.create=function(t,e){return"object"!=typeof e||Object.isFrozen(e)||Object.keys(e).forEach((function(n){e[n]=s(t,n,e[n])})),r(t,e)},Object.getOwnPropertyDescriptor=function(t,e){var r=n(t,e);return r&&u(t,e)&&(r.configurable=!1),r}}function c(t,e,n){var r=n.configurable;return f(t,e,n=s(t,e,n),r)}function u(t,e){return t&&t[o]&&t[o][e]}function s(t,n,r){return Object.isFrozen(r)||(r.configurable=!0),r.configurable||(t[o]||Object.isFrozen(t)||e(t,o,{writable:!0,value:{}}),t[o]&&(t[o][n]=!0)),r}function f(t,n,r,o){try{return e(t,n,r)}catch(a){if(!r.configurable)throw a;void 0===o?delete r.configurable:r.configurable=o;try{return e(t,n,r)}catch(a){var i=null;try{i=JSON.stringify(r)}catch(a){i=r.toString()}console.log("Attempting to configure '"+n+"' with descriptor '"+i+"' on object '"+t+"' and got error, giving up: "+a)}}}function l(t,e){var n=e.getGlobalObjects(),r=n.eventNames,o=n.globalSources,i=n.zoneSymbolEventNames,a=n.TRUE_STR,c=n.FALSE_STR,u=n.ZONE_SYMBOL_PREFIX,s="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket".split(","),f=[],l=t.wtf,p="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video".split(",");l?f=p.map((function(t){return"HTML"+t+"Element"})).concat(s):t.EventTarget?f.push("EventTarget"):f=s;for(var h=t.__Zone_disable_IE_check||!1,v=t.__Zone_enable_cross_context_check||!1,d=e.isIEOrEdge(),g="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",y={MSPointerCancel:"pointercancel",MSPointerDown:"pointerdown",MSPointerEnter:"pointerenter",MSPointerHover:"pointerhover",MSPointerLeave:"pointerleave",MSPointerMove:"pointermove",MSPointerOut:"pointerout",MSPointerOver:"pointerover",MSPointerUp:"pointerup"},m=0;m<r.length;m++){var b=u+((x=r[m])+c),w=u+(x+a);i[x]={},i[x][c]=b,i[x][a]=w}for(m=0;m<p.length;m++)for(var k=p[m],E=o[k]={},S=0;S<r.length;S++){var x;E[x=r[S]]=k+".addEventListener:"+x}var _=[];for(m=0;m<f.length;m++){var O=t[f[m]];_.push(O&&O.prototype)}return e.patchEventTarget(t,_,{vh:function(t,e,n,r){if(!h&&d){if(v)try{var o;if("[object FunctionWrapper]"===(o=e.toString())||o==g)return t.apply(n,r),!1}catch(i){return t.apply(n,r),!1}else if("[object FunctionWrapper]"===(o=e.toString())||o==g)return t.apply(n,r),!1}else if(v)try{e.toString()}catch(i){return t.apply(n,r),!1}return!0},transferEventName:function(t){return y[t]||t}}),Zone[e.symbol("patchEventTarget")]=!!t.EventTarget,!0}function p(t,e){var n=t.getGlobalObjects();if((!n.isNode||n.isMix)&&!function(t,e){var n=t.getGlobalObjects();if((n.isBrowser||n.isMix)&&!t.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var r=t.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if(r&&!r.configurable)return!1;if(r){t.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});var o=!!document.createElement("div").onclick;return t.ObjectDefineProperty(Element.prototype,"onclick",r),o}}var i=e.XMLHttpRequest;if(!i)return!1;var a=i.prototype,c=t.ObjectGetOwnPropertyDescriptor(a,"onreadystatechange");if(c)return t.ObjectDefineProperty(a,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}}),o=!!(s=new i).onreadystatechange,t.ObjectDefineProperty(a,"onreadystatechange",c||{}),o;var u=t.symbol("fake");t.ObjectDefineProperty(a,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[u]},set:function(t){this[u]=t}});var s=new i,f=function(){};return s.onreadystatechange=f,o=s[u]===f,s.onreadystatechange=null,o}(t,e)){var r="undefined"!=typeof WebSocket;!function(t){for(var e=t.getGlobalObjects().eventNames,n=t.symbol("unbound"),r=function(r){var o=e[r],i="on"+o;self.addEventListener(o,(function(e){var r,o,a=e.target;for(o=a?a.constructor.name+"."+i:"unknown."+i;a;)a[i]&&!a[i][n]&&((r=t.wrapWithCurrentZone(a[i],o))[n]=a[i],a[i]=r),a=a.parentElement}),!0)},o=0;o<e.length;o++)r(o)}(t),t.patchClass("XMLHttpRequest"),r&&function(t,e){var n=t.getGlobalObjects(),r=n.ADD_EVENT_LISTENER_STR,o=n.REMOVE_EVENT_LISTENER_STR,i=e.WebSocket;e.EventTarget||t.patchEventTarget(e,[i.prototype]),e.WebSocket=function(e,n){var a,c,u=arguments.length>1?new i(e,n):new i(e),s=t.ObjectGetOwnPropertyDescriptor(u,"onmessage");return s&&!1===s.configurable?(a=t.ObjectCreate(u),c=u,[r,o,"send","close"].forEach((function(e){a[e]=function(){var n=t.ArraySlice.call(arguments);if(e===r||e===o){var i=n.length>0?n[0]:void 0;if(i){var c=Zone.__symbol__("ON_PROPERTY"+i);u[c]=a[c]}}return u[e].apply(u,n)}}))):a=u,t.patchOnProperties(a,["close","error","message","open"],c),a};var a=e.WebSocket;for(var c in i)a[c]=i[c]}(t,e),Zone[t.symbol("patchEvents")]=!0}}(i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{})[(i.__Zone_symbol_prefix||"__zone_symbol__")+"legacyPatch"]=function(){var t=i.Zone;t.__load_patch("defineProperty",(function(t,e,n){n._redefineProperty=c,a()})),t.__load_patch("registerElement",(function(t,e,n){!function(t,e){var n=e.getGlobalObjects();(n.isBrowser||n.isMix)&&"registerElement"in t.document&&e.patchCallbacks(e,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}(t,n)})),t.__load_patch("EventTargetLegacy",(function(t,e,n){l(t,n),p(n,t)}))}})?r.call(e,n,e,t):r)||(t.exports=o)},RCvO:function(t,e,n){n("wA6s")({target:"Object",stat:!0,sham:!n("T69T")},{create:n("2RDa")})},RK3t:function(t,e,n){var r=n("0Dky"),o=n("xrYK"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},RNIs:function(t,e,n){var r=n("tiKp"),o=n("fHMY"),i=n("m/L8"),a=r("unscopables"),c=Array.prototype;null==c[a]&&i.f(c,a,{configurable:!0,value:o(null)}),t.exports=function(t){c[a][t]=!0}},ROdP:function(t,e,n){var r=n("hh1v"),o=n("xrYK"),i=n("tiKp")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},"Rj+b":function(t,e,n){"use strict";var r=n("2MGJ"),o=n("F26l"),i=n("rG8t"),a=n("x0kV"),c=RegExp.prototype,u=c.toString;(i((function(){return"/a/b"!=u.call({source:"a",flags:"b"})}))||"toString"!=u.name)&&r(RegExp.prototype,"toString",(function(){var t=o(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in c)?a.call(t):n)}),{unsafe:!0})},RmHb:function(t,e,n){n("JTJg");var r=n("sQkB");t.exports=r("String","includes")},Rn6E:function(t,e,n){var r=n("F26l"),o=n("5MmU"),i=n("xpLY"),a=n("tcQx"),c=n("F/TS"),u=n("ipMl"),s=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,f,l){var p,h,v,d,g,y,m,b=a(e,n,f?2:1);if(l)p=t;else{if("function"!=typeof(h=c(t)))throw TypeError("Target is not iterable");if(o(h)){for(v=0,d=i(t.length);d>v;v++)if((g=f?b(r(m=t[v])[0],m[1]):b(t[v]))&&g instanceof s)return g;return new s(!1)}p=h.call(t)}for(y=p.next;!(m=y.call(p)).done;)if("object"==typeof(g=u(p,b,m.value,f))&&g&&g instanceof s)return g;return new s(!1)}).stop=function(t){return new s(!0,t)}},S3W2:function(t,e,n){n("94Vg")("replace")},S3Yw:function(t,e,n){"use strict";var r=n("HSQg"),o=n("F26l"),i=n("VCQ8"),a=n("xpLY"),c=n("vDBE"),u=n("hmpk"),s=n("dPn5"),f=n("unYP"),l=Math.max,p=Math.min,h=Math.floor,v=/\$([$&'`]|\d\d?|<[^>]*>)/g,d=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(t,e,n,r){var g=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,y=r.REPLACE_KEEPS_$0,m=g?"$":"$0";return[function(n,r){var o=u(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,r){if(!g&&y||"string"==typeof r&&-1===r.indexOf(m)){var i=n(e,t,this,r);if(i.done)return i.value}var u=o(t),h=String(this),v="function"==typeof r;v||(r=String(r));var d=u.global;if(d){var w=u.unicode;u.lastIndex=0}for(var k=[];;){var E=f(u,h);if(null===E)break;if(k.push(E),!d)break;""===String(E[0])&&(u.lastIndex=s(h,a(u.lastIndex),w))}for(var S,x="",_=0,O=0;O<k.length;O++){E=k[O];for(var T=String(E[0]),A=l(p(c(E.index),h.length),0),j=[],M=1;M<E.length;M++)j.push(void 0===(S=E[M])?S:String(S));var P=E.groups;if(v){var I=[T].concat(j,A,h);void 0!==P&&I.push(P);var C=String(r.apply(void 0,I))}else C=b(T,h,A,j,P,r);A>=_&&(x+=h.slice(_,A)+C,_=A+T.length)}return x+h.slice(_)}];function b(t,n,r,o,a,c){var u=r+t.length,s=o.length,f=d;return void 0!==a&&(a=i(a),f=v),e.call(c,f,(function(e,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":c=a[i.slice(1,-1)];break;default:var f=+i;if(0===f)return e;if(f>s){var l=h(f/10);return 0===l?e:l<=s?void 0===o[l-1]?i.charAt(1):o[l-1]+i.charAt(1):e}c=o[f-1]}return void 0===c?"":c}))}}))},S58s:function(t,e,n){var r=n("wA6s"),o=n("pn4C"),i=Math.cosh,a=Math.abs,c=Math.E;r({target:"Math",stat:!0,forced:!i||i(710)===1/0},{cosh:function(t){var e=o(a(t)-1)+1;return(e+1/(e*c*c))*(c/2)}})},SC6u:function(t,e,n){"use strict";var r=n("wA6s"),o=n("qjkP");r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},SDMg:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},"SM6+":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},SNUk:function(t,e,n){"use strict";var r=n("wA6s"),o=n("ocAm"),i=n("Ew/G"),a=n("g9hI"),c=n("T69T"),u=n("U+kB"),s=n("i85Z"),f=n("rG8t"),l=n("OG5q"),p=n("erNl"),h=n("6XUM"),v=n("F26l"),d=n("VCQ8"),g=n("EMtK"),y=n("LdO1"),m=n("uSMZ"),b=n("2RDa"),w=n("ZRqE"),k=n("KkqW"),E=n("TzEA"),S=n("busr"),x=n("7gGY"),_=n("/Ybd"),O=n("gn9T"),T=n("aJMj"),A=n("2MGJ"),j=n("yIiL"),M=n("/AsP"),P=n("yQMY"),I=n("SDMg"),C=n("m41k"),R=n("aGCb"),D=n("94Vg"),L=n("shqn"),N=n("XH/I"),Z=n("kk6e").forEach,G=M("hidden"),z=C("toPrimitive"),F=N.set,U=N.getterFor("Symbol"),q=Object.prototype,X=o.Symbol,Y=i("JSON","stringify"),V=x.f,H=_.f,W=E.f,B=O.f,J=j("symbols"),Q=j("op-symbols"),K=j("string-to-symbol-registry"),$=j("symbol-to-string-registry"),tt=j("wks"),et=o.QObject,nt=!et||!et.prototype||!et.prototype.findChild,rt=c&&f((function(){return 7!=b(H({},"a",{get:function(){return H(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=V(q,e);r&&delete q[e],H(t,e,n),r&&t!==q&&H(q,e,r)}:H,ot=function(t,e){var n=J[t]=b(X.prototype);return F(n,{type:"Symbol",tag:t,description:e}),c||(n.description=e),n},it=s?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof X},at=function t(e,n,r){e===q&&t(Q,n,r),v(e);var o=y(n,!0);return v(r),l(J,o)?(r.enumerable?(l(e,G)&&e[G][o]&&(e[G][o]=!1),r=b(r,{enumerable:m(0,!1)})):(l(e,G)||H(e,G,m(1,{})),e[G][o]=!0),rt(e,o,r)):H(e,o,r)},ct=function(t,e){v(t);var n=g(e),r=w(n).concat(lt(n));return Z(r,(function(e){c&&!ut.call(n,e)||at(t,e,n[e])})),t},ut=function(t){var e=y(t,!0),n=B.call(this,e);return!(this===q&&l(J,e)&&!l(Q,e))&&(!(n||!l(this,e)||!l(J,e)||l(this,G)&&this[G][e])||n)},st=function(t,e){var n=g(t),r=y(e,!0);if(n!==q||!l(J,r)||l(Q,r)){var o=V(n,r);return!o||!l(J,r)||l(n,G)&&n[G][r]||(o.enumerable=!0),o}},ft=function(t){var e=W(g(t)),n=[];return Z(e,(function(t){l(J,t)||l(P,t)||n.push(t)})),n},lt=function(t){var e=t===q,n=W(e?Q:g(t)),r=[];return Z(n,(function(t){!l(J,t)||e&&!l(q,t)||r.push(J[t])})),r};u||(A((X=function(){if(this instanceof X)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=I(t),n=function t(n){this===q&&t.call(Q,n),l(this,G)&&l(this[G],e)&&(this[G][e]=!1),rt(this,e,m(1,n))};return c&&nt&&rt(q,e,{configurable:!0,set:n}),ot(e,t)}).prototype,"toString",(function(){return U(this).tag})),A(X,"withoutSetter",(function(t){return ot(I(t),t)})),O.f=ut,_.f=at,x.f=st,k.f=E.f=ft,S.f=lt,R.f=function(t){return ot(C(t),t)},c&&(H(X.prototype,"description",{configurable:!0,get:function(){return U(this).description}}),a||A(q,"propertyIsEnumerable",ut,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:X}),Z(w(tt),(function(t){D(t)})),r({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=String(t);if(l(K,e))return K[e];var n=X(e);return K[e]=n,$[n]=e,n},keyFor:function(t){if(!it(t))throw TypeError(t+" is not a symbol");if(l($,t))return $[t]},useSetter:function(){nt=!0},useSimple:function(){nt=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(t,e){return void 0===e?b(t):ct(b(t),e)},defineProperty:at,defineProperties:ct,getOwnPropertyDescriptor:st}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ft,getOwnPropertySymbols:lt}),r({target:"Object",stat:!0,forced:f((function(){S.f(1)}))},{getOwnPropertySymbols:function(t){return S.f(d(t))}}),Y&&r({target:"JSON",stat:!0,forced:!u||f((function(){var t=X();return"[null]"!=Y([t])||"{}"!=Y({a:t})||"{}"!=Y(Object(t))}))},{stringify:function(t,e,n){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=e,(h(e)||void 0!==t)&&!it(t))return p(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!it(e))return e}),o[1]=e,Y.apply(null,o)}}),X.prototype[z]||T(X.prototype,z,X.prototype.valueOf),L(X,"Symbol"),P[G]=!0},STAE:function(t,e,n){var r=n("0Dky");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},SdaC:function(t,e,n){var r=n("wA6s"),o=Math.ceil,i=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?i:o)(t)}})},"T/Kj":function(t,e,n){var r=n("Ew/G");t.exports=r("navigator","userAgent")||""},T1qB:function(t,e){!function(t){var e=function(){try{return!!Symbol.iterator}catch(t){return!1}}(),n=function(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e&&(n[Symbol.iterator]=function(){return n}),n},r=function(t){return encodeURIComponent(t).replace(/%20/g,"+")},o=function(t){return decodeURIComponent(String(t).replace(/\+/g," "))};(function(){try{var e=t.URLSearchParams;return"a=1"===new e("?a=1").toString()&&"function"==typeof e.prototype.set}catch(n){return!1}})()||function(){var o=function t(e){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var n=typeof e;if("undefined"===n);else if("string"===n)""!==e&&this._fromString(e);else if(e instanceof t){var r=this;e.forEach((function(t,e){r.append(e,t)}))}else{if(null===e||"object"!==n)throw new TypeError("Unsupported input's type for URLSearchParams");if("[object Array]"===Object.prototype.toString.call(e))for(var o=0;o<e.length;o++){var i=e[o];if("[object Array]"!==Object.prototype.toString.call(i)&&2===i.length)throw new TypeError("Expected [string, any] as entry at index "+o+" of URLSearchParams's input");this.append(i[0],i[1])}else for(var a in e)e.hasOwnProperty(a)&&this.append(a,e[a])}},i=o.prototype;i.append=function(t,e){t in this._entries?this._entries[t].push(String(e)):this._entries[t]=[String(e)]},i.delete=function(t){delete this._entries[t]},i.get=function(t){return t in this._entries?this._entries[t][0]:null},i.getAll=function(t){return t in this._entries?this._entries[t].slice(0):[]},i.has=function(t){return t in this._entries},i.set=function(t,e){this._entries[t]=[String(e)]},i.forEach=function(t,e){var n;for(var r in this._entries)if(this._entries.hasOwnProperty(r)){n=this._entries[r];for(var o=0;o<n.length;o++)t.call(e,n[o],r,this)}},i.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),n(t)},i.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),n(t)},i.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),n(t)},e&&(i[Symbol.iterator]=i.entries),i.toString=function(){var t=[];return this.forEach((function(e,n){t.push(r(n)+"="+r(e))})),t.join("&")},t.URLSearchParams=o}();var i=t.URLSearchParams.prototype;"function"!=typeof i.sort&&(i.sort=function(){var t=this,e=[];this.forEach((function(n,r){e.push([r,n]),t._entries||t.delete(r)})),e.sort((function(t,e){return t[0]<e[0]?-1:t[0]>e[0]?1:0})),t._entries&&(t._entries={});for(var n=0;n<e.length;n++)this.append(e[n][0],e[n][1])}),"function"!=typeof i._fromString&&Object.defineProperty(i,"_fromString",{enumerable:!1,configurable:!1,writable:!1,value:function(t){if(this._entries)this._entries={};else{var e=[];this.forEach((function(t,n){e.push(n)}));for(var n=0;n<e.length;n++)this.delete(e[n])}var r,i=(t=t.replace(/^\?/,"")).split("&");for(n=0;n<i.length;n++)r=i[n].split("="),this.append(o(r[0]),r.length>1?o(r[1]):"")}})}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t){var e,n,r;if(function(){try{var e=new t.URL("b","http://a");return e.pathname="c d","http://a/c%20d"===e.href&&e.searchParams}catch(n){return!1}}()||(e=t.URL,r=(n=function(e,n){"string"!=typeof e&&(e=String(e));var r,o=document;if(n&&(void 0===t.location||n!==t.location.href)){(r=(o=document.implementation.createHTMLDocument("")).createElement("base")).href=n,o.head.appendChild(r);try{if(0!==r.href.indexOf(n))throw new Error(r.href)}catch(p){throw new Error("URL unable to set base "+n+" due to "+p)}}var i=o.createElement("a");i.href=e,r&&(o.body.appendChild(i),i.href=i.href);var a=o.createElement("input");if(a.type="url",a.value=e,":"===i.protocol||!/:/.test(i.href)||!a.checkValidity()&&!n)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:i});var c=new t.URLSearchParams(this.search),u=!0,s=!0,f=this;["append","delete","set"].forEach((function(t){var e=c[t];c[t]=function(){e.apply(c,arguments),u&&(s=!1,f.search=c.toString(),s=!0)}})),Object.defineProperty(this,"searchParams",{value:c,enumerable:!0});var l=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==l&&(l=this.search,s&&(u=!1,this.searchParams._fromString(this.search),u=!0))}})}).prototype,["hash","host","hostname","port","protocol"].forEach((function(t){!function(t){Object.defineProperty(r,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:!0})}(t)})),Object.defineProperty(r,"search",{get:function(){return this._anchorElement.search},set:function(t){this._anchorElement.search=t,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(r,{toString:{get:function(){var t=this;return function(){return t.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(t){this._anchorElement.href=t,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(t){this._anchorElement.pathname=t},enumerable:!0},origin:{get:function(){return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(this._anchorElement.port!={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol]&&""!==this._anchorElement.port?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(t){},enumerable:!0},username:{get:function(){return""},set:function(t){},enumerable:!0}}),n.createObjectURL=function(t){return e.createObjectURL.apply(e,arguments)},n.revokeObjectURL=function(t){return e.revokeObjectURL.apply(e,arguments)},t.URL=n),void 0!==t.location&&!("origin"in t.location)){var o=function(){return t.location.protocol+"//"+t.location.hostname+(t.location.port?":"+t.location.port:"")};try{Object.defineProperty(t.location,"origin",{get:o,enumerable:!0})}catch(i){setInterval((function(){t.location.origin=o()}),100)}}}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this)},T4tC:function(t,e,n){var r=n("T69T"),o=n("ocAm"),i=n("MkZA"),a=n("K6ZX"),c=n("/Ybd").f,u=n("KkqW").f,s=n("1p6F"),f=n("x0kV"),l=n("JkSk"),p=n("2MGJ"),h=n("rG8t"),v=n("XH/I").set,d=n("JHhb"),g=n("m41k")("match"),y=o.RegExp,m=y.prototype,b=/a/g,w=/a/g,k=new y(b)!==b,E=l.UNSUPPORTED_Y;if(r&&i("RegExp",!k||E||h((function(){return w[g]=!1,y(b)!=b||y(w)==w||"/a/i"!=y(b,"i")})))){for(var S=function t(e,n){var r,o=this instanceof t,i=s(e),c=void 0===n;if(!o&&i&&e.constructor===t&&c)return e;k?i&&!c&&(e=e.source):e instanceof t&&(c&&(n=f.call(e)),e=e.source),E&&(r=!!n&&n.indexOf("y")>-1)&&(n=n.replace(/y/g,""));var u=a(k?new y(e,n):y(e,n),o?this:m,t);return E&&r&&v(u,{sticky:r}),u},x=function(t){t in S||c(S,t,{configurable:!0,get:function(){return y[t]},set:function(e){y[t]=e}})},_=u(y),O=0;_.length>O;)x(_[O++]);m.constructor=S,S.prototype=m,p(o,"RegExp",S)}d("RegExp")},T63A:function(t,e,n){var r=n("I+eb"),o=n("b1O7").entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})},T69T:function(t,e,n){var r=n("rG8t");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},TWQb:function(t,e,n){var r=n("/GqU"),o=n("UMSQ"),i=n("I8vh"),a=function(t){return function(e,n,a){var c,u=r(e),s=o(u.length),f=i(a,s);if(t&&n!=n){for(;s>f;)if((c=u[f++])!=c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},TiiU:function(t,e,n){n("B6y2");var r=n("Qo9l");t.exports=r.Object.values},TzEA:function(t,e,n){var r=n("EMtK"),o=n("KkqW").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(e){return a.slice()}}(t):o(r(t))}},"U+kB":function(t,e,n){var r=n("rG8t");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},UMSQ:function(t,e,n){var r=n("ppGB"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},UTVS:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"V+F/":function(t,e,n){n("94Vg")("isConcatSpreadable")},VCQ8:function(t,e,n){var r=n("hmpk");t.exports=function(t){return Object(r(t))}},Vi1R:function(t,e,n){n("94Vg")("split")},ViWx:function(t,e,n){"use strict";var r=n("wdMf"),o=n("nIH4");t.exports=r("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},VmbE:function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("strike")},{strike:function(){return o(this,"strike","","")}})},VpIT:function(t,e,n){var r=n("xDBR"),o=n("xs3f");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},Vu81:function(t,e,n){var r=n("0GbY"),o=n("JBy8"),i=n("dBg+"),a=n("glrk");t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},W0ke:function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("fontsize")},{fontsize:function(t){return o(this,"font","size",t)}})},WEX0:function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("link")},{link:function(t){return o(this,"a","href",t)}})},WEpO:function(t,e,n){var r=n("wA6s"),o=Math.log,i=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(t){return o(t)*i}})},WKvG:function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("fontcolor")},{fontcolor:function(t){return o(this,"font","color",t)}})},WLa2:function(t,e,n){var r=n("wA6s"),o=n("6XUM"),i=n("M7Xk").onFreeze,a=n("cZY6"),c=n("rG8t"),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:c((function(){u(1)})),sham:!a},{preventExtensions:function(t){return u&&o(t)?u(i(t)):t}})},WijE:function(t,e,n){"use strict";var r=n("wA6s"),o=n("ZJLg"),i=n("wIVT"),a=n("7/lX"),c=n("shqn"),u=n("aJMj"),s=n("2MGJ"),f=n("m41k"),l=n("g9hI"),p=n("pz+c"),h=n("G1Vw"),v=h.IteratorPrototype,d=h.BUGGY_SAFARI_ITERATORS,g=f("iterator"),y=function(){return this};t.exports=function(t,e,n,f,h,m,b){o(n,e,f);var w,k,E,S=function(t){if(t===h&&A)return A;if(!d&&t in O)return O[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},x=e+" Iterator",_=!1,O=t.prototype,T=O[g]||O["@@iterator"]||h&&O[h],A=!d&&T||S(h),j="Array"==e&&O.entries||T;if(j&&(w=i(j.call(new t)),v!==Object.prototype&&w.next&&(l||i(w)===v||(a?a(w,v):"function"!=typeof w[g]&&u(w,g,y)),c(w,x,!0,!0),l&&(p[x]=y))),"values"==h&&T&&"values"!==T.name&&(_=!0,A=function(){return T.call(this)}),l&&!b||O[g]===A||u(O,g,A),p[e]=A,h)if(k={values:S("values"),keys:m?A:S("keys"),entries:S("entries")},b)for(E in k)(d||_||!(E in O))&&s(O,E,k[E]);else r({target:e,proto:!0,forced:d||_},k);return k}},WjRb:function(t,e,n){var r=n("ROdP");t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},WnNu:function(t,e,n){n("wA6s")({target:"Object",stat:!0},{setPrototypeOf:n("7/lX")})},XEin:function(t,e,n){"use strict";var r=n("wA6s"),o=n("kk6e").some,i=n("6CJb"),a=n("w2hq"),c=i("some"),u=a("some");r({target:"Array",proto:!0,forced:!c||!u},{some:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},XGwC:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"XH/I":function(t,e,n){var r,o,i,a=n("yaK9"),c=n("ocAm"),u=n("6XUM"),s=n("aJMj"),f=n("OG5q"),l=n("/AsP"),p=n("yQMY");if(a){var h=new(0,c.WeakMap),v=h.get,d=h.has,g=h.set;r=function(t,e){return g.call(h,t,e),e},o=function(t){return v.call(h,t)||{}},i=function(t){return d.call(h,t)}}else{var y=l("state");p[y]=!0,r=function(t,e){return s(t,y,e),e},o=function(t){return f(t,y)?t[y]:{}},i=function(t){return f(t,y)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},XdSI:function(t,e,n){var r=n("T69T"),o=n("rG8t"),i=n("qx7X");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},Xm88:function(t,e,n){var r=n("wA6s"),o=n("rCRE");r({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},Y5OV:function(t,e,n){var r=n("aJMj"),o=n("CW9j"),i=n("m41k")("toPrimitive"),a=Date.prototype;i in a||r(a,i,o)},YOJ4:function(t,e,n){n("94Vg")("matchAll")},Yg8j:function(t,e,n){var r=n("ocAm").isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&r(t)}},Yu3F:function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("bold")},{bold:function(){return o(this,"b","","")}})},ZBUp:function(t,e,n){n("wA6s")({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},ZJLg:function(t,e,n){"use strict";var r=n("G1Vw").IteratorPrototype,o=n("2RDa"),i=n("uSMZ"),a=n("shqn"),c=n("pz+c"),u=function(){return this};t.exports=function(t,e,n){var s=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),a(t,s,!1,!0),c[s]=u,t}},ZQqA:function(t,e,n){n("94Vg")("toStringTag")},ZRqE:function(t,e,n){var r=n("vVmn"),o=n("aAjO");t.exports=Object.keys||function(t){return r(t,o)}},aAjO:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},aGCb:function(t,e,n){var r=n("m41k");e.f=r},aJMj:function(t,e,n){var r=n("T69T"),o=n("/Ybd"),i=n("uSMZ");t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},aTTg:function(t,e,n){var r=n("wA6s"),o=n("pn4C"),i=Math.exp;r({target:"Math",stat:!0},{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},afO8:function(t,e,n){var r,o,i,a=n("f5p1"),c=n("2oRo"),u=n("hh1v"),s=n("kRJp"),f=n("UTVS"),l=n("93I0"),p=n("0BK2");if(a){var h=new(0,c.WeakMap),v=h.get,d=h.has,g=h.set;r=function(t,e){return g.call(h,t,e),e},o=function(t){return v.call(h,t)||{}},i=function(t){return d.call(h,t)}}else{var y=l("state");p[y]=!0,r=function(t,e){return s(t,y,e),e},o=function(t){return f(t,y)?t[y]:{}},i=function(t){return f(t,y)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},ane6:function(t,e,n){"use strict";var r=n("wA6s"),o=n("rG8t"),i=n("hH+7"),a=1..toPrecision;r({target:"Number",proto:!0,forced:o((function(){return"1"!==a.call(1,void 0)}))||!o((function(){a.call({})}))},{toPrecision:function(t){return void 0===t?a.call(i(this)):a.call(i(this),t)}})},azxr:function(t,e,n){"use strict";var r=n("4PyY"),o=n("mN5b");t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},b1O7:function(t,e,n){var r=n("g6v/"),o=n("33Wh"),i=n("/GqU"),a=n("0eef").f,c=function(t){return function(e){for(var n,c=i(e),u=o(c),s=u.length,f=0,l=[];s>f;)n=u[f++],r&&!a.call(c,n)||l.push(t?[n,c[n]]:c[n]);return l}};t.exports={entries:c(!0),values:c(!1)}},bHwr:function(t,e,n){"use strict";var r,o,i,a,c=n("wA6s"),u=n("g9hI"),s=n("ocAm"),f=n("Ew/G"),l=n("K1dl"),p=n("2MGJ"),h=n("8aNu"),v=n("shqn"),d=n("JHhb"),g=n("6XUM"),y=n("Neub"),m=n("SM6+"),b=n("ezU2"),w=n("6urC"),k=n("Rn6E"),E=n("EIBq"),S=n("p82S"),x=n("Ox9q").set,_=n("3xQm"),O=n("7aOP"),T=n("ktmr"),A=n("oB0/"),j=n("pd8B"),M=n("XH/I"),P=n("MkZA"),I=n("m41k"),C=n("D3bo"),R=I("species"),D="Promise",L=M.get,N=M.set,Z=M.getterFor(D),G=l,z=s.TypeError,F=s.document,U=s.process,q=f("fetch"),X=A.f,Y=X,V="process"==b(U),H=!!(F&&F.createEvent&&s.dispatchEvent),W=P(D,(function(){if(w(G)===String(G)){if(66===C)return!0;if(!V&&"function"!=typeof PromiseRejectionEvent)return!0}if(u&&!G.prototype.finally)return!0;if(C>=51&&/native code/.test(G))return!1;var t=G.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[R]=e,!(t.then((function(){}))instanceof e)})),B=W||!E((function(t){G.all(t).catch((function(){}))})),J=function(t){var e;return!(!g(t)||"function"!=typeof(e=t.then))&&e},Q=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;_((function(){for(var o=e.value,i=1==e.state,a=0;r.length>a;){var c,u,s,f=r[a++],l=i?f.ok:f.fail,p=f.resolve,h=f.reject,v=f.domain;try{l?(i||(2===e.rejection&&et(t,e),e.rejection=1),!0===l?c=o:(v&&v.enter(),c=l(o),v&&(v.exit(),s=!0)),c===f.promise?h(z("Promise-chain cycle")):(u=J(c))?u.call(c,p,h):p(c)):h(o)}catch(d){v&&!s&&v.exit(),h(d)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&$(t,e)}))}},K=function(t,e,n){var r,o;H?((r=F.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},(o=s["on"+t])?o(r):"unhandledrejection"===t&&T("Unhandled promise rejection",n)},$=function(t,e){x.call(s,(function(){var n,r=e.value;if(tt(e)&&(n=j((function(){V?U.emit("unhandledRejection",r,t):K("unhandledrejection",t,r)})),e.rejection=V||tt(e)?2:1,n.error))throw n.value}))},tt=function(t){return 1!==t.rejection&&!t.parent},et=function(t,e){x.call(s,(function(){V?U.emit("rejectionHandled",t):K("rejectionhandled",t,e.value)}))},nt=function(t,e,n,r){return function(o){t(e,n,o,r)}},rt=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=2,Q(t,e,!0))},ot=function t(e,n,r,o){if(!n.done){n.done=!0,o&&(n=o);try{if(e===r)throw z("Promise can't be resolved itself");var i=J(r);i?_((function(){var o={done:!1};try{i.call(r,nt(t,e,o,n),nt(rt,e,o,n))}catch(a){rt(e,o,a,n)}})):(n.value=r,n.state=1,Q(e,n,!1))}catch(a){rt(e,{done:!1},a,n)}}};W&&(G=function(t){m(this,G,D),y(t),r.call(this);var e=L(this);try{t(nt(ot,this,e),nt(rt,this,e))}catch(n){rt(this,e,n)}},(r=function(t){N(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(G.prototype,{then:function(t,e){var n=Z(this),r=X(S(this,G));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=V?U.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Q(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=L(t);this.promise=t,this.resolve=nt(ot,t,e),this.reject=nt(rt,t,e)},A.f=X=function(t){return t===G||t===i?new o(t):Y(t)},u||"function"!=typeof l||(a=l.prototype.then,p(l.prototype,"then",(function(t,e){var n=this;return new G((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof q&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return O(G,q.apply(s,arguments))}}))),c({global:!0,wrap:!0,forced:W},{Promise:G}),v(G,D,!1,!0),d(D),i=f(D),c({target:D,stat:!0,forced:W},{reject:function(t){var e=X(this);return e.reject.call(void 0,t),e.promise}}),c({target:D,stat:!0,forced:u||W},{resolve:function(t){return O(u&&this===i?G:this,t)}}),c({target:D,stat:!0,forced:B},{all:function(t){var e=this,n=X(e),r=n.resolve,o=n.reject,i=j((function(){var n=y(e.resolve),i=[],a=0,c=1;k(t,(function(t){var u=a++,s=!1;i.push(void 0),c++,n.call(e,t).then((function(t){s||(s=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=X(e),r=n.reject,o=j((function(){var o=y(e.resolve);k(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},busE:function(t,e,n){var r=n("2oRo"),o=n("kRJp"),i=n("UTVS"),a=n("zk60"),c=n("iSVu"),u=n("afO8"),s=u.get,f=u.enforce,l=String(String).split("String");(t.exports=function(t,e,n,c){var u=!!c&&!!c.unsafe,s=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),f(n).source=l.join("string"==typeof e?e:"")),t!==r?(u?!p&&t[e]&&(s=!0):delete t[e],s?t[e]=n:o(t,e,n)):s?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||c(this)}))},busr:function(t,e){e.f=Object.getOwnPropertySymbols},"c/8x":function(t,e,n){n("94Vg")("asyncIterator")},cJLW:function(t,e,n){var r=n("wA6s"),o=n("T69T");r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n("/Ybd").f})},cZY6:function(t,e,n){var r=n("rG8t");t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},cwa4:function(t,e,n){var r=n("rG8t");t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},d8Sw:function(t,e,n){var r=n("rG8t");t.exports=function(t){return r((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},"dBg+":function(t,e){e.f=Object.getOwnPropertySymbols},dI74:function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("sup")},{sup:function(){return o(this,"sup","","")}})},dPn5:function(t,e,n){"use strict";var r=n("G7bs").charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"eDl+":function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},erNl:function(t,e,n){var r=n("ezU2");t.exports=Array.isArray||function(t){return"Array"==r(t)}},ezU2:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},f5p1:function(t,e,n){var r=n("2oRo"),o=n("iSVu"),i=r.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},fHMY:function(t,e,n){var r,o=n("glrk"),i=n("N+g0"),a=n("eDl+"),c=n("0BK2"),u=n("G+Rx"),s=n("zBJ4"),f=n("93I0")("IE_PROTO"),l=function(){},p=function(t){return"<script>"+t+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(o){}var t,e;h=r?function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=s("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};c[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=o(t),n=new l,l.prototype=null,n[f]=t):n=h(),void 0===e?n:i(n,e)}},fMvl:function(t,e,n){"use strict";var r=n("HSQg"),o=n("F26l"),i=n("hmpk"),a=n("EQZg"),c=n("unYP");r("search",1,(function(t,e,n){return[function(e){var n=i(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var i=o(t),u=String(this),s=i.lastIndex;a(s,0)||(i.lastIndex=0);var f=c(i,u);return a(i.lastIndex,s)||(i.lastIndex=s),null===f?-1:f.index}]}))},g69M:function(t,e,n){var r=n("wA6s"),o=n("rG8t"),i=n("TzEA").f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},"g6v/":function(t,e,n){var r=n("0Dky");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},g9hI:function(t,e){t.exports=!1},gXAK:function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("big")},{big:function(){return o(this,"big","","")}})},gke3:function(t,e,n){"use strict";var r=n("wA6s"),o=n("kk6e").filter,i=n("lRyB"),a=n("w2hq"),c=i("filter"),u=a("filter");r({target:"Array",proto:!0,forced:!c||!u},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},glrk:function(t,e,n){var r=n("hh1v");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},gn9T:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},"hH+7":function(t,e,n){var r=n("ezU2");t.exports=function(t){if("number"!=typeof t&&"Number"!=r(t))throw TypeError("Incorrect invocation");return+t}},"hN/g":function(t,e,n){"use strict";n.r(e),n("qWBM"),n("TiiU"),n("RmHb"),n("vywg"),n("pDpN"),n("T1qB"),n("7K3S")},hdsk:function(t,e,n){"use strict";var r,o=n("ocAm"),i=n("8aNu"),a=n("M7Xk"),c=n("wdMf"),u=n("DAme"),s=n("6XUM"),f=n("XH/I").enforce,l=n("yaK9"),p=!o.ActiveXObject&&"ActiveXObject"in o,h=Object.isExtensible,v=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},d=t.exports=c("WeakMap",v,u);if(l&&p){r=u.getConstructor(v,"WeakMap",!0),a.REQUIRED=!0;var g=d.prototype,y=g.delete,m=g.has,b=g.get,w=g.set;i(g,{delete:function(t){if(s(t)&&!h(t)){var e=f(this);return e.frozen||(e.frozen=new r),y.call(this,t)||e.frozen.delete(t)}return y.call(this,t)},has:function(t){if(s(t)&&!h(t)){var e=f(this);return e.frozen||(e.frozen=new r),m.call(this,t)||e.frozen.has(t)}return m.call(this,t)},get:function(t){if(s(t)&&!h(t)){var e=f(this);return e.frozen||(e.frozen=new r),m.call(this,t)?b.call(this,t):e.frozen.get(t)}return b.call(this,t)},set:function(t,e){if(s(t)&&!h(t)){var n=f(this);n.frozen||(n.frozen=new r),m.call(this,t)?w.call(this,t,e):n.frozen.set(t,e)}else w.call(this,t,e);return this}})}},hh1v:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},hmpk:function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},i85Z:function(t,e,n){var r=n("U+kB");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},iSVu:function(t,e,n){var r=n("xs3f"),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return o.call(t)}),t.exports=r.inspectSource},ipMl:function(t,e,n){var r=n("F26l");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(a){var i=t.return;throw void 0!==i&&r(i.call(t)),a}}},jnLS:function(t,e,n){var r=n("hmpk"),o="["+n("xFZC")+"]",i=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),c=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(i,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:c(1),end:c(2),trim:c(3)}},kIOX:function(t,e,n){var r=n("ocAm"),o=n("OjQg"),i=n("nP0K"),a=n("aJMj");for(var c in o){var u=r[c],s=u&&u.prototype;if(s&&s.forEach!==i)try{a(s,"forEach",i)}catch(f){s.forEach=i}}},kOOl:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},kP9Y:function(t,e,n){var r=n("wA6s"),o=n("4GtL"),i=n("A1Hp");r({target:"Array",proto:!0},{copyWithin:o}),i("copyWithin")},kRJp:function(t,e,n){var r=n("g6v/"),o=n("m/L8"),i=n("XGwC");t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},kcGo:function(t,e,n){var r=n("wA6s"),o=n("qc/G");r({target:"Date",proto:!0,forced:Date.prototype.toISOString!==o},{toISOString:o})},kk6e:function(t,e,n){var r=n("tcQx"),o=n("tUdv"),i=n("VCQ8"),a=n("xpLY"),c=n("JafA"),u=[].push,s=function(t){var e=1==t,n=2==t,s=3==t,f=4==t,l=6==t,p=5==t||l;return function(h,v,d,g){for(var y,m,b=i(h),w=o(b),k=r(v,d,3),E=a(w.length),S=0,x=g||c,_=e?x(h,E):n?x(h,0):void 0;E>S;S++)if((p||S in w)&&(m=k(y=w[S],S,b),t))if(e)_[S]=m;else if(m)switch(t){case 3:return!0;case 5:return y;case 6:return S;case 2:u.call(_,y)}else if(f)return!1;return l?-1:s||f?f:_}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)}},kpca:function(t,e,n){var r=n("wA6s"),o=n("Nvxz"),i=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},ktmr:function(t,e,n){var r=n("ocAm");t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},lMq5:function(t,e,n){var r=n("0Dky"),o=/#|\.prototype\./,i=function(t,e){var n=c[a(t)];return n==s||n!=u&&("function"==typeof e?r(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=i.data={},u=i.NATIVE="N",s=i.POLYFILL="P";t.exports=i},lPAZ:function(t,e,n){n("8ydS"),n("DGHb"),n("kcGo"),n("n43T"),n("Y5OV");var r=n("E7aN");t.exports=r.Date},lRyB:function(t,e,n){var r=n("rG8t"),o=n("m41k"),i=n("D3bo"),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},ls82:function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(t,e,n,r){var o=Object.create((e&&e.prototype instanceof f?e:f).prototype),i=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=b(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var f=u(t,e,n);if("normal"===f.type){if(r=n.done?"completed":"suspendedYield",f.arg===s)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(r="completed",n.method="throw",n.arg=f.arg)}}}(t,n,i),o}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}t.wrap=c;var s={};function f(){}function l(){}function p(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,d=v&&v(v(S([])));d&&d!==e&&n.call(d,o)&&(h=d);var g=p.prototype=f.prototype=Object.create(h);function y(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function m(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function b(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,s;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:x}}function x(){return{value:void 0,done:!0}}return l.prototype=g.constructor=p,p.constructor=l,p[a]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},y(m.prototype),m.prototype[i]=function(){return this},t.AsyncIterator=m,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new m(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(g),g[a]="Generator",g[o]=function(){return this},g.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=S,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},t}(t.exports);try{regeneratorRuntime=r}catch(o){Function("r","regeneratorRuntime = r")(r)}},"m/L8":function(t,e,n){var r=n("g6v/"),o=n("DPsx"),i=n("glrk"),a=n("wE6v"),c=Object.defineProperty;e.f=r?c:function(t,e,n){if(i(t),e=a(e,!0),i(n),o)try{return c(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},m2tE:function(t,e,n){var r=n("wA6s"),o=n("IBH3");r({target:"Array",stat:!0,forced:!n("EIBq")((function(t){Array.from(t)}))},{from:o})},m41k:function(t,e,n){var r=n("ocAm"),o=n("yIiL"),i=n("OG5q"),a=n("SDMg"),c=n("U+kB"),u=n("i85Z"),s=o("wks"),f=r.Symbol,l=u?f:f&&f.withoutSetter||a;t.exports=function(t){return i(s,t)||(s[t]=c&&i(f,t)?f[t]:l("Symbol."+t)),s[t]}},mA9f:function(t,e,n){n("wA6s")({target:"Function",proto:!0},{bind:n("E8Ab")})},mN5b:function(t,e,n){var r=n("4PyY"),o=n("ezU2"),i=n("m41k")("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=Object(t),i))?n:a?o(e):"Object"==(r=o(e))&&"function"==typeof e.callee?"Arguments":r}},mRIq:function(t,e,n){"use strict";n.r(e),n("LRWt"),n("mA9f"),n("MjoC"),n("3vMK"),n("RCvO"),n("cJLW"),n("EntM"),n("znfk"),n("A7hN"),n("wqfI"),n("g69M"),n("IzYO"),n("+5Eg"),n("WLa2"),n("KMug"),n("QVG+"),n("wVAr"),n("nuqZ"),n("u5Nv"),n("WnNu"),n("NX+v"),n("F4rZ"),n("wZP2"),n("m2tE"),n("BcWx"),n("ntzx"),n("6q6p"),n("sQrk"),n("6fhQ"),n("v5if"),n("FU1i"),n("gke3"),n("XEin"),n("FeI/"),n("Q4jj"),n("IQbc"),n("6lQQ"),n("Xm88"),n("kP9Y"),n("DscF"),n("6CEi"),n("Jt/z"),n("rH3X"),n("r8F+"),n("IPby"),n("s1IR"),n("tkWj"),n("tNyX"),n("vipS"),n("L4l2"),n("BaTD"),n("oatR"),n("QUoj"),n("gXAK"),n("4axp"),n("Yu3F"),n("J4zY"),n("WKvG"),n("W0ke"),n("zTQA"),n("WEX0"),n("qpIG"),n("VmbE"),n("4Kt7"),n("dI74"),n("K1Z7"),n("S3Yw"),n("fMvl"),n("PmIt"),n("PbJR"),n("Ay+M"),n("qaQR"),n("tXU5"),n("lPAZ"),n("T4tC"),n("Rj+b"),n("pWza"),n("vRoz"),n("hdsk"),n("ViWx"),n("kIOX"),n("riHj"),n("bHwr"),n("8CeQ"),n("ls82")},"n/2t":function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},n1Kw:function(t,e,n){var r=n("wA6s"),o=n("rG8t"),i=n("pn4C"),a=Math.abs,c=Math.exp,u=Math.E;r({target:"Math",stat:!0,forced:o((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(t){return a(t=+t)<1?(i(t)-i(-t))/2:(c(t-1)-c(-t-1))*(u/2)}})},n43T:function(t,e,n){var r=n("2MGJ"),o=Date.prototype,i=o.toString,a=o.getTime;new Date(NaN)+""!="Invalid Date"&&r(o,"toString",(function(){var t=a.call(this);return t==t?i.call(this):"Invalid Date"}))},nIH4:function(t,e,n){"use strict";var r=n("/Ybd").f,o=n("2RDa"),i=n("8aNu"),a=n("tcQx"),c=n("SM6+"),u=n("Rn6E"),s=n("WijE"),f=n("JHhb"),l=n("T69T"),p=n("M7Xk").fastKey,h=n("XH/I"),v=h.set,d=h.getterFor;t.exports={getConstructor:function(t,e,n,s){var f=t((function(t,r){c(t,f,e),v(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),l||(t.size=0),null!=r&&u(r,t[s],t,n)})),h=d(e),g=function(t,e,n){var r,o,i=h(t),a=y(t,e);return a?a.value=n:(i.last=a={index:o=p(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),l?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},y=function(t,e){var n,r=h(t),o=p(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==e)return n};return i(f.prototype,{clear:function(){for(var t=h(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,l?t.size=0:this.size=0},delete:function(t){var e=h(this),n=y(this,t);if(n){var r=n.next,o=n.previous;delete e.index[n.index],n.removed=!0,o&&(o.next=r),r&&(r.previous=o),e.first==n&&(e.first=r),e.last==n&&(e.last=o),l?e.size--:this.size--}return!!n},forEach:function(t){for(var e,n=h(this),r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),i(f.prototype,n?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),l&&r(f.prototype,"size",{get:function(){return h(this).size}}),f},setStrong:function(t,e,n){var r=e+" Iterator",o=d(e),i=d(r);s(t,e,(function(t,e){v(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),f(e)}}},nP0K:function(t,e,n){"use strict";var r=n("kk6e").forEach,o=n("6CJb"),i=n("w2hq"),a=o("forEach"),c=i("forEach");t.exports=a&&c?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},ntzx:function(t,e,n){"use strict";var r=n("wA6s"),o=n("tUdv"),i=n("EMtK"),a=n("6CJb"),c=[].join,u=o!=Object,s=a("join",",");r({target:"Array",proto:!0,forced:u||!s},{join:function(t){return c.call(i(this),void 0===t?",":t)}})},nuqZ:function(t,e,n){var r=n("wA6s"),o=n("KlhL");r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},"oB0/":function(t,e,n){"use strict";var r=n("Neub"),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},oatR:function(t,e,n){"use strict";var r,o=n("wA6s"),i=n("7gGY").f,a=n("xpLY"),c=n("s8qp"),u=n("hmpk"),s=n("0Ds2"),f=n("g9hI"),l="".startsWith,p=Math.min,h=s("startsWith");o({target:"String",proto:!0,forced:!(!f&&!h&&(r=i(String.prototype,"startsWith"),r&&!r.writable)||h)},{startsWith:function(t){var e=String(u(this));c(t);var n=a(p(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return l?l.call(e,r,n):e.slice(n,n+r.length)===r}})},ocAm:function(t,e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||Function("return this")()},ow8b:function(t,e,n){n("wA6s")({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},p82S:function(t,e,n){var r=n("F26l"),o=n("Neub"),i=n("m41k")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},pDpN:function(t,e,n){var r,o;void 0===(o="function"==typeof(r=function(){"use strict";!function(t){var e=t.performance;function n(t){e&&e.mark&&e.mark(t)}function r(t,n){e&&e.measure&&e.measure(t,n)}n("Zone");var o=t.__Zone_symbol_prefix||"__zone_symbol__";function i(t){return o+t}var a=!0===t[i("forceDuplicateZoneCheck")];if(t.Zone){if(a||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}var c=function(){function e(t,n){_classCallCheck(this,e),this._parent=t,this._name=n?n.name||"unnamed":"<root>",this._properties=n&&n.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,n)}return _createClass(e,[{key:"get",value:function(t){var e=this.getZoneWith(t);if(e)return e._properties[t]}},{key:"getZoneWith",value:function(t){for(var e=this;e;){if(e._properties.hasOwnProperty(t))return e;e=e._parent}return null}},{key:"fork",value:function(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}},{key:"wrap",value:function(t,e){if("function"!=typeof t)throw new Error("Expecting function got: "+t);var n=this._zoneDelegate.intercept(this,t,e),r=this;return function(){return r.runGuarded(n,this,arguments,e)}}},{key:"run",value:function(t,e,n,r){P={parent:P,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{P=P.parent}}},{key:"runGuarded",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;P={parent:P,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(o){if(this._zoneDelegate.handleError(this,o))throw o}}finally{P=P.parent}}},{key:"runTask",value:function(t,e,n){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||b).name+"; Execution: "+this.name+")");if(t.state!==w||t.type!==A&&t.type!==T){var r=t.state!=S;r&&t._transitionTo(S,E),t.runCount++;var o=I;I=t,P={parent:P,zone:this};try{t.type==T&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,e,n)}catch(i){if(this._zoneDelegate.handleError(this,i))throw i}}finally{t.state!==w&&t.state!==_&&(t.type==A||t.data&&t.data.isPeriodic?r&&t._transitionTo(E,S):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(w,S,w))),P=P.parent,I=o}}}},{key:"scheduleTask",value:function(t){if(t.zone&&t.zone!==this)for(var e=this;e;){if(e===t.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(t.zone.name));e=e.parent}t._transitionTo(k,w);var n=[];t._zoneDelegates=n,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(r){throw t._transitionTo(_,k,w),this._zoneDelegate.handleError(this,r),r}return t._zoneDelegates===n&&this._updateTaskCount(t,1),t.state==k&&t._transitionTo(E,k),t}},{key:"scheduleMicroTask",value:function(t,e,n,r){return this.scheduleTask(new l(O,t,e,n,r,void 0))}},{key:"scheduleMacroTask",value:function(t,e,n,r,o){return this.scheduleTask(new l(T,t,e,n,r,o))}},{key:"scheduleEventTask",value:function(t,e,n,r,o){return this.scheduleTask(new l(A,t,e,n,r,o))}},{key:"cancelTask",value:function(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||b).name+"; Execution: "+this.name+")");t._transitionTo(x,E,S);try{this._zoneDelegate.cancelTask(this,t)}catch(e){throw t._transitionTo(_,x),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(t,-1),t._transitionTo(w,x),t.runCount=0,t}},{key:"_updateTaskCount",value:function(t,e){var n=t._zoneDelegates;-1==e&&(t._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(t.type,e)}},{key:"parent",get:function(){return this._parent}},{key:"name",get:function(){return this._name}}],[{key:"assertZonePatched",value:function(){if(t.Promise!==j.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}},{key:"__load_patch",value:function(o,i){if(j.hasOwnProperty(o)){if(a)throw Error("Already loaded patch: "+o)}else if(!t["__Zone_disable_"+o]){var c="Zone:"+o;n(c),j[o]=i(t,e,M),r(c,c)}}},{key:"root",get:function(){for(var t=e.current;t.parent;)t=t.parent;return t}},{key:"current",get:function(){return P.zone}},{key:"currentTask",get:function(){return I}}]),e}();c.__symbol__=i;var u,s={name:"",onHasTask:function(t,e,n,r){return t.hasTask(n,r)},onScheduleTask:function(t,e,n,r){return t.scheduleTask(n,r)},onInvokeTask:function(t,e,n,r,o,i){return t.invokeTask(n,r,o,i)},onCancelTask:function(t,e,n,r){return t.cancelTask(n,r)}},f=function(){function t(e,n,r){_classCallCheck(this,t),this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=n,this._forkZS=r&&(r&&r.onFork?r:n._forkZS),this._forkDlgt=r&&(r.onFork?n:n._forkDlgt),this._forkCurrZone=r&&(r.onFork?this.zone:n._forkCurrZone),this._interceptZS=r&&(r.onIntercept?r:n._interceptZS),this._interceptDlgt=r&&(r.onIntercept?n:n._interceptDlgt),this._interceptCurrZone=r&&(r.onIntercept?this.zone:n._interceptCurrZone),this._invokeZS=r&&(r.onInvoke?r:n._invokeZS),this._invokeDlgt=r&&(r.onInvoke?n:n._invokeDlgt),this._invokeCurrZone=r&&(r.onInvoke?this.zone:n._invokeCurrZone),this._handleErrorZS=r&&(r.onHandleError?r:n._handleErrorZS),this._handleErrorDlgt=r&&(r.onHandleError?n:n._handleErrorDlgt),this._handleErrorCurrZone=r&&(r.onHandleError?this.zone:n._handleErrorCurrZone),this._scheduleTaskZS=r&&(r.onScheduleTask?r:n._scheduleTaskZS),this._scheduleTaskDlgt=r&&(r.onScheduleTask?n:n._scheduleTaskDlgt),this._scheduleTaskCurrZone=r&&(r.onScheduleTask?this.zone:n._scheduleTaskCurrZone),this._invokeTaskZS=r&&(r.onInvokeTask?r:n._invokeTaskZS),this._invokeTaskDlgt=r&&(r.onInvokeTask?n:n._invokeTaskDlgt),this._invokeTaskCurrZone=r&&(r.onInvokeTask?this.zone:n._invokeTaskCurrZone),this._cancelTaskZS=r&&(r.onCancelTask?r:n._cancelTaskZS),this._cancelTaskDlgt=r&&(r.onCancelTask?n:n._cancelTaskDlgt),this._cancelTaskCurrZone=r&&(r.onCancelTask?this.zone:n._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var o=r&&r.onHasTask;(o||n&&n._hasTaskZS)&&(this._hasTaskZS=o?r:s,this._hasTaskDlgt=n,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,r.onScheduleTask||(this._scheduleTaskZS=s,this._scheduleTaskDlgt=n,this._scheduleTaskCurrZone=this.zone),r.onInvokeTask||(this._invokeTaskZS=s,this._invokeTaskDlgt=n,this._invokeTaskCurrZone=this.zone),r.onCancelTask||(this._cancelTaskZS=s,this._cancelTaskDlgt=n,this._cancelTaskCurrZone=this.zone))}return _createClass(t,[{key:"fork",value:function(t,e){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,t,e):new c(t,e)}},{key:"intercept",value:function(t,e,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,t,e,n):e}},{key:"invoke",value:function(t,e,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,t,e,n,r,o):e.apply(n,r)}},{key:"handleError",value:function(t,e){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,t,e)}},{key:"scheduleTask",value:function(t,e){var n=e;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,t,e))||(n=e);else if(e.scheduleFn)e.scheduleFn(e);else{if(e.type!=O)throw new Error("Task is missing scheduleFn.");y(e)}return n}},{key:"invokeTask",value:function(t,e,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,t,e,n,r):e.callback.apply(n,r)}},{key:"cancelTask",value:function(t,e){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,t,e);else{if(!e.cancelFn)throw Error("Task is not cancelable");n=e.cancelFn(e)}return n}},{key:"hasTask",value:function(t,e){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,t,e)}catch(n){this.handleError(t,n)}}},{key:"_updateTaskCount",value:function(t,e){var n=this._taskCounts,r=n[t],o=n[t]=r+e;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:t})}}]),t}(),l=function(){function e(n,r,o,i,a,c){if(_classCallCheck(this,e),this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=c,!o)throw new Error("callback is not defined");this.callback=o;var u=this;this.invoke=n===A&&i&&i.useG?e.invokeTask:function(){return e.invokeTask.call(t,u,this,arguments)}}return _createClass(e,[{key:"cancelScheduleRequest",value:function(){this._transitionTo(w,k)}},{key:"_transitionTo",value:function(t,e,n){if(this._state!==e&&this._state!==n)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(t,"', expecting state '").concat(e,"'").concat(n?" or '"+n+"'":"",", was '").concat(this._state,"'."));this._state=t,t==w&&(this._zoneDelegates=null)}},{key:"toString",value:function(){return this.data&&void 0!==this.data.handleId?this.data.handleId.toString():Object.prototype.toString.call(this)}},{key:"toJSON",value:function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}},{key:"zone",get:function(){return this._zone}},{key:"state",get:function(){return this._state}}],[{key:"invokeTask",value:function(t,e,n){t||(t=this),C++;try{return t.runCount++,t.zone.runTask(t,e,n)}finally{1==C&&m(),C--}}}]),e}(),p=i("setTimeout"),h=i("Promise"),v=i("then"),d=[],g=!1;function y(e){if(0===C&&0===d.length)if(u||t[h]&&(u=t[h].resolve(0)),u){var n=u[v];n||(n=u.then),n.call(u,m)}else t[p](m,0);e&&d.push(e)}function m(){if(!g){for(g=!0;d.length;){var t=d;d=[];for(var e=0;e<t.length;e++){var n=t[e];try{n.zone.runTask(n,null,null)}catch(r){M.onUnhandledError(r)}}}M.microtaskDrainDone(),g=!1}}var b={name:"NO ZONE"},w="notScheduled",k="scheduling",E="scheduled",S="running",x="canceling",_="unknown",O="microTask",T="macroTask",A="eventTask",j={},M={symbol:i,currentZoneFrame:function(){return P},onUnhandledError:R,microtaskDrainDone:R,scheduleMicroTask:y,showUncaughtError:function(){return!c[i("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:R,patchMethod:function(){return R},bindArguments:function(){return[]},patchThen:function(){return R},patchMacroTask:function(){return R},setNativePromise:function(t){t&&"function"==typeof t.resolve&&(u=t.resolve(0))},patchEventPrototype:function(){return R},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return R},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return R},wrapWithCurrentZone:function(){return R},filterProperties:function(){return[]},attachOriginToPatched:function(){return R},_redefineProperty:function(){return R},patchCallbacks:function(){return R}},P={parent:null,zone:new c(null,null)},I=null,C=0;function R(){}r("Zone","Zone"),t.Zone=c}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),Zone.__load_patch("ZoneAwarePromise",(function(t,e,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,i=n.symbol,a=[],c=!0===t[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],u=i("Promise"),s=i("then");n.onUnhandledError=function(t){if(n.showUncaughtError()){var e=t&&t.rejection;e?console.error("Unhandled Promise rejection:",e instanceof Error?e.message:e,"; Zone:",t.zone.name,"; Task:",t.task&&t.task.source,"; Value:",e,e instanceof Error?e.stack:void 0):console.error(t)}},n.microtaskDrainDone=function(){for(var t=function(){var t=a.shift();try{t.zone.runGuarded((function(){throw t}))}catch(r){!function(t){n.onUnhandledError(t);try{var r=e[f];"function"==typeof r&&r.call(this,t)}catch(o){}}(r)}};a.length;)t()};var f=i("unhandledPromiseRejectionHandler");function l(t){return t&&t.then}function p(t){return t}function h(t){return O.reject(t)}var v=i("state"),d=i("value"),g=i("finally"),y=i("parentPromiseValue"),m=i("parentPromiseState");function b(t,e){return function(n){try{k(t,e,n)}catch(r){k(t,!1,r)}}}var w=i("currentTaskTrace");function k(t,r,i){var u,s,f=(u=!1,function(t){return function(){u||(u=!0,t.apply(null,arguments))}});if(t===i)throw new TypeError("Promise resolved with itself");if(null===t[v]){var l=null;try{"object"!=typeof i&&"function"!=typeof i||(l=i&&i.then)}catch(T){return f((function(){k(t,!1,T)}))(),t}if(!1!==r&&i instanceof O&&i.hasOwnProperty(v)&&i.hasOwnProperty(d)&&null!==i[v])S(i),k(t,i[v],i[d]);else if(!1!==r&&"function"==typeof l)try{l.call(i,f(b(t,r)),f(b(t,!1)))}catch(T){f((function(){k(t,!1,T)}))()}else{t[v]=r;var p=t[d];if(t[d]=i,t[g]===g&&!0===r&&(t[v]=t[m],t[d]=t[y]),!1===r&&i instanceof Error){var h=e.currentTask&&e.currentTask.data&&e.currentTask.data.__creationTrace__;h&&o(i,w,{configurable:!0,enumerable:!1,writable:!0,value:h})}for(var E=0;E<p.length;)x(t,p[E++],p[E++],p[E++],p[E++]);if(0==p.length&&0==r){t[v]=0;var _=i;if(!c)try{throw new Error("Uncaught (in promise): "+((s=i)&&s.toString===Object.prototype.toString?(s.constructor&&s.constructor.name||"")+": "+JSON.stringify(s):s?s.toString():Object.prototype.toString.call(s))+(i&&i.stack?"\n"+i.stack:""))}catch(T){_=T}_.rejection=i,_.promise=t,_.zone=e.current,_.task=e.currentTask,a.push(_),n.scheduleMicroTask()}}}return t}var E=i("rejectionHandledHandler");function S(t){if(0===t[v]){try{var n=e[E];n&&"function"==typeof n&&n.call(this,{rejection:t[d],promise:t})}catch(o){}t[v]=!1;for(var r=0;r<a.length;r++)t===a[r].promise&&a.splice(r,1)}}function x(t,e,n,r,o){S(t);var i=t[v],a=i?"function"==typeof r?r:p:"function"==typeof o?o:h;e.scheduleMicroTask("Promise.then",(function(){try{var r=t[d],o=!!n&&g===n[g];o&&(n[y]=r,n[m]=i);var c=e.run(a,void 0,o&&a!==h&&a!==p?[]:[r]);k(n,!0,c)}catch(u){k(n,!1,u)}}),n)}var _=function(){},O=function(){function t(e){_classCallCheck(this,t);if(!(this instanceof t))throw new Error("Must be an instanceof Promise.");this[v]=null,this[d]=[];try{e&&e(b(this,!0),b(this,!1))}catch(n){k(this,!1,n)}}return _createClass(t,null,[{key:"toString",value:function(){return"function ZoneAwarePromise() { [native code] }"}},{key:"resolve",value:function(t){return k(new this(null),!0,t)}},{key:"reject",value:function(t){return k(new this(null),!1,t)}},{key:"race",value:function(t){var e,n,r=new this((function(t,r){e=t,n=r}));function o(t){e(t)}function i(t){n(t)}var a,c=_createForOfIteratorHelper(t);try{for(c.s();!(a=c.n()).done;){var u=a.value;l(u)||(u=this.resolve(u)),u.then(o,i)}}catch(s){c.e(s)}finally{c.f()}return r}},{key:"all",value:function(e){return t.allWithCallback(e)}},{key:"allSettled",value:function(e){return(this&&this.prototype instanceof t?this:t).allWithCallback(e,{thenCallback:function(t){return{status:"fulfilled",value:t}},errorCallback:function(t){return{status:"rejected",reason:t}}})}},{key:"allWithCallback",value:function(t,e){var n,r,o,i=this,a=new this((function(t,e){n=t,r=e})),c=2,u=0,s=[],f=_createForOfIteratorHelper(t);try{var p=function(){var t=o.value;l(t)||(t=i.resolve(t));var a=u;try{t.then((function(t){s[a]=e?e.thenCallback(t):t,0===--c&&n(s)}),(function(t){e?(s[a]=e.errorCallback(t),0===--c&&n(s)):r(t)}))}catch(f){r(f)}c++,u++};for(f.s();!(o=f.n()).done;)p()}catch(h){f.e(h)}finally{f.f()}return 0===(c-=2)&&n(s),a}}]),_createClass(t,[{key:"then",value:function(n,r){var o=this.constructor[Symbol.species];o&&"function"==typeof o||(o=this.constructor||t);var i=new o(_),a=e.current;return null==this[v]?this[d].push(a,i,n,r):x(this,a,i,n,r),i}},{key:"catch",value:function(t){return this.then(null,t)}},{key:"finally",value:function(n){var r=this.constructor[Symbol.species];r&&"function"==typeof r||(r=t);var o=new r(_);o[g]=g;var i=e.current;return null==this[v]?this[d].push(i,o,n,n):x(this,i,o,n,n),o}},{key:Symbol.toStringTag,get:function(){return"Promise"}},{key:Symbol.species,get:function(){return t}}]),t}();O.resolve=O.resolve,O.reject=O.reject,O.race=O.race,O.all=O.all;var T=t[u]=t.Promise,A=e.__symbol__("ZoneAwarePromise"),j=r(t,"Promise");j&&!j.configurable||(j&&delete j.writable,j&&delete j.value,j||(j={configurable:!0,enumerable:!0}),j.get=function(){return t[A]?t[A]:t[u]},j.set=function(e){e===O?t[A]=e:(t[u]=e,e.prototype[s]||I(e),n.setNativePromise(e))},o(t,"Promise",j)),t.Promise=O;var M,P=i("thenPatched");function I(t){var e=t.prototype,n=r(e,"then");if(!n||!1!==n.writable&&n.configurable){var o=e.then;e[s]=o,t.prototype.then=function(t,e){var n=this;return new O((function(t,e){o.call(n,t,e)})).then(t,e)},t[P]=!0}}if(n.patchThen=I,T){I(T);var C=t.fetch;"function"==typeof C&&(t[n.symbol("fetch")]=C,t.fetch=(M=C,function(){var t=M.apply(this,arguments);if(t instanceof O)return t;var e=t.constructor;return e[P]||I(e),t}))}return Promise[e.__symbol__("uncaughtPromiseErrors")]=a,O}));var t=Object.getOwnPropertyDescriptor,e=Object.defineProperty,n=Object.getPrototypeOf,r=Object.create,o=Array.prototype.slice,i=Zone.__symbol__("addEventListener"),a=Zone.__symbol__("removeEventListener"),c=Zone.__symbol__("");function u(t,e){return Zone.current.wrap(t,e)}function s(t,e,n,r,o){return Zone.current.scheduleMacroTask(t,e,n,r,o)}var f=Zone.__symbol__,l="undefined"!=typeof window,p=l?window:void 0,h=l&&p||"object"==typeof self&&self||global,v=[null];function d(t,e){for(var n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=u(t[n],e+"_"+n));return t}function g(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}var y="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,m=!("nw"in h)&&void 0!==h.process&&"[object process]"==={}.toString.call(h.process),b=!m&&!y&&!(!l||!p.HTMLElement),w=void 0!==h.process&&"[object process]"==={}.toString.call(h.process)&&!y&&!(!l||!p.HTMLElement),k={},E=function(t){if(t=t||h.event){var e=k[t.type];e||(e=k[t.type]=f("ON_PROPERTY"+t.type));var n,r=this||t.target||h,o=r[e];if(b&&r===p&&"error"===t.type){var i=t;!0===(n=o&&o.call(this,i.message,i.filename,i.lineno,i.colno,i.error))&&t.preventDefault()}else null==(n=o&&o.apply(this,arguments))||n||t.preventDefault();return n}};function S(n,r,o){var i=t(n,r);if(!i&&o&&t(o,r)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){var a=f("on"+r+"patched");if(!n.hasOwnProperty(a)||!n[a]){delete i.writable,delete i.value;var c=i.get,u=i.set,s=r.substr(2),l=k[s];l||(l=k[s]=f("ON_PROPERTY"+s)),i.set=function(t){var e=this;e||n!==h||(e=h),e&&(e[l]&&e.removeEventListener(s,E),u&&u.apply(e,v),"function"==typeof t?(e[l]=t,e.addEventListener(s,E,!1)):e[l]=null)},i.get=function(){var t=this;if(t||n!==h||(t=h),!t)return null;var e=t[l];if(e)return e;if(c){var o=c&&c.call(this);if(o)return i.set.call(this,o),"function"==typeof t.removeAttribute&&t.removeAttribute(r),o}return null},e(n,r,i),n[a]=!0}}}function x(t,e,n){if(e)for(var r=0;r<e.length;r++)S(t,"on"+e[r],n);else{var o=[];for(var i in t)"on"==i.substr(0,2)&&o.push(i);for(var a=0;a<o.length;a++)S(t,o[a],n)}}var _=f("originalInstance");function O(t){var n=h[t];if(n){h[f(t)]=n,h[t]=function(){var e=d(arguments,t);switch(e.length){case 0:this[_]=new n;break;case 1:this[_]=new n(e[0]);break;case 2:this[_]=new n(e[0],e[1]);break;case 3:this[_]=new n(e[0],e[1],e[2]);break;case 4:this[_]=new n(e[0],e[1],e[2],e[3]);break;default:throw new Error("Arg list too long.")}},j(h[t],n);var r,o=new n((function(){}));for(r in o)"XMLHttpRequest"===t&&"responseBlob"===r||function(n){"function"==typeof o[n]?h[t].prototype[n]=function(){return this[_][n].apply(this[_],arguments)}:e(h[t].prototype,n,{set:function(e){"function"==typeof e?(this[_][n]=u(e,t+"."+n),j(this[_][n],e)):this[_][n]=e},get:function(){return this[_][n]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(h[t][r]=n[r])}}function T(e,r,o){for(var i=e;i&&!i.hasOwnProperty(r);)i=n(i);!i&&e[r]&&(i=e);var a=f(r),c=null;if(i&&!(c=i[a])&&(c=i[a]=i[r],g(i&&t(i,r)))){var u=o(c,a,r);i[r]=function(){return u(this,arguments)},j(i[r],c)}return c}function A(t,e,n){var r=null;function o(t){var e=t.data;return e.args[e.cbIdx]=function(){t.invoke.apply(this,arguments)},r.apply(e.target,e.args),t}r=T(t,e,(function(t){return function(e,r){var i=n(e,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?s(i.name,r[i.cbIdx],i,o):t.apply(e,r)}}))}function j(t,e){t[f("OriginalDelegate")]=e}var M=!1,P=!1;function I(){try{var t=p.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch(e){}return!1}function C(){if(M)return P;M=!0;try{var t=p.navigator.userAgent;-1===t.indexOf("MSIE ")&&-1===t.indexOf("Trident/")&&-1===t.indexOf("Edge/")||(P=!0)}catch(e){}return P}Zone.__load_patch("toString",(function(t){var e=Function.prototype.toString,n=f("OriginalDelegate"),r=f("Promise"),o=f("Error"),i=function(){if("function"==typeof this){var i=this[n];if(i)return"function"==typeof i?e.call(i):Object.prototype.toString.call(i);if(this===Promise){var a=t[r];if(a)return e.call(a)}if(this===Error){var c=t[o];if(c)return e.call(c)}}return e.call(this)};i[n]=e,Function.prototype.toString=i;var a=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":a.call(this)}}));var R=!1;if("undefined"!=typeof window)try{var D=Object.defineProperty({},"passive",{get:function(){R=!0}});window.addEventListener("test",D,D),window.removeEventListener("test",D,D)}catch(ut){R=!1}var L={useG:!0},N={},Z={},G=new RegExp("^"+c+"(\\w+)(true|false)$"),z=f("propagationStopped");function F(t,e){var n=(e?e(t):t)+"false",r=(e?e(t):t)+"true",o=c+n,i=c+r;N[t]={},N[t].false=o,N[t].true=i}function U(t,e,r){var o=r&&r.add||"addEventListener",i=r&&r.rm||"removeEventListener",a=r&&r.listeners||"eventListeners",u=r&&r.rmAll||"removeAllListeners",s=f(o),l="."+o+":",p=function(t,e,n){if(!t.isRemoved){var r=t.callback;"object"==typeof r&&r.handleEvent&&(t.callback=function(t){return r.handleEvent(t)},t.originalDelegate=r),t.invoke(t,e,[n]);var o=t.options;o&&"object"==typeof o&&o.once&&e[i].call(e,n.type,t.originalDelegate?t.originalDelegate:t.callback,o)}},h=function(e){if(e=e||t.event){var n=this||e.target||t,r=n[N[e.type].false];if(r)if(1===r.length)p(r[0],n,e);else for(var o=r.slice(),i=0;i<o.length&&(!e||!0!==e[z]);i++)p(o[i],n,e)}},v=function(e){if(e=e||t.event){var n=this||e.target||t,r=n[N[e.type].true];if(r)if(1===r.length)p(r[0],n,e);else for(var o=r.slice(),i=0;i<o.length&&(!e||!0!==e[z]);i++)p(o[i],n,e)}};function d(e,r){if(!e)return!1;var p=!0;r&&void 0!==r.useG&&(p=r.useG);var d=r&&r.vh,g=!0;r&&void 0!==r.chkDup&&(g=r.chkDup);var y=!1;r&&void 0!==r.rt&&(y=r.rt);for(var b=e;b&&!b.hasOwnProperty(o);)b=n(b);if(!b&&e[o]&&(b=e),!b)return!1;if(b[s])return!1;var w,k=r&&r.eventNameToString,E={},S=b[s]=b[o],x=b[f(i)]=b[i],_=b[f(a)]=b[a],O=b[f(u)]=b[u];function T(t,e){return!R&&"object"==typeof t&&t?!!t.capture:R&&e?"boolean"==typeof t?{capture:t,passive:!0}:t?"object"==typeof t&&!1!==t.passive?Object.assign(Object.assign({},t),{passive:!0}):t:{passive:!0}:t}r&&r.prepend&&(w=b[f(r.prepend)]=b[r.prepend]);var A=p?function(t){if(!E.isExisting)return S.call(E.target,E.eventName,E.capture?v:h,E.options)}:function(t){return S.call(E.target,E.eventName,t.invoke,E.options)},M=p?function(t){if(!t.isRemoved){var e,n=N[t.eventName];n&&(e=n[t.capture?"true":"false"]);var r=e&&t.target[e];if(r)for(var o=0;o<r.length;o++)if(r[o]===t){r.splice(o,1),t.isRemoved=!0,0===r.length&&(t.allRemoved=!0,t.target[e]=null);break}}if(t.allRemoved)return x.call(t.target,t.eventName,t.capture?v:h,t.options)}:function(t){return x.call(t.target,t.eventName,t.invoke,t.options)},P=r&&r.diff?r.diff:function(t,e){var n=typeof e;return"function"===n&&t.callback===e||"object"===n&&t.originalDelegate===e},I=Zone[f("BLACK_LISTED_EVENTS")],C=t[f("PASSIVE_EVENTS")],D=function(e,n,o,i){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],c=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return function(){var u=this||t,s=arguments[0];r&&r.transferEventName&&(s=r.transferEventName(s));var f=arguments[1];if(!f)return e.apply(this,arguments);if(m&&"uncaughtException"===s)return e.apply(this,arguments);var l=!1;if("function"!=typeof f){if(!f.handleEvent)return e.apply(this,arguments);l=!0}if(!d||d(e,f,u,arguments)){var h=R&&!!C&&-1!==C.indexOf(s),v=T(arguments[2],h);if(I)for(var y=0;y<I.length;y++)if(s===I[y])return h?e.call(u,s,f,v):e.apply(this,arguments);var b=!!v&&("boolean"==typeof v||v.capture),w=!(!v||"object"!=typeof v)&&v.once,S=Zone.current,x=N[s];x||(F(s,k),x=N[s]);var _,O=x[b?"true":"false"],A=u[O],j=!1;if(A){if(j=!0,g)for(var M=0;M<A.length;M++)if(P(A[M],f))return}else A=u[O]=[];var D=u.constructor.name,G=Z[D];G&&(_=G[s]),_||(_=D+n+(k?k(s):s)),E.options=v,w&&(E.options.once=!1),E.target=u,E.capture=b,E.eventName=s,E.isExisting=j;var z=p?L:void 0;z&&(z.taskData=E);var U=S.scheduleEventTask(_,f,z,o,i);return E.target=null,z&&(z.taskData=null),w&&(v.once=!0),(R||"boolean"!=typeof U.options)&&(U.options=v),U.target=u,U.capture=b,U.eventName=s,l&&(U.originalDelegate=f),c?A.unshift(U):A.push(U),a?u:void 0}}};return b[o]=D(S,l,A,M,y),w&&(b.prependListener=D(w,".prependListener:",(function(t){return w.call(E.target,E.eventName,t.invoke,E.options)}),M,y,!0)),b[i]=function(){var e=this||t,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));var o=arguments[2],i=!!o&&("boolean"==typeof o||o.capture),a=arguments[1];if(!a)return x.apply(this,arguments);if(!d||d(x,a,e,arguments)){var u,s=N[n];s&&(u=s[i?"true":"false"]);var f=u&&e[u];if(f)for(var l=0;l<f.length;l++){var p=f[l];if(P(p,a))return f.splice(l,1),p.isRemoved=!0,0===f.length&&(p.allRemoved=!0,e[u]=null,"string"==typeof n)&&(e[c+"ON_PROPERTY"+n]=null),p.zone.cancelTask(p),y?e:void 0}return x.apply(this,arguments)}},b[a]=function(){var e=this||t,n=arguments[0];r&&r.transferEventName&&(n=r.transferEventName(n));for(var o=[],i=q(e,k?k(n):n),a=0;a<i.length;a++){var c=i[a];o.push(c.originalDelegate?c.originalDelegate:c.callback)}return o},b[u]=function(){var e=this||t,n=arguments[0];if(n){r&&r.transferEventName&&(n=r.transferEventName(n));var o=N[n];if(o){var a=e[o.false],c=e[o.true];if(a)for(var s=a.slice(),f=0;f<s.length;f++){var l=s[f];this[i].call(this,n,l.originalDelegate?l.originalDelegate:l.callback,l.options)}if(c)for(var p=c.slice(),h=0;h<p.length;h++){var v=p[h];this[i].call(this,n,v.originalDelegate?v.originalDelegate:v.callback,v.options)}}}else{for(var d=Object.keys(e),g=0;g<d.length;g++){var m=G.exec(d[g]),b=m&&m[1];b&&"removeListener"!==b&&this[u].call(this,b)}this[u].call(this,"removeListener")}if(y)return this},j(b[o],S),j(b[i],x),O&&j(b[u],O),_&&j(b[a],_),!0}for(var g=[],y=0;y<e.length;y++)g[y]=d(e[y],r);return g}function q(t,e){if(!e){var n=[];for(var r in t){var o=G.exec(r),i=o&&o[1];if(i&&(!e||i===e)){var a=t[r];if(a)for(var c=0;c<a.length;c++)n.push(a[c])}}return n}var u=N[e];u||(F(e),u=N[e]);var s=t[u.false],f=t[u.true];return s?f?s.concat(f):s.slice():f?f.slice():[]}function X(t,e){var n=t.Event;n&&n.prototype&&e.patchMethod(n.prototype,"stopImmediatePropagation",(function(t){return function(e,n){e[z]=!0,t&&t.apply(e,n)}}))}function Y(t,e,n,r,o){var i=Zone.__symbol__(r);if(!e[i]){var a=e[i]=e[r];e[r]=function(i,c,u){return c&&c.prototype&&o.forEach((function(e){var o="".concat(n,".").concat(r,"::")+e,i=c.prototype;if(i.hasOwnProperty(e)){var a=t.ObjectGetOwnPropertyDescriptor(i,e);a&&a.value?(a.value=t.wrapWithCurrentZone(a.value,o),t._redefineProperty(c.prototype,e,a)):i[e]&&(i[e]=t.wrapWithCurrentZone(i[e],o))}else i[e]&&(i[e]=t.wrapWithCurrentZone(i[e],o))})),a.call(e,i,c,u)},t.attachOriginToPatched(e[r],a)}}var V=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],H=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],W=["load"],B=["blur","error","focus","load","resize","scroll","messageerror"],J=["bounce","finish","start"],Q=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],K=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],$=["close","error","open","message"],tt=["error","message"],et=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],V,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function nt(t,e,n){if(!n||0===n.length)return e;var r=n.filter((function(e){return e.target===t}));if(!r||0===r.length)return e;var o=r[0].ignoreProperties;return e.filter((function(t){return-1===o.indexOf(t)}))}function rt(t,e,n,r){t&&x(t,nt(t,e,n),r)}function ot(t,e){if((!m||w)&&!Zone[t.symbol("patchEvents")]){var r="undefined"!=typeof WebSocket,o=e.__Zone_ignore_on_properties;if(b){var i=window,a=I?[{target:i,ignoreProperties:["error"]}]:[];rt(i,et.concat(["messageerror"]),o?o.concat(a):o,n(i)),rt(Document.prototype,et,o),void 0!==i.SVGElement&&rt(i.SVGElement.prototype,et,o),rt(Element.prototype,et,o),rt(HTMLElement.prototype,et,o),rt(HTMLMediaElement.prototype,H,o),rt(HTMLFrameSetElement.prototype,V.concat(B),o),rt(HTMLBodyElement.prototype,V.concat(B),o),rt(HTMLFrameElement.prototype,W,o),rt(HTMLIFrameElement.prototype,W,o);var c=i.HTMLMarqueeElement;c&&rt(c.prototype,J,o);var u=i.Worker;u&&rt(u.prototype,tt,o)}var s=e.XMLHttpRequest;s&&rt(s.prototype,Q,o);var f=e.XMLHttpRequestEventTarget;f&&rt(f&&f.prototype,Q,o),"undefined"!=typeof IDBIndex&&(rt(IDBIndex.prototype,K,o),rt(IDBRequest.prototype,K,o),rt(IDBOpenDBRequest.prototype,K,o),rt(IDBDatabase.prototype,K,o),rt(IDBTransaction.prototype,K,o),rt(IDBCursor.prototype,K,o)),r&&rt(WebSocket.prototype,$,o)}}Zone.__load_patch("util",(function(n,i,a){a.patchOnProperties=x,a.patchMethod=T,a.bindArguments=d,a.patchMacroTask=A;var s=i.__symbol__("BLACK_LISTED_EVENTS"),f=i.__symbol__("UNPATCHED_EVENTS");n[f]&&(n[s]=n[f]),n[s]&&(i[s]=i[f]=n[s]),a.patchEventPrototype=X,a.patchEventTarget=U,a.isIEOrEdge=C,a.ObjectDefineProperty=e,a.ObjectGetOwnPropertyDescriptor=t,a.ObjectCreate=r,a.ArraySlice=o,a.patchClass=O,a.wrapWithCurrentZone=u,a.filterProperties=nt,a.attachOriginToPatched=j,a._redefineProperty=Object.defineProperty,a.patchCallbacks=Y,a.getGlobalObjects=function(){return{globalSources:Z,zoneSymbolEventNames:N,eventNames:et,isBrowser:b,isMix:w,isNode:m,TRUE_STR:"true",FALSE_STR:"false",ZONE_SYMBOL_PREFIX:c,ADD_EVENT_LISTENER_STR:"addEventListener",REMOVE_EVENT_LISTENER_STR:"removeEventListener"}}}));var it=f("zoneTask");function at(t,e,n,r){var o=null,i=null;n+=r;var a={};function c(e){var n=e.data;return n.args[0]=function(){try{e.invoke.apply(this,arguments)}finally{e.data&&e.data.isPeriodic||("number"==typeof n.handleId?delete a[n.handleId]:n.handleId&&(n.handleId[it]=null))}},n.handleId=o.apply(t,n.args),e}function u(t){return i(t.data.handleId)}o=T(t,e+=r,(function(n){return function(o,i){if("function"==typeof i[0]){var f=s(e,i[0],{isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},c,u);if(!f)return f;var l=f.data.handleId;return"number"==typeof l?a[l]=f:l&&(l[it]=f),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(f.ref=l.ref.bind(l),f.unref=l.unref.bind(l)),"number"==typeof l||l?l:f}return n.apply(t,i)}})),i=T(t,n,(function(e){return function(n,r){var o,i=r[0];"number"==typeof i?o=a[i]:(o=i&&i[it])||(o=i),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof i?delete a[i]:i&&(i[it]=null),o.zone.cancelTask(o)):e.apply(t,r)}}))}function ct(t,e){if(!Zone[e.symbol("patchEventTarget")]){for(var n=e.getGlobalObjects(),r=n.eventNames,o=n.zoneSymbolEventNames,i=n.TRUE_STR,a=n.FALSE_STR,c=n.ZONE_SYMBOL_PREFIX,u=0;u<r.length;u++){var s=r[u],f=c+(s+a),l=c+(s+i);o[s]={},o[s][a]=f,o[s][i]=l}var p=t.EventTarget;return p&&p.prototype?(e.patchEventTarget(t,[p&&p.prototype]),!0):void 0}}Zone.__load_patch("legacy",(function(t){var e=t[Zone.__symbol__("legacyPatch")];e&&e()})),Zone.__load_patch("timers",(function(t){at(t,"set","clear","Timeout"),at(t,"set","clear","Interval"),at(t,"set","clear","Immediate")})),Zone.__load_patch("requestAnimationFrame",(function(t){at(t,"request","cancel","AnimationFrame"),at(t,"mozRequest","mozCancel","AnimationFrame"),at(t,"webkitRequest","webkitCancel","AnimationFrame")})),Zone.__load_patch("blocking",(function(t,e){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++)T(t,n[r],(function(n,r,o){return function(r,i){return e.current.run(n,t,i,o)}}))})),Zone.__load_patch("EventTarget",(function(t,e,n){!function(t,e){e.patchEventPrototype(t,e)}(t,n),ct(t,n);var r=t.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(t,[r.prototype]),O("MutationObserver"),O("WebKitMutationObserver"),O("IntersectionObserver"),O("FileReader")})),Zone.__load_patch("on_property",(function(t,e,n){ot(n,t)})),Zone.__load_patch("customElements",(function(t,e,n){!function(t,e){var n=e.getGlobalObjects(),r=n.isBrowser,o=n.isMix;(r||o)&&t.customElements&&"customElements"in t&&e.patchCallbacks(e,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(t,n)})),Zone.__load_patch("XHR",(function(t,e){!function(t){var p=t.XMLHttpRequest;if(p){var h=p.prototype,v=h[i],d=h[a];if(!v){var g=t.XMLHttpRequestEventTarget;if(g){var y=g.prototype;v=y[i],d=y[a]}}var m=T(h,"open",(function(){return function(t,e){return t[r]=0==e[2],t[u]=e[1],m.apply(t,e)}})),b=f("fetchTaskAborting"),w=f("fetchTaskScheduling"),k=T(h,"send",(function(){return function(t,n){if(!0===e.current[w])return k.apply(t,n);if(t[r])return k.apply(t,n);var o={target:t,url:t[u],isPeriodic:!1,args:n,aborted:!1},i=s("XMLHttpRequest.send",x,o,S,_);t&&!0===t[l]&&!o.aborted&&"scheduled"===i.state&&i.invoke()}})),E=T(h,"abort",(function(){return function(t,r){var o=t[n];if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===e.current[b])return E.apply(t,r)}}))}function S(t){var r=t.data,u=r.target;u[c]=!1,u[l]=!1;var s=u[o];v||(v=u[i],d=u[a]),s&&d.call(u,"readystatechange",s);var f=u[o]=function(){if(u.readyState===u.DONE)if(!r.aborted&&u[c]&&"scheduled"===t.state){var n=u[e.__symbol__("loadfalse")];if(n&&n.length>0){var o=t.invoke;t.invoke=function(){for(var n=u[e.__symbol__("loadfalse")],i=0;i<n.length;i++)n[i]===t&&n.splice(i,1);r.aborted||"scheduled"!==t.state||o.call(t)},n.push(t)}else t.invoke()}else r.aborted||!1!==u[c]||(u[l]=!0)};return v.call(u,"readystatechange",f),u[n]||(u[n]=t),k.apply(u,r.args),u[c]=!0,t}function x(){}function _(t){var e=t.data;return e.aborted=!0,E.apply(e.target,e.args)}}(t);var n=f("xhrTask"),r=f("xhrSync"),o=f("xhrListener"),c=f("xhrScheduled"),u=f("xhrURL"),l=f("xhrErrorBeforeScheduled")})),Zone.__load_patch("geolocation",(function(e){e.navigator&&e.navigator.geolocation&&function(e,n){for(var r=e.constructor.name,o=function(o){var i=n[o],a=e[i];if(a){if(!g(t(e,i)))return"continue";e[i]=function(t){var e=function(){return t.apply(this,d(arguments,r+"."+i))};return j(e,t),e}(a)}},i=0;i<n.length;i++)o(i)}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])})),Zone.__load_patch("PromiseRejectionEvent",(function(t,e){function n(e){return function(n){q(t,e).forEach((function(r){var o=t.PromiseRejectionEvent;if(o){var i=new o(e,{promise:n.promise,reason:n.rejection});r.invoke(i)}}))}}t.PromiseRejectionEvent&&(e[f("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),e[f("rejectionHandledHandler")]=n("rejectionhandled"))}))})?r.call(e,n,e,t):r)||(t.exports=o)},pWza:function(t,e,n){var r=n("T69T"),o=n("/Ybd"),i=n("x0kV"),a=n("JkSk").UNSUPPORTED_Y;r&&("g"!=/./g.flags||a)&&o.f(RegExp.prototype,"flags",{configurable:!0,get:i})},pd8B:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},pn4C:function(t,e){var n=Math.expm1,r=Math.exp;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:r(t)-1}:n},ppGB:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"pz+c":function(t,e){t.exports={}},qWBM:function(t,e,n){n("T63A");var r=n("Qo9l");t.exports=r.Object.entries},qaQR:function(t,e,n){n("D+RQ"),n("ZBUp"),n("s5r0"),n("COcp"),n("+IJR"),n("kpca"),n("yI8t"),n("ow8b"),n("5eAq"),n("5zDw"),n("8xKV"),n("ane6");var r=n("E7aN");t.exports=r.Number},"qc/G":function(t,e,n){"use strict";var r=n("rG8t"),o=n("QcXc").start,i=Math.abs,a=Date.prototype,c=a.getTime,u=a.toISOString;t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=u.call(new Date(-50000000000001))}))||!r((function(){u.call(new Date(NaN))}))?function(){if(!isFinite(c.call(this)))throw RangeError("Invalid time value");var t=this.getUTCFullYear(),e=this.getUTCMilliseconds(),n=t<0?"-":t>9999?"+":"";return n+o(i(t),n?6:4,0)+"-"+o(this.getUTCMonth()+1,2,0)+"-"+o(this.getUTCDate(),2,0)+"T"+o(this.getUTCHours(),2,0)+":"+o(this.getUTCMinutes(),2,0)+":"+o(this.getUTCSeconds(),2,0)+"."+o(e,3,0)+"Z"}:u},qjkP:function(t,e,n){"use strict";var r,o,i=n("x0kV"),a=n("JkSk"),c=RegExp.prototype.exec,u=String.prototype.replace,s=c,f=(o=/b*/g,c.call(r=/a/,"a"),c.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),l=a.UNSUPPORTED_Y||a.BROKEN_CARET,p=void 0!==/()??/.exec("")[1];(f||p||l)&&(s=function(t){var e,n,r,o,a=this,s=l&&a.sticky,h=i.call(a),v=a.source,d=0,g=t;return s&&(-1===(h=h.replace("y","")).indexOf("g")&&(h+="g"),g=String(t).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(v="(?: "+v+")",g=" "+g,d++),n=new RegExp("^(?:"+v+")",h)),p&&(n=new RegExp("^"+v+"$(?!\\s)",h)),f&&(e=a.lastIndex),r=c.call(s?n:a,g),s?r?(r.input=r.input.slice(d),r[0]=r[0].slice(d),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:f&&r&&(a.lastIndex=a.global?r.index+r[0].length:e),p&&r&&r.length>1&&u.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r}),t.exports=s},qpIG:function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("small")},{small:function(){return o(this,"small","","")}})},qx7X:function(t,e,n){var r=n("ocAm"),o=n("6XUM"),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},qxPZ:function(t,e,n){var r=n("tiKp")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(o){}}return!1}},"r8F+":function(t,e,n){var r=n("wA6s"),o=n("7Oj1"),i=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},rCRE:function(t,e,n){"use strict";var r=n("EMtK"),o=n("vDBE"),i=n("xpLY"),a=n("6CJb"),c=n("w2hq"),u=Math.min,s=[].lastIndexOf,f=!!s&&1/[1].lastIndexOf(1,-0)<0,l=a("lastIndexOf"),p=c("indexOf",{ACCESSORS:!0,1:0});t.exports=!f&&l&&p?s:function(t){if(f)return s.apply(this,arguments)||0;var e=r(this),n=i(e.length),a=n-1;for(arguments.length>1&&(a=u(a,o(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in e&&e[a]===t)return a||0;return-1}},rG8t:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},rH3X:function(t,e,n){"use strict";var r=n("EMtK"),o=n("A1Hp"),i=n("pz+c"),a=n("XH/I"),c=n("WijE"),u=a.set,s=a.getterFor("Array Iterator");t.exports=c(Array,"Array",(function(t,e){u(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=s(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},riHj:function(t,e,n){var r=n("ocAm"),o=n("OjQg"),i=n("rH3X"),a=n("aJMj"),c=n("m41k"),u=c("iterator"),s=c("toStringTag"),f=i.values;for(var l in o){var p=r[l],h=p&&p.prototype;if(h){if(h[u]!==f)try{a(h,u,f)}catch(d){h[u]=f}if(h[s]||a(h,s,l),o[l])for(var v in i)if(h[v]!==i[v])try{a(h,v,i[v])}catch(d){h[v]=i[v]}}}},rkAj:function(t,e,n){var r=n("g6v/"),o=n("0Dky"),i=n("UTVS"),a=Object.defineProperty,c={},u=function(t){throw t};t.exports=function(t,e){if(i(c,t))return c[t];e||(e={});var n=[][t],s=!!i(e,"ACCESSORS")&&e.ACCESSORS,f=i(e,0)?e[0]:u,l=i(e,1)?e[1]:void 0;return c[t]=!!n&&!o((function(){if(s&&!r)return!0;var t={length:-1};s?a(t,1,{enumerable:!0,get:u}):t[1]=1,n.call(t,f,l)}))}},rwGd:function(t,e,n){var r=n("rG8t"),o=n("xFZC");t.exports=function(t){return r((function(){return!!o[t]()||"\u200b\x85\u180e"!="\u200b\x85\u180e"[t]()||o[t].name!==t}))}},s1IR:function(t,e,n){"use strict";var r=n("wA6s"),o=n("jnLS").trim;r({target:"String",proto:!0,forced:n("rwGd")("trim")},{trim:function(){return o(this)}})},s5r0:function(t,e,n){n("wA6s")({target:"Number",stat:!0},{isFinite:n("Yg8j")})},s8qp:function(t,e,n){var r=n("1p6F");t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},sQkB:function(t,e,n){var r=n("2oRo"),o=n("A2ZE"),i=Function.call;t.exports=function(t,e,n){return o(i,r[t].prototype[e],n)}},sQrk:function(t,e,n){"use strict";var r=n("wA6s"),o=n("7Oj1"),i=n("vDBE"),a=n("xpLY"),c=n("VCQ8"),u=n("JafA"),s=n("DYg9"),f=n("lRyB"),l=n("w2hq"),p=f("splice"),h=l("splice",{ACCESSORS:!0,0:0,1:2}),v=Math.max,d=Math.min;r({target:"Array",proto:!0,forced:!p||!h},{splice:function(t,e){var n,r,f,l,p,h,g=c(this),y=a(g.length),m=o(t,y),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=y-m):(n=b-2,r=d(v(i(e),0),y-m)),y+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(f=u(g,r),l=0;l<r;l++)(p=m+l)in g&&s(f,l,g[p]);if(f.length=r,n<r){for(l=m;l<y-r;l++)h=l+n,(p=l+r)in g?g[h]=g[p]:delete g[h];for(l=y;l>y-r+n;l--)delete g[l-1]}else if(n>r)for(l=y-r;l>m;l--)h=l+n-1,(p=l+r-1)in g?g[h]=g[p]:delete g[h];for(l=0;l<n;l++)g[l+m]=arguments[l+2];return g.length=y-r+n,f}})},shqn:function(t,e,n){var r=n("/Ybd").f,o=n("OG5q"),i=n("m41k")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},tNyX:function(t,e,n){"use strict";var r=n("wA6s"),o=n("G7bs").codeAt;r({target:"String",proto:!0},{codePointAt:function(t){return o(this,t)}})},tUdv:function(t,e,n){var r=n("rG8t"),o=n("ezU2"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},tXU5:function(t,e,n){n("IXlp"),n("3caY"),n("8iOR"),n("D94X"),n("M1AK"),n("S58s"),n("JhPs"),n("Pf6x"),n("CwIO"),n("QFgE"),n("WEpO"),n("Djps"),n("6oxo"),n("BnCb"),n("n1Kw"),n("aTTg"),n("OVXS"),n("SdaC");var r=n("E7aN");t.exports=r.Math},tcQx:function(t,e,n){var r=n("Neub");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},tiKp:function(t,e,n){var r=n("2oRo"),o=n("VpIT"),i=n("UTVS"),a=n("kOOl"),c=n("STAE"),u=n("/b8u"),s=o("wks"),f=r.Symbol,l=u?f:f&&f.withoutSetter||a;t.exports=function(t){return i(s,t)||(s[t]=c&&i(f,t)?f[t]:l("Symbol."+t)),s[t]}},tkWj:function(t,e,n){"use strict";var r=n("G7bs").charAt,o=n("XH/I"),i=n("WijE"),a=o.set,c=o.getterFor("String Iterator");i(String,"String",(function(t){a(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=c(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},tuHh:function(t,e,n){var r=n("T/Kj");t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},u5Nv:function(t,e,n){n("wA6s")({target:"Object",stat:!0},{is:n("EQZg")})},uKyN:function(t,e,n){n("94Vg")("species")},uSMZ:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},unYP:function(t,e,n){var r=n("ezU2"),o=n("qjkP");t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},uoca:function(t,e,n){var r=n("hmpk"),o=/"/g;t.exports=function(t,e,n,i){var a=String(r(t)),c="<"+e;return""!==n&&(c+=" "+n+'="'+String(i).replace(o,"&quot;")+'"'),c+">"+a+"</"+e+">"}},v5if:function(t,e,n){"use strict";var r=n("wA6s"),o=n("nP0K");r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},vDBE:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},vRoz:function(t,e,n){"use strict";var r=n("wdMf"),o=n("nIH4");t.exports=r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},vVmn:function(t,e,n){var r=n("OG5q"),o=n("EMtK"),i=n("OXtp").indexOf,a=n("yQMY");t.exports=function(t,e){var n,c=o(t),u=0,s=[];for(n in c)!r(a,n)&&r(c,n)&&s.push(n);for(;e.length>u;)r(c,n=e[u++])&&(~i(s,n)||s.push(n));return s}},vZCr:function(t,e,n){var r=n("ocAm"),o=n("jnLS").trim,i=n("xFZC"),a=r.parseFloat,c=1/a(i+"-0")!=-1/0;t.exports=c?function(t){var e=o(String(t)),n=a(e);return 0===n&&"-"==e.charAt(0)?-0:n}:a},vipS:function(t,e,n){"use strict";var r,o=n("wA6s"),i=n("7gGY").f,a=n("xpLY"),c=n("s8qp"),u=n("hmpk"),s=n("0Ds2"),f=n("g9hI"),l="".endsWith,p=Math.min,h=s("endsWith");o({target:"String",proto:!0,forced:!(!f&&!h&&(r=i(String.prototype,"endsWith"),r&&!r.writable)||h)},{endsWith:function(t){var e=String(u(this));c(t);var n=arguments.length>1?arguments[1]:void 0,r=a(e.length),o=void 0===n?r:p(a(n),r),i=String(t);return l?l.call(e,i,o):e.slice(o-i.length,o)===i}})},vyNX:function(t,e,n){var r=n("Neub"),o=n("VCQ8"),i=n("tUdv"),a=n("xpLY"),c=function(t){return function(e,n,c,u){r(n);var s=o(e),f=i(s),l=a(s.length),p=t?l-1:0,h=t?-1:1;if(c<2)for(;;){if(p in f){u=f[p],p+=h;break}if(p+=h,t?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;t?p>=0:l>p;p+=h)p in f&&(u=n(u,f[p],p,s));return u}};t.exports={left:c(!1),right:c(!0)}},vywg:function(t,e,n){n("yq1k");var r=n("sQkB");t.exports=r("Array","includes")},w2hq:function(t,e,n){var r=n("T69T"),o=n("rG8t"),i=n("OG5q"),a=Object.defineProperty,c={},u=function(t){throw t};t.exports=function(t,e){if(i(c,t))return c[t];e||(e={});var n=[][t],s=!!i(e,"ACCESSORS")&&e.ACCESSORS,f=i(e,0)?e[0]:u,l=i(e,1)?e[1]:void 0;return c[t]=!!n&&!o((function(){if(s&&!r)return!0;var t={length:-1};s?a(t,1,{enumerable:!0,get:u}):t[1]=1,n.call(t,f,l)}))}},w4Hq:function(t,e,n){"use strict";var r=n("VCQ8"),o=n("7Oj1"),i=n("xpLY");t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,c=o(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,s=void 0===u?n:o(u,n);s>c;)e[c++]=t;return e}},wA6s:function(t,e,n){var r=n("ocAm"),o=n("7gGY").f,i=n("aJMj"),a=n("2MGJ"),c=n("Fqhe"),u=n("NIlc"),s=n("MkZA");t.exports=function(t,e){var n,f,l,p,h,v=t.target,d=t.global,g=t.stat;if(n=d?r:g?r[v]||c(v,{}):(r[v]||{}).prototype)for(f in e){if(p=e[f],l=t.noTargetGet?(h=o(n,f))&&h.value:n[f],!s(d?f:v+(g?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;u(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(n,f,p,t)}}},wE6v:function(t,e,n){var r=n("hh1v");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},wIVT:function(t,e,n){var r=n("OG5q"),o=n("VCQ8"),i=n("/AsP"),a=n("cwa4"),c=i("IE_PROTO"),u=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=o(t),r(t,c)?t[c]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},wVAr:function(t,e,n){var r=n("wA6s"),o=n("rG8t"),i=n("6XUM"),a=Object.isExtensible;r({target:"Object",stat:!0,forced:o((function(){a(1)}))},{isExtensible:function(t){return!!i(t)&&(!a||a(t))}})},wZP2:function(t,e,n){n("wA6s")({target:"Array",stat:!0},{isArray:n("erNl")})},wdMf:function(t,e,n){"use strict";var r=n("wA6s"),o=n("ocAm"),i=n("MkZA"),a=n("2MGJ"),c=n("M7Xk"),u=n("Rn6E"),s=n("SM6+"),f=n("6XUM"),l=n("rG8t"),p=n("EIBq"),h=n("shqn"),v=n("K6ZX");t.exports=function(t,e,n){var d=-1!==t.indexOf("Map"),g=-1!==t.indexOf("Weak"),y=d?"set":"add",m=o[t],b=m&&m.prototype,w=m,k={},E=function(t){var e=b[t];a(b,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(g&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!f(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!f(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(i(t,"function"!=typeof m||!(g||b.forEach&&!l((function(){(new m).entries().next()})))))w=n.getConstructor(e,t,d,y),c.REQUIRED=!0;else if(i(t,!0)){var S=new w,x=S[y](g?{}:-0,1)!=S,_=l((function(){S.has(1)})),O=p((function(t){new m(t)})),T=!g&&l((function(){for(var t=new m,e=5;e--;)t[y](e,e);return!t.has(-0)}));O||((w=e((function(e,n){s(e,w,t);var r=v(new m,e,w);return null!=n&&u(n,r[y],r,d),r}))).prototype=b,b.constructor=w),(_||T)&&(E("delete"),E("has"),d&&E("get")),(T||x)&&E(y),g&&b.clear&&delete b.clear}return k[t]=w,r({global:!0,forced:w!=m},k),h(w,t),g||n.setStrong(w,t,d),w}},wqfI:function(t,e,n){var r=n("wA6s"),o=n("VCQ8"),i=n("ZRqE");r({target:"Object",stat:!0,forced:n("rG8t")((function(){i(1)}))},{keys:function(t){return i(o(t))}})},x0kV:function(t,e,n){"use strict";var r=n("F26l");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},xDBR:function(t,e){t.exports=!1},xFZC:function(t,e){t.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},xpLY:function(t,e,n){var r=n("vDBE"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},xrYK:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},xs3f:function(t,e,n){var r=n("2oRo"),o=n("zk60"),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},yI8t:function(t,e,n){n("wA6s")({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},yIiL:function(t,e,n){var r=n("g9hI"),o=n("KBkW");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.4",mode:r?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},yQMY:function(t,e){t.exports={}},yaK9:function(t,e,n){var r=n("ocAm"),o=n("6urC"),i=r.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},yoRg:function(t,e,n){var r=n("UTVS"),o=n("/GqU"),i=n("TWQb").indexOf,a=n("0BK2");t.exports=function(t,e){var n,c=o(t),u=0,s=[];for(n in c)!r(a,n)&&r(c,n)&&s.push(n);for(;e.length>u;)r(c,n=e[u++])&&(~i(s,n)||s.push(n));return s}},yq1k:function(t,e,n){"use strict";var r=n("I+eb"),o=n("TWQb").includes,i=n("RNIs");r({target:"Array",proto:!0,forced:!n("rkAj")("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},zBJ4:function(t,e,n){var r=n("2oRo"),o=n("hh1v"),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},zTQA:function(t,e,n){"use strict";var r=n("wA6s"),o=n("uoca");r({target:"String",proto:!0,forced:n("d8Sw")("italics")},{italics:function(){return o(this,"i","","")}})},zk60:function(t,e,n){var r=n("2oRo"),o=n("kRJp");t.exports=function(t,e){try{o(r,t,e)}catch(n){r[t]=e}return e}},znfk:function(t,e,n){var r=n("wA6s"),o=n("rG8t"),i=n("EMtK"),a=n("7gGY").f,c=n("T69T"),u=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!c||u,sham:!c},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})}},[[4,0]]]);
//# sourceMappingURL=polyfills-es5.9d6b5a981286c1da891f.js.map
function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){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 _iterableToArrayLimit(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){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(l){r=!0,o=l}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _toConsumableArray2(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){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 _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray2(t)}function _createForOfIteratorHelper(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=_unsupportedIterableToArray(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}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 i,r,o=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return o=t.done,t},e:function(t){a=!0,r=t},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray2(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)?_arrayLikeToArray2(t,e):void 0}}function _arrayLikeToArray2(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function _construct(t,e,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&_setPrototypeOf(r,n.prototype),r}).apply(null,arguments)}function _get(t,e,n){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=_superPropBase(t,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(n):r.value}})(t,e,n||t)}function _superPropBase(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _inherits(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&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _createSuper(t){var e=_isNativeReflectConstruct();return function(){var n,i=_getPrototypeOf(t);if(e){var r=_getPrototypeOf(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){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 _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),t}(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},1:function(t,e){},2:function(t,e){},"2yAJ":function(t,e){function n(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function i(t,e,i,r,o,a){return n((s=n(n(e,t),n(r,a)))<<(l=o)|s>>>32-l,i);var s,l}function r(t,e,n,r,o,a,s){return i(e&n|~e&r,t,e,o,a,s)}function o(t,e,n,r,o,a,s){return i(e&r|n&~r,t,e,o,a,s)}function a(t,e,n,r,o,a,s){return i(e^n^r,t,e,o,a,s)}function s(t,e,n,r,o,a,s){return i(n^(e|~r),t,e,o,a,s)}function l(t,e){var i,l,c,u,h;t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;var f=1732584193,d=-271733879,p=-1732584194,v=271733878;for(i=0;i<t.length;i+=16)l=f,c=d,u=p,h=v,f=r(f,d,p,v,t[i],7,-680876936),v=r(v,f,d,p,t[i+1],12,-389564586),p=r(p,v,f,d,t[i+2],17,606105819),d=r(d,p,v,f,t[i+3],22,-1044525330),f=r(f,d,p,v,t[i+4],7,-176418897),v=r(v,f,d,p,t[i+5],12,1200080426),p=r(p,v,f,d,t[i+6],17,-1473231341),d=r(d,p,v,f,t[i+7],22,-45705983),f=r(f,d,p,v,t[i+8],7,1770035416),v=r(v,f,d,p,t[i+9],12,-1958414417),p=r(p,v,f,d,t[i+10],17,-42063),d=r(d,p,v,f,t[i+11],22,-1990404162),f=r(f,d,p,v,t[i+12],7,1804603682),v=r(v,f,d,p,t[i+13],12,-40341101),p=r(p,v,f,d,t[i+14],17,-1502002290),f=o(f,d=r(d,p,v,f,t[i+15],22,1236535329),p,v,t[i+1],5,-165796510),v=o(v,f,d,p,t[i+6],9,-1069501632),p=o(p,v,f,d,t[i+11],14,643717713),d=o(d,p,v,f,t[i],20,-373897302),f=o(f,d,p,v,t[i+5],5,-701558691),v=o(v,f,d,p,t[i+10],9,38016083),p=o(p,v,f,d,t[i+15],14,-660478335),d=o(d,p,v,f,t[i+4],20,-405537848),f=o(f,d,p,v,t[i+9],5,568446438),v=o(v,f,d,p,t[i+14],9,-1019803690),p=o(p,v,f,d,t[i+3],14,-187363961),d=o(d,p,v,f,t[i+8],20,1163531501),f=o(f,d,p,v,t[i+13],5,-1444681467),v=o(v,f,d,p,t[i+2],9,-51403784),p=o(p,v,f,d,t[i+7],14,1735328473),f=a(f,d=o(d,p,v,f,t[i+12],20,-1926607734),p,v,t[i+5],4,-378558),v=a(v,f,d,p,t[i+8],11,-2022574463),p=a(p,v,f,d,t[i+11],16,1839030562),d=a(d,p,v,f,t[i+14],23,-35309556),f=a(f,d,p,v,t[i+1],4,-1530992060),v=a(v,f,d,p,t[i+4],11,1272893353),p=a(p,v,f,d,t[i+7],16,-155497632),d=a(d,p,v,f,t[i+10],23,-1094730640),f=a(f,d,p,v,t[i+13],4,681279174),v=a(v,f,d,p,t[i],11,-358537222),p=a(p,v,f,d,t[i+3],16,-722521979),d=a(d,p,v,f,t[i+6],23,76029189),f=a(f,d,p,v,t[i+9],4,-640364487),v=a(v,f,d,p,t[i+12],11,-421815835),p=a(p,v,f,d,t[i+15],16,530742520),f=s(f,d=a(d,p,v,f,t[i+2],23,-995338651),p,v,t[i],6,-198630844),v=s(v,f,d,p,t[i+7],10,1126891415),p=s(p,v,f,d,t[i+14],15,-1416354905),d=s(d,p,v,f,t[i+5],21,-57434055),f=s(f,d,p,v,t[i+12],6,1700485571),v=s(v,f,d,p,t[i+3],10,-1894986606),p=s(p,v,f,d,t[i+10],15,-1051523),d=s(d,p,v,f,t[i+1],21,-2054922799),f=s(f,d,p,v,t[i+8],6,1873313359),v=s(v,f,d,p,t[i+15],10,-30611744),p=s(p,v,f,d,t[i+6],15,-1560198380),d=s(d,p,v,f,t[i+13],21,1309151649),f=s(f,d,p,v,t[i+4],6,-145523070),v=s(v,f,d,p,t[i+11],10,-1120210379),p=s(p,v,f,d,t[i+2],15,718787259),d=s(d,p,v,f,t[i+9],21,-343485551),f=n(f,l),d=n(d,c),p=n(p,u),v=n(v,h);return[f,d,p,v]}function c(t){var e,n="",i=32*t.length;for(e=0;e<i;e+=8)n+=String.fromCharCode(t[e>>5]>>>e%32&255);return n}function u(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e<n.length;e+=1)n[e]=0;var i=8*t.length;for(e=0;e<i;e+=8)n[e>>5]|=(255&t.charCodeAt(e/8))<<e%32;return n}function h(t){var e,n,i="";for(n=0;n<t.length;n+=1)e=t.charCodeAt(n),i+="0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(15&e);return i}function f(t){return unescape(encodeURIComponent(t))}function d(t){return function(t){return c(l(u(t),8*t.length))}(f(t))}function p(t,e){return function(t,e){var n,i,r=u(t),o=[],a=[];for(o[15]=a[15]=void 0,r.length>16&&(r=l(r,8*t.length)),n=0;n<16;n+=1)o[n]=909522486^r[n],a[n]=1549556828^r[n];return i=l(o.concat(u(e)),512+8*e.length),c(l(a.concat(i),640))}(f(t),f(e))}t.exports=function(t,e,n){return e?n?p(e,t):h(p(e,t)):n?d(t):h(d(t))}},3:function(t,e){},"4af/":function(t,e,n){var i=n("vYjF"),r={collectWindowErrors:!0,debug:!1},o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a=[].slice,s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function l(){return"undefined"==typeof document||null==document.location?"":document.location.href}r.report=function(){var t,e,n=[],c=null,u=null,h=null;function f(t,e){var i=null;if(!e||r.collectWindowErrors){for(var o in n)if(n.hasOwnProperty(o))try{n[o].apply(null,[t].concat(a.call(arguments,2)))}catch(s){i=s}if(i)throw i}}function d(e,n,o,a,c){var u=i.isErrorEvent(c)?c.error:c,d=i.isErrorEvent(e)?e.message:e;if(h)r.computeStackTrace.augmentStackTraceWithInitialElement(h,n,o,d),p();else if(u&&i.isError(u))f(r.computeStackTrace(u),!0);else{var v,g={url:n,line:o,column:a},m=void 0;"[object String]"==={}.toString.call(d)&&(v=d.match(s))&&(m=v[1],d=v[2]),g.func="?",f({name:m,message:d,url:l(),stack:[g]},!0)}return!!t&&t.apply(this,arguments)}function p(){var t=h,e=c;c=null,h=null,u=null,f.apply(null,[t,!1].concat(e))}function v(t,e){var n=a.call(arguments,1);if(h){if(u===t)return;p()}var i=r.computeStackTrace(t);if(h=i,u=t,c=n,setTimeout((function(){u===t&&p()}),i.incomplete?2e3:0),!1!==e)throw t}return v.subscribe=function(i){e||(t=o.onerror,o.onerror=d,e=!0),n.push(i)},v.unsubscribe=function(t){for(var e=n.length-1;e>=0;--e)n[e]===t&&n.splice(e,1)},v.uninstall=function(){e&&(o.onerror=t,e=!1,t=void 0),n=[]},v}(),r.computeStackTrace=function(){function t(t){if(void 0!==t.stack&&t.stack){for(var e,n,i,r=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx(?:-web)|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,s=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,u=t.stack.split("\n"),h=[],f=(/^(.*) is undefined$/.exec(t.message),0),d=u.length;f<d;++f){if(n=r.exec(u[f])){var p=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(e=c.exec(n[2]))&&(n[2]=e[1],n[3]=e[2],n[4]=e[3]),i={url:p?null:n[2],func:n[1]||"?",args:p?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=o.exec(u[f]))i={url:n[2],func:n[1]||"?",args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=a.exec(u[f])))continue;n[3]&&n[3].indexOf(" > eval")>-1&&(e=s.exec(n[3]))?(n[3]=e[1],n[4]=e[2],n[5]=null):0!==f||n[5]||void 0===t.columnNumber||(h[0].column=t.columnNumber+1),i={url:n[3],func:n[1]||"?",args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}if(!i.func&&i.line&&(i.func="?"),i.url&&"blob:"===i.url.substr(0,5)){var v=new XMLHttpRequest;if(v.open("GET",i.url,!1),v.send(null),200===v.status){var g=v.responseText||"",m=(g=g.slice(-300)).match(/\/\/# sourceMappingURL=(.*)$/);if(m){var y=m[1];"~"===y.charAt(0)&&(y=("undefined"==typeof document||null==document.location?"":document.location.origin?document.location.origin:document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:""))+y.slice(1)),i.url=y.slice(0,-4)}}}h.push(i)}return h.length?{name:t.name,message:t.message,url:l(),stack:h}:null}}function e(t,e,n,i){var r={url:e,line:n};if(r.url&&r.line){if(t.incomplete=!1,r.func||(r.func="?"),t.stack.length>0&&t.stack[0].url===r.url){if(t.stack[0].line===r.line)return!1;if(!t.stack[0].line&&t.stack[0].func===r.func)return t.stack[0].line=r.line,!1}return t.stack.unshift(r),t.partial=!0,!0}return t.incomplete=!0,!1}function n(t,o){for(var a,s,c=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,u=[],h={},f=!1,d=n.caller;d&&!f;d=d.caller)if(d!==i&&d!==r.report){if(s={url:null,func:"?",line:null,column:null},d.name?s.func=d.name:(a=c.exec(d.toString()))&&(s.func=a[1]),void 0===s.func)try{s.func=a.input.substring(0,a.input.indexOf("{"))}catch(v){}h[""+d]?f=!0:h[""+d]=!0,u.push(s)}o&&u.splice(0,o);var p={name:t.name,message:t.message,url:l(),stack:u};return e(p,t.sourceURL||t.fileName,t.line||t.lineNumber),p}function i(e,i){var o=null;i=null==i?0:+i;try{if(o=t(e))return o}catch(a){if(r.debug)throw a}try{if(o=n(e,i+1))return o}catch(a){if(r.debug)throw a}return{name:e.name,message:e.message,url:l()}}return i.augmentStackTraceWithInitialElement=e,i.computeStackTraceFromStackProp=t,i}(),t.exports=r},"9AGB":function(t,e,n){"use strict";var i=n("yoF8");function r(t){return 0===t.length?i.identity:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}e.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(t)},e.pipeFromArray=r},AKyF:function(t,e,n){var i=n("vYjF");t.exports={wrapMethod:function(t,e,n){var r=t[e],o=t;if(e in t){var a="warn"===e?"warning":e;t[e]=function(){var t=[].slice.call(arguments),s=i.safeJoin(t," "),l={level:a,logger:"console",extra:{arguments:t}};"assert"===e?!1===t[0]&&(s="Assertion failed: "+(i.safeJoin(t.slice(1)," ")||"console.assert"),l.extra.arguments=t.slice(1),n&&n(s,l)):n&&n(s,l),r&&Function.prototype.apply.call(r,o,t)}}}}},BjAV:function(t,e){function n(t,e){for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}function i(t,e){var i=[],r=[];return null==e&&(e=function(t,e){return i[0]===e?"[Circular ~]":"[Circular ~."+r.slice(0,n(i,e)).join(".")+"]"}),function(o,a){if(i.length>0){var s=n(i,this);~s?i.splice(s+1):i.push(this),~s?r.splice(s,1/0,o):r.push(o),~n(i,a)&&(a=e.call(this,o,a))}else i.push(a);return null==t?a instanceof Error?function(t){var e={stack:t.stack,message:t.message,name:t.name};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}(a):a:t.call(this,o,a)}}(t.exports=function(t,e,n,r){return JSON.stringify(t,i(e,r),n)}).getSerialize=i},FWf1: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)}),o=n("pshJ"),a=n("GiSu"),s=n("zB/H"),l=n("p//D"),c=n("n3uD"),u=n("MkmW"),h=function(t){function e(n,i,r){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=a.empty;break;case 1:if(!n){o.destination=a.empty;break}if("object"==typeof n){n instanceof e?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new f(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new f(o,n,i,r)}return o}return r(e,t),e.prototype[l.rxSubscriber]=function(){return this},e.create=function(t,n,i){var r=new e(t,n,i);return r.syncErrorThrowable=!1,r},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(s.Subscription);e.Subscriber=h;var f=function(t){function e(e,n,i,r){var s,l=t.call(this)||this;l._parentSubscriber=e;var c=l;return o.isFunction(n)?s=n:n&&(s=n.next,i=n.error,r=n.complete,n!==a.empty&&(c=Object.create(n),o.isFunction(c.unsubscribe)&&l.add(c.unsubscribe.bind(c)),c.unsubscribe=l.unsubscribe.bind(l))),l._context=c,l._next=s,l._error=i,l._complete=r,l}return r(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;c.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=c.config.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):u.hostReportError(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;u.hostReportError(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};c.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),c.config.useDeprecatedSynchronousErrorHandling)throw n;u.hostReportError(n)}},e.prototype.__tryOrSetError=function(t,e,n){if(!c.config.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(i){return c.config.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(u.hostReportError(i),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(h);e.SafeSubscriber=f},GMZp:function(t,e,n){"use strict";e.isObject=function(t){return null!==t&&"object"==typeof t}},GiSu:function(t,e,n){"use strict";var i=n("n3uD"),r=n("MkmW");e.empty={closed:!0,next:function(t){},error:function(t){if(i.config.useDeprecatedSynchronousErrorHandling)throw t;r.hostReportError(t)},complete:function(){}}},Iab2:function(t,e,n){var i,r;void 0===(r="function"==typeof(i=function(){"use strict";function e(t,e,n){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){o(i.response,e,n)},i.onerror=function(){console.error("could not download file")},i.send()}function n(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function i(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,o=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(t,o,a){var s=r.URL||r.webkitURL,l=document.createElement("a");l.download=o=o||t.name||"download",l.rel="noopener","string"==typeof t?(l.href=t,l.origin===location.origin?i(l):n(l.href)?e(t,o,a):i(l,l.target="_blank")):(l.href=s.createObjectURL(t),setTimeout((function(){s.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,r,o){if(r=r||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}(t,o),r);else if(n(t))e(t,r,o);else{var a=document.createElement("a");a.href=t,a.target="_blank",setTimeout((function(){i(a)}))}}:function(t,n,i,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,i);var a="application/octet-stream"===t.type,s=/constructor/i.test(r.HTMLElement)||r.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&s)&&"object"==typeof FileReader){var c=new FileReader;c.onloadend=function(){var t=c.result;t=l?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=t:location=t,o=null},c.readAsDataURL(t)}else{var u=r.URL||r.webkitURL,h=u.createObjectURL(t);o?o.location=h:location.href=h,o=null,setTimeout((function(){u.revokeObjectURL(h)}),4e4)}});r.saveAs=o.saveAs=o,t.exports=o})?i.apply(e,[]):i)||(t.exports=r)},J9Y1:function(t,e,n){var i;!function(){function r(t,e,n){return t.call.apply(t.bind,arguments)}function o(t,e,n){if(!t)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,i),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function a(t,e,n){return(a=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?r:o).apply(null,arguments)}var s=Date.now||function(){return+new Date};function l(t,e){this.a=t,this.o=e||t,this.c=this.o.document}var c=!!window.FontFace;function u(t,e,n,i){if(e=t.c.createElement(e),n)for(var r in n)n.hasOwnProperty(r)&&("style"==r?e.style.cssText=n[r]:e.setAttribute(r,n[r]));return i&&e.appendChild(t.c.createTextNode(i)),e}function h(t,e,n){(t=t.c.getElementsByTagName(e)[0])||(t=document.documentElement),t.insertBefore(n,t.lastChild)}function f(t){t.parentNode&&t.parentNode.removeChild(t)}function d(t,e,n){e=e||[],n=n||[];for(var i=t.className.split(/\s+/),r=0;r<e.length;r+=1){for(var o=!1,a=0;a<i.length;a+=1)if(e[r]===i[a]){o=!0;break}o||i.push(e[r])}for(e=[],r=0;r<i.length;r+=1){for(o=!1,a=0;a<n.length;a+=1)if(i[r]===n[a]){o=!0;break}o||e.push(i[r])}t.className=e.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function p(t,e){for(var n=t.className.split(/\s+/),i=0,r=n.length;i<r;i++)if(n[i]==e)return!0;return!1}function v(t,e,n){function i(){s&&r&&o&&(s(a),s=null)}e=u(t,"link",{rel:"stylesheet",href:e,media:"all"});var r=!1,o=!0,a=null,s=n||null;c?(e.onload=function(){r=!0,i()},e.onerror=function(){r=!0,a=Error("Stylesheet failed to load"),i()}):setTimeout((function(){r=!0,i()}),0),h(t,"head",e)}function g(t,e,n,i){var r=t.c.getElementsByTagName("head")[0];if(r){var o=u(t,"script",{src:e}),a=!1;return o.onload=o.onreadystatechange=function(){a||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(a=!0,n&&n(null),o.onload=o.onreadystatechange=null,"HEAD"==o.parentNode.tagName&&r.removeChild(o))},r.appendChild(o),setTimeout((function(){a||(a=!0,n&&n(Error("Script load timeout")))}),i||5e3),o}return null}function m(){this.a=0,this.c=null}function y(t){return t.a++,function(){t.a--,b(t)}}function _(t,e){t.c=e,b(t)}function b(t){0==t.a&&t.c&&(t.c(),t.c=null)}function k(t){this.a=t||"-"}function C(t,e){this.c=t,this.f=4,this.a="n";var n=(e||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function w(t){var e=[];t=t.split(/,\s*/);for(var n=0;n<t.length;n++){var i=t[n].replace(/['"]/g,"");-1!=i.indexOf(" ")||/^\d/.test(i)?e.push("'"+i+"'"):e.push(i)}return e.join(",")}function x(t){return t.a+t.f}function S(t){var e="normal";return"o"===t.a?e="oblique":"i"===t.a&&(e="italic"),e}function E(t){var e=4,n="n",i=null;return t&&((i=t.match(/(normal|oblique|italic)/i))&&i[1]&&(n=i[1].substr(0,1).toLowerCase()),(i=t.match(/([1-9]00|normal|bold)/i))&&i[1]&&(/bold/i.test(i[1])?e=7:/[1-9]00/.test(i[1])&&(e=parseInt(i[1].substr(0,1),10)))),n+e}function T(t,e){this.c=t,this.f=t.o.document.documentElement,this.h=e,this.a=new k("-"),this.j=!1!==e.events,this.g=!1!==e.classes}function O(t){if(t.g){var e=p(t.f,t.a.c("wf","active")),n=[],i=[t.a.c("wf","loading")];e||n.push(t.a.c("wf","inactive")),d(t.f,n,i)}A(t,"inactive")}function A(t,e,n){t.j&&t.h[e]&&(n?t.h[e](n.c,x(n)):t.h[e]())}function I(){this.c={}}function P(t,e){this.c=t,this.f=e,this.a=u(this.c,"span",{"aria-hidden":"true"},this.f)}function D(t){h(t.c,"body",t.a)}function R(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+w(t.c)+";font-style:"+S(t)+";font-weight:"+t.f+"00;"}function F(t,e,n,i,r,o){this.g=t,this.j=e,this.a=i,this.c=n,this.f=r||3e3,this.h=o||void 0}function M(t,e,n,i,r,o,a){this.v=t,this.B=e,this.c=n,this.a=i,this.s=a||"BESbswy",this.f={},this.w=r||3e3,this.u=o||null,this.m=this.j=this.h=this.g=null,this.g=new P(this.c,this.s),this.h=new P(this.c,this.s),this.j=new P(this.c,this.s),this.m=new P(this.c,this.s),t=R(t=new C(this.a.c+",serif",x(this.a))),this.g.a.style.cssText=t,t=R(t=new C(this.a.c+",sans-serif",x(this.a))),this.h.a.style.cssText=t,t=R(t=new C("serif",x(this.a))),this.j.a.style.cssText=t,t=R(t=new C("sans-serif",x(this.a))),this.m.a.style.cssText=t,D(this.g),D(this.h),D(this.j),D(this.m)}k.prototype.c=function(t){for(var e=[],n=0;n<arguments.length;n++)e.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return e.join(this.a)},F.prototype.start=function(){var t=this.c.o.document,e=this,n=s(),i=new Promise((function(i,r){!function o(){s()-n>=e.f?r():t.fonts.load(function(t){return S(t)+" "+t.f+"00 300px "+w(t.c)}(e.a),e.h).then((function(t){1<=t.length?i():setTimeout(o,25)}),(function(){r()}))}()})),r=null,o=new Promise((function(t,n){r=setTimeout(n,e.f)}));Promise.race([o,i]).then((function(){r&&(clearTimeout(r),r=null),e.g(e.a)}),(function(){e.j(e.a)}))};var j={D:"serif",C:"sans-serif"},L=null;function N(){if(null===L){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return L}function B(t,e,n){for(var i in j)if(j.hasOwnProperty(i)&&e===t.f[j[i]]&&n===t.f[j[i]])return!0;return!1}function z(t,e){setTimeout(a((function(){f(this.g.a),f(this.h.a),f(this.j.a),f(this.m.a),e(this.a)}),t),0)}function V(t,e,n){this.c=t,this.a=e,this.f=0,this.m=this.j=!1,this.s=n}M.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=s(),function t(e){var n,i=e.g.a.offsetWidth,r=e.h.a.offsetWidth;(n=i===e.f.serif&&r===e.f["sans-serif"])||(n=N()&&B(e,i,r)),n?s()-e.A>=e.w?N()&&B(e,i,r)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?z(e,e.v):z(e,e.B):function(e){setTimeout(a((function(){t(this)}),e),50)}(e):z(e,e.v)}(this)};var H=null;function W(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&d(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),A(t,"active")):O(t.a))}function U(t){this.j=t,this.a=new I,this.h=0,this.f=this.g=!0}function Y(t,e,n,i,r){var o=0==--t.h;(t.f||t.g)&&setTimeout((function(){var t=r||null,s=i||{};if(0===n.length&&o)O(e.a);else{e.f+=n.length,o&&(e.j=o);var l,c=[];for(l=0;l<n.length;l++){var u=n[l],h=s[u.c],f=e.a,p=u;if(f.g&&d(f.f,[f.a.c("wf",p.c,x(p).toString(),"loading")]),A(f,"fontloading",p),f=null,null===H)if(window.FontFace){p=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var v=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);H=p?42<parseInt(p[1],10):!v}else H=!1;f=H?new F(a(e.g,e),a(e.h,e),e.c,u,e.s,h):new M(a(e.g,e),a(e.h,e),e.c,u,e.s,t,h),c.push(f)}for(l=0;l<c.length;l++)c[l].start()}}),0)}function X(t,e){this.c=t,this.a=e}function G(t,e){this.c=t,this.a=e}function q(t,e){this.c=t||K,this.a=[],this.f=[],this.g=e||""}V.prototype.g=function(t){var e=this.a;e.g&&d(e.f,[e.a.c("wf",t.c,x(t).toString(),"active")],[e.a.c("wf",t.c,x(t).toString(),"loading"),e.a.c("wf",t.c,x(t).toString(),"inactive")]),A(e,"fontactive",t),this.m=!0,W(this)},V.prototype.h=function(t){var e=this.a;if(e.g){var n=p(e.f,e.a.c("wf",t.c,x(t).toString(),"active")),i=[],r=[e.a.c("wf",t.c,x(t).toString(),"loading")];n||i.push(e.a.c("wf",t.c,x(t).toString(),"inactive")),d(e.f,i,r)}A(e,"fontinactive",t),W(this)},U.prototype.load=function(t){this.c=new l(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,function(t,e,n){var i=[],r=n.timeout;!function(t){t.g&&d(t.f,[t.a.c("wf","loading")]),A(t,"loading")}(e),i=function(t,e,n){var i,r=[];for(i in e)if(e.hasOwnProperty(i)){var o=t.c[i];o&&r.push(o(e[i],n))}return r}(t.a,n,t.c);var o=new V(t.c,e,r);for(t.h=i.length,e=0,n=i.length;e<n;e++)i[e].load((function(e,n,i){Y(t,o,e,n,i)}))}(this,new T(this.c,t),t)},X.prototype.load=function(t){var e=this,n=e.a.projectId,i=e.a.version;if(n){var r=e.c.o;g(this.c,(e.a.api||"https://fast.fonts.net/jsapi")+"/"+n+".js"+(i?"?v="+i:""),(function(i){i?t([]):(r["__MonotypeConfiguration__"+n]=function(){return e.a},function e(){if(r["__mti_fntLst"+n]){var i=r["__mti_fntLst"+n](),o=[];if(i)for(var a=0;a<i.length;a++){var s=i[a].fontfamily;o.push(null!=i[a].fontStyle&&null!=i[a].fontWeight?new C(s,i[a].fontStyle+i[a].fontWeight):new C(s))}t(o)}else setTimeout((function(){e()}),50)}())})).id="__MonotypeAPIScript__"+n}else t([])},G.prototype.load=function(t){var e,n,i=this.a.urls||[],r=this.a.families||[],o=this.a.testStrings||{},a=new m;for(e=0,n=i.length;e<n;e++)v(this.c,i[e],y(a));var s=[];for(e=0,n=r.length;e<n;e++)if((i=r[e].split(":"))[1])for(var l=i[1].split(","),c=0;c<l.length;c+=1)s.push(new C(i[0],l[c]));else s.push(new C(i[0]));_(a,(function(){t(s,o)}))};var K="https://fonts.googleapis.com/css";function Z(t){this.f=t,this.a=[],this.c={}}var Q={latin:"BESbswy","latin-ext":"\xe7\xf6\xfc\u011f\u015f",cyrillic:"\u0439\u044f\u0416",greek:"\u03b1\u03b2\u03a3",khmer:"\u1780\u1781\u1782",Hanuman:"\u1780\u1781\u1782"},J={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},$={i:"i",italic:"i",n:"n",normal:"n"},tt=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function et(t,e){this.c=t,this.a=e}var nt={Arimo:!0,Cousine:!0,Tinos:!0};function it(t,e){this.c=t,this.a=e}function rt(t,e){this.c=t,this.f=e,this.a=[]}et.prototype.load=function(t){var e=new m,n=this.c,i=new q(this.a.api,this.a.text),r=this.a.families;!function(t,e){for(var n=e.length,i=0;i<n;i++){var r=e[i].split(":");3==r.length&&t.f.push(r.pop());var o="";2==r.length&&""!=r[1]&&(o=":"),t.a.push(r.join(o))}}(i,r);var o=new Z(r);!function(t){for(var e=t.f.length,n=0;n<e;n++){var i=t.f[n].split(":"),r=i[0].replace(/\+/g," "),o=["n4"];if(2<=i.length){var a;if(a=[],s=i[1])for(var s,l=(s=s.split(",")).length,c=0;c<l;c++){var u;if((u=s[c]).match(/^[\w-]+$/))if(null==(h=tt.exec(u.toLowerCase())))u="";else{if(u=null==(u=h[2])||""==u?"n":$[u],null==(h=h[1])||""==h)h="4";else var h=J[h]||(isNaN(h)?"4":h.substr(0,1));u=[u,h].join("")}else u="";u&&a.push(u)}0<a.length&&(o=a),3==i.length&&(a=[],0<(i=(i=i[2])?i.split(","):a).length&&(i=Q[i[0]])&&(t.c[r]=i))}for(t.c[r]||(i=Q[r])&&(t.c[r]=i),i=0;i<o.length;i+=1)t.a.push(new C(r,o[i]))}}(o),v(n,function(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var e=t.a.length,n=[],i=0;i<e;i++)n.push(t.a[i].replace(/ /g,"+"));return e=t.c+"?family="+n.join("%7C"),0<t.f.length&&(e+="&subset="+t.f.join(",")),0<t.g.length&&(e+="&text="+encodeURIComponent(t.g)),e}(i),y(e)),_(e,(function(){t(o.a,o.c,nt)}))},it.prototype.load=function(t){var e=this.a.id,n=this.c.o;e?g(this.c,(this.a.api||"https://use.typekit.net")+"/"+e+".js",(function(e){if(e)t([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){e=n.Typekit.config.fn;for(var i=[],r=0;r<e.length;r+=2)for(var o=e[r],a=e[r+1],s=0;s<a.length;s++)i.push(new C(o,a[s]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(l){}t(i)}}),2e3):t([])},rt.prototype.load=function(t){var e=this.f.id,n=this.c.o,i=this;e?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[e]=function(e,n){for(var r=0,o=n.fonts.length;r<o;++r){var a=n.fonts[r];i.a.push(new C(a.name,E("font-weight:"+a.weight+";font-style:"+a.style)))}t(i.a)},g(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(t){return t.o.location.hostname||t.a.location.hostname}(this.c)+"/"+e+".js",(function(e){e&&t([])}))):t([])};var ot=new U(window);ot.a.c.custom=function(t,e){return new G(e,t)},ot.a.c.fontdeck=function(t,e){return new rt(e,t)},ot.a.c.monotype=function(t,e){return new X(e,t)},ot.a.c.typekit=function(t,e){return new it(e,t)},ot.a.c.google=function(t,e){return new et(e,t)};var at={load:a(ot.load,ot)};void 0===(i=(function(){return at}).call(e,n,e,t))||(t.exports=i)}()},LBXl:function(t,e,n){"use strict";e.UnsubscriptionError=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}()},MkmW:function(t,e,n){"use strict";e.hostReportError=function(t){setTimeout((function(){throw t}),0)}},NlKi:function(t,e,n){var i=n("jT1Q"),r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o=r.Raven,a=new i;a.noConflict=function(){return r.Raven=o,a},a.afterLoad(),t.exports=a,t.exports.Client=i},NmYn:function(t,e,n){var i;t.exports=(i=function(){var t=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010c":"C","\u010d":"c","\u010e":"D","\u010f":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011a":"E","\u011b":"e","\u011e":"G","\u011f":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012a":"i","\u012b":"i","\u012e":"I","\u012f":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013b":"L","\u013c":"l","\u013d":"L","\u013e":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015a":"S","\u015b":"s","\u015e":"S","\u015f":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016a":"u","\u016b":"u","\u016e":"U","\u016f":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017a":"z","\u017b":"Z","\u017c":"z","\u017d":"Z","\u017e":"z","\u0192":"f","\u01a0":"O","\u01a1":"o","\u01af":"U","\u01b0":"u","\u01c8":"LJ","\u01c9":"lj","\u01cb":"NJ","\u01cc":"nj","\u0218":"S","\u0219":"s","\u021a":"T","\u021b":"t","\u02da":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038a":"I","\u038c":"O","\u038e":"Y","\u038f":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039a":"K","\u039b":"L","\u039c":"M","\u039d":"N","\u039e":"3","\u039f":"O","\u03a0":"P","\u03a1":"R","\u03a3":"S","\u03a4":"T","\u03a5":"Y","\u03a6":"F","\u03a7":"X","\u03a8":"PS","\u03a9":"W","\u03aa":"I","\u03ab":"Y","\u03ac":"a","\u03ad":"e","\u03ae":"h","\u03af":"i","\u03b0":"y","\u03b1":"a","\u03b2":"b","\u03b3":"g","\u03b4":"d","\u03b5":"e","\u03b6":"z","\u03b7":"h","\u03b8":"8","\u03b9":"i","\u03ba":"k","\u03bb":"l","\u03bc":"m","\u03bd":"n","\u03be":"3","\u03bf":"o","\u03c0":"p","\u03c1":"r","\u03c2":"s","\u03c3":"s","\u03c4":"t","\u03c5":"y","\u03c6":"f","\u03c7":"x","\u03c8":"ps","\u03c9":"w","\u03ca":"i","\u03cb":"y","\u03cc":"o","\u03cd":"y","\u03ce":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040a":"NJ","\u040b":"C","\u040f":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041a":"K","\u041b":"L","\u041c":"M","\u041d":"N","\u041e":"O","\u041f":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042a":"U","\u042b":"Y","\u042c":"","\u042d":"E","\u042e":"Yu","\u042f":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043a":"k","\u043b":"l","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044a":"u","\u044b":"y","\u044c":"","\u044d":"e","\u044e":"yu","\u044f":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045a":"nj","\u045b":"c","\u045d":"u","\u045f":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049a":"KH","\u049b":"kh","\u04a2":"NG","\u04a3":"ng","\u04ae":"UE","\u04af":"ue","\u04b0":"U","\u04b1":"u","\u04ba":"H","\u04bb":"h","\u04d8":"AE","\u04d9":"ae","\u04e8":"OE","\u04e9":"oe","\u0e3f":"baht","\u10d0":"a","\u10d1":"b","\u10d2":"g","\u10d3":"d","\u10d4":"e","\u10d5":"v","\u10d6":"z","\u10d7":"t","\u10d8":"i","\u10d9":"k","\u10da":"l","\u10db":"m","\u10dc":"n","\u10dd":"o","\u10de":"p","\u10df":"zh","\u10e0":"r","\u10e1":"s","\u10e2":"t","\u10e3":"u","\u10e4":"f","\u10e5":"k","\u10e6":"gh","\u10e7":"q","\u10e8":"sh","\u10e9":"ch","\u10ea":"ts","\u10eb":"dz","\u10ec":"ts","\u10ed":"ch","\u10ee":"kh","\u10ef":"j","\u10f0":"h","\u1e80":"W","\u1e81":"w","\u1e82":"W","\u1e83":"w","\u1e84":"W","\u1e85":"w","\u1e9e":"SS","\u1ea0":"A","\u1ea1":"a","\u1ea2":"A","\u1ea3":"a","\u1ea4":"A","\u1ea5":"a","\u1ea6":"A","\u1ea7":"a","\u1ea8":"A","\u1ea9":"a","\u1eaa":"A","\u1eab":"a","\u1eac":"A","\u1ead":"a","\u1eae":"A","\u1eaf":"a","\u1eb0":"A","\u1eb1":"a","\u1eb2":"A","\u1eb3":"a","\u1eb4":"A","\u1eb5":"a","\u1eb6":"A","\u1eb7":"a","\u1eb8":"E","\u1eb9":"e","\u1eba":"E","\u1ebb":"e","\u1ebc":"E","\u1ebd":"e","\u1ebe":"E","\u1ebf":"e","\u1ec0":"E","\u1ec1":"e","\u1ec2":"E","\u1ec3":"e","\u1ec4":"E","\u1ec5":"e","\u1ec6":"E","\u1ec7":"e","\u1ec8":"I","\u1ec9":"i","\u1eca":"I","\u1ecb":"i","\u1ecc":"O","\u1ecd":"o","\u1ece":"O","\u1ecf":"o","\u1ed0":"O","\u1ed1":"o","\u1ed2":"O","\u1ed3":"o","\u1ed4":"O","\u1ed5":"o","\u1ed6":"O","\u1ed7":"o","\u1ed8":"O","\u1ed9":"o","\u1eda":"O","\u1edb":"o","\u1edc":"O","\u1edd":"o","\u1ede":"O","\u1edf":"o","\u1ee0":"O","\u1ee1":"o","\u1ee2":"O","\u1ee3":"o","\u1ee4":"U","\u1ee5":"u","\u1ee6":"U","\u1ee7":"u","\u1ee8":"U","\u1ee9":"u","\u1eea":"U","\u1eeb":"u","\u1eec":"U","\u1eed":"u","\u1eee":"U","\u1eef":"u","\u1ef0":"U","\u1ef1":"u","\u1ef2":"Y","\u1ef3":"y","\u1ef4":"Y","\u1ef5":"y","\u1ef6":"Y","\u1ef7":"y","\u1ef8":"Y","\u1ef9":"y","\u2018":"\'","\u2019":"\'","\u201c":"\\"","\u201d":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20a0":"ecu","\u20a2":"cruzeiro","\u20a3":"french franc","\u20a4":"lira","\u20a5":"mill","\u20a6":"naira","\u20a7":"peseta","\u20a8":"rupee","\u20a9":"won","\u20aa":"new shequel","\u20ab":"dong","\u20ac":"euro","\u20ad":"kip","\u20ae":"tugrik","\u20af":"drachma","\u20b0":"penny","\u20b1":"peso","\u20b2":"guarani","\u20b3":"austral","\u20b4":"hryvnia","\u20b5":"cedi","\u20b8":"kazakhstani tenge","\u20b9":"indian rupee","\u20bd":"russian ruble","\u20bf":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221e":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\ufdfc":"rial"}'),e=JSON.parse('{"vi":{"\u0110":"D","\u0111":"d"}}');function n(n,i){if("string"!=typeof n)throw new Error("slugify: string argument expected");var r=e[(i="string"==typeof i?{replacement:i}:i||{}).locale]||{},o=i.replacement||"-",a=n.split("").reduce((function(e,n){return e+(r[n]||t[n]||n)}),"").replace(i.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"").trim().replace(new RegExp("[\\s"+o+"]+","g"),o);return i.lower&&(a=a.toLowerCase()),i.strict&&(a=a.replace(new RegExp("[^a-zA-Z0-9"+o+"]","g"),"")),a}return n.extend=function(e){for(var n in e)t[n]=e[n]},n})(),t.exports.default=i()},PE4B:function(t,e,n){"use strict";var i=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===r}(t)}(t)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(t,e){return!1!==e.clone&&e.isMergeableObject(t)?c(Array.isArray(t)?[]:{},t,e):t}function a(t,e,n){return t.concat(e).map((function(t){return o(t,n)}))}function s(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function l(t,e){try{return e in t}catch(n){return!1}}function c(t,e,n){(n=n||{}).arrayMerge=n.arrayMerge||a,n.isMergeableObject=n.isMergeableObject||i,n.cloneUnlessOtherwiseSpecified=o;var r=Array.isArray(e);return r===Array.isArray(t)?r?n.arrayMerge(t,e,n):function(t,e,n){var i={};return n.isMergeableObject(t)&&s(t).forEach((function(e){i[e]=o(t[e],n)})),s(e).forEach((function(r){(function(t,e){return l(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,r)||(i[r]=l(t,r)&&n.isMergeableObject(e[r])?function(t,e){if(!e.customMerge)return c;var n=e.customMerge(t);return"function"==typeof n?n:c}(r,n)(t[r],e[r],n):o(e[r],n))})),i}(t,e,n):o(e,n)}c.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return c(t,n,e)}),{})},t.exports=c},Q1FS:function(t,e,n){"use strict";var i=n("yx2s"),r=n("Xwq/"),o=n("zfKp"),a=n("9AGB"),s=n("n3uD");function l(t){if(t||(t=s.config.Promise||Promise),!t)throw new Error("no Promise impl found");return t}e.Observable=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var i=this.operator,o=r.toSubscriber(t,e,n);if(o.add(i?i.call(o,this.source):this.source||s.config.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),s.config.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){s.config.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),i.canReportError(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=l(e))((function(e,i){var r;r=n.subscribe((function(e){try{t(e)}catch(n){i(n),r&&r.unsubscribe()}}),i,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[o.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:a.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=l(t))((function(t,n){var i;e.subscribe((function(t){return i=t}),(function(t){return n(t)}),(function(){return t(i)}))}))},t.create=function(e){return new t(e)},t}()},RdDz:function(t,e,n){var i,r;void 0===(r="function"==typeof(i=function(){"use strict";return function(t,e,n){e=e||"",n=n||512;for(var i=atob(t),r=[],o=0;o<i.length;o+=n){for(var a=i.slice(o,o+n),s=new Array(a.length),l=0;l<a.length;l++)s[l]=a.charCodeAt(l);var c=new Uint8Array(s);r.push(c)}return new Blob(r,{type:e})}})?i.apply(e,[]):i)||(t.exports=r)},"Xwq/":function(t,e,n){"use strict";var i=n("FWf1"),r=n("p//D"),o=n("GiSu");e.toSubscriber=function(t,e,n){if(t){if(t instanceof i.Subscriber)return t;if(t[r.rxSubscriber])return t[r.rxSubscriber]()}return t||e||n?new i.Subscriber(t,e,n):new i.Subscriber(o.empty)}},crnd: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="crnd"},epSk:function(t,e,n){var i,r,o,a,s,l,c,u,h,f,d,p,v,g=g||{version:"3.6.3"};if(e.fabric=g,"undefined"!=typeof document&&"undefined"!=typeof window)g.document=document instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document)?document:document.implementation.createHTMLDocument(""),g.window=window;else{var m=new(n(1).JSDOM)(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window;g.document=m.document,g.jsdomImplForWrapper=n(2).implForWrapper,g.nodeCanvas=n(3).Canvas,g.window=m,DOMParser=g.window.DOMParser}function y(t,e){var n=t.canvas,i=e.targetCanvas,r=i.getContext("2d");r.translate(0,i.height),r.scale(1,-1),r.drawImage(n,0,n.height-i.height,i.width,i.height,0,0,i.width,i.height)}function _(t,e){var n=e.targetCanvas.getContext("2d"),i=e.destinationWidth,r=e.destinationHeight,o=i*r*4,a=new Uint8Array(this.imageBuffer,0,o),s=new Uint8ClampedArray(this.imageBuffer,0,o);t.readPixels(0,0,i,r,t.RGBA,t.UNSIGNED_BYTE,a);var l=new ImageData(s,i,r);n.putImageData(l,0,0)}g.isTouchSupported="ontouchstart"in g.window||"ontouchstart"in g.document||g.window&&g.window.navigator&&g.window.navigator.maxTouchPoints>0,g.isLikelyNode="undefined"!=typeof Buffer&&"undefined"==typeof window,g.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","vector-effect","instantiated_by_use","clip-path"],g.DPI=96,g.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",g.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,g.reNonWord=/[ \n\.,;!\?\-]/,g.fontPaths={},g.iMatrix=[1,0,0,1,0,0],g.svgNS="http://www.w3.org/2000/svg",g.perfLimitSizeTotal=2097152,g.maxCacheSideLimit=4096,g.minCacheSideLimit=256,g.charWidthsCache={},g.textureSize=2048,g.disableStyleCopyPaste=!1,g.enableGLFiltering=!0,g.devicePixelRatio=g.window.devicePixelRatio||g.window.webkitDevicePixelRatio||g.window.mozDevicePixelRatio||1,g.browserShadowBlurConstant=1,g.arcToSegmentsCache={},g.boundsOfCurveCache={},g.cachesBoundsOfCurve=!0,g.forceGLPutImageData=!1,g.initFilterBackend=function(){return g.enableGLFiltering&&g.isWebglSupported&&g.isWebglSupported(g.textureSize)?(console.log("max texture size: "+g.maxTextureSize),new g.WebglFilterBackend({tileSize:g.textureSize})):g.Canvas2dFilterBackend?new g.Canvas2dFilterBackend:void 0},"undefined"!=typeof document&&"undefined"!=typeof window&&(window.fabric=g),function(){function t(t,e){if(this.__eventListeners[t]){var n=this.__eventListeners[t];e?n[n.indexOf(e)]=!1:g.util.array.fill(n,!1)}}function e(t,e){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var n in t)this.on(n,t[n]);else this.__eventListeners[t]||(this.__eventListeners[t]=[]),this.__eventListeners[t].push(e);return this}function n(e,n){if(!this.__eventListeners)return this;if(0===arguments.length)for(e in this.__eventListeners)t.call(this,e);else if(1===arguments.length&&"object"==typeof arguments[0])for(var i in e)t.call(this,i,e[i]);else t.call(this,e,n);return this}function i(t,e){if(!this.__eventListeners)return this;var n=this.__eventListeners[t];if(!n)return this;for(var i=0,r=n.length;i<r;i++)n[i]&&n[i].call(this,e||{});return this.__eventListeners[t]=n.filter((function(t){return!1!==t})),this}g.Observable={observe:e,stopObserving:n,fire:i,on:e,off:n,trigger:i}}(),g.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var t=0,e=arguments.length;t<e;t++)this._onObjectAdded(arguments[t]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(t,e,n){var i=this._objects;return n?i[e]=t:i.splice(e,0,t),this._onObjectAdded&&this._onObjectAdded(t),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var t,e=this._objects,n=!1,i=0,r=arguments.length;i<r;i++)-1!==(t=e.indexOf(arguments[i]))&&(n=!0,e.splice(t,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[i]));return this.renderOnAddRemove&&n&&this.requestRenderAll(),this},forEachObject:function(t,e){for(var n=this.getObjects(),i=0,r=n.length;i<r;i++)t.call(e,n[i],i,n);return this},getObjects:function(t){return void 0===t?this._objects.concat():this._objects.filter((function(e){return e.type===t}))},item:function(t){return this._objects[t]},isEmpty:function(){return 0===this._objects.length},size:function(){return this._objects.length},contains:function(t){return this._objects.indexOf(t)>-1},complexity:function(){return this._objects.reduce((function(t,e){return t+(e.complexity?e.complexity():0)}),0)}},g.CommonMethods={_setOptions:function(t){for(var e in t)this.set(e,t[e])},_initGradient:function(t,e){!t||!t.colorStops||t instanceof g.Gradient||this.set(e,new g.Gradient(t))},_initPattern:function(t,e,n){!t||!t.source||t instanceof g.Pattern?n&&n():this.set(e,new g.Pattern(t,n))},_initClipping:function(t){if(t.clipTo&&"string"==typeof t.clipTo){var e=g.util.getFunctionBody(t.clipTo);void 0!==e&&(this.clipTo=new Function("ctx",e))}},_setObject:function(t){for(var e in t)this._set(e,t[e])},set:function(t,e){return"object"==typeof t?this._setObject(t):this._set(t,"function"==typeof e&&"clipTo"!==t?e(this.get(t)):e),this},_set:function(t,e){this[t]=e},toggle:function(t){var e=this.get(t);return"boolean"==typeof e&&this.set(t,!e),this},get:function(t){return this[t]}},function(t){var e=Math.sqrt,n=Math.atan2,i=Math.pow,r=Math.PI/180,o=Math.PI/2;g.util={cos:function(t){if(0===t)return 1;switch(t<0&&(t=-t),t/o){case 1:case 3:return 0;case 2:return-1}return Math.cos(t)},sin:function(t){if(0===t)return 0;var e=1;switch(t<0&&(e=-1),t/o){case 1:return e;case 2:return 0;case 3:return-e}return Math.sin(t)},removeFromArray:function(t,e){var n=t.indexOf(e);return-1!==n&&t.splice(n,1),t},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},degreesToRadians:function(t){return t*r},radiansToDegrees:function(t){return t/r},rotatePoint:function(t,e,n){t.subtractEquals(e);var i=g.util.rotateVector(t,n);return new g.Point(i.x,i.y).addEquals(e)},rotateVector:function(t,e){var n=g.util.sin(e),i=g.util.cos(e);return{x:t.x*i-t.y*n,y:t.x*n+t.y*i}},transformPoint:function(t,e,n){return n?new g.Point(e[0]*t.x+e[2]*t.y,e[1]*t.x+e[3]*t.y):new g.Point(e[0]*t.x+e[2]*t.y+e[4],e[1]*t.x+e[3]*t.y+e[5])},makeBoundingBoxFromPoints:function(t,e){if(e)for(var n=0;n<t.length;n++)t[n]=g.util.transformPoint(t[n],e);var i=[t[0].x,t[1].x,t[2].x,t[3].x],r=g.util.array.min(i),o=g.util.array.max(i)-r,a=[t[0].y,t[1].y,t[2].y,t[3].y],s=g.util.array.min(a);return{left:r,top:s,width:o,height:g.util.array.max(a)-s}},invertTransform:function(t){var e=1/(t[0]*t[3]-t[1]*t[2]),n=[e*t[3],-e*t[1],-e*t[2],e*t[0]],i=g.util.transformPoint({x:t[4],y:t[5]},n,!0);return n[4]=-i.x,n[5]=-i.y,n},toFixed:function(t,e){return parseFloat(Number(t).toFixed(e))},parseUnit:function(t,e){var n=/\D{0,2}$/.exec(t),i=parseFloat(t);switch(e||(e=g.Text.DEFAULT_SVG_FONT_SIZE),n[0]){case"mm":return i*g.DPI/25.4;case"cm":return i*g.DPI/2.54;case"in":return i*g.DPI;case"pt":return i*g.DPI/72;case"pc":return i*g.DPI/72*12;case"em":return i*e;default:return i}},falseFunction:function(){return!1},getKlass:function(t,e){return t=g.util.string.camelize(t.charAt(0).toUpperCase()+t.slice(1)),g.util.resolveNamespace(e)[t]},getSvgAttributes:function(t){var e=["instantiated_by_use","style","id","class"];switch(t){case"linearGradient":e=e.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":e=e.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":e=e.concat(["offset","stop-color","stop-opacity"])}return e},resolveNamespace:function(e){if(!e)return g;var n,i=e.split("."),r=i.length,o=t||g.window;for(n=0;n<r;++n)o=o[i[n]];return o},loadImage:function(t,e,n,i){if(t){var r=g.util.createImage(),o=function(){e&&e.call(n,r),r=r.onload=r.onerror=null};r.onload=o,r.onerror=function(){g.log("Error loading "+r.src),e&&e.call(n,null,!0),r=r.onload=r.onerror=null},0!==t.indexOf("data")&&i&&(r.crossOrigin=i),"data:image/svg"===t.substring(0,14)&&(r.onload=null,g.util.loadImageInDom(r,o)),r.src=t}else e&&e.call(n,t)},loadImageInDom:function(t,e){var n=g.document.createElement("div");n.style.width=n.style.height="1px",n.style.left=n.style.top="-100%",n.style.position="absolute",n.appendChild(t),g.document.querySelector("body").appendChild(n),t.onload=function(){e(),n.parentNode.removeChild(n),n=null}},enlivenObjects:function(t,e,n,i){var r=[],o=0,a=(t=t||[]).length;function s(){++o===a&&e&&e(r.filter((function(t){return t})))}a?t.forEach((function(t,e){t&&t.type?g.util.getKlass(t.type,n).fromObject(t,(function(n,o){o||(r[e]=n),i&&i(t,n,o),s()})):s()})):e&&e(r)},enlivenPatterns:function(t,e){function n(){++r===o&&e&&e(i)}var i=[],r=0,o=(t=t||[]).length;o?t.forEach((function(t,e){t&&t.source?new g.Pattern(t,(function(t){i[e]=t,n()})):(i[e]=t,n())})):e&&e(i)},groupSVGElements:function(t,e,n){var i;return t&&1===t.length?t[0]:(e&&(e.width&&e.height?e.centerPoint={x:e.width/2,y:e.height/2}:(delete e.width,delete e.height)),i=new g.Group(t,e),void 0!==n&&(i.sourcePath=n),i)},populateWithProperties:function(t,e,n){if(n&&"[object Array]"===Object.prototype.toString.call(n))for(var i=0,r=n.length;i<r;i++)n[i]in t&&(e[n[i]]=t[n[i]])},drawDashedLine:function(t,i,r,o,a,s){var l=o-i,c=a-r,u=e(l*l+c*c),h=n(c,l),f=s.length,d=0,p=!0;for(t.save(),t.translate(i,r),t.moveTo(0,0),t.rotate(h),i=0;u>i;)(i+=s[d++%f])>u&&(i=u),t[p?"lineTo":"moveTo"](i,0),p=!p;t.restore()},createCanvasElement:function(){return g.document.createElement("canvas")},copyCanvasElement:function(t){var e=g.util.createCanvasElement();return e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0),e},toDataURL:function(t,e,n){return t.toDataURL("image/"+e,n)},createImage:function(){return g.document.createElement("img")},clipContext:function(t,e){e.save(),e.beginPath(),t.clipTo(e),e.clip()},multiplyTransformMatrices:function(t,e,n){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],n?0:t[0]*e[4]+t[2]*e[5]+t[4],n?0:t[1]*e[4]+t[3]*e[5]+t[5]]},qrDecompose:function(t){var o=n(t[1],t[0]),a=i(t[0],2)+i(t[1],2),s=e(a),l=(t[0]*t[3]-t[2]*t[1])/s,c=n(t[0]*t[2]+t[1]*t[3],a);return{angle:o/r,scaleX:s,scaleY:l,skewX:c/r,skewY:0,translateX:t[4],translateY:t[5]}},calcRotateMatrix:function(t){if(!t.angle)return g.iMatrix.concat();var e=g.util.degreesToRadians(t.angle),n=g.util.cos(e),i=g.util.sin(e);return[n,i,-i,n,0,0]},calcDimensionsMatrix:function(t){var e=void 0===t.scaleX?1:t.scaleX,n=void 0===t.scaleY?1:t.scaleY,i=[t.flipX?-e:e,0,0,t.flipY?-n:n,0,0],r=g.util.multiplyTransformMatrices,o=g.util.degreesToRadians;return t.skewX&&(i=r(i,[1,0,Math.tan(o(t.skewX)),1],!0)),t.skewY&&(i=r(i,[1,Math.tan(o(t.skewY)),0,1],!0)),i},composeMatrix:function(t){var e=[1,0,0,1,t.translateX||0,t.translateY||0],n=g.util.multiplyTransformMatrices;return t.angle&&(e=n(e,g.util.calcRotateMatrix(t))),(t.scaleX||t.scaleY||t.skewX||t.skewY||t.flipX||t.flipY)&&(e=n(e,g.util.calcDimensionsMatrix(t))),e},customTransformMatrix:function(t,e,n){return g.util.composeMatrix({scaleX:t,scaleY:e,skewX:n})},resetObjectTransform:function(t){t.scaleX=1,t.scaleY=1,t.skewX=0,t.skewY=0,t.flipX=!1,t.flipY=!1,t.rotate(0)},saveObjectTransform:function(t){return{scaleX:t.scaleX,scaleY:t.scaleY,skewX:t.skewX,skewY:t.skewY,angle:t.angle,left:t.left,flipX:t.flipX,flipY:t.flipY,top:t.top}},getFunctionBody:function(t){return(String(t).match(/function[^{]*\{([\s\S]*)\}/)||{})[1]},isTransparent:function(t,e,n,i){i>0&&(e>i?e-=i:e=0,n>i?n-=i:n=0);var r,o=!0,a=t.getImageData(e,n,2*i||1,2*i||1),s=a.data.length;for(r=3;r<s&&0!=(o=a.data[r]<=0);r+=4);return a=null,o},parsePreserveAspectRatioAttribute:function(t){var e,n="meet",i=t.split(" ");return i&&i.length&&("meet"!==(n=i.pop())&&"slice"!==n?(e=n,n="meet"):i.length&&(e=i.pop())),{meetOrSlice:n,alignX:"none"!==e?e.slice(1,4):"none",alignY:"none"!==e?e.slice(5,8):"none"}},clearFabricFontCache:function(t){(t=(t||"").toLowerCase())?g.charWidthsCache[t]&&delete g.charWidthsCache[t]:g.charWidthsCache={}},limitDimsByArea:function(t,e){var n=Math.sqrt(e*t),i=Math.floor(e/n);return{x:Math.floor(n),y:i}},capValue:function(t,e,n){return Math.max(t,Math.min(e,n))},findScaleToFit:function(t,e){return Math.min(e.width/t.width,e.height/t.height)},findScaleToCover:function(t,e){return Math.max(e.width/t.width,e.height/t.height)},matrixToSVG:function(t){return"matrix("+t.map((function(t){return g.util.toFixed(t,g.Object.NUM_FRACTION_DIGITS)})).join(" ")+")"}}}(e),function(){var t=Array.prototype.join;function e(e,r,o,a,s,l,c){var u=t.call(arguments);if(g.arcToSegmentsCache[u])return g.arcToSegmentsCache[u];var h=Math.PI,f=c*h/180,d=g.util.sin(f),p=g.util.cos(f),v=0,m=0,y=-p*e*.5-d*r*.5,_=-p*r*.5+d*e*.5,b=(o=Math.abs(o))*o,k=(a=Math.abs(a))*a,C=_*_,w=y*y,x=b*k-b*C-k*w,S=0;if(x<0){var E=Math.sqrt(1-x/(b*k));o*=E,a*=E}else S=(s===l?-1:1)*Math.sqrt(x/(b*C+k*w));var T=S*o*_/a,O=-S*a*y/o,A=p*T-d*O+.5*e,I=d*T+p*O+.5*r,P=i(1,0,(y-T)/o,(_-O)/a),D=i((y-T)/o,(_-O)/a,(-y-T)/o,(-_-O)/a);0===l&&D>0?D-=2*h:1===l&&D<0&&(D+=2*h);for(var R=Math.ceil(Math.abs(D/h*2)),F=[],M=D/R,j=8/3*Math.sin(M/4)*Math.sin(M/4)/Math.sin(M/2),L=P+M,N=0;N<R;N++)F[N]=n(P,L,p,d,o,a,A,I,j,v,m),v=F[N][4],m=F[N][5],P=L,L+=M;return g.arcToSegmentsCache[u]=F,F}function n(t,e,n,i,r,o,a,s,l,c,u){var h=g.util.cos(t),f=g.util.sin(t),d=g.util.cos(e),p=g.util.sin(e),v=n*r*d-i*o*p+a,m=i*r*d+n*o*p+s;return[c+l*(-n*r*f-i*o*h),u+l*(-i*r*f+n*o*h),v+l*(n*r*p+i*o*d),m+l*(i*r*p-n*o*d),v,m]}function i(t,e,n,i){var r=Math.atan2(e,t),o=Math.atan2(i,n);return o>=r?o-r:2*Math.PI-(r-o)}function r(e,n,i,r,o,a,s,l){var c;if(g.cachesBoundsOfCurve&&(c=t.call(arguments),g.boundsOfCurveCache[c]))return g.boundsOfCurveCache[c];var u,h,f,d,p,v,m,y,_=Math.sqrt,b=Math.min,k=Math.max,C=Math.abs,w=[],x=[[],[]];h=6*e-12*i+6*o,u=-3*e+9*i-9*o+3*s,f=3*i-3*e;for(var S=0;S<2;++S)if(S>0&&(h=6*n-12*r+6*a,u=-3*n+9*r-9*a+3*l,f=3*r-3*n),C(u)<1e-12){if(C(h)<1e-12)continue;0<(d=-f/h)&&d<1&&w.push(d)}else(m=h*h-4*f*u)<0||(0<(p=(-h+(y=_(m)))/(2*u))&&p<1&&w.push(p),0<(v=(-h-y)/(2*u))&&v<1&&w.push(v));for(var E,T=w.length,O=T;T--;)x[0][T]=(E=1-(d=w[T]))*E*E*e+3*E*E*d*i+3*E*d*d*o+d*d*d*s,x[1][T]=E*E*E*n+3*E*E*d*r+3*E*d*d*a+d*d*d*l;x[0][O]=e,x[1][O]=n,x[0][O+1]=s,x[1][O+1]=l;var A=[{x:b.apply(null,x[0]),y:b.apply(null,x[1])},{x:k.apply(null,x[0]),y:k.apply(null,x[1])}];return g.cachesBoundsOfCurve&&(g.boundsOfCurveCache[c]=A),A}g.util.drawArc=function(t,n,i,r){for(var o=[[],[],[],[]],a=e(r[5]-n,r[6]-i,r[0],r[1],r[3],r[4],r[2]),s=0,l=a.length;s<l;s++)o[s][0]=a[s][0]+n,o[s][1]=a[s][1]+i,o[s][2]=a[s][2]+n,o[s][3]=a[s][3]+i,o[s][4]=a[s][4]+n,o[s][5]=a[s][5]+i,t.bezierCurveTo.apply(t,o[s])},g.util.getBoundsOfArc=function(t,n,i,o,a,s,l,c,u){for(var h,f=0,d=0,p=[],v=e(c-t,u-n,i,o,s,l,a),g=0,m=v.length;g<m;g++)h=r(f,d,v[g][0],v[g][1],v[g][2],v[g][3],v[g][4],v[g][5]),p.push({x:h[0].x+t,y:h[0].y+n}),p.push({x:h[1].x+t,y:h[1].y+n}),f=v[g][4],d=v[g][5];return p},g.util.getBoundsOfCurve=r}(),function(){var t=Array.prototype.slice;function e(t,e,n){if(t&&0!==t.length){var i=t.length-1,r=e?t[i][e]:t[i];if(e)for(;i--;)n(t[i][e],r)&&(r=t[i][e]);else for(;i--;)n(t[i],r)&&(r=t[i]);return r}}g.util.array={fill:function(t,e){for(var n=t.length;n--;)t[n]=e;return t},invoke:function(e,n){for(var i=t.call(arguments,2),r=[],o=0,a=e.length;o<a;o++)r[o]=i.length?e[o][n].apply(e[o],i):e[o][n].call(e[o]);return r},min:function(t,n){return e(t,n,(function(t,e){return t<e}))},max:function(t,n){return e(t,n,(function(t,e){return t>=e}))}}}(),function(){function t(e,n,i){if(i)if(!g.isLikelyNode&&n instanceof Element)e=n;else if(n instanceof Array){e=[];for(var r=0,o=n.length;r<o;r++)e[r]=t({},n[r],i)}else if(n&&"object"==typeof n)for(var a in n)"canvas"===a?e[a]=t({},n[a]):n.hasOwnProperty(a)&&(e[a]=t({},n[a],i));else e=n;else for(var a in n)e[a]=n[a];return e}g.util.object={extend:t,clone:function(e,n){return t({},e,n)}},g.util.object.extend(g.util,g.Observable)}(),function(){function t(t,e){var n=t.charCodeAt(e);if(isNaN(n))return"";if(n<55296||n>57343)return t.charAt(e);if(55296<=n&&n<=56319){if(t.length<=e+1)throw"High surrogate without following low surrogate";var i=t.charCodeAt(e+1);if(56320>i||i>57343)throw"High surrogate without following low surrogate";return t.charAt(e)+t.charAt(e+1)}if(0===e)throw"Low surrogate without preceding high surrogate";var r=t.charCodeAt(e-1);if(55296>r||r>56319)throw"Low surrogate without preceding high surrogate";return!1}g.util.string={camelize:function(t){return t.replace(/-+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))},capitalize:function(t,e){return t.charAt(0).toUpperCase()+(e?t.slice(1):t.slice(1).toLowerCase())},escapeXml:function(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},graphemeSplit:function(e){var n,i=0,r=[];for(i=0;i<e.length;i++)!1!==(n=t(e,i))&&r.push(n);return r}}}(),function(){var t=Array.prototype.slice,e=function(){},n=function(){for(var t in{toString:1})if("toString"===t)return!1;return!0}(),i=function(t,e,i){for(var r in e)t.prototype[r]=r in t.prototype&&"function"==typeof t.prototype[r]&&(e[r]+"").indexOf("callSuper")>-1?function(t){return function(){var n=this.constructor.superclass;this.constructor.superclass=i;var r=e[t].apply(this,arguments);if(this.constructor.superclass=n,"initialize"!==t)return r}}(r):e[r],n&&(e.toString!==Object.prototype.toString&&(t.prototype.toString=e.toString),e.valueOf!==Object.prototype.valueOf&&(t.prototype.valueOf=e.valueOf))};function r(){}function o(e){for(var n=null,i=this;i.constructor.superclass;){var r=i.constructor.superclass.prototype[e];if(i[e]!==r){n=r;break}i=i.constructor.superclass.prototype}return n?arguments.length>1?n.apply(this,t.call(arguments,1)):n.call(this):console.log("tried to callSuper "+e+", method not found in prototype chain",this)}g.util.createClass=function(){var n=null,a=t.call(arguments,0);function s(){this.initialize.apply(this,arguments)}"function"==typeof a[0]&&(n=a.shift()),s.superclass=n,s.subclasses=[],n&&(r.prototype=n.prototype,s.prototype=new r,n.subclasses.push(s));for(var l=0,c=a.length;l<c;l++)i(s,a[l],n);return s.prototype.initialize||(s.prototype.initialize=e),s.prototype.constructor=s,s.prototype.callSuper=o,s}}(),i=!!g.document.createElement("div").attachEvent,g.util.addListener=function(t,e,n,r){t&&t.addEventListener(e,n,!i&&r)},g.util.removeListener=function(t,e,n,r){t&&t.removeEventListener(e,n,!i&&r)},g.util.getPointer=function(t){var e=g.util.getScrollLeftTop(t.target),n=function(t){var e=t.changedTouches;return e&&e[0]?e[0]:t}(t);return{x:n.clientX+e.left,y:n.clientY+e.top}},r=g.document.createElement("div"),o=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,a=function(t){return t},"string"==typeof r.style.opacity?a=function(t,e){return t.style.opacity=e,t}:"string"==typeof r.style.filter&&(a=function(t,e){var n=t.style;return t.currentStyle&&!t.currentStyle.hasLayout&&(n.zoom=1),o.test(n.filter)?n.filter=n.filter.replace(o,e=e>=.9999?"":"alpha(opacity="+100*e+")"):n.filter+=" alpha(opacity="+100*e+")",t}),g.util.setStyle=function(t,e){var n=t.style;if(!n)return t;if("string"==typeof e)return t.style.cssText+=";"+e,e.indexOf("opacity")>-1?a(t,e.match(/opacity:\s*(\d?\.?\d*)/)[1]):t;for(var i in e)"opacity"===i?a(t,e[i]):n["float"===i||"cssFloat"===i?void 0===n.styleFloat?"cssFloat":"styleFloat":i]=e[i];return t},function(){var t,e,n,i,r=Array.prototype.slice,o=function(t){return r.call(t,0)};try{t=o(g.document.childNodes)instanceof Array}catch(l){}function a(t,e){var n=g.document.createElement(t);for(var i in e)"class"===i?n.className=e[i]:"for"===i?n.htmlFor=e[i]:n.setAttribute(i,e[i]);return n}function s(t){for(var e=0,n=0,i=g.document.documentElement,r=g.document.body||{scrollLeft:0,scrollTop:0};t&&(t.parentNode||t.host)&&((t=t.parentNode||t.host)===g.document?(e=r.scrollLeft||i.scrollLeft||0,n=r.scrollTop||i.scrollTop||0):(e+=t.scrollLeft||0,n+=t.scrollTop||0),1!==t.nodeType||"fixed"!==t.style.position););return{left:e,top:n}}t||(o=function(t){for(var e=new Array(t.length),n=t.length;n--;)e[n]=t[n];return e}),e=g.document.defaultView&&g.document.defaultView.getComputedStyle?function(t,e){var n=g.document.defaultView.getComputedStyle(t,null);return n?n[e]:void 0}:function(t,e){var n=t.style[e];return!n&&t.currentStyle&&(n=t.currentStyle[e]),n},i="userSelect"in(n=g.document.documentElement.style)?"userSelect":"MozUserSelect"in n?"MozUserSelect":"WebkitUserSelect"in n?"WebkitUserSelect":"KhtmlUserSelect"in n?"KhtmlUserSelect":"",g.util.makeElementUnselectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=g.util.falseFunction),i?t.style[i]="none":"string"==typeof t.unselectable&&(t.unselectable="on"),t},g.util.makeElementSelectable=function(t){return void 0!==t.onselectstart&&(t.onselectstart=null),i?t.style[i]="":"string"==typeof t.unselectable&&(t.unselectable=""),t},g.util.getScript=function(t,e){var n=g.document.getElementsByTagName("head")[0],i=g.document.createElement("script"),r=!0;i.onload=i.onreadystatechange=function(t){if(r){if("string"==typeof this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)return;r=!1,e(t||g.window.event),i=i.onload=i.onreadystatechange=null}},i.src=t,n.appendChild(i)},g.util.getById=function(t){return"string"==typeof t?g.document.getElementById(t):t},g.util.toArray=o,g.util.makeElement=a,g.util.addClass=function(t,e){t&&-1===(" "+t.className+" ").indexOf(" "+e+" ")&&(t.className+=(t.className?" ":"")+e)},g.util.wrapElement=function(t,e,n){return"string"==typeof e&&(e=a(e,n)),t.parentNode&&t.parentNode.replaceChild(e,t),e.appendChild(t),e},g.util.getScrollLeftTop=s,g.util.getElementOffset=function(t){var n,i,r=t&&t.ownerDocument,o={left:0,top:0},a={left:0,top:0},l={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!r)return a;for(var c in l)a[l[c]]+=parseInt(e(t,c),10)||0;return n=r.documentElement,void 0!==t.getBoundingClientRect&&(o=t.getBoundingClientRect()),i=s(t),{left:o.left+i.left-(n.clientLeft||0)+a.left,top:o.top+i.top-(n.clientTop||0)+a.top}},g.util.getElementStyle=e,g.util.getNodeCanvas=function(t){var e=g.jsdomImplForWrapper(t);return e._canvas||e._image},g.util.cleanUpJsdomNode=function(t){if(g.isLikelyNode){var e=g.jsdomImplForWrapper(t);e&&(e._image=null,e._canvas=null,e._currentSrc=null,e._attributes=null,e._classList=null)}}}(),function(){function t(){}g.util.request=function(e,n){n||(n={});var i=n.method?n.method.toUpperCase():"GET",r=n.onComplete||function(){},o=new g.window.XMLHttpRequest,a=n.body||n.parameters;return o.onreadystatechange=function(){4===o.readyState&&(r(o),o.onreadystatechange=t)},"GET"===i&&(a=null,"string"==typeof n.parameters&&(e=function(t,e){return t+(/\?/.test(t)?"&":"?")+e}(e,n.parameters))),o.open(i,e,!0),"POST"!==i&&"PUT"!==i||o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(a),o}}(),g.log=console.log,g.warn=console.warn,function(){function t(){return!1}function e(t,e,n,i){return-n*Math.cos(t/i*(Math.PI/2))+n+e}var n=g.window.requestAnimationFrame||g.window.webkitRequestAnimationFrame||g.window.mozRequestAnimationFrame||g.window.oRequestAnimationFrame||g.window.msRequestAnimationFrame||function(t){return g.window.setTimeout(t,1e3/60)},i=g.window.cancelAnimationFrame||g.window.clearTimeout;function r(){return n.apply(g.window,arguments)}g.util.animate=function(n){r((function(i){n||(n={});var o,a=i||+new Date,s=n.duration||500,l=a+s,c=n.onChange||t,u=n.abort||t,h=n.onComplete||t,f=n.easing||e,d="startValue"in n?n.startValue:0,p="endValue"in n?n.endValue:100,v=n.byValue||p-d;n.onStart&&n.onStart(),function t(e){var n=(o=e||+new Date)>l?s:o-a,i=n/s,g=f(n,d,v,s),m=Math.abs((g-d)/v);if(!u())return o>l?(c(p,1,1),void h(p,1,1)):(c(g,m,i),void r(t));h(p,1,1)}(a)}))},g.util.requestAnimFrame=r,g.util.cancelAnimFrame=function(){return i.apply(g.window,arguments)}}(),g.util.animateColor=function(t,e,n,i){var r=new g.Color(t).getSource(),o=new g.Color(e).getSource();g.util.animate(g.util.object.extend(i=i||{},{duration:n||500,startValue:r,endValue:o,byValue:o,easing:function(t,e,n,r){var o,a,s,l;return o=e,a=n,s=i.colorEasing?i.colorEasing(t,r):1-Math.cos(t/r*(Math.PI/2)),l="rgba("+parseInt(o[0]+s*(a[0]-o[0]),10)+","+parseInt(o[1]+s*(a[1]-o[1]),10)+","+parseInt(o[2]+s*(a[2]-o[2]),10),(l+=","+(o&&a?parseFloat(o[3]+s*(a[3]-o[3])):1))+")"}}))},function(){function t(t,e,n,i){return t<Math.abs(e)?(t=e,i=n/4):i=0===e&&0===t?n/(2*Math.PI)*Math.asin(1):n/(2*Math.PI)*Math.asin(e/t),{a:t,c:e,p:n,s:i}}function e(t,e,n){return t.a*Math.pow(2,10*(e-=1))*Math.sin((e*n-t.s)*(2*Math.PI)/t.p)}function n(t,e,n,r){return n-i(r-t,0,n,r)+e}function i(t,e,n,i){return(t/=i)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e}g.util.ease={easeInQuad:function(t,e,n,i){return n*(t/=i)*t+e},easeOutQuad:function(t,e,n,i){return-n*(t/=i)*(t-2)+e},easeInOutQuad:function(t,e,n,i){return(t/=i/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},easeInCubic:function(t,e,n,i){return n*(t/=i)*t*t+e},easeOutCubic:function(t,e,n,i){return n*((t=t/i-1)*t*t+1)+e},easeInOutCubic:function(t,e,n,i){return(t/=i/2)<1?n/2*t*t*t+e:n/2*((t-=2)*t*t+2)+e},easeInQuart:function(t,e,n,i){return n*(t/=i)*t*t*t+e},easeOutQuart:function(t,e,n,i){return-n*((t=t/i-1)*t*t*t-1)+e},easeInOutQuart:function(t,e,n,i){return(t/=i/2)<1?n/2*t*t*t*t+e:-n/2*((t-=2)*t*t*t-2)+e},easeInQuint:function(t,e,n,i){return n*(t/=i)*t*t*t*t+e},easeOutQuint:function(t,e,n,i){return n*((t=t/i-1)*t*t*t*t+1)+e},easeInOutQuint:function(t,e,n,i){return(t/=i/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},easeInSine:function(t,e,n,i){return-n*Math.cos(t/i*(Math.PI/2))+n+e},easeOutSine:function(t,e,n,i){return n*Math.sin(t/i*(Math.PI/2))+e},easeInOutSine:function(t,e,n,i){return-n/2*(Math.cos(Math.PI*t/i)-1)+e},easeInExpo:function(t,e,n,i){return 0===t?e:n*Math.pow(2,10*(t/i-1))+e},easeOutExpo:function(t,e,n,i){return t===i?e+n:n*(1-Math.pow(2,-10*t/i))+e},easeInOutExpo:function(t,e,n,i){return 0===t?e:t===i?e+n:(t/=i/2)<1?n/2*Math.pow(2,10*(t-1))+e:n/2*(2-Math.pow(2,-10*--t))+e},easeInCirc:function(t,e,n,i){return-n*(Math.sqrt(1-(t/=i)*t)-1)+e},easeOutCirc:function(t,e,n,i){return n*Math.sqrt(1-(t=t/i-1)*t)+e},easeInOutCirc:function(t,e,n,i){return(t/=i/2)<1?-n/2*(Math.sqrt(1-t*t)-1)+e:n/2*(Math.sqrt(1-(t-=2)*t)+1)+e},easeInElastic:function(n,i,r,o){var a=0;return 0===n?i:1==(n/=o)?i+r:(a||(a=.3*o),-e(t(r,r,a,1.70158),n,o)+i)},easeOutElastic:function(e,n,i,r){var o=0;if(0===e)return n;if(1==(e/=r))return n+i;o||(o=.3*r);var a=t(i,i,o,1.70158);return a.a*Math.pow(2,-10*e)*Math.sin((e*r-a.s)*(2*Math.PI)/a.p)+a.c+n},easeInOutElastic:function(n,i,r,o){var a=0;if(0===n)return i;if(2==(n/=o/2))return i+r;a||(a=o*(.3*1.5));var s=t(r,r,a,1.70158);return n<1?-.5*e(s,n,o)+i:s.a*Math.pow(2,-10*(n-=1))*Math.sin((n*o-s.s)*(2*Math.PI)/s.p)*.5+s.c+i},easeInBack:function(t,e,n,i,r){return void 0===r&&(r=1.70158),n*(t/=i)*t*((r+1)*t-r)+e},easeOutBack:function(t,e,n,i,r){return void 0===r&&(r=1.70158),n*((t=t/i-1)*t*((r+1)*t+r)+1)+e},easeInOutBack:function(t,e,n,i,r){return void 0===r&&(r=1.70158),(t/=i/2)<1?n/2*(t*t*((1+(r*=1.525))*t-r))+e:n/2*((t-=2)*t*((1+(r*=1.525))*t+r)+2)+e},easeInBounce:n,easeOutBounce:i,easeInOutBounce:function(t,e,r,o){return t<o/2?.5*n(2*t,0,r,o)+e:.5*i(2*t-o,0,r,o)+.5*r+e}}}(),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.util.object.clone,r=e.util.toFixed,o=e.util.parseUnit,a=e.util.multiplyTransformMatrices,s={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform"},l={stroke:"strokeOpacity",fill:"fillOpacity"};function c(t){return t in s?s[t]:t}function u(t,n,i,r){var s,l="[object Array]"===Object.prototype.toString.call(n);if("fill"!==t&&"stroke"!==t||"none"!==n)if("vector-effect"===t)n="non-scaling-stroke"===n;else if("strokeDashArray"===t)n="none"===n?null:n.replace(/,/g," ").split(/\s+/).map(parseFloat);else if("transformMatrix"===t)n=i&&i.transformMatrix?a(i.transformMatrix,e.parseTransformAttribute(n)):e.parseTransformAttribute(n);else if("visible"===t)n="none"!==n&&"hidden"!==n,i&&!1===i.visible&&(n=!1);else if("opacity"===t)n=parseFloat(n),i&&void 0!==i.opacity&&(n*=i.opacity);else if("textAnchor"===t)n="start"===n?"left":"end"===n?"right":"center";else if("charSpacing"===t)s=o(n,r)/r*1e3;else if("paintFirst"===t){var c=n.indexOf("fill"),u=n.indexOf("stroke");n="fill",(c>-1&&u>-1&&u<c||-1===c&&u>-1)&&(n="stroke")}else{if("href"===t||"xlink:href"===t)return n;s=l?n.map(o):o(n,r)}else n="";return!l&&isNaN(s)?n:s}function h(t){return new RegExp("^("+t.join("|")+")\\b","i")}function f(t,e){var n,i,r,o=[];for(i=0,r=e.length;i<r;i++)n=t.getElementsByTagName(e[i]),o=o.concat(Array.prototype.slice.call(n));return o}function d(t,e){var n,i=!0;return(n=p(t,e.pop()))&&e.length&&(i=function(t,e){for(var n,i=!0;t.parentNode&&1===t.parentNode.nodeType&&e.length;)i&&(n=e.pop()),i=p(t=t.parentNode,n);return 0===e.length}(t,e)),n&&i&&0===e.length}function p(t,e){var n,i,r=t.nodeName,o=t.getAttribute("class"),a=t.getAttribute("id");if(n=new RegExp("^"+r,"i"),e=e.replace(n,""),a&&e.length&&(n=new RegExp("#"+a+"(?![a-zA-Z\\-]+)","i"),e=e.replace(n,"")),o&&e.length)for(i=(o=o.split(" ")).length;i--;)n=new RegExp("\\."+o[i]+"(?![a-zA-Z\\-]+)","i"),e=e.replace(n,"");return 0===e.length}function v(t,e){var n;if(t.getElementById&&(n=t.getElementById(e)),n)return n;var i,r,o,a=t.getElementsByTagName("*");for(r=0,o=a.length;r<o;r++)if(e===(i=a[r]).getAttribute("id"))return i}e.svgValidTagNamesRegEx=h(["path","circle","polygon","polyline","ellipse","rect","line","image","text"]),e.svgViewBoxElementsRegEx=h(["symbol","image","marker","pattern","view","svg"]),e.svgInvalidAncestorsRegEx=h(["pattern","defs","symbol","metadata","clipPath","mask","desc"]),e.svgValidParentsRegEx=h(["symbol","g","a","svg","clipPath","defs"]),e.cssRules={},e.gradientDefs={},e.clipPaths={},e.parseTransformAttribute=function(){function t(t,n,i){t[i]=Math.tan(e.util.degreesToRadians(n[0]))}var n=e.iMatrix,i=e.reNum,r="(?:\\s+,?\\s*|,\\s*)",o="(?:(?:(matrix)\\s*\\(\\s*("+i+")"+r+"("+i+")"+r+"("+i+")"+r+"("+i+")"+r+"("+i+")"+r+"("+i+")\\s*\\))|(?:(translate)\\s*\\(\\s*("+i+")(?:"+r+"("+i+"))?\\s*\\))|(?:(scale)\\s*\\(\\s*("+i+")(?:"+r+"("+i+"))?\\s*\\))|(?:(rotate)\\s*\\(\\s*("+i+")(?:"+r+"("+i+")"+r+"("+i+"))?\\s*\\))|(?:(skewX)\\s*\\(\\s*("+i+")\\s*\\))|(?:(skewY)\\s*\\(\\s*("+i+")\\s*\\)))",a=new RegExp("^\\s*(?:(?:"+o+"(?:"+r+"*"+o+")*)?)\\s*$"),s=new RegExp(o,"g");return function(i){var r=n.concat(),l=[];if(!i||i&&!a.test(i))return r;i.replace(s,(function(i){var a=new RegExp(o).exec(i).filter((function(t){return!!t})),s=a[1],c=a.slice(2).map(parseFloat);switch(s){case"translate":!function(t,e){t[4]=e[0],2===e.length&&(t[5]=e[1])}(r,c);break;case"rotate":c[0]=e.util.degreesToRadians(c[0]),function(t,n){var i=e.util.cos(n[0]),r=e.util.sin(n[0]),o=0,a=0;3===n.length&&(o=n[1],a=n[2]),t[0]=i,t[1]=r,t[2]=-r,t[3]=i,t[4]=o-(i*o-r*a),t[5]=a-(r*o+i*a)}(r,c);break;case"scale":!function(t,e){var n=2===e.length?e[1]:e[0];t[0]=e[0],t[3]=n}(r,c);break;case"skewX":t(r,c,2);break;case"skewY":t(r,c,1);break;case"matrix":r=c}l.push(r.concat()),r=n.concat()}));for(var c=l[0];l.length>1;)l.shift(),c=e.util.multiplyTransformMatrices(c,l[0]);return c}}();var g=new RegExp("^\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*,?\\s*("+e.reNum+"+)\\s*$");function m(t){var n,i,r,a,s,l,c=t.getAttribute("viewBox"),u=1,h=1,f=t.getAttribute("width"),d=t.getAttribute("height"),p=t.getAttribute("x")||0,v=t.getAttribute("y")||0,m=t.getAttribute("preserveAspectRatio")||"",y=!c||!e.svgViewBoxElementsRegEx.test(t.nodeName)||!(c=c.match(g)),_=!f||!d||"100%"===f||"100%"===d,b=y&&_,k={},C="",w=0,x=0;if(k.width=0,k.height=0,k.toBeParsed=b,b)return k;if(y)return k.width=o(f),k.height=o(d),k;if(n=-parseFloat(c[1]),i=-parseFloat(c[2]),r=parseFloat(c[3]),a=parseFloat(c[4]),k.minX=n,k.minY=i,k.viewBoxWidth=r,k.viewBoxHeight=a,_?(k.width=r,k.height=a):(k.width=o(f),k.height=o(d),u=k.width/r,h=k.height/a),"none"!==(m=e.util.parsePreserveAspectRatioAttribute(m)).alignX&&("meet"===m.meetOrSlice&&(h=u=u>h?h:u),"slice"===m.meetOrSlice&&(h=u=u>h?u:h),w=k.width-r*u,x=k.height-a*u,"Mid"===m.alignX&&(w/=2),"Mid"===m.alignY&&(x/=2),"Min"===m.alignX&&(w=0),"Min"===m.alignY&&(x=0)),1===u&&1===h&&0===n&&0===i&&0===p&&0===v)return k;if((p||v)&&(C=" translate("+o(p)+" "+o(v)+") "),k.viewboxTransform=e.parseTransformAttribute(s=C+" matrix("+u+" 0 0 "+h+" "+(n*u+w)+" "+(i*h+x)+") "),"svg"===t.nodeName){for(l=t.ownerDocument.createElementNS(e.svgNS,"g");t.firstChild;)l.appendChild(t.firstChild);t.appendChild(l)}else s=(l=t).getAttribute("transform")+s;return l.setAttribute("transform",s),k}function y(t,e){var n=v(t,e.getAttribute("xlink:href").substr(1));if(n&&n.getAttribute("xlink:href")&&y(t,n),["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"].forEach((function(t){n&&!e.hasAttribute(t)&&n.hasAttribute(t)&&e.setAttribute(t,n.getAttribute(t))})),!e.children.length)for(var i=n.cloneNode(!0);i.firstChild;)e.appendChild(i.firstChild);e.removeAttribute("xlink:href")}e.parseSVGDocument=function(t,n,r,o){if(t){!function(t){for(var n=f(t,["use","svg:use"]),i=0;n.length&&i<n.length;){var r,o,a,s,l=n[i],c=(l.getAttribute("xlink:href")||l.getAttribute("href")).substr(1),u=l.getAttribute("x")||0,h=l.getAttribute("y")||0,d=v(t,c).cloneNode(!0),p=(d.getAttribute("transform")||"")+" translate("+u+", "+h+")",g=n.length,y=e.svgNS;if(m(d),/^svg$/i.test(d.nodeName)){var _=d.ownerDocument.createElementNS(y,"g");for(o=0,s=(a=d.attributes).length;o<s;o++)r=a.item(o),_.setAttributeNS(y,r.nodeName,r.nodeValue);for(;d.firstChild;)_.appendChild(d.firstChild);d=_}for(o=0,s=(a=l.attributes).length;o<s;o++)"x"!==(r=a.item(o)).nodeName&&"y"!==r.nodeName&&"xlink:href"!==r.nodeName&&"href"!==r.nodeName&&("transform"===r.nodeName?p=r.nodeValue+" "+p:d.setAttribute(r.nodeName,r.nodeValue));d.setAttribute("transform",p),d.setAttribute("instantiated_by_use","1"),d.removeAttribute("id"),l.parentNode.replaceChild(d,l),n.length===g&&i++}}(t);var a,s,l=e.Object.__uid++,c=m(t),u=e.util.toArray(t.getElementsByTagName("*"));if(c.crossOrigin=o&&o.crossOrigin,c.svgUid=l,0===u.length&&e.isLikelyNode){var h=[];for(a=0,s=(u=t.selectNodes('//*[name(.)!="svg"]')).length;a<s;a++)h[a]=u[a];u=h}var d=u.filter((function(t){return m(t),e.svgValidTagNamesRegEx.test(t.nodeName.replace("svg:",""))&&!function(t,e){for(;t&&(t=t.parentNode);)if(t.nodeName&&e.test(t.nodeName.replace("svg:",""))&&!t.getAttribute("instantiated_by_use"))return!0;return!1}(t,e.svgInvalidAncestorsRegEx)}));if(!d||d&&!d.length)n&&n([],{});else{var p={};u.filter((function(t){return"clipPath"===t.nodeName.replace("svg:","")})).forEach((function(t){var n=t.getAttribute("id");p[n]=e.util.toArray(t.getElementsByTagName("*")).filter((function(t){return e.svgValidTagNamesRegEx.test(t.nodeName.replace("svg:",""))}))})),e.gradientDefs[l]=e.getGradientDefs(t),e.cssRules[l]=e.getCSSRules(t),e.clipPaths[l]=p,e.parseElements(d,(function(t,i){n&&(n(t,c,i,u),delete e.gradientDefs[l],delete e.cssRules[l],delete e.clipPaths[l])}),i(c),r,o)}}};var _=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+e.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+e.reNum+"))?\\s+(.*)");n(e,{parseFontDeclaration:function(t,e){var n=t.match(_);if(n){var i=n[1],r=n[3],a=n[4],s=n[5],l=n[6];i&&(e.fontStyle=i),r&&(e.fontWeight=isNaN(parseFloat(r))?r:parseFloat(r)),a&&(e.fontSize=o(a)),l&&(e.fontFamily=l),s&&(e.lineHeight="normal"===s?1:s)}},getGradientDefs:function(t){var e,n=f(t,["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"]),i=0,r={};for(i=n.length;i--;)(e=n[i]).getAttribute("xlink:href")&&y(t,e),r[e.getAttribute("id")]=e;return r},parseAttributes:function(t,i,a){if(t){var s,h,f,p={};void 0===a&&(a=t.getAttribute("svgUid")),t.parentNode&&e.svgValidParentsRegEx.test(t.parentNode.nodeName)&&(p=e.parseAttributes(t.parentNode,i,a));var v=i.reduce((function(e,n){return(s=t.getAttribute(n))&&(e[n]=s),e}),{}),g=n(function(t,n){var i={};for(var r in e.cssRules[n])if(d(t,r.split(" ")))for(var o in e.cssRules[n][r])i[o]=e.cssRules[n][r][o];return i}(t,a),e.parseStyleAttribute(t));v=n(v,g),g["clip-path"]&&t.setAttribute("clip-path",g["clip-path"]),h=f=p.fontSize||e.Text.DEFAULT_SVG_FONT_SIZE,v["font-size"]&&(v["font-size"]=h=o(v["font-size"],f));var m,y,_={};for(var b in v)y=u(m=c(b),v[b],p,h),_[m]=y;_&&_.font&&e.parseFontDeclaration(_.font,_);var k=n(p,_);return e.svgValidParentsRegEx.test(t.nodeName)?k:function(t){for(var n in l)if(void 0!==t[l[n]]&&""!==t[n]){if(void 0===t[n]){if(!e.Object.prototype[n])continue;t[n]=e.Object.prototype[n]}if(0!==t[n].indexOf("url(")){var i=new e.Color(t[n]);t[n]=i.setAlpha(r(i.getAlpha()*t[l[n]],2)).toRgba()}}return t}(k)}},parseElements:function(t,n,i,r,o){new e.ElementsParser(t,n,i,r,o).parse()},parseStyleAttribute:function(t){var e={},n=t.getAttribute("style");return n?("string"==typeof n?function(t,e){var n,i;t.replace(/;\s*$/,"").split(";").forEach((function(t){var r=t.split(":");n=r[0].trim().toLowerCase(),i=r[1].trim(),e[n]=i}))}(n,e):function(t,e){for(var n in t)void 0!==t[n]&&(e[n.toLowerCase()]=t[n])}(n,e),e):e},parsePointsAttribute:function(t){if(!t)return null;var e,n,i=[];for(e=0,n=(t=(t=t.replace(/,/g," ").trim()).split(/\s+/)).length;e<n;e+=2)i.push({x:parseFloat(t[e]),y:parseFloat(t[e+1])});return i},getCSSRules:function(t){var n,i,r=t.getElementsByTagName("style"),o={};for(n=0,i=r.length;n<i;n++){var a=r[n].textContent||"";""!==(a=a.replace(/\/\*[\s\S]*?\*\//g,"")).trim()&&a.match(/[^{]*\{[\s\S]*?\}/g).map((function(t){return t.trim()})).forEach((function(t){var r=t.match(/([\s\S]*?)\s*\{([^}]*)\}/),a={},s=r[2].trim().replace(/;$/,"").split(/\s*;\s*/);for(n=0,i=s.length;n<i;n++){var l=s[n].split(/\s*:\s*/);a[l[0]]=l[1]}(t=r[1]).split(",").forEach((function(t){""!==(t=t.replace(/^svg/i,"").trim())&&(o[t]?e.util.object.extend(o[t],a):o[t]=e.util.object.clone(a))}))}))}return o},loadSVGFromURL:function(t,n,i,r){t=t.replace(/^\n\s*/,"").trim(),new e.util.request(t,{method:"get",onComplete:function(t){var o=t.responseXML;if(o&&!o.documentElement&&e.window.ActiveXObject&&t.responseText&&((o=new ActiveXObject("Microsoft.XMLDOM")).async="false",o.loadXML(t.responseText.replace(/<!DOCTYPE[\s\S]*?(\[[\s\S]*\])*?>/i,""))),!o||!o.documentElement)return n&&n(null),!1;e.parseSVGDocument(o.documentElement,(function(t,e,i,r){n&&n(t,e,i,r)}),i,r)}})},loadSVGFromString:function(t,n,i,r){var o;if(t=t.trim(),void 0!==e.window.DOMParser){var a=new e.window.DOMParser;a&&a.parseFromString&&(o=a.parseFromString(t,"text/xml"))}else e.window.ActiveXObject&&((o=new ActiveXObject("Microsoft.XMLDOM")).async="false",o.loadXML(t.replace(/<!DOCTYPE[\s\S]*?(\[[\s\S]*\])*?>/i,"")));e.parseSVGDocument(o.documentElement,(function(t,e,i,r){n(t,e,i,r)}),i,r)}})}(e),g.ElementsParser=function(t,e,n,i,r,o){this.elements=t,this.callback=e,this.options=n,this.reviver=i,this.svgUid=n&&n.svgUid||0,this.parsingOptions=r,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g,this.doc=o},(s=g.ElementsParser.prototype).parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},s.createObjects=function(){var t=this;this.elements.forEach((function(e,n){e.setAttribute("svgUid",t.svgUid),t.createObject(e,n)}))},s.findTag=function(t){return g[g.util.string.capitalize(t.tagName.replace("svg:",""))]},s.createObject=function(t,e){var n=this.findTag(t);if(n&&n.fromElement)try{n.fromElement(t,this.createCallback(e,t),this.options)}catch(i){g.log(i)}else this.checkIfDone()},s.createCallback=function(t,e){var n=this;return function(i){var r;n.resolveGradient(i,e,"fill"),n.resolveGradient(i,e,"stroke"),i instanceof g.Image&&i._originalElement&&(r=i.parsePreserveAspectRatioAttribute(e)),i._removeTransformMatrix(r),n.resolveClipPath(i,e),n.reviver&&n.reviver(e,i),n.instances[t]=i,n.checkIfDone()}},s.extractPropertyDefinition=function(t,e,n){var i=t[e],r=this.regexUrl;if(r.test(i)){r.lastIndex=0;var o=r.exec(i)[1];return r.lastIndex=0,g[n][this.svgUid][o]}},s.resolveGradient=function(t,e,n){var i=this.extractPropertyDefinition(t,n,"gradientDefs");if(i){var r=e.getAttribute(n+"-opacity"),o=g.Gradient.fromElement(i,t,r,this.options);t.set(n,o)}},s.createClipPathCallback=function(t,e){return function(t){t._removeTransformMatrix(),t.fillRule=t.clipRule,e.push(t)}},s.resolveClipPath=function(t,e){var n,i,r,o,a=this.extractPropertyDefinition(t,"clipPath","clipPaths");if(a){r=[],i=g.util.invertTransform(t.calcTransformMatrix());for(var s=a[0].parentNode,l=e;l.parentNode&&l.getAttribute("clip-path")!==t.clipPath;)l=l.parentNode;l.parentNode.appendChild(s);for(var c=0;c<a.length;c++)this.findTag(n=a[c]).fromElement(n,this.createClipPathCallback(t,r),this.options);a=1===r.length?r[0]:new g.Group(r),o=g.util.multiplyTransformMatrices(i,a.calcTransformMatrix()),a.clipPath&&this.resolveClipPath(a,l);var u=g.util.qrDecompose(o);a.flipX=!1,a.flipY=!1,a.set("scaleX",u.scaleX),a.set("scaleY",u.scaleY),a.angle=u.angle,a.skewX=u.skewX,a.skewY=0,a.setPositionByOrigin({x:u.translateX,y:u.translateY},"center","center"),t.clipPath=a}else delete t.clipPath},s.checkIfDone=function(){0==--this.numElements&&(this.instances=this.instances.filter((function(t){return null!=t})),this.callback(this.instances,this.elements))},function(t){"use strict";var e=t.fabric||(t.fabric={});function n(t,e){this.x=t,this.y=e}e.Point?e.warn("fabric.Point is already defined"):(e.Point=n,n.prototype={type:"point",constructor:n,add:function(t){return new n(this.x+t.x,this.y+t.y)},addEquals:function(t){return this.x+=t.x,this.y+=t.y,this},scalarAdd:function(t){return new n(this.x+t,this.y+t)},scalarAddEquals:function(t){return this.x+=t,this.y+=t,this},subtract:function(t){return new n(this.x-t.x,this.y-t.y)},subtractEquals:function(t){return this.x-=t.x,this.y-=t.y,this},scalarSubtract:function(t){return new n(this.x-t,this.y-t)},scalarSubtractEquals:function(t){return this.x-=t,this.y-=t,this},multiply:function(t){return new n(this.x*t,this.y*t)},multiplyEquals:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return new n(this.x/t,this.y/t)},divideEquals:function(t){return this.x/=t,this.y/=t,this},eq:function(t){return this.x===t.x&&this.y===t.y},lt:function(t){return this.x<t.x&&this.y<t.y},lte:function(t){return this.x<=t.x&&this.y<=t.y},gt:function(t){return this.x>t.x&&this.y>t.y},gte:function(t){return this.x>=t.x&&this.y>=t.y},lerp:function(t,e){return void 0===e&&(e=.5),e=Math.max(Math.min(1,e),0),new n(this.x+(t.x-this.x)*e,this.y+(t.y-this.y)*e)},distanceFrom:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},midPointFrom:function(t){return this.lerp(t)},min:function(t){return new n(Math.min(this.x,t.x),Math.min(this.y,t.y))},max:function(t){return new n(Math.max(this.x,t.x),Math.max(this.y,t.y))},toString:function(){return this.x+","+this.y},setXY:function(t,e){return this.x=t,this.y=e,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setFromPoint:function(t){return this.x=t.x,this.y=t.y,this},swap:function(t){var e=this.x,n=this.y;this.x=t.x,this.y=t.y,t.x=e,t.y=n},clone:function(){return new n(this.x,this.y)}})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={});function n(t){this.status=t,this.points=[]}e.Intersection?e.warn("fabric.Intersection is already defined"):(e.Intersection=n,e.Intersection.prototype={constructor:n,appendPoint:function(t){return this.points.push(t),this},appendPoints:function(t){return this.points=this.points.concat(t),this}},e.Intersection.intersectLineLine=function(t,i,r,o){var a,s=(o.x-r.x)*(t.y-r.y)-(o.y-r.y)*(t.x-r.x),l=(i.x-t.x)*(t.y-r.y)-(i.y-t.y)*(t.x-r.x),c=(o.y-r.y)*(i.x-t.x)-(o.x-r.x)*(i.y-t.y);if(0!==c){var u=s/c,h=l/c;0<=u&&u<=1&&0<=h&&h<=1?(a=new n("Intersection")).appendPoint(new e.Point(t.x+u*(i.x-t.x),t.y+u*(i.y-t.y))):a=new n}else a=new n(0===s||0===l?"Coincident":"Parallel");return a},e.Intersection.intersectLinePolygon=function(t,e,i){var r,o,a=new n,s=i.length;for(o=0;o<s;o++)r=n.intersectLineLine(t,e,i[o],i[(o+1)%s]),a.appendPoints(r.points);return a.points.length>0&&(a.status="Intersection"),a},e.Intersection.intersectPolygonPolygon=function(t,e){var i,r=new n,o=t.length;for(i=0;i<o;i++){var a=n.intersectLinePolygon(t[i],t[(i+1)%o],e);r.appendPoints(a.points)}return r.points.length>0&&(r.status="Intersection"),r},e.Intersection.intersectPolygonRectangle=function(t,i,r){var o=i.min(r),a=i.max(r),s=new e.Point(a.x,o.y),l=new e.Point(o.x,a.y),c=n.intersectLinePolygon(o,s,t),u=n.intersectLinePolygon(s,a,t),h=n.intersectLinePolygon(a,l,t),f=n.intersectLinePolygon(l,o,t),d=new n;return d.appendPoints(c.points),d.appendPoints(u.points),d.appendPoints(h.points),d.appendPoints(f.points),d.points.length>0&&(d.status="Intersection"),d})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={});function n(t){t?this._tryParsingColor(t):this.setSource([0,0,0,1])}function i(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}e.Color?e.warn("fabric.Color is already defined."):(e.Color=n,e.Color.prototype={_tryParsingColor:function(t){var e;t in n.colorNameMap&&(t=n.colorNameMap[t]),"transparent"===t&&(e=[255,255,255,0]),e||(e=n.sourceFromHex(t)),e||(e=n.sourceFromRgb(t)),e||(e=n.sourceFromHsl(t)),e||(e=[0,0,0,1]),e&&this.setSource(e)},_rgbToHsl:function(t,n,i){var r,o,a,s=e.util.array.max([t/=255,n/=255,i/=255]),l=e.util.array.min([t,n,i]);if(a=(s+l)/2,s===l)r=o=0;else{var c=s-l;switch(o=a>.5?c/(2-s-l):c/(s+l),s){case t:r=(n-i)/c+(n<i?6:0);break;case n:r=(i-t)/c+2;break;case i:r=(t-n)/c+4}r/=6}return[Math.round(360*r),Math.round(100*o),Math.round(100*a)]},getSource:function(){return this._source},setSource:function(t){this._source=t},toRgb:function(){var t=this.getSource();return"rgb("+t[0]+","+t[1]+","+t[2]+")"},toRgba:function(){var t=this.getSource();return"rgba("+t[0]+","+t[1]+","+t[2]+","+t[3]+")"},toHsl:function(){var t=this.getSource(),e=this._rgbToHsl(t[0],t[1],t[2]);return"hsl("+e[0]+","+e[1]+"%,"+e[2]+"%)"},toHsla:function(){var t=this.getSource(),e=this._rgbToHsl(t[0],t[1],t[2]);return"hsla("+e[0]+","+e[1]+"%,"+e[2]+"%,"+t[3]+")"},toHex:function(){var t,e,n,i=this.getSource();return t=1===(t=i[0].toString(16)).length?"0"+t:t,e=1===(e=i[1].toString(16)).length?"0"+e:e,n=1===(n=i[2].toString(16)).length?"0"+n:n,t.toUpperCase()+e.toUpperCase()+n.toUpperCase()},toHexa:function(){var t,e=this.getSource();return t=1===(t=(t=Math.round(255*e[3])).toString(16)).length?"0"+t:t,this.toHex()+t.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(t){var e=this.getSource();return e[3]=t,this.setSource(e),this},toGrayscale:function(){var t=this.getSource(),e=parseInt((.3*t[0]+.59*t[1]+.11*t[2]).toFixed(0),10);return this.setSource([e,e,e,t[3]]),this},toBlackWhite:function(t){var e=this.getSource(),n=(.3*e[0]+.59*e[1]+.11*e[2]).toFixed(0),i=e[3];return t=t||127,n=Number(n)<Number(t)?0:255,this.setSource([n,n,n,i]),this},overlayWith:function(t){t instanceof n||(t=new n(t));var e,i=[],r=this.getAlpha(),o=this.getSource(),a=t.getSource();for(e=0;e<3;e++)i.push(Math.round(.5*o[e]+.5*a[e]));return i[3]=r,this.setSource(i),this}},e.Color.reRGBa=/^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*((?:\d*\.?\d+)?)\s*)?\)$/i,e.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i,e.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,e.Color.colorNameMap={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},e.Color.fromRgb=function(t){return n.fromSource(n.sourceFromRgb(t))},e.Color.sourceFromRgb=function(t){var e=t.match(n.reRGBa);if(e){var i=parseInt(e[1],10)/(/%$/.test(e[1])?100:1)*(/%$/.test(e[1])?255:1),r=parseInt(e[2],10)/(/%$/.test(e[2])?100:1)*(/%$/.test(e[2])?255:1),o=parseInt(e[3],10)/(/%$/.test(e[3])?100:1)*(/%$/.test(e[3])?255:1);return[parseInt(i,10),parseInt(r,10),parseInt(o,10),e[4]?parseFloat(e[4]):1]}},e.Color.fromRgba=n.fromRgb,e.Color.fromHsl=function(t){return n.fromSource(n.sourceFromHsl(t))},e.Color.sourceFromHsl=function(t){var e=t.match(n.reHSLa);if(e){var r,o,a,s=(parseFloat(e[1])%360+360)%360/360,l=parseFloat(e[2])/(/%$/.test(e[2])?100:1),c=parseFloat(e[3])/(/%$/.test(e[3])?100:1);if(0===l)r=o=a=c;else{var u=c<=.5?c*(l+1):c+l-c*l,h=2*c-u;r=i(h,u,s+1/3),o=i(h,u,s),a=i(h,u,s-1/3)}return[Math.round(255*r),Math.round(255*o),Math.round(255*a),e[4]?parseFloat(e[4]):1]}},e.Color.fromHsla=n.fromHsl,e.Color.fromHex=function(t){return n.fromSource(n.sourceFromHex(t))},e.Color.sourceFromHex=function(t){if(t.match(n.reHex)){var e=t.slice(t.indexOf("#")+1),i=3===e.length||4===e.length,r=8===e.length||4===e.length,o=i?e.charAt(0)+e.charAt(0):e.substring(0,2),a=i?e.charAt(1)+e.charAt(1):e.substring(2,4),s=i?e.charAt(2)+e.charAt(2):e.substring(4,6),l=r?i?e.charAt(3)+e.charAt(3):e.substring(6,8):"FF";return[parseInt(o,16),parseInt(a,16),parseInt(s,16),parseFloat((parseInt(l,16)/255).toFixed(2))]}},e.Color.fromSource=function(t){var e=new n;return e.setSource(t),e})}(e),function(){function t(t,e){var n,i,r,o,a=t.getAttribute("style"),s=t.getAttribute("offset")||0;if(s=(s=parseFloat(s)/(/%$/.test(s)?100:1))<0?0:s>1?1:s,a){var l=a.split(/\s*;\s*/);for(""===l[l.length-1]&&l.pop(),o=l.length;o--;){var c=l[o].split(/\s*:\s*/),u=c[0].trim(),h=c[1].trim();"stop-color"===u?n=h:"stop-opacity"===u&&(r=h)}}return n||(n=t.getAttribute("stop-color")||"rgb(0,0,0)"),r||(r=t.getAttribute("stop-opacity")),i=(n=new g.Color(n)).getAlpha(),r=isNaN(parseFloat(r))?1:parseFloat(r),r*=i*e,{offset:s,color:n.toRgb(),opacity:r}}var e=g.util.object.clone;function n(t,e,n,i){var r,o;Object.keys(e).forEach((function(t){"Infinity"===(r=e[t])?o=1:"-Infinity"===r?o=0:(o=parseFloat(e[t],10),"string"==typeof r&&/^(\d+\.\d+)%|(\d+)%$/.test(r)&&(o*=.01,"pixels"===i&&("x1"!==t&&"x2"!==t&&"r2"!==t||(o*=n.viewBoxWidth||n.width),"y1"!==t&&"y2"!==t||(o*=n.viewBoxHeight||n.height)))),e[t]=o}))}g.Gradient=g.util.createClass({offsetX:0,offsetY:0,gradientTransform:null,gradientUnits:"pixels",type:"linear",initialize:function(t){t||(t={}),t.coords||(t.coords={});var e,n=this;Object.keys(t).forEach((function(e){n[e]=t[e]})),this.id?this.id+="_"+g.Object.__uid++:this.id=g.Object.__uid++,e={x1:t.coords.x1||0,y1:t.coords.y1||0,x2:t.coords.x2||0,y2:t.coords.y2||0},"radial"===this.type&&(e.r1=t.coords.r1||0,e.r2=t.coords.r2||0),this.coords=e,this.colorStops=t.colorStops.slice()},addColorStop:function(t){for(var e in t){var n=new g.Color(t[e]);this.colorStops.push({offset:parseFloat(e),color:n.toRgb(),opacity:n.getAlpha()})}return this},toObject:function(t){var e={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return g.util.populateWithProperties(this,e,t),e},toSVG:function(t,n){var i,r,o,a,s=e(this.coords,!0),l=(n=n||{},e(this.colorStops,!0)),c=s.r1>s.r2,u=this.gradientTransform?this.gradientTransform.concat():g.iMatrix.concat(),h=-this.offsetX,f=-this.offsetY,d=!!n.additionalTransform,p="pixels"===this.gradientUnits?"userSpaceOnUse":"objectBoundingBox";if(l.sort((function(t,e){return t.offset-e.offset})),"objectBoundingBox"===p?(h/=t.width,f/=t.height):(h+=t.width/2,f+=t.height/2),"path"===t.type&&(h-=t.pathOffset.x,f-=t.pathOffset.y),u[4]-=h,u[5]-=f,a='id="SVGID_'+this.id+'" gradientUnits="'+p+'"',a+=' gradientTransform="'+(d?n.additionalTransform+" ":"")+g.util.matrixToSVG(u)+'" ',"linear"===this.type?o=["<linearGradient ",a,' x1="',s.x1,'" y1="',s.y1,'" x2="',s.x2,'" y2="',s.y2,'">\n']:"radial"===this.type&&(o=["<radialGradient ",a,' cx="',c?s.x1:s.x2,'" cy="',c?s.y1:s.y2,'" r="',c?s.r1:s.r2,'" fx="',c?s.x2:s.x1,'" fy="',c?s.y2:s.y1,'">\n']),"radial"===this.type){if(c)for((l=l.concat()).reverse(),i=0,r=l.length;i<r;i++)l[i].offset=1-l[i].offset;var v=Math.min(s.r1,s.r2);if(v>0){var m=v/Math.max(s.r1,s.r2);for(i=0,r=l.length;i<r;i++)l[i].offset+=m*(1-l[i].offset)}}for(i=0,r=l.length;i<r;i++){var y=l[i];o.push("<stop ",'offset="',100*y.offset+"%",'" style="stop-color:',y.color,void 0!==y.opacity?";stop-opacity: "+y.opacity:";",'"/>\n')}return o.push("linear"===this.type?"</linearGradient>\n":"</radialGradient>\n"),o.join("")},toLive:function(t,e){var n,i,r,o=g.util.object.clone(this.coords),a=o.x1,s=o.y1,l=o.x2,c=o.y2,u=this.colorStops;if(this.type){for(e instanceof g.Text&&"percentage"===this.gradientUnits&&(a*=e.width,s*=e.height,l*=e.width,c*=e.height),"linear"===this.type?n=t.createLinearGradient(a,s,l,c):"radial"===this.type&&(n=t.createRadialGradient(a,s,o.r1,l,c,o.r2)),i=0,r=u.length;i<r;i++){var h=u[i].color,f=u[i].opacity,d=u[i].offset;void 0!==f&&(h=new g.Color(h).setAlpha(f).toRgba()),n.addColorStop(d,h)}return n}}}),g.util.object.extend(g.Gradient,{fromElement:function(e,i,r,o){var a=parseFloat(r)/(/%$/.test(r)?100:1);a=a<0?0:a>1?1:a,isNaN(a)&&(a=1);var s,l,c,u,h=e.getElementsByTagName("stop"),f="userSpaceOnUse"===e.getAttribute("gradientUnits")?"pixels":"percentage",d=e.getAttribute("gradientTransform")||"",p=[],v=0,m=0;for("linearGradient"===e.nodeName||"LINEARGRADIENT"===e.nodeName?(s="linear",l=function(t){return{x1:t.getAttribute("x1")||0,y1:t.getAttribute("y1")||0,x2:t.getAttribute("x2")||"100%",y2:t.getAttribute("y2")||0}}(e)):(s="radial",l=function(t){return{x1:t.getAttribute("fx")||t.getAttribute("cx")||"50%",y1:t.getAttribute("fy")||t.getAttribute("cy")||"50%",r1:0,x2:t.getAttribute("cx")||"50%",y2:t.getAttribute("cy")||"50%",r2:t.getAttribute("r")||"50%"}}(e)),c=h.length;c--;)p.push(t(h[c],a));return u=g.parseTransformAttribute(d),n(0,l,o,f),"pixels"===f&&(v=-i.left,m=-i.top),new g.Gradient({id:e.getAttribute("id"),type:s,coords:l,colorStops:p,gradientUnits:f,gradientTransform:u,offsetX:v,offsetY:m})},forObject:function(t,e){return e||(e={}),n(0,e.coords,e.gradientUnits,{viewBoxWidth:100,viewBoxHeight:100}),new g.Gradient(e)}})}(),function(){"use strict";var t=g.util.toFixed;g.Pattern=g.util.createClass({repeat:"repeat",offsetX:0,offsetY:0,crossOrigin:"",patternTransform:null,initialize:function(t,e){if(t||(t={}),this.id=g.Object.__uid++,this.setOptions(t),!t.source||t.source&&"string"!=typeof t.source)e&&e(this);else if(void 0!==g.util.getFunctionBody(t.source))this.source=new Function(g.util.getFunctionBody(t.source)),e&&e(this);else{var n=this;this.source=g.util.createImage(),g.util.loadImage(t.source,(function(t){n.source=t,e&&e(n)}),null,this.crossOrigin)}},toObject:function(e){var n,i,r=g.Object.NUM_FRACTION_DIGITS;return"function"==typeof this.source?n=String(this.source):"string"==typeof this.source.src?n=this.source.src:"object"==typeof this.source&&this.source.toDataURL&&(n=this.source.toDataURL()),i={type:"pattern",source:n,repeat:this.repeat,crossOrigin:this.crossOrigin,offsetX:t(this.offsetX,r),offsetY:t(this.offsetY,r),patternTransform:this.patternTransform?this.patternTransform.concat():null},g.util.populateWithProperties(this,i,e),i},toSVG:function(t){var e="function"==typeof this.source?this.source():this.source,n=e.width/t.width,i=e.height/t.height,r=this.offsetX/t.width,o=this.offsetY/t.height,a="";return"repeat-x"!==this.repeat&&"no-repeat"!==this.repeat||(i=1,o&&(i+=Math.abs(o))),"repeat-y"!==this.repeat&&"no-repeat"!==this.repeat||(n=1,r&&(n+=Math.abs(r))),e.src?a=e.src:e.toDataURL&&(a=e.toDataURL()),'<pattern id="SVGID_'+this.id+'" x="'+r+'" y="'+o+'" width="'+n+'" height="'+i+'">\n<image x="0" y="0" width="'+e.width+'" height="'+e.height+'" xlink:href="'+a+'"></image>\n</pattern>\n'},setOptions:function(t){for(var e in t)this[e]=t[e]},toLive:function(t){var e="function"==typeof this.source?this.source():this.source;if(!e)return"";if(void 0!==e.src){if(!e.complete)return"";if(0===e.naturalWidth||0===e.naturalHeight)return""}return t.createPattern(e,this.repeat)}})}(),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.toFixed;e.Shadow?e.warn("fabric.Shadow is already defined."):(e.Shadow=e.util.createClass({color:"rgb(0,0,0)",blur:0,offsetX:0,offsetY:0,affectStroke:!1,includeDefaultValues:!0,nonScaling:!1,initialize:function(t){for(var n in"string"==typeof t&&(t=this._parseShadow(t)),t)this[n]=t[n];this.id=e.Object.__uid++},_parseShadow:function(t){var n=t.trim(),i=e.Shadow.reOffsetsAndBlur.exec(n)||[];return{color:(n.replace(e.Shadow.reOffsetsAndBlur,"")||"rgb(0,0,0)").trim(),offsetX:parseInt(i[1],10)||0,offsetY:parseInt(i[2],10)||0,blur:parseInt(i[3],10)||0}},toString:function(){return[this.offsetX,this.offsetY,this.blur,this.color].join("px ")},toSVG:function(t){var i=40,r=40,o=e.Object.NUM_FRACTION_DIGITS,a=e.util.rotateVector({x:this.offsetX,y:this.offsetY},e.util.degreesToRadians(-t.angle)),s=new e.Color(this.color);return t.width&&t.height&&(i=100*n((Math.abs(a.x)+this.blur)/t.width,o)+20,r=100*n((Math.abs(a.y)+this.blur)/t.height,o)+20),t.flipX&&(a.x*=-1),t.flipY&&(a.y*=-1),'<filter id="SVGID_'+this.id+'" y="-'+r+'%" height="'+(100+2*r)+'%" x="-'+i+'%" width="'+(100+2*i)+'%" >\n\t<feGaussianBlur in="SourceAlpha" stdDeviation="'+n(this.blur?this.blur/2:0,o)+'"></feGaussianBlur>\n\t<feOffset dx="'+n(a.x,o)+'" dy="'+n(a.y,o)+'" result="oBlur" ></feOffset>\n\t<feFlood flood-color="'+s.toRgb()+'" flood-opacity="'+s.getAlpha()+'"/>\n\t<feComposite in2="oBlur" operator="in" />\n\t<feMerge>\n\t\t<feMergeNode></feMergeNode>\n\t\t<feMergeNode in="SourceGraphic"></feMergeNode>\n\t</feMerge>\n</filter>\n'},toObject:function(){if(this.includeDefaultValues)return{color:this.color,blur:this.blur,offsetX:this.offsetX,offsetY:this.offsetY,affectStroke:this.affectStroke,nonScaling:this.nonScaling};var t={},n=e.Shadow.prototype;return["color","blur","offsetX","offsetY","affectStroke","nonScaling"].forEach((function(e){this[e]!==n[e]&&(t[e]=this[e])}),this),t}}),e.Shadow.reOffsetsAndBlur=/(?:\s|^)(-?\d+(?:px)?(?:\s?|$))?(-?\d+(?:px)?(?:\s?|$))?(\d+(?:px)?)?(?:\s?|$)(?:$|\s)/)}(e),function(){"use strict";if(g.StaticCanvas)g.warn("fabric.StaticCanvas is already defined.");else{var t=g.util.object.extend,e=g.util.getElementOffset,n=g.util.removeFromArray,i=g.util.toFixed,r=g.util.transformPoint,o=g.util.invertTransform,a=g.util.getNodeCanvas,s=g.util.createCanvasElement,l=new Error("Could not initialize `canvas` element");g.StaticCanvas=g.util.createClass(g.CommonMethods,{initialize:function(t,e){e||(e={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(t,e)},backgroundColor:"",backgroundImage:null,overlayColor:"",overlayImage:null,includeDefaultValues:!0,stateful:!1,renderOnAddRemove:!0,clipTo:null,controlsAboveOverlay:!1,allowTouchScrolling:!1,imageSmoothingEnabled:!0,viewportTransform:g.iMatrix.concat(),backgroundVpt:!0,overlayVpt:!0,onBeforeScaleRotate:function(){},enableRetinaScaling:!0,vptCoords:{},skipOffscreen:!0,clipPath:void 0,_initStatic:function(t,e){var n=this.requestRenderAllBound;this._objects=[],this._createLowerCanvas(t),this._initOptions(e),this._setImageSmoothing(),this.interactive||this._initRetinaScaling(),e.overlayImage&&this.setOverlayImage(e.overlayImage,n),e.backgroundImage&&this.setBackgroundImage(e.backgroundImage,n),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor,n),e.overlayColor&&this.setOverlayColor(e.overlayColor,n),this.calcOffset()},_isRetinaScaling:function(){return 1!==g.devicePixelRatio&&this.enableRetinaScaling},getRetinaScaling:function(){return this._isRetinaScaling()?g.devicePixelRatio:1},_initRetinaScaling:function(){if(this._isRetinaScaling()){var t=g.devicePixelRatio;this.__initRetinaScaling(t,this.lowerCanvasEl,this.contextContainer),this.upperCanvasEl&&this.__initRetinaScaling(t,this.upperCanvasEl,this.contextTop)}},__initRetinaScaling:function(t,e,n){e.setAttribute("width",this.width*t),e.setAttribute("height",this.height*t),n.scale(t,t)},calcOffset:function(){return this._offset=e(this.lowerCanvasEl),this},setOverlayImage:function(t,e,n){return this.__setBgOverlayImage("overlayImage",t,e,n)},setBackgroundImage:function(t,e,n){return this.__setBgOverlayImage("backgroundImage",t,e,n)},setOverlayColor:function(t,e){return this.__setBgOverlayColor("overlayColor",t,e)},setBackgroundColor:function(t,e){return this.__setBgOverlayColor("backgroundColor",t,e)},_setImageSmoothing:function(){var t=this.getContext();t.imageSmoothingEnabled=t.imageSmoothingEnabled||t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled||t.oImageSmoothingEnabled,t.imageSmoothingEnabled=this.imageSmoothingEnabled},__setBgOverlayImage:function(t,e,n,i){return"string"==typeof e?g.util.loadImage(e,(function(e){if(e){var r=new g.Image(e,i);this[t]=r,r.canvas=this}n&&n(e)}),this,i&&i.crossOrigin):(i&&e.setOptions(i),this[t]=e,e&&(e.canvas=this),n&&n(e)),this},__setBgOverlayColor:function(t,e,n){return this[t]=e,this._initGradient(e,t),this._initPattern(e,t,n),this},_createCanvasElement:function(){var t=s();if(!t)throw l;if(t.style||(t.style={}),void 0===t.getContext)throw l;return t},_initOptions:function(t){var e=this.lowerCanvasEl;this._setOptions(t),this.width=this.width||parseInt(e.width,10)||0,this.height=this.height||parseInt(e.height,10)||0,this.lowerCanvasEl.style&&(e.width=this.width,e.height=this.height,e.style.width=this.width+"px",e.style.height=this.height+"px",this.viewportTransform=this.viewportTransform.slice())},_createLowerCanvas:function(t){this.lowerCanvasEl=t&&t.getContext?t:g.util.getById(t)||this._createCanvasElement(),g.util.addClass(this.lowerCanvasEl,"lower-canvas"),this.interactive&&this._applyCanvasStyle(this.lowerCanvasEl),this.contextContainer=this.lowerCanvasEl.getContext("2d")},getWidth:function(){return this.width},getHeight:function(){return this.height},setWidth:function(t,e){return this.setDimensions({width:t},e)},setHeight:function(t,e){return this.setDimensions({height:t},e)},setDimensions:function(t,e){var n;for(var i in e=e||{},t)n=t[i],e.cssOnly||(this._setBackstoreDimension(i,t[i]),n+="px",this.hasLostContext=!0),e.backstoreOnly||this._setCssDimension(i,n);return this._isCurrentlyDrawing&&this.freeDrawingBrush&&this.freeDrawingBrush._setBrushStyles(),this._initRetinaScaling(),this._setImageSmoothing(),this.calcOffset(),e.cssOnly||this.requestRenderAll(),this},_setBackstoreDimension:function(t,e){return this.lowerCanvasEl[t]=e,this.upperCanvasEl&&(this.upperCanvasEl[t]=e),this.cacheCanvasEl&&(this.cacheCanvasEl[t]=e),this[t]=e,this},_setCssDimension:function(t,e){return this.lowerCanvasEl.style[t]=e,this.upperCanvasEl&&(this.upperCanvasEl.style[t]=e),this.wrapperEl&&(this.wrapperEl.style[t]=e),this},getZoom:function(){return this.viewportTransform[0]},setViewportTransform:function(t){var e,n,i,r=this._activeObject;for(this.viewportTransform=t,n=0,i=this._objects.length;n<i;n++)(e=this._objects[n]).group||e.setCoords(!1,!0);return r&&"activeSelection"===r.type&&r.setCoords(!1,!0),this.calcViewportBoundaries(),this.renderOnAddRemove&&this.requestRenderAll(),this},zoomToPoint:function(t,e){var n=t,i=this.viewportTransform.slice(0);t=r(t,o(this.viewportTransform)),i[0]=e,i[3]=e;var a=r(t,i);return i[4]+=n.x-a.x,i[5]+=n.y-a.y,this.setViewportTransform(i)},setZoom:function(t){return this.zoomToPoint(new g.Point(0,0),t),this},absolutePan:function(t){var e=this.viewportTransform.slice(0);return e[4]=-t.x,e[5]=-t.y,this.setViewportTransform(e)},relativePan:function(t){return this.absolutePan(new g.Point(-t.x-this.viewportTransform[4],-t.y-this.viewportTransform[5]))},getElement:function(){return this.lowerCanvasEl},_onObjectAdded:function(t){this.stateful&&t.setupState(),t._set("canvas",this),t.setCoords(),this.fire("object:added",{target:t}),t.fire("added")},_onObjectRemoved:function(t){this.fire("object:removed",{target:t}),t.fire("removed"),delete t.canvas},clearContext:function(t){return t.clearRect(0,0,this.width,this.height),this},getContext:function(){return this.contextContainer},clear:function(){return this._objects.length=0,this.backgroundImage=null,this.overlayImage=null,this.backgroundColor="",this.overlayColor="",this._hasITextHandlers&&(this.off("mouse:up",this._mouseUpITextHandler),this._iTextInstances=null,this._hasITextHandlers=!1),this.clearContext(this.contextContainer),this.fire("canvas:cleared"),this.renderOnAddRemove&&this.requestRenderAll(),this},renderAll:function(){return this.renderCanvas(this.contextContainer,this._objects),this},renderAndReset:function(){this.isRendering=0,this.renderAll()},requestRenderAll:function(){return this.isRendering||(this.isRendering=g.util.requestAnimFrame(this.renderAndResetBound)),this},calcViewportBoundaries:function(){var t={},e=this.width,n=this.height,i=o(this.viewportTransform);return t.tl=r({x:0,y:0},i),t.br=r({x:e,y:n},i),t.tr=new g.Point(t.br.x,t.tl.y),t.bl=new g.Point(t.tl.x,t.br.y),this.vptCoords=t,t},cancelRequestedRender:function(){this.isRendering&&(g.util.cancelAnimFrame(this.isRendering),this.isRendering=0)},renderCanvas:function(t,e){var n=this.viewportTransform,i=this.clipPath;this.cancelRequestedRender(),this.calcViewportBoundaries(),this.clearContext(t),this.fire("before:render",{ctx:t}),this.clipTo&&g.util.clipContext(this,t),this._renderBackground(t),t.save(),t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),this._renderObjects(t,e),t.restore(),!this.controlsAboveOverlay&&this.interactive&&this.drawControls(t),this.clipTo&&t.restore(),i&&(i.canvas=this,i.shouldCache(),i._transformDone=!0,i.renderCache({forClipping:!0}),this.drawClipPathOnCanvas(t)),this._renderOverlay(t),this.controlsAboveOverlay&&this.interactive&&this.drawControls(t),this.fire("after:render",{ctx:t})},drawClipPathOnCanvas:function(t){var e=this.viewportTransform,n=this.clipPath;t.save(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t.globalCompositeOperation="destination-in",n.transform(t),t.scale(1/n.zoomX,1/n.zoomY),t.drawImage(n._cacheCanvas,-n.cacheTranslationX,-n.cacheTranslationY),t.restore()},_renderObjects:function(t,e){var n,i;for(n=0,i=e.length;n<i;++n)e[n]&&e[n].render(t)},_renderBackgroundOrOverlay:function(t,e){var n=this[e+"Color"],i=this[e+"Image"],r=this.viewportTransform,o=this[e+"Vpt"];if(n||i){if(n){t.save(),t.beginPath(),t.moveTo(0,0),t.lineTo(this.width,0),t.lineTo(this.width,this.height),t.lineTo(0,this.height),t.closePath(),t.fillStyle=n.toLive?n.toLive(t,this):n,o&&t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),t.transform(1,0,0,1,n.offsetX||0,n.offsetY||0);var a=n.gradientTransform||n.patternTransform;a&&t.transform(a[0],a[1],a[2],a[3],a[4],a[5]),t.fill(),t.restore()}i&&(t.save(),o&&t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),i.render(t),t.restore())}},_renderBackground:function(t){this._renderBackgroundOrOverlay(t,"background")},_renderOverlay:function(t){this._renderBackgroundOrOverlay(t,"overlay")},getCenter:function(){return{top:this.height/2,left:this.width/2}},centerObjectH:function(t){return this._centerObject(t,new g.Point(this.getCenter().left,t.getCenterPoint().y))},centerObjectV:function(t){return this._centerObject(t,new g.Point(t.getCenterPoint().x,this.getCenter().top))},centerObject:function(t){var e=this.getCenter();return this._centerObject(t,new g.Point(e.left,e.top))},viewportCenterObject:function(t){var e=this.getVpCenter();return this._centerObject(t,e)},viewportCenterObjectH:function(t){var e=this.getVpCenter();return this._centerObject(t,new g.Point(e.x,t.getCenterPoint().y)),this},viewportCenterObjectV:function(t){var e=this.getVpCenter();return this._centerObject(t,new g.Point(t.getCenterPoint().x,e.y))},getVpCenter:function(){var t=this.getCenter(),e=o(this.viewportTransform);return r({x:t.left,y:t.top},e)},_centerObject:function(t,e){return t.setPositionByOrigin(e,"center","center"),t.setCoords(),this.renderOnAddRemove&&this.requestRenderAll(),this},toDatalessJSON:function(t){return this.toDatalessObject(t)},toObject:function(t){return this._toObjectMethod("toObject",t)},toDatalessObject:function(t){return this._toObjectMethod("toDatalessObject",t)},_toObjectMethod:function(e,n){var i=this.clipPath,r={version:g.version,objects:this._toObjects(e,n)};return i&&(r.clipPath=this._toObject(this.clipPath,e,n)),t(r,this.__serializeBgOverlay(e,n)),g.util.populateWithProperties(this,r,n),r},_toObjects:function(t,e){return this._objects.filter((function(t){return!t.excludeFromExport})).map((function(n){return this._toObject(n,t,e)}),this)},_toObject:function(t,e,n){var i;this.includeDefaultValues||(i=t.includeDefaultValues,t.includeDefaultValues=!1);var r=t[e](n);return this.includeDefaultValues||(t.includeDefaultValues=i),r},__serializeBgOverlay:function(t,e){var n={},i=this.backgroundImage,r=this.overlayImage;return this.backgroundColor&&(n.background=this.backgroundColor.toObject?this.backgroundColor.toObject(e):this.backgroundColor),this.overlayColor&&(n.overlay=this.overlayColor.toObject?this.overlayColor.toObject(e):this.overlayColor),i&&!i.excludeFromExport&&(n.backgroundImage=this._toObject(i,t,e)),r&&!r.excludeFromExport&&(n.overlayImage=this._toObject(r,t,e)),n},svgViewportTransformation:!0,toSVG:function(t,e){t||(t={}),t.reviver=e;var n=[];return this._setSVGPreamble(n,t),this._setSVGHeader(n,t),this.clipPath&&n.push('<g clip-path="url(#'+this.clipPath.clipPathId+')" >\n'),this._setSVGBgOverlayColor(n,"background"),this._setSVGBgOverlayImage(n,"backgroundImage",e),this._setSVGObjects(n,e),this.clipPath&&n.push("</g>\n"),this._setSVGBgOverlayColor(n,"overlay"),this._setSVGBgOverlayImage(n,"overlayImage",e),n.push("</svg>"),n.join("")},_setSVGPreamble:function(t,e){e.suppressPreamble||t.push('<?xml version="1.0" encoding="',e.encoding||"UTF-8",'" standalone="no" ?>\n','<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" ','"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')},_setSVGHeader:function(t,e){var n,r=e.width||this.width,o=e.height||this.height,a='viewBox="0 0 '+this.width+" "+this.height+'" ',s=g.Object.NUM_FRACTION_DIGITS;e.viewBox?a='viewBox="'+e.viewBox.x+" "+e.viewBox.y+" "+e.viewBox.width+" "+e.viewBox.height+'" ':this.svgViewportTransformation&&(a='viewBox="'+i(-(n=this.viewportTransform)[4]/n[0],s)+" "+i(-n[5]/n[3],s)+" "+i(this.width/n[0],s)+" "+i(this.height/n[3],s)+'" '),t.push("<svg ",'xmlns="http://www.w3.org/2000/svg" ','xmlns:xlink="http://www.w3.org/1999/xlink" ','version="1.1" ','width="',r,'" ','height="',o,'" ',a,'xml:space="preserve">\n',"<desc>Created with Fabric.js ",g.version,"</desc>\n","<defs>\n",this.createSVGFontFacesMarkup(),this.createSVGRefElementsMarkup(),this.createSVGClipPathMarkup(e),"</defs>\n")},createSVGClipPathMarkup:function(t){var e=this.clipPath;return e?(e.clipPathId="CLIPPATH_"+g.Object.__uid++,'<clipPath id="'+e.clipPathId+'" >\n'+this.clipPath.toClipPathSVG(t.reviver)+"</clipPath>\n"):""},createSVGRefElementsMarkup:function(){var t=this;return["background","overlay"].map((function(e){var n=t[e+"Color"];if(n&&n.toLive){var i=t[e+"Vpt"],r=t.viewportTransform;return n.toSVG({width:t.width/(i?r[0]:1),height:t.height/(i?r[3]:1)},{additionalTransform:i?g.util.matrixToSVG(r):""})}})).join("")},createSVGFontFacesMarkup:function(){var t,e,n,i,r,o,a,s,l="",c={},u=g.fontPaths,h=[];for(this._objects.forEach((function t(e){h.push(e),e._objects&&e._objects.forEach(t)})),a=0,s=h.length;a<s;a++)if(e=(t=h[a]).fontFamily,-1!==t.type.indexOf("text")&&!c[e]&&u[e]&&(c[e]=!0,t.styles))for(r in n=t.styles)for(o in i=n[r])!c[e=i[o].fontFamily]&&u[e]&&(c[e]=!0);for(var f in c)l+=["\t\t@font-face {\n","\t\t\tfont-family: '",f,"';\n","\t\t\tsrc: url('",u[f],"');\n","\t\t}\n"].join("");return l&&(l=['\t<style type="text/css">',"<![CDATA[\n",l,"]]>","</style>\n"].join("")),l},_setSVGObjects:function(t,e){var n,i,r,o=this._objects;for(i=0,r=o.length;i<r;i++)(n=o[i]).excludeFromExport||this._setSVGObject(t,n,e)},_setSVGObject:function(t,e,n){t.push(e.toSVG(n))},_setSVGBgOverlayImage:function(t,e,n){this[e]&&!this[e].excludeFromExport&&this[e].toSVG&&t.push(this[e].toSVG(n))},_setSVGBgOverlayColor:function(t,e){var n=this[e+"Color"],i=this.width,r=this.height;if(n)if(n.toLive){var o=n.repeat,a=g.util.invertTransform(this.viewportTransform),s=this[e+"Vpt"]?g.util.matrixToSVG(a):"";t.push('<rect transform="'+s+" translate(",i/2,",",r/2,')"',' x="',n.offsetX-i/2,'" y="',n.offsetY-r/2,'" ','width="',"repeat-y"===o||"no-repeat"===o?n.source.width:i,'" height="',"repeat-x"===o||"no-repeat"===o?n.source.height:r,'" fill="url(#SVGID_'+n.id+')"',"></rect>\n")}else t.push('<rect x="0" y="0" width="100%" height="100%" ','fill="',n,'"',"></rect>\n")},sendToBack:function(t){if(!t)return this;var e,i,r,o=this._activeObject;if(t===o&&"activeSelection"===t.type)for(e=(r=o._objects).length;e--;)n(this._objects,i=r[e]),this._objects.unshift(i);else n(this._objects,t),this._objects.unshift(t);return this.renderOnAddRemove&&this.requestRenderAll(),this},bringToFront:function(t){if(!t)return this;var e,i,r,o=this._activeObject;if(t===o&&"activeSelection"===t.type)for(r=o._objects,e=0;e<r.length;e++)n(this._objects,i=r[e]),this._objects.push(i);else n(this._objects,t),this._objects.push(t);return this.renderOnAddRemove&&this.requestRenderAll(),this},sendBackwards:function(t,e){if(!t)return this;var i,r,o,a,s,l=this._activeObject,c=0;if(t===l&&"activeSelection"===t.type)for(s=l._objects,i=0;i<s.length;i++)(o=this._objects.indexOf(r=s[i]))>0+c&&(a=o-1,n(this._objects,r),this._objects.splice(a,0,r)),c++;else 0!==(o=this._objects.indexOf(t))&&(a=this._findNewLowerIndex(t,o,e),n(this._objects,t),this._objects.splice(a,0,t));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewLowerIndex:function(t,e,n){var i,r;if(n){for(i=e,r=e-1;r>=0;--r)if(t.intersectsWithObject(this._objects[r])||t.isContainedWithinObject(this._objects[r])||this._objects[r].isContainedWithinObject(t)){i=r;break}}else i=e-1;return i},bringForward:function(t,e){if(!t)return this;var i,r,o,a,s,l=this._activeObject,c=0;if(t===l&&"activeSelection"===t.type)for(i=(s=l._objects).length;i--;)(o=this._objects.indexOf(r=s[i]))<this._objects.length-1-c&&(a=o+1,n(this._objects,r),this._objects.splice(a,0,r)),c++;else(o=this._objects.indexOf(t))!==this._objects.length-1&&(a=this._findNewUpperIndex(t,o,e),n(this._objects,t),this._objects.splice(a,0,t));return this.renderOnAddRemove&&this.requestRenderAll(),this},_findNewUpperIndex:function(t,e,n){var i,r,o;if(n){for(i=e,r=e+1,o=this._objects.length;r<o;++r)if(t.intersectsWithObject(this._objects[r])||t.isContainedWithinObject(this._objects[r])||this._objects[r].isContainedWithinObject(t)){i=r;break}}else i=e+1;return i},moveTo:function(t,e){return n(this._objects,t),this._objects.splice(e,0,t),this.renderOnAddRemove&&this.requestRenderAll()},dispose:function(){return this.isRendering&&(g.util.cancelAnimFrame(this.isRendering),this.isRendering=0),this.forEachObject((function(t){t.dispose&&t.dispose()})),this._objects=[],this.backgroundImage&&this.backgroundImage.dispose&&this.backgroundImage.dispose(),this.backgroundImage=null,this.overlayImage&&this.overlayImage.dispose&&this.overlayImage.dispose(),this.overlayImage=null,this._iTextInstances=null,this.contextContainer=null,g.util.cleanUpJsdomNode(this.lowerCanvasEl),this.lowerCanvasEl=void 0,this},toString:function(){return"#<fabric.Canvas ("+this.complexity()+"): { objects: "+this._objects.length+" }>"}}),t(g.StaticCanvas.prototype,g.Observable),t(g.StaticCanvas.prototype,g.Collection),t(g.StaticCanvas.prototype,g.DataURLExporter),t(g.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',supports:function(t){var e=s();if(!e||!e.getContext)return null;var n=e.getContext("2d");if(!n)return null;switch(t){case"setLineDash":return void 0!==n.setLineDash;default:return null}}}),g.StaticCanvas.prototype.toJSON=g.StaticCanvas.prototype.toObject,g.isLikelyNode&&(g.StaticCanvas.prototype.createPNGStream=function(){var t=a(this.lowerCanvasEl);return t&&t.createPNGStream()},g.StaticCanvas.prototype.createJPEGStream=function(t){var e=a(this.lowerCanvasEl);return e&&e.createJPEGStream(t)})}}(),g.BaseBrush=g.util.createClass({color:"rgb(0, 0, 0)",width:1,shadow:null,strokeLineCap:"round",strokeLineJoin:"round",strokeMiterLimit:10,strokeDashArray:null,setShadow:function(t){return this.shadow=new g.Shadow(t),this},_setBrushStyles:function(){var t=this.canvas.contextTop;t.strokeStyle=this.color,t.lineWidth=this.width,t.lineCap=this.strokeLineCap,t.miterLimit=this.strokeMiterLimit,t.lineJoin=this.strokeLineJoin,g.StaticCanvas.supports("setLineDash")&&t.setLineDash(this.strokeDashArray||[])},_saveAndTransform:function(t){var e=this.canvas.viewportTransform;t.save(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},_setShadow:function(){if(this.shadow){var t=this.canvas,e=this.shadow,n=t.contextTop,i=t.getZoom();t&&t._isRetinaScaling()&&(i*=g.devicePixelRatio),n.shadowColor=e.color,n.shadowBlur=e.blur*i,n.shadowOffsetX=e.offsetX*i,n.shadowOffsetY=e.offsetY*i}},needsFullRender:function(){return new g.Color(this.color).getAlpha()<1||!!this.shadow},_resetShadow:function(){var t=this.canvas.contextTop;t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0}}),g.PencilBrush=g.util.createClass(g.BaseBrush,{decimate:.4,initialize:function(t){this.canvas=t,this._points=[]},_drawSegment:function(t,e,n){var i=e.midPointFrom(n);return t.quadraticCurveTo(e.x,e.y,i.x,i.y),i},onMouseDown:function(t,e){this.canvas._isMainEvent(e.e)&&(this._prepareForDrawing(t),this._captureDrawingPath(t),this._render())},onMouseMove:function(t,e){if(this.canvas._isMainEvent(e.e)&&this._captureDrawingPath(t)&&this._points.length>1)if(this.needsFullRender())this.canvas.clearContext(this.canvas.contextTop),this._render();else{var n=this._points,i=n.length,r=this.canvas.contextTop;this._saveAndTransform(r),this.oldEnd&&(r.beginPath(),r.moveTo(this.oldEnd.x,this.oldEnd.y)),this.oldEnd=this._drawSegment(r,n[i-2],n[i-1],!0),r.stroke(),r.restore()}},onMouseUp:function(t){return!this.canvas._isMainEvent(t.e)||(this.oldEnd=void 0,this._finalizeAndAddPath(),!1)},_prepareForDrawing:function(t){var e=new g.Point(t.x,t.y);this._reset(),this._addPoint(e),this.canvas.contextTop.moveTo(e.x,e.y)},_addPoint:function(t){return!(this._points.length>1&&t.eq(this._points[this._points.length-1])||(this._points.push(t),0))},_reset:function(){this._points=[],this._setBrushStyles(),this._setShadow()},_captureDrawingPath:function(t){var e=new g.Point(t.x,t.y);return this._addPoint(e)},_render:function(){var t,e,n=this.canvas.contextTop,i=this._points[0],r=this._points[1];if(this._saveAndTransform(n),n.beginPath(),2===this._points.length&&i.x===r.x&&i.y===r.y){var o=this.width/1e3;i=new g.Point(i.x,i.y),r=new g.Point(r.x,r.y),i.x-=o,r.x+=o}for(n.moveTo(i.x,i.y),t=1,e=this._points.length;t<e;t++)this._drawSegment(n,i,r),i=this._points[t],r=this._points[t+1];n.lineTo(i.x,i.y),n.stroke(),n.restore()},convertPointsToSVGPath:function(t){var e,n=[],i=this.width/1e3,r=new g.Point(t[0].x,t[0].y),o=new g.Point(t[1].x,t[1].y),a=t.length,s=1,l=0,c=a>2;for(c&&(s=t[2].x<o.x?-1:t[2].x===o.x?0:1,l=t[2].y<o.y?-1:t[2].y===o.y?0:1),n.push("M ",r.x-s*i," ",r.y-l*i," "),e=1;e<a;e++){if(!r.eq(o)){var u=r.midPointFrom(o);n.push("Q ",r.x," ",r.y," ",u.x," ",u.y," ")}r=t[e],e+1<t.length&&(o=t[e+1])}return c&&(s=r.x>t[e-2].x?1:r.x===t[e-2].x?0:-1,l=r.y>t[e-2].y?1:r.y===t[e-2].y?0:-1),n.push("L ",r.x+s*i," ",r.y+l*i),n},createPath:function(t){var e=new g.Path(t,{fill:null,stroke:this.color,strokeWidth:this.width,strokeLineCap:this.strokeLineCap,strokeMiterLimit:this.strokeMiterLimit,strokeLineJoin:this.strokeLineJoin,strokeDashArray:this.strokeDashArray});return this.shadow&&(this.shadow.affectStroke=!0,e.setShadow(this.shadow)),e},decimatePoints:function(t,e){if(t.length<=2)return t;var n,i=this.canvas.getZoom(),r=Math.pow(e/i,2),o=t.length-1,a=t[0],s=[a];for(n=1;n<o;n++)Math.pow(a.x-t[n].x,2)+Math.pow(a.y-t[n].y,2)>=r&&s.push(a=t[n]);return 1===s.length&&s.push(new g.Point(s[0].x,s[0].y)),s},_finalizeAndAddPath:function(){this.canvas.contextTop.closePath(),this.decimate&&(this._points=this.decimatePoints(this._points,this.decimate));var t=this.convertPointsToSVGPath(this._points).join("");if("M 0 0 Q 0 0 0 0 L 0 0"!==t){var e=this.createPath(t);this.canvas.clearContext(this.canvas.contextTop),this.canvas.add(e),this.canvas.requestRenderAll(),e.setCoords(),this._resetShadow(),this.canvas.fire("path:created",{path:e})}else this.canvas.requestRenderAll()}}),g.CircleBrush=g.util.createClass(g.BaseBrush,{width:10,initialize:function(t){this.canvas=t,this.points=[]},drawDot:function(t){var e=this.addPoint(t),n=this.canvas.contextTop;this._saveAndTransform(n),this.dot(n,e),n.restore()},dot:function(t,e){t.fillStyle=e.fill,t.beginPath(),t.arc(e.x,e.y,e.radius,0,2*Math.PI,!1),t.closePath(),t.fill()},onMouseDown:function(t){this.points.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.drawDot(t)},_render:function(){var t,e,n=this.canvas.contextTop,i=this.points;for(this._saveAndTransform(n),t=0,e=i.length;t<e;t++)this.dot(n,i[t]);n.restore()},onMouseMove:function(t){this.needsFullRender()?(this.canvas.clearContext(this.canvas.contextTop),this.addPoint(t),this._render()):this.drawDot(t)},onMouseUp:function(){var t,e,n=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;var i=[];for(t=0,e=this.points.length;t<e;t++){var r=this.points[t],o=new g.Circle({radius:r.radius,left:r.x,top:r.y,originX:"center",originY:"center",fill:r.fill});this.shadow&&o.setShadow(this.shadow),i.push(o)}var a=new g.Group(i);a.canvas=this.canvas,this.canvas.add(a),this.canvas.fire("path:created",{path:a}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=n,this.canvas.requestRenderAll()},addPoint:function(t){var e=new g.Point(t.x,t.y),n=g.util.getRandomInt(Math.max(0,this.width-20),this.width+20)/2,i=new g.Color(this.color).setAlpha(g.util.getRandomInt(0,100)/100).toRgba();return e.radius=n,e.fill=i,this.points.push(e),e}}),g.SprayBrush=g.util.createClass(g.BaseBrush,{width:10,density:20,dotWidth:1,dotWidthVariance:1,randomOpacity:!1,optimizeOverlapping:!0,initialize:function(t){this.canvas=t,this.sprayChunks=[]},onMouseDown:function(t){this.sprayChunks.length=0,this.canvas.clearContext(this.canvas.contextTop),this._setShadow(),this.addSprayChunk(t),this.render(this.sprayChunkPoints)},onMouseMove:function(t){this.addSprayChunk(t),this.render(this.sprayChunkPoints)},onMouseUp:function(){var t=this.canvas.renderOnAddRemove;this.canvas.renderOnAddRemove=!1;for(var e=[],n=0,i=this.sprayChunks.length;n<i;n++)for(var r=this.sprayChunks[n],o=0,a=r.length;o<a;o++){var s=new g.Rect({width:r[o].width,height:r[o].width,left:r[o].x+1,top:r[o].y+1,originX:"center",originY:"center",fill:this.color});e.push(s)}this.optimizeOverlapping&&(e=this._getOptimizedRects(e));var l=new g.Group(e);this.shadow&&l.setShadow(this.shadow),this.canvas.add(l),this.canvas.fire("path:created",{path:l}),this.canvas.clearContext(this.canvas.contextTop),this._resetShadow(),this.canvas.renderOnAddRemove=t,this.canvas.requestRenderAll()},_getOptimizedRects:function(t){var e,n,i,r={};for(n=0,i=t.length;n<i;n++)r[e=t[n].left+""+t[n].top]||(r[e]=t[n]);var o=[];for(e in r)o.push(r[e]);return o},render:function(t){var e,n,i=this.canvas.contextTop;for(i.fillStyle=this.color,this._saveAndTransform(i),e=0,n=t.length;e<n;e++){var r=t[e];void 0!==r.opacity&&(i.globalAlpha=r.opacity),i.fillRect(r.x,r.y,r.width,r.width)}i.restore()},_render:function(){var t,e,n=this.canvas.contextTop;for(n.fillStyle=this.color,this._saveAndTransform(n),t=0,e=this.sprayChunks.length;t<e;t++)this.render(this.sprayChunks[t]);n.restore()},addSprayChunk:function(t){this.sprayChunkPoints=[];var e,n,i,r,o=this.width/2;for(r=0;r<this.density;r++){e=g.util.getRandomInt(t.x-o,t.x+o),n=g.util.getRandomInt(t.y-o,t.y+o),i=this.dotWidthVariance?g.util.getRandomInt(Math.max(1,this.dotWidth-this.dotWidthVariance),this.dotWidth+this.dotWidthVariance):this.dotWidth;var a=new g.Point(e,n);a.width=i,this.randomOpacity&&(a.opacity=g.util.getRandomInt(0,100)/100),this.sprayChunkPoints.push(a)}this.sprayChunks.push(this.sprayChunkPoints)}}),g.PatternBrush=g.util.createClass(g.PencilBrush,{getPatternSrc:function(){var t=g.util.createCanvasElement(),e=t.getContext("2d");return t.width=t.height=25,e.fillStyle=this.color,e.beginPath(),e.arc(10,10,10,0,2*Math.PI,!1),e.closePath(),e.fill(),t},getPatternSrcFunction:function(){return String(this.getPatternSrc).replace("this.color",'"'+this.color+'"')},getPattern:function(){return this.canvas.contextTop.createPattern(this.source||this.getPatternSrc(),"repeat")},_setBrushStyles:function(){this.callSuper("_setBrushStyles"),this.canvas.contextTop.strokeStyle=this.getPattern()},createPath:function(t){var e=this.callSuper("createPath",t),n=e._getLeftTopCoords().scalarAdd(e.strokeWidth/2);return e.stroke=new g.Pattern({source:this.source||this.getPatternSrcFunction(),offsetX:-n.x,offsetY:-n.y}),e}}),function(){var t=g.util.getPointer,e=g.util.degreesToRadians,n=g.util.radiansToDegrees,i=Math.atan2,r=Math.abs,o=g.StaticCanvas.supports("setLineDash");for(var a in g.Canvas=g.util.createClass(g.StaticCanvas,{initialize:function(t,e){e||(e={}),this.renderAndResetBound=this.renderAndReset.bind(this),this.requestRenderAllBound=this.requestRenderAll.bind(this),this._initStatic(t,e),this._initInteractive(),this._createCacheCanvas()},uniScaleTransform:!1,uniScaleKey:"shiftKey",centeredScaling:!1,centeredRotation:!1,centeredKey:"altKey",altActionKey:"shiftKey",interactive:!0,selection:!0,selectionKey:"shiftKey",altSelectionKey:null,selectionColor:"rgba(100, 100, 255, 0.3)",selectionDashArray:[],selectionBorderColor:"rgba(255, 255, 255, 0.3)",selectionLineWidth:1,selectionFullyContained:!1,hoverCursor:"move",moveCursor:"move",defaultCursor:"default",freeDrawingCursor:"crosshair",rotationCursor:"crosshair",notAllowedCursor:"not-allowed",containerClass:"canvas-container",perPixelTargetFind:!1,targetFindTolerance:0,skipTargetFind:!1,isDrawingMode:!1,preserveObjectStacking:!1,snapAngle:0,snapThreshold:null,stopContextMenu:!1,fireRightClick:!1,fireMiddleClick:!1,targets:[],_hoveredTarget:null,_hoveredTargets:[],_initInteractive:function(){this._currentTransform=null,this._groupSelector=null,this._initWrapperElement(),this._createUpperCanvas(),this._initEventListeners(),this._initRetinaScaling(),this.freeDrawingBrush=g.PencilBrush&&new g.PencilBrush(this),this.calcOffset()},_chooseObjectsToRender:function(){var t,e,n,i=this.getActiveObjects();if(i.length>0&&!this.preserveObjectStacking){e=[],n=[];for(var r=0,o=this._objects.length;r<o;r++)-1===i.indexOf(t=this._objects[r])?e.push(t):n.push(t);i.length>1&&(this._activeObject._objects=n),e.push.apply(e,n)}else e=this._objects;return e},renderAll:function(){return!this.contextTopDirty||this._groupSelector||this.isDrawingMode||(this.clearContext(this.contextTop),this.contextTopDirty=!1),this.hasLostContext&&this.renderTopLayer(this.contextTop),this.renderCanvas(this.contextContainer,this._chooseObjectsToRender()),this},renderTopLayer:function(t){t.save(),this.isDrawingMode&&this._isCurrentlyDrawing&&(this.freeDrawingBrush&&this.freeDrawingBrush._render(),this.contextTopDirty=!0),this.selection&&this._groupSelector&&(this._drawSelection(t),this.contextTopDirty=!0),t.restore()},renderTop:function(){var t=this.contextTop;return this.clearContext(t),this.renderTopLayer(t),this.fire("after:render"),this},_resetCurrentTransform:function(){var t=this._currentTransform;t.target.set({scaleX:t.original.scaleX,scaleY:t.original.scaleY,skewX:t.original.skewX,skewY:t.original.skewY,left:t.original.left,top:t.original.top}),this._shouldCenterTransform(t.target)?("center"!==t.originX&&(t.mouseXSign="right"===t.originX?-1:1),"center"!==t.originY&&(t.mouseYSign="bottom"===t.originY?-1:1),t.originX="center",t.originY="center"):(t.originX=t.original.originX,t.originY=t.original.originY)},containsPoint:function(t,e,n){var i,r=n||this.getPointer(t,!0);return i=e.group&&e.group===this._activeObject&&"activeSelection"===e.group.type?this._normalizePointer(e.group,r):{x:r.x,y:r.y},e.containsPoint(i)||e._findTargetCorner(r)},_normalizePointer:function(t,e){var n=t.calcTransformMatrix(),i=g.util.invertTransform(n),r=this.restorePointerVpt(e);return g.util.transformPoint(r,i)},isTargetTransparent:function(t,e,n){if(t.shouldCache()&&t._cacheCanvas&&t!==this._activeObject){var i=this._normalizePointer(t,{x:e,y:n}),r=Math.max(t.cacheTranslationX+i.x*t.zoomX,0),o=Math.max(t.cacheTranslationY+i.y*t.zoomY,0);return g.util.isTransparent(t._cacheContext,Math.round(r),Math.round(o),this.targetFindTolerance)}var a=this.contextCache,s=t.selectionBackgroundColor,l=this.viewportTransform;return t.selectionBackgroundColor="",this.clearContext(a),a.save(),a.transform(l[0],l[1],l[2],l[3],l[4],l[5]),t.render(a),a.restore(),t===this._activeObject&&t._renderControls(a,{hasBorders:!1,transparentCorners:!1},{hasBorders:!1}),t.selectionBackgroundColor=s,g.util.isTransparent(a,e,n,this.targetFindTolerance)},_isSelectionKeyPressed:function(t){return"[object Array]"===Object.prototype.toString.call(this.selectionKey)?!!this.selectionKey.find((function(e){return!0===t[e]})):t[this.selectionKey]},_shouldClearSelection:function(t,e){var n=this.getActiveObjects(),i=this._activeObject;return!e||e&&i&&n.length>1&&-1===n.indexOf(e)&&i!==e&&!this._isSelectionKeyPressed(t)||e&&!e.evented||e&&!e.selectable&&i&&i!==e},_shouldCenterTransform:function(t){if(t){var e,n=this._currentTransform;return"scale"===n.action||"scaleX"===n.action||"scaleY"===n.action?e=this.centeredScaling||t.centeredScaling:"rotate"===n.action&&(e=this.centeredRotation||t.centeredRotation),e?!n.altKey:n.altKey}},_getOriginFromCorner:function(t,e){var n={x:t.originX,y:t.originY};return"ml"===e||"tl"===e||"bl"===e?n.x="right":"mr"!==e&&"tr"!==e&&"br"!==e||(n.x="left"),"tl"===e||"mt"===e||"tr"===e?n.y="bottom":"bl"!==e&&"mb"!==e&&"br"!==e||(n.y="top"),n},_getActionFromCorner:function(t,e,n){if(!e||!t)return"drag";switch(e){case"mtr":return"rotate";case"ml":case"mr":return n[this.altActionKey]?"skewY":"scaleX";case"mt":case"mb":return n[this.altActionKey]?"skewX":"scaleY";default:return"scale"}},_setupCurrentTransform:function(t,n,i){if(n){var r=this.getPointer(t),o=n._findTargetCorner(this.getPointer(t,!0)),a=this._getActionFromCorner(i,o,t,n),s=this._getOriginFromCorner(n,o);this._currentTransform={target:n,action:a,corner:o,scaleX:n.scaleX,scaleY:n.scaleY,skewX:n.skewX,skewY:n.skewY,offsetX:r.x-n.left,offsetY:r.y-n.top,originX:s.x,originY:s.y,ex:r.x,ey:r.y,lastX:r.x,lastY:r.y,theta:e(n.angle),width:n.width*n.scaleX,mouseXSign:1,mouseYSign:1,shiftKey:t.shiftKey,altKey:t[this.centeredKey],original:g.util.saveObjectTransform(n)},this._currentTransform.original.originX=s.x,this._currentTransform.original.originY=s.y,this._resetCurrentTransform(),this._beforeTransform(t)}},_translateObject:function(t,e){var n=this._currentTransform,i=n.target,r=t-n.offsetX,o=e-n.offsetY,a=!i.get("lockMovementX")&&i.left!==r,s=!i.get("lockMovementY")&&i.top!==o;return a&&i.set("left",r),s&&i.set("top",o),a||s},_changeSkewTransformOrigin:function(t,e,n){var i="originX",r={0:"center"},o=e.target.skewX,a="left",s="right",l="mt"===e.corner||"ml"===e.corner?1:-1,c=1;t=t>0?1:-1,"y"===n&&(o=e.target.skewY,a="top",s="bottom",i="originY"),r[-1]=a,r[1]=s,e.target.flipX&&(c*=-1),e.target.flipY&&(c*=-1),0===o?(e.skewSign=-l*t*c,e[i]=r[-t]):(e.skewSign=o=o>0?1:-1,e[i]=r[o*l*c])},_skewObject:function(t,e,n){var i,r=this._currentTransform,o=r.target,a=o.get("lockSkewingX"),s=o.get("lockSkewingY");if(a&&"x"===n||s&&"y"===n)return!1;var l,c,u=o.getCenterPoint(),h=o.toLocalPoint(new g.Point(t,e),"center","center")[n],f=o.toLocalPoint(new g.Point(r.lastX,r.lastY),"center","center")[n],d=o._getTransformedDimensions();return this._changeSkewTransformOrigin(h-f,r,n),l=o.toLocalPoint(new g.Point(t,e),r.originX,r.originY)[n],c=o.translateToOriginPoint(u,r.originX,r.originY),i=this._setObjectSkew(l,r,n,d),r.lastX=t,r.lastY=e,o.setPositionByOrigin(c,r.originX,r.originY),i},_setObjectSkew:function(t,e,n,i){var r,o,a,s,l,c,u,h,f,d,p=e.target,v=e.skewSign;return"x"===n?(l="y",c="Y",u="X",f=0,d=p.skewY):(l="x",c="X",u="Y",f=p.skewX,d=0),s=p._getTransformedDimensions(f,d),(h=2*Math.abs(t)-s[n])<=2?r=0:(r=v*Math.atan(h/p["scale"+u]/(s[l]/p["scale"+c])),r=g.util.radiansToDegrees(r)),o=p["skew"+u]!==r,p.set("skew"+u,r),0!==p["skew"+c]&&(a=p._getTransformedDimensions(),p.set("scale"+c,r=i[l]/a[l]*p["scale"+c])),o},_scaleObject:function(t,e,n){var i=this._currentTransform,r=i.target,o=r.lockScalingX,a=r.lockScalingY,s=r.lockScalingFlip;if(o&&a)return!1;var l,c=r.translateToOriginPoint(r.getCenterPoint(),i.originX,i.originY),u=r.toLocalPoint(new g.Point(t,e),i.originX,i.originY),h=r._getTransformedDimensions();return this._setLocalMouse(u,i),l=this._setObjectScale(u,i,o,a,n,s,h),r.setPositionByOrigin(c,i.originX,i.originY),l},_setObjectScale:function(t,e,n,i,r,o,a){var s=e.target,l=!1,c=!1,u=!1,h=t.x*s.scaleX/a.x,f=t.y*s.scaleY/a.y,d=s.scaleX!==h,p=s.scaleY!==f;if(e.newScaleX=h,e.newScaleY=f,g.Textbox&&"x"===r&&s instanceof g.Textbox){var v=s.width*(t.x/a.x);return v>=s.getMinWidth()&&(u=v!==s.width,s.set("width",v),u)}return o&&h<=0&&h<s.scaleX&&(l=!0,t.x=0),o&&f<=0&&f<s.scaleY&&(c=!0,t.y=0),"equally"!==r||n||i?r?"x"!==r||s.get("lockUniScaling")?"y"!==r||s.get("lockUniScaling")||c||i||s.set("scaleY",f)&&(u=p):l||n||s.set("scaleX",h)&&(u=d):(l||n||s.set("scaleX",h)&&(u=u||d),c||i||s.set("scaleY",f)&&(u=u||p)):u=this._scaleObjectEqually(t,s,e,a),l||c||this._flipObject(e,r),u},_scaleObjectEqually:function(t,e,n,i){var r,o,a,s=t.y+t.x,l=i.y*n.original.scaleY/e.scaleY+i.x*n.original.scaleX/e.scaleX,c=t.y<0?-1:1;return o=(t.x<0?-1:1)*Math.abs(n.original.scaleX*s/l),a=c*Math.abs(n.original.scaleY*s/l),r=o!==e.scaleX||a!==e.scaleY,e.set("scaleX",o),e.set("scaleY",a),r},_flipObject:function(t,e){t.newScaleX<0&&"y"!==e&&("left"===t.originX?t.originX="right":"right"===t.originX&&(t.originX="left")),t.newScaleY<0&&"x"!==e&&("top"===t.originY?t.originY="bottom":"bottom"===t.originY&&(t.originY="top"))},_setLocalMouse:function(t,e){var n=e.target,i=this.getZoom(),o=n.padding/i;"right"===e.originX?t.x*=-1:"center"===e.originX&&(t.x*=2*e.mouseXSign,t.x<0&&(e.mouseXSign=-e.mouseXSign)),"bottom"===e.originY?t.y*=-1:"center"===e.originY&&(t.y*=2*e.mouseYSign,t.y<0&&(e.mouseYSign=-e.mouseYSign)),r(t.x)>o?t.x<0?t.x+=o:t.x-=o:t.x=0,r(t.y)>o?t.y<0?t.y+=o:t.y-=o:t.y=0},_rotateObject:function(t,e){var r=this._currentTransform,o=r.target,a=o.translateToOriginPoint(o.getCenterPoint(),r.originX,r.originY);if(o.lockRotation)return!1;var s=i(r.ey-a.y,r.ex-a.x),l=i(e-a.y,t-a.x),c=n(l-s+r.theta),u=!0;if(o.snapAngle>0){var h=o.snapAngle,f=o.snapThreshold||h,d=Math.ceil(c/h)*h,p=Math.floor(c/h)*h;Math.abs(c-p)<f?c=p:Math.abs(c-d)<f&&(c=d)}return c<0&&(c=360+c),o.angle===(c%=360)?u=!1:(o.angle=c,o.setPositionByOrigin(a,r.originX,r.originY)),u},setCursor:function(t){this.upperCanvasEl.style.cursor=t},_drawSelection:function(t){var e=this._groupSelector,n=e.left,i=e.top,a=r(n),s=r(i);if(this.selectionColor&&(t.fillStyle=this.selectionColor,t.fillRect(e.ex-(n>0?0:-n),e.ey-(i>0?0:-i),a,s)),this.selectionLineWidth&&this.selectionBorderColor)if(t.lineWidth=this.selectionLineWidth,t.strokeStyle=this.selectionBorderColor,this.selectionDashArray.length>1&&!o){var l=e.ex+.5-(n>0?0:a),c=e.ey+.5-(i>0?0:s);t.beginPath(),g.util.drawDashedLine(t,l,c,l+a,c,this.selectionDashArray),g.util.drawDashedLine(t,l,c+s-1,l+a,c+s-1,this.selectionDashArray),g.util.drawDashedLine(t,l,c,l,c+s,this.selectionDashArray),g.util.drawDashedLine(t,l+a-1,c,l+a-1,c+s,this.selectionDashArray),t.closePath(),t.stroke()}else g.Object.prototype._setLineDash.call(this,t,this.selectionDashArray),t.strokeRect(e.ex+.5-(n>0?0:a),e.ey+.5-(i>0?0:s),a,s)},findTarget:function(t,e){if(!this.skipTargetFind){var n,i,r=this.getPointer(t,!0),o=this._activeObject,a=this.getActiveObjects();if(this.targets=[],a.length>1&&!e&&o===this._searchPossibleTargets([o],r))return o;if(1===a.length&&o._findTargetCorner(r))return o;if(1===a.length&&o===this._searchPossibleTargets([o],r)){if(!this.preserveObjectStacking)return o;n=o,i=this.targets,this.targets=[]}var s=this._searchPossibleTargets(this._objects,r);return t[this.altSelectionKey]&&s&&n&&s!==n&&(s=n,this.targets=i),s}},_checkTarget:function(t,e,n){if(e&&e.visible&&e.evented&&this.containsPoint(null,e,t)){if(!this.perPixelTargetFind&&!e.perPixelTargetFind||e.isEditing)return!0;if(!this.isTargetTransparent(e,n.x,n.y))return!0}},_searchPossibleTargets:function(t,e){for(var n,i,r=t.length;r--;){var o=t[r],a=o.group&&"activeSelection"!==o.group.type?this._normalizePointer(o.group,e):e;if(this._checkTarget(a,o,e)){(n=t[r]).subTargetCheck&&n instanceof g.Group&&(i=this._searchPossibleTargets(n._objects,e))&&this.targets.push(i);break}}return n},restorePointerVpt:function(t){return g.util.transformPoint(t,g.util.invertTransform(this.viewportTransform))},getPointer:function(e,n){if(this._absolutePointer&&!n)return this._absolutePointer;if(this._pointer&&n)return this._pointer;var i,r=t(e),o=this.upperCanvasEl,a=o.getBoundingClientRect(),s=a.width||0,l=a.height||0;s&&l||("top"in a&&"bottom"in a&&(l=Math.abs(a.top-a.bottom)),"right"in a&&"left"in a&&(s=Math.abs(a.right-a.left))),this.calcOffset(),r.x=r.x-this._offset.left,r.y=r.y-this._offset.top,n||(r=this.restorePointerVpt(r));var c=this.getRetinaScaling();return 1!==c&&(r.x/=c,r.y/=c),{x:r.x*(i=0===s||0===l?{width:1,height:1}:{width:o.width/s,height:o.height/l}).width,y:r.y*i.height}},_createUpperCanvas:function(){var t=this.lowerCanvasEl.className.replace(/\s*lower-canvas\s*/,""),e=this.lowerCanvasEl,n=this.upperCanvasEl;n?n.className="":(n=this._createCanvasElement(),this.upperCanvasEl=n),g.util.addClass(n,"upper-canvas "+t),this.wrapperEl.appendChild(n),this._copyCanvasStyle(e,n),this._applyCanvasStyle(n),this.contextTop=n.getContext("2d")},_createCacheCanvas:function(){this.cacheCanvasEl=this._createCanvasElement(),this.cacheCanvasEl.setAttribute("width",this.width),this.cacheCanvasEl.setAttribute("height",this.height),this.contextCache=this.cacheCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=g.util.wrapElement(this.lowerCanvasEl,"div",{class:this.containerClass}),g.util.setStyle(this.wrapperEl,{width:this.width+"px",height:this.height+"px",position:"relative"}),g.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(t){var e=this.width||t.width,n=this.height||t.height;g.util.setStyle(t,{position:"absolute",width:e+"px",height:n+"px",left:0,top:0,"touch-action":this.allowTouchScrolling?"manipulation":"none","-ms-touch-action":this.allowTouchScrolling?"manipulation":"none"}),t.width=e,t.height=n,g.util.makeElementUnselectable(t)},_copyCanvasStyle:function(t,e){e.style.cssText=t.style.cssText},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},getActiveObject:function(){return this._activeObject},getActiveObjects:function(){var t=this._activeObject;return t?"activeSelection"===t.type&&t._objects?t._objects.slice(0):[t]:[]},_onObjectRemoved:function(t){t===this._activeObject&&(this.fire("before:selection:cleared",{target:t}),this._discardActiveObject(),this.fire("selection:cleared",{target:t}),t.fire("deselected")),t===this._hoveredTarget&&(this._hoveredTarget=null,this._hoveredTargets=[]),this.callSuper("_onObjectRemoved",t)},_fireSelectionEvents:function(t,e){var n=!1,i=this.getActiveObjects(),r=[],o=[],a={e:e};t.forEach((function(t){-1===i.indexOf(t)&&(n=!0,t.fire("deselected",a),o.push(t))})),i.forEach((function(e){-1===t.indexOf(e)&&(n=!0,e.fire("selected",a),r.push(e))})),t.length>0&&i.length>0?(a.selected=r,a.deselected=o,a.updated=r[0]||o[0],a.target=this._activeObject,n&&this.fire("selection:updated",a)):i.length>0?(1===i.length&&(a.target=r[0],this.fire("object:selected",a)),a.selected=r,a.target=this._activeObject,this.fire("selection:created",a)):t.length>0&&(a.deselected=o,this.fire("selection:cleared",a))},setActiveObject:function(t,e){var n=this.getActiveObjects();return this._setActiveObject(t,e),this._fireSelectionEvents(n,e),this},_setActiveObject:function(t,e){return this._activeObject!==t&&!!this._discardActiveObject(e,t)&&!t.onSelect({e:e})&&(this._activeObject=t,!0)},_discardActiveObject:function(t,e){var n=this._activeObject;if(n){if(n.onDeselect({e:t,object:e}))return!1;this._activeObject=null}return!0},discardActiveObject:function(t){var e=this.getActiveObjects(),n=this.getActiveObject();return e.length&&this.fire("before:selection:cleared",{target:n,e:t}),this._discardActiveObject(t),this._fireSelectionEvents(e,t),this},dispose:function(){var t=this.wrapperEl;return this.removeListeners(),t.removeChild(this.upperCanvasEl),t.removeChild(this.lowerCanvasEl),this.contextCache=null,this.contextTop=null,["upperCanvasEl","cacheCanvasEl"].forEach((function(t){g.util.cleanUpJsdomNode(this[t]),this[t]=void 0}).bind(this)),t.parentNode&&t.parentNode.replaceChild(this.lowerCanvasEl,this.wrapperEl),delete this.wrapperEl,g.StaticCanvas.prototype.dispose.call(this),this},clear:function(){return this.discardActiveObject(),this.clearContext(this.contextTop),this.callSuper("clear")},drawControls:function(t){var e=this._activeObject;e&&e._renderControls(t)},_toObject:function(t,e,n){var i=this._realizeGroupTransformOnObject(t),r=this.callSuper("_toObject",t,e,n);return this._unwindGroupTransformOnObject(t,i),r},_realizeGroupTransformOnObject:function(t){if(t.group&&"activeSelection"===t.group.type&&this._activeObject===t.group){var e={};return["angle","flipX","flipY","left","scaleX","scaleY","skewX","skewY","top"].forEach((function(n){e[n]=t[n]})),this._activeObject.realizeTransform(t),e}return null},_unwindGroupTransformOnObject:function(t,e){e&&t.set(e)},_setSVGObject:function(t,e,n){var i=this._realizeGroupTransformOnObject(e);this.callSuper("_setSVGObject",t,e,n),this._unwindGroupTransformOnObject(e,i)},setViewportTransform:function(t){this.renderOnAddRemove&&this._activeObject&&this._activeObject.isEditing&&this._activeObject.clearContextTop(),g.StaticCanvas.prototype.setViewportTransform.call(this,t)}}),g.StaticCanvas)"prototype"!==a&&(g.Canvas[a]=g.StaticCanvas[a])}(),function(){var t={mt:0,tr:1,mr:2,br:3,mb:4,bl:5,ml:6,tl:7},e=g.util.addListener,n=g.util.removeListener,i={passive:!1};function r(t,e){return t.button&&t.button===e-1}g.util.object.extend(g.Canvas.prototype,{cursorMap:["n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize","w-resize","nw-resize"],mainTouchId:null,_initEventListeners:function(){this.removeListeners(),this._bindEvents(),this.addOrRemove(e,"add")},_getEventPrefix:function(){return this.enablePointerEvents?"pointer":"mouse"},addOrRemove:function(t,e){var n=this.upperCanvasEl,r=this._getEventPrefix();t(g.window,"resize",this._onResize),t(n,r+"down",this._onMouseDown),t(n,r+"move",this._onMouseMove,i),t(n,r+"out",this._onMouseOut),t(n,r+"enter",this._onMouseEnter),t(n,"wheel",this._onMouseWheel),t(n,"contextmenu",this._onContextMenu),t(n,"dblclick",this._onDoubleClick),t(n,"dragover",this._onDragOver),t(n,"dragenter",this._onDragEnter),t(n,"dragleave",this._onDragLeave),t(n,"drop",this._onDrop),this.enablePointerEvents||t(n,"touchstart",this._onTouchStart,i),"undefined"!=typeof eventjs&&e in eventjs&&(eventjs[e](n,"gesture",this._onGesture),eventjs[e](n,"drag",this._onDrag),eventjs[e](n,"orientation",this._onOrientationChange),eventjs[e](n,"shake",this._onShake),eventjs[e](n,"longpress",this._onLongPress))},removeListeners:function(){this.addOrRemove(n,"remove");var t=this._getEventPrefix();n(g.document,t+"up",this._onMouseUp),n(g.document,"touchend",this._onTouchEnd,i),n(g.document,t+"move",this._onMouseMove,i),n(g.document,"touchmove",this._onMouseMove,i)},_bindEvents:function(){this.eventsBound||(this._onMouseDown=this._onMouseDown.bind(this),this._onTouchStart=this._onTouchStart.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onResize=this._onResize.bind(this),this._onGesture=this._onGesture.bind(this),this._onDrag=this._onDrag.bind(this),this._onShake=this._onShake.bind(this),this._onLongPress=this._onLongPress.bind(this),this._onOrientationChange=this._onOrientationChange.bind(this),this._onMouseWheel=this._onMouseWheel.bind(this),this._onMouseOut=this._onMouseOut.bind(this),this._onMouseEnter=this._onMouseEnter.bind(this),this._onContextMenu=this._onContextMenu.bind(this),this._onDoubleClick=this._onDoubleClick.bind(this),this._onDragOver=this._onDragOver.bind(this),this._onDragEnter=this._simpleEventHandler.bind(this,"dragenter"),this._onDragLeave=this._simpleEventHandler.bind(this,"dragleave"),this._onDrop=this._simpleEventHandler.bind(this,"drop"),this.eventsBound=!0)},_onGesture:function(t,e){this.__onTransformGesture&&this.__onTransformGesture(t,e)},_onDrag:function(t,e){this.__onDrag&&this.__onDrag(t,e)},_onMouseWheel:function(t){this.__onMouseWheel(t)},_onMouseOut:function(t){var e=this._hoveredTarget;this.fire("mouse:out",{target:e,e:t}),this._hoveredTarget=null,e&&e.fire("mouseout",{e:t});var n=this;this._hoveredTargets.forEach((function(i){n.fire("mouse:out",{target:e,e:t}),i&&e.fire("mouseout",{e:t})})),this._hoveredTargets=[],this._iTextInstances&&this._iTextInstances.forEach((function(t){t.isEditing&&t.hiddenTextarea.focus()}))},_onMouseEnter:function(t){this.currentTransform||this.findTarget(t)||(this.fire("mouse:over",{target:null,e:t}),this._hoveredTarget=null,this._hoveredTargets=[])},_onOrientationChange:function(t,e){this.__onOrientationChange&&this.__onOrientationChange(t,e)},_onShake:function(t,e){this.__onShake&&this.__onShake(t,e)},_onLongPress:function(t,e){this.__onLongPress&&this.__onLongPress(t,e)},_onDragOver:function(t){t.preventDefault();var e=this._simpleEventHandler("dragover",t);this._fireEnterLeaveEvents(e,t)},_onContextMenu:function(t){return this.stopContextMenu&&(t.stopPropagation(),t.preventDefault()),!1},_onDoubleClick:function(t){this._cacheTransformEventData(t),this._handleEvent(t,"dblclick"),this._resetTransformEventData(t)},getPointerId:function(t){var e=t.changedTouches;return e?e[0]&&e[0].identifier:this.enablePointerEvents?t.pointerId:-1},_isMainEvent:function(t){return!0===t.isPrimary||!1!==t.isPrimary&&("touchend"===t.type&&0===t.touches.length||!t.changedTouches||t.changedTouches[0].identifier===this.mainTouchId)},_onTouchStart:function(t){t.preventDefault(),null===this.mainTouchId&&(this.mainTouchId=this.getPointerId(t)),this.__onMouseDown(t),this._resetTransformEventData();var r=this.upperCanvasEl,o=this._getEventPrefix();e(g.document,"touchend",this._onTouchEnd,i),e(g.document,"touchmove",this._onMouseMove,i),n(r,o+"down",this._onMouseDown)},_onMouseDown:function(t){this.__onMouseDown(t),this._resetTransformEventData();var r=this.upperCanvasEl,o=this._getEventPrefix();n(r,o+"move",this._onMouseMove,i),e(g.document,o+"up",this._onMouseUp),e(g.document,o+"move",this._onMouseMove,i)},_onTouchEnd:function(t){if(!(t.touches.length>0)){this.__onMouseUp(t),this._resetTransformEventData(),this.mainTouchId=null;var r=this._getEventPrefix();n(g.document,"touchend",this._onTouchEnd,i),n(g.document,"touchmove",this._onMouseMove,i);var o=this;this._willAddMouseDown&&clearTimeout(this._willAddMouseDown),this._willAddMouseDown=setTimeout((function(){e(o.upperCanvasEl,r+"down",o._onMouseDown),o._willAddMouseDown=0}),400)}},_onMouseUp:function(t){this.__onMouseUp(t),this._resetTransformEventData();var r=this.upperCanvasEl,o=this._getEventPrefix();this._isMainEvent(t)&&(n(g.document,o+"up",this._onMouseUp),n(g.document,o+"move",this._onMouseMove,i),e(r,o+"move",this._onMouseMove,i))},_onMouseMove:function(t){!this.allowTouchScrolling&&t.preventDefault&&t.preventDefault(),this.__onMouseMove(t)},_onResize:function(){this.calcOffset()},_shouldRender:function(t){var e=this._activeObject;return!!(!!e!=!!t||e&&t&&e!==t)},__onMouseUp:function(t){var e,n=this._currentTransform,i=this._groupSelector,o=!1,a=!i||0===i.left&&0===i.top;if(this._cacheTransformEventData(t),e=this._target,this._handleEvent(t,"up:before"),!r(t,3))return r(t,2)?(this.fireMiddleClick&&this._handleEvent(t,"up",2,a),void this._resetTransformEventData()):void(this.isDrawingMode&&this._isCurrentlyDrawing?this._onMouseUpInDrawingMode(t):this._isMainEvent(t)&&(n&&(this._finalizeCurrentTransform(t),o=n.actionPerformed),a||(this._maybeGroupObjects(t),o||(o=this._shouldRender(e))),e&&(e.isMoving=!1),this._setCursorFromEvent(t,e),this._handleEvent(t,"up",1,a),this._groupSelector=null,this._currentTransform=null,e&&(e.__corner=0),o?this.requestRenderAll():a||this.renderTop()));this.fireRightClick&&this._handleEvent(t,"up",3,a)},_simpleEventHandler:function(t,e){var n=this.findTarget(e),i=this.targets,r={e:e,target:n,subTargets:i};if(this.fire(t,r),n&&n.fire(t,r),!i)return n;for(var o=0;o<i.length;o++)i[o].fire(t,r);return n},_handleEvent:function(t,e,n,i){var r=this._target,o=this.targets||[],a={e:t,target:r,subTargets:o,button:n||1,isClick:i||!1,pointer:this._pointer,absolutePointer:this._absolutePointer,transform:this._currentTransform};this.fire("mouse:"+e,a),r&&r.fire("mouse"+e,a);for(var s=0;s<o.length;s++)o[s].fire("mouse"+e,a)},_finalizeCurrentTransform:function(t){var e,n=this._currentTransform,i=n.target,r={e:t,target:i,transform:n};i._scaling&&(i._scaling=!1),i.setCoords(),(n.actionPerformed||this.stateful&&i.hasStateChanged())&&(n.actionPerformed&&(e=this._addEventOptions(r,n),this._fire(e,r)),this._fire("modified",r))},_addEventOptions:function(t,e){var n,i;switch(e.action){case"scaleX":n="scaled",i="x";break;case"scaleY":n="scaled",i="y";break;case"skewX":n="skewed",i="x";break;case"skewY":n="skewed",i="y";break;case"scale":n="scaled",i="equally";break;case"rotate":n="rotated";break;case"drag":n="moved"}return t.by=i,n},_onMouseDownInDrawingMode:function(t){this._isCurrentlyDrawing=!0,this.getActiveObject()&&this.discardActiveObject(t).requestRenderAll(),this.clipTo&&g.util.clipContext(this,this.contextTop);var e=this.getPointer(t);this.freeDrawingBrush.onMouseDown(e,{e:t,pointer:e}),this._handleEvent(t,"down")},_onMouseMoveInDrawingMode:function(t){if(this._isCurrentlyDrawing){var e=this.getPointer(t);this.freeDrawingBrush.onMouseMove(e,{e:t,pointer:e})}this.setCursor(this.freeDrawingCursor),this._handleEvent(t,"move")},_onMouseUpInDrawingMode:function(t){this.clipTo&&this.contextTop.restore();var e=this.getPointer(t);this._isCurrentlyDrawing=this.freeDrawingBrush.onMouseUp({e:t,pointer:e}),this._handleEvent(t,"up")},__onMouseDown:function(t){this._cacheTransformEventData(t),this._handleEvent(t,"down:before");var e=this._target;if(r(t,3))this.fireRightClick&&this._handleEvent(t,"down",3);else if(r(t,2))this.fireMiddleClick&&this._handleEvent(t,"down",2);else if(this.isDrawingMode)this._onMouseDownInDrawingMode(t);else if(this._isMainEvent(t)&&!this._currentTransform){var n=this._pointer;this._previousPointer=n;var i=this._shouldRender(e),o=this._shouldGroup(t,e);if(this._shouldClearSelection(t,e)?this.discardActiveObject(t):o&&(this._handleGrouping(t,e),e=this._activeObject),!this.selection||e&&(e.selectable||e.isEditing||e===this._activeObject)||(this._groupSelector={ex:n.x,ey:n.y,top:0,left:0}),e){var a=e===this._activeObject;e.selectable&&this.setActiveObject(e,t),e!==this._activeObject||!e.__corner&&o||this._setupCurrentTransform(t,e,a)}this._handleEvent(t,"down"),(i||o)&&this.requestRenderAll()}},_resetTransformEventData:function(){this._target=null,this._pointer=null,this._absolutePointer=null},_cacheTransformEventData:function(t){this._resetTransformEventData(),this._pointer=this.getPointer(t,!0),this._absolutePointer=this.restorePointerVpt(this._pointer),this._target=this._currentTransform?this._currentTransform.target:this.findTarget(t)||null},_beforeTransform:function(t){var e=this._currentTransform;this.stateful&&e.target.saveState(),this.fire("before:transform",{e:t,transform:e}),e.corner&&this.onBeforeScaleRotate(e.target)},__onMouseMove:function(t){var e,n;if(this._handleEvent(t,"move:before"),this._cacheTransformEventData(t),this.isDrawingMode)this._onMouseMoveInDrawingMode(t);else if(this._isMainEvent(t)){var i=this._groupSelector;i?(i.left=(n=this._pointer).x-i.ex,i.top=n.y-i.ey,this.renderTop()):this._currentTransform?this._transformObject(t):(e=this.findTarget(t)||null,this._setCursorFromEvent(t,e),this._fireOverOutEvents(e,t)),this._handleEvent(t,"move"),this._resetTransformEventData()}},_fireOverOutEvents:function(t,e){var n=this._hoveredTarget,i=this._hoveredTargets,r=this.targets,o=Math.max(i.length,r.length);this.fireSyntheticInOutEvents(t,e,{oldTarget:n,evtOut:"mouseout",canvasEvtOut:"mouse:out",evtIn:"mouseover",canvasEvtIn:"mouse:over"});for(var a=0;a<o;a++)this.fireSyntheticInOutEvents(r[a],e,{oldTarget:i[a],evtOut:"mouseout",evtIn:"mouseover"});this._hoveredTarget=t,this._hoveredTargets=this.targets.concat()},_fireEnterLeaveEvents:function(t,e){var n=this._draggedoverTarget,i=this._hoveredTargets,r=this.targets,o=Math.max(i.length,r.length);this.fireSyntheticInOutEvents(t,e,{oldTarget:n,evtOut:"dragleave",evtIn:"dragenter"});for(var a=0;a<o;a++)this.fireSyntheticInOutEvents(r[a],e,{oldTarget:i[a],evtOut:"dragleave",evtIn:"dragenter"});this._draggedoverTarget=t},fireSyntheticInOutEvents:function(t,e,n){var i,r,o,a=n.oldTarget,s=a!==t,l=n.canvasEvtIn,c=n.canvasEvtOut;s&&(i={e:e,target:t,previousTarget:a},r={e:e,target:a,nextTarget:t}),o=t&&s,a&&s&&(c&&this.fire(c,r),a.fire(n.evtOut,r)),o&&(l&&this.fire(l,i),t.fire(n.evtIn,i))},__onMouseWheel:function(t){this._cacheTransformEventData(t),this._handleEvent(t,"wheel"),this._resetTransformEventData()},_transformObject:function(t){var e=this.getPointer(t),n=this._currentTransform;n.reset=!1,n.target.isMoving=!0,n.shiftKey=t.shiftKey,n.altKey=t[this.centeredKey],this._beforeScaleTransform(t,n),this._performTransformAction(t,n,e),n.actionPerformed&&this.requestRenderAll()},_performTransformAction:function(t,e,n){var i=n.x,r=n.y,o=e.action,a=!1,s={target:e.target,e:t,transform:e,pointer:n};"rotate"===o?(a=this._rotateObject(i,r))&&this._fire("rotating",s):"scale"===o?(a=this._onScale(t,e,i,r))&&this._fire("scaling",s):"scaleX"===o?(a=this._scaleObject(i,r,"x"))&&this._fire("scaling",s):"scaleY"===o?(a=this._scaleObject(i,r,"y"))&&this._fire("scaling",s):"skewX"===o?(a=this._skewObject(i,r,"x"))&&this._fire("skewing",s):"skewY"===o?(a=this._skewObject(i,r,"y"))&&this._fire("skewing",s):(a=this._translateObject(i,r))&&(this._fire("moving",s),this.setCursor(s.target.moveCursor||this.moveCursor)),e.actionPerformed=e.actionPerformed||a},_fire:function(t,e){this.fire("object:"+t,e),e.target.fire(t,e)},_beforeScaleTransform:function(t,e){if("scale"===e.action||"scaleX"===e.action||"scaleY"===e.action){var n=this._shouldCenterTransform(e.target);(n&&("center"!==e.originX||"center"!==e.originY)||!n&&"center"===e.originX&&"center"===e.originY)&&(this._resetCurrentTransform(),e.reset=!0)}},_onScale:function(t,e,n,i){return this._isUniscalePossible(t,e.target)?(e.currentAction="scale",this._scaleObject(n,i)):(e.reset||"scale"!==e.currentAction||this._resetCurrentTransform(),e.currentAction="scaleEqually",this._scaleObject(n,i,"equally"))},_isUniscalePossible:function(t,e){return(t[this.uniScaleKey]||this.uniScaleTransform)&&!e.get("lockUniScaling")},_setCursorFromEvent:function(t,e){if(!e)return this.setCursor(this.defaultCursor),!1;var n=e.hoverCursor||this.hoverCursor,i=this._activeObject&&"activeSelection"===this._activeObject.type?this._activeObject:null,r=(!i||!i.contains(e))&&e._findTargetCorner(this.getPointer(t,!0));r?this.setCursor(this.getCornerCursor(r,e,t)):(e.subTargetCheck&&this.targets.concat().reverse().map((function(t){n=t.hoverCursor||n})),this.setCursor(n))},getCornerCursor:function(e,n,i){return this.actionIsDisabled(e,n,i)?this.notAllowedCursor:e in t?this._getRotatedCornerCursor(e,n,i):"mtr"===e&&n.hasRotatingPoint?this.rotationCursor:this.defaultCursor},actionIsDisabled:function(t,e,n){return"mt"===t||"mb"===t?n[this.altActionKey]?e.lockSkewingX:e.lockScalingY:"ml"===t||"mr"===t?n[this.altActionKey]?e.lockSkewingY:e.lockScalingX:"mtr"===t?e.lockRotation:this._isUniscalePossible(n,e)?e.lockScalingX&&e.lockScalingY:e.lockScalingX||e.lockScalingY},_getRotatedCornerCursor:function(e,n,i){var r=Math.round(n.angle%360/45);return r<0&&(r+=8),r+=t[e],i[this.altActionKey]&&t[e]%2==0&&(r+=2),this.cursorMap[r%=8]}})}(),l=Math.min,c=Math.max,g.util.object.extend(g.Canvas.prototype,{_shouldGroup:function(t,e){var n=this._activeObject;return n&&this._isSelectionKeyPressed(t)&&e&&e.selectable&&this.selection&&(n!==e||"activeSelection"===n.type)&&!e.onSelect({e:t})},_handleGrouping:function(t,e){var n=this._activeObject;n.__corner||(e!==n||(e=this.findTarget(t,!0))&&e.selectable)&&(n&&"activeSelection"===n.type?this._updateActiveSelection(e,t):this._createActiveSelection(e,t))},_updateActiveSelection:function(t,e){var n=this._activeObject,i=n._objects.slice(0);n.contains(t)?(n.removeWithUpdate(t),this._hoveredTarget=t,this._hoveredTargets=this.targets.concat(),1===n.size()&&this._setActiveObject(n.item(0),e)):(n.addWithUpdate(t),this._hoveredTarget=n,this._hoveredTargets=this.targets.concat()),this._fireSelectionEvents(i,e)},_createActiveSelection:function(t,e){var n=this.getActiveObjects(),i=this._createGroup(t);this._hoveredTarget=i,this._setActiveObject(i,e),this._fireSelectionEvents(n,e)},_createGroup:function(t){var e=this._objects,n=e.indexOf(this._activeObject)<e.indexOf(t)?[this._activeObject,t]:[t,this._activeObject];return this._activeObject.isEditing&&this._activeObject.exitEditing(),new g.ActiveSelection(n,{canvas:this})},_groupSelectedObjects:function(t){var e,n=this._collectObjects(t);1===n.length?this.setActiveObject(n[0],t):n.length>1&&(e=new g.ActiveSelection(n.reverse(),{canvas:this}),this.setActiveObject(e,t))},_collectObjects:function(t){for(var e,n=[],i=this._groupSelector.ex,r=this._groupSelector.ey,o=i+this._groupSelector.left,a=r+this._groupSelector.top,s=new g.Point(l(i,o),l(r,a)),u=new g.Point(c(i,o),c(r,a)),h=!this.selectionFullyContained,f=i===o&&r===a,d=this._objects.length;d--&&!((e=this._objects[d])&&e.selectable&&e.visible&&(h&&e.intersectsWithRect(s,u)||e.isContainedWithinRect(s,u)||h&&e.containsPoint(s)||h&&e.containsPoint(u))&&(n.push(e),f)););return n.length>1&&(n=n.filter((function(e){return!e.onSelect({e:t})}))),n},_maybeGroupObjects:function(t){this.selection&&this._groupSelector&&this._groupSelectedObjects(t),this.setCursor(this.defaultCursor),this._groupSelector=null}}),g.util.object.extend(g.StaticCanvas.prototype,{toDataURL:function(t){t||(t={});var e=t.format||"png",n=t.quality||1,i=(t.multiplier||1)*(t.enableRetinaScaling?this.getRetinaScaling():1),r=this.toCanvasElement(i,t);return g.util.toDataURL(r,e,n)},toCanvasElement:function(t,e){var n=((e=e||{}).width||this.width)*(t=t||1),i=(e.height||this.height)*t,r=this.getZoom(),o=this.width,a=this.height,s=r*t,l=this.viewportTransform,c=this.interactive,u=[s,0,0,s,(l[4]-(e.left||0))*t,(l[5]-(e.top||0))*t],h=this.enableRetinaScaling,f=g.util.createCanvasElement(),d=this.contextTop;return f.width=n,f.height=i,this.contextTop=null,this.enableRetinaScaling=!1,this.interactive=!1,this.viewportTransform=u,this.width=n,this.height=i,this.calcViewportBoundaries(),this.renderCanvas(f.getContext("2d"),this._objects),this.viewportTransform=l,this.width=o,this.height=a,this.calcViewportBoundaries(),this.interactive=c,this.enableRetinaScaling=h,this.contextTop=d,f}}),g.util.object.extend(g.StaticCanvas.prototype,{loadFromDatalessJSON:function(t,e,n){return this.loadFromJSON(t,e,n)},loadFromJSON:function(t,e,n){if(t){var i="string"==typeof t?JSON.parse(t):g.util.object.clone(t),r=this,o=i.clipPath,a=this.renderOnAddRemove;return this.renderOnAddRemove=!1,delete i.clipPath,this._enlivenObjects(i.objects,(function(t){r.clear(),r._setBgOverlay(i,(function(){o?r._enlivenObjects([o],(function(n){r.clipPath=n[0],r.__setupCanvas.call(r,i,t,a,e)})):r.__setupCanvas.call(r,i,t,a,e)}))}),n),this}},__setupCanvas:function(t,e,n,i){var r=this;e.forEach((function(t,e){r.insertAt(t,e)})),this.renderOnAddRemove=n,delete t.objects,delete t.backgroundImage,delete t.overlayImage,delete t.background,delete t.overlay,this._setOptions(t),this.renderAll(),i&&i()},_setBgOverlay:function(t,e){var n={backgroundColor:!1,overlayColor:!1,backgroundImage:!1,overlayImage:!1};if(t.backgroundImage||t.overlayImage||t.background||t.overlay){var i=function(){n.backgroundImage&&n.overlayImage&&n.backgroundColor&&n.overlayColor&&e&&e()};this.__setBgOverlay("backgroundImage",t.backgroundImage,n,i),this.__setBgOverlay("overlayImage",t.overlayImage,n,i),this.__setBgOverlay("backgroundColor",t.background,n,i),this.__setBgOverlay("overlayColor",t.overlay,n,i)}else e&&e()},__setBgOverlay:function(t,e,n,i){var r=this;if(!e)return n[t]=!0,void(i&&i());"backgroundImage"===t||"overlayImage"===t?g.util.enlivenObjects([e],(function(e){r[t]=e[0],n[t]=!0,i&&i()})):this["set"+g.util.string.capitalize(t,!0)](e,(function(){n[t]=!0,i&&i()}))},_enlivenObjects:function(t,e,n){t&&0!==t.length?g.util.enlivenObjects(t,(function(t){e&&e(t)}),null,n):e&&e([])},_toDataURL:function(t,e){this.clone((function(n){e(n.toDataURL(t))}))},_toDataURLWithMultiplier:function(t,e,n){this.clone((function(i){n(i.toDataURLWithMultiplier(t,e))}))},clone:function(t,e){var n=JSON.stringify(this.toJSON(e));this.cloneWithoutData((function(e){e.loadFromJSON(n,(function(){t&&t(e)}))}))},cloneWithoutData:function(t){var e=g.util.createCanvasElement();e.width=this.width,e.height=this.height;var n=new g.Canvas(e);n.clipTo=this.clipTo,this.backgroundImage?(n.setBackgroundImage(this.backgroundImage.src,(function(){n.renderAll(),t&&t(n)})),n.backgroundImageOpacity=this.backgroundImageOpacity,n.backgroundImageStretch=this.backgroundImageStretch):t&&t(n)}}),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.util.object.clone,r=e.util.toFixed,o=e.util.string.capitalize,a=e.util.degreesToRadians,s=e.StaticCanvas.supports("setLineDash");e.Object||(e.Object=e.util.createClass(e.CommonMethods,{type:"object",originX:"left",originY:"top",top:0,left:0,width:0,height:0,scaleX:1,scaleY:1,flipX:!1,flipY:!1,opacity:1,angle:0,skewX:0,skewY:0,cornerSize:13,transparentCorners:!0,hoverCursor:null,moveCursor:null,padding:0,borderColor:"rgba(102,153,255,0.75)",borderDashArray:null,cornerColor:"rgba(102,153,255,0.5)",cornerStrokeColor:null,cornerStyle:"rect",cornerDashArray:null,centeredScaling:!1,centeredRotation:!0,fill:"rgb(0,0,0)",fillRule:"nonzero",globalCompositeOperation:"source-over",backgroundColor:"",selectionBackgroundColor:"",stroke:null,strokeWidth:1,strokeDashArray:null,strokeDashOffset:0,strokeLineCap:"butt",strokeLineJoin:"miter",strokeMiterLimit:4,shadow:null,borderOpacityWhenMoving:.4,borderScaleFactor:1,transformMatrix:null,minScaleLimit:0,selectable:!0,evented:!0,visible:!0,hasControls:!0,hasBorders:!0,hasRotatingPoint:!0,rotatingPointOffset:40,perPixelTargetFind:!1,includeDefaultValues:!0,clipTo:null,lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingX:!1,lockScalingY:!1,lockUniScaling:!1,lockSkewingX:!1,lockSkewingY:!1,lockScalingFlip:!1,excludeFromExport:!1,objectCaching:!e.isLikelyNode,statefullCache:!1,noScaleCache:!0,strokeUniform:!1,dirty:!0,__corner:0,paintFirst:"fill",stateProperties:"top left width height scaleX scaleY flipX flipY originX originY transformMatrix stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit angle opacity fill globalCompositeOperation shadow clipTo visible backgroundColor skewX skewY fillRule paintFirst clipPath strokeUniform".split(" "),cacheProperties:"fill stroke strokeWidth strokeDashArray width height paintFirst strokeUniform strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit backgroundColor clipPath".split(" "),clipPath:void 0,inverted:!1,absolutePositioned:!1,initialize:function(t){t&&this.setOptions(t)},_createCacheCanvas:function(){this._cacheProperties={},this._cacheCanvas=e.util.createCanvasElement(),this._cacheContext=this._cacheCanvas.getContext("2d"),this._updateCacheCanvas(),this.dirty=!0},_limitCacheSize:function(t){var n=e.perfLimitSizeTotal,i=t.width,r=t.height,o=e.maxCacheSideLimit,a=e.minCacheSideLimit;if(i<=o&&r<=o&&i*r<=n)return i<a&&(t.width=a),r<a&&(t.height=a),t;var s=e.util.limitDimsByArea(i/r,n),l=e.util.capValue,c=l(a,s.x,o),u=l(a,s.y,o);return i>c&&(t.zoomX/=i/c,t.width=c,t.capped=!0),r>u&&(t.zoomY/=r/u,t.height=u,t.capped=!0),t},_getCacheCanvasDimensions:function(){var t=this.getTotalObjectScaling(),e=this._getTransformedDimensions(0,0),n=e.x*t.scaleX/this.scaleX,i=e.y*t.scaleY/this.scaleY;return{width:n+2,height:i+2,zoomX:t.scaleX,zoomY:t.scaleY,x:n,y:i}},_updateCacheCanvas:function(){var t=this.canvas;if(this.noScaleCache&&t&&t._currentTransform){var n=t._currentTransform.action;if(this===t._currentTransform.target&&n.slice&&"scale"===n.slice(0,5))return!1}var i,r,o=this._cacheCanvas,a=this._limitCacheSize(this._getCacheCanvasDimensions()),s=e.minCacheSideLimit,l=a.width,c=a.height,u=a.zoomX,h=a.zoomY,f=l!==this.cacheWidth||c!==this.cacheHeight,d=0,p=0,v=!1;if(f){var g=this._cacheCanvas.width,m=this._cacheCanvas.height,y=l>g||c>m;v=y||(l<.9*g||c<.9*m)&&g>s&&m>s,y&&!a.capped&&(l>s||c>s)&&(d=.1*l,p=.1*c)}return!(!f&&this.zoomX===u&&this.zoomY===h||(v?(o.width=Math.ceil(l+d),o.height=Math.ceil(c+p)):(this._cacheContext.setTransform(1,0,0,1,0,0),this._cacheContext.clearRect(0,0,o.width,o.height)),i=a.x/2,r=a.y/2,this.cacheTranslationX=Math.round(o.width/2-i)+i,this.cacheTranslationY=Math.round(o.height/2-r)+r,this.cacheWidth=l,this.cacheHeight=c,this._cacheContext.translate(this.cacheTranslationX,this.cacheTranslationY),this._cacheContext.scale(u,h),this.zoomX=u,this.zoomY=h,0))},setOptions:function(t){this._setOptions(t),this._initGradient(t.fill,"fill"),this._initGradient(t.stroke,"stroke"),this._initClipping(t),this._initPattern(t.fill,"fill"),this._initPattern(t.stroke,"stroke")},transform:function(t){var e;e=this.group&&!this.group._transformDone?this.calcTransformMatrix():this.calcOwnMatrix(),t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},toObject:function(t){var n=e.Object.NUM_FRACTION_DIGITS,i={type:this.type,version:e.version,originX:this.originX,originY:this.originY,left:r(this.left,n),top:r(this.top,n),width:r(this.width,n),height:r(this.height,n),fill:this.fill&&this.fill.toObject?this.fill.toObject():this.fill,stroke:this.stroke&&this.stroke.toObject?this.stroke.toObject():this.stroke,strokeWidth:r(this.strokeWidth,n),strokeDashArray:this.strokeDashArray?this.strokeDashArray.concat():this.strokeDashArray,strokeLineCap:this.strokeLineCap,strokeDashOffset:this.strokeDashOffset,strokeLineJoin:this.strokeLineJoin,strokeMiterLimit:r(this.strokeMiterLimit,n),scaleX:r(this.scaleX,n),scaleY:r(this.scaleY,n),angle:r(this.angle,n),flipX:this.flipX,flipY:this.flipY,opacity:r(this.opacity,n),shadow:this.shadow&&this.shadow.toObject?this.shadow.toObject():this.shadow,visible:this.visible,clipTo:this.clipTo&&String(this.clipTo),backgroundColor:this.backgroundColor,fillRule:this.fillRule,paintFirst:this.paintFirst,globalCompositeOperation:this.globalCompositeOperation,transformMatrix:this.transformMatrix?this.transformMatrix.concat():null,skewX:r(this.skewX,n),skewY:r(this.skewY,n)};return this.clipPath&&(i.clipPath=this.clipPath.toObject(t),i.clipPath.inverted=this.clipPath.inverted,i.clipPath.absolutePositioned=this.clipPath.absolutePositioned),e.util.populateWithProperties(this,i,t),this.includeDefaultValues||(i=this._removeDefaultValues(i)),i},toDatalessObject:function(t){return this.toObject(t)},_removeDefaultValues:function(t){var n=e.util.getKlass(t.type).prototype;return n.stateProperties.forEach((function(e){"left"!==e&&"top"!==e&&(t[e]===n[e]&&delete t[e],"[object Array]"===Object.prototype.toString.call(t[e])&&"[object Array]"===Object.prototype.toString.call(n[e])&&0===t[e].length&&0===n[e].length&&delete t[e])})),t},toString:function(){return"#<fabric."+o(this.type)+">"},getObjectScaling:function(){var t=e.util.qrDecompose(this.calcTransformMatrix());return{scaleX:Math.abs(t.scaleX),scaleY:Math.abs(t.scaleY)}},getTotalObjectScaling:function(){var t=this.getObjectScaling(),e=t.scaleX,n=t.scaleY;if(this.canvas){var i=this.canvas.getZoom(),r=this.canvas.getRetinaScaling();e*=i*r,n*=i*r}return{scaleX:e,scaleY:n}},getObjectOpacity:function(){var t=this.opacity;return this.group&&(t*=this.group.getObjectOpacity()),t},_set:function(t,n){var i=this[t]!==n,r=!1;return("scaleX"===t||"scaleY"===t)&&(n=this._constrainScale(n)),"scaleX"===t&&n<0?(this.flipX=!this.flipX,n*=-1):"scaleY"===t&&n<0?(this.flipY=!this.flipY,n*=-1):"shadow"!==t||!n||n instanceof e.Shadow?"dirty"===t&&this.group&&this.group.set("dirty",n):n=new e.Shadow(n),this[t]=n,i&&(r=this.group&&this.group.isOnACache(),this.cacheProperties.indexOf(t)>-1?(this.dirty=!0,r&&this.group.set("dirty",!0)):r&&this.stateProperties.indexOf(t)>-1&&this.group.set("dirty",!0)),this},setOnGroup:function(){},getViewportTransform:function(){return this.canvas&&this.canvas.viewportTransform?this.canvas.viewportTransform:e.iMatrix.concat()},isNotVisible:function(){return 0===this.opacity||0===this.width&&0===this.height&&0===this.strokeWidth||!this.visible},render:function(t){this.isNotVisible()||this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(t.save(),this._setupCompositeOperation(t),this.drawSelectionBackground(t),this.transform(t),this._setOpacity(t),this._setShadow(t,this),this.transformMatrix&&t.transform.apply(t,this.transformMatrix),this.clipTo&&e.util.clipContext(this,t),this.shouldCache()?(this.renderCache(),this.drawCacheOnCanvas(t)):(this._removeCacheCanvas(),this.dirty=!1,this.drawObject(t),this.objectCaching&&this.statefullCache&&this.saveState({propertySet:"cacheProperties"})),this.clipTo&&t.restore(),t.restore())},renderCache:function(t){t=t||{},this._cacheCanvas||this._createCacheCanvas(),this.isCacheDirty()&&(this.statefullCache&&this.saveState({propertySet:"cacheProperties"}),this.drawObject(this._cacheContext,t.forClipping),this.dirty=!1)},_removeCacheCanvas:function(){this._cacheCanvas=null,this.cacheWidth=0,this.cacheHeight=0},hasStroke:function(){return this.stroke&&"transparent"!==this.stroke&&0!==this.strokeWidth},hasFill:function(){return this.fill&&"transparent"!==this.fill},needsItsOwnCache:function(){return!("stroke"!==this.paintFirst||!this.hasFill()||!this.hasStroke()||"object"!=typeof this.shadow)||!!this.clipPath},shouldCache:function(){return this.ownCaching=this.needsItsOwnCache()||this.objectCaching&&(!this.group||!this.group.isOnACache()),this.ownCaching},willDrawShadow:function(){return!!this.shadow&&(0!==this.shadow.offsetX||0!==this.shadow.offsetY)},drawClipPathOnCache:function(t){var n=this.clipPath;if(t.save(),t.globalCompositeOperation=n.inverted?"destination-out":"destination-in",n.absolutePositioned){var i=e.util.invertTransform(this.calcTransformMatrix());t.transform(i[0],i[1],i[2],i[3],i[4],i[5])}n.transform(t),t.scale(1/n.zoomX,1/n.zoomY),t.drawImage(n._cacheCanvas,-n.cacheTranslationX,-n.cacheTranslationY),t.restore()},drawObject:function(t,e){var n=this.fill,i=this.stroke;e?(this.fill="black",this.stroke="",this._setClippingProperties(t)):(this._renderBackground(t),this._setStrokeStyles(t,this),this._setFillStyles(t,this)),this._render(t),this._drawClipPath(t),this.fill=n,this.stroke=i},_drawClipPath:function(t){var e=this.clipPath;e&&(e.canvas=this.canvas,e.shouldCache(),e._transformDone=!0,e.renderCache({forClipping:!0}),this.drawClipPathOnCache(t))},drawCacheOnCanvas:function(t){t.scale(1/this.zoomX,1/this.zoomY),t.drawImage(this._cacheCanvas,-this.cacheTranslationX,-this.cacheTranslationY)},isCacheDirty:function(t){if(this.isNotVisible())return!1;if(this._cacheCanvas&&!t&&this._updateCacheCanvas())return!0;if(this.dirty||this.clipPath&&this.clipPath.absolutePositioned||this.statefullCache&&this.hasStateChanged("cacheProperties")){if(this._cacheCanvas&&!t){var e=this.cacheWidth/this.zoomX,n=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-e/2,-n/2,e,n)}return!0}return!1},_renderBackground:function(t){if(this.backgroundColor){var e=this._getNonTransformedDimensions();t.fillStyle=this.backgroundColor,t.fillRect(-e.x/2,-e.y/2,e.x,e.y),this._removeShadow(t)}},_setOpacity:function(t){this.group&&!this.group._transformDone?t.globalAlpha=this.getObjectOpacity():t.globalAlpha*=this.opacity},_setStrokeStyles:function(t,e){e.stroke&&(t.lineWidth=e.strokeWidth,t.lineCap=e.strokeLineCap,t.lineDashOffset=e.strokeDashOffset,t.lineJoin=e.strokeLineJoin,t.miterLimit=e.strokeMiterLimit,t.strokeStyle=e.stroke.toLive?e.stroke.toLive(t,this):e.stroke)},_setFillStyles:function(t,e){e.fill&&(t.fillStyle=e.fill.toLive?e.fill.toLive(t,this):e.fill)},_setClippingProperties:function(t){t.globalAlpha=1,t.strokeStyle="transparent",t.fillStyle="#000000"},_setLineDash:function(t,e,n){e&&0!==e.length&&(1&e.length&&e.push.apply(e,e),s?t.setLineDash(e):n&&n(t))},_renderControls:function(t,n){var i,r,o,s=this.getViewportTransform(),l=this.calcTransformMatrix();r=void 0!==(n=n||{}).hasBorders?n.hasBorders:this.hasBorders,o=void 0!==n.hasControls?n.hasControls:this.hasControls,l=e.util.multiplyTransformMatrices(s,l),i=e.util.qrDecompose(l),t.save(),t.translate(i.translateX,i.translateY),t.lineWidth=1*this.borderScaleFactor,this.group||(t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1),n.forActiveSelection?(t.rotate(a(i.angle)),r&&this.drawBordersInGroup(t,i,n)):(t.rotate(a(this.angle)),r&&this.drawBorders(t,n)),o&&this.drawControls(t,n),t.restore()},_setShadow:function(t){if(this.shadow){var n,i=this.shadow,r=this.canvas,o=r&&r.viewportTransform[0]||1,a=r&&r.viewportTransform[3]||1;n=i.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),r&&r._isRetinaScaling()&&(o*=e.devicePixelRatio,a*=e.devicePixelRatio),t.shadowColor=i.color,t.shadowBlur=i.blur*e.browserShadowBlurConstant*(o+a)*(n.scaleX+n.scaleY)/4,t.shadowOffsetX=i.offsetX*o*n.scaleX,t.shadowOffsetY=i.offsetY*a*n.scaleY}},_removeShadow:function(t){this.shadow&&(t.shadowColor="",t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0)},_applyPatternGradientTransform:function(t,e){if(!e||!e.toLive)return{offsetX:0,offsetY:0};var n=e.gradientTransform||e.patternTransform,i=-this.width/2+e.offsetX||0,r=-this.height/2+e.offsetY||0;return"percentage"===e.gradientUnits?t.transform(this.width,0,0,this.height,i,r):t.transform(1,0,0,1,i,r),n&&t.transform(n[0],n[1],n[2],n[3],n[4],n[5]),{offsetX:i,offsetY:r}},_renderPaintInOrder:function(t){"stroke"===this.paintFirst?(this._renderStroke(t),this._renderFill(t)):(this._renderFill(t),this._renderStroke(t))},_render:function(){},_renderFill:function(t){this.fill&&(t.save(),this._applyPatternGradientTransform(t,this.fill),"evenodd"===this.fillRule?t.fill("evenodd"):t.fill(),t.restore())},_renderStroke:function(t){if(this.stroke&&0!==this.strokeWidth){if(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this.strokeUniform&&this.group){var e=this.getObjectScaling();t.scale(1/e.scaleX,1/e.scaleY)}else this.strokeUniform&&t.scale(1/this.scaleX,1/this.scaleY);this._setLineDash(t,this.strokeDashArray,this._renderDashedStroke),this.stroke.toLive&&"percentage"===this.stroke.gradientUnits?this._applyPatternForTransformedGradient(t,this.stroke):this._applyPatternGradientTransform(t,this.stroke),t.stroke(),t.restore()}},_applyPatternForTransformedGradient:function(t,n){var i,r=this._limitCacheSize(this._getCacheCanvasDimensions()),o=e.util.createCanvasElement(),a=this.canvas.getRetinaScaling(),s=r.x/this.scaleX/a,l=r.y/this.scaleY/a;o.width=s,o.height=l,(i=o.getContext("2d")).beginPath(),i.moveTo(0,0),i.lineTo(s,0),i.lineTo(s,l),i.lineTo(0,l),i.closePath(),i.translate(s/2,l/2),i.scale(r.zoomX/this.scaleX/a,r.zoomY/this.scaleY/a),this._applyPatternGradientTransform(i,n),i.fillStyle=n.toLive(t),i.fill(),t.translate(-this.width/2-this.strokeWidth/2,-this.height/2-this.strokeWidth/2),t.scale(a*this.scaleX/r.zoomX,a*this.scaleY/r.zoomY),t.strokeStyle=i.createPattern(o,"no-repeat")},_findCenterFromElement:function(){return{x:this.left+this.width/2,y:this.top+this.height/2}},_assignTransformMatrixProps:function(){if(this.transformMatrix){var t=e.util.qrDecompose(this.transformMatrix);this.flipX=!1,this.flipY=!1,this.set("scaleX",t.scaleX),this.set("scaleY",t.scaleY),this.angle=t.angle,this.skewX=t.skewX,this.skewY=0}},_removeTransformMatrix:function(t){var n=this._findCenterFromElement();this.transformMatrix&&(this._assignTransformMatrixProps(),n=e.util.transformPoint(n,this.transformMatrix)),this.transformMatrix=null,t&&(this.scaleX*=t.scaleX,this.scaleY*=t.scaleY,this.cropX=t.cropX,this.cropY=t.cropY,n.x+=t.offsetLeft,n.y+=t.offsetTop,this.width=t.width,this.height=t.height),this.setPositionByOrigin(n,"center","center")},clone:function(t,n){var i=this.toObject(n);this.constructor.fromObject?this.constructor.fromObject(i,t):e.Object._fromObject("Object",i,t)},cloneAsImage:function(t,n){var i=this.toCanvasElement(n);return t&&t(new e.Image(i)),this},toCanvasElement:function(t){t||(t={});var n=e.util,i=n.saveObjectTransform(this),r=this.group,o=this.shadow,a=Math.abs,s=(t.multiplier||1)*(t.enableRetinaScaling?e.devicePixelRatio:1);delete this.group,t.withoutTransform&&n.resetObjectTransform(this),t.withoutShadow&&(this.shadow=null);var l,c,u,h=e.util.createCanvasElement(),f=this.getBoundingRect(!0,!0),d=this.shadow,p={x:0,y:0};d&&(c=d.blur,l=d.nonScaling?{scaleX:1,scaleY:1}:this.getObjectScaling(),p.x=2*Math.round(a(d.offsetX)+c)*a(l.scaleX),p.y=2*Math.round(a(d.offsetY)+c)*a(l.scaleY)),u=f.height+p.y,h.width=Math.ceil(f.width+p.x),h.height=Math.ceil(u);var v=new e.StaticCanvas(h,{enableRetinaScaling:!1,renderOnAddRemove:!1,skipOffscreen:!1});"jpeg"===t.format&&(v.backgroundColor="#fff"),this.setPositionByOrigin(new e.Point(v.width/2,v.height/2),"center","center");var g=this.canvas;v.add(this);var m=v.toCanvasElement(s||1,t);return this.shadow=o,this.set("canvas",g),r&&(this.group=r),this.set(i).setCoords(),v._objects=[],v.dispose(),v=null,m},toDataURL:function(t){return t||(t={}),e.util.toDataURL(this.toCanvasElement(t),t.format||"png",t.quality||1)},isType:function(t){return this.type===t},complexity:function(){return 1},toJSON:function(t){return this.toObject(t)},setGradient:function(t,n){n||(n={});var i={colorStops:[]};return i.type=n.type||(n.r1||n.r2?"radial":"linear"),i.coords={x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2},i.gradientUnits=n.gradientUnits||"pixels",(n.r1||n.r2)&&(i.coords.r1=n.r1,i.coords.r2=n.r2),i.gradientTransform=n.gradientTransform,e.Gradient.prototype.addColorStop.call(i,n.colorStops),this.set(t,e.Gradient.forObject(this,i))},setPatternFill:function(t,n){return this.set("fill",new e.Pattern(t,n))},setShadow:function(t){return this.set("shadow",t?new e.Shadow(t):null)},setColor:function(t){return this.set("fill",t),this},rotate:function(t){var e=("center"!==this.originX||"center"!==this.originY)&&this.centeredRotation;return e&&this._setOriginToCenter(),this.set("angle",t),e&&this._resetOrigin(),this},centerH:function(){return this.canvas&&this.canvas.centerObjectH(this),this},viewportCenterH:function(){return this.canvas&&this.canvas.viewportCenterObjectH(this),this},centerV:function(){return this.canvas&&this.canvas.centerObjectV(this),this},viewportCenterV:function(){return this.canvas&&this.canvas.viewportCenterObjectV(this),this},center:function(){return this.canvas&&this.canvas.centerObject(this),this},viewportCenter:function(){return this.canvas&&this.canvas.viewportCenterObject(this),this},getLocalPointer:function(t,n){n=n||this.canvas.getPointer(t);var i=new e.Point(n.x,n.y),r=this._getLeftTopCoords();return this.angle&&(i=e.util.rotatePoint(i,r,a(-this.angle))),{x:i.x-r.x,y:i.y-r.y}},_setupCompositeOperation:function(t){this.globalCompositeOperation&&(t.globalCompositeOperation=this.globalCompositeOperation)}}),e.util.createAccessors&&e.util.createAccessors(e.Object),n(e.Object.prototype,e.Observable),e.Object.NUM_FRACTION_DIGITS=2,e.Object._fromObject=function(t,n,r,o){var a=e[t];n=i(n,!0),e.util.enlivenPatterns([n.fill,n.stroke],(function(t){void 0!==t[0]&&(n.fill=t[0]),void 0!==t[1]&&(n.stroke=t[1]),e.util.enlivenObjects([n.clipPath],(function(t){n.clipPath=t[0];var e=o?new a(n[o],n):new a(n);r&&r(e)}))}))},e.Object.__uid=0)}(e),u=g.util.degreesToRadians,h={left:-.5,center:0,right:.5},f={top:-.5,center:0,bottom:.5},g.util.object.extend(g.Object.prototype,{translateToGivenOrigin:function(t,e,n,i,r){var o,a,s,l=t.x,c=t.y;return"string"==typeof e?e=h[e]:e-=.5,"string"==typeof i?i=h[i]:i-=.5,"string"==typeof n?n=f[n]:n-=.5,"string"==typeof r?r=f[r]:r-=.5,a=r-n,((o=i-e)||a)&&(s=this._getTransformedDimensions(),l=t.x+o*s.x,c=t.y+a*s.y),new g.Point(l,c)},translateToCenterPoint:function(t,e,n){var i=this.translateToGivenOrigin(t,e,n,"center","center");return this.angle?g.util.rotatePoint(i,t,u(this.angle)):i},translateToOriginPoint:function(t,e,n){var i=this.translateToGivenOrigin(t,"center","center",e,n);return this.angle?g.util.rotatePoint(i,t,u(this.angle)):i},getCenterPoint:function(){var t=new g.Point(this.left,this.top);return this.translateToCenterPoint(t,this.originX,this.originY)},getPointByOrigin:function(t,e){var n=this.getCenterPoint();return this.translateToOriginPoint(n,t,e)},toLocalPoint:function(t,e,n){var i,r,o=this.getCenterPoint();return i=void 0!==e&&void 0!==n?this.translateToGivenOrigin(o,"center","center",e,n):new g.Point(this.left,this.top),r=new g.Point(t.x,t.y),this.angle&&(r=g.util.rotatePoint(r,o,-u(this.angle))),r.subtractEquals(i)},setPositionByOrigin:function(t,e,n){var i=this.translateToCenterPoint(t,e,n),r=this.translateToOriginPoint(i,this.originX,this.originY);this.set("left",r.x),this.set("top",r.y)},adjustPosition:function(t){var e,n,i=u(this.angle),r=this.getScaledWidth(),o=g.util.cos(i)*r,a=g.util.sin(i)*r;this.left+=o*((n="string"==typeof t?h[t]:t-.5)-(e="string"==typeof this.originX?h[this.originX]:this.originX-.5)),this.top+=a*(n-e),this.setCoords(),this.originX=t},_setOriginToCenter:function(){this._originalOriginX=this.originX,this._originalOriginY=this.originY;var t=this.getCenterPoint();this.originX="center",this.originY="center",this.left=t.x,this.top=t.y},_resetOrigin:function(){var t=this.translateToOriginPoint(this.getCenterPoint(),this._originalOriginX,this._originalOriginY);this.originX=this._originalOriginX,this.originY=this._originalOriginY,this.left=t.x,this.top=t.y,this._originalOriginX=null,this._originalOriginY=null},_getLeftTopCoords:function(){return this.translateToOriginPoint(this.getCenterPoint(),"left","top")}}),function(){var t=g.util.degreesToRadians,e=g.util.multiplyTransformMatrices,n=g.util.transformPoint;g.util.object.extend(g.Object.prototype,{oCoords:null,aCoords:null,ownMatrixCache:null,matrixCache:null,getCoords:function(t,e){this.oCoords||this.setCoords();var n=t?this.aCoords:this.oCoords;return function(t){return[new g.Point(t.tl.x,t.tl.y),new g.Point(t.tr.x,t.tr.y),new g.Point(t.br.x,t.br.y),new g.Point(t.bl.x,t.bl.y)]}(e?this.calcCoords(t):n)},intersectsWithRect:function(t,e,n,i){var r=this.getCoords(n,i);return"Intersection"===g.Intersection.intersectPolygonRectangle(r,t,e).status},intersectsWithObject:function(t,e,n){return"Intersection"===g.Intersection.intersectPolygonPolygon(this.getCoords(e,n),t.getCoords(e,n)).status||t.isContainedWithinObject(this,e,n)||this.isContainedWithinObject(t,e,n)},isContainedWithinObject:function(t,e,n){for(var i=this.getCoords(e,n),r=0,o=t._getImageLines(n?t.calcCoords(e):e?t.aCoords:t.oCoords);r<4;r++)if(!t.containsPoint(i[r],o))return!1;return!0},isContainedWithinRect:function(t,e,n,i){var r=this.getBoundingRect(n,i);return r.left>=t.x&&r.left+r.width<=e.x&&r.top>=t.y&&r.top+r.height<=e.y},containsPoint:function(t,e,n,i){e=e||this._getImageLines(i?this.calcCoords(n):n?this.aCoords:this.oCoords);var r=this._findCrossPoints(t,e);return 0!==r&&r%2==1},isOnScreen:function(t){if(!this.canvas)return!1;for(var e,n=this.canvas.vptCoords.tl,i=this.canvas.vptCoords.br,r=this.getCoords(!0,t),o=0;o<4;o++)if((e=r[o]).x<=i.x&&e.x>=n.x&&e.y<=i.y&&e.y>=n.y)return!0;return!!this.intersectsWithRect(n,i,!0,t)||this._containsCenterOfCanvas(n,i,t)},_containsCenterOfCanvas:function(t,e,n){return!!this.containsPoint({x:(t.x+e.x)/2,y:(t.y+e.y)/2},null,!0,n)},isPartiallyOnScreen:function(t){if(!this.canvas)return!1;var e=this.canvas.vptCoords.tl,n=this.canvas.vptCoords.br;return!!this.intersectsWithRect(e,n,!0,t)||this._containsCenterOfCanvas(e,n,t)},_getImageLines:function(t){return{topline:{o:t.tl,d:t.tr},rightline:{o:t.tr,d:t.br},bottomline:{o:t.br,d:t.bl},leftline:{o:t.bl,d:t.tl}}},_findCrossPoints:function(t,e){var n,i,r,o=0;for(var a in e)if(!((r=e[a]).o.y<t.y&&r.d.y<t.y||r.o.y>=t.y&&r.d.y>=t.y||(i=r.o.x===r.d.x&&r.o.x>=t.x?r.o.x:-(t.y-0*t.x-(r.o.y-(n=(r.d.y-r.o.y)/(r.d.x-r.o.x))*r.o.x))/(0-n),i>=t.x&&(o+=1),2!==o)))break;return o},getBoundingRect:function(t,e){var n=this.getCoords(t,e);return g.util.makeBoundingBoxFromPoints(n)},getScaledWidth:function(){return this._getTransformedDimensions().x},getScaledHeight:function(){return this._getTransformedDimensions().y},_constrainScale:function(t){return Math.abs(t)<this.minScaleLimit?t<0?-this.minScaleLimit:this.minScaleLimit:0===t?1e-4:t},scale:function(t){return this._set("scaleX",t),this._set("scaleY",t),this.setCoords()},scaleToWidth:function(t,e){var n=this.getBoundingRect(e).width/this.getScaledWidth();return this.scale(t/this.width/n)},scaleToHeight:function(t,e){var n=this.getBoundingRect(e).height/this.getScaledHeight();return this.scale(t/this.height/n)},calcCoords:function(i){var r=this._calcRotateMatrix(),o=this._calcTranslateMatrix(),a=e(o,r),s=this.getViewportTransform(),l=i?a:e(s,a),c=this._getTransformedDimensions(),u=c.x/2,h=c.y/2,f=n({x:-u,y:-h},l),d=n({x:u,y:-h},l),p=n({x:-u,y:h},l),v=n({x:u,y:h},l);if(!i){var m=this.padding,y=t(this.angle),_=g.util.cos(y),b=g.util.sin(y),k=_*m,C=b*m,w=k+C,x=k-C;m&&(f.x-=x,f.y-=w,d.x+=w,d.y-=x,p.x-=w,p.y+=x,v.x+=x,v.y+=w);var S=new g.Point((f.x+p.x)/2,(f.y+p.y)/2),E=new g.Point((d.x+f.x)/2,(d.y+f.y)/2),T=new g.Point((v.x+d.x)/2,(v.y+d.y)/2),O=new g.Point((v.x+p.x)/2,(v.y+p.y)/2),A=new g.Point(E.x+b*this.rotatingPointOffset,E.y-_*this.rotatingPointOffset)}var I={tl:f,tr:d,br:v,bl:p};return i||(I.ml=S,I.mt=E,I.mr=T,I.mb=O,I.mtr=A),I},setCoords:function(t,e){return this.oCoords=this.calcCoords(t),e||(this.aCoords=this.calcCoords(!0)),t||this._setCornerCoords&&this._setCornerCoords(),this},_calcRotateMatrix:function(){return g.util.calcRotateMatrix(this)},_calcTranslateMatrix:function(){var t=this.getCenterPoint();return[1,0,0,1,t.x,t.y]},transformMatrixKey:function(t){var e="";return!t&&this.group&&(e=this.group.transformMatrixKey(t)+"_"),e+this.top+"_"+this.left+"_"+this.scaleX+"_"+this.scaleY+"_"+this.skewX+"_"+this.skewY+"_"+this.angle+"_"+this.originX+"_"+this.originY+"_"+this.width+"_"+this.height+"_"+this.strokeWidth+this.flipX+this.flipY},calcTransformMatrix:function(t){if(t)return this.calcOwnMatrix();var n=this.transformMatrixKey(),i=this.matrixCache||(this.matrixCache={});if(i.key===n)return i.value;var r=this.calcOwnMatrix();return this.group&&(r=e(this.group.calcTransformMatrix(),r)),i.key=n,i.value=r,r},calcOwnMatrix:function(){var t=this.transformMatrixKey(!0),e=this.ownMatrixCache||(this.ownMatrixCache={});if(e.key===t)return e.value;var n=this._calcTranslateMatrix();return this.translateX=n[4],this.translateY=n[5],e.key=t,e.value=g.util.composeMatrix(this),e.value},_calcDimensionsTransformMatrix:function(t,e,n){return g.util.calcDimensionsMatrix({skewX:t,skewY:e,scaleX:this.scaleX*(n&&this.flipX?-1:1),scaleY:this.scaleY*(n&&this.flipY?-1:1)})},_getNonTransformedDimensions:function(){var t=this.strokeWidth;return{x:this.width+t,y:this.height+t}},_getTransformedDimensions:function(t,e){void 0===t&&(t=this.skewX),void 0===e&&(e=this.skewY);var n,i,r=this._getNonTransformedDimensions();if(this.strokeUniform?(n=this.width,i=this.height):(n=r.x,i=r.y),0===t&&0===e)return this._finalizeDimensions(n*this.scaleX,i*this.scaleY);var o=[{x:-(n/=2),y:-(i/=2)},{x:n,y:-i},{x:-n,y:i},{x:n,y:i}],a=g.util.calcDimensionsMatrix({scaleX:this.scaleX,scaleY:this.scaleY,skewX:t,skewY:e}),s=g.util.makeBoundingBoxFromPoints(o,a);return this._finalizeDimensions(s.width,s.height)},_finalizeDimensions:function(t,e){return this.strokeUniform?{x:t+this.strokeWidth,y:e+this.strokeWidth}:{x:t,y:e}},_calculateCurrentDimensions:function(){var t=this.getViewportTransform(),e=this._getTransformedDimensions();return g.util.transformPoint(e,t,!0).scalarAdd(2*this.padding)}})}(),g.util.object.extend(g.Object.prototype,{sendToBack:function(){return this.group?g.StaticCanvas.prototype.sendToBack.call(this.group,this):this.canvas&&this.canvas.sendToBack(this),this},bringToFront:function(){return this.group?g.StaticCanvas.prototype.bringToFront.call(this.group,this):this.canvas&&this.canvas.bringToFront(this),this},sendBackwards:function(t){return this.group?g.StaticCanvas.prototype.sendBackwards.call(this.group,this,t):this.canvas&&this.canvas.sendBackwards(this,t),this},bringForward:function(t){return this.group?g.StaticCanvas.prototype.bringForward.call(this.group,this,t):this.canvas&&this.canvas.bringForward(this,t),this},moveTo:function(t){return this.group&&"activeSelection"!==this.group.type?g.StaticCanvas.prototype.moveTo.call(this.group,this,t):this.canvas&&this.canvas.moveTo(this,t),this}}),function(){function t(t,e){if(e){if(e.toLive)return t+": url(#SVGID_"+e.id+"); ";var n=new g.Color(e),i=t+": "+n.toRgb()+"; ",r=n.getAlpha();return 1!==r&&(i+=t+"-opacity: "+r.toString()+"; "),i}return t+": none; "}var e=g.util.toFixed;g.util.object.extend(g.Object.prototype,{getSvgStyles:function(e){var n=this.fillRule?this.fillRule:"nonzero",i=this.strokeWidth?this.strokeWidth:"0",r=this.strokeDashArray?this.strokeDashArray.join(" "):"none",o=this.strokeDashOffset?this.strokeDashOffset:"0",a=this.strokeLineCap?this.strokeLineCap:"butt",s=this.strokeLineJoin?this.strokeLineJoin:"miter",l=this.strokeMiterLimit?this.strokeMiterLimit:"4",c=void 0!==this.opacity?this.opacity:"1",u=this.visible?"":" visibility: hidden;",h=e?"":this.getSvgFilter(),f=t("fill",this.fill);return[t("stroke",this.stroke),"stroke-width: ",i,"; ","stroke-dasharray: ",r,"; ","stroke-linecap: ",a,"; ","stroke-dashoffset: ",o,"; ","stroke-linejoin: ",s,"; ","stroke-miterlimit: ",l,"; ",f,"fill-rule: ",n,"; ","opacity: ",c,";",h,u].join("")},getSvgSpanStyles:function(e,n){var i=e.fontFamily?"font-family: "+(-1===e.fontFamily.indexOf("'")&&-1===e.fontFamily.indexOf('"')?"'"+e.fontFamily+"'":e.fontFamily)+"; ":"",r=e.strokeWidth?"stroke-width: "+e.strokeWidth+"; ":"",o=(i=i,e.fontSize?"font-size: "+e.fontSize+"px; ":""),a=e.fontStyle?"font-style: "+e.fontStyle+"; ":"",s=e.fontWeight?"font-weight: "+e.fontWeight+"; ":"",l=e.fill?t("fill",e.fill):"",c=e.stroke?t("stroke",e.stroke):"",u=this.getSvgTextDecoration(e);return u&&(u="text-decoration: "+u+"; "),[c,r,i,o,a,s,u,l,e.deltaY?"baseline-shift: "+-e.deltaY+"; ":"",n?"white-space: pre; ":""].join("")},getSvgTextDecoration:function(t){return["overline","underline","line-through"].filter((function(e){return t[e.replace("-","")]})).join(" ")},getSvgFilter:function(){return this.shadow?"filter: url(#SVGID_"+this.shadow.id+");":""},getSvgCommons:function(){return[this.id?'id="'+this.id+'" ':"",this.clipPath?'clip-path="url(#'+this.clipPath.clipPathId+')" ':""].join("")},getSvgTransform:function(t,e){var n=t?this.calcTransformMatrix():this.calcOwnMatrix();return'transform="'+g.util.matrixToSVG(n)+(e||"")+this.getSvgTransformMatrix()+'" '},getSvgTransformMatrix:function(){return this.transformMatrix?" "+g.util.matrixToSVG(this.transformMatrix):""},_setSVGBg:function(t){if(this.backgroundColor){var n=g.Object.NUM_FRACTION_DIGITS;t.push("\t\t<rect ",this._getFillAttributes(this.backgroundColor),' x="',e(-this.width/2,n),'" y="',e(-this.height/2,n),'" width="',e(this.width,n),'" height="',e(this.height,n),'"></rect>\n')}},toSVG:function(t){return this._createBaseSVGMarkup(this._toSVG(t),{reviver:t})},toClipPathSVG:function(t){return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(t),{reviver:t})},_createBaseClipPathSVGMarkup:function(t,e){var n=(e=e||{}).reviver,i=[this.getSvgTransform(!0,e.additionalTransform||""),this.getSvgCommons()].join(""),r=t.indexOf("COMMON_PARTS");return t[r]=i,n?n(t.join("")):t.join("")},_createBaseSVGMarkup:function(t,e){var n,i,r=(e=e||{}).noStyle,o=e.reviver,a=r?"":'style="'+this.getSvgStyles()+'" ',s=e.withShadow?'style="'+this.getSvgFilter()+'" ':"",l=this.clipPath,c=this.strokeUniform?'vector-effect="non-scaling-stroke" ':"",u=l&&l.absolutePositioned,h=this.stroke,f=this.fill,d=this.shadow,p=[],v=t.indexOf("COMMON_PARTS"),m=e.additionalTransform;return l&&(l.clipPathId="CLIPPATH_"+g.Object.__uid++,i='<clipPath id="'+l.clipPathId+'" >\n'+l.toClipPathSVG(o)+"</clipPath>\n"),u&&p.push("<g ",s,this.getSvgCommons()," >\n"),p.push("<g ",this.getSvgTransform(!1),u?"":s+this.getSvgCommons()," >\n"),n=[a,c,r?"":this.addPaintOrder()," ",m?'transform="'+m+'" ':""].join(""),t[v]=n,f&&f.toLive&&p.push(f.toSVG(this)),h&&h.toLive&&p.push(h.toSVG(this)),d&&p.push(d.toSVG(this)),l&&p.push(i),p.push(t.join("")),p.push("</g>\n"),u&&p.push("</g>\n"),o?o(p.join("")):p.join("")},addPaintOrder:function(){return"fill"!==this.paintFirst?' paint-order="'+this.paintFirst+'" ':""}})}(),function(){var t=g.util.object.extend;function e(e,n,i){var r={};i.forEach((function(t){r[t]=e[t]})),t(e[n],r,!0)}g.util.object.extend(g.Object.prototype,{hasStateChanged:function(t){var e="_"+(t=t||"stateProperties");return Object.keys(this[e]).length<this[t].length||!function t(e,n,i){if(e===n)return!0;if(Array.isArray(e)){if(!Array.isArray(n)||e.length!==n.length)return!1;for(var r=0,o=e.length;r<o;r++)if(!t(e[r],n[r]))return!1;return!0}if(e&&"object"==typeof e){var a,s=Object.keys(e);if(!n||"object"!=typeof n||!i&&s.length!==Object.keys(n).length)return!1;for(r=0,o=s.length;r<o;r++)if("canvas"!==(a=s[r])&&!t(e[a],n[a]))return!1;return!0}}(this[e],this,!0)},saveState:function(t){var n=t&&t.propertySet||"stateProperties",i="_"+n;return this[i]?(e(this,i,this[n]),t&&t.stateProperties&&e(this,i,t.stateProperties),this):this.setupState(t)},setupState:function(t){var e=(t=t||{}).propertySet||"stateProperties";return t.propertySet=e,this["_"+e]={},this.saveState(t),this}})}(),function(){var t=g.util.degreesToRadians;g.util.object.extend(g.Object.prototype,{_controlsVisibility:null,_findTargetCorner:function(t){if(!this.hasControls||this.group||!this.canvas||this.canvas._activeObject!==this)return!1;var e,n,i=t.x,r=t.y;for(var o in this.__corner=0,this.oCoords)if(this.isControlVisible(o)&&("mtr"!==o||this.hasRotatingPoint)&&(!this.get("lockUniScaling")||"mt"!==o&&"mr"!==o&&"mb"!==o&&"ml"!==o)&&(n=this._getImageLines(this.oCoords[o].corner),0!==(e=this._findCrossPoints({x:i,y:r},n))&&e%2==1))return this.__corner=o,o;return!1},_setCornerCoords:function(){var e,n,i=this.oCoords,r=t(45-this.angle),o=.707106*this.cornerSize,a=o*g.util.cos(r),s=o*g.util.sin(r);for(var l in i)i[l].corner={tl:{x:(e=i[l].x)-s,y:(n=i[l].y)-a},tr:{x:e+a,y:n-s},bl:{x:e-a,y:n+s},br:{x:e+s,y:n+a}}},drawSelectionBackground:function(e){if(!this.selectionBackgroundColor||this.canvas&&!this.canvas.interactive||this.canvas&&this.canvas._activeObject!==this)return this;e.save();var n=this.getCenterPoint(),i=this._calculateCurrentDimensions(),r=this.canvas.viewportTransform;return e.translate(n.x,n.y),e.scale(1/r[0],1/r[3]),e.rotate(t(this.angle)),e.fillStyle=this.selectionBackgroundColor,e.fillRect(-i.x/2,-i.y/2,i.x,i.y),e.restore(),this},drawBorders:function(t,e){e=e||{};var n=this._calculateCurrentDimensions(),i=this.borderScaleFactor,r=n.x+i,o=n.y+i,a=void 0!==e.hasRotatingPoint?e.hasRotatingPoint:this.hasRotatingPoint,s=void 0!==e.hasControls?e.hasControls:this.hasControls,l=void 0!==e.rotatingPointOffset?e.rotatingPointOffset:this.rotatingPointOffset;if(t.save(),t.strokeStyle=e.borderColor||this.borderColor,this._setLineDash(t,e.borderDashArray||this.borderDashArray,null),t.strokeRect(-r/2,-o/2,r,o),a&&this.isControlVisible("mtr")&&s){var c=-o/2;t.beginPath(),t.moveTo(0,c),t.lineTo(0,c-l),t.stroke()}return t.restore(),this},drawBordersInGroup:function(t,e,n){n=n||{};var i={x:this.width,y:this.height},r=g.util.composeMatrix({scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX}),o=g.util.transformPoint(i,r),a=this.strokeWidth,s=this.borderScaleFactor,l=o.x+a*(this.strokeUniform?this.canvas.getZoom():e.scaleX)+s,c=o.y+a*(this.strokeUniform?this.canvas.getZoom():e.scaleY)+s;return t.save(),this._setLineDash(t,n.borderDashArray||this.borderDashArray,null),t.strokeStyle=n.borderColor||this.borderColor,t.strokeRect(-l/2,-c/2,l,c),t.restore(),this},drawControls:function(t,e){e=e||{};var n=this._calculateCurrentDimensions(),i=n.x,r=n.y,o=e.cornerSize||this.cornerSize,a=-(i+o)/2,s=-(r+o)/2,l=void 0!==e.hasRotatingPoint?e.hasRotatingPoint:this.hasRotatingPoint,c=(void 0!==e.transparentCorners?e.transparentCorners:this.transparentCorners)?"stroke":"fill";return t.save(),t.strokeStyle=t.fillStyle=e.cornerColor||this.cornerColor,this.transparentCorners||(t.strokeStyle=e.cornerStrokeColor||this.cornerStrokeColor),this._setLineDash(t,e.cornerDashArray||this.cornerDashArray,null),this._drawControl("tl",t,c,a,s,e),this._drawControl("tr",t,c,a+i,s,e),this._drawControl("bl",t,c,a,s+r,e),this._drawControl("br",t,c,a+i,s+r,e),this.get("lockUniScaling")||(this._drawControl("mt",t,c,a+i/2,s,e),this._drawControl("mb",t,c,a+i/2,s+r,e),this._drawControl("mr",t,c,a+i,s+r/2,e),this._drawControl("ml",t,c,a,s+r/2,e)),l&&this._drawControl("mtr",t,c,a+i/2,s-this.rotatingPointOffset,e),t.restore(),this},_drawControl:function(t,e,n,i,r,o){if(o=o||{},this.isControlVisible(t)){var a=this.cornerSize,s=!this.transparentCorners&&this.cornerStrokeColor;switch(o.cornerStyle||this.cornerStyle){case"circle":e.beginPath(),e.arc(i+a/2,r+a/2,a/2,0,2*Math.PI,!1),e[n](),s&&e.stroke();break;default:this.transparentCorners||e.clearRect(i,r,a,a),e[n+"Rect"](i,r,a,a),s&&e.strokeRect(i,r,a,a)}}},isControlVisible:function(t){return this._getControlsVisibility()[t]},setControlVisible:function(t,e){return this._getControlsVisibility()[t]=e,this},setControlsVisibility:function(t){for(var e in t||(t={}),t)this.setControlVisible(e,t[e]);return this},_getControlsVisibility:function(){return this._controlsVisibility||(this._controlsVisibility={tl:!0,tr:!0,br:!0,bl:!0,ml:!0,mt:!0,mr:!0,mb:!0,mtr:!0}),this._controlsVisibility},onDeselect:function(){},onSelect:function(){}})}(),g.util.object.extend(g.StaticCanvas.prototype,{FX_DURATION:500,fxCenterObjectH:function(t,e){var n=function(){},i=(e=e||{}).onComplete||n,r=e.onChange||n,o=this;return g.util.animate({startValue:t.left,endValue:this.getCenter().left,duration:this.FX_DURATION,onChange:function(e){t.set("left",e),o.requestRenderAll(),r()},onComplete:function(){t.setCoords(),i()}}),this},fxCenterObjectV:function(t,e){var n=function(){},i=(e=e||{}).onComplete||n,r=e.onChange||n,o=this;return g.util.animate({startValue:t.top,endValue:this.getCenter().top,duration:this.FX_DURATION,onChange:function(e){t.set("top",e),o.requestRenderAll(),r()},onComplete:function(){t.setCoords(),i()}}),this},fxRemove:function(t,e){var n=function(){},i=(e=e||{}).onComplete||n,r=e.onChange||n,o=this;return g.util.animate({startValue:t.opacity,endValue:0,duration:this.FX_DURATION,onChange:function(e){t.set("opacity",e),o.requestRenderAll(),r()},onComplete:function(){o.remove(t),i()}}),this}}),g.util.object.extend(g.Object.prototype,{animate:function(){if(arguments[0]&&"object"==typeof arguments[0]){var t,e=[];for(t in arguments[0])e.push(t);for(var n=0,i=e.length;n<i;n++)this._animate(t=e[n],arguments[0][t],arguments[1],n!==i-1)}else this._animate.apply(this,arguments);return this},_animate:function(t,e,n,i){var r,o=this;e=e.toString(),n=n?g.util.object.clone(n):{},~t.indexOf(".")&&(r=t.split("."));var a=r?this.get(r[0])[r[1]]:this.get(t);"from"in n||(n.from=a),e=~e.indexOf("=")?a+parseFloat(e.replace("=","")):parseFloat(e),g.util.animate({startValue:n.from,endValue:e,byValue:n.by,easing:n.easing,duration:n.duration,abort:n.abort&&function(){return n.abort.call(o)},onChange:function(e,a,s){r?o[r[0]][r[1]]=e:o.set(t,e),i||n.onChange&&n.onChange(e,a,s)},onComplete:function(t,e,r){i||(o.setCoords(),n.onComplete&&n.onComplete(t,e,r))}})}}),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.util.object.clone,r={x1:1,x2:1,y1:1,y2:1},o=e.StaticCanvas.supports("setLineDash");function a(t,e){var n=t.origin,i=t.axis1,r=t.axis2,o=t.dimension,a=e.nearest,s=e.center,l=e.farthest;return function(){switch(this.get(n)){case a:return Math.min(this.get(i),this.get(r));case s:return Math.min(this.get(i),this.get(r))+.5*this.get(o);case l:return Math.max(this.get(i),this.get(r))}}}e.Line?e.warn("fabric.Line is already defined"):(e.Line=e.util.createClass(e.Object,{type:"line",x1:0,y1:0,x2:0,y2:0,cacheProperties:e.Object.prototype.cacheProperties.concat("x1","x2","y1","y2"),initialize:function(t,e){t||(t=[0,0,0,0]),this.callSuper("initialize",e),this.set("x1",t[0]),this.set("y1",t[1]),this.set("x2",t[2]),this.set("y2",t[3]),this._setWidthHeight(e)},_setWidthHeight:function(t){t||(t={}),this.width=Math.abs(this.x2-this.x1),this.height=Math.abs(this.y2-this.y1),this.left="left"in t?t.left:this._getLeftToOriginX(),this.top="top"in t?t.top:this._getTopToOriginY()},_set:function(t,e){return this.callSuper("_set",t,e),void 0!==r[t]&&this._setWidthHeight(),this},_getLeftToOriginX:a({origin:"originX",axis1:"x1",axis2:"x2",dimension:"width"},{nearest:"left",center:"center",farthest:"right"}),_getTopToOriginY:a({origin:"originY",axis1:"y1",axis2:"y2",dimension:"height"},{nearest:"top",center:"center",farthest:"bottom"}),_render:function(t){if(t.beginPath(),!this.strokeDashArray||this.strokeDashArray&&o){var e=this.calcLinePoints();t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2)}t.lineWidth=this.strokeWidth;var n=t.strokeStyle;t.strokeStyle=this.stroke||t.fillStyle,this.stroke&&this._renderStroke(t),t.strokeStyle=n},_renderDashedStroke:function(t){var n=this.calcLinePoints();t.beginPath(),e.util.drawDashedLine(t,n.x1,n.y1,n.x2,n.y2,this.strokeDashArray),t.closePath()},_findCenterFromElement:function(){return{x:(this.x1+this.x2)/2,y:(this.y1+this.y2)/2}},toObject:function(t){return n(this.callSuper("toObject",t),this.calcLinePoints())},_getNonTransformedDimensions:function(){var t=this.callSuper("_getNonTransformedDimensions");return"butt"===this.strokeLineCap&&(0===this.width&&(t.y-=this.strokeWidth),0===this.height&&(t.x-=this.strokeWidth)),t},calcLinePoints:function(){var t=this.x1<=this.x2?-1:1,e=this.y1<=this.y2?-1:1;return{x1:t*this.width*.5,x2:t*this.width*-.5,y1:e*this.height*.5,y2:e*this.height*-.5}},_toSVG:function(){var t=this.calcLinePoints();return["<line ","COMMON_PARTS",'x1="',t.x1,'" y1="',t.y1,'" x2="',t.x2,'" y2="',t.y2,'" />\n']}}),e.Line.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" ")),e.Line.fromElement=function(t,i,r){r=r||{};var o=e.parseAttributes(t,e.Line.ATTRIBUTE_NAMES);i(new e.Line([o.x1||0,o.y1||0,o.x2||0,o.y2||0],n(o,r)))},e.Line.fromObject=function(t,n){var r=i(t,!0);r.points=[t.x1,t.y1,t.x2,t.y2],e.Object._fromObject("Line",r,(function(t){delete t.points,n&&n(t)}),"points")})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=Math.PI;e.Circle?e.warn("fabric.Circle is already defined."):(e.Circle=e.util.createClass(e.Object,{type:"circle",radius:0,startAngle:0,endAngle:2*n,cacheProperties:e.Object.prototype.cacheProperties.concat("radius","startAngle","endAngle"),_set:function(t,e){return this.callSuper("_set",t,e),"radius"===t&&this.setRadius(e),this},toObject:function(t){return this.callSuper("toObject",["radius","startAngle","endAngle"].concat(t))},_toSVG:function(){var t,i=(this.endAngle-this.startAngle)%(2*n);if(0===i)t=["<circle ","COMMON_PARTS",'cx="0" cy="0" ','r="',this.radius,'" />\n'];else{var r=e.util.cos(this.startAngle)*this.radius,o=e.util.sin(this.startAngle)*this.radius,a=e.util.cos(this.endAngle)*this.radius,s=e.util.sin(this.endAngle)*this.radius;t=['<path d="M '+r+" "+o," A "+this.radius+" "+this.radius," 0 ",+(i>n?"1":"0")+" 1"," "+a+" "+s,'" ',"COMMON_PARTS"," />\n"]}return t},_render:function(t){t.beginPath(),t.arc(0,0,this.radius,this.startAngle,this.endAngle,!1),this._renderPaintInOrder(t)},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(t){return this.radius=t,this.set("width",2*t).set("height",2*t)}}),e.Circle.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("cx cy r".split(" ")),e.Circle.fromElement=function(t,n){var i,r=e.parseAttributes(t,e.Circle.ATTRIBUTE_NAMES);if(!("radius"in(i=r)&&i.radius>=0))throw new Error("value of `r` attribute is required and can not be negative");r.left=(r.left||0)-r.radius,r.top=(r.top||0)-r.radius,n(new e.Circle(r))},e.Circle.fromObject=function(t,n){return e.Object._fromObject("Circle",t,n)})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Triangle?e.warn("fabric.Triangle is already defined"):(e.Triangle=e.util.createClass(e.Object,{type:"triangle",width:100,height:100,_render:function(t){var e=this.width/2,n=this.height/2;t.beginPath(),t.moveTo(-e,n),t.lineTo(0,-n),t.lineTo(e,n),t.closePath(),this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var n=this.width/2,i=this.height/2;t.beginPath(),e.util.drawDashedLine(t,-n,i,0,-i,this.strokeDashArray),e.util.drawDashedLine(t,0,-i,n,i,this.strokeDashArray),e.util.drawDashedLine(t,n,i,-n,i,this.strokeDashArray),t.closePath()},_toSVG:function(){var t=this.width/2,e=this.height/2;return["<polygon ","COMMON_PARTS",'points="',[-t+" "+e,"0 "+-e,t+" "+e].join(","),'" />']}}),e.Triangle.fromObject=function(t,n){return e.Object._fromObject("Triangle",t,n)})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=2*Math.PI;e.Ellipse?e.warn("fabric.Ellipse is already defined."):(e.Ellipse=e.util.createClass(e.Object,{type:"ellipse",rx:0,ry:0,cacheProperties:e.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(t){this.callSuper("initialize",t),this.set("rx",t&&t.rx||0),this.set("ry",t&&t.ry||0)},_set:function(t,e){switch(this.callSuper("_set",t,e),t){case"rx":this.rx=e,this.set("width",2*e);break;case"ry":this.ry=e,this.set("height",2*e)}return this},getRx:function(){return this.get("rx")*this.get("scaleX")},getRy:function(){return this.get("ry")*this.get("scaleY")},toObject:function(t){return this.callSuper("toObject",["rx","ry"].concat(t))},_toSVG:function(){return["<ellipse ","COMMON_PARTS",'cx="0" cy="0" ','rx="',this.rx,'" ry="',this.ry,'" />\n']},_render:function(t){t.beginPath(),t.save(),t.transform(1,0,0,this.ry/this.rx,0,0),t.arc(0,0,this.rx,0,n,!1),t.restore(),this._renderPaintInOrder(t)}}),e.Ellipse.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("cx cy rx ry".split(" ")),e.Ellipse.fromElement=function(t,n){var i=e.parseAttributes(t,e.Ellipse.ATTRIBUTE_NAMES);i.left=(i.left||0)-i.rx,i.top=(i.top||0)-i.ry,n(new e.Ellipse(i))},e.Ellipse.fromObject=function(t,n){return e.Object._fromObject("Ellipse",t,n)})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend;e.Rect?e.warn("fabric.Rect is already defined"):(e.Rect=e.util.createClass(e.Object,{stateProperties:e.Object.prototype.stateProperties.concat("rx","ry"),type:"rect",rx:0,ry:0,cacheProperties:e.Object.prototype.cacheProperties.concat("rx","ry"),initialize:function(t){this.callSuper("initialize",t),this._initRxRy()},_initRxRy:function(){this.rx&&!this.ry?this.ry=this.rx:this.ry&&!this.rx&&(this.rx=this.ry)},_render:function(t){var e=this.rx?Math.min(this.rx,this.width/2):0,n=this.ry?Math.min(this.ry,this.height/2):0,i=this.width,r=this.height,o=-this.width/2,a=-this.height/2,s=0!==e||0!==n,l=.4477152502;t.beginPath(),t.moveTo(o+e,a),t.lineTo(o+i-e,a),s&&t.bezierCurveTo(o+i-l*e,a,o+i,a+l*n,o+i,a+n),t.lineTo(o+i,a+r-n),s&&t.bezierCurveTo(o+i,a+r-l*n,o+i-l*e,a+r,o+i-e,a+r),t.lineTo(o+e,a+r),s&&t.bezierCurveTo(o+l*e,a+r,o,a+r-l*n,o,a+r-n),t.lineTo(o,a+n),s&&t.bezierCurveTo(o,a+l*n,o+l*e,a,o+e,a),t.closePath(),this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var n=-this.width/2,i=-this.height/2,r=this.width,o=this.height;t.beginPath(),e.util.drawDashedLine(t,n,i,n+r,i,this.strokeDashArray),e.util.drawDashedLine(t,n+r,i,n+r,i+o,this.strokeDashArray),e.util.drawDashedLine(t,n+r,i+o,n,i+o,this.strokeDashArray),e.util.drawDashedLine(t,n,i+o,n,i,this.strokeDashArray),t.closePath()},toObject:function(t){return this.callSuper("toObject",["rx","ry"].concat(t))},_toSVG:function(){return["<rect ","COMMON_PARTS",'x="',-this.width/2,'" y="',-this.height/2,'" rx="',this.rx,'" ry="',this.ry,'" width="',this.width,'" height="',this.height,'" />\n']}}),e.Rect.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y rx ry width height".split(" ")),e.Rect.fromElement=function(t,i,r){if(!t)return i(null);r=r||{};var o=e.parseAttributes(t,e.Rect.ATTRIBUTE_NAMES);o.left=o.left||0,o.top=o.top||0,o.height=o.height||0,o.width=o.width||0;var a=new e.Rect(n(r?e.util.object.clone(r):{},o));a.visible=a.visible&&a.width>0&&a.height>0,i(a)},e.Rect.fromObject=function(t,n){return e.Object._fromObject("Rect",t,n)})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.util.array.min,r=e.util.array.max,o=e.util.toFixed;e.Polyline?e.warn("fabric.Polyline is already defined"):(e.Polyline=e.util.createClass(e.Object,{type:"polyline",points:null,cacheProperties:e.Object.prototype.cacheProperties.concat("points"),initialize:function(t,e){e=e||{},this.points=t||[],this.callSuper("initialize",e),this._setPositionDimensions(e)},_setPositionDimensions:function(t){var e,n=this._calcDimensions(t);this.width=n.width,this.height=n.height,t.fromSVG||(e=this.translateToGivenOrigin({x:n.left-this.strokeWidth/2,y:n.top-this.strokeWidth/2},"left","top",this.originX,this.originY)),void 0===t.left&&(this.left=t.fromSVG?n.left:e.x),void 0===t.top&&(this.top=t.fromSVG?n.top:e.y),this.pathOffset={x:n.left+this.width/2,y:n.top+this.height/2}},_calcDimensions:function(){var t=this.points,e=i(t,"x")||0,n=i(t,"y")||0;return{left:e,top:n,width:(r(t,"x")||0)-e,height:(r(t,"y")||0)-n}},toObject:function(t){return n(this.callSuper("toObject",t),{points:this.points.concat()})},_toSVG:function(){for(var t=[],n=this.pathOffset.x,i=this.pathOffset.y,r=e.Object.NUM_FRACTION_DIGITS,a=0,s=this.points.length;a<s;a++)t.push(o(this.points[a].x-n,r),",",o(this.points[a].y-i,r)," ");return["<"+this.type+" ","COMMON_PARTS",'points="',t.join(""),'" />\n']},commonRender:function(t){var e,n=this.points.length,i=this.pathOffset.x,r=this.pathOffset.y;if(!n||isNaN(this.points[n-1].y))return!1;t.beginPath(),t.moveTo(this.points[0].x-i,this.points[0].y-r);for(var o=0;o<n;o++)t.lineTo((e=this.points[o]).x-i,e.y-r);return!0},_render:function(t){this.commonRender(t)&&this._renderPaintInOrder(t)},_renderDashedStroke:function(t){var n,i;t.beginPath();for(var r=0,o=this.points.length;r<o;r++)e.util.drawDashedLine(t,(n=this.points[r]).x,n.y,(i=this.points[r+1]||n).x,i.y,this.strokeDashArray)},complexity:function(){return this.get("points").length}}),e.Polyline.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polyline.fromElementGenerator=function(t){return function(i,r,o){if(!i)return r(null);o||(o={});var a=e.parsePointsAttribute(i.getAttribute("points")),s=e.parseAttributes(i,e[t].ATTRIBUTE_NAMES);s.fromSVG=!0,r(new e[t](a,n(s,o)))}},e.Polyline.fromElement=e.Polyline.fromElementGenerator("Polyline"),e.Polyline.fromObject=function(t,n){return e.Object._fromObject("Polyline",t,n,"points")})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Polygon?e.warn("fabric.Polygon is already defined"):(e.Polygon=e.util.createClass(e.Polyline,{type:"polygon",_render:function(t){this.commonRender(t)&&(t.closePath(),this._renderPaintInOrder(t))},_renderDashedStroke:function(t){this.callSuper("_renderDashedStroke",t),t.closePath()}}),e.Polygon.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(),e.Polygon.fromElement=e.Polyline.fromElementGenerator("Polygon"),e.Polygon.fromObject=function(t,n){return e.Object._fromObject("Polygon",t,n,"points")})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.array.min,i=e.util.array.max,r=e.util.object.extend,o=Object.prototype.toString,a=e.util.drawArc,s=e.util.toFixed,l={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},c={m:"l",M:"L"};e.Path?e.warn("fabric.Path is already defined"):(e.Path=e.util.createClass(e.Object,{type:"path",path:null,cacheProperties:e.Object.prototype.cacheProperties.concat("path","fillRule"),stateProperties:e.Object.prototype.stateProperties.concat("path"),initialize:function(t,n){this.callSuper("initialize",n=n||{}),t||(t=[]);var i="[object Array]"===o.call(t);this.path=i?t:t.match&&t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi),this.path&&(i||(this.path=this._parsePath()),e.Polyline.prototype._setPositionDimensions.call(this,n))},_renderPathCommands:function(t){var e,n,i,r=null,o=0,s=0,l=0,c=0,u=0,h=0,f=-this.pathOffset.x,d=-this.pathOffset.y;t.beginPath();for(var p=0,v=this.path.length;p<v;++p){switch((e=this.path[p])[0]){case"l":t.lineTo((l+=e[1])+f,(c+=e[2])+d);break;case"L":t.lineTo((l=e[1])+f,(c=e[2])+d);break;case"h":t.lineTo((l+=e[1])+f,c+d);break;case"H":t.lineTo((l=e[1])+f,c+d);break;case"v":t.lineTo(l+f,(c+=e[1])+d);break;case"V":t.lineTo(l+f,(c=e[1])+d);break;case"m":o=l+=e[1],s=c+=e[2],t.moveTo(l+f,c+d);break;case"M":o=l=e[1],s=c=e[2],t.moveTo(l+f,c+d);break;case"c":t.bezierCurveTo(l+e[1]+f,c+e[2]+d,(u=l+e[3])+f,(h=c+e[4])+d,(n=l+e[5])+f,(i=c+e[6])+d),l=n,c=i;break;case"C":t.bezierCurveTo(e[1]+f,e[2]+d,(u=e[3])+f,(h=e[4])+d,(l=e[5])+f,(c=e[6])+d);break;case"s":n=l+e[3],i=c+e[4],null===r[0].match(/[CcSs]/)?(u=l,h=c):(u=2*l-u,h=2*c-h),t.bezierCurveTo(u+f,h+d,l+e[1]+f,c+e[2]+d,n+f,i+d),u=l+e[1],h=c+e[2],l=n,c=i;break;case"S":n=e[3],i=e[4],null===r[0].match(/[CcSs]/)?(u=l,h=c):(u=2*l-u,h=2*c-h),t.bezierCurveTo(u+f,h+d,e[1]+f,e[2]+d,n+f,i+d),l=n,c=i,u=e[1],h=e[2];break;case"q":t.quadraticCurveTo((u=l+e[1])+f,(h=c+e[2])+d,(n=l+e[3])+f,(i=c+e[4])+d),l=n,c=i;break;case"Q":t.quadraticCurveTo(e[1]+f,e[2]+d,(n=e[3])+f,(i=e[4])+d),l=n,c=i,u=e[1],h=e[2];break;case"t":n=l+e[1],i=c+e[2],null===r[0].match(/[QqTt]/)?(u=l,h=c):(u=2*l-u,h=2*c-h),t.quadraticCurveTo(u+f,h+d,n+f,i+d),l=n,c=i;break;case"T":n=e[1],i=e[2],null===r[0].match(/[QqTt]/)?(u=l,h=c):(u=2*l-u,h=2*c-h),t.quadraticCurveTo(u+f,h+d,n+f,i+d),l=n,c=i;break;case"a":a(t,l+f,c+d,[e[1],e[2],e[3],e[4],e[5],e[6]+l+f,e[7]+c+d]),l+=e[6],c+=e[7];break;case"A":a(t,l+f,c+d,[e[1],e[2],e[3],e[4],e[5],e[6]+f,e[7]+d]),l=e[6],c=e[7];break;case"z":case"Z":l=o,c=s,t.closePath()}r=e}},_render:function(t){this._renderPathCommands(t),this._renderPaintInOrder(t)},toString:function(){return"#<fabric.Path ("+this.complexity()+'): { "top": '+this.top+', "left": '+this.left+" }>"},toObject:function(t){return r(this.callSuper("toObject",t),{path:this.path.map((function(t){return t.slice()}))})},toDatalessObject:function(t){var e=this.toObject(["sourcePath"].concat(t));return e.sourcePath&&delete e.path,e},_toSVG:function(){return["<path ","COMMON_PARTS",'d="',this.path.map((function(t){return t.join(" ")})).join(" "),'" stroke-linecap="round" ',"/>\n"]},_getOffsetTransform:function(){var t=e.Object.NUM_FRACTION_DIGITS;return" translate("+s(-this.pathOffset.x,t)+", "+s(-this.pathOffset.y,t)+")"},toClipPathSVG:function(t){var e=this._getOffsetTransform();return"\t"+this._createBaseClipPathSVGMarkup(this._toSVG(),{reviver:t,additionalTransform:e})},toSVG:function(t){var e=this._getOffsetTransform();return this._createBaseSVGMarkup(this._toSVG(),{reviver:t,additionalTransform:e})},complexity:function(){return this.path.length},_parsePath:function(){for(var t,n,i,r,o,a=[],s=[],u=e.rePathCommand,h=0,f=this.path.length;h<f;h++){for(r=(t=this.path[h]).slice(1).trim(),s.length=0;i=u.exec(r);)s.push(i[0]);o=[t.charAt(0)];for(var d=0,p=s.length;d<p;d++)n=parseFloat(s[d]),isNaN(n)||o.push(n);var v=o[0],g=l[v.toLowerCase()],m=c[v]||v;if(o.length-1>g)for(var y=1,_=o.length;y<_;y+=g)a.push([v].concat(o.slice(y,y+g))),v=m;else a.push(o)}return a},_calcDimensions:function(){for(var t,r,o,a,s=[],l=[],c=null,u=0,h=0,f=0,d=0,p=0,v=0,g=0,m=this.path.length;g<m;++g){switch((t=this.path[g])[0]){case"l":f+=t[1],d+=t[2],a=[];break;case"L":f=t[1],d=t[2],a=[];break;case"h":f+=t[1],a=[];break;case"H":f=t[1],a=[];break;case"v":d+=t[1],a=[];break;case"V":d=t[1],a=[];break;case"m":u=f+=t[1],h=d+=t[2],a=[];break;case"M":u=f=t[1],h=d=t[2],a=[];break;case"c":a=e.util.getBoundsOfCurve(f,d,f+t[1],d+t[2],p=f+t[3],v=d+t[4],r=f+t[5],o=d+t[6]),f=r,d=o;break;case"C":a=e.util.getBoundsOfCurve(f,d,t[1],t[2],p=t[3],v=t[4],t[5],t[6]),f=t[5],d=t[6];break;case"s":r=f+t[3],o=d+t[4],null===c[0].match(/[CcSs]/)?(p=f,v=d):(p=2*f-p,v=2*d-v),a=e.util.getBoundsOfCurve(f,d,p,v,f+t[1],d+t[2],r,o),p=f+t[1],v=d+t[2],f=r,d=o;break;case"S":r=t[3],o=t[4],null===c[0].match(/[CcSs]/)?(p=f,v=d):(p=2*f-p,v=2*d-v),a=e.util.getBoundsOfCurve(f,d,p,v,t[1],t[2],r,o),f=r,d=o,p=t[1],v=t[2];break;case"q":a=e.util.getBoundsOfCurve(f,d,p=f+t[1],v=d+t[2],p,v,r=f+t[3],o=d+t[4]),f=r,d=o;break;case"Q":a=e.util.getBoundsOfCurve(f,d,p=t[1],v=t[2],p,v,t[3],t[4]),f=t[3],d=t[4];break;case"t":r=f+t[1],o=d+t[2],null===c[0].match(/[QqTt]/)?(p=f,v=d):(p=2*f-p,v=2*d-v),a=e.util.getBoundsOfCurve(f,d,p,v,p,v,r,o),f=r,d=o;break;case"T":r=t[1],o=t[2],null===c[0].match(/[QqTt]/)?(p=f,v=d):(p=2*f-p,v=2*d-v),a=e.util.getBoundsOfCurve(f,d,p,v,p,v,r,o),f=r,d=o;break;case"a":a=e.util.getBoundsOfArc(f,d,t[1],t[2],t[3],t[4],t[5],t[6]+f,t[7]+d),f+=t[6],d+=t[7];break;case"A":a=e.util.getBoundsOfArc(f,d,t[1],t[2],t[3],t[4],t[5],t[6],t[7]),f=t[6],d=t[7];break;case"z":case"Z":f=u,d=h}c=t,a.forEach((function(t){s.push(t.x),l.push(t.y)})),s.push(f),l.push(d)}var y=n(s)||0,_=n(l)||0;return{left:y,top:_,width:(i(s)||0)-y,height:(i(l)||0)-_}}}),e.Path.fromObject=function(t,n){"string"==typeof t.sourcePath?e.loadSVGFromURL(t.sourcePath,(function(e){var i=e[0];i.setOptions(t),n&&n(i)})):e.Object._fromObject("Path",t,n,"path")},e.Path.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat(["d"]),e.Path.fromElement=function(t,n,i){var o=e.parseAttributes(t,e.Path.ATTRIBUTE_NAMES);o.fromSVG=!0,n(new e.Path(o.d,r(o,i)))})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.array.min,i=e.util.array.max;e.Group||(e.Group=e.util.createClass(e.Object,e.Collection,{type:"group",strokeWidth:0,subTargetCheck:!1,cacheProperties:[],useSetOnGroup:!1,initialize:function(t,e,n){e=e||{},this._objects=[],n&&this.callSuper("initialize",e),this._objects=t||[];for(var i=this._objects.length;i--;)this._objects[i].group=this;if(n)this._updateObjectsACoords();else{var r=e&&e.centerPoint;void 0!==e.originX&&(this.originX=e.originX),void 0!==e.originY&&(this.originY=e.originY),r||this._calcBounds(),this._updateObjectsCoords(r),delete e.centerPoint,this.callSuper("initialize",e)}this.setCoords()},_updateObjectsACoords:function(){for(var t=this._objects.length;t--;)this._objects[t].setCoords(!0,!0)},_updateObjectsCoords:function(t){t=t||this.getCenterPoint();for(var e=this._objects.length;e--;)this._updateObjectCoords(this._objects[e],t)},_updateObjectCoords:function(t,e){t.set({left:t.left-e.x,top:t.top-e.y}),t.group=this,t.setCoords(!0,!0)},toString:function(){return"#<fabric.Group: ("+this.complexity()+")>"},addWithUpdate:function(t){return this._restoreObjectsState(),e.util.resetObjectTransform(this),t&&(this._objects.push(t),t.group=this,t._set("canvas",this.canvas)),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},removeWithUpdate:function(t){return this._restoreObjectsState(),e.util.resetObjectTransform(this),this.remove(t),this._calcBounds(),this._updateObjectsCoords(),this.setCoords(),this.dirty=!0,this},_onObjectAdded:function(t){this.dirty=!0,t.group=this,t._set("canvas",this.canvas)},_onObjectRemoved:function(t){this.dirty=!0,delete t.group},_set:function(t,n){var i=this._objects.length;if(this.useSetOnGroup)for(;i--;)this._objects[i].setOnGroup(t,n);if("canvas"===t)for(;i--;)this._objects[i]._set(t,n);e.Object.prototype._set.call(this,t,n)},toObject:function(t){var n=this.includeDefaultValues,i=this._objects.map((function(e){var i=e.includeDefaultValues;e.includeDefaultValues=n;var r=e.toObject(t);return e.includeDefaultValues=i,r})),r=e.Object.prototype.toObject.call(this,t);return r.objects=i,r},toDatalessObject:function(t){var n,i=this.sourcePath;if(i)n=i;else{var r=this.includeDefaultValues;n=this._objects.map((function(e){var n=e.includeDefaultValues;e.includeDefaultValues=r;var i=e.toDatalessObject(t);return e.includeDefaultValues=n,i}))}var o=e.Object.prototype.toDatalessObject.call(this,t);return o.objects=n,o},render:function(t){this._transformDone=!0,this.callSuper("render",t),this._transformDone=!1},shouldCache:function(){var t=e.Object.prototype.shouldCache.call(this);if(t)for(var n=0,i=this._objects.length;n<i;n++)if(this._objects[n].willDrawShadow())return this.ownCaching=!1,!1;return t},willDrawShadow:function(){if(e.Object.prototype.willDrawShadow.call(this))return!0;for(var t=0,n=this._objects.length;t<n;t++)if(this._objects[t].willDrawShadow())return!0;return!1},isOnACache:function(){return this.ownCaching||this.group&&this.group.isOnACache()},drawObject:function(t){for(var e=0,n=this._objects.length;e<n;e++)this._objects[e].render(t);this._drawClipPath(t)},isCacheDirty:function(t){if(this.callSuper("isCacheDirty",t))return!0;if(!this.statefullCache)return!1;for(var e=0,n=this._objects.length;e<n;e++)if(this._objects[e].isCacheDirty(!0)){if(this._cacheCanvas){var i=this.cacheWidth/this.zoomX,r=this.cacheHeight/this.zoomY;this._cacheContext.clearRect(-i/2,-r/2,i,r)}return!0}return!1},_restoreObjectsState:function(){return this._objects.forEach(this._restoreObjectState,this),this},realizeTransform:function(t){var n=t.calcTransformMatrix(),i=e.util.qrDecompose(n),r=new e.Point(i.translateX,i.translateY);return t.flipX=!1,t.flipY=!1,t.set("scaleX",i.scaleX),t.set("scaleY",i.scaleY),t.skewX=i.skewX,t.skewY=i.skewY,t.angle=i.angle,t.setPositionByOrigin(r,"center","center"),t},_restoreObjectState:function(t){return this.realizeTransform(t),t.setCoords(),delete t.group,this},destroy:function(){return this._objects.forEach((function(t){t.set("dirty",!0)})),this._restoreObjectsState()},toActiveSelection:function(){if(this.canvas){var t=this._objects,n=this.canvas;this._objects=[];var i=this.toObject();delete i.objects;var r=new e.ActiveSelection([]);return r.set(i),r.type="activeSelection",n.remove(this),t.forEach((function(t){t.group=r,t.dirty=!0,n.add(t)})),r.canvas=n,r._objects=t,n._activeObject=r,r.setCoords(),r}},ungroupOnCanvas:function(){return this._restoreObjectsState()},setObjectsCoords:function(){return this.forEachObject((function(t){t.setCoords(!0,!0)})),this},_calcBounds:function(t){for(var e,n,i,r=[],o=[],a=["tr","br","bl","tl"],s=0,l=this._objects.length,c=a.length;s<l;++s)for((e=this._objects[s]).setCoords(!0),i=0;i<c;i++)r.push(e.oCoords[n=a[i]].x),o.push(e.oCoords[n].y);this._getBounds(r,o,t)},_getBounds:function(t,r,o){var a=new e.Point(n(t),n(r)),s=new e.Point(i(t),i(r)),l=a.y||0,c=a.x||0,u=s.y-a.y||0;this.width=s.x-a.x||0,this.height=u,o||this.setPositionByOrigin({x:c,y:l},"left","top")},_toSVG:function(t){for(var e=["<g ","COMMON_PARTS"," >\n"],n=0,i=this._objects.length;n<i;n++)e.push("\t\t",this._objects[n].toSVG(t));return e.push("</g>\n"),e},getSvgStyles:function(){var t=this.visible?"":" visibility: hidden;";return[void 0!==this.opacity&&1!==this.opacity?"opacity: "+this.opacity+";":"",this.getSvgFilter(),t].join("")},toClipPathSVG:function(t){for(var e=[],n=0,i=this._objects.length;n<i;n++)e.push("\t",this._objects[n].toClipPathSVG(t));return this._createBaseClipPathSVGMarkup(e,{reviver:t})}}),e.Group.fromObject=function(t,n){var i=t.objects,r=e.util.object.clone(t,!0);delete r.objects,"string"!=typeof i?e.util.enlivenObjects(i,(function(i){e.util.enlivenObjects([t.clipPath],(function(r){var o=e.util.object.clone(t,!0);o.clipPath=r[0],delete o.objects,n&&n(new e.Group(i,o,!0))}))})):e.loadSVGFromURL(i,(function(o){var a=e.util.groupSVGElements(o,t,i);a.set(r),n&&n(a)}))})}(e),function(t){"use strict";var e=t.fabric||(t.fabric={});e.ActiveSelection||(e.ActiveSelection=e.util.createClass(e.Group,{type:"activeSelection",initialize:function(t,n){n=n||{},this._objects=t||[];for(var i=this._objects.length;i--;)this._objects[i].group=this;n.originX&&(this.originX=n.originX),n.originY&&(this.originY=n.originY),this._calcBounds(),this._updateObjectsCoords(),e.Object.prototype.initialize.call(this,n),this.setCoords()},toGroup:function(){var t=this._objects.concat();this._objects=[];var n=e.Object.prototype.toObject.call(this),i=new e.Group([]);if(delete n.type,i.set(n),t.forEach((function(t){t.canvas.remove(t),t.group=i})),i._objects=t,!this.canvas)return i;var r=this.canvas;return r.add(i),r._activeObject=i,i.setCoords(),i},onDeselect:function(){return this.destroy(),!1},toString:function(){return"#<fabric.ActiveSelection: ("+this.complexity()+")>"},shouldCache:function(){return!1},isOnACache:function(){return!1},_renderControls:function(t,e,n){t.save(),t.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1,this.callSuper("_renderControls",t,e),void 0===(n=n||{}).hasControls&&(n.hasControls=!1),void 0===n.hasRotatingPoint&&(n.hasRotatingPoint=!1),n.forActiveSelection=!0;for(var i=0,r=this._objects.length;i<r;i++)this._objects[i]._renderControls(t,n);t.restore()}}),e.ActiveSelection.fromObject=function(t,n){e.util.enlivenObjects(t.objects,(function(i){delete t.objects,n&&n(new e.ActiveSelection(i,t,!0))}))})}(e),function(t){"use strict";var e=g.util.object.extend;t.fabric||(t.fabric={}),t.fabric.Image?g.warn("fabric.Image is already defined."):(g.Image=g.util.createClass(g.Object,{type:"image",crossOrigin:"",strokeWidth:0,srcFromAttribute:!1,_lastScaleX:1,_lastScaleY:1,_filterScalingX:1,_filterScalingY:1,minimumScaleTrigger:.5,stateProperties:g.Object.prototype.stateProperties.concat("cropX","cropY"),cacheKey:"",cropX:0,cropY:0,initialize:function(t,e){e||(e={}),this.filters=[],this.cacheKey="texture"+g.Object.__uid++,this.callSuper("initialize",e),this._initElement(t,e)},getElement:function(){return this._element||{}},setElement:function(t,e){return this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._element=t,this._originalElement=t,this._initConfig(e),0!==this.filters.length&&this.applyFilters(),this.resizeFilter&&this.applyResizeFilters(),this},removeTexture:function(t){var e=g.filterBackend;e&&e.evictCachesForKey&&e.evictCachesForKey(t)},dispose:function(){this.removeTexture(this.cacheKey),this.removeTexture(this.cacheKey+"_filtered"),this._cacheContext=void 0,["_originalElement","_element","_filteredEl","_cacheCanvas"].forEach((function(t){g.util.cleanUpJsdomNode(this[t]),this[t]=void 0}).bind(this))},setCrossOrigin:function(t){return this.crossOrigin=t,this._element.crossOrigin=t,this},getOriginalSize:function(){var t=this.getElement();return{width:t.naturalWidth||t.width,height:t.naturalHeight||t.height}},_stroke:function(t){if(this.stroke&&0!==this.strokeWidth){var e=this.width/2,n=this.height/2;t.beginPath(),t.moveTo(-e,-n),t.lineTo(e,-n),t.lineTo(e,n),t.lineTo(-e,n),t.lineTo(-e,-n),t.closePath()}},_renderDashedStroke:function(t){var e=-this.width/2,n=-this.height/2,i=this.width,r=this.height;t.save(),this._setStrokeStyles(t,this),t.beginPath(),g.util.drawDashedLine(t,e,n,e+i,n,this.strokeDashArray),g.util.drawDashedLine(t,e+i,n,e+i,n+r,this.strokeDashArray),g.util.drawDashedLine(t,e+i,n+r,e,n+r,this.strokeDashArray),g.util.drawDashedLine(t,e,n+r,e,n,this.strokeDashArray),t.closePath(),t.restore()},toObject:function(t){var n=[];this.filters.forEach((function(t){t&&n.push(t.toObject())}));var i=e(this.callSuper("toObject",["crossOrigin","cropX","cropY"].concat(t)),{src:this.getSrc(),filters:n});return this.resizeFilter&&(i.resizeFilter=this.resizeFilter.toObject()),i},hasCrop:function(){return this.cropX||this.cropY||this.width<this._element.width||this.height<this._element.height},_toSVG:function(){var t,e=[],n=[],i=-this.width/2,r=-this.height/2,o="";if(this.hasCrop()){var a=g.Object.__uid++;e.push('<clipPath id="imageCrop_'+a+'">\n','\t<rect x="'+i+'" y="'+r+'" width="'+this.width+'" height="'+this.height+'" />\n',"</clipPath>\n"),o=' clip-path="url(#imageCrop_'+a+')" '}if(n.push("\t<image ","COMMON_PARTS",'xlink:href="',this.getSvgSrc(!0),'" x="',i-this.cropX,'" y="',r-this.cropY,'" width="',this._element.width||this._element.naturalWidth,'" height="',this._element.height||this._element.height,'"',o,"></image>\n"),this.stroke||this.strokeDashArray){var s=this.fill;this.fill=null,t=["\t<rect ",'x="',i,'" y="',r,'" width="',this.width,'" height="',this.height,'" style="',this.getSvgStyles(),'"/>\n'],this.fill=s}return"fill"!==this.paintFirst?e.concat(t,n):e.concat(n,t)},getSrc:function(t){var e=t?this._element:this._originalElement;return e?e.toDataURL?e.toDataURL():this.srcFromAttribute?e.getAttribute("src"):e.src:this.src||""},setSrc:function(t,e,n){return g.util.loadImage(t,(function(t){this.setElement(t,n),this._setWidthHeight(),e&&e(this)}),this,n&&n.crossOrigin),this},toString:function(){return'#<fabric.Image: { src: "'+this.getSrc()+'" }>'},applyResizeFilters:function(){var t=this.resizeFilter,e=this.minimumScaleTrigger,n=this.getTotalObjectScaling(),i=n.scaleX,r=n.scaleY,o=this._filteredEl||this._originalElement;if(this.group&&this.set("dirty",!0),!t||i>e&&r>e)return this._element=o,this._filterScalingX=1,this._filterScalingY=1,this._lastScaleX=i,void(this._lastScaleY=r);g.filterBackend||(g.filterBackend=g.initFilterBackend());var a=g.util.createCanvasElement(),s=this._filteredEl?this.cacheKey+"_filtered":this.cacheKey,l=o.width,c=o.height;a.width=l,a.height=c,this._element=a,this._lastScaleX=t.scaleX=i,this._lastScaleY=t.scaleY=r,g.filterBackend.applyFilters([t],o,l,c,this._element,s),this._filterScalingX=a.width/this._originalElement.width,this._filterScalingY=a.height/this._originalElement.height},applyFilters:function(t){if(t=(t=t||this.filters||[]).filter((function(t){return t&&!t.isNeutralState()})),this.set("dirty",!0),this.removeTexture(this.cacheKey+"_filtered"),0===t.length)return this._element=this._originalElement,this._filteredEl=null,this._filterScalingX=1,this._filterScalingY=1,this;var e=this._originalElement,n=e.naturalWidth||e.width,i=e.naturalHeight||e.height;if(this._element===this._originalElement){var r=g.util.createCanvasElement();r.width=n,r.height=i,this._element=r,this._filteredEl=r}else this._element=this._filteredEl,this._filteredEl.getContext("2d").clearRect(0,0,n,i),this._lastScaleX=1,this._lastScaleY=1;return g.filterBackend||(g.filterBackend=g.initFilterBackend()),g.filterBackend.applyFilters(t,this._originalElement,n,i,this._element,this.cacheKey),this._originalElement.width===this._element.width&&this._originalElement.height===this._element.height||(this._filterScalingX=this._element.width/this._originalElement.width,this._filterScalingY=this._element.height/this._originalElement.height),this},_render:function(t){!0!==this.isMoving&&this.resizeFilter&&this._needsResize()&&this.applyResizeFilters(),this._stroke(t),this._renderPaintInOrder(t)},shouldCache:function(){return this.needsItsOwnCache()},_renderFill:function(t){var e=this._element,n=this.width,i=this.height,r=Math.min(e.naturalWidth||e.width,n*this._filterScalingX),o=Math.min(e.naturalHeight||e.height,i*this._filterScalingY),a=-n/2,s=-i/2,l=Math.max(0,this.cropX*this._filterScalingX),c=Math.max(0,this.cropY*this._filterScalingY);e&&t.drawImage(e,l,c,r,o,a,s,n,i)},_needsResize:function(){var t=this.getTotalObjectScaling();return t.scaleX!==this._lastScaleX||t.scaleY!==this._lastScaleY},_resetWidthHeight:function(){this.set(this.getOriginalSize())},_initElement:function(t,e){this.setElement(g.util.getById(t),e),g.util.addClass(this.getElement(),g.Image.CSS_CANVAS)},_initConfig:function(t){t||(t={}),this.setOptions(t),this._setWidthHeight(t),this._element&&this.crossOrigin&&(this._element.crossOrigin=this.crossOrigin)},_initFilters:function(t,e){t&&t.length?g.util.enlivenObjects(t,(function(t){e&&e(t)}),"fabric.Image.filters"):e&&e()},_setWidthHeight:function(t){t||(t={});var e=this.getElement();this.width=t.width||e.naturalWidth||e.width||0,this.height=t.height||e.naturalHeight||e.height||0},parsePreserveAspectRatioAttribute:function(){var t,e=g.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio||""),n=this._element.width,i=this._element.height,r=1,o=1,a=0,s=0,l=0,c=0,u=this.width,h=this.height,f={width:u,height:h};return!e||"none"===e.alignX&&"none"===e.alignY?(r=u/n,o=h/i):("meet"===e.meetOrSlice&&(t=(u-n*(r=o=g.util.findScaleToFit(this._element,f)))/2,"Min"===e.alignX&&(a=-t),"Max"===e.alignX&&(a=t),t=(h-i*o)/2,"Min"===e.alignY&&(s=-t),"Max"===e.alignY&&(s=t)),"slice"===e.meetOrSlice&&(t=n-u/(r=o=g.util.findScaleToCover(this._element,f)),"Mid"===e.alignX&&(l=t/2),"Max"===e.alignX&&(l=t),t=i-h/o,"Mid"===e.alignY&&(c=t/2),"Max"===e.alignY&&(c=t),n=u/r,i=h/o)),{width:n,height:i,scaleX:r,scaleY:o,offsetLeft:a,offsetTop:s,cropX:l,cropY:c}}}),g.Image.CSS_CANVAS="canvas-img",g.Image.prototype.getSvgSrc=g.Image.prototype.getSrc,g.Image.fromObject=function(t,e){var n=g.util.object.clone(t);g.util.loadImage(n.src,(function(t,i){i?e&&e(null,i):g.Image.prototype._initFilters.call(n,n.filters,(function(i){n.filters=i||[],g.Image.prototype._initFilters.call(n,[n.resizeFilter],(function(i){n.resizeFilter=i[0],g.util.enlivenObjects([n.clipPath],(function(i){n.clipPath=i[0];var r=new g.Image(t,n);e(r)}))}))}))}),null,n.crossOrigin)},g.Image.fromURL=function(t,e,n){g.util.loadImage(t,(function(t){e&&e(new g.Image(t,n))}),null,n&&n.crossOrigin)},g.Image.ATTRIBUTE_NAMES=g.SHARED_ATTRIBUTES.concat("x y width height preserveAspectRatio xlink:href crossOrigin".split(" ")),g.Image.fromElement=function(t,n,i){var r=g.parseAttributes(t,g.Image.ATTRIBUTE_NAMES);g.Image.fromURL(r["xlink:href"],n,e(i?g.util.object.clone(i):{},r))})}(e),g.util.object.extend(g.Object.prototype,{_getAngleValueForStraighten:function(){var t=this.angle%360;return t>0?90*Math.round((t-1)/90):90*Math.round(t/90)},straighten:function(){return this.rotate(this._getAngleValueForStraighten()),this},fxStraighten:function(t){var e=function(){},n=(t=t||{}).onComplete||e,i=t.onChange||e,r=this;return g.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(t){r.rotate(t),i()},onComplete:function(){r.setCoords(),n()}}),this}}),g.util.object.extend(g.StaticCanvas.prototype,{straightenObject:function(t){return t.straighten(),this.requestRenderAll(),this},fxStraightenObject:function(t){return t.fxStraighten({onChange:this.requestRenderAllBound}),this}}),function(){"use strict";function t(t,e){var n="precision "+e+" float;\nvoid main(){}",i=t.createShader(t.FRAGMENT_SHADER);return t.shaderSource(i,n),t.compileShader(i),!!t.getShaderParameter(i,t.COMPILE_STATUS)}function e(t){t&&t.tileSize&&(this.tileSize=t.tileSize),this.setupGLContext(this.tileSize,this.tileSize),this.captureGPUInfo()}g.isWebglSupported=function(e){if(g.isLikelyNode)return!1;e=e||g.WebglFilterBackend.prototype.tileSize;var n=document.createElement("canvas"),i=n.getContext("webgl")||n.getContext("experimental-webgl"),r=!1;if(i){g.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),r=g.maxTextureSize>=e;for(var o=["highp","mediump","lowp"],a=0;a<3;a++)if(t(i,o[a])){g.webGlPrecision=o[a];break}}return this.isSupported=r,r},g.WebglFilterBackend=e,e.prototype={tileSize:2048,resources:{},setupGLContext:function(t,e){this.dispose(),this.createWebGLCanvas(t,e),this.aPosition=new Float32Array([0,0,0,1,1,0,1,1]),this.chooseFastestCopyGLTo2DMethod(t,e)},chooseFastestCopyGLTo2DMethod:function(t,e){var n,i=void 0!==window.performance;try{new ImageData(1,1),n=!0}catch(h){n=!1}var r="undefined"!=typeof ArrayBuffer,o="undefined"!=typeof Uint8ClampedArray;if(i&&n&&r&&o){var a=g.util.createCanvasElement(),s=new ArrayBuffer(t*e*4);if(g.forceGLPutImageData)return this.imageBuffer=s,void(this.copyGLTo2D=_);var l,c,u={imageBuffer:s,destinationWidth:t,destinationHeight:e,targetCanvas:a};a.width=t,a.height=e,l=window.performance.now(),y.call(u,this.gl,u),c=window.performance.now()-l,l=window.performance.now(),_.call(u,this.gl,u),c>window.performance.now()-l?(this.imageBuffer=s,this.copyGLTo2D=_):this.copyGLTo2D=y}},createWebGLCanvas:function(t,e){var n=g.util.createCanvasElement();n.width=t,n.height=e;var i={alpha:!0,premultipliedAlpha:!1,depth:!1,stencil:!1,antialias:!1},r=n.getContext("webgl",i);r||(r=n.getContext("experimental-webgl",i)),r&&(r.clearColor(0,0,0,0),this.canvas=n,this.gl=r)},applyFilters:function(t,e,n,i,r,o){var a,s=this.gl;o&&(a=this.getCachedTexture(o,e));var l={originalWidth:e.width||e.originalWidth,originalHeight:e.height||e.originalHeight,sourceWidth:n,sourceHeight:i,destinationWidth:n,destinationHeight:i,context:s,sourceTexture:this.createTexture(s,n,i,!a&&e),targetTexture:this.createTexture(s,n,i),originalTexture:a||this.createTexture(s,n,i,!a&&e),passes:t.length,webgl:!0,aPosition:this.aPosition,programCache:this.programCache,pass:0,filterBackend:this,targetCanvas:r},c=s.createFramebuffer();return s.bindFramebuffer(s.FRAMEBUFFER,c),t.forEach((function(t){t&&t.applyTo(l)})),function(t){var e=t.targetCanvas,n=t.destinationWidth,i=t.destinationHeight;e.width===n&&e.height===i||(e.width=n,e.height=i)}(l),this.copyGLTo2D(s,l),s.bindTexture(s.TEXTURE_2D,null),s.deleteTexture(l.sourceTexture),s.deleteTexture(l.targetTexture),s.deleteFramebuffer(c),r.getContext("2d").setTransform(1,0,0,1,0,0),l},dispose:function(){this.canvas&&(this.canvas=null,this.gl=null),this.clearWebGLCaches()},clearWebGLCaches:function(){this.programCache={},this.textureCache={}},createTexture:function(t,e,n,i){var r=t.createTexture();return t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),i?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,n,0,t.RGBA,t.UNSIGNED_BYTE,null),r},getCachedTexture:function(t,e){if(this.textureCache[t])return this.textureCache[t];var n=this.createTexture(this.gl,e.width,e.height,e);return this.textureCache[t]=n,n},evictCachesForKey:function(t){this.textureCache[t]&&(this.gl.deleteTexture(this.textureCache[t]),delete this.textureCache[t])},copyGLTo2D:y,captureGPUInfo:function(){if(this.gpuInfo)return this.gpuInfo;var t=this.gl,e={renderer:"",vendor:""};if(!t)return e;var n=t.getExtension("WEBGL_debug_renderer_info");if(n){var i=t.getParameter(n.UNMASKED_RENDERER_WEBGL),r=t.getParameter(n.UNMASKED_VENDOR_WEBGL);i&&(e.renderer=i.toLowerCase()),r&&(e.vendor=r.toLowerCase())}return this.gpuInfo=e,e}}}(),function(){"use strict";var t=function(){};function e(){}g.Canvas2dFilterBackend=e,e.prototype={evictCachesForKey:t,dispose:t,clearWebGLCaches:t,resources:{},applyFilters:function(t,e,n,i,r){var o=r.getContext("2d");o.drawImage(e,0,0,n,i);var a={sourceWidth:n,sourceHeight:i,imageData:o.getImageData(0,0,n,i),originalEl:e,originalImageData:o.getImageData(0,0,n,i),canvasEl:r,ctx:o,filterBackend:this};return t.forEach((function(t){t.applyTo(a)})),a.imageData.width===n&&a.imageData.height===i||(r.width=a.imageData.width,r.height=a.imageData.height),o.putImageData(a.imageData,0,0),a}}}(),g.Image=g.Image||{},g.Image.filters=g.Image.filters||{},g.Image.filters.BaseFilter=g.util.createClass({type:"BaseFilter",vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvoid main() {\nvTexCoord = aPosition;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:"precision highp float;\nvarying vec2 vTexCoord;\nuniform sampler2D uTexture;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\n}",initialize:function(t){t&&this.setOptions(t)},setOptions:function(t){for(var e in t)this[e]=t[e]},createProgram:function(t,e,n){e=e||this.fragmentSource,n=n||this.vertexSource,"highp"!==g.webGlPrecision&&(e=e.replace(/precision highp float/g,"precision "+g.webGlPrecision+" float"));var i=t.createShader(t.VERTEX_SHADER);if(t.shaderSource(i,n),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS))throw new Error("Vertex shader compile error for "+this.type+": "+t.getShaderInfoLog(i));var r=t.createShader(t.FRAGMENT_SHADER);if(t.shaderSource(r,e),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))throw new Error("Fragment shader compile error for "+this.type+": "+t.getShaderInfoLog(r));var o=t.createProgram();if(t.attachShader(o,i),t.attachShader(o,r),t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS))throw new Error('Shader link error for "${this.type}" '+t.getProgramInfoLog(o));var a=this.getAttributeLocations(t,o),s=this.getUniformLocations(t,o)||{};return s.uStepW=t.getUniformLocation(o,"uStepW"),s.uStepH=t.getUniformLocation(o,"uStepH"),{program:o,attributeLocations:a,uniformLocations:s}},getAttributeLocations:function(t,e){return{aPosition:t.getAttribLocation(e,"aPosition")}},getUniformLocations:function(){return{}},sendAttributeData:function(t,e,n){var i=e.aPosition,r=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,r),t.enableVertexAttribArray(i),t.vertexAttribPointer(i,2,t.FLOAT,!1,0,0),t.bufferData(t.ARRAY_BUFFER,n,t.STATIC_DRAW)},_setupFrameBuffer:function(t){var e,n,i=t.context;t.passes>1?(n=t.destinationHeight,t.sourceWidth===(e=t.destinationWidth)&&t.sourceHeight===n||(i.deleteTexture(t.targetTexture),t.targetTexture=t.filterBackend.createTexture(i,e,n)),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,t.targetTexture,0)):(i.bindFramebuffer(i.FRAMEBUFFER,null),i.finish())},_swapTextures:function(t){t.passes--,t.pass++;var e=t.targetTexture;t.targetTexture=t.sourceTexture,t.sourceTexture=e},isNeutralState:function(){var t=this.mainParameter,e=g.Image.filters[this.type].prototype;if(t){if(Array.isArray(e[t])){for(var n=e[t].length;n--;)if(this[t][n]!==e[t][n])return!1;return!0}return e[t]===this[t]}return!1},applyTo:function(t){t.webgl?(this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t)):this.applyTo2d(t)},retrieveShader:function(t){return t.programCache.hasOwnProperty(this.type)||(t.programCache[this.type]=this.createProgram(t.context)),t.programCache[this.type]},applyToWebGL:function(t){var e=t.context,n=this.retrieveShader(t);e.bindTexture(e.TEXTURE_2D,0===t.pass&&t.originalTexture?t.originalTexture:t.sourceTexture),e.useProgram(n.program),this.sendAttributeData(e,n.attributeLocations,t.aPosition),e.uniform1f(n.uniformLocations.uStepW,1/t.sourceWidth),e.uniform1f(n.uniformLocations.uStepH,1/t.sourceHeight),this.sendUniformData(e,n.uniformLocations),e.viewport(0,0,t.destinationWidth,t.destinationHeight),e.drawArrays(e.TRIANGLE_STRIP,0,4)},bindAdditionalTexture:function(t,e,n){t.activeTexture(n),t.bindTexture(t.TEXTURE_2D,e),t.activeTexture(t.TEXTURE0)},unbindAdditionalTexture:function(t,e){t.activeTexture(e),t.bindTexture(t.TEXTURE_2D,null),t.activeTexture(t.TEXTURE0)},getMainParameter:function(){return this[this.mainParameter]},setMainParameter:function(t){this[this.mainParameter]=t},sendUniformData:function(){},createHelpLayer:function(t){if(!t.helpLayer){var e=document.createElement("canvas");e.width=t.sourceWidth,e.height=t.sourceHeight,t.helpLayer=e}},toObject:function(){var t={type:this.type},e=this.mainParameter;return e&&(t[e]=this[e]),t},toJSON:function(){return this.toObject()}}),g.Image.filters.BaseFilter.fromObject=function(t,e){var n=new g.Image.filters[t.type](t);return e&&e(n),n},function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters;n.ColorMatrix=(0,e.util.createClass)(n.BaseFilter,{type:"ColorMatrix",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nuniform mat4 uColorMatrix;\nuniform vec4 uConstants;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor *= uColorMatrix;\ncolor += uConstants;\ngl_FragColor = color;\n}",matrix:[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],mainParameter:"matrix",colorsOnly:!0,initialize:function(t){this.callSuper("initialize",t),this.matrix=this.matrix.slice(0)},applyTo2d:function(t){var e,n,i,r,o,a=t.imageData.data,s=a.length,l=this.matrix,c=this.colorsOnly;for(o=0;o<s;o+=4)e=a[o],n=a[o+1],i=a[o+2],c?(a[o]=e*l[0]+n*l[1]+i*l[2]+255*l[4],a[o+1]=e*l[5]+n*l[6]+i*l[7]+255*l[9],a[o+2]=e*l[10]+n*l[11]+i*l[12]+255*l[14]):(a[o]=e*l[0]+n*l[1]+i*l[2]+(r=a[o+3])*l[3]+255*l[4],a[o+1]=e*l[5]+n*l[6]+i*l[7]+r*l[8]+255*l[9],a[o+2]=e*l[10]+n*l[11]+i*l[12]+r*l[13]+255*l[14],a[o+3]=e*l[15]+n*l[16]+i*l[17]+r*l[18]+255*l[19])},getUniformLocations:function(t,e){return{uColorMatrix:t.getUniformLocation(e,"uColorMatrix"),uConstants:t.getUniformLocation(e,"uConstants")}},sendUniformData:function(t,e){var n=this.matrix,i=[n[4],n[9],n[14],n[19]];t.uniformMatrix4fv(e.uColorMatrix,!1,[n[0],n[1],n[2],n[3],n[5],n[6],n[7],n[8],n[10],n[11],n[12],n[13],n[15],n[16],n[17],n[18]]),t.uniform4fv(e.uConstants,i)}}),e.Image.filters.ColorMatrix.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters;n.Brightness=(0,e.util.createClass)(n.BaseFilter,{type:"Brightness",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBrightness;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += uBrightness;\ngl_FragColor = color;\n}",brightness:0,mainParameter:"brightness",applyTo2d:function(t){if(0!==this.brightness){var e,n=t.imageData.data,i=n.length,r=Math.round(255*this.brightness);for(e=0;e<i;e+=4)n[e]=n[e]+r,n[e+1]=n[e+1]+r,n[e+2]=n[e+2]+r}},getUniformLocations:function(t,e){return{uBrightness:t.getUniformLocation(e,"uBrightness")}},sendUniformData:function(t,e){t.uniform1f(e.uBrightness,this.brightness)}}),e.Image.filters.Brightness.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.Image.filters;i.Convolute=(0,e.util.createClass)(i.BaseFilter,{type:"Convolute",opaque:!1,matrix:[0,0,0,0,1,0,0,0,0],fragmentSource:{Convolute_3_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1), uStepH * (h - 1));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 3.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_3_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[9];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 3.0; h+=1.0) {\nfor (float w = 0.0; w < 3.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 1.0), uStepH * (h - 1.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 3.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_5_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 5.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_5_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[25];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 5.0; h+=1.0) {\nfor (float w = 0.0; w < 5.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 2.0), uStepH * (h - 2.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 5.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_7_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 7.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_7_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[49];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 7.0; h+=1.0) {\nfor (float w = 0.0; w < 7.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 3.0), uStepH * (h - 3.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 7.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}",Convolute_9_1:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 0);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor += texture2D(uTexture, vTexCoord + matrixPos) * uMatrix[int(h * 9.0 + w)];\n}\n}\ngl_FragColor = color;\n}",Convolute_9_0:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uMatrix[81];\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = vec4(0, 0, 0, 1);\nfor (float h = 0.0; h < 9.0; h+=1.0) {\nfor (float w = 0.0; w < 9.0; w+=1.0) {\nvec2 matrixPos = vec2(uStepW * (w - 4.0), uStepH * (h - 4.0));\ncolor.rgb += texture2D(uTexture, vTexCoord + matrixPos).rgb * uMatrix[int(h * 9.0 + w)];\n}\n}\nfloat alpha = texture2D(uTexture, vTexCoord).a;\ngl_FragColor = color;\ngl_FragColor.a = alpha;\n}"},retrieveShader:function(t){var e=Math.sqrt(this.matrix.length),n=this.type+"_"+e+"_"+(this.opaque?1:0),i=this.fragmentSource[n];return t.programCache.hasOwnProperty(n)||(t.programCache[n]=this.createProgram(t.context,i)),t.programCache[n]},applyTo2d:function(t){var e,n,i,r,o,a,s,l,c,u,h,f,d,p=t.imageData,v=p.data,g=this.matrix,m=Math.round(Math.sqrt(g.length)),y=Math.floor(m/2),_=p.width,b=p.height,k=t.ctx.createImageData(_,b),C=k.data,w=this.opaque?1:0;for(h=0;h<b;h++)for(u=0;u<_;u++){for(o=4*(h*_+u),e=0,n=0,i=0,r=0,d=0;d<m;d++)for(f=0;f<m;f++)a=u+f-y,(s=h+d-y)<0||s>=b||a<0||a>=_||(e+=v[l=4*(s*_+a)]*(c=g[d*m+f]),n+=v[l+1]*c,i+=v[l+2]*c,w||(r+=v[l+3]*c));C[o]=e,C[o+1]=n,C[o+2]=i,C[o+3]=w?v[o+3]:r}t.imageData=k},getUniformLocations:function(t,e){return{uMatrix:t.getUniformLocation(e,"uMatrix"),uOpaque:t.getUniformLocation(e,"uOpaque"),uHalfSize:t.getUniformLocation(e,"uHalfSize"),uSize:t.getUniformLocation(e,"uSize")}},sendUniformData:function(t,e){t.uniform1fv(e.uMatrix,this.matrix)},toObject:function(){return n(this.callSuper("toObject"),{opaque:this.opaque,matrix:this.matrix})}}),e.Image.filters.Convolute.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters;n.Grayscale=(0,e.util.createClass)(n.BaseFilter,{type:"Grayscale",fragmentSource:{average:"precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat average = (color.r + color.b + color.g) / 3.0;\ngl_FragColor = vec4(average, average, average, color.a);\n}",lightness:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = (max(max(col.r, col.g),col.b) + min(min(col.r, col.g),col.b)) / 2.0;\ngl_FragColor = vec4(average, average, average, col.a);\n}",luminosity:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uMode;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 col = texture2D(uTexture, vTexCoord);\nfloat average = 0.21 * col.r + 0.72 * col.g + 0.07 * col.b;\ngl_FragColor = vec4(average, average, average, col.a);\n}"},mode:"average",mainParameter:"mode",applyTo2d:function(t){var e,n,i=t.imageData.data,r=i.length,o=this.mode;for(e=0;e<r;e+=4)"average"===o?n=(i[e]+i[e+1]+i[e+2])/3:"lightness"===o?n=(Math.min(i[e],i[e+1],i[e+2])+Math.max(i[e],i[e+1],i[e+2]))/2:"luminosity"===o&&(n=.21*i[e]+.72*i[e+1]+.07*i[e+2]),i[e]=n,i[e+1]=n,i[e+2]=n},retrieveShader:function(t){var e=this.type+"_"+this.mode;return t.programCache.hasOwnProperty(e)||(t.programCache[e]=this.createProgram(t.context,this.fragmentSource[this.mode])),t.programCache[e]},getUniformLocations:function(t,e){return{uMode:t.getUniformLocation(e,"uMode")}},sendUniformData:function(t,e){t.uniform1i(e.uMode,1)},isNeutralState:function(){return!1}}),e.Image.filters.Grayscale.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters;n.Invert=(0,e.util.createClass)(n.BaseFilter,{type:"Invert",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform int uInvert;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nif (uInvert == 1) {\ngl_FragColor = vec4(1.0 - color.r,1.0 -color.g,1.0 -color.b,color.a);\n} else {\ngl_FragColor = color;\n}\n}",invert:!0,mainParameter:"invert",applyTo2d:function(t){var e,n=t.imageData.data,i=n.length;for(e=0;e<i;e+=4)n[e]=255-n[e],n[e+1]=255-n[e+1],n[e+2]=255-n[e+2]},isNeutralState:function(){return!this.invert},getUniformLocations:function(t,e){return{uInvert:t.getUniformLocation(e,"uInvert")}},sendUniformData:function(t,e){t.uniform1i(e.uInvert,this.invert)}}),e.Image.filters.Invert.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.Image.filters;i.Noise=(0,e.util.createClass)(i.BaseFilter,{type:"Noise",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uStepH;\nuniform float uNoise;\nuniform float uSeed;\nvarying vec2 vTexCoord;\nfloat rand(vec2 co, float seed, float vScale) {\nreturn fract(sin(dot(co.xy * vScale ,vec2(12.9898 , 78.233))) * 43758.5453 * (seed + 0.01) / 2.0);\n}\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor.rgb += (0.5 - rand(vTexCoord, uSeed, 0.1 / uStepH)) * uNoise;\ngl_FragColor = color;\n}",mainParameter:"noise",noise:0,applyTo2d:function(t){if(0!==this.noise){var e,n,i,r=t.imageData.data,o=this.noise;for(e=0,n=r.length;e<n;e+=4)i=(.5-Math.random())*o,r[e]+=i,r[e+1]+=i,r[e+2]+=i}},getUniformLocations:function(t,e){return{uNoise:t.getUniformLocation(e,"uNoise"),uSeed:t.getUniformLocation(e,"uSeed")}},sendUniformData:function(t,e){t.uniform1f(e.uNoise,this.noise/255),t.uniform1f(e.uSeed,Math.random())},toObject:function(){return n(this.callSuper("toObject"),{noise:this.noise})}}),e.Image.filters.Noise.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters;n.Pixelate=(0,e.util.createClass)(n.BaseFilter,{type:"Pixelate",blocksize:4,mainParameter:"blocksize",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uBlocksize;\nuniform float uStepW;\nuniform float uStepH;\nvarying vec2 vTexCoord;\nvoid main() {\nfloat blockW = uBlocksize * uStepW;\nfloat blockH = uBlocksize * uStepW;\nint posX = int(vTexCoord.x / blockW);\nint posY = int(vTexCoord.y / blockH);\nfloat fposX = float(posX);\nfloat fposY = float(posY);\nvec2 squareCoords = vec2(fposX * blockW, fposY * blockH);\nvec4 color = texture2D(uTexture, squareCoords);\ngl_FragColor = color;\n}",applyTo2d:function(t){var e,n,i,r,o,a,s,l,c,u,h,f=t.imageData,d=f.data,p=f.height,v=f.width;for(n=0;n<p;n+=this.blocksize)for(i=0;i<v;i+=this.blocksize)for(r=d[e=4*n*v+4*i],o=d[e+1],a=d[e+2],s=d[e+3],u=Math.min(n+this.blocksize,p),h=Math.min(i+this.blocksize,v),l=n;l<u;l++)for(c=i;c<h;c++)d[e=4*l*v+4*c]=r,d[e+1]=o,d[e+2]=a,d[e+3]=s},isNeutralState:function(){return 1===this.blocksize},getUniformLocations:function(t,e){return{uBlocksize:t.getUniformLocation(e,"uBlocksize"),uStepW:t.getUniformLocation(e,"uStepW"),uStepH:t.getUniformLocation(e,"uStepH")}},sendUniformData:function(t,e){t.uniform1f(e.uBlocksize,this.blocksize)}}),e.Image.filters.Pixelate.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.extend,i=e.Image.filters;i.RemoveColor=(0,e.util.createClass)(i.BaseFilter,{type:"RemoveColor",color:"#FFFFFF",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uLow;\nuniform vec4 uHigh;\nvarying vec2 vTexCoord;\nvoid main() {\ngl_FragColor = texture2D(uTexture, vTexCoord);\nif(all(greaterThan(gl_FragColor.rgb,uLow.rgb)) && all(greaterThan(uHigh.rgb,gl_FragColor.rgb))) {\ngl_FragColor.a = 0.0;\n}\n}",distance:.02,useAlpha:!1,applyTo2d:function(t){var n,i,r,o,a=t.imageData.data,s=255*this.distance,l=new e.Color(this.color).getSource(),c=[l[0]-s,l[1]-s,l[2]-s],u=[l[0]+s,l[1]+s,l[2]+s];for(n=0;n<a.length;n+=4)r=a[n+1],o=a[n+2],(i=a[n])>c[0]&&r>c[1]&&o>c[2]&&i<u[0]&&r<u[1]&&o<u[2]&&(a[n+3]=0)},getUniformLocations:function(t,e){return{uLow:t.getUniformLocation(e,"uLow"),uHigh:t.getUniformLocation(e,"uHigh")}},sendUniformData:function(t,n){var i=new e.Color(this.color).getSource(),r=parseFloat(this.distance),o=[i[0]/255+r,i[1]/255+r,i[2]/255+r,1];t.uniform4fv(n.uLow,[0+i[0]/255-r,0+i[1]/255-r,0+i[2]/255-r,1]),t.uniform4fv(n.uHigh,o)},toObject:function(){return n(this.callSuper("toObject"),{color:this.color,distance:this.distance})}}),e.Image.filters.RemoveColor.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters,i=e.util.createClass,r={Brownie:[.5997,.34553,-.27082,0,.186,-.0377,.86095,.15059,0,-.1449,.24113,-.07441,.44972,0,-.02965,0,0,0,1,0],Vintage:[.62793,.32021,-.03965,0,.03784,.02578,.64411,.03259,0,.02926,.0466,-.08512,.52416,0,.02023,0,0,0,1,0],Kodachrome:[1.12855,-.39673,-.03992,0,.24991,-.16404,1.08352,-.05498,0,.09698,-.16786,-.56034,1.60148,0,.13972,0,0,0,1,0],Technicolor:[1.91252,-.85453,-.09155,0,.04624,-.30878,1.76589,-.10601,0,-.27589,-.2311,-.75018,1.84759,0,.12137,0,0,0,1,0],Polaroid:[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],Sepia:[.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0],BlackWhite:[1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,1.5,1.5,1.5,0,-1,0,0,0,1,0]};for(var o in r)n[o]=i(n.ColorMatrix,{type:o,matrix:r[o],mainParameter:!1,colorsOnly:!0}),e.Image.filters[o].fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric,n=e.Image.filters;n.BlendColor=(0,e.util.createClass)(n.BaseFilter,{type:"BlendColor",color:"#F95C63",mode:"multiply",alpha:1,fragmentSource:{multiply:"gl_FragColor.rgb *= uColor.rgb;\n",screen:"gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);\n",add:"gl_FragColor.rgb += uColor.rgb;\n",diff:"gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb);\n",subtract:"gl_FragColor.rgb -= uColor.rgb;\n",lighten:"gl_FragColor.rgb = max(gl_FragColor.rgb, uColor.rgb);\n",darken:"gl_FragColor.rgb = min(gl_FragColor.rgb, uColor.rgb);\n",exclusion:"gl_FragColor.rgb += uColor.rgb - 2.0 * (uColor.rgb * gl_FragColor.rgb);\n",overlay:"if (uColor.r < 0.5) {\ngl_FragColor.r *= 2.0 * uColor.r;\n} else {\ngl_FragColor.r = 1.0 - 2.0 * (1.0 - gl_FragColor.r) * (1.0 - uColor.r);\n}\nif (uColor.g < 0.5) {\ngl_FragColor.g *= 2.0 * uColor.g;\n} else {\ngl_FragColor.g = 1.0 - 2.0 * (1.0 - gl_FragColor.g) * (1.0 - uColor.g);\n}\nif (uColor.b < 0.5) {\ngl_FragColor.b *= 2.0 * uColor.b;\n} else {\ngl_FragColor.b = 1.0 - 2.0 * (1.0 - gl_FragColor.b) * (1.0 - uColor.b);\n}\n",tint:"gl_FragColor.rgb *= (1.0 - uColor.a);\ngl_FragColor.rgb += uColor.rgb;\n"},buildSource:function(t){return"precision highp float;\nuniform sampler2D uTexture;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ngl_FragColor = color;\nif (color.a > 0.0) {\n"+this.fragmentSource[t]+"}\n}"},retrieveShader:function(t){var e,n=this.type+"_"+this.mode;return t.programCache.hasOwnProperty(n)||(e=this.buildSource(this.mode),t.programCache[n]=this.createProgram(t.context,e)),t.programCache[n]},applyTo2d:function(t){var n,i,r,o,a,s,l,c=t.imageData.data,u=c.length,h=1-this.alpha;n=(l=new e.Color(this.color).getSource())[0]*this.alpha,i=l[1]*this.alpha,r=l[2]*this.alpha;for(var f=0;f<u;f+=4)switch(o=c[f],a=c[f+1],s=c[f+2],this.mode){case"multiply":c[f]=o*n/255,c[f+1]=a*i/255,c[f+2]=s*r/255;break;case"screen":c[f]=255-(255-o)*(255-n)/255,c[f+1]=255-(255-a)*(255-i)/255,c[f+2]=255-(255-s)*(255-r)/255;break;case"add":c[f]=o+n,c[f+1]=a+i,c[f+2]=s+r;break;case"diff":case"difference":c[f]=Math.abs(o-n),c[f+1]=Math.abs(a-i),c[f+2]=Math.abs(s-r);break;case"subtract":c[f]=o-n,c[f+1]=a-i,c[f+2]=s-r;break;case"darken":c[f]=Math.min(o,n),c[f+1]=Math.min(a,i),c[f+2]=Math.min(s,r);break;case"lighten":c[f]=Math.max(o,n),c[f+1]=Math.max(a,i),c[f+2]=Math.max(s,r);break;case"overlay":c[f]=n<128?2*o*n/255:255-2*(255-o)*(255-n)/255,c[f+1]=i<128?2*a*i/255:255-2*(255-a)*(255-i)/255,c[f+2]=r<128?2*s*r/255:255-2*(255-s)*(255-r)/255;break;case"exclusion":c[f]=n+o-2*n*o/255,c[f+1]=i+a-2*i*a/255,c[f+2]=r+s-2*r*s/255;break;case"tint":c[f]=n+o*h,c[f+1]=i+a*h,c[f+2]=r+s*h}},getUniformLocations:function(t,e){return{uColor:t.getUniformLocation(e,"uColor")}},sendUniformData:function(t,n){var i=new e.Color(this.color).getSource();i[0]=this.alpha*i[0]/255,i[1]=this.alpha*i[1]/255,i[2]=this.alpha*i[2]/255,i[3]=this.alpha,t.uniform4fv(n.uColor,i)},toObject:function(){return{type:this.type,color:this.color,mode:this.mode,alpha:this.alpha}}}),e.Image.filters.BlendColor.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric,n=e.Image.filters;n.BlendImage=(0,e.util.createClass)(n.BaseFilter,{type:"BlendImage",image:null,mode:"multiply",alpha:1,vertexSource:"attribute vec2 aPosition;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nuniform mat3 uTransformMatrix;\nvoid main() {\nvTexCoord = aPosition;\nvTexCoord2 = (uTransformMatrix * vec3(aPosition, 1.0)).xy;\ngl_Position = vec4(aPosition * 2.0 - 1.0, 0.0, 1.0);\n}",fragmentSource:{multiply:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.rgba *= color2.rgba;\ngl_FragColor = color;\n}",mask:"precision highp float;\nuniform sampler2D uTexture;\nuniform sampler2D uImage;\nuniform vec4 uColor;\nvarying vec2 vTexCoord;\nvarying vec2 vTexCoord2;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec4 color2 = texture2D(uImage, vTexCoord2);\ncolor.a = color2.a;\ngl_FragColor = color;\n}"},retrieveShader:function(t){var e=this.type+"_"+this.mode,n=this.fragmentSource[this.mode];return t.programCache.hasOwnProperty(e)||(t.programCache[e]=this.createProgram(t.context,n)),t.programCache[e]},applyToWebGL:function(t){var e=t.context,n=this.createTexture(t.filterBackend,this.image);this.bindAdditionalTexture(e,n,e.TEXTURE1),this.callSuper("applyToWebGL",t),this.unbindAdditionalTexture(e,e.TEXTURE1)},createTexture:function(t,e){return t.getCachedTexture(e.cacheKey,e._element)},calculateMatrix:function(){var t=this.image;return[1/t.scaleX,0,0,0,1/t.scaleY,0,-t.left/t._element.width,-t.top/t._element.height,1]},applyTo2d:function(t){var n,i,r,o,a,s,l,c,u,h,f,d=t.imageData,p=t.filterBackend.resources,v=d.data,g=v.length,m=d.width,y=d.height,_=this.image;p.blendImage||(p.blendImage=e.util.createCanvasElement()),h=(u=p.blendImage).getContext("2d"),u.width!==m||u.height!==y?(u.width=m,u.height=y):h.clearRect(0,0,m,y),h.setTransform(_.scaleX,0,0,_.scaleY,_.left,_.top),h.drawImage(_._element,0,0,m,y),f=h.getImageData(0,0,m,y).data;for(var b=0;b<g;b+=4)switch(a=v[b],s=v[b+1],l=v[b+2],c=v[b+3],n=f[b],i=f[b+1],r=f[b+2],o=f[b+3],this.mode){case"multiply":v[b]=a*n/255,v[b+1]=s*i/255,v[b+2]=l*r/255,v[b+3]=c*o/255;break;case"mask":v[b+3]=o}},getUniformLocations:function(t,e){return{uTransformMatrix:t.getUniformLocation(e,"uTransformMatrix"),uImage:t.getUniformLocation(e,"uImage")}},sendUniformData:function(t,e){var n=this.calculateMatrix();t.uniform1i(e.uImage,1),t.uniformMatrix3fv(e.uTransformMatrix,!1,n)},toObject:function(){return{type:this.type,image:this.image&&this.image.toObject(),mode:this.mode,alpha:this.alpha}}}),e.Image.filters.BlendImage.fromObject=function(t,n){e.Image.fromObject(t.image,(function(i){var r=e.util.object.clone(t);r.image=i,n(new e.Image.filters.BlendImage(r))}))}}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=Math.pow,i=Math.floor,r=Math.sqrt,o=Math.abs,a=Math.round,s=Math.sin,l=Math.ceil,c=e.Image.filters;c.Resize=(0,e.util.createClass)(c.BaseFilter,{type:"Resize",resizeType:"hermite",scaleX:1,scaleY:1,lanczosLobes:3,getUniformLocations:function(t,e){return{uDelta:t.getUniformLocation(e,"uDelta"),uTaps:t.getUniformLocation(e,"uTaps")}},sendUniformData:function(t,e){t.uniform2fv(e.uDelta,this.horizontal?[1/this.width,0]:[0,1/this.height]),t.uniform1fv(e.uTaps,this.taps)},retrieveShader:function(t){var e=this.getFilterWindow(),n=this.type+"_"+e;if(!t.programCache.hasOwnProperty(n)){var i=this.generateShader(e);t.programCache[n]=this.createProgram(t.context,i)}return t.programCache[n]},getFilterWindow:function(){return Math.ceil(this.lanczosLobes/this.tempScale)},getTaps:function(){for(var t=this.lanczosCreate(this.lanczosLobes),e=this.tempScale,n=this.getFilterWindow(),i=new Array(n),r=1;r<=n;r++)i[r-1]=t(r*e);return i},generateShader:function(t){for(var e=new Array(t),n=this.fragmentSourceTOP,i=1;i<=t;i++)e[i-1]=i+".0 * uDelta";return n+="uniform float uTaps["+t+"];\n",n+="void main() {\n",n+=" vec4 color = texture2D(uTexture, vTexCoord);\n",n+=" float sum = 1.0;\n",e.forEach((function(t,e){n+=" color += texture2D(uTexture, vTexCoord + "+t+") * uTaps["+e+"];\n",n+=" color += texture2D(uTexture, vTexCoord - "+t+") * uTaps["+e+"];\n",n+=" sum += 2.0 * uTaps["+e+"];\n"})),n+=" gl_FragColor = color / sum;\n",n+="}"},fragmentSourceTOP:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\n",applyTo:function(t){t.webgl?(t.passes++,this.width=t.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=t.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),t.destinationWidth=this.dW,this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t),t.sourceWidth=t.destinationWidth,this.height=t.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),t.destinationHeight=this.dH,this._setupFrameBuffer(t),this.applyToWebGL(t),this._swapTextures(t),t.sourceHeight=t.destinationHeight):this.applyTo2d(t)},isNeutralState:function(){return 1===this.scaleX&&1===this.scaleY},lanczosCreate:function(t){return function(e){if(e>=t||e<=-t)return 0;if(e<1.1920929e-7&&e>-1.1920929e-7)return 1;var n=(e*=Math.PI)/t;return s(e)/e*s(n)/n}},applyTo2d:function(t){var e=t.imageData,n=this.scaleX,i=this.scaleY;this.rcpScaleX=1/n,this.rcpScaleY=1/i;var r,o=e.width,s=e.height,l=a(o*n),c=a(s*i);"sliceHack"===this.resizeType?r=this.sliceByTwo(t,o,s,l,c):"hermite"===this.resizeType?r=this.hermiteFastResize(t,o,s,l,c):"bilinear"===this.resizeType?r=this.bilinearFiltering(t,o,s,l,c):"lanczos"===this.resizeType&&(r=this.lanczosResize(t,o,s,l,c)),t.imageData=r},sliceByTwo:function(t,n,r,o,a){var s,l,c=t.imageData,u=!1,h=!1,f=.5*n,d=.5*r,p=e.filterBackend.resources,v=0,g=0,m=n,y=0;for(p.sliceByTwo||(p.sliceByTwo=document.createElement("canvas")),((s=p.sliceByTwo).width<1.5*n||s.height<r)&&(s.width=1.5*n,s.height=r),(l=s.getContext("2d")).clearRect(0,0,1.5*n,r),l.putImageData(c,0,0),o=i(o),a=i(a);!u||!h;)n=f,r=d,o<i(.5*f)?f=i(.5*f):(f=o,u=!0),a<i(.5*d)?d=i(.5*d):(d=a,h=!0),l.drawImage(s,v,g,n,r,m,y,f,d),v=m,g=y,y+=d;return l.getImageData(v,g,o,a)},lanczosResize:function(t,e,a,s,c){var u=t.imageData.data,h=t.ctx.createImageData(s,c),f=h.data,d=this.lanczosCreate(this.lanczosLobes),p=this.rcpScaleX,v=this.rcpScaleY,g=2/this.rcpScaleX,m=2/this.rcpScaleY,y=l(p*this.lanczosLobes/2),_=l(v*this.lanczosLobes/2),b={},k={},C={};return function t(l){var w,x,S,E,T,O,A,I,P,D,R;for(k.x=(l+.5)*p,C.x=i(k.x),w=0;w<c;w++){for(k.y=(w+.5)*v,C.y=i(k.y),T=0,O=0,A=0,I=0,P=0,x=C.x-y;x<=C.x+y;x++)if(!(x<0||x>=e)){D=i(1e3*o(x-k.x)),b[D]||(b[D]={});for(var F=C.y-_;F<=C.y+_;F++)F<0||F>=a||(R=i(1e3*o(F-k.y)),b[D][R]||(b[D][R]=d(r(n(D*g,2)+n(R*m,2))/1e3)),(S=b[D][R])>0&&(T+=S,O+=S*u[E=4*(F*e+x)],A+=S*u[E+1],I+=S*u[E+2],P+=S*u[E+3]))}f[E=4*(w*s+l)]=O/T,f[E+1]=A/T,f[E+2]=I/T,f[E+3]=P/T}return++l<s?t(l):h}(0)},bilinearFiltering:function(t,e,n,r,o){var a,s,l,c,u,h,f,d,p=0,v=this.rcpScaleX,g=this.rcpScaleY,m=4*(e-1),y=t.imageData.data,_=t.ctx.createImageData(r,o),b=_.data;for(l=0;l<o;l++)for(c=0;c<r;c++)for(u=v*c-(a=i(v*c)),h=g*l-(s=i(g*l)),d=4*(s*e+a),f=0;f<4;f++)b[p++]=y[d+f]*(1-u)*(1-h)+y[d+4+f]*u*(1-h)+y[d+m+f]*h*(1-u)+y[d+m+4+f]*u*h;return _},hermiteFastResize:function(t,e,n,a,s){for(var c=this.rcpScaleX,u=this.rcpScaleY,h=l(c/2),f=l(u/2),d=t.imageData.data,p=t.ctx.createImageData(a,s),v=p.data,g=0;g<s;g++)for(var m=0;m<a;m++){for(var y=4*(m+g*a),_=0,b=0,k=0,C=0,w=0,x=0,S=0,E=(g+.5)*u,T=i(g*u);T<(g+1)*u;T++)for(var O=o(E-(T+.5))/f,A=(m+.5)*c,I=O*O,P=i(m*c);P<(m+1)*c;P++){var D=o(A-(P+.5))/h,R=r(I+D*D);R>1&&R<-1||(_=2*R*R*R-3*R*R+1)>0&&(S+=_*d[3+(D=4*(P+T*e))],k+=_,d[D+3]<255&&(_=_*d[D+3]/250),C+=_*d[D],w+=_*d[D+1],x+=_*d[D+2],b+=_)}v[y]=C/b,v[y+1]=w/b,v[y+2]=x/b,v[y+3]=S/k}return p},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),e.Image.filters.Resize.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters;n.Contrast=(0,e.util.createClass)(n.BaseFilter,{type:"Contrast",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uContrast;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat contrastF = 1.015 * (uContrast + 1.0) / (1.0 * (1.015 - uContrast));\ncolor.rgb = contrastF * (color.rgb - 0.5) + 0.5;\ngl_FragColor = color;\n}",contrast:0,mainParameter:"contrast",applyTo2d:function(t){if(0!==this.contrast){var e,n=t.imageData.data,i=n.length,r=Math.floor(255*this.contrast),o=259*(r+255)/(255*(259-r));for(e=0;e<i;e+=4)n[e]=o*(n[e]-128)+128,n[e+1]=o*(n[e+1]-128)+128,n[e+2]=o*(n[e+2]-128)+128}},getUniformLocations:function(t,e){return{uContrast:t.getUniformLocation(e,"uContrast")}},sendUniformData:function(t,e){t.uniform1f(e.uContrast,this.contrast)}}),e.Image.filters.Contrast.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters;n.Saturation=(0,e.util.createClass)(n.BaseFilter,{type:"Saturation",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform float uSaturation;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nfloat rgMax = max(color.r, color.g);\nfloat rgbMax = max(rgMax, color.b);\ncolor.r += rgbMax != color.r ? (rgbMax - color.r) * uSaturation : 0.00;\ncolor.g += rgbMax != color.g ? (rgbMax - color.g) * uSaturation : 0.00;\ncolor.b += rgbMax != color.b ? (rgbMax - color.b) * uSaturation : 0.00;\ngl_FragColor = color;\n}",saturation:0,mainParameter:"saturation",applyTo2d:function(t){if(0!==this.saturation){var e,n,i=t.imageData.data,r=i.length,o=-this.saturation;for(e=0;e<r;e+=4)n=Math.max(i[e],i[e+1],i[e+2]),i[e]+=n!==i[e]?(n-i[e])*o:0,i[e+1]+=n!==i[e+1]?(n-i[e+1])*o:0,i[e+2]+=n!==i[e+2]?(n-i[e+2])*o:0}},getUniformLocations:function(t,e){return{uSaturation:t.getUniformLocation(e,"uSaturation")}},sendUniformData:function(t,e){t.uniform1f(e.uSaturation,-this.saturation)}}),e.Image.filters.Saturation.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters;n.Blur=(0,e.util.createClass)(n.BaseFilter,{type:"Blur",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec2 uDelta;\nvarying vec2 vTexCoord;\nconst float nSamples = 15.0;\nvec3 v3offset = vec3(12.9898, 78.233, 151.7182);\nfloat random(vec3 scale) {\nreturn fract(sin(dot(gl_FragCoord.xyz, scale)) * 43758.5453);\n}\nvoid main() {\nvec4 color = vec4(0.0);\nfloat total = 0.0;\nfloat offset = random(v3offset);\nfor (float t = -nSamples; t <= nSamples; t++) {\nfloat percent = (t + offset - 0.5) / nSamples;\nfloat weight = 1.0 - abs(percent);\ncolor += texture2D(uTexture, vTexCoord + uDelta * percent) * weight;\ntotal += weight;\n}\ngl_FragColor = color / total;\n}",blur:0,mainParameter:"blur",applyTo:function(t){t.webgl?(this.aspectRatio=t.sourceWidth/t.sourceHeight,t.passes++,this._setupFrameBuffer(t),this.horizontal=!0,this.applyToWebGL(t),this._swapTextures(t),this._setupFrameBuffer(t),this.horizontal=!1,this.applyToWebGL(t),this._swapTextures(t)):this.applyTo2d(t)},applyTo2d:function(t){t.imageData=this.simpleBlur(t)},simpleBlur:function(t){var n,i,r=t.filterBackend.resources,o=t.imageData.width,a=t.imageData.height;r.blurLayer1||(r.blurLayer1=e.util.createCanvasElement(),r.blurLayer2=e.util.createCanvasElement()),i=r.blurLayer2,(n=r.blurLayer1).width===o&&n.height===a||(i.width=n.width=o,i.height=n.height=a);var s,l,c,u,h=n.getContext("2d"),f=i.getContext("2d"),d=.06*this.blur*.5;for(h.putImageData(t.imageData,0,0),f.clearRect(0,0,o,a),u=-15;u<=15;u++)c=d*(l=u/15)*o+(s=(Math.random()-.5)/4),f.globalAlpha=1-Math.abs(l),f.drawImage(n,c,s),h.drawImage(i,0,0),f.globalAlpha=1,f.clearRect(0,0,i.width,i.height);for(u=-15;u<=15;u++)c=d*(l=u/15)*a+(s=(Math.random()-.5)/4),f.globalAlpha=1-Math.abs(l),f.drawImage(n,s,c),h.drawImage(i,0,0),f.globalAlpha=1,f.clearRect(0,0,i.width,i.height);t.ctx.drawImage(n,0,0);var p=t.ctx.getImageData(0,0,n.width,n.height);return h.globalAlpha=1,h.clearRect(0,0,n.width,n.height),p},getUniformLocations:function(t,e){return{delta:t.getUniformLocation(e,"uDelta")}},sendUniformData:function(t,e){var n=this.chooseRightDelta();t.uniform2fv(e.delta,n)},chooseRightDelta:function(){var t,e=1,n=[0,0];return this.horizontal?this.aspectRatio>1&&(e=1/this.aspectRatio):this.aspectRatio<1&&(e=this.aspectRatio),t=e*this.blur*.12,this.horizontal?n[0]=t:n[1]=t,n}}),n.Blur.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters;n.Gamma=(0,e.util.createClass)(n.BaseFilter,{type:"Gamma",fragmentSource:"precision highp float;\nuniform sampler2D uTexture;\nuniform vec3 uGamma;\nvarying vec2 vTexCoord;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\nvec3 correction = (1.0 / uGamma);\ncolor.r = pow(color.r, correction.r);\ncolor.g = pow(color.g, correction.g);\ncolor.b = pow(color.b, correction.b);\ngl_FragColor = color;\ngl_FragColor.rgb *= color.a;\n}",gamma:[1,1,1],mainParameter:"gamma",initialize:function(t){this.gamma=[1,1,1],n.BaseFilter.prototype.initialize.call(this,t)},applyTo2d:function(t){var e,n=t.imageData.data,i=this.gamma,r=n.length,o=1/i[0],a=1/i[1],s=1/i[2];for(this.rVals||(this.rVals=new Uint8Array(256),this.gVals=new Uint8Array(256),this.bVals=new Uint8Array(256)),e=0,r=256;e<r;e++)this.rVals[e]=255*Math.pow(e/255,o),this.gVals[e]=255*Math.pow(e/255,a),this.bVals[e]=255*Math.pow(e/255,s);for(e=0,r=n.length;e<r;e+=4)n[e]=this.rVals[n[e]],n[e+1]=this.gVals[n[e+1]],n[e+2]=this.bVals[n[e+2]]},getUniformLocations:function(t,e){return{uGamma:t.getUniformLocation(e,"uGamma")}},sendUniformData:function(t,e){t.uniform3fv(e.uGamma,this.gamma)}}),e.Image.filters.Gamma.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters;n.Composed=(0,e.util.createClass)(n.BaseFilter,{type:"Composed",subFilters:[],initialize:function(t){this.callSuper("initialize",t),this.subFilters=this.subFilters.slice(0)},applyTo:function(t){t.passes+=this.subFilters.length-1,this.subFilters.forEach((function(e){e.applyTo(t)}))},toObject:function(){return e.util.object.extend(this.callSuper("toObject"),{subFilters:this.subFilters.map((function(t){return t.toObject()}))})},isNeutralState:function(){return!this.subFilters.some((function(t){return!t.isNeutralState()}))}}),e.Image.filters.Composed.fromObject=function(t,n){var i=(t.subFilters||[]).map((function(t){return new e.Image.filters[t.type](t)})),r=new e.Image.filters.Composed({subFilters:i});return n&&n(r),r}}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.Image.filters;n.HueRotation=(0,e.util.createClass)(n.ColorMatrix,{type:"HueRotation",rotation:0,mainParameter:"rotation",calculateMatrix:function(){var t=this.rotation*Math.PI,n=e.util.cos(t),i=e.util.sin(t),r=Math.sqrt(1/3)*i,o=1-n;this.matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.matrix[0]=n+o/3,this.matrix[1]=1/3*o-r,this.matrix[2]=1/3*o+r,this.matrix[5]=1/3*o+r,this.matrix[6]=n+1/3*o,this.matrix[7]=1/3*o-r,this.matrix[10]=1/3*o-r,this.matrix[11]=1/3*o+r,this.matrix[12]=n+1/3*o},isNeutralState:function(t){return this.calculateMatrix(),n.BaseFilter.prototype.isNeutralState.call(this,t)},applyTo:function(t){this.calculateMatrix(),n.BaseFilter.prototype.applyTo.call(this,t)}}),e.Image.filters.HueRotation.fromObject=e.Image.filters.BaseFilter.fromObject}(e),function(t){"use strict";var e=t.fabric||(t.fabric={}),n=e.util.object.clone;e.Text?e.warn("fabric.Text is already defined"):(e.Text=e.util.createClass(e.Object,{_dimensionAffectingProps:["fontSize","fontWeight","fontFamily","fontStyle","lineHeight","text","charSpacing","textAlign","styles"],_reNewline:/\r?\n/,_reSpacesAndTabs:/[ \t\r]/g,_reSpaceAndTab:/[ \t\r]/,_reWords:/\S+/g,type:"text",fontSize:40,fontWeight:"normal",fontFamily:"Times New Roman",underline:!1,overline:!1,linethrough:!1,textAlign:"left",fontStyle:"normal",lineHeight:1.16,superscript:{size:.6,baseline:-.35},subscript:{size:.6,baseline:.11},textBackgroundColor:"",stateProperties:e.Object.prototype.stateProperties.concat("fontFamily","fontWeight","fontSize","text","underline","overline","linethrough","textAlign","fontStyle","lineHeight","textBackgroundColor","charSpacing","styles"),cacheProperties:e.Object.prototype.cacheProperties.concat("fontFamily","fontWeight","fontSize","text","underline","overline","linethrough","textAlign","fontStyle","lineHeight","textBackgroundColor","charSpacing","styles"),stroke:null,shadow:null,_fontSizeFraction:.222,offsets:{underline:.1,linethrough:-.315,overline:-.88},_fontSizeMult:1.13,charSpacing:0,styles:null,_measuringContext:null,deltaY:0,_styleProperties:["stroke","strokeWidth","fill","fontFamily","fontSize","fontWeight","fontStyle","underline","overline","linethrough","deltaY","textBackgroundColor"],__charBounds:[],CACHE_FONT_SIZE:400,MIN_TEXT_WIDTH:2,initialize:function(t,e){this.styles=e&&e.styles||{},this.text=t,this.__skipDimension=!0,this.callSuper("initialize",e),this.__skipDimension=!1,this.initDimensions(),this.setCoords(),this.setupState({propertySet:"_dimensionAffectingProps"})},getMeasuringContext:function(){return e._measuringContext||(e._measuringContext=this.canvas&&this.canvas.contextCache||e.util.createCanvasElement().getContext("2d")),e._measuringContext},_splitText:function(){var t=this._splitTextIntoLines(this.text);return this.textLines=t.lines,this._textLines=t.graphemeLines,this._unwrappedTextLines=t._unwrappedLines,this._text=t.graphemeText,t},initDimensions:function(){this.__skipDimension||(this._splitText(),this._clearCache(),this.width=this.calcTextWidth()||this.cursorWidth||this.MIN_TEXT_WIDTH,-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},enlargeSpaces:function(){for(var t,e,n,i,r,o,a=0,s=this._textLines.length;a<s;a++)if(("justify"===this.textAlign||a!==s-1&&!this.isEndOfWrapping(a))&&(n=0,i=this._textLines[a],(e=this.getLineWidth(a))<this.width&&(o=this.textLines[a].match(this._reSpacesAndTabs)))){t=(this.width-e)/o.length;for(var l=0,c=i.length;l<=c;l++)r=this.__charBounds[a][l],this._reSpaceAndTab.test(i[l])?(r.width+=t,r.kernedWidth+=t,r.left+=n,n+=t):r.left+=n}},isEndOfWrapping:function(t){return t===this._textLines.length-1},missingNewlineOffset:function(){return 1},toString:function(){return"#<fabric.Text ("+this.complexity()+'): { "text": "'+this.text+'", "fontFamily": "'+this.fontFamily+'" }>'},_getCacheCanvasDimensions:function(){var t=this.callSuper("_getCacheCanvasDimensions"),e=this.fontSize;return t.width+=e*t.zoomX,t.height+=e*t.zoomY,t},_render:function(t){this._setTextStyles(t),this._renderTextLinesBackground(t),this._renderTextDecoration(t,"underline"),this._renderText(t),this._renderTextDecoration(t,"overline"),this._renderTextDecoration(t,"linethrough")},_renderText:function(t){"stroke"===this.paintFirst?(this._renderTextStroke(t),this._renderTextFill(t)):(this._renderTextFill(t),this._renderTextStroke(t))},_setTextStyles:function(t,e,n){t.textBaseline="alphabetic",t.font=this._getFontDeclaration(e,n)},calcTextWidth:function(){for(var t=this.getLineWidth(0),e=1,n=this._textLines.length;e<n;e++){var i=this.getLineWidth(e);i>t&&(t=i)}return t},_renderTextLine:function(t,e,n,i,r,o){this._renderChars(t,e,n,i,r,o)},_renderTextLinesBackground:function(t){if(this.textBackgroundColor||this.styleHas("textBackgroundColor")){for(var e,n,i,r,o,a,s=0,l=t.fillStyle,c=this._getLeftOffset(),u=this._getTopOffset(),h=0,f=0,d=0,p=this._textLines.length;d<p;d++)if(e=this.getHeightOfLine(d),this.textBackgroundColor||this.styleHas("textBackgroundColor",d)){i=this._textLines[d],n=this._getLineLeftOffset(d),f=0,h=0,r=this.getValueOfPropertyAt(d,0,"textBackgroundColor");for(var v=0,g=i.length;v<g;v++)o=this.__charBounds[d][v],(a=this.getValueOfPropertyAt(d,v,"textBackgroundColor"))!==r?(t.fillStyle=r,r&&t.fillRect(c+n+h,u+s,f,e/this.lineHeight),h=o.left,f=o.width,r=a):f+=o.kernedWidth;a&&(t.fillStyle=a,t.fillRect(c+n+h,u+s,f,e/this.lineHeight)),s+=e}else s+=e;t.fillStyle=l,this._removeShadow(t)}},getFontCache:function(t){var n=t.fontFamily.toLowerCase();e.charWidthsCache[n]||(e.charWidthsCache[n]={});var i=e.charWidthsCache[n],r=t.fontStyle.toLowerCase()+"_"+(t.fontWeight+"").toLowerCase();return i[r]||(i[r]={}),i[r]},_applyCharStyles:function(t,e,n,i,r){this._setFillStyles(e,r),this._setStrokeStyles(e,r),e.font=this._getFontDeclaration(r)},_measureChar:function(t,e,n,i){var r,o,a,s,l=this.getFontCache(e),c=n+t,u=this._getFontDeclaration(e)===this._getFontDeclaration(i),h=e.fontSize/this.CACHE_FONT_SIZE;if(n&&void 0!==l[n]&&(a=l[n]),void 0!==l[t]&&(s=r=l[t]),u&&void 0!==l[c]&&(s=(o=l[c])-a),void 0===r||void 0===a||void 0===o){var f=this.getMeasuringContext();this._setTextStyles(f,e,!0)}return void 0===r&&(s=r=f.measureText(t).width,l[t]=r),void 0===a&&u&&n&&(a=f.measureText(n).width,l[n]=a),u&&void 0===o&&(o=f.measureText(c).width,l[c]=o,s=o-a),{width:r*h,kernedWidth:s*h}},getHeightOfChar:function(t,e){return this.getValueOfPropertyAt(t,e,"fontSize")},measureLine:function(t){var e=this._measureLine(t);return 0!==this.charSpacing&&(e.width-=this._getWidthOfCharSpacing()),e.width<0&&(e.width=0),e},_measureLine:function(t){var e,n,i,r,o=0,a=this._textLines[t],s=new Array(a.length);for(this.__charBounds[t]=s,e=0;e<a.length;e++)r=this._getGraphemeBox(n=a[e],t,e,i),s[e]=r,o+=r.kernedWidth,i=n;return s[e]={left:r?r.left+r.width:0,width:0,kernedWidth:0,height:this.fontSize},{width:o,numOfSpaces:0}},_getGraphemeBox:function(t,e,n,i,r){var o,a=this.getCompleteStyleDeclaration(e,n),s=i?this.getCompleteStyleDeclaration(e,n-1):{},l=this._measureChar(t,a,i,s),c=l.kernedWidth,u=l.width;0!==this.charSpacing&&(u+=o=this._getWidthOfCharSpacing(),c+=o);var h={width:u,left:0,height:a.fontSize,kernedWidth:c,deltaY:a.deltaY};if(n>0&&!r){var f=this.__charBounds[e][n-1];h.left=f.left+f.width+l.kernedWidth-l.width}return h},getHeightOfLine:function(t){if(this.__lineHeights[t])return this.__lineHeights[t];for(var e=this._textLines[t],n=this.getHeightOfChar(t,0),i=1,r=e.length;i<r;i++)n=Math.max(this.getHeightOfChar(t,i),n);return this.__lineHeights[t]=n*this.lineHeight*this._fontSizeMult},calcTextHeight:function(){for(var t,e=0,n=0,i=this._textLines.length;n<i;n++)t=this.getHeightOfLine(n),e+=n===i-1?t/this.lineHeight:t;return e},_getLeftOffset:function(){return-this.width/2},_getTopOffset:function(){return-this.height/2},_applyPatternGradientTransform:function(t,e){if(!e||!e.toLive)return{offsetX:0,offsetY:0};var n=-this.width/2+e.offsetX||0,i=-this.height/2+e.offsetY||0;return t.transform(1,0,0,1,n,i),{offsetX:n,offsetY:i}},_renderTextCommon:function(t,e){t.save();for(var n=0,i=this._getLeftOffset(),r=this._getTopOffset(),o=this._applyPatternGradientTransform(t,"fillText"===e?this.fill:this.stroke),a=0,s=this._textLines.length;a<s;a++){var l=this.getHeightOfLine(a),c=l/this.lineHeight,u=this._getLineLeftOffset(a);this._renderTextLine(e,t,this._textLines[a],i+u-o.offsetX,r+n+c-o.offsetY,a),n+=l}t.restore()},_renderTextFill:function(t){(this.fill||this.styleHas("fill"))&&this._renderTextCommon(t,"fillText")},_renderTextStroke:function(t){(this.stroke&&0!==this.strokeWidth||!this.isEmptyStyles())&&(this.shadow&&!this.shadow.affectStroke&&this._removeShadow(t),t.save(),this._setLineDash(t,this.strokeDashArray),t.beginPath(),this._renderTextCommon(t,"strokeText"),t.closePath(),t.restore())},_renderChars:function(t,e,n,i,r,o){var a,s,l,c,u=this.getHeightOfLine(o),h=-1!==this.textAlign.indexOf("justify"),f="",d=0,p=!h&&0===this.charSpacing&&this.isEmptyStyles(o);if(e.save(),r-=u*this._fontSizeFraction/this.lineHeight,p)return this._renderChar(t,e,o,0,this.textLines[o],i,r,u),void e.restore();for(var v=0,g=n.length-1;v<=g;v++)c=v===g||this.charSpacing,f+=n[v],l=this.__charBounds[o][v],0===d?(i+=l.kernedWidth-l.width,d+=l.width):d+=l.kernedWidth,h&&!c&&this._reSpaceAndTab.test(n[v])&&(c=!0),c||(a=a||this.getCompleteStyleDeclaration(o,v),s=this.getCompleteStyleDeclaration(o,v+1),c=this._hasStyleChanged(a,s)),c&&(this._renderChar(t,e,o,v,f,i,r,u),f="",a=s,i+=d,d=0);e.restore()},_renderChar:function(t,e,n,i,r,o,a){var s=this._getStyleDeclaration(n,i),l=this.getCompleteStyleDeclaration(n,i),c="fillText"===t&&l.fill,u="strokeText"===t&&l.stroke&&l.strokeWidth;(u||c)&&(s&&e.save(),this._applyCharStyles(t,e,n,i,l),s&&s.textBackgroundColor&&this._removeShadow(e),s&&s.deltaY&&(a+=s.deltaY),c&&e.fillText(r,o,a),u&&e.strokeText(r,o,a),s&&e.restore())},setSuperscript:function(t,e){return this._setScript(t,e,this.superscript)},setSubscript:function(t,e){return this._setScript(t,e,this.subscript)},_setScript:function(t,e,n){var i=this.get2DCursorLocation(t,!0),r=this.getValueOfPropertyAt(i.lineIndex,i.charIndex,"fontSize"),o=this.getValueOfPropertyAt(i.lineIndex,i.charIndex,"deltaY");return this.setSelectionStyles({fontSize:r*n.size,deltaY:o+r*n.baseline},t,e),this},_hasStyleChanged:function(t,e){return t.fill!==e.fill||t.stroke!==e.stroke||t.strokeWidth!==e.strokeWidth||t.fontSize!==e.fontSize||t.fontFamily!==e.fontFamily||t.fontWeight!==e.fontWeight||t.fontStyle!==e.fontStyle||t.deltaY!==e.deltaY},_hasStyleChangedForSvg:function(t,e){return this._hasStyleChanged(t,e)||t.overline!==e.overline||t.underline!==e.underline||t.linethrough!==e.linethrough},_getLineLeftOffset:function(t){var e=this.getLineWidth(t);return"center"===this.textAlign?(this.width-e)/2:"right"===this.textAlign?this.width-e:"justify-center"===this.textAlign&&this.isEndOfWrapping(t)?(this.width-e)/2:"justify-right"===this.textAlign&&this.isEndOfWrapping(t)?this.width-e:0},_clearCache:function(){this.__lineWidths=[],this.__lineHeights=[],this.__charBounds=[]},_shouldClearDimensionCache:function(){var t=this._forceClearCache;return t||(t=this.hasStateChanged("_dimensionAffectingProps")),t&&(this.dirty=!0,this._forceClearCache=!1),t},getLineWidth:function(t){return this.__lineWidths[t]?this.__lineWidths[t]:(e=""===this._textLines[t]?0:this.measureLine(t).width,this.__lineWidths[t]=e,e);var e},_getWidthOfCharSpacing:function(){return 0!==this.charSpacing?this.fontSize*this.charSpacing/1e3:0},getValueOfPropertyAt:function(t,e,n){var i=this._getStyleDeclaration(t,e);return i&&void 0!==i[n]?i[n]:this[n]},_renderTextDecoration:function(t,e){if(this[e]||this.styleHas(e)){for(var n,i,r,o,a,s,l,c,u,h,f,d,p,v,g,m,y=this._getLeftOffset(),_=this._getTopOffset(),b=this._getWidthOfCharSpacing(),k=0,C=this._textLines.length;k<C;k++)if(n=this.getHeightOfLine(k),this[e]||this.styleHas(e,k)){l=this._textLines[k],v=n/this.lineHeight,o=this._getLineLeftOffset(k),h=0,f=0,c=this.getValueOfPropertyAt(k,0,e),m=this.getValueOfPropertyAt(k,0,"fill"),u=_+v*(1-this._fontSizeFraction),i=this.getHeightOfChar(k,0),a=this.getValueOfPropertyAt(k,0,"deltaY");for(var w=0,x=l.length;w<x;w++)d=this.__charBounds[k][w],p=this.getValueOfPropertyAt(k,w,e),g=this.getValueOfPropertyAt(k,w,"fill"),r=this.getHeightOfChar(k,w),s=this.getValueOfPropertyAt(k,w,"deltaY"),(p!==c||g!==m||r!==i||s!==a)&&f>0?(t.fillStyle=m,c&&m&&t.fillRect(y+o+h,u+this.offsets[e]*i+a,f,this.fontSize/15),h=d.left,f=d.width,c=p,m=g,i=r,a=s):f+=d.kernedWidth;t.fillStyle=g,p&&g&&t.fillRect(y+o+h,u+this.offsets[e]*i+a,f-b,this.fontSize/15),_+=n}else _+=n;this._removeShadow(t)}},_getFontDeclaration:function(t,n){var i=t||this,r=this.fontFamily,o=e.Text.genericFonts.indexOf(r.toLowerCase())>-1,a=void 0===r||r.indexOf("'")>-1||r.indexOf(",")>-1||r.indexOf('"')>-1||o?i.fontFamily:'"'+i.fontFamily+'"';return[e.isLikelyNode?i.fontWeight:i.fontStyle,e.isLikelyNode?i.fontStyle:i.fontWeight,n?this.CACHE_FONT_SIZE+"px":i.fontSize+"px",a].join(" ")},render:function(t){this.visible&&(this.canvas&&this.canvas.skipOffscreen&&!this.group&&!this.isOnScreen()||(this._shouldClearDimensionCache()&&this.initDimensions(),this.callSuper("render",t)))},_splitTextIntoLines:function(t){for(var n=t.split(this._reNewline),i=new Array(n.length),r=["\n"],o=[],a=0;a<n.length;a++)i[a]=e.util.string.graphemeSplit(n[a]),o=o.concat(i[a],r);return o.pop(),{_unwrappedLines:i,lines:n,graphemeText:o,graphemeLines:i}},toObject:function(t){var e=["text","fontSize","fontWeight","fontFamily","fontStyle","lineHeight","underline","overline","linethrough","textAlign","textBackgroundColor","charSpacing"].concat(t),i=this.callSuper("toObject",e);return i.styles=n(this.styles,!0),i},set:function(t,e){this.callSuper("set",t,e);var n=!1;if("object"==typeof t)for(var i in t)n=n||-1!==this._dimensionAffectingProps.indexOf(i);else n=-1!==this._dimensionAffectingProps.indexOf(t);return n&&(this.initDimensions(),this.setCoords()),this},complexity:function(){return 1}}),e.Text.ATTRIBUTE_NAMES=e.SHARED_ATTRIBUTES.concat("x y dx dy font-family font-style font-weight font-size letter-spacing text-decoration text-anchor".split(" ")),e.Text.DEFAULT_SVG_FONT_SIZE=16,e.Text.fromElement=function(t,i,r){if(!t)return i(null);var o=e.parseAttributes(t,e.Text.ATTRIBUTE_NAMES),a=o.textAnchor||"left";if((r=e.util.object.extend(r?n(r):{},o)).top=r.top||0,r.left=r.left||0,o.textDecoration){var s=o.textDecoration;-1!==s.indexOf("underline")&&(r.underline=!0),-1!==s.indexOf("overline")&&(r.overline=!0),-1!==s.indexOf("line-through")&&(r.linethrough=!0),delete r.textDecoration}"dx"in o&&(r.left+=o.dx),"dy"in o&&(r.top+=o.dy),"fontSize"in r||(r.fontSize=e.Text.DEFAULT_SVG_FONT_SIZE);var l="";"textContent"in t?l=t.textContent:"firstChild"in t&&null!==t.firstChild&&"data"in t.firstChild&&null!==t.firstChild.data&&(l=t.firstChild.data),l=l.replace(/^\s+|\s+$|\n+/g,"").replace(/\s+/g," ");var c=r.strokeWidth;r.strokeWidth=0;var u=new e.Text(l,r),h=u.getScaledHeight()/u.height,f=((u.height+u.strokeWidth)*u.lineHeight-u.height)*h,d=u.getScaledHeight()+f,p=0;"center"===a&&(p=u.getScaledWidth()/2),"right"===a&&(p=u.getScaledWidth()),u.set({left:u.left-p,top:u.top-(d-u.fontSize*(.07+u._fontSizeFraction))/u.lineHeight,strokeWidth:void 0!==c?c:1}),i(u)},e.Text.fromObject=function(t,n){return e.Object._fromObject("Text",t,n,"text")},e.Text.genericFonts=["sans-serif","serif","cursive","fantasy","monospace"],e.util.createAccessors&&e.util.createAccessors(e.Text))}(e),g.util.object.extend(g.Text.prototype,{isEmptyStyles:function(t){if(!this.styles)return!0;if(void 0!==t&&!this.styles[t])return!0;var e=void 0===t?this.styles:{line:this.styles[t]};for(var n in e)for(var i in e[n])for(var r in e[n][i])return!1;return!0},styleHas:function(t,e){if(!this.styles||!t||""===t)return!1;if(void 0!==e&&!this.styles[e])return!1;var n=void 0===e?this.styles:{0:this.styles[e]};for(var i in n)for(var r in n[i])if(void 0!==n[i][r][t])return!0;return!1},cleanStyle:function(t){if(!this.styles||!t||""===t)return!1;var e,n,i=this.styles,r=0,o=!0,a=0;for(var s in i){for(var l in e=0,i[s]){var c;r++,(c=i[s][l]).hasOwnProperty(t)?(n?c[t]!==n&&(o=!1):n=c[t],c[t]===this[t]&&delete c[t]):o=!1,0!==Object.keys(c).length?e++:delete i[s][l]}0===e&&delete i[s]}for(var u=0;u<this._textLines.length;u++)a+=this._textLines[u].length;o&&r===a&&(this[t]=n,this.removeStyle(t))},removeStyle:function(t){if(this.styles&&t&&""!==t){var e,n,i,r=this.styles;for(n in r){for(i in e=r[n])delete e[i][t],0===Object.keys(e[i]).length&&delete e[i];0===Object.keys(e).length&&delete r[n]}}},_extendStyles:function(t,e){var n=this.get2DCursorLocation(t);this._getLineStyle(n.lineIndex)||this._setLineStyle(n.lineIndex),this._getStyleDeclaration(n.lineIndex,n.charIndex)||this._setStyleDeclaration(n.lineIndex,n.charIndex,{}),g.util.object.extend(this._getStyleDeclaration(n.lineIndex,n.charIndex),e)},get2DCursorLocation:function(t,e){void 0===t&&(t=this.selectionStart);for(var n=e?this._unwrappedTextLines:this._textLines,i=n.length,r=0;r<i;r++){if(t<=n[r].length)return{lineIndex:r,charIndex:t};t-=n[r].length+this.missingNewlineOffset(r)}return{lineIndex:r-1,charIndex:n[r-1].length<t?n[r-1].length:t}},getSelectionStyles:function(t,e,n){void 0===t&&(t=this.selectionStart||0),void 0===e&&(e=this.selectionEnd||t);for(var i=[],r=t;r<e;r++)i.push(this.getStyleAtPosition(r,n));return i},getStyleAtPosition:function(t,e){var n=this.get2DCursorLocation(t);return(e?this.getCompleteStyleDeclaration(n.lineIndex,n.charIndex):this._getStyleDeclaration(n.lineIndex,n.charIndex))||{}},setSelectionStyles:function(t,e,n){void 0===e&&(e=this.selectionStart||0),void 0===n&&(n=this.selectionEnd||e);for(var i=e;i<n;i++)this._extendStyles(i,t);return this._forceClearCache=!0,this},_getStyleDeclaration:function(t,e){var n=this.styles&&this.styles[t];return n?n[e]:null},getCompleteStyleDeclaration:function(t,e){for(var n,i=this._getStyleDeclaration(t,e)||{},r={},o=0;o<this._styleProperties.length;o++)r[n=this._styleProperties[o]]=void 0===i[n]?this[n]:i[n];return r},_setStyleDeclaration:function(t,e,n){this.styles[t][e]=n},_deleteStyleDeclaration:function(t,e){delete this.styles[t][e]},_getLineStyle:function(t){return!!this.styles[t]},_setLineStyle:function(t){this.styles[t]={}},_deleteLineStyle:function(t){delete this.styles[t]}}),function(){function t(t){t.textDecoration&&(t.textDecoration.indexOf("underline")>-1&&(t.underline=!0),t.textDecoration.indexOf("line-through")>-1&&(t.linethrough=!0),t.textDecoration.indexOf("overline")>-1&&(t.overline=!0),delete t.textDecoration)}g.IText=g.util.createClass(g.Text,g.Observable,{type:"i-text",selectionStart:0,selectionEnd:0,selectionColor:"rgba(17,119,255,0.3)",isEditing:!1,editable:!0,editingBorderColor:"rgba(102,153,255,0.25)",cursorWidth:2,cursorColor:"#333",cursorDelay:1e3,cursorDuration:600,caching:!0,_reSpace:/\s|\n/,_currentCursorOpacity:0,_selectionDirection:null,_abortCursorAnimation:!1,__widthOfSpace:[],inCompositionMode:!1,initialize:function(t,e){this.callSuper("initialize",t,e),this.initBehavior()},setSelectionStart:function(t){t=Math.max(t,0),this._updateAndFire("selectionStart",t)},setSelectionEnd:function(t){t=Math.min(t,this.text.length),this._updateAndFire("selectionEnd",t)},_updateAndFire:function(t,e){this[t]!==e&&(this._fireSelectionChanged(),this[t]=e),this._updateTextarea()},_fireSelectionChanged:function(){this.fire("selection:changed"),this.canvas&&this.canvas.fire("text:selection:changed",{target:this})},initDimensions:function(){this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this.callSuper("initDimensions")},render:function(t){this.clearContextTop(),this.callSuper("render",t),this.cursorOffsetCache={},this.renderCursorOrSelection()},_render:function(t){this.callSuper("_render",t)},clearContextTop:function(t){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var e=this.canvas.contextTop,n=this.canvas.viewportTransform;e.save(),e.transform(n[0],n[1],n[2],n[3],n[4],n[5]),this.transform(e),this.transformMatrix&&e.transform.apply(e,this.transformMatrix),this._clearTextArea(e),t||e.restore()}},renderCursorOrSelection:function(){if(this.isEditing&&this.canvas&&this.canvas.contextTop){var t=this._getCursorBoundaries(),e=this.canvas.contextTop;this.clearContextTop(!0),this.selectionStart===this.selectionEnd?this.renderCursor(t,e):this.renderSelection(t,e),e.restore()}},_clearTextArea:function(t){var e=this.width+4,n=this.height+4;t.clearRect(-e/2,-n/2,e,n)},_getCursorBoundaries:function(t){void 0===t&&(t=this.selectionStart);var e=this._getLeftOffset(),n=this._getTopOffset(),i=this._getCursorBoundariesOffsets(t);return{left:e,top:n,leftOffset:i.left,topOffset:i.top}},_getCursorBoundariesOffsets:function(t){if(this.cursorOffsetCache&&"top"in this.cursorOffsetCache)return this.cursorOffsetCache;var e,n,i,r=0,o=0,a=this.get2DCursorLocation(t);i=a.charIndex,n=a.lineIndex;for(var s=0;s<n;s++)r+=this.getHeightOfLine(s);e=this._getLineLeftOffset(n);var l=this.__charBounds[n][i];return l&&(o=l.left),0!==this.charSpacing&&i===this._textLines[n].length&&(o-=this._getWidthOfCharSpacing()),this.cursorOffsetCache={top:r,left:e+(o>0?o:0)},this.cursorOffsetCache},renderCursor:function(t,e){var n=this.get2DCursorLocation(),i=n.lineIndex,r=n.charIndex>0?n.charIndex-1:0,o=this.getValueOfPropertyAt(i,r,"fontSize"),a=this.scaleX*this.canvas.getZoom(),s=this.cursorWidth/a,l=t.topOffset,c=this.getValueOfPropertyAt(i,r,"deltaY");l+=(1-this._fontSizeFraction)*this.getHeightOfLine(i)/this.lineHeight-o*(1-this._fontSizeFraction),this.inCompositionMode&&this.renderSelection(t,e),e.fillStyle=this.getValueOfPropertyAt(i,r,"fill"),e.globalAlpha=this.__isMousedown?1:this._currentCursorOpacity,e.fillRect(t.left+t.leftOffset-s/2,l+t.top+c,s,o)},renderSelection:function(t,e){for(var n=this.inCompositionMode?this.hiddenTextarea.selectionStart:this.selectionStart,i=this.inCompositionMode?this.hiddenTextarea.selectionEnd:this.selectionEnd,r=-1!==this.textAlign.indexOf("justify"),o=this.get2DCursorLocation(n),a=this.get2DCursorLocation(i),s=o.lineIndex,l=a.lineIndex,c=o.charIndex<0?0:o.charIndex,u=a.charIndex<0?0:a.charIndex,h=s;h<=l;h++){var f,d=this._getLineLeftOffset(h)||0,p=this.getHeightOfLine(h),v=0,g=0;if(h===s&&(v=this.__charBounds[s][c].left),h>=s&&h<l)g=r&&!this.isEndOfWrapping(h)?this.width:this.getLineWidth(h)||5;else if(h===l)if(0===u)g=this.__charBounds[l][u].left;else{var m=this._getWidthOfCharSpacing();g=this.__charBounds[l][u-1].left+this.__charBounds[l][u-1].width-m}f=p,(this.lineHeight<1||h===l&&this.lineHeight>1)&&(p/=this.lineHeight),this.inCompositionMode?(e.fillStyle=this.compositionColor||"black",e.fillRect(t.left+d+v,t.top+t.topOffset+p,g-v,1)):(e.fillStyle=this.selectionColor,e.fillRect(t.left+d+v,t.top+t.topOffset,g-v,p)),t.topOffset+=f}},getCurrentCharFontSize:function(){var t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,"fontSize")},getCurrentCharColor:function(){var t=this._getCurrentCharIndex();return this.getValueOfPropertyAt(t.l,t.c,"fill")},_getCurrentCharIndex:function(){var t=this.get2DCursorLocation(this.selectionStart,!0);return{l:t.lineIndex,c:t.charIndex>0?t.charIndex-1:0}}}),g.IText.fromObject=function(e,n){if(t(e),e.styles)for(var i in e.styles)for(var r in e.styles[i])t(e.styles[i][r]);g.Object._fromObject("IText",e,n,"text")}}(),d=g.util.object.clone,g.util.object.extend(g.IText.prototype,{initBehavior:function(){this.initAddedHandler(),this.initRemovedHandler(),this.initCursorSelectionHandlers(),this.initDoubleClickSimulation(),this.mouseMoveHandler=this.mouseMoveHandler.bind(this)},onDeselect:function(){this.isEditing&&this.exitEditing(),this.selected=!1},initAddedHandler:function(){var t=this;this.on("added",(function(){var e=t.canvas;e&&(e._hasITextHandlers||(e._hasITextHandlers=!0,t._initCanvasHandlers(e)),e._iTextInstances=e._iTextInstances||[],e._iTextInstances.push(t))}))},initRemovedHandler:function(){var t=this;this.on("removed",(function(){var e=t.canvas;e&&(e._iTextInstances=e._iTextInstances||[],g.util.removeFromArray(e._iTextInstances,t),0===e._iTextInstances.length&&(e._hasITextHandlers=!1,t._removeCanvasHandlers(e)))}))},_initCanvasHandlers:function(t){t._mouseUpITextHandler=function(){t._iTextInstances&&t._iTextInstances.forEach((function(t){t.__isMousedown=!1}))},t.on("mouse:up",t._mouseUpITextHandler)},_removeCanvasHandlers:function(t){t.off("mouse:up",t._mouseUpITextHandler)},_tick:function(){this._currentTickState=this._animateCursor(this,1,this.cursorDuration,"_onTickComplete")},_animateCursor:function(t,e,n,i){var r;return r={isAborted:!1,abort:function(){this.isAborted=!0}},t.animate("_currentCursorOpacity",e,{duration:n,onComplete:function(){r.isAborted||t[i]()},onChange:function(){t.canvas&&t.selectionStart===t.selectionEnd&&t.renderCursorOrSelection()},abort:function(){return r.isAborted}}),r},_onTickComplete:function(){var t=this;this._cursorTimeout1&&clearTimeout(this._cursorTimeout1),this._cursorTimeout1=setTimeout((function(){t._currentTickCompleteState=t._animateCursor(t,0,this.cursorDuration/2,"_tick")}),100)},initDelayedCursor:function(t){var e=this,n=t?0:this.cursorDelay;this.abortCursorAnimation(),this._currentCursorOpacity=1,this._cursorTimeout2=setTimeout((function(){e._tick()}),n)},abortCursorAnimation:function(){var t=this._currentTickState||this._currentTickCompleteState,e=this.canvas;this._currentTickState&&this._currentTickState.abort(),this._currentTickCompleteState&&this._currentTickCompleteState.abort(),clearTimeout(this._cursorTimeout1),clearTimeout(this._cursorTimeout2),this._currentCursorOpacity=0,t&&e&&e.clearContext(e.contextTop||e.contextContainer)},selectAll:function(){return this.selectionStart=0,this.selectionEnd=this._text.length,this._fireSelectionChanged(),this._updateTextarea(),this},getSelectedText:function(){return this._text.slice(this.selectionStart,this.selectionEnd).join("")},findWordBoundaryLeft:function(t){var e=0,n=t-1;if(this._reSpace.test(this._text[n]))for(;this._reSpace.test(this._text[n]);)e++,n--;for(;/\S/.test(this._text[n])&&n>-1;)e++,n--;return t-e},findWordBoundaryRight:function(t){var e=0,n=t;if(this._reSpace.test(this._text[n]))for(;this._reSpace.test(this._text[n]);)e++,n++;for(;/\S/.test(this._text[n])&&n<this._text.length;)e++,n++;return t+e},findLineBoundaryLeft:function(t){for(var e=0,n=t-1;!/\n/.test(this._text[n])&&n>-1;)e++,n--;return t-e},findLineBoundaryRight:function(t){for(var e=0,n=t;!/\n/.test(this._text[n])&&n<this._text.length;)e++,n++;return t+e},searchWordBoundary:function(t,e){for(var n=this._text,i=this._reSpace.test(n[t])?t-1:t,r=n[i],o=g.reNonWord;!o.test(r)&&i>0&&i<n.length;)r=n[i+=e];return o.test(r)&&(i+=1===e?0:1),i},selectWord:function(t){var e=this.searchWordBoundary(t=t||this.selectionStart,-1),n=this.searchWordBoundary(t,1);this.selectionStart=e,this.selectionEnd=n,this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()},selectLine:function(t){var e=this.findLineBoundaryLeft(t=t||this.selectionStart),n=this.findLineBoundaryRight(t);return this.selectionStart=e,this.selectionEnd=n,this._fireSelectionChanged(),this._updateTextarea(),this},enterEditing:function(t){if(!this.isEditing&&this.editable)return this.canvas&&(this.canvas.calcOffset(),this.exitEditingOnOthers(this.canvas)),this.isEditing=!0,this.initHiddenTextarea(t),this.hiddenTextarea.focus(),this.hiddenTextarea.value=this.text,this._updateTextarea(),this._saveEditingProps(),this._setEditingProps(),this._textBeforeEdit=this.text,this._tick(),this.fire("editing:entered"),this._fireSelectionChanged(),this.canvas?(this.canvas.fire("text:editing:entered",{target:this}),this.initMouseMoveHandler(),this.canvas.requestRenderAll(),this):this},exitEditingOnOthers:function(t){t._iTextInstances&&t._iTextInstances.forEach((function(t){t.selected=!1,t.isEditing&&t.exitEditing()}))},initMouseMoveHandler:function(){this.canvas.on("mouse:move",this.mouseMoveHandler)},mouseMoveHandler:function(t){if(this.__isMousedown&&this.isEditing){var e=this.getSelectionStartFromPointer(t.e),n=this.selectionStart,i=this.selectionEnd;(e===this.__selectionStartOnMouseDown&&n!==i||n!==e&&i!==e)&&(e>this.__selectionStartOnMouseDown?(this.selectionStart=this.__selectionStartOnMouseDown,this.selectionEnd=e):(this.selectionStart=e,this.selectionEnd=this.__selectionStartOnMouseDown),this.selectionStart===n&&this.selectionEnd===i||(this.restartCursorIfNeeded(),this._fireSelectionChanged(),this._updateTextarea(),this.renderCursorOrSelection()))}},_setEditingProps:function(){this.hoverCursor="text",this.canvas&&(this.canvas.defaultCursor=this.canvas.moveCursor="text"),this.borderColor=this.editingBorderColor,this.hasControls=this.selectable=!1,this.lockMovementX=this.lockMovementY=!0},fromStringToGraphemeSelection:function(t,e,n){var i=n.slice(0,t),r=g.util.string.graphemeSplit(i).length;if(t===e)return{selectionStart:r,selectionEnd:r};var o=n.slice(t,e);return{selectionStart:r,selectionEnd:r+g.util.string.graphemeSplit(o).length}},fromGraphemeToStringSelection:function(t,e,n){var i=n.slice(0,t).join("").length;return t===e?{selectionStart:i,selectionEnd:i}:{selectionStart:i,selectionEnd:i+n.slice(t,e).join("").length}},_updateTextarea:function(){if(this.cursorOffsetCache={},this.hiddenTextarea){if(!this.inCompositionMode){var t=this.fromGraphemeToStringSelection(this.selectionStart,this.selectionEnd,this._text);this.hiddenTextarea.selectionStart=t.selectionStart,this.hiddenTextarea.selectionEnd=t.selectionEnd}this.updateTextareaPosition()}},updateFromTextArea:function(){if(this.hiddenTextarea){this.cursorOffsetCache={},this.text=this.hiddenTextarea.value,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords());var t=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value);this.selectionEnd=this.selectionStart=t.selectionEnd,this.inCompositionMode||(this.selectionStart=t.selectionStart),this.updateTextareaPosition()}},updateTextareaPosition:function(){if(this.selectionStart===this.selectionEnd){var t=this._calcTextareaPosition();this.hiddenTextarea.style.left=t.left,this.hiddenTextarea.style.top=t.top}},_calcTextareaPosition:function(){if(!this.canvas)return{x:1,y:1};var t=this.inCompositionMode?this.compositionStart:this.selectionStart,e=this._getCursorBoundaries(t),n=this.get2DCursorLocation(t),i=this.getValueOfPropertyAt(n.lineIndex,n.charIndex,"fontSize")*this.lineHeight,r=e.leftOffset,o=this.calcTransformMatrix(),a={x:e.left+r,y:e.top+e.topOffset+i},s=this.canvas.getRetinaScaling(),l=this.canvas.upperCanvasEl,c=l.width/s,u=l.height/s,h=c-i,f=u-i,d=l.clientWidth/c,p=l.clientHeight/u;return a=g.util.transformPoint(a,o),(a=g.util.transformPoint(a,this.canvas.viewportTransform)).x*=d,a.y*=p,a.x<0&&(a.x=0),a.x>h&&(a.x=h),a.y<0&&(a.y=0),a.y>f&&(a.y=f),a.x+=this.canvas._offset.left,a.y+=this.canvas._offset.top,{left:a.x+"px",top:a.y+"px",fontSize:i+"px",charHeight:i}},_saveEditingProps:function(){this._savedProps={hasControls:this.hasControls,borderColor:this.borderColor,lockMovementX:this.lockMovementX,lockMovementY:this.lockMovementY,hoverCursor:this.hoverCursor,selectable:this.selectable,defaultCursor:this.canvas&&this.canvas.defaultCursor,moveCursor:this.canvas&&this.canvas.moveCursor}},_restoreEditingProps:function(){this._savedProps&&(this.hoverCursor=this._savedProps.hoverCursor,this.hasControls=this._savedProps.hasControls,this.borderColor=this._savedProps.borderColor,this.selectable=this._savedProps.selectable,this.lockMovementX=this._savedProps.lockMovementX,this.lockMovementY=this._savedProps.lockMovementY,this.canvas&&(this.canvas.defaultCursor=this._savedProps.defaultCursor,this.canvas.moveCursor=this._savedProps.moveCursor))},exitEditing:function(){var t=this._textBeforeEdit!==this.text,e=this.hiddenTextarea;return this.selected=!1,this.isEditing=!1,this.selectionEnd=this.selectionStart,e&&(e.blur&&e.blur(),e.parentNode&&e.parentNode.removeChild(e)),this.hiddenTextarea=null,this.abortCursorAnimation(),this._restoreEditingProps(),this._currentCursorOpacity=0,this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this.fire("editing:exited"),t&&this.fire("modified"),this.canvas&&(this.canvas.off("mouse:move",this.mouseMoveHandler),this.canvas.fire("text:editing:exited",{target:this}),t&&this.canvas.fire("object:modified",{target:this})),this},_removeExtraneousStyles:function(){for(var t in this.styles)this._textLines[t]||delete this.styles[t]},removeStyleFromTo:function(t,e){var n,i,r=this.get2DCursorLocation(t,!0),o=this.get2DCursorLocation(e,!0),a=r.lineIndex,s=r.charIndex,l=o.lineIndex,c=o.charIndex;if(a!==l){if(this.styles[a])for(n=s;n<this._unwrappedTextLines[a].length;n++)delete this.styles[a][n];if(this.styles[l])for(n=c;n<this._unwrappedTextLines[l].length;n++)(i=this.styles[l][n])&&(this.styles[a]||(this.styles[a]={}),this.styles[a][s+n-c]=i);for(n=a+1;n<=l;n++)delete this.styles[n];this.shiftLineStyles(l,a-l)}else if(this.styles[a]){i=this.styles[a];var u,h,f=c-s;for(n=s;n<c;n++)delete i[n];for(h in this.styles[a])(u=parseInt(h,10))>=c&&(i[u-f]=i[h],delete i[h])}},shiftLineStyles:function(t,e){var n=d(this.styles);for(var i in this.styles){var r=parseInt(i,10);r>t&&(this.styles[r+e]=n[r],n[r-e]||delete this.styles[r])}},restartCursorIfNeeded:function(){this._currentTickState&&!this._currentTickState.isAborted&&this._currentTickCompleteState&&!this._currentTickCompleteState.isAborted||this.initDelayedCursor()},insertNewlineStyleObject:function(t,e,n,i){var r,o={},a=!1;for(var s in n||(n=1),this.shiftLineStyles(t,n),this.styles[t]&&(r=this.styles[t][0===e?e:e-1]),this.styles[t]){var l=parseInt(s,10);l>=e&&(a=!0,o[l-e]=this.styles[t][s],delete this.styles[t][s])}for(a?this.styles[t+n]=o:delete this.styles[t+n];n>1;)n--,i&&i[n]?this.styles[t+n]={0:d(i[n])}:r?this.styles[t+n]={0:d(r)}:delete this.styles[t+n];this._forceClearCache=!0},insertCharStyleObject:function(t,e,n,i){this.styles||(this.styles={});var r=this.styles[t],o=r?d(r):{};for(var a in n||(n=1),o){var s=parseInt(a,10);s>=e&&(r[s+n]=o[s],o[s-n]||delete r[s])}if(this._forceClearCache=!0,i)for(;n--;)Object.keys(i[n]).length&&(this.styles[t]||(this.styles[t]={}),this.styles[t][e+n]=d(i[n]));else if(r)for(var l=r[e?e-1:1];l&&n--;)this.styles[t][e+n]=d(l)},insertNewStyleBlock:function(t,e,n){for(var i=this.get2DCursorLocation(e,!0),r=[0],o=0,a=0;a<t.length;a++)"\n"===t[a]?r[++o]=0:r[o]++;for(r[0]>0&&(this.insertCharStyleObject(i.lineIndex,i.charIndex,r[0],n),n=n&&n.slice(r[0]+1)),o&&this.insertNewlineStyleObject(i.lineIndex,i.charIndex+r[0],o),a=1;a<o;a++)r[a]>0?this.insertCharStyleObject(i.lineIndex+a,0,r[a],n):n&&(this.styles[i.lineIndex+a][0]=n[0]),n=n&&n.slice(r[a]+1);r[a]>0&&this.insertCharStyleObject(i.lineIndex+a,0,r[a],n)},setSelectionStartEndWithShift:function(t,e,n){n<=t?(e===t?this._selectionDirection="left":"right"===this._selectionDirection&&(this._selectionDirection="left",this.selectionEnd=t),this.selectionStart=n):n>t&&n<e?"right"===this._selectionDirection?this.selectionEnd=n:this.selectionStart=n:(e===t?this._selectionDirection="right":"left"===this._selectionDirection&&(this._selectionDirection="right",this.selectionStart=e),this.selectionEnd=n)},setSelectionInBoundaries:function(){var t=this.text.length;this.selectionStart>t?this.selectionStart=t:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>t?this.selectionEnd=t:this.selectionEnd<0&&(this.selectionEnd=0)}}),g.util.object.extend(g.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(t){if(this.canvas){this.__newClickTime=+new Date;var e=t.pointer;this.isTripleClick(e)&&(this.fire("tripleclick",t),this._stopEvent(t.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=e,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(t){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===t.x&&this.__lastPointer.y===t.y},_stopEvent:function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},doubleClickHandler:function(t){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(t.e))},tripleClickHandler:function(t){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(t.e))},initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},_mouseDownHandler:function(t){!this.canvas||!this.editable||t.e.button&&1!==t.e.button||(this.__isMousedown=!0,this.selected&&this.setCursorByClick(t.e),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(t){!this.canvas||!this.editable||t.e.button&&1!==t.e.button||(this.selected=this===this.canvas._activeObject)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(t){if(this.__isMousedown=!1,!(!this.editable||this.group||t.transform&&t.transform.actionPerformed||t.e.button&&1!==t.e.button)){if(this.canvas){var e=this.canvas._activeObject;if(e&&e!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(t.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(t){var e=this.getSelectionStartFromPointer(t);t.shiftKey?this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,e):(this.selectionStart=e,this.selectionEnd=e),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(t){for(var e=this.getLocalPointer(t),n=0,i=0,r=0,o=0,a=0,s=0,l=this._textLines.length;s<l&&r<=e.y;s++)r+=this.getHeightOfLine(s)*this.scaleY,a=s,s>0&&(o+=this._textLines[s-1].length+this.missingNewlineOffset(s-1));i=this._getLineLeftOffset(a)*this.scaleX;for(var c=0,u=this._textLines[a].length;c<u&&(n=i,(i+=this.__charBounds[a][c].kernedWidth*this.scaleX)<=e.x);c++)o++;return this._getNewSelectionStartFromOffset(e,n,i,o,u)},_getNewSelectionStartFromOffset:function(t,e,n,i,r){var o=n-t.x,a=i+(o>t.x-e||o<0?0:1);return this.flipX&&(a=r-a),a>this._text.length&&(a=this._text.length),a}}),g.util.object.extend(g.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=g.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var t=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+t.top+"; left: "+t.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding\uff70top: "+t.fontSize+";",g.document.body.appendChild(this.hiddenTextarea),g.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),g.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),g.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),g.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),g.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),g.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),g.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),g.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),g.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(g.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(t){if(this.isEditing&&!this.inCompositionMode){if(t.keyCode in this.keysMap)this[this.keysMap[t.keyCode]](t);else{if(!(t.keyCode in this.ctrlKeysMapDown)||!t.ctrlKey&&!t.metaKey)return;this[this.ctrlKeysMapDown[t.keyCode]](t)}t.stopImmediatePropagation(),t.preventDefault(),t.keyCode>=33&&t.keyCode<=40?(this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(t){!this.isEditing||this._copyDone||this.inCompositionMode?this._copyDone=!1:t.keyCode in this.ctrlKeysMapUp&&(t.ctrlKey||t.metaKey)&&(this[this.ctrlKeysMapUp[t.keyCode]](t),t.stopImmediatePropagation(),t.preventDefault(),this.canvas&&this.canvas.requestRenderAll())},onInput:function(t){var e=this.fromPaste;if(this.fromPaste=!1,t&&t.stopPropagation(),this.isEditing){var n,i,r=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,o=this._text.length,a=r.length,s=a-o;if(""===this.hiddenTextarea.value)return this.styles={},this.updateFromTextArea(),this.fire("changed"),void(this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll()));var l=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),c=this.selectionStart>l.selectionStart;this.selectionStart!==this.selectionEnd?(n=this._text.slice(this.selectionStart,this.selectionEnd),s+=this.selectionEnd-this.selectionStart):a<o&&(n=c?this._text.slice(this.selectionEnd+s,this.selectionEnd):this._text.slice(this.selectionStart,this.selectionStart-s)),i=r.slice(l.selectionEnd-s,l.selectionEnd),n&&n.length&&(this.selectionStart!==this.selectionEnd?this.removeStyleFromTo(this.selectionStart,this.selectionEnd):c?this.removeStyleFromTo(this.selectionEnd-n.length,this.selectionEnd):this.removeStyleFromTo(this.selectionEnd,this.selectionEnd+n.length)),i.length&&(e&&i.join("")===g.copiedText&&!g.disableStyleCopyPaste?this.insertNewStyleBlock(i,this.selectionStart,g.copiedTextStyle):this.insertNewStyleBlock(i,this.selectionStart)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())}},onCompositionStart:function(){this.inCompositionMode=!0},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(t){this.compositionStart=t.target.selectionStart,this.compositionEnd=t.target.selectionEnd,this.updateTextareaPosition()},copy:function(){this.selectionStart!==this.selectionEnd&&(g.copiedText=this.getSelectedText(),g.copiedTextStyle=g.disableStyleCopyPaste?null:this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(t){return t&&t.clipboardData||g.window.clipboardData},_getWidthBeforeCursor:function(t,e){var n,i=this._getLineLeftOffset(t);return e>0&&(i+=(n=this.__charBounds[t][e-1]).left+n.width),i},getDownCursorOffset:function(t,e){var n=this._getSelectionForOffset(t,e),i=this.get2DCursorLocation(n),r=i.lineIndex;if(r===this._textLines.length-1||t.metaKey||34===t.keyCode)return this._text.length-n;var o=i.charIndex,a=this._getWidthBeforeCursor(r,o),s=this._getIndexOnLine(r+1,a);return this._textLines[r].slice(o).length+s+1+this.missingNewlineOffset(r)},_getSelectionForOffset:function(t,e){return t.shiftKey&&this.selectionStart!==this.selectionEnd&&e?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(t,e){var n=this._getSelectionForOffset(t,e),i=this.get2DCursorLocation(n),r=i.lineIndex;if(0===r||t.metaKey||33===t.keyCode)return-n;var o=i.charIndex,a=this._getWidthBeforeCursor(r,o),s=this._getIndexOnLine(r-1,a),l=this._textLines[r].slice(0,o),c=this.missingNewlineOffset(r-1);return-this._textLines[r-1].length+s-l.length+(1-c)},_getIndexOnLine:function(t,e){for(var n,i,r=this._textLines[t],o=this._getLineLeftOffset(t),a=0,s=0,l=r.length;s<l;s++)if((o+=n=this.__charBounds[t][s].width)>e){i=!0;var c=o,u=Math.abs(o-n-e);a=Math.abs(c-e)<u?s:s-1;break}return i||(a=r.length-1),a},moveCursorDown:function(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",t)},moveCursorUp:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorUpOrDown("Up",t)},_moveCursorUpOrDown:function(t,e){var n=this["get"+t+"CursorOffset"](e,"right"===this._selectionDirection);e.shiftKey?this.moveCursorWithShift(n):this.moveCursorWithoutShift(n),0!==n&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(t){return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,"left"===this._selectionDirection?this.selectionStart+t:this.selectionEnd+t),0!==t},moveCursorWithoutShift:function(t){return t<0?(this.selectionStart+=t,this.selectionEnd=this.selectionStart):(this.selectionEnd+=t,this.selectionStart=this.selectionEnd),0!==t},moveCursorLeft:function(t){0===this.selectionStart&&0===this.selectionEnd||this._moveCursorLeftOrRight("Left",t)},_move:function(t,e,n){var i;if(t.altKey)i=this["findWordBoundary"+n](this[e]);else{if(!t.metaKey&&35!==t.keyCode&&36!==t.keyCode)return this[e]+="Left"===n?-1:1,!0;i=this["findLineBoundary"+n](this[e])}if(void 0!==typeof i&&this[e]!==i)return this[e]=i,!0},_moveLeft:function(t,e){return this._move(t,e,"Left")},_moveRight:function(t,e){return this._move(t,e,"Right")},moveCursorLeftWithoutShift:function(t){var e=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&0!==this.selectionStart&&(e=this._moveLeft(t,"selectionStart")),this.selectionEnd=this.selectionStart,e},moveCursorLeftWithShift:function(t){return"right"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveLeft(t,"selectionEnd"):0!==this.selectionStart?(this._selectionDirection="left",this._moveLeft(t,"selectionStart")):void 0},moveCursorRight:function(t){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",t)},_moveCursorLeftOrRight:function(t,e){var n="moveCursor"+t+"With";this._currentCursorOpacity=1,this[n+=e.shiftKey?"Shift":"outShift"](e)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(t){return"left"===this._selectionDirection&&this.selectionStart!==this.selectionEnd?this._moveRight(t,"selectionStart"):this.selectionEnd!==this._text.length?(this._selectionDirection="right",this._moveRight(t,"selectionEnd")):void 0},moveCursorRightWithoutShift:function(t){var e=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(e=this._moveRight(t,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,e},removeChars:function(t,e){void 0===e&&(e=t+1),this.removeStyleFromTo(t,e),this._text.splice(t,e-t),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(t,e,n,i){void 0===i&&(i=n),i>n&&this.removeStyleFromTo(n,i);var r=g.util.string.graphemeSplit(t);this.insertNewStyleBlock(r,n,e),this._text=[].concat(this._text.slice(0,n),r,this._text.slice(i)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),p=g.util.toFixed,v=/ +/g,g.util.object.extend(g.Text.prototype,{_toSVG:function(){var t=this._getSVGLeftTopOffsets(),e=this._getSVGTextAndBg(t.textTop,t.textLeft);return this._wrapSVGTextAndBg(e)},toSVG:function(t){return this._createBaseSVGMarkup(this._toSVG(),{reviver:t,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(t){var e=this.getSvgTextDecoration(this);return[t.textBgRects.join(""),'\t\t<text xml:space="preserve" ',this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",e?'text-decoration="'+e+'" ':"",'style="',this.getSvgStyles(!0),'"',this.addPaintOrder()," >",t.textSpans.join(""),"</text>\n"]},_getSVGTextAndBg:function(t,e){var n,i=[],r=[],o=t;this._setSVGBg(r);for(var a=0,s=this._textLines.length;a<s;a++)n=this._getLineLeftOffset(a),(this.textBackgroundColor||this.styleHas("textBackgroundColor",a))&&this._setSVGTextLineBg(r,a,e+n,o),this._setSVGTextLineText(i,a,e+n,o),o+=this.getHeightOfLine(a);return{textSpans:i,textBgRects:r}},_createTextCharSpan:function(t,e,n,i){var r=t!==t.trim()||t.match(v),o=this.getSvgSpanStyles(e,r),a=o?'style="'+o+'"':"",s=e.deltaY,l="",c=g.Object.NUM_FRACTION_DIGITS;return s&&(l=' dy="'+p(s,c)+'" '),['<tspan x="',p(n,c),'" y="',p(i,c),'" ',l,a,">",g.util.string.escapeXml(t),"</tspan>"].join("")},_setSVGTextLineText:function(t,e,n,i){var r,o,a,s,l,c=this.getHeightOfLine(e),u=-1!==this.textAlign.indexOf("justify"),h="",f=0,d=this._textLines[e];i+=c*(1-this._fontSizeFraction)/this.lineHeight;for(var p=0,v=d.length-1;p<=v;p++)l=p===v||this.charSpacing,h+=d[p],a=this.__charBounds[e][p],0===f?(n+=a.kernedWidth-a.width,f+=a.width):f+=a.kernedWidth,u&&!l&&this._reSpaceAndTab.test(d[p])&&(l=!0),l||(r=r||this.getCompleteStyleDeclaration(e,p),o=this.getCompleteStyleDeclaration(e,p+1),l=this._hasStyleChangedForSvg(r,o)),l&&(s=this._getStyleDeclaration(e,p)||{},t.push(this._createTextCharSpan(h,s,n,i)),h="",r=o,n+=f,f=0)},_pushTextBgRect:function(t,e,n,i,r,o){var a=g.Object.NUM_FRACTION_DIGITS;t.push("\t\t<rect ",this._getFillAttributes(e),' x="',p(n,a),'" y="',p(i,a),'" width="',p(r,a),'" height="',p(o,a),'"></rect>\n')},_setSVGTextLineBg:function(t,e,n,i){for(var r,o,a=this._textLines[e],s=this.getHeightOfLine(e)/this.lineHeight,l=0,c=0,u=this.getValueOfPropertyAt(e,0,"textBackgroundColor"),h=0,f=a.length;h<f;h++)r=this.__charBounds[e][h],(o=this.getValueOfPropertyAt(e,h,"textBackgroundColor"))!==u?(u&&this._pushTextBgRect(t,u,n+c,i,l,s),c=r.left,l=r.width,u=o):l+=r.kernedWidth;o&&this._pushTextBgRect(t,o,n+c,i,l,s)},_getFillAttributes:function(t){var e=t&&"string"==typeof t?new g.Color(t):"";return e&&e.getSource()&&1!==e.getAlpha()?'opacity="'+e.getAlpha()+'" fill="'+e.setAlpha(1).toRgb()+'"':'fill="'+t+'"'},_getSVGLineTopOffset:function(t){for(var e,n=0,i=0;i<t;i++)n+=this.getHeightOfLine(i);return e=this.getHeightOfLine(i),{lineTop:n,offset:(this._fontSizeMult-this._fontSizeFraction)*e/(this.lineHeight*this._fontSizeMult)}},getSvgStyles:function(t){return g.Object.prototype.getSvgStyles.call(this,t)+" white-space: pre;"}}),function(t){"use strict";var e=t.fabric||(t.fabric={});e.Textbox=e.util.createClass(e.IText,e.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:2,__cachedLines:null,lockScalingFlip:!0,noScaleCache:!1,_dimensionAffectingProps:e.Text.prototype._dimensionAffectingProps.concat("width"),_wordJoiners:/[ \t\r]/,splitByGrapheme:!1,initDimensions:function(){this.__skipDimension||(this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),-1!==this.textAlign.indexOf("justify")&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(t){for(var e=0,n=0,i=0,r={},o=0;o<t.graphemeLines.length;o++)"\n"===t.graphemeText[i]&&o>0?(n=0,i++,e++):!this.splitByGrapheme&&this._reSpaceAndTab.test(t.graphemeText[i])&&o>0&&(n++,i++),r[o]={line:e,offset:n},i+=t.graphemeLines[o].length,n+=t.graphemeLines[o].length;return r},styleHas:function(t,n){if(this._styleMap&&!this.isWrapping){var i=this._styleMap[n];i&&(n=i.line)}return e.Text.prototype.styleHas.call(this,t,n)},isEmptyStyles:function(t){if(!this.styles)return!0;var e,n,i=0,r=!1,o=this._styleMap[t],a=this._styleMap[t+1];for(var s in o&&(t=o.line,i=o.offset),a&&(r=a.line===t,e=a.offset),n=void 0===t?this.styles:{line:this.styles[t]})for(var l in n[s])if(l>=i&&(!r||l<e))for(var c in n[s][l])return!1;return!0},_getStyleDeclaration:function(t,e){if(this._styleMap&&!this.isWrapping){var n=this._styleMap[t];if(!n)return null;t=n.line,e=n.offset+e}return this.callSuper("_getStyleDeclaration",t,e)},_setStyleDeclaration:function(t,e,n){var i=this._styleMap[t];this.styles[t=i.line][e=i.offset+e]=n},_deleteStyleDeclaration:function(t,e){var n=this._styleMap[t];delete this.styles[t=n.line][e=n.offset+e]},_getLineStyle:function(t){return!!this.styles[this._styleMap[t].line]},_setLineStyle:function(t){this.styles[this._styleMap[t].line]={}},_wrapText:function(t,e){var n,i=[];for(this.isWrapping=!0,n=0;n<t.length;n++)i=i.concat(this._wrapLine(t[n],n,e));return this.isWrapping=!1,i},_measureWord:function(t,e,n){var i,r=0;n=n||0;for(var o=0,a=t.length;o<a;o++)r+=this._getGraphemeBox(t[o],e,o+n,i,!0).kernedWidth,i=t[o];return r},_wrapLine:function(t,n,i,r){var o=0,a=this.splitByGrapheme,s=[],l=[],c=a?e.util.string.graphemeSplit(t):t.split(this._wordJoiners),u="",h=0,f=a?"":" ",d=0,p=0,v=0,g=!0,m=a?0:this._getWidthOfCharSpacing();r=r||0,0===c.length&&c.push([]),i-=r;for(var y=0;y<c.length;y++)u=a?c[y]:e.util.string.graphemeSplit(c[y]),d=this._measureWord(u,n,h),h+=u.length,(o+=p+d-m)>=i&&!g?(s.push(l),l=[],o=d,g=!0):o+=m,g||a||l.push(f),l=l.concat(u),p=this._measureWord([f],n,h),h++,g=!1,d>v&&(v=d);return y&&s.push(l),v+r>this.dynamicMinWidth&&(this.dynamicMinWidth=v-m+r),s},isEndOfWrapping:function(t){return!this._styleMap[t+1]||this._styleMap[t+1].line!==this._styleMap[t].line},missingNewlineOffset:function(t){return this.splitByGrapheme?this.isEndOfWrapping(t)?1:0:1},_splitTextIntoLines:function(t){for(var n=e.Text.prototype._splitTextIntoLines.call(this,t),i=this._wrapText(n.lines,this.width),r=new Array(i.length),o=0;o<i.length;o++)r[o]=i[o].join("");return n.lines=r,n.graphemeLines=i,n},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var t={};for(var e in this._styleMap)this._textLines[e]&&(t[this._styleMap[e].line]=1);for(var e in this.styles)t[e]||delete this.styles[e]},toObject:function(t){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(t))}}),e.Textbox.fromObject=function(t,n){return e.Object._fromObject("Textbox",t,n,"text")}}(e)},hLX6:function(t,e,n){"use strict";function i(t,e){var n,i;if("function"==typeof e)void 0!==(i=e(t))&&(t=i);else if(Array.isArray(e))for(n=0;n<e.length;n++)void 0!==(i=e[n](t))&&(t=i);return t}function r(t,e){return"-"===t[0]&&Array.isArray(e)&&/^-\d+$/.test(t)?e.length+parseInt(t,10):t}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function a(t){return Object(t)===t}function s(t){return 0===Object.keys(t).length}var l=["__proto__","prototype","constructor"],c=function(t){return-1===l.indexOf(t)};function u(t,e){t.indexOf("[")>=0&&(t=t.replace(/\[/g,".").replace(/]/g,""));var n=t.split(e);if(n.filter(c).length!==n.length)throw Error("Refusing to update blacklisted property "+t);return n}var h=Object.prototype.hasOwnProperty;function f(t,e,n,i){if(!(this instanceof f))return new f(t,e,n,i);void 0===e&&(e=!1),void 0===n&&(n=!0),void 0===i&&(i=!0),this.separator=t||".",this.override=e,this.useArray=n,this.useBrackets=i,this.keepArray=!1,this.cleanup=[]}var d=new f(".",!1,!0,!0);function p(t){return function(){return d[t].apply(d,arguments)}}f.prototype._fill=function(t,e,n,r){var o=t.shift();if(t.length>0){if(e[o]=e[o]||(this.useArray&&function(t){return/^\d+$/.test(t)}(t[0])?[]:{}),!a(e[o])){if(!this.override){if(!a(n)||!s(n))throw new Error("Trying to redefine `"+o+"` which is a "+typeof e[o]);return}e[o]={}}this._fill(t,e[o],n,r)}else{if(!this.override&&a(e[o])&&!s(e[o])){if(!a(n)||!s(n))throw new Error("Trying to redefine non-empty obj['"+o+"']");return}e[o]=i(n,r)}},f.prototype.object=function(t,e){var n=this;return Object.keys(t).forEach((function(r){var o=void 0===e?null:e[r],a=u(r,n.separator).join(n.separator);-1!==a.indexOf(n.separator)?(n._fill(a.split(n.separator),t,t[r],o),delete t[r]):t[r]=i(t[r],o)})),t},f.prototype.str=function(t,e,n,r){var o=u(t,this.separator).join(this.separator);return-1!==t.indexOf(this.separator)?this._fill(o.split(this.separator),n,e,r):n[t]=i(e,r),n},f.prototype.pick=function(t,e,n,i){var o,a,s,l,c;for(a=u(t,this.separator),o=0;o<a.length;o++){if(l=r(a[o],e),!e||"object"!=typeof e||!(l in e))return;if(o===a.length-1)return n?(s=e[l],i&&Array.isArray(e)?e.splice(l,1):delete e[l],Array.isArray(e)&&(c=a.slice(0,-1).join("."),-1===this.cleanup.indexOf(c)&&this.cleanup.push(c)),s):e[l];e=e[l]}return n&&Array.isArray(e)&&(e=e.filter((function(t){return void 0!==t}))),e},f.prototype.delete=function(t,e){return this.remove(t,e,!0)},f.prototype.remove=function(t,e,n){var i;if(this.cleanup=[],Array.isArray(t)){for(i=0;i<t.length;i++)this.pick(t[i],e,!0,n);return n||this._cleanup(e),e}return this.pick(t,e,!0,n)},f.prototype._cleanup=function(t){var e,n,i,r;if(this.cleanup.length){for(n=0;n<this.cleanup.length;n++)e=(e=(r=(i=this.cleanup[n].split(".")).splice(0,-1).join("."))?this.pick(r,t):t)[i[0]].filter((function(t){return void 0!==t})),this.set(this.cleanup[n],e,t);this.cleanup=[]}},f.prototype.del=f.prototype.remove,f.prototype.move=function(t,e,n,r,o){return"function"==typeof r||Array.isArray(r)?this.set(e,i(this.pick(t,n,!0),r),n,o):(o=r,this.set(e,this.pick(t,n,!0),n,o)),n},f.prototype.transfer=function(t,e,n,r,o,a){return"function"==typeof o||Array.isArray(o)?this.set(e,i(this.pick(t,n,!0),o),r,a):(a=o,this.set(e,this.pick(t,n,!0),r,a)),r},f.prototype.copy=function(t,e,n,r,o,a){return"function"==typeof o||Array.isArray(o)?this.set(e,i(JSON.parse(JSON.stringify(this.pick(t,n,!1))),o),r,a):(a=o,this.set(e,this.pick(t,n,!1),r,a)),r},f.prototype.set=function(t,e,n,i){var r,a,s,l;if(void 0===e)return n;for(s=u(t,this.separator),r=0;r<s.length;r++){if(l=s[r],r===s.length-1)if(i&&o(e)&&o(n[l]))for(a in e)h.call(e,a)&&(n[l][a]=e[a]);else if(i&&Array.isArray(n[l])&&Array.isArray(e))for(var c=0;c<e.length;c++)n[s[r]].push(e[c]);else n[l]=e;else h.call(n,l)&&(o(n[l])||Array.isArray(n[l]))||(n[l]=/^\d+$/.test(s[r+1])?[]:{});n=n[l]}return n},f.prototype.transform=function(t,e,n){return e=e||{},n=n||{},Object.keys(t).forEach((function(i){this.set(t[i],this.pick(i,e),n)}).bind(this)),n},f.prototype.dot=function(t,e,n){e=e||{},n=n||[];var i=Array.isArray(t);return Object.keys(t).forEach((function(r){var l=i&&this.useBrackets?"["+r+"]":r;if(a(t[r])&&(o(t[r])&&!s(t[r])||Array.isArray(t[r])&&!this.keepArray&&0!==t[r].length)){if(i&&this.useBrackets){var c=n[n.length-1]||"";return this.dot(t[r],e,n.slice(0,-1).concat(c+l))}return this.dot(t[r],e,n.concat(l))}i&&this.useBrackets?e[n.join(this.separator).concat("["+r+"]")]=t[r]:e[n.concat(l).join(this.separator)]=t[r]}).bind(this)),e},f.pick=p("pick"),f.move=p("move"),f.transfer=p("transfer"),f.transform=p("transform"),f.copy=p("copy"),f.object=p("object"),f.str=p("str"),f.set=p("set"),f.delete=p("delete"),f.del=f.remove=p("remove"),f.dot=p("dot"),["override","overwrite"].forEach((function(t){Object.defineProperty(f,t,{get:function(){return d.override},set:function(t){d.override=!!t}})})),["useArray","keepArray","useBrackets"].forEach((function(t){Object.defineProperty(f,t,{get:function(){return d[t]},set:function(e){d[t]=e}})})),f._process=i,t.exports=f},jT1Q:function(t,e,n){var i=n("4af/"),r=n("BjAV"),o=n("2yAJ"),a=n("v9aN"),s=n("vYjF"),l=s.isErrorEvent,c=s.isDOMError,u=s.isDOMException,h=s.isError,f=s.isObject,d=s.isPlainObject,p=s.isUndefined,v=s.isFunction,g=s.isString,m=s.isArray,y=s.isEmptyObject,_=s.each,b=s.objectMerge,k=s.truncate,C=s.objectFrozen,w=s.hasKey,x=s.joinRegExp,S=s.urlencode,E=s.uuid4,T=s.htmlTreeAsString,O=s.isSameException,A=s.isSameStacktrace,I=s.parseUrl,P=s.fill,D=s.supportsFetch,R=s.supportsReferrerPolicy,F=s.serializeKeysForMessage,M=s.serializeException,j=s.sanitize,L=n("AKyF").wrapMethod,N="source protocol user pass host port path".split(" "),B=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;function z(){return+new Date}var V="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},H=V.document,W=V.navigator;function U(t,e){return v(e)?function(n){return e(n,t)}:e}function Y(){for(var t in this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument=!p(H),this._hasNavigator=!p(W),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={release:V.SENTRY_RELEASE&&V.SENTRY_RELEASE.id,logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],headers:null,collectWindowErrors:!0,captureUnhandledRejections:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1,sanitizeKeys:[]},this._fetchDefaults={method:"POST",referrerPolicy:R()?"origin":""},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=V.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=z(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._location=V.location,this._lastHref=this._location&&this._location.href,this._resetBackoff(),this._originalConsole)this._originalConsoleMethods[t]=this._originalConsole[t]}(Y.prototype={VERSION:"3.27.2",debug:!1,TraceKit:i,config:function(t,e){var n=this;if(n._globalServer)return this._logDebug("error","Error: Raven has already been configured"),n;if(!t)return n;var r=n._globalOptions;e&&_(e,(function(t,e){"tags"===t||"extra"===t||"user"===t?n._globalContext[t]=e:r[t]=e})),n.setDSN(t),r.ignoreErrors.push(/^Script error\.?$/),r.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),r.ignoreErrors=x(r.ignoreErrors),r.ignoreUrls=!!r.ignoreUrls.length&&x(r.ignoreUrls),r.whitelistUrls=!!r.whitelistUrls.length&&x(r.whitelistUrls),r.includePaths=x(r.includePaths),r.maxBreadcrumbs=Math.max(0,Math.min(r.maxBreadcrumbs||100,100));var o={xhr:!0,console:!0,dom:!0,location:!0,sentry:!0},a=r.autoBreadcrumbs;"[object Object]"==={}.toString.call(a)?a=b(o,a):!1!==a&&(a=o),r.autoBreadcrumbs=a;var s={tryCatch:!0},l=r.instrument;return"[object Object]"==={}.toString.call(l)?l=b(s,l):!1!==l&&(l=s),r.instrument=l,i.collectWindowErrors=!!r.collectWindowErrors,n},install:function(){var t=this;return t.isSetup()&&!t._isRavenInstalled&&(i.report.subscribe((function(){t._handleOnErrorStackInfo.apply(t,arguments)})),t._globalOptions.captureUnhandledRejections&&t._attachPromiseRejectionHandler(),t._patchFunctionToString(),t._globalOptions.instrument&&t._globalOptions.instrument.tryCatch&&t._instrumentTryCatch(),t._globalOptions.autoBreadcrumbs&&t._instrumentBreadcrumbs(),t._drainPlugins(),t._isRavenInstalled=!0),Error.stackTraceLimit=t._globalOptions.stackTraceLimit,this},setDSN:function(t){var e=this._parseDSN(t),n=e.path.lastIndexOf("/"),i=e.path.substr(1,n);this._dsn=t,this._globalKey=e.user,this._globalSecret=e.pass&&e.pass.substr(1),this._globalProject=e.path.substr(n+1),this._globalServer=this._getGlobalServer(e),this._globalEndpoint=this._globalServer+"/"+i+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function(t,e,n){return v(t)&&(n=e||[],e=t,t={}),this.wrap(t,e).apply(this,n)},wrap:function(t,e,n){var i=this;if(p(e)&&!v(t))return t;if(v(t)&&(e=t,t=void 0),!v(e))return e;try{if(e.__raven__)return e;if(e.__raven_wrapper__)return e.__raven_wrapper__}catch(a){return e}function r(){var r=[],o=arguments.length,s=!t||t&&!1!==t.deep;for(n&&v(n)&&n.apply(this,arguments);o--;)r[o]=s?i.wrap(t,arguments[o]):arguments[o];try{return e.apply(this,r)}catch(a){throw i._ignoreNextOnError(),i.captureException(a,t),a}}for(var o in e)w(e,o)&&(r[o]=e[o]);return r.prototype=e.prototype,e.__raven_wrapper__=r,r.__raven__=!0,r.__orig__=e,r},uninstall:function(){return i.report.uninstall(),this._detachPromiseRejectionHandler(),this._unpatchFunctionToString(),this._restoreBuiltIns(),this._restoreConsole(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},_promiseRejectionHandler:function(t){this._logDebug("debug","Raven caught unhandled promise rejection:",t),this.captureException(t.reason,{mechanism:{type:"onunhandledrejection",handled:!1}})},_attachPromiseRejectionHandler:function(){return this._promiseRejectionHandler=this._promiseRejectionHandler.bind(this),V.addEventListener&&V.addEventListener("unhandledrejection",this._promiseRejectionHandler),this},_detachPromiseRejectionHandler:function(){return V.removeEventListener&&V.removeEventListener("unhandledrejection",this._promiseRejectionHandler),this},captureException:function(t,e){if(e=b({trimHeadFrames:0},e||{}),l(t)&&t.error)t=t.error;else{if(c(t)||u(t)){var n=t.name||(c(t)?"DOMError":"DOMException");return this.captureMessage(t.message?n+": "+t.message:n,b(e,{stacktrace:!0,trimHeadFrames:e.trimHeadFrames+1}))}if(h(t))t=t;else{if(!d(t))return this.captureMessage(t,b(e,{stacktrace:!0,trimHeadFrames:e.trimHeadFrames+1}));e=this._getCaptureExceptionOptionsFromPlainObject(e,t),t=new Error(e.message)}}this._lastCapturedException=t;try{var r=i.computeStackTrace(t);this._handleStackInfo(r,e)}catch(o){if(t!==o)throw o}return this},_getCaptureExceptionOptionsFromPlainObject:function(t,e){var n=Object.keys(e).sort(),i=b(t,{message:"Non-Error exception captured with keys: "+F(n),fingerprint:[o(n)],extra:t.extra||{}});return i.extra.__serialized__=M(e),i},captureMessage:function(t,e){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t)){var n,r=b({message:t+=""},e=e||{});try{throw new Error(t)}catch(c){n=c}n.name=null;var o=i.computeStackTrace(n),a=m(o.stack)&&o.stack[1];a&&"Raven.captureException"===a.func&&(a=o.stack[2]);var s=a&&a.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(s))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(s))){if(this._globalOptions.stacktrace||e.stacktrace||""===r.message){r.fingerprint=null==r.fingerprint?t:r.fingerprint,(e=b({trimHeadFrames:0},e)).trimHeadFrames+=1;var l=this._prepareFrames(o,e);r.stacktrace={frames:l.reverse()}}return r.fingerprint&&(r.fingerprint=m(r.fingerprint)?r.fingerprint:[r.fingerprint]),this._send(r),this}}},captureBreadcrumb:function(t){var e=b({timestamp:z()/1e3},t);if(v(this._globalOptions.breadcrumbCallback)){var n=this._globalOptions.breadcrumbCallback(e);if(f(n)&&!y(n))e=n;else if(!1===n)return this}return this._breadcrumbs.push(e),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(t){var e=[].slice.call(arguments,1);return this._plugins.push([t,e]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(t){return this._globalContext.user=t,this},setExtraContext:function(t){return this._mergeContext("extra",t),this},setTagsContext:function(t){return this._mergeContext("tags",t),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(r(this._globalContext))},setEnvironment:function(t){return this._globalOptions.environment=t,this},setRelease:function(t){return this._globalOptions.release=t,this},setDataCallback:function(t){return this._globalOptions.dataCallback=U(this._globalOptions.dataCallback,t),this},setBreadcrumbCallback:function(t){return this._globalOptions.breadcrumbCallback=U(this._globalOptions.breadcrumbCallback,t),this},setShouldSendCallback:function(t){return this._globalOptions.shouldSendCallback=U(this._globalOptions.shouldSendCallback,t),this},setTransport:function(t){return this._globalOptions.transport=t,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!(!this._hasJSON||!this._globalServer&&(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),1))},afterLoad:function(){var t=V.RavenConfig;t&&this.config(t.dsn,t.config).install()},showReportDialog:function(t){if(H){if(!(t=b({eventId:this.lastEventId(),dsn:this._dsn,user:this._globalContext.user||{}},t)).eventId)throw new a("Missing eventId");if(!t.dsn)throw new a("Missing DSN");var e=encodeURIComponent,n=[];for(var i in t)if("user"===i){var r=t.user;r.name&&n.push("name="+e(r.name)),r.email&&n.push("email="+e(r.email))}else n.push(e(i)+"="+e(t[i]));var o=this._getGlobalServer(this._parseDSN(t.dsn)),s=H.createElement("script");s.async=!0,s.src=o+"/api/embed/error-page/?"+n.join("&"),(H.head||H.body).appendChild(s)}},_ignoreNextOnError:function(){var t=this;this._ignoreOnError+=1,setTimeout((function(){t._ignoreOnError-=1}))},_triggerEvent:function(t,e){var n,i;if(this._hasDocument){for(i in e=e||{},t="raven"+t.substr(0,1).toUpperCase()+t.substr(1),H.createEvent?(n=H.createEvent("HTMLEvents")).initEvent(t,!0,!0):(n=H.createEventObject()).eventType=t,e)w(e,i)&&(n[i]=e[i]);if(H.createEvent)H.dispatchEvent(n);else try{H.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(r){}}},_breadcrumbEventHandler:function(t){var e=this;return function(n){if(e._keypressTimeout=null,e._lastCapturedEvent!==n){var i;e._lastCapturedEvent=n;try{i=T(n.target)}catch(r){i="<unknown>"}e.captureBreadcrumb({category:"ui."+t,message:i})}}},_keypressEventHandler:function(){var t=this;return function(e){var n;try{n=e.target}catch(o){return}var i=n&&n.tagName;if(i&&("INPUT"===i||"TEXTAREA"===i||n.isContentEditable)){var r=t._keypressTimeout;r||t._breadcrumbEventHandler("input")(e),clearTimeout(r),t._keypressTimeout=setTimeout((function(){t._keypressTimeout=null}),1e3)}}},_captureUrlChange:function(t,e){var n=I(this._location.href),i=I(e),r=I(t);this._lastHref=e,n.protocol===i.protocol&&n.host===i.host&&(e=i.relative),n.protocol===r.protocol&&n.host===r.host&&(t=r.relative),this.captureBreadcrumb({category:"navigation",data:{to:e,from:t}})},_patchFunctionToString:function(){var t=this;t._originalFunctionToString=Function.prototype.toString,Function.prototype.toString=function(){return t._originalFunctionToString.apply("function"==typeof this&&this.__raven__?this.__orig__:this,arguments)}},_unpatchFunctionToString:function(){this._originalFunctionToString&&(Function.prototype.toString=this._originalFunctionToString)},_instrumentTryCatch:function(){var t=this,e=t._wrappedBuiltIns;function n(e){return function(n,i){for(var r=new Array(arguments.length),o=0;o<r.length;++o)r[o]=arguments[o];var a=r[0];return v(a)&&(r[0]=t.wrap({mechanism:{type:"instrument",data:{function:e.name||"<anonymous>"}}},a)),e.apply?e.apply(this,r):e(r[0],r[1])}}var i=this._globalOptions.autoBreadcrumbs;function r(n){var r=V[n]&&V[n].prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(P(r,"addEventListener",(function(e){return function(r,o,a,s){try{o&&o.handleEvent&&(o.handleEvent=t.wrap({mechanism:{type:"instrument",data:{target:n,function:"handleEvent",handler:o&&o.name||"<anonymous>"}}},o.handleEvent))}catch(h){}var l,c,u;return i&&i.dom&&("EventTarget"===n||"Node"===n)&&(c=t._breadcrumbEventHandler("click"),u=t._keypressEventHandler(),l=function(t){if(t){var e;try{e=t.type}catch(n){return}return"click"===e?c(t):"keypress"===e?u(t):void 0}}),e.call(this,r,t.wrap({mechanism:{type:"instrument",data:{target:n,function:"addEventListener",handler:o&&o.name||"<anonymous>"}}},o,l),a,s)}}),e),P(r,"removeEventListener",(function(t){return function(e,n,i,r){try{n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n)}catch(o){}return t.call(this,e,n,i,r)}}),e))}P(V,"setTimeout",n,e),P(V,"setInterval",n,e),V.requestAnimationFrame&&P(V,"requestAnimationFrame",(function(e){return function(n){return e(t.wrap({mechanism:{type:"instrument",data:{function:"requestAnimationFrame",handler:e&&e.name||"<anonymous>"}}},n))}}),e);for(var o=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],a=0;a<o.length;a++)r(o[a])},_instrumentBreadcrumbs:function(){var t=this,e=this._globalOptions.autoBreadcrumbs,n=t._wrappedBuiltIns;function i(e,n){e in n&&v(n[e])&&P(n,e,(function(n){return t.wrap({mechanism:{type:"instrument",data:{function:e,handler:n&&n.name||"<anonymous>"}}},n)}))}if(e.xhr&&"XMLHttpRequest"in V){var r=V.XMLHttpRequest&&V.XMLHttpRequest.prototype;P(r,"open",(function(e){return function(n,i){return g(i)&&-1===i.indexOf(t._globalKey)&&(this.__raven_xhr={method:n,url:i,status_code:null}),e.apply(this,arguments)}}),n),P(r,"send",(function(e){return function(){var n=this;function r(){if(n.__raven_xhr&&4===n.readyState){try{n.__raven_xhr.status_code=n.status}catch(e){}t.captureBreadcrumb({type:"http",category:"xhr",data:n.__raven_xhr})}}for(var o=["onload","onerror","onprogress"],a=0;a<o.length;a++)i(o[a],n);return"onreadystatechange"in n&&v(n.onreadystatechange)?P(n,"onreadystatechange",(function(e){return t.wrap({mechanism:{type:"instrument",data:{function:"onreadystatechange",handler:e&&e.name||"<anonymous>"}}},e,r)})):n.onreadystatechange=r,e.apply(this,arguments)}}),n)}e.xhr&&D()&&P(V,"fetch",(function(e){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;++i)n[i]=arguments[i];var r,o=n[0],a="GET";if("string"==typeof o?r=o:"Request"in V&&o instanceof V.Request?(r=o.url,o.method&&(a=o.method)):r=""+o,-1!==r.indexOf(t._globalKey))return e.apply(this,n);n[1]&&n[1].method&&(a=n[1].method);var s={method:a,url:r,status_code:null};return e.apply(this,n).then((function(e){return s.status_code=e.status,t.captureBreadcrumb({type:"http",category:"fetch",data:s}),e})).catch((function(e){throw t.captureBreadcrumb({type:"http",category:"fetch",data:s,level:"error"}),e}))}}),n),e.dom&&this._hasDocument&&(H.addEventListener?(H.addEventListener("click",t._breadcrumbEventHandler("click"),!1),H.addEventListener("keypress",t._keypressEventHandler(),!1)):H.attachEvent&&(H.attachEvent("onclick",t._breadcrumbEventHandler("click")),H.attachEvent("onkeypress",t._keypressEventHandler())));var o=V.chrome;if(e.location&&!(o&&o.app&&o.app.runtime)&&V.history&&V.history.pushState&&V.history.replaceState){var a=V.onpopstate;V.onpopstate=function(){var e=t._location.href;if(t._captureUrlChange(t._lastHref,e),a)return a.apply(this,arguments)};var s=function(e){return function(){var n=arguments.length>2?arguments[2]:void 0;return n&&t._captureUrlChange(t._lastHref,n+""),e.apply(this,arguments)}};P(V.history,"pushState",s,n),P(V.history,"replaceState",s,n)}if(e.console&&"console"in V&&console.log){var l=function(e,n){t.captureBreadcrumb({message:e,level:n.level,category:"console"})};_(["debug","info","warn","error","log"],(function(t,e){L(console,e,l)}))}},_restoreBuiltIns:function(){for(var t;this._wrappedBuiltIns.length;)(t=this._wrappedBuiltIns.shift())[0][t[1]]=t[2]},_restoreConsole:function(){for(var t in this._originalConsoleMethods)this._originalConsole[t]=this._originalConsoleMethods[t]},_drainPlugins:function(){var t=this;_(this._plugins,(function(e,n){n[0].apply(t,[t].concat(n[1]))}))},_parseDSN:function(t){var e=B.exec(t),n={},i=7;try{for(;i--;)n[N[i]]=e[i]||""}catch(r){throw new a("Invalid DSN: "+t)}if(n.pass&&!this._globalOptions.allowSecretKey)throw new a("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return n},_getGlobalServer:function(t){var e="//"+t.host+(t.port?":"+t.port:"");return t.protocol&&(e=t.protocol+":"+e),e},_handleOnErrorStackInfo:function(t,e){(e=e||{}).mechanism=e.mechanism||{type:"onerror",handled:!1},this._ignoreOnError||this._handleStackInfo(t,e)},_handleStackInfo:function(t,e){var n=this._prepareFrames(t,e);this._triggerEvent("handle",{stackInfo:t,options:e}),this._processException(t.name,t.message,t.url,t.lineno,n,e)},_prepareFrames:function(t,e){var n=this,i=[];if(t.stack&&t.stack.length&&(_(t.stack,(function(e,r){var o=n._normalizeFrame(r,t.url);o&&i.push(o)})),e&&e.trimHeadFrames))for(var r=0;r<e.trimHeadFrames&&r<i.length;r++)i[r].in_app=!1;return i=i.slice(0,this._globalOptions.stackTraceLimit)},_normalizeFrame:function(t,e){var n={filename:t.url,lineno:t.line,colno:t.column,function:t.func||"?"};return t.url||(n.filename=e),n.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(n.filename)||/(Raven|TraceKit)\./.test(n.function)||/raven\.(min\.)?js$/.test(n.filename)),n},_processException:function(t,e,n,i,r,o){var a,s=(t?t+": ":"")+(e||"");if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)&&!this._globalOptions.ignoreErrors.test(s))&&(r&&r.length?(n=r[0].filename||n,r.reverse(),a={frames:r}):n&&(a={frames:[{filename:n,lineno:i,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(n))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(n)))){var l=b({exception:{values:[{type:t,value:e,stacktrace:a}]},transaction:n},o),c=l.exception.values[0];null==c.type&&""===c.value&&(c.value="Unrecoverable error caught"),!l.exception.mechanism&&l.mechanism&&(l.exception.mechanism=l.mechanism,delete l.mechanism),l.exception.mechanism=b({type:"generic",handled:!0},l.exception.mechanism||{}),this._send(l)}},_trimPacket:function(t){var e=this._globalOptions.maxMessageLength;if(t.message&&(t.message=k(t.message,e)),t.exception){var n=t.exception.values[0];n.value=k(n.value,e)}var i=t.request;return i&&(i.url&&(i.url=k(i.url,this._globalOptions.maxUrlLength)),i.Referer&&(i.Referer=k(i.Referer,this._globalOptions.maxUrlLength))),t.breadcrumbs&&t.breadcrumbs.values&&this._trimBreadcrumbs(t.breadcrumbs),t},_trimBreadcrumbs:function(t){for(var e,n,i,r=["to","from","url"],o=0;o<t.values.length;++o)if((n=t.values[o]).hasOwnProperty("data")&&f(n.data)&&!C(n.data)){i=b({},n.data);for(var a=0;a<r.length;++a)i.hasOwnProperty(e=r[a])&&i[e]&&(i[e]=k(i[e],this._globalOptions.maxUrlLength));t.values[o].data=i}},_getHttpData:function(){if(this._hasNavigator||this._hasDocument){var t={};return this._hasNavigator&&W.userAgent&&(t.headers={"User-Agent":W.userAgent}),V.location&&V.location.href&&(t.url=V.location.href),this._hasDocument&&H.referrer&&(t.headers||(t.headers={}),t.headers.Referer=H.referrer),t}},_resetBackoff:function(){this._backoffDuration=0,this._backoffStart=null},_shouldBackoff:function(){return this._backoffDuration&&z()-this._backoffStart<this._backoffDuration},_isRepeatData:function(t){var e=this._lastData;return!(!e||t.message!==e.message||t.transaction!==e.transaction)&&(t.stacktrace||e.stacktrace?A(t.stacktrace,e.stacktrace):t.exception||e.exception?O(t.exception,e.exception):!t.fingerprint&&!e.fingerprint||Boolean(t.fingerprint&&e.fingerprint)&&JSON.stringify(t.fingerprint)===JSON.stringify(e.fingerprint))},_setBackoffState:function(t){if(!this._shouldBackoff()){var e=t.status;if(400===e||401===e||429===e){var n;try{n=D()?t.headers.get("Retry-After"):t.getResponseHeader("Retry-After"),n=1e3*parseInt(n,10)}catch(i){}this._backoffDuration=n||2*this._backoffDuration||1e3,this._backoffStart=z()}}},_send:function(t){var e=this._globalOptions,n={project:this._globalProject,logger:e.logger,platform:"javascript"},i=this._getHttpData();i&&(n.request=i),t.trimHeadFrames&&delete t.trimHeadFrames,(t=b(n,t)).tags=b(b({},this._globalContext.tags),t.tags),t.extra=b(b({},this._globalContext.extra),t.extra),t.extra["session:duration"]=z()-this._startTime,this._breadcrumbs&&this._breadcrumbs.length>0&&(t.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),this._globalContext.user&&(t.user=this._globalContext.user),e.environment&&(t.environment=e.environment),e.release&&(t.release=e.release),e.serverName&&(t.server_name=e.serverName),t=this._sanitizeData(t),Object.keys(t).forEach((function(e){(null==t[e]||""===t[e]||y(t[e]))&&delete t[e]})),v(e.dataCallback)&&(t=e.dataCallback(t)||t),t&&!y(t)&&(v(e.shouldSendCallback)&&!e.shouldSendCallback(t)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",t):"number"==typeof e.sampleRate?Math.random()<e.sampleRate&&this._sendProcessedPayload(t):this._sendProcessedPayload(t)))},_sanitizeData:function(t){return j(t,this._globalOptions.sanitizeKeys)},_getUuid:function(){return E()},_sendProcessedPayload:function(t,e){var n=this,i=this._globalOptions;if(this.isSetup())if(t=this._trimPacket(t),this._globalOptions.allowDuplicates||!this._isRepeatData(t)){this._lastEventId=t.event_id||(t.event_id=this._getUuid()),this._lastData=t,this._logDebug("debug","Raven about to send:",t);var r={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(r.sentry_secret=this._globalSecret);var o=t.exception&&t.exception.values[0];this._globalOptions.autoBreadcrumbs&&this._globalOptions.autoBreadcrumbs.sentry&&this.captureBreadcrumb({category:"sentry",message:o?(o.type?o.type+": ":"")+o.value:t.message,event_id:t.event_id,level:t.level||"error"});var a=this._globalEndpoint;(i.transport||this._makeRequest).call(this,{url:a,auth:r,data:t,options:i,onSuccess:function(){n._resetBackoff(),n._triggerEvent("success",{data:t,src:a}),e&&e()},onError:function(i){n._logDebug("error","Raven transport failed to send: ",i),i.request&&n._setBackoffState(i.request),n._triggerEvent("failure",{data:t,src:a}),i=i||new Error("Raven send failed (no additional details provided)"),e&&e(i)}})}else this._logDebug("warn","Raven dropped repeat event: ",t)},_makeRequest:function(t){var e=t.url+"?"+S(t.auth),n=null,i={};if(t.options.headers&&(n=this._evaluateHash(t.options.headers)),t.options.fetchParameters&&(i=this._evaluateHash(t.options.fetchParameters)),D()){i.body=r(t.data);var o=b({},this._fetchDefaults),a=b(o,i);return n&&(a.headers=n),V.fetch(e,a).then((function(e){if(e.ok)t.onSuccess&&t.onSuccess();else{var n=new Error("Sentry error code: "+e.status);n.request=e,t.onError&&t.onError(n)}})).catch((function(){t.onError&&t.onError(new Error("Sentry error code: network unavailable"))}))}var s=V.XMLHttpRequest&&new V.XMLHttpRequest;s&&("withCredentials"in s||"undefined"!=typeof XDomainRequest)&&("withCredentials"in s?s.onreadystatechange=function(){if(4===s.readyState)if(200===s.status)t.onSuccess&&t.onSuccess();else if(t.onError){var e=new Error("Sentry error code: "+s.status);e.request=s,t.onError(e)}}:(s=new XDomainRequest,e=e.replace(/^https?:/,""),t.onSuccess&&(s.onload=t.onSuccess),t.onError&&(s.onerror=function(){var e=new Error("Sentry error code: XDomainRequest");e.request=s,t.onError(e)})),s.open("POST",e),n&&_(n,(function(t,e){s.setRequestHeader(t,e)})),s.send(r(t.data)))},_evaluateHash:function(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];e[n]="function"==typeof i?i():i}return e},_logDebug:function(t){this._originalConsoleMethods[t]&&(this.debug||this._globalOptions.debug)&&Function.prototype.apply.call(this._originalConsoleMethods[t],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function(t,e){p(e)?delete this._globalContext[t]:this._globalContext[t]=b(this._globalContext[t]||{},e)}}).setUser=Y.prototype.setUserContext,Y.prototype.setReleaseContext=Y.prototype.setRelease,t.exports=Y},mbIT:function(t,e,n){"use strict";e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},n3uD:function(t,e,n){"use strict";var i=!1;e.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else i&&console.log("RxJS: Back to a better error behavior. Thank you. <3");i=t},get useDeprecatedSynchronousErrorHandling(){return i}}},"p//D":function(t,e,n){"use strict";e.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),e.$$rxSubscriber=e.rxSubscriber},pshJ:function(t,e,n){"use strict";e.isFunction=function(t){return"function"==typeof t}},v9aN:function(t,e){function n(t){this.name="RavenConfigError",this.message=t}(n.prototype=new Error).constructor=n,t.exports=n},vYjF:function(t,e,n){var i=n("BjAV"),r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return void 0===t}function a(t){return"[object Object]"===Object.prototype.toString.call(t)}function s(t){return"[object String]"===Object.prototype.toString.call(t)}function l(t){return"[object Array]"===Object.prototype.toString.call(t)}function c(){if(!("fetch"in r))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function u(t,e){var n,i;if(o(t.length))for(n in t)f(t,n)&&e.call(null,n,t[n]);else if(i=t.length)for(n=0;n<i;n++)e.call(null,n,t[n])}function h(t,e){if("number"!=typeof e)throw new Error("2nd argument to `truncate` function should be a number");return"string"!=typeof t||0===e||t.length<=e?t:t.substr(0,e)+"\u2026"}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function d(t){for(var e,n=[],i=0,r=t.length;i<r;i++)s(e=t[i])?n.push(e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):e&&e.source&&n.push(e.source);return new RegExp(n.join("|"),"i")}function p(t){var e,n,i,r,o,a=[];if(!t||!t.tagName)return"";if(a.push(t.tagName.toLowerCase()),t.id&&a.push("#"+t.id),(e=t.className)&&s(e))for(n=e.split(/\s+/),o=0;o<n.length;o++)a.push("."+n[o]);var l=["type","name","title","alt"];for(o=0;o<l.length;o++)(r=t.getAttribute(i=l[o]))&&a.push("["+i+'="'+r+'"]');return a.join("")}function v(t,e){return!!(!!t^!!e)}function g(t,e){if(v(t,e))return!1;var n,i,r=t.frames,o=e.frames;if(void 0===r||void 0===o)return!1;if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++)if((n=r[a]).filename!==(i=o[a]).filename||n.lineno!==i.lineno||n.colno!==i.colno||n.function!==i.function)return!1;return!0}function m(t){if("string"==typeof t)return h(t,40);if("number"==typeof t||"boolean"==typeof t||void 0===t)return t;var e=Object.prototype.toString.call(t);return"[object Object]"===e?"[Object]":"[object Array]"===e?"[Array]":"[object Function]"===e?t.name?"[Function: "+t.name+"]":"[Function]":t}t.exports={isObject:function(t){return"object"==typeof t&&null!==t},isError:function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}},isErrorEvent:function(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)},isDOMError:function(t){return"[object DOMError]"===Object.prototype.toString.call(t)},isDOMException:function(t){return"[object DOMException]"===Object.prototype.toString.call(t)},isUndefined:o,isFunction:function(t){return"function"==typeof t},isPlainObject:a,isString:s,isArray:l,isEmptyObject:function(t){if(!a(t))return!1;for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},supportsErrorEvent:function(){try{return new ErrorEvent(""),!0}catch(t){return!1}},supportsDOMError:function(){try{return new DOMError(""),!0}catch(t){return!1}},supportsDOMException:function(){try{return new DOMException(""),!0}catch(t){return!1}},supportsFetch:c,supportsReferrerPolicy:function(){if(!c())return!1;try{return new Request("pickleRick",{referrerPolicy:"origin"}),!0}catch(t){return!1}},supportsPromiseRejectionEvent:function(){return"function"==typeof PromiseRejectionEvent},wrappedCallback:function(t){return function(e,n){var i=t(e)||e;return n&&n(i)||i}},each:u,objectMerge:function(t,e){return e?(u(e,(function(e,n){t[e]=n})),t):t},truncate:h,objectFrozen:function(t){return!!Object.isFrozen&&Object.isFrozen(t)},hasKey:f,joinRegExp:d,urlencode:function(t){var e=[];return u(t,(function(t,n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))})),e.join("&")},uuid4:function(){var t=r.crypto||r.msCrypto;if(!o(t)&&t.getRandomValues){var e=new Uint16Array(8);t.getRandomValues(e),e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;var n=function(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e};return n(e[0])+n(e[1])+n(e[2])+n(e[3])+n(e[4])+n(e[5])+n(e[6])+n(e[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},htmlTreeAsString:function(t){for(var e,n=[],i=0,r=0,o=" > ".length;t&&i++<5&&!("html"===(e=p(t))||i>1&&r+n.length*o+e.length>=80);)n.push(e),r+=e.length,t=t.parentNode;return n.reverse().join(" > ")},htmlElementAsString:p,isSameException:function(t,e){return!v(t,e)&&(t=t.values[0]).type===(e=e.values[0]).type&&t.value===e.value&&(n=e.stacktrace,(!o(t.stacktrace)||!o(n))&&g(t.stacktrace,e.stacktrace));var n},isSameStacktrace:g,parseUrl:function(t){if("string"!=typeof t)return{};var e=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);return{protocol:e[2],host:e[4],path:e[5],relative:e[5]+(e[6]||"")+(e[8]||"")}},fill:function(t,e,n,i){if(null!=t){var r=t[e];t[e]=n(r),t[e].__raven__=!0,t[e].__orig__=r,i&&i.push([t,e,r])}},safeJoin:function(t,e){if(!l(t))return"";for(var n=[],i=0;i<t.length;i++)try{n.push(String(t[i]))}catch(r){n.push("[value cannot be serialized]")}return n.join(e)},serializeException:function t(e,n,r){if(!a(e))return e;r="number"!=typeof(n="number"!=typeof n?3:n)?51200:r;var o,s=function t(e,n){return 0===n?m(e):a(e)?Object.keys(e).reduce((function(i,r){return i[r]=t(e[r],n-1),i}),{}):Array.isArray(e)?e.map((function(e){return t(e,n-1)})):m(e)}(e,n);return o=i(s),function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(o))>r?t(e,n-1):s},serializeKeysForMessage:function(t,e){if("number"==typeof t||"string"==typeof t)return t.toString();if(!Array.isArray(t))return"";if(0===(t=t.filter((function(t){return"string"==typeof t}))).length)return"[object has no keys]";if(t[0].length>=(e="number"!=typeof e?40:e))return t[0];for(var n=t.length;n>0;n--){var i=t.slice(0,n).join(", ");if(!(i.length>e))return n===t.length?i:i+"\u2026"}return""},sanitize:function(t,e){if(!l(e)||l(e)&&0===e.length)return t;var n,r=d(e);try{n=JSON.parse(i(t))}catch(o){return t}return function t(e){return l(e)?e.map((function(e){return t(e)})):a(e)?Object.keys(e).reduce((function(n,i){return n[i]=r.test(i)?"********":t(e[i]),n}),{}):e}(n)}}},yLV6:function(t,e,n){var i;!function(r,o,a,s){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],u=o.createElement("div"),h=Math.round,f=Math.abs,d=Date.now;function p(t,e,n){return setTimeout(k(t,n),e)}function v(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function m(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}l="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var y=m((function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&void 0===t[i[r]])&&(t[i[r]]=e[i[r]]),r++;return t}),"extend","Use `assign`."),_=m((function(t,e){return y(t,e,!0)}),"merge","Use `assign`.");function b(t,e,n){var i,r=e.prototype;(i=t.prototype=Object.create(r)).constructor=t,i._super=r,n&&l(i,n)}function k(t,e){return function(){return t.apply(e,arguments)}}function C(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function w(t,e){return void 0===t?e:t}function x(t,e,n){g(O(e),(function(e){t.addEventListener(e,n,!1)}))}function S(t,e,n){g(O(e),(function(e){t.removeEventListener(e,n,!1)}))}function E(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function T(t,e){return t.indexOf(e)>-1}function O(t){return t.trim().split(/\s+/g)}function A(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function I(t){return Array.prototype.slice.call(t,0)}function P(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];A(r,a)<0&&i.push(t[o]),r[o]=a,o++}return n&&(i=e?i.sort((function(t,n){return t[e]>n[e]})):i.sort()),i}function D(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<c.length;){if((i=(n=c[o])?n+r:e)in t)return i;o++}}var R=1;function F(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var M="ontouchstart"in r,j=void 0!==D(r,"PointerEvent"),L=M&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),N=["x","y"],B=["clientX","clientY"];function z(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){C(t.options.enable,[t])&&n.handler(e)},this.init()}function V(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=1&e&&i-r==0,a=12&e&&i-r==0;n.isFirst=!!o,n.isFinal=!!a,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=H(e)),r>1&&!n.firstMultiple?n.firstMultiple=H(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,l=e.center=W(i);e.timeStamp=d(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=G(s,l),e.distance=X(s,l),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};1!==e.eventType&&4!==o.eventType||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=Y(e.deltaX,e.deltaY);var c,u,h=U(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=f(h.x)>f(h.y)?h.x:h.y,e.scale=a?(c=a.pointers,X((u=i)[0],u[1],B)/X(c[0],c[1],B)):1,e.rotation=a?function(t,e){return G(e[1],e[0],B)+G(t[1],t[0],B)}(a.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,o,a=t.lastInterval||e,s=e.timeStamp-a.timeStamp;if(8!=e.eventType&&(s>25||void 0===a.velocity)){var l=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,u=U(s,l,c);i=u.x,r=u.y,n=f(u.x)>f(u.y)?u.x:u.y,o=Y(l,c),t.lastInterval=e}else n=a.velocity,i=a.velocityX,r=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}(n,e);var p=t.element;E(e.srcEvent.target,p)&&(p=e.srcEvent.target),e.target=p}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function H(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:h(t.pointers[n].clientX),clientY:h(t.pointers[n].clientY)},n++;return{timeStamp:d(),pointers:e,center:W(e),deltaX:t.deltaX,deltaY:t.deltaY}}function W(t){var e=t.length;if(1===e)return{x:h(t[0].clientX),y:h(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:h(n/e),y:h(i/e)}}function U(t,e,n){return{x:e/t||0,y:n/t||0}}function Y(t,e){return t===e?1:f(t)>=f(e)?t<0?2:4:e<0?8:16}function X(t,e,n){n||(n=N);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function G(t,e,n){return n||(n=N),180*Math.atan2(e[n[1]]-t[n[1]],e[n[0]]-t[n[0]])/Math.PI}z.prototype={handler:function(){},init:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(F(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(F(this.element),this.evWin,this.domHandler)}};var q={mousedown:1,mousemove:2,mouseup:4};function K(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,z.apply(this,arguments)}b(K,z,{handler:function(t){var e=q[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var Z={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:"touch",3:"pen",4:"mouse",5:"kinect"},J="pointerdown",$="pointermove pointerup pointercancel";function tt(){this.evEl=J,this.evWin=$,z.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(J="MSPointerDown",$="MSPointerMove MSPointerUp MSPointerCancel"),b(tt,z,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=Z[i],o=Q[t.pointerType]||t.pointerType,a="touch"==o,s=A(e,t.pointerId,"pointerId");1&r&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):12&r&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var et={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function nt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,z.apply(this,arguments)}function it(t,e){var n=I(t.touches),i=I(t.changedTouches);return 12&e&&(n=P(n.concat(i),"identifier",!0)),[n,i]}b(nt,z,{handler:function(t){var e=et[t.type];if(1===e&&(this.started=!0),this.started){var n=it.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var rt={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ot(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},z.apply(this,arguments)}function at(t,e){var n=I(t.touches),i=this.targetIds;if(3&e&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,a=I(t.changedTouches),s=[],l=this.target;if(o=n.filter((function(t){return E(t.target,l)})),1===e)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<a.length;)i[a[r].identifier]&&s.push(a[r]),12&e&&delete i[a[r].identifier],r++;return s.length?[P(o.concat(s),"identifier",!0),s]:void 0}function st(){z.apply(this,arguments);var t=k(this.handler,this);this.touch=new ot(this.manager,t),this.mouse=new K(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function lt(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,ct.call(this,e)):12&t&&ct.call(this,e)}function ct(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout((function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)}),2500)}}function ut(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),a=Math.abs(n-r.y);if(o<=25&&a<=25)return!0}return!1}b(ot,z,{handler:function(t){var e=rt[t.type],n=at.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}),b(st,z,{handler:function(t,e,n){var i="mouse"==n.pointerType;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if("touch"==n.pointerType)lt.call(this,e,n);else if(i&&ut.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ht=D(u.style,"touchAction"),ft=void 0!==ht,dt=function(){if(!ft)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){t[n]=!e||r.CSS.supports("touch-action",n)})),t}();function pt(t,e){this.manager=t,this.set(e)}function vt(t){this.options=l({},this.defaults,t||{}),this.id=R++,this.manager=null,this.options.enable=w(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function gt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function mt(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function yt(t,e){var n=e.manager;return n?n.get(t):t}function _t(){vt.apply(this,arguments)}function bt(){_t.apply(this,arguments),this.pX=null,this.pY=null}function kt(){_t.apply(this,arguments)}function Ct(){vt.apply(this,arguments),this._timer=null,this._input=null}function wt(){_t.apply(this,arguments)}function xt(){_t.apply(this,arguments)}function St(){vt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Et(t,e){return(e=e||{}).recognizers=w(e.recognizers,Et.defaults.preset),new Tt(t,e)}function Tt(t,e){var n;this.options=l({},Et.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(j?tt:L?ot:M?st:K))(n,V),this.touchAction=new pt(this,this.options.touchAction),Ot(this,!0),g(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function Ot(t,e){var n,i=t.element;i.style&&(g(t.options.cssProps,(function(r,o){n=D(i.style,o),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}pt.prototype={set:function(t){"compute"==t&&(t=this.compute()),ft&&this.manager.element.style&&dt[t]&&(this.manager.element.style[ht]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return g(this.manager.recognizers,(function(e){C(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(T(t,"none"))return"none";var e=T(t,"pan-x"),n=T(t,"pan-y");return e&&n?"none":e||n?e?"pan-x":"pan-y":T(t,"manipulation")?"manipulation":"auto"}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=T(i,"none")&&!dt.none,o=T(i,"pan-y")&&!dt["pan-y"],a=T(i,"pan-x")&&!dt["pan-x"];if(r&&1===t.pointers.length&&t.distance<2&&t.deltaTime<250)return;if(!a||!o)return r||o&&6&n||a&&24&n?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}},vt.prototype={defaults:{},set:function(t){return l(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(v(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=yt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return v(t,"dropRecognizeWith",this)||(t=yt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(v(t,"requireFailure",this))return this;var e=this.requireFail;return-1===A(e,t=yt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(v(t,"dropRequireFailure",this))return this;t=yt(t,this);var e=A(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n<8&&i(e.options.event+gt(n)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),n>=8&&i(e.options.event+gt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=l({},t);if(!C(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},b(_t,vt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=6&e,r=this.attrTest(t);return i&&(8&n||!r)?16|e:i||r?4&n?8|e:2&e?4|e:2:32}}),b(bt,_t,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push("pan-y"),24&t&&e.push("pan-x"),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,a=t.deltaY;return r&e.direction||(6&e.direction?(r=0===o?1:o<0?2:4,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===a?1:a<0?8:16,n=a!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return _t.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=mt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),b(kt,_t,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){1!==t.scale&&(t.additionalEvent=this.options.event+(t.scale<1?"in":"out")),this._super.emit.call(this,t)}}),b(Ct,vt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=p((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),b(wt,_t,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),b(xt,_t,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return bt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=mt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),b(St,vt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(i&&r&&n){if(4!=t.eventType)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||X(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&o?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=p((function(){this.state=8,this.tryEmit()}),e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=p((function(){this.state=32}),this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Et.VERSION="2.0.7",Et.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[wt,{enable:!1}],[kt,{enable:!1},["rotate"]],[xt,{direction:6}],[bt,{direction:6},["swipe"]],[St],[St,{event:"doubletap",taps:2},["tap"]],[Ct]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Tt.prototype={set:function(t){return l(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof vt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(v(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(v(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=A(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(void 0!==t&&void 0!==e){var n=this.handlers;return g(O(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(void 0!==t){var n=this.handlers;return g(O(t),(function(t){e?n[t]&&n[t].splice(A(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&Ot(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(Et,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Tt,Input:z,TouchAction:pt,TouchInput:ot,MouseInput:K,PointerEventInput:tt,TouchMouseInput:st,SingleTouchInput:nt,Recognizer:vt,AttrRecognizer:_t,Tap:St,Pan:bt,Swipe:xt,Pinch:kt,Rotate:wt,Press:Ct,on:x,off:S,each:g,merge:_,extend:y,assign:l,inherit:b,bindFn:k,prefixed:D}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=Et,void 0===(i=(function(){return Et}).call(e,n,e,t))||(t.exports=i)}(window,document)},yoF8:function(t,e,n){"use strict";e.identity=function(t){return t}},yx2s:function(t,e,n){"use strict";var i=n("FWf1");e.canReportError=function(t){for(;t;){var e=t.destination;if(t.closed||t.isStopped)return!1;t=e&&e instanceof i.Subscriber?e:null}return!0}},"zB/H":function(t,e,n){"use strict";var i=n("mbIT"),r=n("GMZp"),o=n("pshJ"),a=n("LBXl");function s(t){return t.reduce((function(t,e){return t.concat(e instanceof a.UnsubscriptionError?e.errors:e)}),[])}e.Subscription=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n=this._parentOrParents,l=this._unsubscribe,c=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(var u=0;u<n.length;++u)n[u].remove(this);if(o.isFunction(l))try{l.call(this)}catch(d){e=d instanceof a.UnsubscriptionError?s(d.errors):[d]}if(i.isArray(c)){u=-1;for(var h=c.length;++u<h;){var f=c[u];if(r.isObject(f))try{f.unsubscribe()}catch(d){e=e||[],d instanceof a.UnsubscriptionError?e=e.concat(s(d.errors)):e.push(d)}}}if(e)throw new a.UnsubscriptionError(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var i=n;(n=new t)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var r=n._parentOrParents;if(null===r)n._parentOrParents=this;else if(r instanceof t){if(r===this)return n;n._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return n;r.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[n]:o.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=((e=new t).closed=!0,e),t}()},zUnb:function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.r(e);var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else r&&console.log("RxJS: Back to a better error behavior. Thank you. <3");r=t},get useDeprecatedSynchronousErrorHandling(){return r}};function a(t){setTimeout((function(){throw t}),0)}var s={closed:!0,next:function(t){},error:function(t){if(o.useDeprecatedSynchronousErrorHandling)throw t;a(t)},complete:function(){}},l=Array.isArray||function(t){return t&&"number"==typeof t.length};function c(t){return null!==t&&"object"==typeof t}var u,h=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}(),f=((u=function(){function t(e){_classCallCheck(this,t),this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}return _createClass(t,[{key:"unsubscribe",value:function(){var e;if(!this.closed){var n=this._parentOrParents,r=this._unsubscribe,o=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(var a=0;a<n.length;++a)n[a].remove(this);if(i(r))try{r.call(this)}catch(p){e=p instanceof h?d(p.errors):[p]}if(l(o))for(var s=-1,u=o.length;++s<u;){var f=o[s];if(c(f))try{f.unsubscribe()}catch(p){e=e||[],p instanceof h?e=e.concat(d(p.errors)):e.push(p)}}if(e)throw new h(e)}}},{key:"add",value:function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var i=n;(n=new t)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var r=n._parentOrParents;if(null===r)n._parentOrParents=this;else if(r instanceof t){if(r===this)return n;n._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return n;r.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[n]:o.push(n),n}},{key:"remove",value:function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}}}]),t}()).EMPTY=function(t){return t.closed=!0,t}(new u),u);function d(t){return t.reduce((function(t,e){return t.concat(e instanceof h?e.errors:e)}),[])}var p="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),v=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;switch(_classCallCheck(this,n),(o=e.call(this)).syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=s;break;case 1:if(!t){o.destination=s;break}if("object"==typeof t){t instanceof n?(o.syncErrorThrowable=t.syncErrorThrowable,o.destination=t,t.add(_assertThisInitialized(o))):(o.syncErrorThrowable=!0,o.destination=new g(_assertThisInitialized(o),t));break}default:o.syncErrorThrowable=!0,o.destination=new g(_assertThisInitialized(o),t,i,r)}return o}return _createClass(n,[{key:p,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,_get(_getPrototypeOf(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}(f),g=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,r,o,a){var l,c;_classCallCheck(this,n),(l=e.call(this))._parentSubscriber=t;var u=_assertThisInitialized(l);return i(r)?c=r:r&&(c=r.next,o=r.error,a=r.complete,r!==s&&(i((u=Object.create(r)).unsubscribe)&&l.add(u.unsubscribe.bind(u)),u.unsubscribe=l.unsubscribe.bind(_assertThisInitialized(l)))),l._context=u,l._next=c,l._error=o,l._complete=a,l}return _createClass(n,[{key:"next",value:function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;o.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=o.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):a(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;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)};o.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(),o.useDeprecatedSynchronousErrorHandling)throw n;a(n)}}},{key:"__tryOrSetError",value:function(t,e,n){if(!o.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(i){return o.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(a(i),!0)}return!1}},{key:"_unsubscribe",value:function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}]),n}(v),m="function"==typeof Symbol&&Symbol.observable||"@@observable";function y(t){return t}var _,b=((_=function(){function t(e){_classCallCheck(this,t),this._isScalar=!1,e&&(this._subscribe=e)}return _createClass(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,r=function(t,e,n){if(t){if(t instanceof v)return t;if(t[p])return t[p]()}return t||e||n?new v(t,e,n):new v(s)}(t,e,n);if(r.add(i?i.call(r,this.source):this.source||o.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),o.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r}},{key:"_trySubscribe",value:function(t){try{return this._subscribe(t)}catch(e){o.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,i=e.destination,r=e.isStopped;if(n||r)return!1;t=i&&i instanceof v?i:null}return!0}(t)?t.error(e):console.warn(e)}}},{key:"forEach",value:function(t,e){var n=this;return new(e=k(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:m,value:function(){return this}},{key:"pipe",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?this:(0===(i=e).length?y:1===i.length?i[0]:function(t){return i.reduce((function(t,e){return e(t)}),t)})(this);var i}},{key:"toPromise",value:function(t){var e=this;return new(t=k(t))((function(t,n){var i;e.subscribe((function(t){return i=t}),(function(t){return n(t)}),(function(){return t(i)}))}))}}]),t}()).create=function(t){return new _(t)},_);function k(t){if(t||(t=o.Promise||Promise),!t)throw new Error("no Promise impl found");return t}var C,w=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}(),x=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this)).subject=t,r.subscriber=i,r.closed=!1,r}return _createClass(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}(f),S=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this,t)).destination=t,i}return n}(v),E=((C=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.call(this)).observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return _createClass(n,[{key:p,value:function(){return new S(this)}},{key:"lift",value:function(t){var e=new T(this,this);return e.operator=t,e}},{key:"next",value:function(t){if(this.closed)throw new w;if(!this.isStopped)for(var e=this.observers,n=e.length,i=e.slice(),r=0;r<n;r++)i[r].next(t)}},{key:"error",value:function(t){if(this.closed)throw new w;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,i=e.slice(),r=0;r<n;r++)i[r].error(t);this.observers.length=0}},{key:"complete",value:function(){if(this.closed)throw new w;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),i=0;i<e;i++)n[i].complete();this.observers.length=0}},{key:"unsubscribe",value:function(){this.isStopped=!0,this.closed=!0,this.observers=null}},{key:"_trySubscribe",value:function(t){if(this.closed)throw new w;return _get(_getPrototypeOf(n.prototype),"_trySubscribe",this).call(this,t)}},{key:"_subscribe",value:function(t){if(this.closed)throw new w;return this.hasError?(t.error(this.thrownError),f.EMPTY):this.isStopped?(t.complete(),f.EMPTY):(this.observers.push(t),new x(this,t))}},{key:"asObservable",value:function(){var t=new b;return t.source=this,t}}]),n}(b)).create=function(t,e){return new T(t,e)},C),T=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this)).destination=t,r.source=i,r}return _createClass(n,[{key:"next",value:function(t){var e=this.destination;e&&e.next&&e.next(t)}},{key:"error",value:function(t){var e=this.destination;e&&e.error&&this.destination.error(t)}},{key:"complete",value:function(){var t=this.destination;t&&t.complete&&this.destination.complete()}},{key:"_subscribe",value:function(t){return this.source?this.source.subscribe(t):f.EMPTY}}]),n}(E);function O(t){return t&&"function"==typeof t.schedule}var A=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this)).parent=t,o.outerValue=i,o.outerIndex=r,o.index=0,o}return _createClass(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}(v),I=function(t){return function(e){for(var n=0,i=t.length;n<i&&!e.closed;n++)e.next(t[n]);e.complete()}};var P="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",D=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function R(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var F=function(t){if(t&&"function"==typeof t[m])return i=t,function(t){var e=i[m]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(D(t))return I(t);if(R(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,a),t};if(t&&"function"==typeof t[P])return e=t,function(t){for(var n=e[P]();;){var i=n.next();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,i,r=c(t)?"an invalid object":"'".concat(t,"'");throw new TypeError("You provided ".concat(r," where a stream was expected.")+" You can provide an Observable, Promise, Array, or Iterable.")};function M(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new A(t,n,i);if(!r.closed)return e instanceof b?e.subscribe(r):F(e)(r)}var j=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"notifyNext",value:function(t,e,n,i,r){this.destination.next(e)}},{key:"notifyError",value:function(t,e){this.destination.error(t)}},{key:"notifyComplete",value:function(t){this.destination.complete()}}]),n}(v);function L(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 N(t,e))}}var N=function(){function t(e,n){_classCallCheck(this,t),this.project=e,this.thisArg=n}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new B(t,this.project,this.thisArg))}}]),t}(),B=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this,t)).project=i,o.count=0,o.thisArg=r||_assertThisInitialized(o),o}return _createClass(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}(v);function z(t,e){return new b((function(n){var i=new f,r=0;return i.add(e.schedule((function(){r!==t.length?(n.next(t[r++]),n.closed||i.add(this.schedule())):n.complete()}))),i}))}function V(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[m]}(t))return function(t,e){return new b((function(n){var i=new f;return i.add(e.schedule((function(){var r=t[m]();i.add(r.subscribe({next:function(t){i.add(e.schedule((function(){return n.next(t)})))},error:function(t){i.add(e.schedule((function(){return n.error(t)})))},complete:function(){i.add(e.schedule((function(){return n.complete()})))}}))}))),i}))}(t,e);if(R(t))return function(t,e){return new b((function(n){var i=new f;return i.add(e.schedule((function(){return t.then((function(t){i.add(e.schedule((function(){n.next(t),i.add(e.schedule((function(){return n.complete()})))})))}),(function(t){i.add(e.schedule((function(){return n.error(t)})))}))}))),i}))}(t,e);if(D(t))return z(t,e);if(function(t){return t&&"function"==typeof t[P]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new b((function(n){var i,r=new f;return r.add((function(){i&&"function"==typeof i.return&&i.return()})),r.add(e.schedule((function(){i=t[P](),r.add(e.schedule((function(){if(!n.closed){var t,e;try{var r=i.next();t=r.value,e=r.done}catch(o){return void n.error(o)}e?n.complete():(n.next(t),this.schedule())}})))}))),r}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof b?t:new b(F(t))}function H(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof e?function(i){return i.pipe(H((function(n,i){return V(t(n,i)).pipe(L((function(t,r){return e(n,t,i,r)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new W(t,n))})}var W=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;_classCallCheck(this,t),this.project=e,this.concurrent=n}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new U(t,this.project,this.concurrent))}}]),t}(),U=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return _classCallCheck(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 _createClass(n,[{key:"_next",value:function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}},{key:"_tryNext",value:function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this.active++,this._innerSub(e,t,n)}},{key:"_innerSub",value:function(t,e,n){var i=new A(this,e,n),r=this.destination;r.add(i);var o=M(this,t,void 0,void 0,i);o!==i&&r.add(o)}},{key:"_complete",value:function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}},{key:"notifyNext",value:function(t,e,n,i,r){this.destination.next(e)}},{key:"notifyComplete",value:function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(j);function Y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return H(y,t)}function X(t,e){return e?z(t,e):new b(I(t))}function G(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=Number.POSITIVE_INFINITY,r=null,o=e[e.length-1];return O(o)?(r=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(i=e.pop())):"number"==typeof o&&(i=e.pop()),null===r&&1===e.length&&e[0]instanceof b?e[0]:Y(i)(X(e,r))}function q(){return function(t){return t.lift(new Z(t))}}var K,Z=function(){function t(e){_classCallCheck(this,t),this.connectable=e}return _createClass(t,[{key:"call",value:function(t,e){var n=this.connectable;n._refCount++;var i=new Q(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r}}]),t}(),Q=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t)).connectable=i,r}return _createClass(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}(v),J={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(K=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this)).source=t,r.subjectFactory=i,r._refCount=0,r._isComplete=!1,r}return _createClass(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 f).add(this.source.subscribe(new $(this.getSubject(),this))),t.closed&&(this._connection=null,t=f.EMPTY)),t}},{key:"refCount",value:function(){return q()(this)}}]),n}(b).prototype)._subscribe},_isComplete:{value:K._isComplete,writable:!0},getSubject:{value:K.getSubject},connect:{value:K.connect},refCount:{value:K.refCount}},$=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t)).connectable=i,r}return _createClass(n,[{key:"_error",value:function(t){this._unsubscribe(),_get(_getPrototypeOf(n.prototype),"_error",this).call(this,t)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),_get(_getPrototypeOf(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}(S);function tt(){return new E}function et(){return function(t){return q()((e=tt,function(t){var n;n="function"==typeof e?e:function(){return e};var i=Object.create(t,J);return i.source=t,i.subjectFactory=n,i})(t));var e}}function nt(t){return{toString:t}.toString()}var it="__parameters__";function rt(t,e,n){return nt((function(){var i=function(t){return function(){if(t){var e=t.apply(void 0,arguments);for(var n in e)this[n]=e[n]}}}(e);function r(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(this instanceof r)return i.apply(this,e),this;var o=_construct(r,e);return a.annotation=o,a;function a(t,e,n){for(var i=t.hasOwnProperty(it)?t[it]:Object.defineProperty(t,it,{value:[]})[it];i.length<=n;)i.push(null);return(i[n]=i[n]||[]).push(o),t}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r}))}var ot=rt("Inject",(function(t){return{token:t}})),at=rt("Optional"),st=rt("Self"),lt=rt("SkipSelf"),ct=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function ut(t){for(var e in t)if(t[e]===ut)return e;throw Error("Could not find renamed property on target object.")}function ht(t,e){for(var n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function ft(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function dt(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function pt(t){return vt(t,t[mt])||vt(t,t[bt])}function vt(t,e){return e&&e.token===t?e:null}function gt(t){return t&&(t.hasOwnProperty(yt)||t.hasOwnProperty(kt))?t[yt]:null}var mt=ut({"\u0275prov":ut}),yt=ut({"\u0275inj":ut}),_t=ut({"\u0275provFallback":ut}),bt=ut({ngInjectableDef:ut}),kt=ut({ngInjectorDef:ut});function Ct(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Ct).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);var e=t.toString();if(null==e)return""+e;var n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function wt(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}var xt=ut({__forward_ref__:ut});function St(t){return t.__forward_ref__=St,t.toString=function(){return Ct(this())},t}function Et(t){return Tt(t)?t():t}function Tt(t){return"function"==typeof t&&t.hasOwnProperty(xt)&&t.__forward_ref__===St}var Ot,At="undefined"!=typeof globalThis&&globalThis,It="undefined"!=typeof window&&window,Pt="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Dt="undefined"!=typeof global&&global,Rt=At||Dt||It||Pt,Ft=ut({"\u0275cmp":ut}),Mt=ut({"\u0275dir":ut}),jt=ut({"\u0275pipe":ut}),Lt=ut({"\u0275mod":ut}),Nt=ut({"\u0275loc":ut}),Bt=ut({"\u0275fac":ut}),zt=ut({__NG_ELEMENT_ID__:ut}),Vt=function(){function t(e,n){_classCallCheck(this,t),this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=ft({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}return _createClass(t,[{key:"toString",value:function(){return"InjectionToken ".concat(this._desc)}}]),t}(),Ht=new Vt("INJECTOR",-1),Wt={},Ut=/\n/gm,Yt=ut({provide:String,useValue:ut}),Xt=void 0;function Gt(t){var e=Xt;return Xt=t,e}function qt(t){var e=Ot;return Ot=t,e}function Kt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct.Default;if(void 0===Xt)throw new Error("inject() must be called from an injection context");return null===Xt?Jt(t,void 0,e):Xt.get(t,e&ct.Optional?null:void 0,e)}function Zt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct.Default;return(Ot||Kt)(Et(t),e)}var Qt=Zt;function Jt(t,e,n){var i=pt(t);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&ct.Optional)return null;if(void 0!==e)return e;throw new Error("Injector: NOT_FOUND [".concat(Ct(t),"]"))}function $t(t){for(var e=[],n=0;n<t.length;n++){var i=Et(t[n]);if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");for(var r=void 0,o=ct.Default,a=0;a<i.length;a++){var s=i[a];s instanceof at||"Optional"===s.ngMetadataName||s===at?o|=ct.Optional:s instanceof lt||"SkipSelf"===s.ngMetadataName||s===lt?o|=ct.SkipSelf:s instanceof st||"Self"===s.ngMetadataName||s===st?o|=ct.Self:r=s instanceof ot||s===ot?s.token:s}e.push(Zt(r,o))}else e.push(Zt(i))}return e}var te=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wt;if(e===Wt){var n=new Error("NullInjectorError: No provider for ".concat(Ct(t),"!"));throw n.name="NullInjectorError",n}return e}}]),t}(),ee=function t(){_classCallCheck(this,t)};function ne(t,e){t.forEach((function(t){return Array.isArray(t)?ne(t,e):e(t)}))}function ie(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function re(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function oe(t,e){for(var n=[],i=0;i<t;i++)n.push(e);return n}function ae(t,e,n){var i=le(t,e);return 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 se(t,e){var n=le(t,e);if(n>=0)return t[1|n]}function le(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 ce=function(){var t={OnPush:0,Default:1};return t[t.OnPush]="OnPush",t[t.Default]="Default",t}(),ue=function(){var t={Emulated:0,Native:1,None:2,ShadowDom:3};return t[t.Emulated]="Emulated",t[t.Native]="Native",t[t.None]="None",t[t.ShadowDom]="ShadowDom",t}(),he={},fe=[],de=0;function pe(t){return nt((function(){var e=t.type,n=e.prototype,i={},r={type:e,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:i,inputs:null,outputs:null,exportAs:t.exportAs||null,onChanges:null,onInit:n.ngOnInit||null,doCheck:n.ngDoCheck||null,afterContentInit:n.ngAfterContentInit||null,afterContentChecked:n.ngAfterContentChecked||null,afterViewInit:n.ngAfterViewInit||null,afterViewChecked:n.ngAfterViewChecked||null,onDestroy:n.ngOnDestroy||null,onPush:t.changeDetection===ce.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||fe,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||ue.Emulated,id:"c",styles:t.styles||fe,_:null,setInput:null,schemas:t.schemas||null,tView:null},o=t.directives,a=t.features,s=t.pipes;return r.id+=de++,r.inputs=_e(t.inputs,i),r.outputs=_e(t.outputs),a&&a.forEach((function(t){return t(r)})),r.directiveDefs=o?function(){return("function"==typeof o?o():o).map(ve)}:null,r.pipeDefs=s?function(){return("function"==typeof s?s():s).map(ge)}:null,r}))}function ve(t){return Ce(t)||function(t){return t[Mt]||null}(t)}function ge(t){return function(t){return t[jt]||null}(t)}var me={};function ye(t){var e={type:t.type,bootstrap:t.bootstrap||fe,declarations:t.declarations||fe,imports:t.imports||fe,exports:t.exports||fe,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&nt((function(){me[t.id]=t.type})),e}function _e(t,e){if(null==t)return he;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 be=pe;function ke(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function Ce(t){return t[Ft]||null}function we(t,e){return t.hasOwnProperty(Bt)?t[Bt]:null}function xe(t,e){var n=t[Lt]||null;if(!n&&!0===e)throw new Error("Type ".concat(Ct(t)," does not have '\u0275mod' property."));return n}function Se(t){return Array.isArray(t)&&"object"==typeof t[1]}function Ee(t){return Array.isArray(t)&&!0===t[1]}function Te(t){return 0!=(8&t.flags)}function Oe(t){return 2==(2&t.flags)}function Ae(t){return 1==(1&t.flags)}function Ie(t){return null!==t.template}function Pe(t){return 0!=(512&t[2])}var De=void 0;function Re(t){return!!t.listen}var Fe={createRenderer:function(t,e){return void 0!==De?De:"undefined"!=typeof document?document:void 0}};function Me(t){for(;Array.isArray(t);)t=t[0];return t}function je(t,e){return Me(e[t+20])}function Le(t,e){return Me(e[t.index])}function Ne(t,e){return t.data[e+20]}function Be(t,e){return t[e+20]}function ze(t,e){var n=e[t];return Se(n)?n:n[0]}function Ve(t){var e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function He(t){return 4==(4&t[2])}function We(t){return 128==(128&t[2])}function Ue(t,e){return null===t||null==e?null:t[e]}function Ye(t){t[18]=0}function Xe(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 Ge={lFrame:mn(null),bindingsEnabled:!0,checkNoChangesMode:!1};function qe(){return Ge.bindingsEnabled}function Ke(){return Ge.lFrame.lView}function Ze(){return Ge.lFrame.tView}function Qe(t){Ge.lFrame.contextLView=t}function Je(){return Ge.lFrame.previousOrParentTNode}function $e(t,e){Ge.lFrame.previousOrParentTNode=t,Ge.lFrame.isParent=e}function tn(){return Ge.lFrame.isParent}function en(){Ge.lFrame.isParent=!1}function nn(){return Ge.checkNoChangesMode}function rn(t){Ge.checkNoChangesMode=t}function on(){var t=Ge.lFrame,e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function an(){return Ge.lFrame.bindingIndex}function sn(){return Ge.lFrame.bindingIndex++}function ln(t){var e=Ge.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function cn(t,e){var n=Ge.lFrame;n.bindingIndex=n.bindingRootIndex=t,un(e)}function un(t){Ge.lFrame.currentDirectiveIndex=t}function hn(t){var e=Ge.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function fn(){return Ge.lFrame.currentQueryIndex}function dn(t){Ge.lFrame.currentQueryIndex=t}function pn(t,e){var n=gn();Ge.lFrame=n,n.previousOrParentTNode=e,n.lView=t}function vn(t,e){var n=gn(),i=t[1];Ge.lFrame=n,n.previousOrParentTNode=e,n.lView=t,n.tView=i,n.contextLView=t,n.bindingIndex=i.bindingStartIndex}function gn(){var t=Ge.lFrame,e=null===t?null:t.child;return null===e?mn(t):e}function mn(t){var e={previousOrParentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentSanitizer:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null};return null!==t&&(t.child=e),e}function yn(){var t=Ge.lFrame;return Ge.lFrame=t.parent,t.previousOrParentTNode=null,t.lView=null,t}var _n=yn;function bn(){var t=yn();t.isParent=!0,t.tView=null,t.selectedIndex=0,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.currentSanitizer=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function kn(){return Ge.lFrame.selectedIndex}function Cn(t){Ge.lFrame.selectedIndex=t}function wn(){var t=Ge.lFrame;return Ne(t.tView,t.selectedIndex)}function xn(){Ge.lFrame.currentNamespace="http://www.w3.org/2000/svg"}function Sn(){Ge.lFrame.currentNamespace=null}function En(t,e){for(var n=e.directiveStart,i=e.directiveEnd;n<i;n++){var r=t.data[n];r.afterContentInit&&(t.contentHooks||(t.contentHooks=[])).push(-n,r.afterContentInit),r.afterContentChecked&&((t.contentHooks||(t.contentHooks=[])).push(n,r.afterContentChecked),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(n,r.afterContentChecked)),r.afterViewInit&&(t.viewHooks||(t.viewHooks=[])).push(-n,r.afterViewInit),r.afterViewChecked&&((t.viewHooks||(t.viewHooks=[])).push(n,r.afterViewChecked),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(n,r.afterViewChecked)),null!=r.onDestroy&&(t.destroyHooks||(t.destroyHooks=[])).push(n,r.onDestroy)}}function Tn(t,e,n){In(t,e,3,n)}function On(t,e,n,i){(3&t[2])===n&&In(t,e,n,i)}function An(t,e){var n=t[2];(3&n)===e&&(n&=2047,n+=1,t[2]=n)}function In(t,e,n,i){for(var r=null!=i?i:-1,o=0,a=void 0!==i?65535&t[18]:0;a<e.length;a++)if("number"==typeof e[a+1]){if(o=e[a],null!=i&&o>=i)break}else e[a]<0&&(t[18]+=65536),(o<r||-1==r)&&(Pn(t,n,e,a),t[18]=(4294901760&t[18])+a+2),a++}function Pn(t,e,n,i){var r=n[i]<0,o=n[i+1],a=t[r?-n[i]:n[i]];r?t[2]>>11<t[18]>>16&&(3&t[2])===e&&(t[2]+=2048,o.call(a)):o.call(a)}var Dn=function t(e,n,i){_classCallCheck(this,t),this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=i};function Rn(t,e,n){for(var i=Re(t),r=0;r<n.length;){var o=n[r];if("number"==typeof o){if(0!==o)break;r++;var a=n[r++],s=n[r++],l=n[r++];i?t.setAttribute(e,s,l,a):e.setAttributeNS(a,s,l)}else{var c=o,u=n[++r];Mn(c)?i&&t.setProperty(e,c,u):i?t.setAttribute(e,c,u):e.setAttribute(c,u),r++}}return r}function Fn(t){return 3===t||4===t||6===t}function Mn(t){return 64===t.charCodeAt(0)}function jn(t,e){if(null===e||0===e.length);else if(null===t||0===t.length)t=e.slice();else for(var n=-1,i=0;i<e.length;i++){var r=e[i];"number"==typeof r?n=r:0===n||Ln(t,n,r,null,-1===n||2===n?e[++i]:null)}return t}function Ln(t,e,n,i,r){var o=0,a=t.length;if(-1===e)a=-1;else for(;o<t.length;){var s=t[o++];if("number"==typeof s){if(s===e){a=-1;break}if(s>e){a=o-1;break}}}for(;o<t.length;){var l=t[o];if("number"==typeof l)break;if(l===n){if(null===i)return void(null!==r&&(t[o+1]=r));if(i===t[o+1])return void(t[o+2]=r)}o++,null!==i&&o++,null!==r&&o++}-1!==a&&(t.splice(a,0,e),o=a+1),t.splice(o++,0,n),null!==i&&t.splice(o++,0,i),null!==r&&t.splice(o++,0,r)}function Nn(t){return-1!==t}function Bn(t){return 32767&t}function zn(t){return t>>16}function Vn(t,e){for(var n=zn(t),i=e;n>0;)i=i[15],n--;return i}function Hn(t){return"string"==typeof t?t:null==t?"":""+t}function Wn(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Hn(t)}var Un=("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Rt);function Yn(t){return{name:"document",target:t.ownerDocument}}function Xn(t){return{name:"body",target:t.ownerDocument.body}}function Gn(t){return t instanceof Function?t():t}var qn=!0;function Kn(t){var e=qn;return qn=t,e}var Zn=0;function Qn(t,e){var n=$n(t,e);if(-1!==n)return n;var i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,Jn(i.data,t),Jn(e,null),Jn(i.blueprint,null));var r=ti(t,e),o=t.injectorIndex;if(Nn(r))for(var a=Bn(r),s=Vn(r,e),l=s[1].data,c=0;c<8;c++)e[o+c]=s[a+c]|l[a+c];return e[o+8]=r,o}function Jn(t,e){t.push(0,0,0,0,0,0,0,0,e)}function $n(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null==e[t.injectorIndex+8]?-1:t.injectorIndex}function ti(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;for(var n=e[6],i=1;n&&-1===n.injectorIndex;)n=(e=e[15])?e[6]:null,i++;return n?n.injectorIndex|i<<16:-1}function ei(t,e,n){!function(t,e,n){var i="string"!=typeof n?n[zt]:n.charCodeAt(0)||0;null==i&&(i=n[zt]=Zn++);var r=255&i,o=1<<r,a=64&r,s=32&r,l=e.data;128&r?a?s?l[t+7]|=o:l[t+6]|=o:s?l[t+5]|=o:l[t+4]|=o:a?s?l[t+3]|=o:l[t+2]|=o:s?l[t+1]|=o:l[t]|=o}(t,e,n)}function ni(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ct.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[zt];return"number"==typeof e&&e>0?255&e:e}(n);if("function"==typeof o){pn(e,t);try{var a=o();if(null!=a||i&ct.Optional)return a;throw new Error("No provider for ".concat(Wn(n),"!"))}finally{_n()}}else if("number"==typeof o){if(-1===o)return new ci(t,e);var s=null,l=$n(t,e),c=-1,u=i&ct.Host?e[16][6]:null;for((-1===l||i&ct.SkipSelf)&&(c=-1===l?ti(t,e):e[l+8],li(i,!1)?(s=e[1],l=Bn(c),e=Vn(c,e)):l=-1);-1!==l;){c=e[l+8];var h=e[1];if(si(o,l,h.data)){var f=ri(l,e,n,s,i,u);if(f!==ii)return f}li(i,e[1].data[l+8]===u)&&si(o,l,e)?(s=h,l=Bn(c),e=Vn(c,e)):l=-1}}}if(i&ct.Optional&&void 0===r&&(r=null),0==(i&(ct.Self|ct.Host))){var d=e[9],p=qt(void 0);try{return d?d.get(n,r,i&ct.Optional):Jt(n,r,i&ct.Optional)}finally{qt(p)}}if(i&ct.Optional)return r;throw new Error("NodeInjector: NOT_FOUND [".concat(Wn(n),"]"))}var ii={};function ri(t,e,n,i,r,o){var a=e[1],s=a.data[t+8],l=oi(s,a,n,null==i?Oe(s)&&qn:i!=a&&3===s.type,r&ct.Host&&o===s);return null!==l?ai(e,a,l,s):ii}function oi(t,e,n,i,r){for(var o=t.providerIndexes,a=e.data,s=65535&o,l=t.directiveStart,c=o>>16,u=r?s+c:t.directiveEnd,h=i?s:s+c;h<u;h++){var f=a[h];if(h<l&&n===f||h>=l&&f.type===n)return h}if(r){var d=a[l];if(d&&Ie(d)&&d.type===n)return l}return null}function ai(t,e,n,i){var r=t[n],o=e.data;if(r instanceof Dn){var a=r;if(a.resolving)throw new Error("Circular dep for ".concat(Wn(o[n])));var s,l=Kn(a.canSeeViewProviders);a.resolving=!0,a.injectImpl&&(s=qt(a.injectImpl)),pn(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.onChanges,r=e.onInit,o=e.doCheck;i&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,i)),r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(-t,r),o&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,o),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,o))}(n,o[n],e)}finally{a.injectImpl&&qt(s),Kn(l),a.resolving=!1,_n()}}return r}function si(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<<t)}function li(t,e){return!(t&ct.Self||t&ct.Host&&e)}var ci=function(){function t(e,n){_classCallCheck(this,t),this._tNode=e,this._lView=n}return _createClass(t,[{key:"get",value:function(t,e){return ni(this._tNode,this._lView,t,void 0,e)}}]),t}();function ui(t){return nt((function(){var e=Object.getPrototypeOf(t.prototype).constructor,n=e[Bt]||function t(e){var n=e;if(Tt(e))return function(){var e=t(Et(n));return e?e():null};var i=we(n);if(null===i){var r=gt(n);i=r&&r.factory}return i||null}(e);return null!==n?n:function(t){return new t}}))}function hi(t){return t.ngDebugContext}function fi(t){return t.ngOriginalError}function di(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];t.error.apply(t,n)}var pi=function(){function t(){_classCallCheck(this,t),this._console=console}return _createClass(t,[{key:"handleError",value:function(t){var e=this._findOriginalError(t),n=this._findContext(t),i=function(t){return t.ngErrorLogger||di}(t);i(this._console,"ERROR",t),e&&i(this._console,"ORIGINAL ERROR",e),n&&i(this._console,"ERROR CONTEXT",n)}},{key:"_findContext",value:function(t){return t?hi(t)?hi(t):this._findContext(fi(t)):null}},{key:"_findOriginalError",value:function(t){for(var e=fi(t);e&&fi(e);)e=fi(e);return e}}]),t}(),vi=function(){function t(e){_classCallCheck(this,t),this.changingThisBreaksApplicationSecurity=e}return _createClass(t,[{key:"toString",value:function(){return"SafeValue must use [property]=binding: ".concat(this.changingThisBreaksApplicationSecurity)+" (see http://g.co/ng/security#xss)"}}]),t}(),gi=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"HTML"}}]),n}(vi),mi=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"Style"}}]),n}(vi),yi=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"Script"}}]),n}(vi),_i=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"URL"}}]),n}(vi),bi=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"getTypeName",value:function(){return"ResourceURL"}}]),n}(vi);function ki(t){return t instanceof vi?t.changingThisBreaksApplicationSecurity:t}function Ci(t,e){var n=wi(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error("Required a safe ".concat(e,", got a ").concat(n," (see http://g.co/ng/security#xss)"))}return n===e}function wi(t){return t instanceof vi&&t.getTypeName()||null}var xi=!0,Si=!1;function Ei(){return Si=!0,xi}var Ti=function(){function t(e){_classCallCheck(this,t),this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert");var n=this.inertDocument.body;if(null==n){var i=this.inertDocument.createElement("html");this.inertDocument.appendChild(i),n=this.inertDocument.createElement("body"),i.appendChild(n)}n.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>',!n.querySelector||n.querySelector("svg")?(n.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',this.getInertBodyElement=n.querySelector&&n.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(t){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return _createClass(t,[{key:"getInertBodyElement_XHR",value:function(t){t="<body><remove></remove>"+t+"</body>";try{t=encodeURI(t)}catch(i){return null}var e=new XMLHttpRequest;e.responseType="document",e.open("GET","data:text/html;charset=utf-8,"+t,!1),e.send(void 0);var n=e.response.body;return n.removeChild(n.firstChild),n}},{key:"getInertBodyElement_DOMParser",value:function(t){t="<body><remove></remove>"+t+"</body>";try{var e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(n){return null}}},{key:"getInertBodyElement_InertDocument",value:function(t){var e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=t,e;var n=this.inertDocument.createElement("body");return n.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}},{key:"stripCustomNsAttrs",value:function(t){for(var e=t.attributes,n=e.length-1;0<n;n--){var i=e.item(n).name;"xmlns:ns1"!==i&&0!==i.indexOf("ns1:")||t.removeAttribute(i)}for(var r=t.firstChild;r;)r.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(r),r=r.nextSibling}}]),t}(),Oi=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Ai=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Ii(t){return(t=String(t)).match(Oi)||t.match(Ai)?t:(Ei()&&console.warn("WARNING: sanitizing unsafe URL value ".concat(t," (see http://g.co/ng/security#xss)")),"unsafe:"+t)}function Pi(t){var e,n={},i=_createForOfIteratorHelper(t.split(","));try{for(i.s();!(e=i.n()).done;){n[e.value]=!0}}catch(r){i.e(r)}finally{i.f()}return n}function Di(){for(var t={},e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];for(var r=0,o=n;r<o.length;r++){var a=o[r];for(var s in a)a.hasOwnProperty(s)&&(t[s]=!0)}return t}var Ri,Fi=Pi("area,br,col,hr,img,wbr"),Mi=Pi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),ji=Pi("rp,rt"),Li=Di(ji,Mi),Ni=Di(Fi,Di(Mi,Pi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Di(ji,Pi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Li),Bi=Pi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),zi=Pi("srcset"),Vi=Di(Bi,zi,Pi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Pi("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),Hi=Pi("script,style,template"),Wi=function(){function t(){_classCallCheck(this,t),this.sanitizedSomething=!1,this.buf=[]}return _createClass(t,[{key:"sanitizeChildren",value:function(t){for(var e=t.firstChild,n=!0;e;)if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);var i=this.checkClobberedElement(e,e.nextSibling);if(i){e=i;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}},{key:"startElement",value:function(t){var e=t.nodeName.toLowerCase();if(!Ni.hasOwnProperty(e))return this.sanitizedSomething=!0,!Hi.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);for(var n,i=t.attributes,r=0;r<i.length;r++){var o=i.item(r),a=o.name,s=a.toLowerCase();if(Vi.hasOwnProperty(s)){var l=o.value;Bi[s]&&(l=Ii(l)),zi[s]&&(n=l,l=(n=String(n)).split(",").map((function(t){return Ii(t.trim())})).join(", ")),this.buf.push(" ",a,'="',Xi(l),'"')}else this.sanitizedSomething=!0}return this.buf.push(">"),!0}},{key:"endElement",value:function(t){var e=t.nodeName.toLowerCase();Ni.hasOwnProperty(e)&&!Fi.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(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: ".concat(t.outerHTML));return e}}]),t}(),Ui=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Yi=/([^\#-~ |!])/g;function Xi(t){return t.replace(/&/g,"&amp;").replace(Ui,(function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"})).replace(Yi,(function(t){return"&#"+t.charCodeAt(0)+";"})).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Gi(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var qi=function(){var t={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};return t[t.NONE]="NONE",t[t.HTML]="HTML",t[t.STYLE]="STYLE",t[t.SCRIPT]="SCRIPT",t[t.URL]="URL",t[t.RESOURCE_URL]="RESOURCE_URL",t}(),Ki=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|Z|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:attr|calc|var))\\([-0-9.%, #a-zA-Z]+\\))$","g"),Zi=/^url\(([^)]+)\)$/;function Qi(t){if(!(t=String(t).trim()))return"";var e=t.match(Zi);return e&&Ii(e[1])===e[1]||t.match(Ki)&&function(t){for(var e=!0,n=!0,i=0;i<t.length;i++){var r=t.charAt(i);"'"===r&&n?e=!e:'"'===r&&e&&(n=!n)}return e&&n}(t)?t:(Ei()&&console.warn("WARNING: sanitizing unsafe style value ".concat(t," (see http://g.co/ng/security#xss).")),"unsafe")}function Ji(t){var e=er();return e?e.sanitize(qi.STYLE,t)||"":Ci(t,"Style")?ki(t):Qi(Hn(t))}function $i(t){var e=er();return e?e.sanitize(qi.URL,t)||"":Ci(t,"URL")?ki(t):Ii(Hn(t))}var tr=function(t,e,n){if(void 0===e&&void 0===n)return Ji(t);var i=!0;return 1&(n=n||3)&&(i=function(t){return"background-image"===t||"backgroundImage"===t||"background"===t||"border-image"===t||"borderImage"===t||"border-image-source"===t||"borderImageSource"===t||"filter"===t||"list-style"===t||"listStyle"===t||"list-style-image"===t||"listStyleImage"===t||"clip-path"===t||"clipPath"===t}(t)),2&n?i?Ji(e):ki(e):i};function er(){var t=Ke();return t&&t[12]}function nr(t,e){t.__ngContext__=e}function ir(t){throw new Error("Multiple components match node with tagname ".concat(t.tagName))}function rr(){throw new Error("Cannot mix multi providers and regular providers")}function or(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 ar(t,e,n){for(var i=0;i<t.length;){var r=t[i++];if(n&&"class"===r){if(-1!==or((r=t[i]).toLowerCase(),e,0))return!0}else if(1===r){for(;i<t.length&&"string"==typeof(r=t[i++]);)if(r.toLowerCase()===e)return!0;return!1}}return!1}function sr(t){return 0===t.type&&"ng-template"!==t.tagName}function lr(t,e,n){return e===(0!==t.type||n?t.tagName:"ng-template")}function cr(t,e,n){for(var i=4,r=t.attrs||[],o=function(t){for(var e=0;e<t.length;e++)if(Fn(t[e]))return e;return t.length}(r),a=!1,s=0;s<e.length;s++){var l=e[s];if("number"!=typeof l){if(!a)if(4&i){if(i=2|1&i,""!==l&&!lr(t,l,n)||""===l&&1===e.length){if(ur(i))return!1;a=!0}}else{var c=8&i?l:e[++s];if(8&i&&null!==t.attrs){if(!ar(t.attrs,c,n)){if(ur(i))return!1;a=!0}continue}var u=hr(8&i?"class":l,r,sr(t),n);if(-1===u){if(ur(i))return!1;a=!0;continue}if(""!==c){var h;h=u>o?"":r[u+1].toLowerCase();var f=8&i?h:null;if(f&&-1!==or(f,c,0)||2&i&&c!==h){if(ur(i))return!1;a=!0}}}}else{if(!a&&!ur(i)&&!ur(l))return!1;if(a&&ur(l))continue;a=!1,i=l|1&i}}return ur(i)||a}function ur(t){return 0==(1&t)}function hr(t,e,n,i){if(null===e)return-1;var r=0;if(i||!n){for(var o=!1;r<e.length;){var a=e[r];if(a===t)return r;if(3===a||6===a)o=!0;else{if(1===a||2===a){for(var s=e[++r];"string"==typeof s;)s=e[++r];continue}if(4===a)break;if(0===a){r+=4;continue}}r+=o?1:2}return-1}return function(t,e){var n=t.indexOf(4);if(n>-1)for(n++;n<t.length;){var i=t[n];if("number"==typeof i)return-1;if(i===e)return n;n++}return-1}(e,t)}function fr(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=0;i<e.length;i++)if(cr(t,e[i],n))return!0;return!1}function dr(t,e){t:for(var n=0;n<e.length;n++){var i=e[n];if(t.length===i.length){for(var r=0;r<t.length;r++)if(t[r]!==i[r])continue t;return!0}}return!1}function pr(t,e){return t?":not("+e.trim()+")":e}function vr(t){for(var e=t[0],n=1,i=2,r="",o=!1;n<t.length;){var a=t[n];if("string"==typeof a)if(2&i){var s=t[++n];r+="["+a+(s.length>0?'="'+s+'"':"")+"]"}else 8&i?r+="."+a:4&i&&(r+=" "+a);else""===r||ur(a)||(e+=pr(o,r),r=""),i=a,o=o||!ur(i);n++}return""!==r&&(e+=pr(o,r)),e}var gr={};function mr(t){var e=t[3];return Ee(e)?e[3]:e}function yr(t){return br(t[13])}function _r(t){return br(t[4])}function br(t){for(;null!==t&&!Ee(t);)t=t[4];return t}function kr(t){Cr(Ze(),Ke(),kn()+t,nn())}function Cr(t,e,n,i){if(!i)if(3==(3&e[2])){var r=t.preOrderCheckHooks;null!==r&&Tn(e,r,n)}else{var o=t.preOrderHooks;null!==o&&On(e,o,0,n)}Cn(n)}function wr(t,e){return t<<17|e<<2}function xr(t){return t>>17&32767}function Sr(t){return 2|t}function Er(t){return(131068&t)>>2}function Tr(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;i<n.length;i+=2){var r=n[i],o=n[i+1];if(-1!==o){var a=t.data[o];dn(r),a.contentQueries(2,e[o],o)}}}function Ir(t,e,n){return Re(e)?e.createElement(t,n):null===n?e.createElement(t):e.createElementNS(n,t)}function Pr(t,e,n,i,r,o,a,s,l,c){var u=e.blueprint.slice();return u[0]=r,u[2]=140|i,Ye(u),u[3]=u[15]=t,u[8]=n,u[10]=a||t&&t[10],u[11]=s||t&&t[11],u[12]=l||t&&t[12]||null,u[9]=c||t&&t[9]||null,u[6]=o,u[16]=2==e.type?t[16]:u,u}function Dr(t,e,n,i,r,o){var a=n+20,s=t.data[a]||function(t,e,n,i,r,o){var a=Je(),s=tn(),l=s?a:a&&a.parent,c=t.data[n]=Hr(0,l&&l!==e?l:null,i,n,r,o);return null===t.firstChild&&(t.firstChild=c),a&&(!s||null!=a.child||null===c.parent&&2!==a.type?s||(a.next=c):a.child=c),c}(t,e,a,i,r,o);return $e(s,!0),s}function Rr(t,e,n){vn(e,e[6]);try{var i=t.viewQuery;null!==i&&uo(1,i,n);var r=t.template;null!==r&&jr(t,e,r,1,n),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&Ar(t,e),t.staticViewQueries&&uo(2,t.viewQuery,n);var o=t.components;null!==o&&function(t,e){for(var n=0;n<e.length;n++)oo(t,e[n])}(e,o)}catch(a){throw t.firstCreatePass&&(t.incompleteFirstPass=!0),a}finally{e[2]&=-5,bn()}}function Fr(t,e,n,i){var r=e[2];if(256!=(256&r)){vn(e,e[6]);var o=nn();try{Ye(e),Ge.lFrame.bindingIndex=t.bindingStartIndex,null!==n&&jr(t,e,n,2,i);var a=3==(3&r);if(!o)if(a){var s=t.preOrderCheckHooks;null!==s&&Tn(e,s,null)}else{var l=t.preOrderHooks;null!==l&&On(e,l,0,null),An(e,0)}if(function(t){for(var e=yr(t);null!==e;e=_r(e))if(e[2])for(var n=e[9],i=0;i<n.length;i++){var r=n[i],o=r[3];0==(1024&r[2])&&Xe(o,1),r[2]|=1024}}(e),function(t){for(var e=yr(t);null!==e;e=_r(e))for(var n=10;n<e.length;n++){var i=e[n],r=i[1];We(i)&&Fr(r,i,r.template,i[8])}}(e),null!==t.contentQueries&&Ar(t,e),!o)if(a){var c=t.contentCheckHooks;null!==c&&Tn(e,c)}else{var u=t.contentHooks;null!==u&&On(e,u,1),An(e,1)}!function(t,e){try{var n=t.expandoInstructions;if(null!==n)for(var i=t.expandoStartIndex,r=-1,o=0;o<n.length;o++){var a=n[o];"number"==typeof a?a<=0?(Cn(0-a),r=i+=9+n[++o]):i+=a:(null!==a&&(cn(i,r),a(2,e[r])),r++)}}finally{Cn(-1)}}(t,e);var h=t.components;null!==h&&function(t,e){for(var n=0;n<e.length;n++)ro(t,e[n])}(e,h);var f=t.viewQuery;if(null!==f&&uo(2,f,i),!o)if(a){var d=t.viewCheckHooks;null!==d&&Tn(e,d)}else{var p=t.viewHooks;null!==p&&On(e,p,2),An(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),o||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,Xe(e[3],-1))}finally{bn()}}}function Mr(t,e,n,i){var r=e[10],o=!nn(),a=He(e);try{o&&!a&&r.begin&&r.begin(),a&&Rr(t,e,i),Fr(t,e,n,i)}finally{o&&!a&&r.end&&r.end()}}function jr(t,e,n,i,r){var o=kn();try{Cn(-1),2&i&&e.length>20&&Cr(t,e,0,nn()),n(i,r)}finally{Cn(o)}}function Lr(t,e,n){if(Te(e))for(var i=e.directiveEnd,r=e.directiveStart;r<i;r++){var o=t.data[r];o.contentQueries&&o.contentQueries(1,n[r],r)}}function Nr(t,e,n){qe()&&(function(t,e,n,i){var r=n.directiveStart,o=n.directiveEnd;t.firstCreatePass||Qn(n,e),nr(i,e);for(var a=n.initialInputs,s=r;s<o;s++){var l=t.data[s],c=Ie(l);c&&to(e,n,l);var u=ai(e,t,s,n);nr(u,e),null!==a&&eo(0,s-r,u,l,0,a),c&&(ze(n.index,e)[8]=u)}}(t,e,n,Le(n,e)),128==(128&n.flags)&&function(t,e,n){var i=n.directiveStart,r=n.directiveEnd,o=t.expandoInstructions,a=t.firstCreatePass,s=n.index-20,l=Ge.lFrame.currentDirectiveIndex;try{Cn(s);for(var c=i;c<r;c++){var u=t.data[c],h=e[c];un(c),null!==u.hostBindings||0!==u.hostVars||null!==u.hostAttrs?qr(u,h):a&&o.push(null)}}finally{Cn(-1),un(l)}}(t,e,n))}function Br(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Le,i=e.localNames;if(null!==i)for(var r=e.index+1,o=0;o<i.length;o+=2){var a=i[o+1],s=-1===a?n(e,t):t[a];t[r++]=s}}function zr(t){var e=t.tView;return null===e||e.incompleteFirstPass?t.tView=Vr(1,-1,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function Vr(t,e,n,i,r,o,a,s,l,c){var u=20+i,h=u+r,f=function(t,e){for(var n=[],i=0;i<e;i++)n.push(i<t?null:gr);return n}(u,h);return f[1]={type:t,id:e,blueprint:f,template:n,queries:null,viewQuery:s,node:null,data:f.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:h,expandoInstructions:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof o?o():o,pipeRegistry:"function"==typeof a?a():a,firstChild:null,schemas:l,consts:c,incompleteFirstPass:!1}}function Hr(t,e,n,i,r,o){return{type:n,index:i,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,tagName:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function Wr(t,e,n){for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];(n=null===n?{}:n).hasOwnProperty(i)?n[i].push(e,r):n[i]=[e,r]}return n}function Ur(t,e,n,i,r,o,a,s){var l,c,u=Le(e,n),h=e.inputs;!s&&null!=h&&(l=h[i])?(mo(t,n,l,i,r),Oe(e)&&function(t,e){var n=ze(e,t);16&n[2]||(n[2]|=64)}(n,e.index)):3===e.type&&(i="class"===(c=i)?"className":"for"===c?"htmlFor":"formaction"===c?"formAction":"innerHtml"===c?"innerHTML":"readonly"===c?"readOnly":"tabindex"===c?"tabIndex":c,r=null!=a?a(r,e.tagName||"",i):r,Re(o)?o.setProperty(u,i,r):Mn(i)||(u.setProperty?u.setProperty(i,r):u[i]=r))}function Yr(t,e,n,i){var r=!1;if(qe()){var o=function(t,e,n){var i=t.directiveRegistry,r=null;if(i)for(var o=0;o<i.length;o++){var a=i[o];fr(n,a.selectors,!1)&&(r||(r=[]),ei(Qn(n,e),t,a.type),Ie(a)?(2&n.flags&&ir(n),Zr(t,n),r.unshift(a)):r.push(a))}return r}(t,e,n),a=null===i?null:{"":-1};if(null!==o){var s=0;r=!0,Jr(n,t.data.length,o.length);for(var l=0;l<o.length;l++){var c=o[l];c.providersResolver&&c.providersResolver(c)}Kr(t,n,o.length);for(var u=!1,h=!1,f=0;f<o.length;f++){var d=o[f];n.mergedAttrs=jn(n.mergedAttrs,d.hostAttrs),$r(t,e,d),Qr(t.data.length-1,d,a),null!==d.contentQueries&&(n.flags|=8),null===d.hostBindings&&null===d.hostAttrs&&0===d.hostVars||(n.flags|=128),!u&&(d.onChanges||d.onInit||d.doCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(n.index-20),u=!0),h||!d.onChanges&&!d.doCheck||((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(n.index-20),h=!0),Xr(t,d),s+=d.hostVars}!function(t,e){for(var n=e.directiveEnd,i=t.data,r=e.attrs,o=[],a=null,s=null,l=e.directiveStart;l<n;l++){var c=i[l],u=c.inputs,h=null===r||sr(e)?null:no(u,r);o.push(h),a=Wr(u,l,a),s=Wr(c.outputs,l,s)}null!==a&&(a.hasOwnProperty("class")&&(e.flags|=16),a.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=o,e.inputs=a,e.outputs=s}(t,n),Gr(t,e,s)}a&&function(t,e,n){if(e)for(var i=t.localNames=[],r=0;r<e.length;r+=2){var o=n[e[r+1]];if(null==o)throw new Error("Export of name '".concat(e[r+1],"' not found!"));i.push(e[r],o)}}(n,i,a)}return n.mergedAttrs=jn(n.mergedAttrs,n.attrs),r}function Xr(t,e){var n=t.expandoInstructions;n.push(e.hostBindings),0!==e.hostVars&&n.push(e.hostVars)}function Gr(t,e,n){for(var i=0;i<n;i++)e.push(gr),t.blueprint.push(gr),t.data.push(null)}function qr(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function Kr(t,e,n){var i=20-e.index,r=t.data.length-(65535&e.providerIndexes);(t.expandoInstructions||(t.expandoInstructions=[])).push(i,r,n)}function Zr(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function Qr(t,e,n){if(n){if(e.exportAs)for(var i=0;i<e.exportAs.length;i++)n[e.exportAs[i]]=t;Ie(e)&&(n[""]=t)}}function Jr(t,e,n){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+n,t.providerIndexes=e}function $r(t,e,n){t.data.push(n);var i=n.factory||(n.factory=we(n.type)),r=new Dn(i,Ie(n),null);t.blueprint.push(r),e.push(r)}function to(t,e,n){var i=Le(e,t),r=zr(n),o=t[10],a=ao(t,Pr(t,r,null,n.onPush?64:16,i,e,o,o.createRenderer(i,n)));t[e.index]=a}function eo(t,e,n,i,r,o){var a=o[e];if(null!==a)for(var s=i.setInput,l=0;l<a.length;){var c=a[l++],u=a[l++],h=a[l++];null!==s?i.setInput(n,h,c,u):n[u]=h}}function no(t,e){for(var n=null,i=0;i<e.length;){var r=e[i];if(0!==r)if(5!==r){if("number"==typeof r)break;t.hasOwnProperty(r)&&(null===n&&(n=[]),n.push(r,t[r],e[i+1])),i+=2}else i+=2;else i+=4}return n}function io(t,e,n,i){return new Array(t,!0,!1,e,null,0,i,n,null,null)}function ro(t,e){var n=ze(e,t);if(We(n)){var i=n[1];80&n[2]?Fr(i,n,i.template,n[8]):n[5]>0&&function t(e){for(var n=yr(e);null!==n;n=_r(n))for(var i=10;i<n.length;i++){var r=n[i];if(1024&r[2]){var o=r[1];Fr(o,r,o.template,r[8])}else r[5]>0&&t(r)}var a=e[1].components;if(null!==a)for(var s=0;s<a.length;s++){var l=ze(a[s],e);We(l)&&l[5]>0&&t(l)}}(n)}}function oo(t,e){var n=ze(e,t),i=n[1];!function(t,e){for(var n=e.length;n<t.blueprint.length;n++)e.push(t.blueprint[n])}(i,n),Rr(i,n,n[8])}function ao(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function so(t){for(;t;){t[2]|=64;var e=mr(t);if(Pe(t)&&!e)return t;t=e}return null}function lo(t,e,n){var i=e[10];i.begin&&i.begin();try{Fr(t,e,t.template,n)}catch(r){throw go(e,r),r}finally{i.end&&i.end()}}function co(t){!function(t){for(var e=0;e<t.components.length;e++){var n=t.components[e],i=Ve(n),r=i[1];Mr(r,i,r.template,n)}}(t[8])}function uo(t,e,n){dn(0),e(t,n)}var ho=Promise.resolve(null);function fo(t){return t[7]||(t[7]=[])}function po(t){return t.cleanup||(t.cleanup=[])}function vo(t,e,n){return(null===t||Ie(t))&&(n=function(t){for(;Array.isArray(t);){if("object"==typeof t[1])return t;t=t[0]}return null}(n[e.index])),n[11]}function go(t,e){var n=t[9],i=n?n.get(pi,null):null;i&&i.handleError(e)}function mo(t,e,n,i,r){for(var o=0;o<n.length;){var a=n[o++],s=n[o++],l=e[a],c=t.data[a];null!==c.setInput?c.setInput(l,r,i,s):l[s]=r}}function yo(t,e,n){var i=je(e,t),r=t[11];Re(r)?r.setValue(i,n):i.textContent=n}function _o(t,e){var n=e[3];return-1===t.index?Ee(n)?n:null:n}function bo(t,e){var n=_o(t,e);return n?Do(e[11],n[7]):null}function ko(t,e,n,i,r){if(null!=i){var o,a=!1;Ee(i)?o=i:Se(i)&&(a=!0,i=i[0]);var s=Me(i);0===t&&null!==n?null==r?Io(e,n,s):Ao(e,n,s,r||null):1===t&&null!==n?Ao(e,n,s,r||null):2===t?function(t,e,n){var i=Do(t,e);i&&function(t,e,n,i){Re(t)?t.removeChild(e,n,i):e.removeChild(n)}(t,i,e,n)}(e,s,a):3===t&&e.destroyNode(s),null!=o&&function(t,e,n,i,r){var o=n[7];o!==Me(n)&&ko(e,t,i,o,r);for(var a=10;a<n.length;a++){var s=n[a];Lo(s[1],s,t,e,i,o)}}(e,t,o,n,r)}}function Co(t,e,n,i){var r=bo(t.node,e);r&&Lo(t,e,e[11],n?1:2,r,i)}function wo(t,e){var n=t[9],i=n.indexOf(e);1024&e[2]&&Xe(e[3],-1),n.splice(i,1)}function xo(t,e){if(!(t.length<=10)){var n=10+e,i=t[n];if(i){var r=i[17];null!==r&&r!==t&&wo(r,i),e>0&&(t[n-1][4]=i[4]);var o=re(t,10+e);Co(i[1],i,!1,null);var a=o[19];null!==a&&a.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}}function So(t,e){if(!(256&e[2])){var n=e[11];Re(n)&&n.destroyNode&&Lo(t,e,n,3,null,null),function(t){var e=t[13];if(!e)return To(t[1],t);for(;e;){var n=null;if(Se(e))n=e[13];else{var i=e[10];i&&(n=i)}if(!n){for(;e&&!e[4]&&e!==t;)Se(e)&&To(e[1],e),e=Eo(e,t);null===e&&(e=t),Se(e)&&To(e[1],e),n=e&&e[4]}e=n}}(e)}}function Eo(t,e){var n;return Se(t)&&(n=t[6])&&2===n.type?_o(n,t):t[3]===e?null:t[3]}function To(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<n.length;i+=2){var r=e[n[i]];if(!(r instanceof Dn)){var o=n[i+1];if(Array.isArray(o))for(var a=0;a<o.length;a+=2)o[a+1].call(r[o[a]]);else o.call(r)}}}(t,e),function(t,e){var n=t.cleanup;if(null!==n){for(var i=e[7],r=0;r<n.length-1;r+=2)if("string"==typeof n[r]){var o=n[r+1],a="function"==typeof o?o(e):Me(e[o]),s=i[n[r+2]],l=n[r+3];"boolean"==typeof l?a.removeEventListener(n[r],s,l):l>=0?i[l]():i[-l].unsubscribe(),r+=2}else n[r].call(i[n[r+1]]);e[7]=null}}(t,e);var n=e[6];n&&3===n.type&&Re(e[11])&&e[11].destroy();var i=e[17];if(null!==i&&Ee(e[3])){i!==e[3]&&wo(i,e);var r=e[19];null!==r&&r.detachView(t)}}}function Oo(t,e,n){for(var i=e.parent;null!=i&&(4===i.type||5===i.type);)i=(e=i).parent;if(null==i){var r=n[6];return 2===r.type?bo(r,n):n[0]}if(e&&5===e.type&&4&e.flags)return Le(e,n).parentNode;if(2&i.flags){var o=t.data,a=o[o[i.index].directiveStart].encapsulation;if(a!==ue.ShadowDom&&a!==ue.Native)return null}return Le(i,n)}function Ao(t,e,n,i){Re(t)?t.insertBefore(e,n,i):e.insertBefore(n,i,!0)}function Io(t,e,n){Re(t)?t.appendChild(e,n):e.appendChild(n)}function Po(t,e,n,i){null!==i?Ao(t,e,n,i):Io(t,e,n)}function Do(t,e){return Re(t)?t.parentNode(e):e.parentNode}function Ro(t,e){if(2===t.type){var n=_o(t,e);return null===n?null:Mo(n.indexOf(e,10)-10,n)}return 4===t.type||5===t.type?Le(t,e):null}function Fo(t,e,n,i){var r=Oo(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<n.length;s++)Po(o,r,n[s],a);else Po(o,r,n,a)}}function Mo(t,e){var n=10+t+1;if(n<e.length){var i=e[n],r=i[1].firstChild;if(null!==r)return function t(e,n){if(null!==n){var i=n.type;if(3===i)return Le(n,e);if(0===i)return Mo(-1,e[n.index]);if(4===i||5===i){var r=n.child;if(null!==r)return t(e,r);var o=e[n.index];return Ee(o)?Mo(-1,o):Me(o)}var a=e[16],s=a[6],l=mr(a),c=s.projection[n.projection];return null!=c?t(l,c):t(e,n.next)}return null}(i,r)}return e[7]}function jo(t,e,n,i,r,o,a){for(;null!=n;){var s=i[n.index],l=n.type;a&&0===e&&(s&&nr(Me(s),i),n.flags|=4),64!=(64&n.flags)&&(4===l||5===l?(jo(t,e,n.child,i,r,o,!1),ko(e,t,r,s,o)):1===l?No(t,e,i,n,r,o):ko(e,t,r,s,o)),n=a?n.projectionNext:n.next}}function Lo(t,e,n,i,r,o){jo(n,i,t.node.child,e,r,o,!1)}function No(t,e,n,i,r,o){var a=n[16],s=a[6].projection[i.projection];if(Array.isArray(s))for(var l=0;l<s.length;l++)ko(e,t,r,s[l],o);else jo(t,e,s,a[3],r,o,!0)}function Bo(t,e,n){Re(t)?t.setAttribute(e,"style",n):e.style.cssText=n}function zo(t,e,n){Re(t)?""===n?t.removeAttribute(e,"class"):t.setAttribute(e,"class",n):e.className=n}var Vo,Ho,Wo,Uo=function(){function t(e,n){_classCallCheck(this,t),this._lView=e,this._cdRefInjectingView=n,this._appRef=null,this._viewContainerRef=null}return _createClass(t,[{key:"destroy",value:function(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){var t=this._viewContainerRef.indexOf(this);t>-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}So(this._lView[1],this._lView)}},{key:"onDestroy",value:function(t){var e,n,i;e=this._lView[1],i=t,fo(n=this._lView).push(i),e.firstCreatePass&&po(e).push(n[7].length-1,null)}},{key:"markForCheck",value:function(){so(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){lo(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(t,e,n){rn(!0);try{lo(t,e,n)}finally{rn(!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,Lo(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;return null==t[0]?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(Me(a)),Ee(a))for(var s=10;s<a.length;s++){var l=a[s],c=l[1].firstChild;null!==c&&t(l[1],l,c,r)}var u=i.type;if(4===u||5===u)t(e,n,i.child,r);else if(1===u){var h=n[16],f=h[6].projection[i.projection];if(Array.isArray(f))r.push.apply(r,_toConsumableArray2(f));else{var d=mr(h);t(d[1],d,f,r,!0)}}i=o?i.projectionNext:i.next}return r}(t[1],t,t[6].child,[]):[]}},{key:"context",get:function(){return this._lView[8]}},{key:"destroyed",get:function(){return 256==(256&this._lView[2])}}]),t}(),Yo=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this,t))._view=t,i}return _createClass(n,[{key:"detectChanges",value:function(){co(this._view)}},{key:"checkNoChanges",value:function(){!function(t){rn(!0);try{co(t)}finally{rn(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(Uo);function Xo(t,e,n){return Vo||(Vo=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(t)),new Vo(Le(e,n))}function Go(t,e,n,i){return Ho||(Ho=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this))._declarationView=t,o._declarationTContainer=i,o.elementRef=r,o}return _createClass(n,[{key:"createEmbeddedView",value:function(t){var e=this._declarationTContainer.tViews,n=Pr(this._declarationView,e,t,16,null,e.node);n[17]=this._declarationView[this._declarationTContainer.index];var i=this._declarationView[19];return null!==i&&(n[19]=i.createEmbeddedView(e)),Rr(e,n,t),new Uo(n)}}]),n}(t)),0===n.type?new Ho(i,n,Xo(e,n,i)):null}function qo(t,e,n,i){var r;Wo||(Wo=function(t){_inherits(i,t);var n=_createSuper(i);function i(t,e,r){var o;return _classCallCheck(this,i),(o=n.call(this))._lContainer=t,o._hostTNode=e,o._hostView=r,o}return _createClass(i,[{key:"clear",value:function(){for(;this.length>0;)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(ee,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(),Ee(n[3])){var r=this.indexOf(t);if(-1!==r)this.detach(r);else{var o=n[3],a=new Wo(o,o[6],o[3]);a.detach(a.indexOf(t))}}var s=this._adjustIndex(e);return function(t,e,n,i){var r=10+i,o=n.length;i>0&&(n[r-1][4]=e),i<o-10?(e[4]=n[r],ie(n,10+i,e)):(n.push(e),e[4]=null),e[3]=n;var a=e[17];null!==a&&n!==a&&function(t,e){var n=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===n?t[9]=[e]:n.push(e)}(a,e);var s=e[19];null!==s&&s.insertView(t),e[2]|=128}(i,n,this._lContainer,s),Co(i,n,!0,Mo(s,this._lContainer)),t.attachToViewContainerRef(this),ie(this._lContainer[8],s,t),t}},{key:"move",value:function(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");return this.insert(t,e)}},{key:"indexOf",value:function(t){var e=this._lContainer[8];return null!==e?e.indexOf(t):-1}},{key:"remove",value:function(t){this.allocateContainerIfNeeded();var e=this._adjustIndex(t,-1);!function(t,e){var n=xo(t,e);n&&So(n[1],n)}(this._lContainer,e),re(this._lContainer[8],e)}},{key:"detach",value:function(t){this.allocateContainerIfNeeded();var e=this._adjustIndex(t,-1),n=xo(this._lContainer,e);return n&&null!=re(this._lContainer[8],e)?new Uo(n):null}},{key:"_adjustIndex",value:function(t){var e=arguments.length>1&&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 Xo(e,this._hostTNode,this._hostView)}},{key:"injector",get:function(){return new ci(this._hostTNode,this._hostView)}},{key:"parentInjector",get:function(){var t=ti(this._hostTNode,this._hostView),e=Vn(t,this._hostView),n=function(t,e,n){if(n.parent&&-1!==n.parent.injectorIndex){for(var i=n.parent.injectorIndex,r=n.parent;null!=r.parent&&i==r.parent.injectorIndex;)r=r.parent;return r}for(var o=zn(t),a=e,s=e[6];o>1;)s=(a=a[15])[6],o--;return s}(t,this._hostView,this._hostTNode);return Nn(t)&&null!=n?new ci(n,e):new ci(null,this._hostView)}},{key:"length",get:function(){return this._lContainer.length-10}}]),i}(t));var o=i[n.index];if(Ee(o))r=o;else{var a;if(4===n.type)a=Me(o);else if(a=i[11].createComment(""),Pe(i)){var s=i[11],l=Le(n,i);Ao(s,Do(s,l),a,function(t,e){return Re(t)?t.nextSibling(e):e.nextSibling}(s,l))}else Fo(i[1],i,a,n);i[n.index]=r=io(o,i,a,n),ao(i,r)}return new Wo(r,n,i)}function Ko(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t,e,n){if(!n&&Oe(t)){var i=ze(t.index,e);return new Uo(i,i)}return 3===t.type||0===t.type||4===t.type||5===t.type?new Uo(e[16],e):null}(Je(),Ke(),t)}var Zo=function(){var t=function t(){_classCallCheck(this,t)};return t.__NG_ELEMENT_ID__=function(){return Qo()},t}(),Qo=Ko,Jo=Function;function $o(t){return"function"==typeof t}var ta=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/,ea=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,na=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,ia=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{\s*super\(\.\.\.arguments\)/,ra=function(){function t(e){_classCallCheck(this,t),this._reflect=e||Rt.Reflect}return _createClass(t,[{key:"isReflectionEnabled",value:function(){return!0}},{key:"factory",value:function(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return _construct(t,n)}}},{key:"_zipTypesAndAnnotations",value:function(t,e){var n;n=oe(void 0===t?e.length:t.length);for(var i=0;i<n.length;i++)n[i]=void 0===t?[]:t[i]&&t[i]!=Object?[t[i]]:[],e&&null!=e[i]&&(n[i]=n[i].concat(e[i]));return n}},{key:"_ownParameters",value:function(t,e){if(n=t.toString(),ta.test(n)||ia.test(n)||ea.test(n)&&!na.test(n))return null;var n;if(t.parameters&&t.parameters!==e.parameters)return t.parameters;var i=t.ctorParameters;if(i&&i!==e.ctorParameters){var r="function"==typeof i?i():i,o=r.map((function(t){return t&&t.type})),a=r.map((function(t){return t&&oa(t.decorators)}));return this._zipTypesAndAnnotations(o,a)}var s=t.hasOwnProperty(it)&&t[it],l=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return l||s?this._zipTypesAndAnnotations(l,s):oe(t.length)}},{key:"parameters",value:function(t){if(!$o(t))return[];var e=aa(t),n=this._ownParameters(t,e);return n||e===Object||(n=this.parameters(e)),n||[]}},{key:"_ownAnnotations",value:function(t,e){if(t.annotations&&t.annotations!==e.annotations){var n=t.annotations;return"function"==typeof n&&n.annotations&&(n=n.annotations),n}return t.decorators&&t.decorators!==e.decorators?oa(t.decorators):t.hasOwnProperty("__annotations__")?t.__annotations__:null}},{key:"annotations",value:function(t){if(!$o(t))return[];var e=aa(t),n=this._ownAnnotations(t,e)||[];return(e!==Object?this.annotations(e):[]).concat(n)}},{key:"_ownPropMetadata",value:function(t,e){if(t.propMetadata&&t.propMetadata!==e.propMetadata){var n=t.propMetadata;return"function"==typeof n&&n.propMetadata&&(n=n.propMetadata),n}if(t.propDecorators&&t.propDecorators!==e.propDecorators){var i=t.propDecorators,r={};return Object.keys(i).forEach((function(t){r[t]=oa(i[t])})),r}return t.hasOwnProperty("__prop__metadata__")?t.__prop__metadata__:null}},{key:"propMetadata",value:function(t){if(!$o(t))return{};var e=aa(t),n={};if(e!==Object){var i=this.propMetadata(e);Object.keys(i).forEach((function(t){n[t]=i[t]}))}var r=this._ownPropMetadata(t,e);return r&&Object.keys(r).forEach((function(t){var e=[];n.hasOwnProperty(t)&&e.push.apply(e,_toConsumableArray2(n[t])),e.push.apply(e,_toConsumableArray2(r[t])),n[t]=e})),n}},{key:"ownPropMetadata",value:function(t){return $o(t)&&this._ownPropMetadata(t,aa(t))||{}}},{key:"hasLifecycleHook",value:function(t,e){return t instanceof Jo&&e in t.prototype}},{key:"guards",value:function(t){return{}}},{key:"getter",value:function(t){return new Function("o","return o."+t+";")}},{key:"setter",value:function(t){return new Function("o","v","return o."+t+" = v;")}},{key:"method",value:function(t){return new Function("o","args","if (!o.".concat(t,") throw new Error('\"").concat(t,"\" is undefined');\n return o.").concat(t,".apply(o, args);"))}},{key:"importUri",value:function(t){return"object"==typeof t&&t.filePath?t.filePath:"./".concat(Ct(t))}},{key:"resourceUri",value:function(t){return"./".concat(Ct(t))}},{key:"resolveIdentifier",value:function(t,e,n,i){return i}},{key:"resolveEnum",value:function(t,e){return t[e]}}]),t}();function oa(t){return t?t.map((function(t){return _construct(t.type.annotationCls,_toConsumableArray2(t.args?t.args:[]))})):[]}function aa(t){var e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}var sa=new Vt("Set Injector scope."),la={},ca={},ua=[],ha=void 0;function fa(){return void 0===ha&&(ha=new te),ha}function da(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 pa(t,n,e||fa(),i)}var pa=function(){function t(e,n,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,t),this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var a=[];n&&ne(n,(function(t){return r.processProvider(t,e,n)})),ne([e],(function(t){return r.processInjectorType(t,[],a)})),this.records.set(Ht,ma(void 0,this));var s=this.records.get(sa);this.scope=null!=s?s.value:null,this.source=o||("object"==typeof e?null:Ct(e))}return _createClass(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]:Wt,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ct.Default;this.assertNotDestroyed();var i,r=Gt(this);try{if(!(n&ct.SkipSelf)){var o=this.records.get(t);if(void 0===o){var a=("function"==typeof(i=t)||"object"==typeof i&&i instanceof Vt)&&pt(t);o=a&&this.injectableDefInScope(a)?ma(va(t),la):null,this.records.set(t,o)}if(null!=o)return this.hydrate(t,o)}return(n&ct.Self?fa():this.parent).get(t,e=n&ct.Optional&&e===Wt?null:e)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(Ct(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=Ct(e);if(Array.isArray(e))r=e.map(Ct).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):Ct(s)))}r="{".concat(o.join(", "),"}")}return"".concat(n).concat(i?"("+i+")":"","[").concat(r,"]: ").concat(t.replace(Ut,"\n "))}("\n"+t.message,r,"R3InjectorError",i),t.ngTokenPath=r,t.ngTempTokenPath=null,t}(s,t,0,this.source)}throw s}finally{Gt(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(Ct(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=Et(t)))return!1;var r=gt(t),o=null==r&&t.ngModule||void 0,a=void 0===o?t:o,s=-1!==n.indexOf(a);if(void 0!==o&&(r=gt(o)),null==r)return!1;if(null!=r.imports&&!s){var l;n.push(a);try{ne(r.imports,(function(t){i.processInjectorType(t,e,n)&&(void 0===l&&(l=[]),l.push(t))}))}finally{}if(void 0!==l)for(var c=function(t){var e=l[t],n=e.ngModule,r=e.providers;ne(r,(function(t){return i.processProvider(t,n,r||ua)}))},u=0;u<l.length;u++)c(u)}this.injectorDefTypes.add(a),this.records.set(a,ma(r.factory,la));var h=r.providers;if(null!=h&&!s){var f=t;ne(h,(function(t){return i.processProvider(t,f,h)}))}return void 0!==o&&void 0!==t.providers}},{key:"processProvider",value:function(t,e,n){var i=_a(t=Et(t))?t:Et(t&&t.provide),r=function(t,e,n){return ya(t)?ma(void 0,t.useValue):ma(ga(t,e,n),la)}(t,e,n);if(_a(t)||!0!==t.multi){var o=this.records.get(i);o&&void 0!==o.multi&&rr()}else{var a=this.records.get(i);a?void 0===a.multi&&rr():((a=ma(void 0,la,!0)).factory=function(){return $t(a.multi)},this.records.set(i,a)),i=t,a.multi.push(t)}this.records.set(i,r)}},{key:"hydrate",value:function(t,e){var n;return e.value===ca?function(t){throw new Error("Cannot instantiate cyclic dependency! ".concat(t))}(Ct(t)):e.value===la&&(e.value=ca,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value}},{key:"injectableDefInScope",value:function(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}},{key:"destroyed",get:function(){return this._destroyed}}]),t}();function va(t){var e=pt(t),n=null!==e?e.factory:we(t);if(null!==n)return n;var i=gt(t);if(null!==i)return i.factory;if(t instanceof Vt)throw new Error("Token ".concat(Ct(t)," is missing a \u0275prov definition."));if(t instanceof Function)return function(t){var e=t.length;if(e>0){var n=oe(e,"?");throw new Error("Can't resolve all parameters for ".concat(Ct(t),": (").concat(n.join(", "),")."))}var i=function(t){var e=t&&(t[mt]||t[bt]||t[_t]&&t[_t]());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.\n')+'This will become an error in v10. 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 ga(t,e,n){var i,r=void 0;if(_a(t)){var o=Et(t);return we(o)||va(o)}if(ya(t))r=function(){return Et(t.useValue)};else if((i=t)&&i.useFactory)r=function(){return t.useFactory.apply(t,_toConsumableArray2($t(t.deps||[])))};else if(function(t){return!(!t||!t.useExisting)}(t))r=function(){return Zt(Et(t.useExisting))};else{var a=Et(t&&(t.useClass||t.provide));if(a||function(t,e,n){var i="";throw t&&e&&(i=" - only instances of Provider and Type are allowed, got: [".concat(e.map((function(t){return t==n?"?"+n+"?":"..."})).join(", "),"]")),new Error("Invalid provider for the NgModule '".concat(Ct(t),"'")+i)}(e,n,t),!function(t){return!!t.deps}(t))return we(a)||va(a);r=function(){return _construct(a,_toConsumableArray2($t(t.deps)))}}return r}function ma(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:t,value:e,multi:n?[]:void 0}}function ya(t){return null!==t&&"object"==typeof t&&Yt in t}function _a(t){return"function"==typeof t}var ba=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=da(t,e,n,i);return r._resolveInjectorDefTypes(),r}({name:n},e,t,n)},ka=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"create",value:function(t,e){return Array.isArray(t)?ba(t,e,""):ba(t.providers,t.parent,t.name||"")}}]),t}();return t.THROW_IF_NOT_FOUND=Wt,t.NULL=new te,t.\u0275prov=ft({token:t,providedIn:"any",factory:function(){return Zt(Ht)}}),t.__NG_ELEMENT_ID__=-1,t}();function Ca(t){return t.length>1?" ("+function(t){for(var e=[],n=0;n<t.length;++n){if(e.indexOf(t[n])>-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map((function(t){return Ct(t.token)})).join(" -> ")+")":""}function wa(t,e,n,i){var r=[e],o=n(r),a=i?function(t,e){var n="".concat(t," caused by: ").concat(e instanceof Error?e.message:e),i=Error(n);return i.ngOriginalError=e,i}(o,i):Error(o);return a.addKey=xa,a.keys=r,a.injectors=[t],a.constructResolvingMessage=n,a.ngOriginalError=i,a}function xa(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function Sa(t,e){for(var n=[],i=0,r=e.length;i<r;i++){var o=e[i];n.push(o&&0!=o.length?o.map(Ct).join(" "):"?")}return Error("Cannot resolve all parameters for '"+Ct(t)+"'("+n.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+Ct(t)+"' is decorated with Injectable.")}var Ea=function(){function t(e,n){if(_classCallCheck(this,t),this.token=e,this.id=n,!e)throw new Error("Token must be defined!");this.displayName=Ct(this.token)}return _createClass(t,null,[{key:"get",value:function(t){return Ta.get(Et(t))}},{key:"numberOfKeys",get:function(){return Ta.numberOfKeys}}]),t}(),Ta=new(function(){function t(){_classCallCheck(this,t),this._allKeys=new Map}return _createClass(t,[{key:"get",value:function(t){if(t instanceof Ea)return t;if(this._allKeys.has(t))return this._allKeys.get(t);var e=new Ea(t,Ea.numberOfKeys);return this._allKeys.set(t,e),e}},{key:"numberOfKeys",get:function(){return this._allKeys.size}}]),t}()),Oa=new(function(){function t(e){_classCallCheck(this,t),this.reflectionCapabilities=e}return _createClass(t,[{key:"updateCapabilities",value:function(t){this.reflectionCapabilities=t}},{key:"factory",value:function(t){return this.reflectionCapabilities.factory(t)}},{key:"parameters",value:function(t){return this.reflectionCapabilities.parameters(t)}},{key:"annotations",value:function(t){return this.reflectionCapabilities.annotations(t)}},{key:"propMetadata",value:function(t){return this.reflectionCapabilities.propMetadata(t)}},{key:"hasLifecycleHook",value:function(t,e){return this.reflectionCapabilities.hasLifecycleHook(t,e)}},{key:"getter",value:function(t){return this.reflectionCapabilities.getter(t)}},{key:"setter",value:function(t){return this.reflectionCapabilities.setter(t)}},{key:"method",value:function(t){return this.reflectionCapabilities.method(t)}},{key:"importUri",value:function(t){return this.reflectionCapabilities.importUri(t)}},{key:"resourceUri",value:function(t){return this.reflectionCapabilities.resourceUri(t)}},{key:"resolveIdentifier",value:function(t,e,n,i){return this.reflectionCapabilities.resolveIdentifier(t,e,n,i)}},{key:"resolveEnum",value:function(t,e){return this.reflectionCapabilities.resolveEnum(t,e)}}]),t}())(new ra),Aa=function(){function t(e,n,i){_classCallCheck(this,t),this.key=e,this.optional=n,this.visibility=i}return _createClass(t,null,[{key:"fromKey",value:function(e){return new t(e,!1,null)}}]),t}(),Ia=[],Pa=function t(e,n,i){_classCallCheck(this,t),this.key=e,this.resolvedFactories=n,this.multiProvider=i,this.resolvedFactory=this.resolvedFactories[0]},Da=function t(e,n){_classCallCheck(this,t),this.factory=e,this.dependencies=n};function Ra(t){var e,n;if(t.useClass){var i=Et(t.useClass);e=Oa.factory(i),n=Ma(i)}else t.useExisting?(e=function(t){return t},n=[Aa.fromKey(Ea.get(t.useExisting))]):t.useFactory?(e=t.useFactory,n=function(t,e){if(e){var n=e.map((function(t){return[t]}));return e.map((function(e){return ja(t,e,n)}))}return Ma(t)}(t.useFactory,t.deps)):(e=function(){return t.useValue},n=Ia);return new Da(e,n)}function Fa(t){return new Pa(Ea.get(t.provide),[Ra(t)],t.multi||!1)}function Ma(t){var e=Oa.parameters(t);if(!e)return[];if(e.some((function(t){return null==t})))throw Sa(t,e);return e.map((function(n){return ja(t,n,e)}))}function ja(t,e,n){var i=null,r=!1;if(!Array.isArray(e))return La(e instanceof ot?e.token:e,r,null);for(var o=null,a=0;a<e.length;++a){var s=e[a];s instanceof Jo?i=s:s instanceof ot?i=s.token:s instanceof at?r=!0:s instanceof st||s instanceof lt?o=s:s instanceof Vt&&(i=s)}if(null!=(i=Et(i)))return La(i,r,o);throw Sa(t,n)}function La(t,e,n){return new Aa(Ea.get(t),e,n)}var Na={},Ba=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"resolve",value:function(t){return function(t){var e=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=e.get(i.key.id);if(r){if(i.multiProvider!==r.multiProvider)throw Error("Cannot mix multi providers and regular providers, got: ".concat(r," ").concat(i));if(i.multiProvider)for(var o=0;o<i.resolvedFactories.length;o++)r.resolvedFactories.push(i.resolvedFactories[o]);else e.set(i.key.id,i)}else{var a;a=i.multiProvider?new Pa(i.key,i.resolvedFactories.slice(),i.multiProvider):i,e.set(i.key.id,a)}}return e}(function t(e,n){return e.forEach((function(e){if(e instanceof Jo)n.push({provide:e,useClass:e});else if(e&&"object"==typeof e&&void 0!==e.provide)n.push(e);else{if(!Array.isArray(e))throw Error("Invalid provider - only instances of Provider and Type are allowed, got: ".concat(e));t(e,n)}})),n}(t,[]).map(Fa),new Map);return Array.from(e.values())}(t)}},{key:"resolveAndCreate",value:function(e,n){var i=t.resolve(e);return t.fromResolvedProviders(i,n)}},{key:"fromResolvedProviders",value:function(t,e){return new za(t,e)}}]),t}(),za=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._constructionCounter=0,this._providers=e,this.parent=n||null;var i=e.length;this.keyIds=[],this.objs=[];for(var r=0;r<i;r++)this.keyIds[r]=e[r].key.id,this.objs[r]=Na}return _createClass(t,[{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wt;return this._getByKey(Ea.get(t),null,e)}},{key:"resolveAndCreateChild",value:function(t){var e=Ba.resolve(t);return this.createChildFromResolved(e)}},{key:"createChildFromResolved",value:function(e){var n=new t(e);return n.parent=this,n}},{key:"resolveAndInstantiate",value:function(t){return this.instantiateResolved(Ba.resolve([t])[0])}},{key:"instantiateResolved",value:function(t){return this._instantiateProvider(t)}},{key:"getProviderAtIndex",value:function(t){if(t<0||t>=this._providers.length)throw function(t){return Error("Index ".concat(t," is out-of-bounds."))}(t);return this._providers[t]}},{key:"_new",value:function(t){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw wa(this,t.key,(function(t){return"Cannot instantiate cyclic dependency!".concat(Ca(t))}));return this._instantiateProvider(t)}},{key:"_getMaxNumberOfObjects",value:function(){return this.objs.length}},{key:"_instantiateProvider",value:function(t){if(t.multiProvider){for(var e=[],n=0;n<t.resolvedFactories.length;++n)e[n]=this._instantiate(t,t.resolvedFactories[n]);return e}return this._instantiate(t,t.resolvedFactories[0])}},{key:"_instantiate",value:function(t,e){var n,i,r,o=this,a=e.factory;try{n=e.dependencies.map((function(t){return o._getByReflectiveDependency(t)}))}catch(s){throw s.addKey&&s.addKey(this,t.key),s}try{i=a.apply(void 0,_toConsumableArray2(n))}catch(s){throw wa(this,t.key,(function(t){var e=Ct(t[0].token);return"".concat(r.message,": Error during instantiation of ").concat(e,"!").concat(Ca(t),".")}),r=s)}return i}},{key:"_getByReflectiveDependency",value:function(t){return this._getByKey(t.key,t.visibility,t.optional?null:Wt)}},{key:"_getByKey",value:function(e,n,i){return e===t.INJECTOR_KEY?this:n instanceof st?this._getByKeySelf(e,i):this._getByKeyDefault(e,i,n)}},{key:"_getObjByKeyId",value:function(t){for(var e=0;e<this.keyIds.length;e++)if(this.keyIds[e]===t)return this.objs[e]===Na&&(this.objs[e]=this._new(this._providers[e])),this.objs[e];return Na}},{key:"_throwOrNull",value:function(t,e){if(e!==Wt)return e;throw function(t,e){return wa(t,e,(function(t){return"No provider for ".concat(Ct(t[0].token),"!").concat(Ca(t))}))}(this,t)}},{key:"_getByKeySelf",value:function(t,e){var n=this._getObjByKeyId(t.id);return n!==Na?n:this._throwOrNull(t,e)}},{key:"_getByKeyDefault",value:function(e,n,i){var r;for(r=i instanceof lt?this.parent:this;r instanceof t;){var o=r,a=o._getObjByKeyId(e.id);if(a!==Na)return a;r=o.parent}return null!==r?r.get(e.token,n):this._throwOrNull(e,n)}},{key:"toString",value:function(){return this.displayName}},{key:"displayName",get:function(){return"ReflectiveInjector(providers: [".concat(function(t,e){for(var n=[],i=0;i<t._providers.length;++i)n[i]=' "'+t.getProviderAtIndex(i).key.displayName+'" ';return n}(this).join(", "),"])")}}]),t}();return t.INJECTOR_KEY=Ea.get(ka),t}(),Va=new Map,Ha=new Set;function Wa(t){return"string"==typeof t?t:t.text()}function Ua(t,e,n){var i=n?t.styles:null,r=n?t.classes:null,o=0;if(null!==e)for(var a=0;a<e.length;a++){var s=e[a];"number"==typeof s?o=s:1==o?r=wt(r,s):2==o&&(i=wt(i,s+": "+e[++a]+";"))}n?t.styles=i:t.stylesWithoutHost=i,n?t.classes=r:t.classesWithoutHost=r}var Ya=null;function Xa(){if(!Ya){var t=Rt.Symbol;if(t&&t.iterator)Ya=t.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),n=0;n<e.length;++n){var i=e[n];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(Ya=i)}}return Ya}function Ga(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}var qa=function(){function t(e){_classCallCheck(this,t),this.wrapped=e}return _createClass(t,null,[{key:"wrap",value:function(e){return new t(e)}},{key:"unwrap",value:function(e){return t.isWrapped(e)?e.wrapped:e}},{key:"isWrapped",value:function(e){return e instanceof t}}]),t}();function Ka(t){return!!Za(t)&&(Array.isArray(t)||!(t instanceof Map)&&Xa()in t)}function Za(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function Qa(t,e,n){return t[e]=n}function Ja(t,e,n){return!Object.is(t[e],n)&&(t[e]=n,!0)}function $a(t,e,n,i){var r=Ja(t,e,n);return Ja(t,e+1,i)||r}function ts(t,e,n,i){var r=Ke();return Ja(r,sn(),e)&&(Ze(),function(t,e,n,i,r,o){var a=Le(t,e),s=e[11];if(null==i)Re(s)?s.removeAttribute(a,n,o):a.removeAttribute(n);else{var l=null==r?Hn(i):r(i,t.tagName||"",n);Re(s)?s.setAttribute(a,n,l,o):o?a.setAttributeNS(o,n,l):a.setAttribute(n,l)}}(wn(),r,t,e,n,i)),ts}function es(t,e,n,i){return Ja(t,sn(),n)?e+Hn(n)+i:gr}function ns(t,e,n,i,r,o,a,s){var l=Ke(),c=Ze(),u=t+20,h=c.firstCreatePass?function(t,e,n,i,r,o,a,s,l){var c=e.consts,u=Dr(e,n[6],t,0,a||null,Ue(c,s));Yr(e,n,u,Ue(c,l)),En(e,u);var h=u.tViews=Vr(2,-1,i,r,o,e.directiveRegistry,e.pipeRegistry,null,e.schemas,c),f=Hr(0,null,2,-1,null,null);return f.injectorIndex=u.injectorIndex,h.node=f,null!==e.queries&&(e.queries.template(e,u),h.queries=e.queries.embeddedTView(u)),u}(t,c,l,e,n,i,r,o,a):c.data[u];$e(h,!1);var f=l[11].createComment("");Fo(c,l,f,h),nr(f,l),ao(l,l[u]=io(f,l,f,h)),Ae(h)&&Nr(c,l,h),null!=a&&Br(l,h,s)}function is(t){return Be(Ge.lFrame.contextLView,t)}function rs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct.Default,n=Ke();return null==n?Zt(t,e):ni(Je(),n,Et(t),e)}function os(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;r<i;){var o=n[r];if(Fn(o))break;if(0===o)r+=2;else if("number"==typeof o)for(r++;r<i&&"string"==typeof n[r];)r++;else{if(o===e)return n[r+1];r+=2}}return null}(Je(),t)}function as(t,e,n){var i=Ke();return Ja(i,sn(),e)&&Ur(Ze(),wn(),i,t,e,i[11],n,!1),as}function ss(t,e,n,i,r){var o=r?"class":"style";mo(t,n,e.inputs[o],o,i)}function ls(t,e,n,i){var r=Ke(),o=Ze(),a=20+t,s=r[11],l=r[a]=Ir(e,s,Ge.lFrame.currentNamespace),c=o.firstCreatePass?function(t,e,n,i,r,o,a){var s=e.consts,l=Ue(s,o),c=Dr(e,n[6],t,3,r,l);return Yr(e,n,c,Ue(s,a)),null!==c.attrs&&Ua(c,c.attrs,!1),null!==c.mergedAttrs&&Ua(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(t,o,r,0,e,n,i):o.data[a];$e(c,!0);var u=c.mergedAttrs;null!==u&&Rn(s,l,u);var h=c.classes;null!==h&&zo(s,l,h);var f=c.styles;null!==f&&Bo(s,l,f),Fo(o,r,l,c),0===Ge.lFrame.elementDepthCount&&nr(l,r),Ge.lFrame.elementDepthCount++,Ae(c)&&(Nr(o,r,c),Lr(o,c,r)),null!==i&&Br(r,c)}function cs(){var t=Je();tn()?en():$e(t=t.parent,!1);var e=t;Ge.lFrame.elementDepthCount--;var n=Ze();n.firstCreatePass&&(En(n,t),Te(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&ss(n,e,Ke(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&ss(n,e,Ke(),e.stylesWithoutHost,!1)}function us(t,e,n,i){ls(t,e,n,i),cs()}function hs(t,e,n){var i=Ke(),r=Ze(),o=t+20,a=r.firstCreatePass?function(t,e,n,i,r){var o=e.consts,a=Ue(o,i),s=Dr(e,n[6],t,4,"ng-container",a);return null!==a&&Ua(s,a,!0),Yr(e,n,s,Ue(o,r)),null!==e.queries&&e.queries.elementStart(e,s),s}(t,r,i,e,n):r.data[o];$e(a,!0);var s=i[o]=i[11].createComment("");Fo(r,i,s,a),nr(s,i),Ae(a)&&(Nr(r,i,a),Lr(r,a,i)),null!=n&&Br(i,a)}function fs(){var t=Je(),e=Ze();tn()?en():$e(t=t.parent,!1),e.firstCreatePass&&(En(e,t),Te(t)&&e.queries.elementEnd(t))}function ds(){return Ke()}function ps(t){return!!t&&"function"==typeof t.then}function vs(t){return!!t&&"function"==typeof t.subscribe}function gs(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=Ke(),o=Ze(),a=Je();return ys(o,r,r[11],a,t,e,n,i),gs}function ms(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=Je(),o=Ke(),a=Ze();return ys(a,o,vo(hn(a.data),r,o),r,t,e,n,i),ms}function ys(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,l=Ae(i),c=t.firstCreatePass&&(t.cleanup||(t.cleanup=[])),u=fo(e),h=!0;if(3===i.type){var f=Le(i,e),d=s?s(f):he,p=d.target||f,v=u.length,g=s?function(t){return s(Me(t[i.index])).target}:i.index;if(Re(n)){var m=null;if(!s&&l&&(m=function(t,e,n,i){var r=t.cleanup;if(null!=r)for(var o=0;o<r.length-1;o+=2){var a=r[o];if(a===n&&r[o+1]===i){var s=e[7],l=r[o+2];return s.length>l?s[l]:null}"string"==typeof a&&(o+=2)}return null}(t,e,r,i.index)),null!==m)(m.__ngLastListenerFn__||m).__ngNextListenerFn__=o,m.__ngLastListenerFn__=o,h=!1;else{o=bs(i,e,o,!1);var y=n.listen(d.name||p,r,o);u.push(o,y),c&&c.push(r,g,v,v+1)}}else o=bs(i,e,o,!0),p.addEventListener(r,o,a),u.push(o),c&&c.push(r,g,v,a)}var _,b=i.outputs;if(h&&null!==b&&(_=b[r])){var k=_.length;if(k)for(var C=0;C<k;C+=2){var w=e[_[C]][_[C+1]].subscribe(o),x=u.length;u.push(o,w),c&&c.push(r,i.index,x,-(x+1))}}}function _s(t,e,n){try{return!1!==e(n)}catch(i){return go(t,i),!1}}function bs(t,e,n,i){return function r(o){if(o===Function)return n;var a=2&t.flags?ze(t.index,e):e;0==(32&e[2])&&so(a);for(var s=_s(e,n,o),l=r.__ngNextListenerFn__;l;)s=_s(e,l,o)&&s,l=l.__ngNextListenerFn__;return i&&!1===s&&(o.preventDefault(),o.returnValue=!1),s}}function ks(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return function(t){return(Ge.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,Ge.lFrame.contextLView))[8]}(t)}function Cs(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;r<e.length;r++){var o=e[r];if("*"!==o){if(null===i?fr(t,o,!0):dr(i,o))return r}else n=r}return n}function ws(t){var e=Ke()[16][6];if(!e.projection)for(var n=e.projection=oe(t?t.length:1,null),i=n.slice(),r=e.child;null!==r;){var o=t?Cs(r,t):0;null!==o&&(i[o]?i[o].projectionNext=r:n[o]=r,i[o]=r),r=r.next}}function xs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=Ke(),r=Ze(),o=Dr(r,i[6],t,1,null,n||null);null===o.projection&&(o.projection=e),en(),function(t,e,n){No(e[11],0,e,n,Oo(t,n,e),Ro(n.parent||e[6],e))}(r,i,o)}function Ss(t,e,n,i,r){var o=Ke(),a=es(o,e,n,i);return a!==gr&&Ur(Ze(),wn(),o,t,a,o[11],r,!1),Ss}var Es=[];function Ts(t,e,n,i,r){for(var o=t[n+1],a=null===e,s=i?xr(o):Er(o),l=!1;0!==s&&(!1===l||a);){var c=t[s+1];Os(t[s],e)&&(l=!0,t[s+1]=i?Or(c):Sr(c)),s=i?xr(c):Er(c)}l&&(t[n+1]=i?Sr(o):Or(o))}function Os(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&le(t,e)>=0}var As={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Is(t){return t.substring(As.key,As.keyEnd)}function Ps(t,e){var n=As.textEnd;return n===e?-1:(e=As.keyEnd=function(t,e,n){for(;e<n&&t.charCodeAt(e)>32;)e++;return e}(t,As.key=e,n),Ds(t,e,n))}function Ds(t,e,n){for(;e<n&&t.charCodeAt(e)<=32;)e++;return e}function Rs(t,e,n){return Ls(t,e,n,!1),Rs}function Fs(t,e){return Ls(t,e,null,!0),Fs}function Ms(t){Ns(ae,js,t,!0)}function js(t,e){for(var n=function(t){return function(t){As.key=0,As.keyEnd=0,As.value=0,As.valueEnd=0,As.textEnd=t.length}(t),Ps(t,Ds(t,0,As.textEnd))}(e);n>=0;n=Ps(e,n))ae(t,Is(e),!0)}function Ls(t,e,n,i){var r,o,a=Ke(),s=Ze(),l=ln(2);(s.firstUpdatePass&&zs(s,t,l,i),e!==gr&&Ja(a,l,e))&&(null==n&&(r=null===(o=Ge.lFrame)?null:o.currentSanitizer)&&(n=r),Ws(s,s.data[kn()+20],a,a[11],t,a[l+1]=function(t,e){return null==t||("function"==typeof e?t=e(t):"string"==typeof e?t+=e:"object"==typeof t&&(t=Ct(ki(t)))),t}(e,n),i,l))}function Ns(t,e,n,i){var r=Ze(),o=ln(2);r.firstUpdatePass&&zs(r,null,o,i);var a=Ke();if(n!==gr&&Ja(a,o,n)){var s=r.data[kn()+20];if(Xs(s,i)&&!Bs(r,o)){var l=i?s.classesWithoutHost:s.stylesWithoutHost;null!==l&&(n=wt(l,n||"")),ss(r,s,a,n,i)}else!function(t,e,n,i,r,o,a,s){r===gr&&(r=Es);for(var l=0,c=0,u=0<r.length?r[0]:null,h=0<o.length?o[0]:null;null!==u||null!==h;){var f=l<r.length?r[l+1]:void 0,d=c<o.length?o[c+1]:void 0,p=null,v=void 0;u===h?(l+=2,c+=2,f!==d&&(p=h,v=d)):null===h||null!==u&&u<h?(l+=2,p=u):(c+=2,p=h,v=d),null!==p&&Ws(t,e,n,i,p,v,a,s),u=l<r.length?r[l]:null,h=c<o.length?o[c]:null}}(r,s,a,a[11],a[o+1],a[o+1]=function(t,e,n){if(null==n||""===n)return Es;var i=[],r=ki(n);if(Array.isArray(r))for(var o=0;o<r.length;o++)t(i,r[o],!0);else if("object"==typeof r)for(var a in r)r.hasOwnProperty(a)&&t(i,a,r[a]);else"string"==typeof r&&e(i,r);return i}(t,e,n),i,o)}}function Bs(t,e){return e>=t.expandoStartIndex}function zs(t,e,n,i){var r=t.data;if(null===r[n+1]){var o=r[kn()+20],a=Bs(t,n);Xs(o,i)&&null===e&&!a&&(e=!1),e=function(t,e,n,i){var r=hn(t),o=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(n=Hs(n=Vs(null,t,e,n,i),e.attrs,i),o=null);else{var a=e.directiveStylingLast;if(-1===a||t[a]!==r)if(n=Vs(r,t,e,n,i),null===o){var s=function(t,e,n){var i=n?e.classBindings:e.styleBindings;if(0!==Er(i))return t[xr(i)]}(t,e,i);void 0!==s&&Array.isArray(s)&&function(t,e,n,i){t[xr(n?e.classBindings:e.styleBindings)]=i}(t,e,i,s=Hs(s=Vs(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;o<r;o++)i=Hs(i,t[o].hostAttrs,n);return Hs(i,e.attrs,n)}(t,e,i)}return void 0!==o&&(i?e.residualClasses=o:e.residualStyles=o),n}(r,o,e,i),function(t,e,n,i,r,o){var a=o?e.classBindings:e.styleBindings,s=xr(a),l=Er(a);t[i]=n;var c,u=!1;if(Array.isArray(n)){var h=n;(null===(c=h[1])||le(h,c)>0)&&(u=!0)}else c=n;if(r)if(0!==l){var f=xr(t[s+1]);t[i+1]=wr(f,s),0!==f&&(t[f+1]=Tr(t[f+1],i)),t[s+1]=131071&t[s+1]|i<<17}else t[i+1]=wr(s,0),0!==s&&(t[s+1]=Tr(t[s+1],i)),s=i;else t[i+1]=wr(l,0),0===s?s=i:t[l+1]=Tr(t[l+1],i),l=i;u&&(t[i+1]=Sr(t[i+1])),Ts(t,c,i,!0),Ts(t,c,i,!1),function(t,e,n,i,r){var o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof e&&le(o,e)>=0&&(n[i+1]=Or(n[i+1]))}(e,c,t,i,o),a=wr(s,l),o?e.classBindings=a:e.styleBindings=a}(r,o,e,n,a,i)}}function Vs(t,e,n,i,r){var o=null,a=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s<a&&(i=Hs(i,(o=e[s]).hostAttrs,r),o!==t);)s++;return null!==t&&(n.directiveStylingLast=s),i}function Hs(t,e,n){var i=n?1:2,r=-1;if(null!==e)for(var o=0;o<e.length;o++){var a=e[o];"number"==typeof a?r=a:r===i&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),ae(t,a,!!n||e[++o]))}return void 0===t?null:t}function Ws(t,e,n,i,r,o,a,s){if(3===e.type){var l=t.data,c=l[s+1];Ys(1==(1&c)?Us(l,e,n,r,Er(c),a):void 0)||(Ys(o)||2==(2&c)&&(o=Us(l,null,n,r,s,a)),function(t,e,n,i,r){var o=Re(t);if(e)r?o?t.addClass(n,i):n.classList.add(i):o?t.removeClass(n,i):n.classList.remove(i);else{var a=-1==i.indexOf("-")?void 0:2;null==r?o?t.removeStyle(n,i,a):n.style.removeProperty(i):o?t.setStyle(n,i,r,a):n.style.setProperty(i,r)}}(i,a,je(kn(),n),r,o))}}function Us(t,e,n,i,r,o){for(var a=null===e,s=void 0;r>0;){var l=t[r],c=Array.isArray(l),u=c?l[1]:l,h=null===u,f=n[r+1];f===gr&&(f=h?Es:void 0);var d=h?se(f,i):u===i?f:void 0;if(c&&!Ys(d)&&(d=se(l,i)),Ys(d)&&(s=d,a))return s;var p=t[r+1];r=a?xr(p):Er(p)}if(null!==e){var v=o?e.residualClasses:e.residualStyles;null!=v&&(s=se(v,i))}return s}function Ys(t){return void 0!==t}function Xs(t,e){return 0!=(t.flags&(e?16:32))}function Gs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Ke(),i=Ze(),r=t+20,o=i.firstCreatePass?Dr(i,n[6],t,3,null,null):i.data[r],a=n[r]=function(t,e){return Re(e)?e.createText(t):e.createTextNode(t)}(e,n[11]);Fo(i,n,a,o),$e(o,!1)}function qs(t){return Ks("",t,""),qs}function Ks(t,e,n){var i=Ke(),r=es(i,t,e,n);return r!==gr&&yo(i,kn(),r),Ks}function Zs(t,e,n,i,r){var o=Ke(),a=function(t,e,n,i,r,o){var a=$a(t,an(),n,r);return ln(2),a?e+Hn(n)+i+Hn(r)+o:gr}(o,t,e,n,i,r);return a!==gr&&yo(o,kn(),a),Zs}function Qs(t,e,n){Ns(ae,js,es(Ke(),t,e,n),!0)}function Js(t,e,n){var i=Ke();return Ja(i,sn(),e)&&Ur(Ze(),wn(),i,t,e,i[11],n,!0),Js}function $s(t,e,n){var i=Ke();if(Ja(i,sn(),e)){var r=Ze(),o=wn();Ur(r,o,i,t,e,vo(hn(r.data),o,i),n,!0)}return $s}function tl(t,e){var n=Ve(t)[1],i=n.data.length-1;En(n,{directiveStart:i,directiveEnd:i+1})}function el(t){for(var e=Object.getPrototypeOf(t.type.prototype).constructor,n=!0,i=[t];e;){var r=void 0;if(Ie(t))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");r=e.\u0275dir}if(r){if(n){i.push(r);var o=t;o.inputs=nl(t.inputs),o.declaredInputs=nl(t.declaredInputs),o.outputs=nl(t.outputs);var a=r.hostBindings;a&&ol(t,a);var s=r.viewQuery,l=r.contentQueries;if(s&&il(t,s),l&&rl(t,l),ht(t.inputs,r.inputs),ht(t.declaredInputs,r.declaredInputs),ht(t.outputs,r.outputs),Ie(r)&&r.data.animation){var c=t.data;c.animation=(c.animation||[]).concat(r.data.animation)}o.afterContentChecked=o.afterContentChecked||r.afterContentChecked,o.afterContentInit=t.afterContentInit||r.afterContentInit,o.afterViewChecked=t.afterViewChecked||r.afterViewChecked,o.afterViewInit=t.afterViewInit||r.afterViewInit,o.doCheck=t.doCheck||r.doCheck,o.onDestroy=t.onDestroy||r.onDestroy,o.onInit=t.onInit||r.onInit}var u=r.features;if(u)for(var h=0;h<u.length;h++){var f=u[h];f&&f.ngInherit&&f(t),f===el&&(n=!1)}}e=Object.getPrototypeOf(e)}!function(t){for(var e=0,n=null,i=t.length-1;i>=0;i--){var r=t[i];r.hostVars=e+=r.hostVars,r.hostAttrs=jn(r.hostAttrs,n=jn(n,r.hostAttrs))}}(i)}function nl(t){return t===he?{}:t===fe?[]:t}function il(t,e){var n=t.viewQuery;t.viewQuery=n?function(t,i){e(t,i),n(t,i)}:e}function rl(t,e){var n=t.contentQueries;t.contentQueries=n?function(t,i,r){e(t,i,r),n(t,i,r)}:e}function ol(t,e){var n=t.hostBindings;t.hostBindings=n?function(t,i){e(t,i),n(t,i)}:e}var al=function(){function t(e,n,i){_classCallCheck(this,t),this.previousValue=e,this.currentValue=n,this.firstChange=i}return _createClass(t,[{key:"isFirstChange",value:function(){return this.firstChange}}]),t}();function sl(t){t.type.prototype.ngOnChanges&&(t.setInput=ll,t.onChanges=function(){var t=cl(this),e=t&&t.current;if(e){var n=t.previous;if(n===he)t.previous=e;else for(var i in e)n[i]=e[i];t.current=null,this.ngOnChanges(e)}})}function ll(t,e,n,i){var r=cl(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:he,current:null}),o=r.current||(r.current={}),a=r.previous,s=this.declaredInputs[n],l=a[s];o[s]=new al(l&&l.currentValue,e,a===he),t[i]=e}function cl(t){return t.__ngSimpleChanges__||null}function ul(t,e,n,i,r){if(t=Et(t),Array.isArray(t))for(var o=0;o<t.length;o++)ul(t[o],e,n,i,r);else{var a=Ze(),s=Ke(),l=_a(t)?t:Et(t.provide),c=ga(t),u=Je(),h=65535&u.providerIndexes,f=u.directiveStart,d=u.providerIndexes>>16;if(_a(t)||!t.multi){var p=new Dn(c,r,rs),v=dl(l,e,r?h:h+d,f);-1===v?(ei(Qn(u,s),a,l),hl(a,t,e.length),e.push(l),u.directiveStart++,u.directiveEnd++,r&&(u.providerIndexes+=65536),n.push(p),s.push(p)):(n[v]=p,s[v]=p)}else{var g=dl(l,e,h+d,f),m=dl(l,e,h,h+d),y=g>=0&&n[g],_=m>=0&&n[m];if(r&&!_||!r&&!y){ei(Qn(u,s),a,l);var b=function(t,e,n,i,r){var o=new Dn(t,n,rs);return o.multi=[],o.index=e,o.componentProviders=0,fl(o,r,i&&!n),o}(r?vl:pl,n.length,r,i,c);!r&&_&&(n[m].providerFactory=b),hl(a,t,e.length,0),e.push(l),u.directiveStart++,u.directiveEnd++,r&&(u.providerIndexes+=65536),n.push(b),s.push(b)}else hl(a,t,g>-1?g:m,fl(n[r?m:g],c,!r&&i));!r&&i&&_&&n[m].componentProviders++}}}function hl(t,e,n,i){var r=_a(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 fl(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function dl(t,e,n,i){for(var r=n;r<i;r++)if(e[r]===t)return r;return-1}function pl(t,e,n,i){return gl(this.multi,[])}function vl(t,e,n,i){var r,o=this.multi;if(this.providerFactory){var a=this.providerFactory.componentProviders,s=ai(n,n[1],this.providerFactory.index,i);gl(o,r=s.slice(0,a));for(var l=a;l<s.length;l++)r.push(s[l])}else gl(o,r=[]);return r}function gl(t,e){for(var n=0;n<t.length;n++)e.push((0,t[n])());return e}function ml(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,i){return function(t,e,n){var i=Ze();if(i.firstCreatePass){var r=Ie(t);ul(n,i.data,i.blueprint,r,!0),ul(e,i.data,i.blueprint,r,!1)}}(n,i?i(t):t,e)}}}sl.ngInherit=!0;var yl=function t(){_classCallCheck(this,t)},_l=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"resolveComponentFactory",value:function(t){throw function(t){var e=Error("No component factory found for ".concat(Ct(t),". Did you add it to @NgModule.entryComponents?"));return e.ngComponent=t,e}(t)}}]),t}(),bl=function(){var t=function t(){_classCallCheck(this,t)};return t.NULL=new _l,t}(),kl=function(){var t=function t(e){_classCallCheck(this,t),this.nativeElement=e};return t.__NG_ELEMENT_ID__=function(){return Cl(t)},t}(),Cl=function(t){return Xo(t,Je(),Ke())},wl=function t(){_classCallCheck(this,t)},xl=function(){var t={Important:1,DashCase:2};return t[t.Important]="Important",t[t.DashCase]="DashCase",t}(),Sl=function(){var t=function t(){_classCallCheck(this,t)};return t.__NG_ELEMENT_ID__=function(){return El()},t}(),El=function(){var t=Ke(),e=ze(Je().index,t);return function(t){var e=t[11];if(Re(e))return e;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Se(e)?e:t)},Tl=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275prov=ft({token:t,providedIn:"root",factory:function(){return null}}),t}(),Ol=function t(e){_classCallCheck(this,t),this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")},Al=new Ol("9.1.9"),Il=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"supports",value:function(t){return Ka(t)}},{key:"create",value:function(t){return new Dl(t)}}]),t}(),Pl=function(t,e){return e},Dl=function(){function t(e){_classCallCheck(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||Pl}return _createClass(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.currentIndex<jl(n,i,r)?e:n,a=jl(o,i,r),s=o.currentIndex;if(o===n)i--,n=n._nextRemoved;else if(e=e._next,null==o.previousIndex)i++;else{r||(r=[]);var l=a-i,c=s-i;if(l!=c){for(var u=0;u<l;u++){var h=u<r.length?r[u]:r[u]=0,f=h+u;c<=f&&f<l&&(r[u]=h+1)}r[o.previousIndex]=c-l}}a!==s&&t(o,a,s)}}},{key:"forEachPreviousItem",value:function(t){var e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}},{key:"forEachAddedItem",value:function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}},{key:"forEachMovedItem",value:function(t){var e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}},{key:"forEachRemovedItem",value:function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}},{key:"forEachIdentityChange",value:function(t){var e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}},{key:"diff",value:function(t){if(null==t&&(t=[]),!Ka(t))throw new Error("Error trying to diff '".concat(Ct(t),"'. Only arrays and iterables are allowed"));return this.check(t)?this:null}},{key:"onDestroy",value:function(){}},{key:"check",value:function(t){var e=this;this._reset();var n,i,r,o=this._itHead,a=!1;if(Array.isArray(t)){this.length=t.length;for(var s=0;s<this.length;s++)i=t[s],r=this._trackByFn(s,i),null!==o&&Ga(o.trackById,r)?(a&&(o=this._verifyReinsertion(o,i,r,s)),Ga(o.item,i)||this._addIdentityChange(o,i)):(o=this._mismatch(o,i,r,s),a=!0),o=o._next}else n=0,function(t,e){if(Array.isArray(t))for(var n=0;n<t.length;n++)e(t[n]);else for(var i,r=t[Xa()]();!(i=r.next()).done;)e(i.value)}(t,(function(t){r=e._trackByFn(n,t),null!==o&&Ga(o.trackById,r)?(a&&(o=e._verifyReinsertion(o,t,r,n)),Ga(o.item,t)||e._addIdentityChange(o,t)):(o=e._mismatch(o,t,r,n),a=!0),o=o._next,n++})),this.length=n;return this._truncate(o),this.collection=t,this.isDirty}},{key:"_reset",value:function(){if(this.isDirty){var t,e;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}},{key:"_mismatch",value:function(t,e,n,i){var r;return null===t?r=this._itTail:(r=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(Ga(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,r,i)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Ga(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,r,i)):t=this._addAfter(new Rl(e,n),r,i),t}},{key:"_verifyReinsertion",value:function(t,e,n,i){var r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==r?t=this._reinsertAfter(r,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}},{key:"_truncate",value:function(t){for(;null!==t;){var e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}},{key:"_reinsertAfter",value:function(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);var i=t._prevRemoved,r=t._nextRemoved;return null===i?this._removalsHead=r:i._nextRemoved=r,null===r?this._removalsTail=i:r._prevRemoved=i,this._insertAfter(t,e,n),this._addToMoves(t,n),t}},{key:"_moveAfter",value:function(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}},{key:"_addAfter",value:function(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}},{key:"_insertAfter",value:function(t,e,n){var i=null===e?this._itHead:e._next;return t._next=i,t._prev=e,null===i?this._itTail=t:i._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new Ml),this._linkedRecords.put(t),t.currentIndex=n,t}},{key:"_remove",value:function(t){return this._addToRemovals(this._unlink(t))}},{key:"_unlink",value:function(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);var e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}},{key:"_addToMoves",value:function(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}},{key:"_addToRemovals",value:function(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Ml),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}},{key:"_addIdentityChange",value:function(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}},{key:"isDirty",get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}}]),t}(),Rl=function t(e,n){_classCallCheck(this,t),this.item=e,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null},Fl=function(){function t(){_classCallCheck(this,t),this._head=null,this._tail=null}return _createClass(t,[{key:"add",value:function(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}},{key:"get",value:function(t,e){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Ga(n.trackById,t))return n;return null}},{key:"remove",value:function(t){var e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}]),t}(),Ml=function(){function t(){_classCallCheck(this,t),this.map=new Map}return _createClass(t,[{key:"put",value:function(t){var e=t.trackById,n=this.map.get(e);n||(n=new Fl,this.map.set(e,n)),n.add(t)}},{key:"get",value:function(t,e){var n=this.map.get(t);return n?n.get(t,e):null}},{key:"remove",value:function(t){var e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}},{key:"clear",value:function(){this.map.clear()}},{key:"isEmpty",get:function(){return 0===this.map.size}}]),t}();function jl(t,e,n){var i=t.previousIndex;if(null===i)return i;var r=0;return n&&i<n.length&&(r=n[i]),i+e+r}var Ll=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"supports",value:function(t){return t instanceof Map||Za(t)}},{key:"create",value:function(){return new Nl}}]),t}(),Nl=function(){function t(){_classCallCheck(this,t),this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return _createClass(t,[{key:"forEachItem",value:function(t){var e;for(e=this._mapHead;null!==e;e=e._next)t(e)}},{key:"forEachPreviousItem",value:function(t){var e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}},{key:"forEachChangedItem",value:function(t){var e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}},{key:"forEachAddedItem",value:function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}},{key:"forEachRemovedItem",value:function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}},{key:"diff",value:function(t){if(t){if(!(t instanceof Map||Za(t)))throw new Error("Error trying to diff '".concat(Ct(t),"'. Only maps and objects are allowed"))}else t=new Map;return this.check(t)?this:null}},{key:"onDestroy",value:function(){}},{key:"check",value:function(t){var e=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(t,(function(t,i){if(n&&n.key===i)e._maybeAddToChanges(n,t),e._appendAfter=n,n=n._next;else{var r=e._getOrCreateRecordForKey(i,t);n=e._insertBeforeOrAppend(n,r)}})),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(var i=n;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}},{key:"_insertBeforeOrAppend",value:function(t,e){if(t){var n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}},{key:"_getOrCreateRecordForKey",value:function(t,e){if(this._records.has(t)){var n=this._records.get(t);this._maybeAddToChanges(n,e);var i=n._prev,r=n._next;return i&&(i._next=r),r&&(r._prev=i),n._next=null,n._prev=null,n}var o=new Bl(t);return this._records.set(t,o),o.currentValue=e,this._addToAdditions(o),o}},{key:"_reset",value:function(){if(this.isDirty){var t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}},{key:"_maybeAddToChanges",value:function(t,e){Ga(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}},{key:"_addToAdditions",value:function(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}},{key:"_addToChanges",value:function(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}},{key:"_forEach",value:function(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach((function(n){return e(t[n],n)}))}},{key:"isDirty",get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}}]),t}(),Bl=function t(e){_classCallCheck(this,t),this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null},zl=function(){var t=function(){function t(e){_classCallCheck(this,t),this.factories=e}return _createClass(t,[{key:"find",value:function(t){var e,n=this.factories.find((function(e){return e.supports(t)}));if(null!=n)return n;throw new Error("Cannot find a differ supporting object '".concat(t,"' of type '").concat((e=t).name||typeof e,"'"))}}],[{key:"create",value:function(e,n){if(null!=n){var i=n.factories.slice();e=e.concat(i)}return new t(e)}},{key:"extend",value:function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new lt,new at]]}}}]),t}();return t.\u0275prov=ft({token:t,providedIn:"root",factory:function(){return new t([new Il])}}),t}(),Vl=function(){var t=function(){function t(e){_classCallCheck(this,t),this.factories=e}return _createClass(t,[{key:"find",value:function(t){var e=this.factories.find((function(e){return e.supports(t)}));if(e)return e;throw new Error("Cannot find a differ supporting object '".concat(t,"'"))}}],[{key:"create",value:function(e,n){if(n){var i=n.factories.slice();e=e.concat(i)}return new t(e)}},{key:"extend",value:function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new lt,new at]]}}}]),t}();return t.\u0275prov=ft({token:t,providedIn:"root",factory:function(){return new t([new Ll])}}),t}(),Hl=[new Ll],Wl=new zl([new Il]),Ul=new Vl(Hl),Yl=function(){var t=function t(){_classCallCheck(this,t)};return t.__NG_ELEMENT_ID__=function(){return Xl(t,kl)},t}(),Xl=function(t,e){return Go(t,e,Je(),Ke())},Gl=function(){var t=function t(){_classCallCheck(this,t)};return t.__NG_ELEMENT_ID__=function(){return ql(t,kl)},t}(),ql=function(t,e){return qo(t,e,Je(),Ke())},Kl={},Zl=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this)).ngModule=t,i}return _createClass(n,[{key:"resolveComponentFactory",value:function(t){var e=Ce(t);return new $l(e,this.ngModule)}}]),n}(bl);function Ql(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}var Jl=new Vt("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return Un}}),$l=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this)).componentDef=t,r.ngModule=i,r.componentType=t.type,r.selector=t.selectors.map(vr).join(","),r.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],r.isBoundToModule=!!i,r}return _createClass(n,[{key:"create",value:function(t,e,n,i){var r,o,a=(i=i||this.ngModule)?function(t,e){return{get:function(n,i,r){var o=t.get(n,Kl,r);return o!==Kl||i===Kl?o:e.get(n,i,r)}}}(t,i.injector):t,s=a.get(wl,Fe),l=a.get(Tl,null),c=s.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",h=n?function(t,e,n){if(Re(t))return t.selectRootElement(e,n===ue.ShadowDom);var i="string"==typeof e?t.querySelector(e):e;return i.textContent="",i}(c,n,this.componentDef.encapsulation):Ir(u,s.createRenderer(null,this.componentDef),function(t){var e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(u)),f=this.componentDef.onPush?576:528,d="string"==typeof n&&/^#root-ng-internal-isolated-\d+/.test(n),p={components:[],scheduler:Un,clean:ho,playerHandler:null,flags:0},v=Vr(0,-1,null,1,0,null,null,null,null,null),g=Pr(null,v,p,f,null,null,s,c,l,a);vn(g,null);try{var m=function(t,e,n,i,r,o){var a=n[1];n[20]=t;var s=Dr(a,null,0,3,null,null),l=s.mergedAttrs=e.hostAttrs;null!==l&&(Ua(s,l,!0),null!==t&&(Rn(r,t,l),null!==s.classes&&zo(r,t,s.classes),null!==s.styles&&Bo(r,t,s.styles)));var c=i.createRenderer(t,e),u=Pr(n,zr(e),null,e.onPush?64:16,n[20],s,i,c,void 0);return a.firstCreatePass&&(ei(Qn(s,n),a,e.type),Zr(a,s),Jr(s,n.length,1)),ao(n,u),n[20]=u}(h,this.componentDef,g,s,c);if(h)if(n)Rn(c,h,["ng-version",Al.full]);else{var y=function(t){for(var e=[],n=[],i=1,r=2;i<t.length;){var o=t[i];if("string"==typeof o)2===r?""!==o&&e.push(o,t[++i]):8===r&&n.push(o);else{if(!ur(r))break;r=o}i++}return{attrs:e,classes:n}}(this.componentDef.selectors[0]),_=y.attrs,b=y.classes;_&&Rn(c,h,_),b&&b.length>0&&zo(c,h,b.join(" "))}if(o=Ne(v,0),void 0!==e)for(var k=o.projection=[],C=0;C<this.ngContentSelectors.length;C++){var w=e[C];k.push(null!=w?Array.from(w):null)}r=function(t,e,n,i,r){var o=n[1],a=function(t,e,n){var i=Je();t.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),Kr(t,i,1),$r(t,e,n));var r=ai(e,t,e.length-1,i);nr(r,e);var o=Le(i,e);return o&&nr(o,e),r}(o,n,e);i.components.push(a),t[8]=a,r&&r.forEach((function(t){return t(a,e)})),e.contentQueries&&e.contentQueries(1,a,n.length-1);var s=Je();if(o.firstCreatePass&&(null!==e.hostBindings||null!==e.hostAttrs)){Cn(s.index-20);var l=n[1];Xr(l,e),Gr(l,n,e.hostVars),qr(e,a)}return a}(m,this.componentDef,g,p,[tl]),Rr(v,g,null)}finally{bn()}var x=new tc(this.componentType,r,Xo(kl,o,g),g,o);return n&&!d||(v.node.child=o),x}},{key:"inputs",get:function(){return Ql(this.componentDef.inputs)}},{key:"outputs",get:function(){return Ql(this.componentDef.outputs)}}]),n}(yl),tc=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a){var s,l,c,u;return _classCallCheck(this,n),(s=e.call(this)).location=r,s._rootLView=o,s._tNode=a,s.destroyCbs=[],s.instance=i,s.hostView=s.changeDetectorRef=new Yo(o),l=o[1],c=o,null==(u=l.node)&&(l.node=u=Hr(0,null,2,-1,null,null)),c[6]=u,s.componentType=t,s}return _createClass(n,[{key:"destroy",value:function(){this.destroyCbs&&(this.destroyCbs.forEach((function(t){return t()})),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}},{key:"onDestroy",value:function(t){this.destroyCbs&&this.destroyCbs.push(t)}},{key:"injector",get:function(){return new ci(this._tNode,this._rootLView)}}]),n}(function(){return function t(){_classCallCheck(this,t)}}()),ec=void 0,nc=["en",[["a","p"],["AM","PM"],ec],[["AM","PM"],ec,ec],[["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"]],ec,[["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"]],ec,[["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}",ec,"{1} 'at' {0}",ec],[".",",",";","%","+","-","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}],ic={};function rc(t){return t in ic||(ic[t]=Rt.ng&&Rt.ng.common&&Rt.ng.common.locales&&Rt.ng.common.locales[t]),ic[t]}var oc=function(){var t={LocaleId:0,DayPeriodsFormat:1,DayPeriodsStandalone:2,DaysFormat:3,DaysStandalone:4,MonthsFormat:5,MonthsStandalone:6,Eras:7,FirstDayOfWeek:8,WeekendRange:9,DateFormat:10,TimeFormat:11,DateTimeFormat:12,NumberSymbols:13,NumberFormats:14,CurrencyCode:15,CurrencySymbol:16,CurrencyName:17,Currencies:18,Directionality:19,PluralCase:20,ExtraData:21};return t[t.LocaleId]="LocaleId",t[t.DayPeriodsFormat]="DayPeriodsFormat",t[t.DayPeriodsStandalone]="DayPeriodsStandalone",t[t.DaysFormat]="DaysFormat",t[t.DaysStandalone]="DaysStandalone",t[t.MonthsFormat]="MonthsFormat",t[t.MonthsStandalone]="MonthsStandalone",t[t.Eras]="Eras",t[t.FirstDayOfWeek]="FirstDayOfWeek",t[t.WeekendRange]="WeekendRange",t[t.DateFormat]="DateFormat",t[t.TimeFormat]="TimeFormat",t[t.DateTimeFormat]="DateTimeFormat",t[t.NumberSymbols]="NumberSymbols",t[t.NumberFormats]="NumberFormats",t[t.CurrencyCode]="CurrencyCode",t[t.CurrencySymbol]="CurrencySymbol",t[t.CurrencyName]="CurrencyName",t[t.Currencies]="Currencies",t[t.Directionality]="Directionality",t[t.PluralCase]="PluralCase",t[t.ExtraData]="ExtraData",t}();function ac(t){var e;null==(e=t)&&function(t,e,n,i){throw new Error("ASSERTION ERROR: ".concat("Expected localeId to be defined")+" [Expected=> null != ".concat(e," <=Actual]"))}(0,e),"string"==typeof t&&t.toLowerCase().replace(/_/g,"-")}var sc=new Map,lc=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;_classCallCheck(this,n),(r=e.call(this))._parent=i,r._bootstrapComponents=[],r.injector=_assertThisInitialized(r),r.destroyCbs=[],r.componentFactoryResolver=new Zl(_assertThisInitialized(r));var o=xe(t),a=t[Nt]||null;return a&&ac(a),r._bootstrapComponents=Gn(o.bootstrap),r._r3Injector=da(t,i,[{provide:ee,useValue:_assertThisInitialized(r)},{provide:bl,useValue:r.componentFactoryResolver}],Ct(t)),r._r3Injector._resolveInjectorDefTypes(),r.instance=r.get(t),r}return _createClass(n,[{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ka.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ct.Default;return t===ka||t===ee||t===Ht?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}(ee),cc=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this)).moduleType=t,null!==xe(t)&&function t(e){if(null!==e.\u0275mod.id){var n=e.\u0275mod.id;(function(t,e,n){if(e&&e!==n)throw new Error("Duplicate module registered for ".concat(t," - ").concat(Ct(e)," vs ").concat(Ct(e.name)))})(n,sc.get(n),e),sc.set(n,e)}var i=e.\u0275mod.imports;i instanceof Function&&(i=i()),i&&i.forEach((function(e){return t(e)}))}(t),i}return _createClass(n,[{key:"create",value:function(t){return new lc(this.moduleType,t)}}]),n}(function(){return function t(){_classCallCheck(this,t)}}());function uc(t,e,n){var i=on()+t,r=Ke();return r[i]===gr?Qa(r,i,n?e.call(n):e()):function(t,e){return t[e]}(r,i)}function hc(t,e){var n=t[e];return n===gr?void 0:n}function fc(t,e){var n,i=Ze(),r=t+20;i.firstCreatePass?(n=function(t,e){if(e)for(var n=e.length-1;n>=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=we(n.type)),a=qt(rs),s=Kn(!1),l=o();return Kn(s),qt(a),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,Ke(),t,l),l}function dc(t,e,n){var i=Ke(),r=Be(i,t);return function(t,e){return qa.isWrapped(e)&&(e=qa.unwrap(e),t[an()]=gr),e}(i,function(t,e){return t[1].data[e+20].pure}(i,t)?function(t,e,n,i,r,o){var a=e+n;return Ja(t,a,r)?Qa(t,a+1,o?i.call(o,r):i(r)):hc(t,a+1)}(i,on(),e,r.transform,n,r):r.transform(n))}var pc=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return _classCallCheck(this,n),(t=e.call(this)).__isAsync=i,t}return _createClass(n,[{key:"emit",value:function(t){_get(_getPrototypeOf(n.prototype),"next",this).call(this,t)}},{key:"subscribe",value:function(t,e,i){var r,o=function(t){return null},a=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&&(o=this.__isAsync?function(e){setTimeout((function(){return t.error(e)}))}:function(e){t.error(e)}),t.complete&&(a=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&&(o=this.__isAsync?function(t){setTimeout((function(){return e(t)}))}:function(t){e(t)}),i&&(a=this.__isAsync?function(){setTimeout((function(){return i()}))}:function(){i()}));var s=_get(_getPrototypeOf(n.prototype),"subscribe",this).call(this,r,o,a);return t instanceof f&&t.add(s),s}}]),n}(E);function vc(){return this._results[Xa()]()}var gc=function(){function t(){_classCallCheck(this,t),this.dirty=!0,this._results=[],this.changes=new pc,this.length=0;var e=Xa(),n=t.prototype;n[e]||(n[e]=vc)}return _createClass(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;i<e.length;i++){var r=e[i];Array.isArray(r)?(n===e&&(n=e.slice(0,i)),t(r,n)):n!==e&&n.push(r)}return n}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}},{key:"notifyOnChanges",value:function(){this.changes.emit(this)}},{key:"setDirty",value:function(){this.dirty=!0}},{key:"destroy",value:function(){this.changes.complete(),this.changes.unsubscribe()}}]),t}(),mc=function(){function t(e){_classCallCheck(this,t),this.queryList=e,this.matches=null}return _createClass(t,[{key:"clone",value:function(){return new t(this.queryList)}},{key:"setDirty",value:function(){this.queryList.setDirty()}}]),t}(),yc=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_classCallCheck(this,t),this.queries=e}return _createClass(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;o<i;o++){var a=n.getByIndex(o);r.push(this.queries[a.indexInDeclarationView].clone())}return new t(r)}return null}},{key:"insertView",value:function(t){this.dirtyQueriesWithMatches(t)}},{key:"detachView",value:function(t){this.dirtyQueriesWithMatches(t)}},{key:"dirtyQueriesWithMatches",value:function(t){for(var e=0;e<this.queries.length;e++)null!==Mc(t,e).matches&&this.queries[e].setDirty()}}]),t}(),_c=function t(e,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,t),this.predicate=e,this.descendants=n,this.isStatic=i,this.read=r},bc=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_classCallCheck(this,t),this.queries=e}return _createClass(t,[{key:"elementStart",value:function(t,e){for(var n=0;n<this.queries.length;n++)this.queries[n].elementStart(t,e)}},{key:"elementEnd",value:function(t){for(var e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}},{key:"embeddedTView",value:function(e){for(var n=null,i=0;i<this.length;i++){var r=null!==n?n.length:0,o=this.getByIndex(i).embeddedTView(e,r);o&&(o.indexInDeclarationView=i,null!==n?n.push(o):n=[o])}return null!==n?new t(n):null}},{key:"template",value:function(t,e){for(var n=0;n<this.queries.length;n++)this.queries[n].template(t,e)}},{key:"getByIndex",value:function(t){return this.queries[t]}},{key:"track",value:function(t){this.queries.push(t)}},{key:"length",get:function(){return this.queries.length}}]),t}(),kc=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;_classCallCheck(this,t),this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return _createClass(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&&4===n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(t,e){if(Array.isArray(this.metadata.predicate))for(var n=this.metadata.predicate,i=0;i<n.length;i++)this.matchTNodeWithReadOption(t,e,Cc(e,n[i]));else{var r=this.metadata.predicate;r===Yl?0===e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,oi(e,t,r,!1,!1))}}},{key:"matchTNodeWithReadOption",value:function(t,e,n){if(null!==n){var i=this.metadata.read;if(null!==i)if(i===kl||i===Gl||i===Yl&&0===e.type)this.addMatch(e.index,-2);else{var r=oi(e,t,i,!1,!1);null!==r&&this.addMatch(e.index,r)}else this.addMatch(e.index,n)}}},{key:"addMatch",value:function(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}}]),t}();function Cc(t,e){var n=t.localNames;if(null!==n)for(var i=0;i<n.length;i+=2)if(n[i]===e)return n[i+1];return null}function wc(t,e,n,i){return-1===n?function(t,e){return 3===t.type||4===t.type?Xo(kl,t,e):0===t.type?Go(Yl,kl,t,e):null}(e,t):-2===n?function(t,e,n){return n===kl?Xo(kl,e,t):n===Yl?Go(Yl,kl,e,t):n===Gl?qo(Gl,kl,e,t):void 0}(t,e,i):ai(t,t[1],n,e)}function xc(t,e,n,i){var r=e[19].queries[i];if(null===r.matches){for(var o=t.data,a=n.matches,s=[],l=0;l<a.length;l+=2){var c=a[l];s.push(c<0?null:wc(e,o[c],a[l+1],n.metadata.read))}r.matches=s}return r.matches}function Sc(t){var e=Ke(),n=Ze(),i=fn();dn(i+1);var r=Mc(n,i);if(t.dirty&&He(e)===r.metadata.isStatic){if(null===r.matches)t.reset([]);else{var o=r.crossesNgTemplate?function t(e,n,i,r){var o=e.queries.getByIndex(i),a=o.matches;if(null!==a)for(var s=xc(e,n,o,i),l=0;l<a.length;l+=2){var c=a[l];if(c>0)r.push(s[l/2]);else{for(var u=a[l+1],h=n[-c],f=10;f<h.length;f++){var d=h[f];d[17]===d[3]&&t(d[1],d,u,r)}if(null!==h[9])for(var p=h[9],v=0;v<p.length;v++){var g=p[v];t(g[1],g,u,r)}}}return r}(n,e,i,[]):xc(n,e,r,i);t.reset(o),t.notifyOnChanges()}return!0}return!1}function Ec(t,e,n){Oc(Ze(),Ke(),t,e,n,!0)}function Tc(t,e,n){Oc(Ze(),Ke(),t,e,n,!1)}function Oc(t,e,n,i,r,o){t.firstCreatePass&&(Fc(t,new _c(n,i,o,r),-1),o&&(t.staticViewQueries=!0)),Rc(t,e)}function Ac(t,e,n,i){Pc(Ze(),Ke(),e,n,i,!1,Je(),t)}function Ic(t,e,n,i){Pc(Ze(),Ke(),e,n,i,!0,Je(),t)}function Pc(t,e,n,i,r,o,a,s){t.firstCreatePass&&(Fc(t,new _c(n,i,o,r),a.index),function(t,e){var n=t.contentQueries||(t.contentQueries=[]);e!==(t.contentQueries.length?n[n.length-1]:-1)&&n.push(t.queries.length-1,e)}(t,s),o&&(t.staticContentQueries=!0)),Rc(t,e)}function Dc(){return t=Ke(),e=fn(),t[19].queries[e].queryList;var t,e}function Rc(t,e){var n=new gc;!function(t,e,n,i){var r=fo(e);r.push(n),t.firstCreatePass&&po(t).push(i,r.length-1)}(t,e,n,n.destroy),null===e[19]&&(e[19]=new yc),e[19].queries.push(new mc(n))}function Fc(t,e,n){null===t.queries&&(t.queries=new bc),t.queries.track(new kc(e,n))}function Mc(t,e){return t.queries.getByIndex(e)}function jc(t,e){return Go(Yl,kl,t,e)}var Lc=new Vt("Application Initializer"),Nc=function(){var t=function(){function t(e){var n=this;_classCallCheck(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 _createClass(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;i<this.appInits.length;i++){var r=this.appInits[i]();ps(r)&&e.push(r)}Promise.all(e).then((function(){n()})).catch((function(e){t.reject(e)})),0===e.length&&n(),this.initialized=!0}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(Zt(Lc,8))},t.\u0275prov=ft({token:t,factory:t.\u0275fac}),t}(),Bc=new Vt("AppId"),zc={provide:Bc,useFactory:function(){return"".concat(Vc()).concat(Vc()).concat(Vc())},deps:[]};function Vc(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var Hc=new Vt("Platform Initializer"),Wc=new Vt("Platform ID"),Uc=new Vt("appBootstrapListener"),Yc=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"log",value:function(t){console.log(t)}},{key:"warn",value:function(t){console.warn(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ft({token:t,factory:t.\u0275fac}),t}(),Xc=new Vt("LocaleId"),Gc=new Vt("DefaultCurrencyCode"),qc=function t(e,n){_classCallCheck(this,t),this.ngModuleFactory=e,this.componentFactories=n},Kc=function(t){return new cc(t)},Zc=Kc,Qc=function(t){return Promise.resolve(Kc(t))},Jc=function(t){var e=Kc(t),n=Gn(xe(t).declarations).reduce((function(t,e){var n=Ce(e);return n&&t.push(new $l(n)),t}),[]);return new qc(e,n)},$c=Jc,tu=function(t){return Promise.resolve(Jc(t))},eu=function(){var t=function(){function t(){_classCallCheck(this,t),this.compileModuleSync=Zc,this.compileModuleAsync=Qc,this.compileModuleAndAllComponentsSync=$c,this.compileModuleAndAllComponentsAsync=tu}return _createClass(t,[{key:"clearCache",value:function(){}},{key:"clearCacheFor",value:function(t){}},{key:"getModuleId",value:function(t){}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ft({token:t,factory:t.\u0275fac}),t}(),nu=new Vt("compilerOptions"),iu=Promise.resolve(0);function ru(t){"undefined"==typeof Zone?iu.then((function(){t&&t.apply(null,null)})):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}var ou=function(){function t(e){var n,i,r=e.enableLongStackTrace,o=void 0!==r&&r,a=e.shouldCoalesceEventChangeDetection,s=void 0!==a&&a;if(_classCallCheck(this,t),this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new pc(!1),this.onMicrotaskEmpty=new pc(!1),this.onStable=new pc(!1),this.onError=new pc(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),o&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=s,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){var t=Rt.requestAnimationFrame,e=Rt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){var n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);var i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,i=!!(n=this).shouldCoalesceEventChangeDetection&&n.nativeRequestAnimationFrame&&function(){!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Rt,(function(){t.lastRequestAnimationFrameId=-1,cu(t),lu(t)})),cu(t))}(n)},n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:i},onInvokeTask:function(t,e,r,o,a,s){try{return uu(n),t.invokeTask(r,o,a,s)}finally{i&&"eventTask"===o.type&&i(),hu(n)}},onInvoke:function(t,e,i,r,o,a,s){try{return uu(n),t.invoke(i,r,o,a,s)}finally{hu(n)}},onHasTask:function(t,e,i,r){t.hasTask(i,r),e===i&&("microTask"==r.change?(n._hasPendingMicrotasks=r.microTask,cu(n),lu(n)):"macroTask"==r.change&&(n.hasPendingMacrotasks=r.macroTask))},onHandleError:function(t,e,i,r){return t.handleError(i,r),n.runOutsideAngular((function(){return n.onError.emit(r)})),!1}})}return _createClass(t,[{key:"run",value:function(t,e,n){return this._inner.run(t,e,n)}},{key:"runTask",value:function(t,e,n,i){var r=this._inner,o=r.scheduleEventTask("NgZoneEvent: "+i,t,su,au,au);try{return r.runTask(o,e,n)}finally{r.cancelTask(o)}}},{key:"runGuarded",value:function(t,e,n){return this._inner.runGuarded(t,e,n)}},{key:"runOutsideAngular",value:function(t){return this._outer.run(t)}}],[{key:"isInAngularZone",value:function(){return!0===Zone.current.get("isAngularZone")}},{key:"assertInAngularZone",value:function(){if(!t.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}},{key:"assertNotInAngularZone",value:function(){if(t.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}}]),t}();function au(){}var su={};function lu(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular((function(){return t.onStable.emit(null)}))}finally{t.isStable=!0}}}function cu(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function uu(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function hu(t){t._nesting--,lu(t)}var fu,du=function(){function t(){_classCallCheck(this,t),this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new pc,this.onMicrotaskEmpty=new pc,this.onStable=new pc,this.onError=new pc}return _createClass(t,[{key:"run",value:function(t,e,n){return t.apply(e,n)}},{key:"runGuarded",value:function(t,e,n){return t.apply(e,n)}},{key:"runOutsideAngular",value:function(t){return t()}},{key:"runTask",value:function(t,e,n,i){return t.apply(e,n)}}]),t}(),pu=function(){var t=function(){function t(e){var n=this;_classCallCheck(this,t),this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),e.run((function(){n.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")}))}return _createClass(t,[{key:"_watchAngularEvents",value:function(){var t=this;this._ngZone.onUnstable.subscribe({next:function(){t._didWork=!0,t._isZoneStable=!1}}),this._ngZone.runOutsideAngular((function(){t._ngZone.onStable.subscribe({next:function(){ou.assertNotInAngularZone(),ru((function(){t._isZoneStable=!0,t._runCallbacksIfReady()}))}})}))}},{key:"increasePendingRequestCount",value:function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}},{key:"decreasePendingRequestCount",value:function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}},{key:"isStable",value:function(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}},{key:"_runCallbacksIfReady",value:function(){var t=this;if(this.isStable())ru((function(){for(;0!==t._callbacks.length;){var e=t._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(t._didWork)}t._didWork=!1}));else{var e=this.getPendingTasks();this._callbacks=this._callbacks.filter((function(t){return!t.updateCb||!t.updateCb(e)||(clearTimeout(t.timeoutId),!1)})),this._didWork=!0}}},{key:"getPendingTasks",value:function(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map((function(t){return{source:t.source,creationLocation:t.creationLocation,data:t.data}})):[]}},{key:"addCallback",value:function(t,e,n){var i=this,r=-1;e&&e>0&&(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)(Zt(ou))},t.\u0275prov=ft({token:t,factory:t.\u0275fac}),t}(),vu=function(){var t=function(){function t(){_classCallCheck(this,t),this._applications=new Map,gu.addToWindow(this)}return _createClass(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 gu.findTestabilityInTree(this,t,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ft({token:t,factory:t.\u0275fac}),t}(),gu=new(function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"addToWindow",value:function(t){}},{key:"findTestabilityInTree",value:function(t,e,n){return null}}]),t}()),mu=function(t,e,n){var i=t.get(nu,[]).concat(e),r=new cc(n);if(0===Va.size)return Promise.resolve(r);var o,a,s=(o=i.map((function(t){return t.providers})),a=[],o.forEach((function(t){return t&&a.push.apply(a,_toConsumableArray2(t))})),a);if(0===s.length)return Promise.resolve(r);var l=function(){var t=Rt.ng;if(!t||!t.\u0275compilerFacade)throw new Error("Angular JIT compilation failed: '@angular/compiler' not loaded!\n - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\n - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\n - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.");return t.\u0275compilerFacade}(),c=ka.create({providers:s}).get(l.ResourceLoader);return function(t){var e=[],n=new Map;function i(t){var e=n.get(t);if(!e){var i=function(t){return Promise.resolve(c.get(t))}(t);n.set(t,e=i.then(Wa))}return e}return Va.forEach((function(t,n){var r=[];t.templateUrl&&r.push(i(t.templateUrl).then((function(e){t.template=e})));var o=t.styleUrls,a=t.styles||(t.styles=[]),s=t.styles.length;o&&o.forEach((function(e,n){a.push(""),r.push(i(e).then((function(i){a[s+n]=i,o.splice(o.indexOf(e),1),0==o.length&&(t.styleUrls=void 0)})))}));var l=Promise.all(r).then((function(){return function(t){Ha.delete(t)}(n)}));e.push(l)})),Va=new Map,Promise.all(e).then((function(){}))}().then((function(){return r}))},yu=new Vt("AllowMultipleToken");function _u(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i="Platform: ".concat(e),r=new Vt(i);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=bu();if(!o||o.injector.get(yu,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{var a=n.concat(e).concat({provide:r,useValue:!0},{provide:sa,useValue:"platform"});!function(t){if(fu&&!fu.destroyed&&!fu.injector.get(yu,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");fu=t.get(ku);var e=t.get(Hc,null);e&&e.forEach((function(t){return t()}))}(ka.create({providers:a,name:i}))}return function(t){var e=bu();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 bu(){return fu&&!fu.destroyed?fu:null}var ku=function(){var t=function(){function t(e){_classCallCheck(this,t),this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return _createClass(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 du:("zone.js"===n?void 0:n)||new ou({enableLongStackTrace:Ei(),shouldCoalesceEventChangeDetection:i})),a=[{provide:ou,useValue:o}];return o.run((function(){var e=ka.create({providers:a,parent:r.injector,name:t.moduleType.name}),n=t.create(e),i=n.injector.get(pi,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy((function(){return Su(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(Nc)).runInitializers(),a.donePromise.then((function(){return ac(n.injector.get(Xc,"en-US")||"en-US"),r._moduleDoBootstrap(n),n})));return ps(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=Cu({},n);return mu(this.injector,i,t).then((function(t){return e.bootstrapModuleFactory(t,i)}))}},{key:"_moduleDoBootstrap",value:function(t){var e=t.injector.get(xu);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(Ct(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)(Zt(ka))},t.\u0275prov=ft({token:t,factory:t.\u0275fac}),t}();function Cu(t,e){return Array.isArray(e)?e.reduce(Cu,t):Object.assign(Object.assign({},t),e)}var wu,xu=((wu=function(){function t(e,n,i,r,o,a){var s=this;_classCallCheck(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=Ei(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run((function(){s.tick()}))}});var l=new b((function(t){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular((function(){t.next(s._stable),t.complete()}))})),c=new b((function(t){var e;s._zone.runOutsideAngular((function(){e=s._zone.onStable.subscribe((function(){ou.assertNotInAngularZone(),ru((function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,t.next(!0))}))}))}));var n=s._zone.onUnstable.subscribe((function(){ou.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular((function(){t.next(!1)})))}));return function(){e.unsubscribe(),n.unsubscribe()}}));this.isStable=G(l,c.pipe(et()))}return _createClass(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 yl?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var r=n.isBoundToModule?void 0:this._injector.get(ee),o=n.create(ka.NULL,[],e||n.selector,r);o.onDestroy((function(){i._unloadComponent(o)}));var a=o.injector.get(pu,null);return a&&o.injector.get(vu).registerApplication(o.location.nativeElement,a),this._loadComponent(o),Ei()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the 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=_createForOfIteratorHelper(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=_createForOfIteratorHelper(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;Su(this._views,e),e.detachFromAppRef()}},{key:"_loadComponent",value:function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Uc,[]).concat(this._bootstrapListeners).forEach((function(e){return e(t)}))}},{key:"_unloadComponent",value:function(t){this.detachView(t.hostView),Su(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}()).\u0275fac=function(t){return new(t||wu)(Zt(ou),Zt(Yc),Zt(ka),Zt(pi),Zt(bl),Zt(Nc))},wu.\u0275prov=ft({token:wu,factory:wu.\u0275fac}),wu);function Su(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Eu=_u(null,"core",[{provide:Wc,useValue:"unknown"},{provide:ku,deps:[ka]},{provide:vu,deps:[]},{provide:Yc,deps:[]}]),Tu=[{provide:xu,useClass:xu,deps:[ou,Yc,ka,pi,bl,Nc]},{provide:Jl,deps:[ou],useFactory:function(t){var e=[];return t.onStable.subscribe((function(){for(;e.length;)e.pop()()})),function(t){e.push(t)}}},{provide:Nc,useClass:Nc,deps:[[new at,Lc]]},{provide:eu,useClass:eu,deps:[]},zc,{provide:zl,useFactory:function(){return Wl},deps:[]},{provide:Vl,useFactory:function(){return Ul},deps:[]},{provide:Xc,useFactory:function(t){return ac(t=t||"undefined"!=typeof $localize&&$localize.locale||"en-US"),t},deps:[[new ot(Xc),new at,new lt]]},{provide:Gc,useValue:"USD"}],Ou=function(){var t=function t(e){_classCallCheck(this,t)};return t.\u0275mod=ye({type:t}),t.\u0275inj=dt({factory:function(e){return new(e||t)(Zt(xu))},providers:Tu}),t}();n("yLV6");var Au=[1,8,15,20,25],Iu=function(t){return t.INLINE="inline",t.OVERLAY="overlay",t}({}),Pu=function(t){return t.DARK="dark",t.LIGHT="light",t}({}),Du=function(t){return t.TOP="top",t.BOTTOM="bottom",t.NONE="none",t}({}),Ru=function(t){return t.NAVIGATION="navigation",t.FILTER="filter",t.RESIZE="resize",t.CROP="crop",t.TRANSFORM="transform",t.DRAW="draw",t.TEXT="text",t.SHAPES="shapes",t.STICKERS="stickers",t.FRAME="frame",t.CORNERS="corners",t.BACKGROUND="background",t.MERGE="merge",t.OBJECT_SETTINGS="objectSettings",t}({}),Fu={fill:"rgb(30, 139, 195)",opacity:1,backgroundColor:null,strokeWidth:.1,stroke:"#000",shadow:{color:"#000",blur:3,offsetX:-1,offsetY:0}},Mu=new Vt("MERGED_CONFIG"),ju={selector:"pixie-editor",textureSize:4096,ui:{visible:!0,mode:Iu.INLINE,defaultTheme:Pu.LIGHT,ignoreMobileKeyboard:!0,allowEditorClose:!0,toolbar:{leftItems:[{type:"button",icon:"photo-library",text:"Open",showInCompactMode:!0,dropdownItems:[{action:"openBackgroundImage",label:"Background Image"},{action:"openOverlayImage",label:"Overlay Image"},{action:"openStateFile",label:"Editor Project File"}]},{type:"button",icon:"file-download",text:"Save",action:"exportImage"}],centerItems:[{type:"zoomWidget",condition:{"tools.zoom.allowUserZoom":!0}},{type:"panelNameWidget",compactModeOnly:!0}],rightItems:[{type:"undoWidget"},{type:"button",icon:"history",action:"toggleHistory",marginLeft:"40px"},{type:"button",icon:"layers",action:"toggleObjects"},{type:"button",icon:"close",action:"closeEditor",marginLeft:"25px",condition:{"ui.mode":"overlay"}},{type:"button",icon:"file-download",action:"exportImage",compactModeOnly:!0}]},nav:{position:Du.TOP,replaceDefault:!1,items:[{name:"filter",icon:"filter-custom",action:Ru.FILTER},{type:"separator"},{name:"resize",icon:"resize-custom",action:Ru.RESIZE},{name:"crop",icon:"crop-custom",action:Ru.CROP},{name:"transform",icon:"transform-custom",action:Ru.TRANSFORM},{type:"separator"},{name:"draw",icon:"pencil-custom",action:Ru.DRAW},{name:"text",icon:"text-box-custom",action:Ru.TEXT},{name:"shapes",icon:"polygon-custom",action:Ru.SHAPES},{name:"stickers",icon:"sticker-custom",action:Ru.STICKERS},{name:"frame",icon:"frame-custom",action:Ru.FRAME},{type:"separator"},{name:"corners",icon:"rounded-corner-custom",action:Ru.CORNERS},{name:"background",icon:"background-custom",action:Ru.BACKGROUND},{name:"merge",icon:"merge-custom",action:Ru.MERGE}]},openImageDialog:{show:!0,sampleImages:[{url:"images/samples/sample1.jpg",thumbnail:"images/samples/sample1_thumbnail.jpg"},{url:"images/samples/sample2.jpg",thumbnail:"images/samples/sample2_thumbnail.jpg"},{url:"images/samples/sample3.jpg",thumbnail:"images/samples/sample3_thumbnail.jpg"}]},colorPresets:{replaceDefault:!1,items:["rgb(0,0,0)","rgb(255, 255, 255)","rgb(242, 38, 19)","rgb(249, 105, 14)","rgb(253, 227, 167)","rgb(4, 147, 114)","rgb(30, 139, 195)","rgb(142, 68, 173)"]}},languages:{active:"default"},googleFontsApiKey:"AIzaSyDOrI6VJiMbR6XLvlp3CdCPZj1T2PzVkKs",objectDefaults:{global:Object.assign({transparentCorners:!1,borderOpacityWhenMoving:1,cornerStyle:"circle",cornerColor:"#ccc",cornerStrokeColor:"#fff",cornerSize:16,strokeWidth:.05,lockUniScaling:!0},Fu),text:{textAlign:"initial",underline:!1,linethrough:!1,fontStyle:"normal",fontFamily:"Times New Roman",fontWeight:400}},tools:{filter:{replaceDefault:!1,items:["grayscale","blackWhite","sharpen","invert","vintage","polaroid","kodachrome","technicolor","brownie","sepia","removeColor","brightness","gamma","noise","pixelate","blur","emboss","blendColor"]},zoom:{allowUserZoom:!0,fitImageToScreen:!0},crop:{replaceDefaultPresets:!1,hideCustomControls:!1,defaultRatio:"16:9",presets:[{ratio:"3:2",name:"3:2"},{ratio:"5:3",name:"5:3"},{ratio:"4:3",name:"4:3"},{ratio:"5:4",name:"5:4"},{ratio:"6:4",name:"6:4"},{ratio:"7:5",name:"7:5"},{ratio:"10:8",name:"10:8"},{ratio:"16:9",name:"16:9"}]},text:{defaultCategory:"handwriting",defaultText:"Double click to edit"},draw:{brushSizes:Au,brushTypes:["PencilBrush","VLineBrush","HLineBrush","CircleBrush","SquareBrush","SprayBrush"]},shapes:{replaceDefault:!1,items:[{name:"circle",type:"Circle"},{name:"rectangle",type:"Rect",options:{lockUniScaling:!1}},{name:"triangle",type:"Triangle"},{name:"ellipse",type:"Ellipse",options:{lockUniScaling:!1}},{name:"Arrow #1",type:"Path",options:{path:"M 294.9 16.4 l 15.7 42.2 c -171.4 70.3 -294 242.3 -289.1 437.4 l 14.7 -1 c 9.1 -0.6 18.1 -1.2 27.1 -1.9 l 14.7 -1 c -4.3 -170.1 102.5 -320 252 -381.3 l 15.7 42.2 c 34.7 -40.5 83.1 -76.6 144.8 -99.8 c -58.1 -26.2 -124.9 -39.6 -195.6 -36.8 z"}},{name:"Arrow #2",type:"Path",options:{path:"M 16 248.4 v 14.9 h 447.5 l -93.2 82.5 l 11.9 10.5 l 113.8 -100.2 l -113.6 -100.4 l -11.8 10.5 l 92.9 82.2 z"}},{name:"Arrow #3",type:"Path",options:{path:"M 496 256 l -118.6 -66 v 40.8 h -361.4 v 50.4 h 361.4 v 40.8 l 118.6 -66 z"}},{name:"Line",type:"Path",options:{path:"M 16 256 h 480",strokeWidth:10,stroke:"#000"}},{name:"Star",type:"Path",options:{path:"M 256 406.3 l 148.3 78 l -28.3 -165.2 l 120 -117 l -165.8 -24.1 l -74.2 -150.3 l -74.2 150.3 l -165.8 24.1 l 120 117 l -28.3 165.2 z"}},{name:"Polygon",type:"Path",options:{path:"M 256 19.6 l 156.6 57.1 l 83.4 144.3 l -28.9 164.2 l -127.7 107.2 h -166.8 l -127.7 -107.2 l -28.9 -164.2 l 83.4 -144.3 z"}},{name:"Badge",type:"Path",options:{path:"M 257.3 16.2 s -148 58.2 -204.4 81.4 c 0 75.7 -16.8 303.5 204.4 398.2 c 218.7 -94.6 201.9 -322.4 201.9 -398.2 c -62.1 -23.6 -201.9 -81.4 -201.9 -81.4 z"}}].slice()},stickers:{replaceDefault:!1,items:[{name:"emoticons",list:["afro-1","afro","agent","alien-1","alien","angel","angry-1","angry-2","angry-3","angry-4","angry-5","angry","arguing","arrogant","asian-1","asian","avatar","baby-1","baby-2","baby","bully","burglar","businessman","cheeky-1","cheeky","clown","confused-1","confused-2","confused-3","confused","creepy","crying-1","crying-2","crying-3","crying","dazed-1","dazed-2","dazed-3","dazed","dead-1","dead-2","dead-3","dead-4","dead-5","dead-6","dead","desperate-1","desperate","detective","dissapointment","doctor","drunk","dumb","emo-1","emo-2","emo","emoticon","evil","faint-1","faint","flirt-1","flirt-2","flirt","flirty","gangster","geek-1","geek","gentleman-1","gentleman-2","gentleman-3","gentleman-4","gentleman","ginger","girl-1","girl","goofy-1","goofy-2","goofy-3","goofy-4","goofy","grubby-1","grubby","happy-1","happy-10","happy-11","happy-12","happy-13","happy-14","happy-15","happy-16","happy-2","happy-3","happy-4","happy-5","happy-6","happy-7","happy-8","happy-9","happy","harry-potter","heisenberg","hipster-1","hipster-2","hipster","in-love-1","in-love-2","in-love-3","in-love-4","in-love-5","in-love-6","in-love","japan","jew","joyful-1","joyful-2","joyful","kiss-1","kiss-2","kiss-3","kiss-4","kiss","laughing-1","laughing-2","laughing-3","laughing","listening","love","manly","miserly-1","miserly","nerd-1","nerd-2","nerd-3","nerd-4","nerd","ninja","pirate-1","pirate-2","pirate","punk-1","punk-2","punk","rapper","relieved","rich-1","rich-2","rich","rockstar","sad-1","sad-2","sad-3","sad-4","sad-5","sad-6","sad","scared-1","scared-2","scared-3","scared","sceptic-1","sceptic-2","sceptic-3","sceptic-4","sceptic-5","sceptic-6","sceptic-7","sceptic","secret","shocked-1","shocked-2","shocked-3","shocked","sick-1","sick-2","sick-3","sick-4","sick","silent","skeleton","smile","smiling-1","smiling","smoked","smug-1","smug-2","smug-3","smug-4","smug-5","smug-6","smug","sporty","stunned","superhero-1","superhero-2","superhero-3","superhero-4","superhero","surprised-1","surprised","thinking","tired-1","tired-2","tired-3","tired","tough-1","tough","trendy","vampire-1","vampire","wink-1","wink-2","wink","winking-1","winking","yawning-1","yawning-2","yawning-3","yawning","yelling","zombie"],type:"svg",thumbnailUrl:"images/ui/emoticon.svg"},{name:"doodles",items:100,type:"svg",thumbnailUrl:"images/ui/doodles.svg"},{name:"landmarks",items:100,type:"svg",thumbnailUrl:"images/ui/landmark.svg"},{name:"stars",items:6,type:"png",darkBg:!0,thumbnailUrl:"images/ui/star.svg"},{name:"clouds",items:15,type:"png",darkBg:!0,thumbnailUrl:"images/ui/clouds.svg"},{name:"bubbles",items:104,type:"png",thumbnailUrl:"images/ui/speech-bubble.svg"},{name:"transportation",items:22,type:"svg",thumbnailUrl:"images/ui/transportation.svg"},{name:"beach",items:22,type:"svg",thumbnailUrl:"images/ui/beach.svg"}]},import:{validExtensions:["png","jpg","jpeg","svg","json","gif"],fitOverlayToScreen:!0,openDroppedImageAsBackground:!1},export:{defaultFormat:"png",defaultQuality:.8,defaultName:"image"},frame:{replaceDefault:!1,items:[{name:"basic",mode:"basic",size:{min:1,max:35,default:10}},{name:"pine",mode:"stretch",size:{min:1,max:35,default:15}},{name:"oak",mode:"stretch",size:{min:1,max:35,default:15}},{name:"rainbow",mode:"stretch",size:{min:1,max:35,default:15}},{name:"grunge1",display_name:"grunge #1",mode:"stretch",size:{min:1,max:35,default:15}},{name:"grunge2",display_name:"grunge #2",mode:"stretch",size:{min:1,max:35,default:20}},{name:"ebony",mode:"stretch",size:{min:1,max:35,default:15}},{name:"art1",display_name:"Art #1",mode:"repeat",size:{min:10,max:70,default:55}},{name:"art2",display_name:"Art #2",mode:"repeat",size:{min:10,max:70,default:55}}]}}},Lu=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor] Open",t}(),Nu=function(){var t=function t(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];_classCallCheck(this,t),this.executeCallback=e};return t.type="[Editor] Close",t}(),Bu=function(){var t=function t(e){_classCallCheck(this,t),this.panel=e};return t.type="[Editor] Open Panel",t}(),zu=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor] Close Fore Panel",t}(),Vu=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor] Reset Tool State",t}(),Hu=function(){var t=function t(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];_classCallCheck(this,t),this.panel=e,this.closePanel=n};return t.type="[Editor] Apply Changes",t}(),Wu=function(){var t=function t(e){_classCallCheck(this,t),this.panel=e};return t.type="[Editor] Cancel Changes",t}(),Uu=function(){var t=function t(e,n){_classCallCheck(this,t),this.objectType=e,this.fromUserAction=n};return t.type="[Editor] Object Selected",t}(),Yu=function(){var t=function t(e){_classCallCheck(this,t),this.fromUserAction=e};return t.type="[Editor] Object Deselected",t}(),Xu=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor] Objects Synced",t}(),Gu=function(){var t=function t(e){_classCallCheck(this,t),this.zoom=e};return t.type="[Editor] Set Zoom",t}(),qu=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t,i)).scheduler=t,r.work=i,r.pending=!1,r}return _createClass(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){_inherits(n,t);var e=_createSuper(n);function n(t,i){return _classCallCheck(this,n),e.call(this)}return _createClass(n,[{key:"schedule",value:function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this}}]),n}(f)),Ku=function(){var t=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.now;_classCallCheck(this,t),this.SchedulerAction=e,this.now=n}return _createClass(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}(),Zu=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ku.now;return _classCallCheck(this,n),(i=e.call(this,t,(function(){return n.delegate&&n.delegate!==_assertThisInitialized(i)?n.delegate.now():r()}))).actions=[],i.active=!1,i.scheduled=void 0,i}return _createClass(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):_get(_getPrototypeOf(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}(Ku),Qu=new Zu(qu),Ju=new b((function(t){return t.complete()}));function $u(t){return t?function(t){return new b((function(e){return t.schedule((function(){return e.complete()}))}))}(t):Ju}function th(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=e[e.length-1];return O(i)?(e.pop(),z(e,i)):X(e)}function eh(t,e){return new b(e?function(n){return e.schedule(nh,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function nh(t){var e=t.error;t.subscriber.error(e)}var ih,rh=((ih=function(){function t(e,n,i){_classCallCheck(this,t),this.kind=e,this.value=n,this.error=i,this.hasValue="N"===e}return _createClass(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 th(this.value);case"E":return eh(this.error);case"C":return $u()}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}()).completeNotification=new ih("C"),ih.undefinedValueNotification=new ih("N",void 0),ih);function oh(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qu,i=(e=t)instanceof Date&&!isNaN(+e)?+t-n.now():Math.abs(t);return function(t){return t.lift(new ah(i,n))}}var ah=function(){function t(e,n){_classCallCheck(this,t),this.delay=e,this.scheduler=n}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new sh(t,this.delay,this.scheduler))}}]),t}(),sh=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this,t)).delay=i,o.scheduler=r,o.queue=[],o.active=!1,o.errored=!1,o}return _createClass(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 lh(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}}},{key:"_next",value:function(t){this.scheduleNotification(rh.createNext(t))}},{key:"_error",value:function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleNotification(rh.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}(v),lh=function t(e,n){_classCallCheck(this,t),this.time=e,this.notification=n};function ch(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=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 uh(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function hh(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{l(i.next(t))}catch(e){o(e)}}function s(t){try{l(i.throw(t))}catch(e){o(e)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))}var fh=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t,i)).scheduler=t,r.work=i,r}return _createClass(n,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e>0?_get(_getPrototypeOf(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?_get(_getPrototypeOf(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?_get(_getPrototypeOf(n.prototype),"requestAsyncId",this).call(this,t,e,i):t.flush(this)}}]),n}(qu),dh=new(function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(Zu))(fh),ph=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return _classCallCheck(this,n),(r=e.call(this,t)).scheduler=i,r.delay=o,r}return _createClass(n,[{key:"scheduleMessage",value:function(t){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new vh(t,this.destination)))}},{key:"_next",value:function(t){this.scheduleMessage(rh.createNext(t))}},{key:"_error",value:function(t){this.scheduleMessage(rh.createError(t)),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleMessage(rh.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()}}]),n}(v),vh=function t(e,n){_classCallCheck(this,t),this.notification=e,this.destination=n},gh=function(t){_inherits(n,t);var e=_createSuper(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 _classCallCheck(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 _createClass(n,[{key:"nextInfiniteTimeWindow",value:function(t){var e=this._events;e.push(t),e.length>this._bufferSize&&e.shift(),_get(_getPrototypeOf(n.prototype),"next",this).call(this,t)}},{key:"nextTimeWindow",value:function(t){this._events.push(new mh(this._getNow(),t)),this._trimBufferThenGetEvents(),_get(_getPrototypeOf(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 w;if(this.isStopped||this.hasError?e=f.EMPTY:(this.observers.push(t),e=new x(this,t)),r&&t.add(t=new ph(t,r)),n)for(var a=0;a<o&&!t.closed;a++)t.next(i[a]);else for(var s=0;s<o&&!t.closed;s++)t.next(i[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e}},{key:"_getNow",value:function(){return(this.scheduler||dh).now()}},{key:"_trimBufferThenGetEvents",value:function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,i=this._events,r=i.length,o=0;o<r&&!(t-i[o].time<n);)o++;return r>e&&(o=Math.max(o,r-e)),o>0&&i.splice(0,o),i}}]),n}(E),mh=function t(e,n){_classCallCheck(this,t),this.time=e,this.value=n};function yh(t,e){return t===e}function _h(t,e,n){if(null===e||null===n||e.length!==n.length)return!1;for(var i=e.length,r=0;r<i;r++)if(!t(e[r],n[r]))return!1;return!0}function bh(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yh,n=null,i=null;function r(){return _h(e,n,arguments)||(i=t.apply(null,arguments)),n=arguments,i}return r.reset=function(){n=null,i=null},r}var kh,Ch=bh((function(){var t=bu();if(!t)return!1;var e=t.injector.get(nu,null);return!!e&&e.some((function(t){return(t&&t.providers||[]).some((function(t){return t&&t.provide&&"MockNgModuleResolver"===t.provide.name||!1}))}))})),wh=((kh=function(){function t(){_classCallCheck(this,t),this.bootstrap$=new gh(1)}return _createClass(t,[{key:"bootstrap",value:function(){this.bootstrap$.next(!0),this.bootstrap$.complete()}},{key:"appBootstrapped$",get:function(){return this.bootstrap$.asObservable()}}]),t}()).\u0275fac=function(t){return new(t||kh)},kh.\u0275prov=ft({token:kh,factory:kh.\u0275fac}),kh),xh=new Vt("INITIAL_STATE_TOKEN"),Sh=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"set",value:function(t){this.value=t}},{key:"pop",value:function(){var t=this.value;return this.value={},t}}]),t}();return t.value={},t}(),Eh=new Vt("Internals.StateContextFactory"),Th=new Vt("Internals.StateFactory"),Oh=null;function Ah(){return Oh}var Ih,Ph=new Vt("DocumentToken"),Dh=((Ih=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||Ih)},Ih.\u0275prov=ft({factory:Rh,token:Ih,providedIn:"platform"}),Ih);function Rh(){return Zt(Mh)}var Fh,Mh=((Fh=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this))._doc=t,i._init(),i}return _createClass(n,[{key:"_init",value:function(){this.location=Ah().getLocation(),this._history=Ah().getHistory()}},{key:"getBaseHrefFromDOM",value:function(){return Ah().getBaseHref(this._doc)}},{key:"onPopState",value:function(t){Ah().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}},{key:"onHashChange",value:function(t){Ah().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}},{key:"pushState",value:function(t,e,n){jh()?this._history.pushState(t,e,n):this.location.hash=n}},{key:"replaceState",value:function(t,e,n){jh()?this._history.replaceState(t,e,n):this.location.hash=n}},{key:"forward",value:function(){this._history.forward()}},{key:"back",value:function(){this._history.back()}},{key:"getState",value:function(){return this._history.state}},{key:"href",get:function(){return this.location.href}},{key:"protocol",get:function(){return this.location.protocol}},{key:"hostname",get:function(){return this.location.hostname}},{key:"port",get:function(){return this.location.port}},{key:"pathname",get:function(){return this.location.pathname},set:function(t){this.location.pathname=t}},{key:"search",get:function(){return this.location.search}},{key:"hash",get:function(){return this.location.hash}}]),n}(Dh)).\u0275fac=function(t){return new(t||Fh)(Zt(Ph))},Fh.\u0275prov=ft({factory:Lh,token:Fh,providedIn:"platform"}),Fh);function jh(){return!!window.history.pushState}function Lh(){return new Mh(Zt(Ph))}function Nh(t,e){if(0==t.length)return e;if(0==e.length)return t;var n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function Bh(t){var e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function zh(t){return t&&"?"!==t[0]?"?"+t:t}var Vh,Hh=((Vh=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||Vh)},Vh.\u0275prov=ft({factory:Wh,token:Vh,providedIn:"root"}),Vh);function Wh(t){var e=Zt(Ph).location;return new Gh(Zt(Dh),e&&e.origin||"")}var Uh,Yh,Xh=new Vt("appBaseHref"),Gh=((Yh=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;if(_classCallCheck(this,n),(r=e.call(this))._platformLocation=t,null==i&&(i=r._platformLocation.getBaseHrefFromDOM()),null==i)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=i,_possibleConstructorReturn(r)}return _createClass(n,[{key:"onPopState",value:function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"prepareExternalUrl",value:function(t){return Nh(this._baseHref,t)}},{key:"path",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._platformLocation.pathname+zh(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+zh(i));this._platformLocation.pushState(t,e,r)}},{key:"replaceState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+zh(i));this._platformLocation.replaceState(t,e,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(Hh)).\u0275fac=function(t){return new(t||Yh)(Zt(Dh),Zt(Xh,8))},Yh.\u0275prov=ft({token:Yh,factory:Yh.\u0275fac}),Yh),qh=((Uh=function(){function t(e,n){var i=this;_classCallCheck(this,t),this._subject=new pc,this._urlChangeListeners=[],this._platformStrategy=e;var r=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=Bh(Zh(r)),this._platformStrategy.onPopState((function(t){i._subject.emit({url:i.path(!0),pop:!0,state:t.state,type:t.type})}))}return _createClass(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+zh(e))}},{key:"normalize",value:function(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,Zh(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+zh(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+zh(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.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}()).\u0275fac=function(t){return new(t||Uh)(Zt(Hh),Zt(Dh))},Uh.normalizeQueryParams=zh,Uh.joinWithSlash=Nh,Uh.stripTrailingSlash=Bh,Uh.\u0275prov=ft({factory:Kh,token:Uh,providedIn:"root"}),Uh);function Kh(){return new qh(Zt(Hh),Zt(Dh))}function Zh(t){return t.replace(/\/index.html$/,"")}var Qh,Jh=function(){var t={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return t[t.Zero]="Zero",t[t.One]="One",t[t.Two]="Two",t[t.Few]="Few",t[t.Many]="Many",t[t.Other]="Other",t}(),$h=function t(){_classCallCheck(this,t)},tf=((Qh=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this)).locale=t,i}return _createClass(n,[{key:"getPluralCategory",value:function(t,e){switch(function(t){return function(t){var e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t),n=rc(e);if(n)return n;var i=e.split("-")[0];if(n=rc(i))return n;if("en"===i)return nc;throw new Error('Missing locale data for the locale "'.concat(t,'".'))}(t)[oc.PluralCase]}(e||this.locale)(t)){case Jh.Zero:return"zero";case Jh.One:return"one";case Jh.Two:return"two";case Jh.Few:return"few";case Jh.Many:return"many";default:return"other"}}}]),n}($h)).\u0275fac=function(t){return new(t||Qh)(Zt(Xc))},Qh.\u0275prov=ft({token:Qh,factory:Qh.\u0275fac}),Qh);function ef(t,e){e=encodeURIComponent(e);var n,i=_createForOfIteratorHelper(t.split(";"));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=r.indexOf("="),a=_slicedToArray(-1==o?[r,""]:[r.slice(0,o),r.slice(o+1)],2),s=a[0],l=a[1];if(s.trim()===e)return decodeURIComponent(l)}}catch(c){i.e(c)}finally{i.f()}return null}var nf,rf,of,af=((nf=function(){function t(e,n,i,r){_classCallCheck(this,t),this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=i,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return _createClass(t,[{key:"ngDoCheck",value:function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}},{key:"_applyKeyValueChanges",value:function(t){var e=this;t.forEachAddedItem((function(t){return e._toggleClass(t.key,t.currentValue)})),t.forEachChangedItem((function(t){return e._toggleClass(t.key,t.currentValue)})),t.forEachRemovedItem((function(t){t.previousValue&&e._toggleClass(t.key,!1)}))}},{key:"_applyIterableChanges",value:function(t){var e=this;t.forEachAddedItem((function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got ".concat(Ct(t.item)));e._toggleClass(t.item,!0)})),t.forEachRemovedItem((function(t){return e._toggleClass(t.item,!1)}))}},{key:"_applyClasses",value:function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach((function(t){return e._toggleClass(t,!0)})):Object.keys(t).forEach((function(n){return e._toggleClass(n,!!t[n])})))}},{key:"_removeClasses",value:function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach((function(t){return e._toggleClass(t,!1)})):Object.keys(t).forEach((function(t){return e._toggleClass(t,!1)})))}},{key:"_toggleClass",value:function(t,e){var n=this;(t=t.trim())&&t.split(/\s+/g).forEach((function(t){e?n._renderer.addClass(n._ngEl.nativeElement,t):n._renderer.removeClass(n._ngEl.nativeElement,t)}))}},{key:"klass",set:function(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}},{key:"ngClass",set:function(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(Ka(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}}]),t}()).\u0275fac=function(t){return new(t||nf)(rs(zl),rs(Vl),rs(kl),rs(Sl))},nf.\u0275dir=be({type:nf,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),nf),sf=function(){function t(e,n,i,r){_classCallCheck(this,t),this.$implicit=e,this.ngForOf=n,this.index=i,this.count=r}return _createClass(t,[{key:"first",get:function(){return 0===this.index}},{key:"last",get:function(){return this.index===this.count-1}},{key:"even",get:function(){return this.index%2==0}},{key:"odd",get:function(){return!this.even}}]),t}(),lf=((rf=function(){function t(e,n,i){_classCallCheck(this,t),this._viewContainer=e,this._template=n,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return _createClass(t,[{key:"ngDoCheck",value:function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(i){throw new Error("Cannot find a differ supporting object '".concat(t,"' of type '").concat((e=t).name||typeof e,"'. NgFor only supports binding to Iterables such as Arrays."))}}var e;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}},{key:"_applyChanges",value:function(t){var e=this,n=[];t.forEachOperation((function(t,i,r){if(null==t.previousIndex){var o=e._viewContainer.createEmbeddedView(e._template,new sf(null,e._ngForOf,-1,-1),null===r?void 0:r),a=new cf(t,o);n.push(a)}else if(null==r)e._viewContainer.remove(null===i?void 0:i);else if(null!==i){var s=e._viewContainer.get(i);e._viewContainer.move(s,r);var l=new cf(t,s);n.push(l)}}));for(var i=0;i<n.length;i++)this._perViewChange(n[i].view,n[i].record);for(var r=0,o=this._viewContainer.length;r<o;r++){var a=this._viewContainer.get(r);a.context.index=r,a.context.count=o,a.context.ngForOf=this._ngForOf}t.forEachIdentityChange((function(t){e._viewContainer.get(t.currentIndex).context.$implicit=t.item}))}},{key:"_perViewChange",value:function(t,e){t.context.$implicit=e.item}},{key:"ngForOf",set:function(t){this._ngForOf=t,this._ngForOfDirty=!0}},{key:"ngForTrackBy",set:function(t){Ei()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn("trackBy must be a function, but received ".concat(JSON.stringify(t),". ")+"See https://angular.io/api/common/NgForOf#change-propagation for more information."),this._trackByFn=t},get:function(){return this._trackByFn}},{key:"ngForTemplate",set:function(t){t&&(this._template=t)}}],[{key:"ngTemplateContextGuard",value:function(t,e){return!0}}]),t}()).\u0275fac=function(t){return new(t||rf)(rs(Gl),rs(Yl),rs(zl))},rf.\u0275dir=be({type:rf,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),rf),cf=function t(e,n){_classCallCheck(this,t),this.record=e,this.view=n},uf=((of=function(){function t(e,n){_classCallCheck(this,t),this._viewContainer=e,this._context=new hf,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}return _createClass(t,[{key:"_updateView",value:function(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}},{key:"ngIf",set:function(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}},{key:"ngIfThen",set:function(t){ff("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}},{key:"ngIfElse",set:function(t){ff("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}}],[{key:"ngTemplateContextGuard",value:function(t,e){return!0}}]),t}()).\u0275fac=function(t){return new(t||of)(rs(Gl),rs(Yl))},of.\u0275dir=be({type:of,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),of),hf=function t(){_classCallCheck(this,t),this.$implicit=null,this.ngIf=null};function ff(t,e){if(e&&!e.createEmbeddedView)throw new Error("".concat(t," must be a TemplateRef, but received '").concat(Ct(e),"'."))}var df,pf,vf,gf,mf,yf,_f=function(){function t(e,n){_classCallCheck(this,t),this._viewContainerRef=e,this._templateRef=n,this._created=!1}return _createClass(t,[{key:"create",value:function(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}},{key:"destroy",value:function(){this._created=!1,this._viewContainerRef.clear()}},{key:"enforceState",value:function(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}]),t}(),bf=((gf=function(){function t(){_classCallCheck(this,t),this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}return _createClass(t,[{key:"_addCase",value:function(){return this._caseCount++}},{key:"_addDefault",value:function(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)}},{key:"_matchCase",value:function(t){var e=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||e,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),e}},{key:"_updateDefaultCases",value:function(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(var e=0;e<this._defaultViews.length;e++)this._defaultViews[e].enforceState(t)}}},{key:"ngSwitch",set:function(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}}]),t}()).\u0275fac=function(t){return new(t||gf)},gf.\u0275dir=be({type:gf,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}}),gf),kf=((vf=function(){function t(e,n,i){_classCallCheck(this,t),this.ngSwitch=i,i._addCase(),this._view=new _f(e,n)}return _createClass(t,[{key:"ngDoCheck",value:function(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}]),t}()).\u0275fac=function(t){return new(t||vf)(rs(Gl),rs(Yl),rs(bf,1))},vf.\u0275dir=be({type:vf,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),vf),Cf=((pf=function t(e,n,i){_classCallCheck(this,t),i._addDefault(new _f(e,n))}).\u0275fac=function(t){return new(t||pf)(rs(Gl),rs(Yl),rs(bf,1))},pf.\u0275dir=be({type:pf,selectors:[["","ngSwitchDefault",""]]}),pf),wf=((df=function(){function t(e,n,i){_classCallCheck(this,t),this._ngEl=e,this._differs=n,this._renderer=i,this._ngStyle=null,this._differ=null}return _createClass(t,[{key:"ngDoCheck",value:function(){if(this._differ){var t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}},{key:"_setStyle",value:function(t,e){var n=_slicedToArray(t.split("."),2),i=n[0],r=n[1];null!=(e=null!=e&&r?"".concat(e).concat(r):e)?this._renderer.setStyle(this._ngEl.nativeElement,i,e):this._renderer.removeStyle(this._ngEl.nativeElement,i)}},{key:"_applyChanges",value:function(t){var e=this;t.forEachRemovedItem((function(t){return e._setStyle(t.key,null)})),t.forEachAddedItem((function(t){return e._setStyle(t.key,t.currentValue)})),t.forEachChangedItem((function(t){return e._setStyle(t.key,t.currentValue)}))}},{key:"ngStyle",set:function(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}}]),t}()).\u0275fac=function(t){return new(t||df)(rs(kl),rs(Vl),rs(Sl))},df.\u0275dir=be({type:df,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),df),xf=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"createSubscription",value:function(t,e){return t.subscribe({next:e,error:function(t){throw t}})}},{key:"dispose",value:function(t){t.unsubscribe()}},{key:"onDestroy",value:function(t){t.unsubscribe()}}]),t}(),Sf=new(function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"createSubscription",value:function(t,e){return t.then(e,(function(t){throw t}))}},{key:"dispose",value:function(t){}},{key:"onDestroy",value:function(t){}}]),t}()),Ef=new xf,Tf=((yf=function(){function t(e){_classCallCheck(this,t),this._ref=e,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null}return _createClass(t,[{key:"ngOnDestroy",value:function(){this._subscription&&this._dispose()}},{key:"transform",value:function(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):Ga(this._latestValue,this._latestReturnedValue)?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,qa.wrap(this._latestValue)):(t&&this._subscribe(t),this._latestReturnedValue=this._latestValue,this._latestValue)}},{key:"_subscribe",value:function(t){var e=this;this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,(function(n){return e._updateLatestValue(t,n)}))}},{key:"_selectStrategy",value:function(e){if(ps(e))return Sf;if(vs(e))return Ef;throw Error("InvalidPipeArgument: '".concat(e,"' for pipe '").concat(Ct(t),"'"))}},{key:"_dispose",value:function(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null}},{key:"_updateLatestValue",value:function(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())}}]),t}()).\u0275fac=function(t){return new(t||yf)(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ct.Default,e=Ko(!0);if(null!=e||t&ct.Optional)return e;throw new Error("No provider for ChangeDetectorRef!")}())},yf.\u0275pipe=ke({name:"async",type:yf,pure:!1}),yf),Of=((mf=function(){function t(e){_classCallCheck(this,t),this.differs=e,this.keyValues=[]}return _createClass(t,[{key:"transform",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Af;if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());var i=this.differ.diff(t);return i&&(this.keyValues=[],i.forEachItem((function(t){e.keyValues.push({key:t.key,value:t.currentValue})})),this.keyValues.sort(n)),this.keyValues}}]),t}()).\u0275fac=function(t){return new(t||mf)(rs(Vl))},mf.\u0275pipe=ke({name:"keyvalue",type:mf,pure:!1}),mf);function Af(t,e){var n=t.key,i=e.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n<i?-1:1;if("number"==typeof n&&"number"==typeof i)return n-i;if("boolean"==typeof n&&"boolean"==typeof i)return n<i?-1:1;var r=String(n),o=String(i);return r==o?0:r<o?-1:1}var If,Pf=((If=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:If}),If.\u0275inj=dt({factory:function(t){return new(t||If)},providers:[{provide:$h,useClass:tf}]}),If),Df=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this))._value=t,i}return _createClass(n,[{key:"_subscribe",value:function(t){var e=_get(_getPrototypeOf(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 w;return this._value}},{key:"next",value:function(t){_get(_getPrototypeOf(n.prototype),"next",this).call(this,this._value=t)}},{key:"value",get:function(){return this.getValue()}}]),n}(E);function Rf(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(1===e.length){var i=e[0];if(l(i))return Ff(i,null);if(c(i)&&Object.getPrototypeOf(i)===Object.prototype){var r=Object.keys(i);return Ff(r.map((function(t){return i[t]})),r)}}if("function"==typeof e[e.length-1]){var o=e.pop();return Ff(e=1===e.length&&l(e[0])?e[0]:e,null).pipe(L((function(t){return o.apply(void 0,_toConsumableArray2(t))})))}return Ff(e,null)}function Ff(t,e){return new b((function(n){var i=t.length;if(0!==i)for(var r=new Array(i),o=0,a=0,s=function(s){var l=V(t[s]),c=!1;n.add(l.subscribe({next:function(t){c||(c=!0,a++),r[s]=t},error:function(t){return n.error(t)},complete:function(){++o!==i&&c||(a===i&&n.next(e?e.reduce((function(t,e,n){return t[e]=r[n],t}),{}):r),n.complete())}}))},l=0;l<i;l++)s(l);else n.complete()}))}function Mf(t,e){return function(n){return n.lift(new jf(t,e))}}var jf=function(){function t(e,n){_classCallCheck(this,t),this.predicate=e,this.thisArg=n}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new Lf(t,this.predicate,this.thisArg))}}]),t}(),Lf=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this,t)).predicate=i,o.thisArg=r,o.count=0,o}return _createClass(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}(v);function Nf(t,e,n){var i;return i=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,i=t.bufferSize,r=void 0===i?Number.POSITIVE_INFINITY:i,o=t.windowTime,a=void 0===o?Number.POSITIVE_INFINITY:o,s=t.refCount,l=t.scheduler,c=0,u=!1,h=!1;return function(t){c++,e&&!u||(u=!1,e=new gh(r,a,l),n=t.subscribe({next:function(t){e.next(t)},error:function(t){u=!0,e.error(t)},complete:function(){h=!0,n=void 0,e.complete()}}));var i=e.subscribe(this);this.add((function(){c--,i.unsubscribe(),n&&!h&&s&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(i))}}var Bf=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}();function zf(t){return function(e){return 0===t?$u():e.lift(new Vf(t))}}var Vf=function(){function t(e){if(_classCallCheck(this,t),this.total=e,this.total<0)throw new Bf}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new Hf(t,this.total))}}]),t}(),Hf=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t)).total=i,r.count=0,r}return _createClass(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}(v),Wf=function(){function t(e){_classCallCheck(this,t),this.project=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new Uf(t,this.project))}}]),t}(),Uf=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t)).project=i,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return _createClass(n,[{key:"_next",value:function(t){this.hasSubscription||this.tryNext(t)}},{key:"tryNext",value:function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this.hasSubscription=!0,this._innerSub(e,t,n)}},{key:"_innerSub",value:function(t,e,n){var i=new A(this,e,n),r=this.destination;r.add(i);var o=M(this,t,void 0,void 0,i);o!==i&&r.add(o)}},{key:"_complete",value:function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()}},{key:"notifyNext",value:function(t,e,n,i,r){this.destination.next(e)}},{key:"notifyError",value:function(t){this.destination.error(t)}},{key:"notifyComplete",value:function(t){this.destination.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()}}]),n}(j),Yf=function(){function t(e){_classCallCheck(this,t),this.defaultValue=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new Xf(t,this.defaultValue))}}]),t}(),Xf=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t)).defaultValue=i,r.isEmpty=!0,r}return _createClass(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}(v);function Gf(t){return function(e){var n=new qf(t),i=e.lift(n);return n.caught=i}}var qf=function(){function t(e){_classCallCheck(this,t),this.selector=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new Kf(t,this.selector,this.caught))}}]),t}(),Kf=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this,t)).selector=i,o.caught=r,o}return _createClass(n,[{key:"error",value:function(t){if(!this.isStopped){var e;try{e=this.selector(t,this.caught)}catch(o){return void _get(_getPrototypeOf(n.prototype),"error",this).call(this,o)}this._unsubscribeAndRecycle();var i=new A(this,void 0,void 0);this.add(i);var r=M(this,e,void 0,void 0,i);r!==i&&this.add(r)}}}]),n}(j);function Zf(t){return function(e){return e.lift(new Qf(t))}}var Qf=function(){function t(e){_classCallCheck(this,t),this.notifier=e}return _createClass(t,[{key:"call",value:function(t,e){var n=new Jf(t),i=M(n,this.notifier);return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n}}]),t}(),Jf=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this,t)).seenValue=!1,i}return _createClass(n,[{key:"notifyNext",value:function(t,e,n,i,r){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(j);function $f(){}function td(t,e,n){return function(i){return i.lift(new ed(t,e,n))}}var ed=function(){function t(e,n,i){_classCallCheck(this,t),this.nextOrObserver=e,this.error=n,this.complete=i}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new nd(t,this.nextOrObserver,this.error,this.complete))}}]),t}(),nd=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,r,o,a){var s;return _classCallCheck(this,n),(s=e.call(this,t))._tapNext=$f,s._tapError=$f,s._tapComplete=$f,s._tapError=o||$f,s._tapComplete=a||$f,i(r)?(s._context=_assertThisInitialized(s),s._tapNext=r):r&&(s._context=r,s._tapNext=r.next||$f,s._tapError=r.error||$f,s._tapComplete=r.complete||$f),s}return _createClass(n,[{key:"_next",value:function(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}},{key:"_error",value:function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}},{key:"_complete",value:function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}]),n}(v);function id(t,e){return function(n){return n.lift(new ad(t,e))}}var rd,od,ad=function(){function t(e,n){_classCallCheck(this,t),this.compare=e,this.keySelector=n}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new sd(t,this.compare,this.keySelector))}}]),t}(),sd=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this,t)).keySelector=r,o.hasKey=!1,"function"==typeof i&&(o.compare=i),o}return _createClass(n,[{key:"compare",value:function(t,e){return t===e}},{key:"_next",value:function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(r){return this.destination.error(r)}var i=!1;if(this.hasKey)try{i=(0,this.compare)(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))}}]),n}(v),ld=((rd=function(){function t(e,n){_classCallCheck(this,t),this._ngZone=e,this._platformId=n,this.verifyZoneIsNotNooped(this._ngZone)}return _createClass(t,[{key:"enter",value:function(t){return"server"===this._platformId?this.runInsideAngular(t):this.runOutsideAngular(t)}},{key:"leave",value:function(t){return this.runInsideAngular(t)}},{key:"runInsideAngular",value:function(t){return ou.isInAngularZone()?t():this._ngZone.run(t)}},{key:"runOutsideAngular",value:function(t){return ou.isInAngularZone()?this._ngZone.runOutsideAngular(t):t()}},{key:"verifyZoneIsNotNooped",value:function(t){t instanceof ou||console.warn("Your application was bootstrapped with nooped zone and your execution strategy requires an actual NgZone!\nPlease set the value of the executionStrategy property to NoopNgxsExecutionStrategy.\nNgxsModule.forRoot(states, { executionStrategy: NoopNgxsExecutionStrategy })")}}]),t}()).\u0275fac=function(t){return new(t||rd)(Zt(ou),Zt(Wc))},rd.\u0275prov=ft({token:rd,factory:rd.\u0275fac}),rd),cd=new Vt("ROOT_STATE_TOKEN"),ud=new Vt("FEATURE_STATE_TOKEN"),hd=new Vt("NGXS_PLUGINS"),fd=new Vt("NG_TEST_MODE"),dd=new Vt("NG_DEV_MODE"),pd="NGXS_META",vd=((od=function t(){_classCallCheck(this,t),this.defaultsState={},this.selectorOptions={injectContainerState:!0,suppressErrors:!0},this.compatibility={strictContentSecurityPolicy:!1},this.executionStrategy=ld}).\u0275prov=ft({token:od,factory:od.\u0275fac=function(t){return new(t||od)}}),od),gd=function t(e,n,i){_classCallCheck(this,t),this.previousValue=e,this.currentValue=n,this.firstChange=i},md=new Vt("NGXS_EXECUTION_STRATEGY");function yd(t){return t.constructor&&t.constructor.type?t.constructor.type:t.type}var _d=function(t,e,n){t=Object.assign({},t);var i=e.split("."),r=i.length-1;return i.reduce((function(t,e,i){return t[e]=i===r?n:Array.isArray(t[e])?t[e].slice():Object.assign({},t[e]),t&&t[e]}),t),t},bd=function(t,e){return e.split(".").reduce((function(t,e){return t&&t[e]}),t)};function kd(t){if(!t.hasOwnProperty(pd)){var e={name:null,actions:{},defaults:{},path:null,makeRootSelector:function(t){return t.getStateGetter(e.name)},children:[]};Object.defineProperty(t,pd,{value:e})}return Cd(t)}function Cd(t){return t[pd]}function wd(t){return t.NGXS_SELECTOR_META}function xd(t,e){return e&&e.compatibility&&e.compatibility.strictContentSecurityPolicy?function(t){var e=t.slice();return function(t){return e.reduce((function(t,e){return t&&t[e]}),t)}}(t):function(t){for(var e=t,n="store."+e[0],i=0,r=e.length,o=n;++i<r;)o=o+" && "+(n=n+"."+e[i]);return new Function("store","return "+o+";")}(t)}function Sd(t,e){var n=bd(e.currentAppState,t.path),i=bd(e.newAppState,t.path);return new gd(n,i,!t.isInitialised)}function Ed(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Od(e,["DISPATCHED"])}function Td(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Od(e,["SUCCESSFUL"])}function Od(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ad,i=t.reduce((function(t,e){return t[yd(e)]=!0,t}),{}),r=e&&function(t){return t.reduce((function(t,e){return t[e]=!0,t}),{})}(e);return function(t){return t.pipe(function(t,e){return Mf((function(n){var i=yd(n.action);return t[i]&&(!e||e[n.status])}))}(i,r),n())}}function Ad(){return L((function(t){return t.action}))}function Id(t){return function(e){return new b((function(n){return e.subscribe({next:function(e){t.leave((function(){return n.next(e)}))},error:function(e){t.leave((function(){return n.error(e)}))},complete:function(){t.leave((function(){return n.complete()}))}})}))}}var Pd,Dd,Rd,Fd,Md,jd,Ld,Nd,Bd,zd,Vd,Hd,Wd,Ud=((Pd=function(){function t(e){_classCallCheck(this,t),this._executionStrategy=e}return _createClass(t,[{key:"enter",value:function(t){return this._executionStrategy.enter(t)}},{key:"leave",value:function(t){return this._executionStrategy.leave(t)}}]),t}()).\u0275fac=function(t){return new(t||Pd)(Zt(md))},Pd.\u0275prov=ft({token:Pd,factory:Pd.\u0275fac}),Pd),Yd=((Dd=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._itemQueue=[],t._busyPushingNext=!1,t}return _createClass(n,[{key:"next",value:function(t){if(this._busyPushingNext)this._itemQueue.unshift(t);else{for(this._busyPushingNext=!0,_get(_getPrototypeOf(n.prototype),"next",this).call(this,t);this._itemQueue.length>0;){var e=this._itemQueue.pop();_get(_getPrototypeOf(n.prototype),"next",this).call(this,e)}this._busyPushingNext=!1}}}]),n}(E))).\u0275fac=function(t){return Xd(t||Dd)},Dd.\u0275prov=ft({token:Dd,factory:Dd.\u0275fac}),Dd),Xd=ui(Yd),Gd=((Rd=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){return _classCallCheck(this,n),e.call(this,(function(e){var n=t.pipe(Id(i)).subscribe({next:function(t){return e.next(t)},error:function(t){return e.error(t)},complete:function(){return e.complete()}});e.add(n)}))}return n}(b)).\u0275fac=function(t){return new(t||Rd)(Zt(Yd),Zt(Ud))},Rd.\u0275prov=ft({token:Rd,factory:Rd.\u0275fac}),Rd),qd=((jd=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.call(this,{})}return n}(Df)).\u0275fac=function(t){return new(t||jd)},jd.\u0275prov=ft({token:jd,factory:jd.\u0275fac}),jd),Kd=((Md=function(){function t(e,n){_classCallCheck(this,t),this._parentManager=e,this._pluginHandlers=n,this.plugins=[],this.registerHandlers()}return _createClass(t,[{key:"registerHandlers",value:function(){var t,e=this.getPluginHandlers();(t=this.rootPlugins).push.apply(t,_toConsumableArray2(e))}},{key:"getPluginHandlers",value:function(){return(this._pluginHandlers||[]).map((function(t){return t.handle?t.handle.bind(t):t}))}},{key:"rootPlugins",get:function(){return this._parentManager&&this._parentManager.plugins||this.plugins}}]),t}()).\u0275fac=function(t){return new(t||Md)(Zt(Md,12),Zt(hd,8))},Md.\u0275prov=ft({token:Md,factory:Md.\u0275fac}),Md),Zd=((Fd=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(E)).\u0275fac=function(t){return Qd(t||Fd)},Fd.\u0275prov=ft({token:Fd,factory:Fd.\u0275fac}),Fd),Qd=ui(Zd),Jd=((Ld=function(){function t(e,n,i,r,o,a){_classCallCheck(this,t),this._errorHandler=e,this._actions=n,this._actionResults=i,this._pluginManager=r,this._stateStream=o,this._ngxsExecutionStrategy=a}return _createClass(t,[{key:"dispatch",value:function(t){var e=this,n=this._ngxsExecutionStrategy.enter((function(){return e.dispatchByEvents(t)}));return n.subscribe({error:function(t){return e._ngxsExecutionStrategy.leave((function(){try{e._errorHandler.handleError(t)}catch(n){}}))}}),n.pipe(Id(this._ngxsExecutionStrategy))}},{key:"dispatchByEvents",value:function(t){var e=this;return Array.isArray(t)?0===t.length?th(this._stateStream.getValue()):Rf(t.map((function(t){return e.dispatchSingle(t)}))):this.dispatchSingle(t)}},{key:"dispatchSingle",value:function(t){var e=this,n=this._stateStream.getValue();return function t(e){return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.shift().apply(void 0,i.concat([function(){return t(e).apply(void 0,arguments)}]))}}([].concat(_toConsumableArray2(this._pluginManager.plugins),[function(t,i){t!==n&&e._stateStream.next(t);var r=e.getActionResultStream(i);return r.subscribe((function(t){return e._actions.next(t)})),e._actions.next({action:i,status:"DISPATCHED"}),e.createDispatchObservable(r)}]))(n,t).pipe(Nf())}},{key:"getActionResultStream",value:function(t){return this._actionResults.pipe(Mf((function(e){return e.action===t&&"DISPATCHED"!==e.status})),zf(1),Nf())}},{key:"createDispatchObservable",value:function(t){var e=this;return t.pipe(function t(e,n){return n?function(i){return i.pipe(t((function(t,i){return V(e(t,i)).pipe(L((function(e,r){return n(t,e,i,r)})))})))}:function(t){return t.lift(new Wf(e))}}((function(t){switch(t.status){case"SUCCESSFUL":return th(e._stateStream.getValue());case"ERRORED":return eh(t.error);default:return Ju}}))).pipe(Nf())}}]),t}()).\u0275fac=function(t){return new(t||Ld)(Zt(pi),Zt(Yd),Zt(Zd),Zt(Kd),Zt(qd),Zt(Ud))},Ld.\u0275prov=ft({token:Ld,factory:Ld.\u0275fac}),Ld),$d=((Wd=function t(e,n){_classCallCheck(this,t),this.isDevMode=e,this.isTestMode=n}).\u0275prov=ft({token:Wd,factory:Wd.\u0275fac=function(t){return new(t||Wd)(Zt(dd),Zt(fd))}}),Wd),tp=((Hd=function(){function t(e,n){_classCallCheck(this,t),this._host=e,this._config=n}return _createClass(t,[{key:"verifyDevMode",value:function(){this._host.isTestMode()||(this.isIncorrectProduction?console.warn("Angular is running in production mode but NGXS is still running in the development mode!\nPlease set developmentMode to false on the NgxsModule options when in production mode.\nNgxsModule.forRoot(states, { developmentMode: !environment.production })"):this.isIncorrectDevelopment&&console.warn("RECOMMENDATION: Set developmentMode to true on the NgxsModule when Angular is running in development mode.\nNgxsModule.forRoot(states, { developmentMode: !environment.production })"))}},{key:"isIncorrectProduction",get:function(){return!this._host.isDevMode()&&this._config.developmentMode}},{key:"isIncorrectDevelopment",get:function(){return this._host.isDevMode()&&!this._config.developmentMode}}]),t}()).\u0275fac=function(t){return new(t||Hd)(Zt($d),Zt(vd))},Hd.\u0275prov=ft({token:Hd,factory:Hd.\u0275fac}),Hd),ep=((Vd=function(){function t(e,n,i,r){_classCallCheck(this,t),this._stateStream=e,this._dispatcher=n,this._config=i,r.verifyDevMode()}return _createClass(t,[{key:"getRootStateOperations",value:function(){var t=this,e={getState:function(){return t._stateStream.getValue()},setState:function(e){return t._stateStream.next(e)},dispatch:function(e){return t._dispatcher.dispatch(e)}};return this._config.developmentMode?this.ensureStateAndActionsAreImmutable(e):e}},{key:"ensureStateAndActionsAreImmutable",value:function(t){return{getState:function(){return t.getState()},setState:function(e){var n=function t(e){Object.freeze(e);var n="function"==typeof e,i=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(e).forEach((function(r){!i.call(e,r)||n&&("caller"===r||"callee"===r||"arguments"===r)||null===e[r]||"object"!=typeof e[r]&&"function"!=typeof e[r]||Object.isFrozen(e[r])||t(e[r])})),e}(e);return t.setState(n)},dispatch:function(e){return t.dispatch(e)}}}},{key:"setStateToTheCurrentWithNew",value:function(t){var e=this.getRootStateOperations(),n=e.getState();e.setState(Object.assign({},n,t.defaults))}}]),t}()).\u0275fac=function(t){return new(t||Vd)(Zt(qd),Zt(Jd),Zt(vd),Zt(tp))},Vd.\u0275prov=ft({token:Vd,factory:Vd.\u0275fac}),Vd),np=((zd=function(){function t(e){_classCallCheck(this,t),this._internalStateOperations=e}return _createClass(t,[{key:"createStateContext",value:function(t){var e=this._internalStateOperations.getRootStateOperations();function n(e){return bd(e,t.path)}function i(n,i){var r=_d(n,t.path,i),o=t.instance;if(o.ngxsOnChanges){var a=Sd(t,{currentAppState:n,newAppState:r});o.ngxsOnChanges(a)}return e.setState(r),r}function r(t,e){return i(t,e(n(t)))}return{getState:function(){return n(e.getState())},patchState:function(t){return r(e.getState(),function(t){return function(e){if(Array.isArray(t))throw new Error("Patching arrays is not supported.");if("object"!=typeof t)throw new Error("Patching primitives is not supported.");var n=Object.assign({},e);for(var i in t)n[i]=t[i];return n}}(t))},setState:function(t){var n=e.getState();return"function"==typeof t?r(n,t):i(n,t)},dispatch:function(t){return e.dispatch(t)}}}}]),t}()).\u0275fac=function(t){return new(t||zd)(Zt(ep))},zd.\u0275prov=ft({token:zd,factory:zd.\u0275fac}),zd),ip=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"stateNameErrorMessage",value:function(t){return function(t){return"".concat(t," is not a valid state name. It needs to be a valid object property name.")}(t)}},{key:"checkCorrectStateName",value:function(t){if(!t)throw new Error("States must register a 'name' property");if(!this.stateNameRegex.test(t))throw new Error(this.stateNameErrorMessage(t))}},{key:"checkStateNameIsUnique",value:function(t,e){var n,i,r,o=this.getValidStateMeta(t).name,a=e[o];if(a&&a!==t)throw new Error((n=o,i=t.name,r=a.name,"State name '".concat(n,"' from ").concat(i," already exists in ").concat(r)));return o}},{key:"getValidStateMeta",value:function(t){var e=Cd(t);if(!e)throw new Error("States must be decorated with @State() decorator");return e}}]),t}();return t.stateNameRegex=new RegExp("^[a-zA-Z0-9_]+$"),t}(),rp=((Bd=function(){function t(e,n,i,r,o,a,s){var l=this;_classCallCheck(this,t),this._injector=e,this._config=n,this._parentFactory=i,this._actions=r,this._actionResults=o,this._stateContextFactory=a,this._initialState=s,this._connected=!1,this._states=[],this._statesByName={},this._statePaths={},this.getRuntimeSelectorContext=bh((function(){var t=l;return l._parentFactory?l._parentFactory.getRuntimeSelectorContext():{getStateGetter:function(e){var n=t.statePaths[e];return n?xd(n.split("."),t._config):function(){}},getSelectorOptions:function(e){return Object.assign({},t._config.selectorOptions,e||{})}}}))}return _createClass(t,[{key:"add",value:function(e){t.checkStatesAreValid(e);var n=this.addToStatesMap(e).newStates;if(!n.length)return[];var i,r,o,a,s=function(t){var e=function(e){var n=t.find((function(t){return t===e}));if(!n)throw new Error("Child state not found: ".concat(e,". \r\nYou may have forgotten to add states to module"));return n[pd].name};return t.reduce((function(t,n){var i=n[pd],r=i.name,o=i.children;return t[r]=(o||[]).map(e),t}),{})}(n),l=(i=s,r=[],o={},Object.keys(i).forEach((function(t){return function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Array.isArray(n)||(n=[]),n.push(e),o[e]=!0,i[e].forEach((function(i){if(n.indexOf(i)>=0)throw new Error("Circular dependency '".concat(i,"' is required by '").concat(e,"': ").concat(n.join(" -> ")));o[i]||t(i,n.slice(0))})),r.indexOf(e)<0&&r.push(e)}(t)})),r.reverse()),c=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function t(e,n){for(var i in e)if(e.hasOwnProperty(i)&&e[i].indexOf(n)>=0){var r=t(e,i);return null!==r?"".concat(r,".").concat(i):i}return null};for(var i in t)if(t.hasOwnProperty(i)){var r=n(t,i);e[i]=r?"".concat(r,".").concat(i):i}return e}(s),u=n.reduce((function(t,e){return t[e[pd].name]=e,t}),{}),h=[],f=_createForOfIteratorHelper(l);try{for(f.s();!(a=f.n()).done;){var d=a.value,p=u[d],v=c[d],g=p[pd];this.addRuntimeInfoToMeta(g,v);var m={name:d,path:v,isInitialised:!1,actions:g.actions,instance:this._injector.get(p),defaults:t.cloneDefaults(g.defaults)};this.hasBeenMountedAndBootstrapped(d,v)||h.push(m),this.states.push(m)}}catch(y){f.e(y)}finally{f.f()}return h}},{key:"addAndReturnDefaults",value:function(t){var e=this.add(t||[]);return{defaults:e.reduce((function(t,e){return _d(t,e.path,e.defaults)}),{}),states:e}}},{key:"connectActionHandlers",value:function(){var t=this;this._connected||(this._actions.pipe(Mf((function(t){return"DISPATCHED"===t.status})),H((function(e){var n=e.action;return t.invokeActions(t._actions,n).pipe(L((function(){return{action:n,status:"SUCCESSFUL"}})),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(e){return e.lift(new Yf(t))}}({action:n,status:"CANCELED"}),Gf((function(t){return th({action:n,status:"ERRORED",error:t})})))}))).subscribe((function(e){return t._actionResults.next(e)})),this._connected=!0)}},{key:"invokeActions",value:function(t,e){var n,i=[],r=_createForOfIteratorHelper(this.states);try{for(r.s();!(n=r.n()).done;){var o=n.value,a=yd(e),s=o.actions[a];if(s){var l,c=_createForOfIteratorHelper(s);try{for(c.s();!(l=c.n()).done;){var u=l.value,h=this._stateContextFactory.createStateContext(o);try{var f=o.instance[u.fn](h,e);f instanceof Promise&&(f=V(f)),f instanceof b?u.options.cancelUncompleted&&(f=f.pipe(Zf(t.pipe(Ed(e))))):f=th({}).pipe(Nf()),i.push(f)}catch(d){i.push(eh(d))}}}catch(p){c.e(p)}finally{c.f()}}}}catch(p){r.e(p)}finally{r.f()}return i.length||i.push(th({})),Rf(i)}},{key:"addToStatesMap",value:function(t){var e,n=[],i=this.statesByName,r=_createForOfIteratorHelper(t);try{for(r.s();!(e=r.n()).done;){var o=e.value,a=ip.checkStateNameIsUnique(o,i);!i[a]&&(n.push(o),i[a]=o)}}catch(s){r.e(s)}finally{r.f()}return{newStates:n}}},{key:"addRuntimeInfoToMeta",value:function(t,e){this.statePaths[t.name]=e,t.path=e}},{key:"hasBeenMountedAndBootstrapped",value:function(t,e){var n=void 0!==bd(this._initialState,e);return this.statesByName[t]&&n}},{key:"states",get:function(){return this._parentFactory?this._parentFactory.states:this._states}},{key:"statesByName",get:function(){return this._parentFactory?this._parentFactory.statesByName:this._statesByName}},{key:"statePaths",get:function(){return this._parentFactory?this._parentFactory.statePaths:this._statePaths}}],[{key:"cloneDefaults",value:function(t){var e;return Array.isArray(t)?t.slice():"object"==typeof(e=t)&&null!==e||"function"==typeof e?Object.assign({},t):void 0===t?{}:t}},{key:"checkStatesAreValid",value:function(t){t.forEach(ip.getValidStateMeta)}}]),t}()).\u0275fac=function(t){return new(t||Bd)(Zt(ka),Zt(vd),Zt(Bd,12),Zt(Yd),Zt(Zd),Zt(np),Zt(xh,8))},Bd.\u0275prov=ft({token:Bd,factory:Bd.\u0275fac}),Bd),op=((Nd=function(){function t(e,n,i){_classCallCheck(this,t),this.internalStateOperations=e,this.stateContextFactory=n,this.bootstrapper=i}return _createClass(t,[{key:"ngxsBootstrap",value:function(t,e){var n=this;this.internalStateOperations.getRootStateOperations().dispatch(t).pipe(Mf((function(){return!!e})),td((function(){return n.invokeInit(e.states)})),H((function(){return n.bootstrapper.appBootstrapped$})),Mf((function(t){return!!t}))).subscribe((function(){return n.invokeBootstrap(e.states)}))}},{key:"invokeInit",value:function(t){var e,n=_createForOfIteratorHelper(t);try{for(n.s();!(e=n.n()).done;){var i=e.value,r=i.instance;if(r.ngxsOnChanges){var o=Sd(i,{currentAppState:{},newAppState:this.internalStateOperations.getRootStateOperations().getState()});r.ngxsOnChanges(o)}r.ngxsOnInit&&r.ngxsOnInit(this.getStateContext(i)),i.isInitialised=!0}}catch(a){n.e(a)}finally{n.f()}}},{key:"invokeBootstrap",value:function(t){var e,n=_createForOfIteratorHelper(t);try{for(n.s();!(e=n.n()).done;){var i=e.value,r=i.instance;r.ngxsAfterBootstrap&&r.ngxsAfterBootstrap(this.getStateContext(i))}}catch(o){n.e(o)}finally{n.f()}}},{key:"getStateContext",value:function(t){return this.stateContextFactory.createStateContext(t)}}]),t}()).\u0275fac=function(t){return new(t||Nd)(Zt(ep),Zt(np),Zt(wh))},Nd.\u0275prov=ft({token:Nd,factory:Nd.\u0275fac}),Nd),ap=function(t){return t&&t.NGXS_SELECTOR_OPTIONS_META||{}};function sp(t,e,n){var i=n&&n.containerClass,r=bh((function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=e.apply(i,n);return o instanceof Function?bh.apply(null,[o]):o}));Object.setPrototypeOf(r,e);var o=function(t,e){var n,i=((n=t).hasOwnProperty("NGXS_SELECTOR_META")||Object.defineProperty(n,"NGXS_SELECTOR_META",{value:{makeRootSelector:null,originalFn:null,containerClass:null,selectorName:null,getSelectorOptions:function(){return{}}}}),wd(n));i.originalFn=t;var r=function(){return{}};e&&(i.containerClass=e.containerClass,i.selectorName=e.selectorName,r=e.getSelectorOptions||r);var o=Object.assign({},i);return i.getSelectorOptions=function(){return function(t,e){return Object.assign({},ap(t.containerClass)||{},ap(t.originalFn)||{},t.getSelectorOptions()||{},e)}(o,r())},i}(e,n);return o.makeRootSelector=function(e){var n=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=e.getSelectorOptions(),r=t.getSelectorOptions(i);return{selectorOptions:r,argumentSelectorFunctions:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=[];return n&&(0===t.length||e.injectContainerState)&&Cd(n)&&i.push(n),t&&i.push.apply(i,_toConsumableArray2(t)),i}(n,r,e.containerClass).map((function(e){return lp(e)(t)}))}}(e,o,t),i=n.argumentSelectorFunctions,a=n.selectorOptions;return function(t){var e=i.map((function(e){return e(t)}));try{return r.apply(void 0,_toConsumableArray2(e))}catch(n){if(n instanceof TypeError&&a.suppressErrors)return;throw n}}},r}function lp(t){var e=wd(t)||Cd(t);return e&&e.makeRootSelector||function(){return t}}var cp,up,hp,fp,dp,pp=((up=function(){function t(e,n,i,r,o,a){_classCallCheck(this,t),this._stateStream=e,this._internalStateOperations=n,this._config=i,this._internalExecutionStrategy=r,this._stateFactory=o,this.initStateStream(a)}return _createClass(t,[{key:"dispatch",value:function(t){return this._internalStateOperations.getRootStateOperations().dispatch(t)}},{key:"select",value:function(t){var e=this,n=this.getStoreBoundSelectorFn(t);return this._stateStream.pipe(L(n),Gf((function(t){var n=e._config.selectorOptions.suppressErrors;return t instanceof TypeError&&n?th(void 0):eh(t)})),id(),Id(this._internalExecutionStrategy))}},{key:"selectOnce",value:function(t){return this.select(t).pipe(zf(1))}},{key:"selectSnapshot",value:function(t){return this.getStoreBoundSelectorFn(t)(this._stateStream.getValue())}},{key:"subscribe",value:function(t){return this._stateStream.pipe(Id(this._internalExecutionStrategy)).subscribe(t)}},{key:"snapshot",value:function(){return this._internalStateOperations.getRootStateOperations().getState()}},{key:"reset",value:function(t){return this._internalStateOperations.getRootStateOperations().setState(t)}},{key:"getStoreBoundSelectorFn",value:function(t){return lp(t)(this._stateFactory.getRuntimeSelectorContext())}},{key:"initStateStream",value:function(t){var e=this._stateStream.value;if(!e||0===Object.keys(e).length){var n=Object.keys(this._config.defaultsState).length>0?Object.assign({},this._config.defaultsState,t):t;this._stateStream.next(n)}}}]),t}()).\u0275fac=function(t){return new(t||up)(Zt(qd),Zt(ep),Zt(vd),Zt(Ud),Zt(rp),Zt(xh,8))},up.\u0275prov=ft({token:up,factory:up.\u0275fac}),up),vp=((cp=function t(e,n){_classCallCheck(this,t),t.store=e,t.config=n}).\u0275prov=ft({token:cp,factory:cp.\u0275fac=function(t){return new(t||cp)(Zt(pp),Zt(vd))}}),cp.store=null,cp.config=null,cp),gp=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"type",get:function(){return"@@INIT"}}]),t}(),mp=function(){function t(e){_classCallCheck(this,t),this.addedStates=e}return _createClass(t,null,[{key:"type",get:function(){return"@@UPDATE_STATE"}}]),t}(),yp=new gh(1),_p=((dp=function t(e,n,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5?arguments[5]:void 0;_classCallCheck(this,t),function(){try{var t=window.ng,e=!(t.probe&&t.coreTokens)&&Ei();yp.next(e)}catch(n){yp.next(!1)}finally{yp.complete()}}();var s=e.addAndReturnDefaults(o);n.setStateToTheCurrentWithNew(s),e.connectActionHandlers(),a.ngxsBootstrap(new gp,s)}).\u0275mod=ye({type:dp}),dp.\u0275inj=dt({factory:function(t){return new(t||dp)(Zt(rp),Zt(ep),Zt(pp),Zt(vp),Zt(cd,8),Zt(op))}}),dp),bp=((fp=function(){function t(e,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0;_classCallCheck(this,t);var a=t.flattenStates(r),s=i.addAndReturnDefaults(a);s.states.length&&(n.setStateToTheCurrentWithNew(s),o.ngxsBootstrap(new mp(s.defaults),s))}return _createClass(t,null,[{key:"flattenStates",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.reduce((function(t,e){return t.concat(e)}),[])}}]),t}()).\u0275mod=ye({type:fp}),fp.\u0275inj=dt({factory:function(t){return new(t||fp)(Zt(pp),Zt(ep),Zt(rp),Zt(ud,8),Zt(op))}}),fp),kp=((hp=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"forRoot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{ngModule:_p,providers:[rp,np,Gd,Yd,wh,tp,$d,op,Jd,Zd,ep,Ud,pp,qd,vp,Kd].concat(_toConsumableArray2(e),_toConsumableArray2(t.ngxsTokenProviders(e,n)))}}},{key:"forFeature",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{ngModule:bp,providers:[rp,Kd].concat(_toConsumableArray2(t),[{provide:ud,multi:!0,useValue:t}])}}},{key:"ngxsTokenProviders",value:function(e,n){return[{provide:fd,useValue:Ch},{provide:dd,useValue:Ei},{provide:md,useClass:n.executionStrategy||ld},{provide:cd,useValue:e},{provide:t.ROOT_OPTIONS,useValue:n},{provide:vd,useFactory:t.ngxsConfigFactory,deps:[t.ROOT_OPTIONS]},{provide:Uc,useFactory:t.appBootstrapListenerFactory,multi:!0,deps:[wh]},{provide:xh,useFactory:t.getInitialState},{provide:Eh,useExisting:np},{provide:Th,useExisting:rp}]}},{key:"ngxsConfigFactory",value:function(t){return Object.assign(new vd,t)}},{key:"appBootstrapListenerFactory",value:function(t){return function(){return t.bootstrap()}}},{key:"getInitialState",value:function(){return Sh.pop()}}]),t}()).\u0275mod=ye({type:hp}),hp.\u0275inj=dt({factory:function(t){return new(t||hp)}}),hp.ROOT_OPTIONS=new Vt("ROOT_OPTIONS"),hp);function Cp(t,e){return function(n,i){if(n.hasOwnProperty("prototype"))throw new Error("@Action() decorator cannot be used with static methods");var r=kd(n.constructor);Array.isArray(t)||(t=[t]);var o,a=_createForOfIteratorHelper(t);try{for(a.s();!(o=a.n()).done;){var s=o.value.type;r.actions[s]||(r.actions[s]=[]),r.actions[s].push({fn:i,options:e||{},type:s})}}catch(l){a.e(l)}finally{a.f()}}}function wp(t){return function(e){!function(t){yp.asObservable().subscribe((function(e){var n;e&&(t.\u0275prov||console.warn((n=t.name,"'".concat(n,"' class should be decorated with @Injectable() right after the @State() decorator"))))}))}(e);var n=e,i=kd(n),r=Object.getPrototypeOf(n),o=function(e){return Object.assign({},e.NGXS_OPTIONS_META||{},t)}(r);!function(t){var e=t.meta,n=t.inheritedStateClass,i=t.optionsWithInheritance,r=i.children,o=i.defaults,a=i.name,s="string"==typeof a?a:a&&a.getName()||null;ip.checkCorrectStateName(s),n.hasOwnProperty(pd)&&(e.actions=Object.assign({},e.actions,(n[pd]||{}).actions)),e.children=r,e.defaults=o,e.name=s}({meta:i,inheritedStateClass:r,optionsWithInheritance:o}),n.NGXS_OPTIONS_META=o}}function xp(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return function(e,i){var r,o=i.toString(),a="__".concat(o,"__selector"),s=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return"string"==typeof(e=e||function(t){var e=t.length-1;return 36===t.charCodeAt(e)?t.slice(0,e):t}(t))?xd(n.length?[e].concat(_toConsumableArray2(n)):e.split("."),vp.config):e}(o,t,n);Object.defineProperties(e,(_defineProperty(r={},a,{writable:!0,enumerable:!1,configurable:!0}),_defineProperty(r,o,{enumerable:!0,configurable:!0,get:function(){return this[a]||(this[a]=function(t){if(!vp.store)throw new Error("You have forgotten to import the NGXS module!");return vp.store.select(t)}(s))}}),r))}}function Sp(t){return function(e,n,i){if(!i||null===i.value)throw new Error("Selectors only work on methods");var r=i.value,o=sp(t,r,{containerClass:e,selectorName:n.toString(),getSelectorOptions:function(){return{}}}),a={configurable:!0,get:function(){return o}};return a.originalFn=r,a}}var Ep=function(){var t=function t(e){_classCallCheck(this,t),this.panel=e};return t.type="[Editor.Objects] Open Object Settings Panel",t}(),Tp=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor.Objects] Mark as Dirty",t}();function Op(t){var e=Object.assign({},t);return e.shadow&&-1===e.shadow.offsetX&&delete e.shadow,"object"==typeof e.fontFamily&&(e.activeFont=e.fontFamily,e.fontFamily=e.activeFont.family),e}var Ap=function(){var t=function t(){_classCallCheck(this,t)};return t.text={name:"text",icon:"text-box-custom"},t.shape={name:"shape",icon:"polygon-custom"},t.sticker={name:"sticker",icon:"sticker-custom"},t.drawing={name:"drawing",icon:"pencil-custom"},t.image={name:"image",icon:"photo-library"},t.mainImage={name:"mainImage",icon:"photo-library"},t}();function Ip(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36,e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*n.length));return e}var Pp,Dp,Rp,Fp,Mp=new Vt("NgValueAccessor"),jp={provide:Mp,useExisting:St((function(){return Lp})),multi:!0},Lp=((Pp=function(){function t(e,n){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return _createClass(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}()).\u0275fac=function(t){return new(t||Pp)(rs(Sl),rs(kl))},Pp.\u0275dir=be({type:Pp,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&gs("change",(function(t){return e.onChange(t.target.checked)}))("blur",(function(){return e.onTouched()}))},features:[ml([jp])]}),Pp),Np={provide:Mp,useExisting:St((function(){return zp})),multi:!0},Bp=new Vt("CompositionEventMode"),zp=((Fp=function(){function t(e,n,i){var r;_classCallCheck(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=(r=Ah()?Ah().getUserAgent():"",!/android (\d+)/.test(r.toLowerCase())))}return _createClass(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}()).\u0275fac=function(t){return new(t||Fp)(rs(Sl),rs(kl),rs(Bp,8))},Fp.\u0275dir=be({type:Fp,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&&gs("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:[ml([Np])]}),Fp),Vp=((Rp=function(){function t(){_classCallCheck(this,t)}return _createClass(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}()).\u0275fac=function(t){return new(t||Rp)},Rp.\u0275dir=be({type:Rp}),Rp),Hp=((Dp=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(Vp)).\u0275fac=function(t){return Wp(t||Dp)},Dp.\u0275dir=be({type:Dp,features:[el]}),Dp),Wp=ui(Hp);function Up(){throw new Error("unimplemented")}var Yp,Xp,Gp=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._parent=null,t.name=null,t.valueAccessor=null,t._rawValidators=[],t._rawAsyncValidators=[],t}return _createClass(n,[{key:"validator",get:function(){return Up()}},{key:"asyncValidator",get:function(){return Up()}}]),n}(Vp),qp=function(){function t(e){_classCallCheck(this,t),this._cd=e}return _createClass(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}(),Kp=((Xp=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){return _classCallCheck(this,n),e.call(this,t)}return n}(qp)).\u0275fac=function(t){return new(t||Xp)(rs(Gp,2))},Xp.\u0275dir=be({type:Xp,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&Fs("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:[el]}),Xp),Zp=((Yp=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){return _classCallCheck(this,n),e.call(this,t)}return n}(qp)).\u0275fac=function(t){return new(t||Yp)(rs(Hp,2))},Yp.\u0275dir=be({type:Yp,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&Fs("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:[el]}),Yp);function Qp(t){return null==t||0===t.length}var Jp=new Vt("NgValidators"),$p=new Vt("NgAsyncValidators"),tv=/^(?=.{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])?)*$/,ev=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"min",value:function(t){return function(e){if(Qp(e.value)||Qp(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}}},{key:"max",value:function(t){return function(e){if(Qp(e.value)||Qp(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}},{key:"required",value:function(t){return Qp(t.value)?{required:!0}:null}},{key:"requiredTrue",value:function(t){return!0===t.value?null:{required:!0}}},{key:"email",value:function(t){return Qp(t.value)||tv.test(t.value)?null:{email:!0}}},{key:"minLength",value:function(t){return function(e){if(Qp(e.value))return null;var n=e.value?e.value.length:0;return n<t?{minlength:{requiredLength:t,actualLength:n}}:null}}},{key:"maxLength",value:function(t){return function(e){var n=e.value?e.value.length:0;return n>t?{maxlength:{requiredLength:t,actualLength:n}}: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(Qp(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(nv);return 0==e.length?null:function(t){return rv(function(t,e){return e.map((function(e){return e(t)}))}(t,e))}}},{key:"composeAsync",value:function(t){if(!t)return null;var e=t.filter(nv);return 0==e.length?null:function(t){return Rf(function(t,e){return e.map((function(e){return e(t)}))}(t,e).map(iv)).pipe(L(rv))}}}]),t}();function nv(t){return null!=t}function iv(t){var e=ps(t)?V(t):t;if(!vs(e))throw new Error("Expected validator to return Promise or Observable.");return e}function rv(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 ov(t){return t.validate?function(e){return t.validate(e)}:t}function av(t){return t.validate?function(e){return t.validate(e)}:t}var sv,lv,cv,uv,hv={provide:Mp,useExisting:St((function(){return fv})),multi:!0},fv=((sv=function(){function t(e,n){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return _createClass(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}()).\u0275fac=function(t){return new(t||sv)(rs(Sl),rs(kl))},sv.\u0275dir=be({type:sv,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&gs("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[ml([hv])]}),sv),dv={provide:Mp,useExisting:St((function(){return vv})),multi:!0},pv=((cv=function(){function t(){_classCallCheck(this,t),this._accessors=[]}return _createClass(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}()).\u0275fac=function(t){return new(t||cv)},cv.\u0275prov=ft({token:cv,factory:cv.\u0275fac}),cv),vv=((lv=function(){function t(e,n,i,r){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this._registry=i,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return _createClass(t,[{key:"ngOnInit",value:function(){this._control=this._injector.get(Gp),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&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}},{key:"_throwNameError",value:function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type="radio" formControlName="food" name="food">\n ')}}]),t}()).\u0275fac=function(t){return new(t||lv)(rs(Sl),rs(kl),rs(pv),rs(ka))},lv.\u0275dir=be({type:lv,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&gs("change",(function(){return e.onChange()}))("blur",(function(){return e.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[ml([dv])]}),lv),gv={provide:Mp,useExisting:St((function(){return mv})),multi:!0},mv=((uv=function(){function t(e,n){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return _createClass(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}()).\u0275fac=function(t){return new(t||uv)(rs(Sl),rs(kl))},uv.\u0275dir=be({type:uv,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&gs("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[ml([gv])]}),uv),yv='\n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',_v='\n <div [formGroup]="myGroup">\n <div formGroupName="person">\n <input formControlName="firstName">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',bv='\n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>',kv=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"controlParentException",value:function(){throw new Error("formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ".concat(yv))}},{key:"ngModelGroupException",value:function(){throw new Error('formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n '.concat(_v,"\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n ").concat(bv))}},{key:"missingFormException",value:function(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n ".concat(yv))}},{key:"groupParentException",value:function(){throw new Error("formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ".concat(_v))}},{key:"arrayParentException",value:function(){throw new Error('formArrayName must be used with a parent formGroup directive. You\'ll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n \n <div [formGroup]="myGroup">\n <div formArrayName="cities">\n <div *ngFor="let city of cityArray.controls; index as i">\n <input [formControlName]="i">\n </div>\n </div>\n </div>\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });')}},{key:"disabledAttrWarning",value:function(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")}},{key:"ngModelWarning",value:function(t){console.warn("\n It looks like you're using ngModel on the same form field as ".concat(t,". \n Support for using the ngModel input property and ngModelChange event with \n reactive form directives has been deprecated in Angular v6 and will be removed \n in Angular v7.\n \n For more information on this, see our API docs here:\n https://angular.io/api/forms/").concat("formControl"===t?"FormControlDirective":"FormControlName","#use-with-ngmodel\n "))}}]),t}(),Cv={provide:Mp,useExisting:St((function(){return Ev})),multi:!0};function wv(t,e){return null==t?"".concat(e):(e&&"object"==typeof e&&(e="Object"),"".concat(t,": ").concat(e).slice(0,50))}var xv,Sv,Ev=((Sv=function(){function t(e,n){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Ga}return _createClass(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=wv(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<n.length;e++){var i=n[e];if(this._compareWith(this._optionMap.get(i),t))return i}return null}},{key:"_getOptionValue",value:function(t){var e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}},{key:"compareWith",set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received ".concat(JSON.stringify(t)));this._compareWith=t}}]),t}()).\u0275fac=function(t){return new(t||Sv)(rs(Sl),rs(kl))},Sv.\u0275dir=be({type:Sv,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&gs("change",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[ml([Cv])]}),Sv),Tv=((xv=function(){function t(e,n,i){_classCallCheck(this,t),this._element=e,this._renderer=n,this._select=i,this._select&&(this.id=this._select._registerOption())}return _createClass(t,[{key:"_setElementValue",value:function(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}},{key:"ngOnDestroy",value:function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}},{key:"ngValue",set:function(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(wv(this.id,t)),this._select.writeValue(this._select.value))}},{key:"value",set:function(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}}]),t}()).\u0275fac=function(t){return new(t||xv)(rs(kl),rs(Sl),rs(Ev,9))},xv.\u0275dir=be({type:xv,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),xv),Ov={provide:Mp,useExisting:St((function(){return Dv})),multi:!0};function Av(t,e){return null==t?"".concat(e):("string"==typeof e&&(e="'".concat(e,"'")),e&&"object"==typeof e&&(e="Object"),"".concat(t,": ").concat(e).slice(0,50))}var Iv,Pv,Dv=((Pv=function(){function t(e,n){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Ga}return _createClass(t,[{key:"writeValue",value:function(t){var e,n=this;if(this.value=t,Array.isArray(t)){var i=t.map((function(t){return n._getOptionId(t)}));e=function(t,e){t._setSelected(i.indexOf(e.toString())>-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(n.hasOwnProperty("selectedOptions"))for(var r=n.selectedOptions,o=0;o<r.length;o++){var a=r.item(o),s=e._getOptionValue(a.value);i.push(s)}else for(var l=n.options,c=0;c<l.length;c++){var u=l.item(c);if(u.selected){var h=e._getOptionValue(u.value);i.push(h)}}e.value=i,t(i)}}},{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(t){var e=(this._idCounter++).toString();return this._optionMap.set(e,t),e}},{key:"_getOptionId",value:function(t){for(var e=0,n=Array.from(this._optionMap.keys());e<n.length;e++){var i=n[e];if(this._compareWith(this._optionMap.get(i)._value,t))return i}return null}},{key:"_getOptionValue",value:function(t){var e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t}},{key:"compareWith",set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received ".concat(JSON.stringify(t)));this._compareWith=t}}]),t}()).\u0275fac=function(t){return new(t||Pv)(rs(Sl),rs(kl))},Pv.\u0275dir=be({type:Pv,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,e){1&t&&gs("change",(function(t){return e.onChange(t.target)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[ml([Ov])]}),Pv),Rv=((Iv=function(){function t(e,n,i){_classCallCheck(this,t),this._element=e,this._renderer=n,this._select=i,this._select&&(this.id=this._select._registerOption(this))}return _createClass(t,[{key:"_setElementValue",value:function(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}},{key:"_setSelected",value:function(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}},{key:"ngOnDestroy",value:function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}},{key:"ngValue",set:function(t){null!=this._select&&(this._value=t,this._setElementValue(Av(this.id,t)),this._select.writeValue(this._select.value))}},{key:"value",set:function(t){this._select?(this._value=t,this._setElementValue(Av(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}}]),t}()).\u0275fac=function(t){return new(t||Iv)(rs(kl),rs(Sl),rs(Dv,9))},Iv.\u0275dir=be({type:Iv,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),Iv);function Fv(t,e){return[].concat(_toConsumableArray2(e.path),[t])}function Mv(t,e){t||Bv(e,"Cannot find control with"),e.valueAccessor||Bv(e,"No value accessor for form control with"),t.validator=ev.compose([t.validator,e.validator]),t.asyncValidator=ev.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange((function(n){t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&jv(t,e)}))}(t,e),function(t,e){t.registerOnChange((function(t,n){e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)}))}(t,e),function(t,e){e.valueAccessor.registerOnTouched((function(){t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&jv(t,e),"submit"!==t.updateOn&&t.markAsTouched()}))}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange((function(t){e.valueAccessor.setDisabledState(t)})),e._rawValidators.forEach((function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange((function(){return t.updateValueAndValidity()}))})),e._rawAsyncValidators.forEach((function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange((function(){return t.updateValueAndValidity()}))}))}function jv(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Lv(t,e){null==t&&Bv(e,"Cannot find control with"),t.validator=ev.compose([t.validator,e.validator]),t.asyncValidator=ev.composeAsync([t.asyncValidator,e.asyncValidator])}function Nv(t){return Bv(t,"There is no FormControl instance attached to form control element with")}function Bv(t,e){var n;throw n=t.path.length>1?"path: '".concat(t.path.join(" -> "),"'"):t.path[0]?"name: '".concat(t.path,"'"):"unspecified name attribute",new Error("".concat(e," ").concat(n))}function zv(t){return null!=t?ev.compose(t.map(ov)):null}function Vv(t){return null!=t?ev.composeAsync(t.map(av)):null}function Hv(t,e){if(!t.hasOwnProperty("model"))return!1;var n=t.model;return!!n.isFirstChange()||!Ga(e,n.currentValue)}var Wv=[Lp,mv,fv,Ev,Dv,vv];function Uv(t,e){t._syncPendingControls(),e.forEach((function(t){var e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)}))}function Yv(t,e){if(!e)return null;Array.isArray(e)||Bv(t,"Value accessor was not provided as an array for form control with");var n=void 0,i=void 0,r=void 0;return e.forEach((function(e){var o;e.constructor===zp?n=e:(o=e,Wv.some((function(t){return o.constructor===t}))?(i&&Bv(t,"More than one built-in value accessor matches form control with"),i=e):(r&&Bv(t,"More than one custom value accessor matches form control with"),r=e))})),r||i||n||(Bv(t,"No valid value accessor for form control with"),null)}function Xv(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}function Gv(t,e,n,i){Ei()&&"never"!==i&&((null!==i&&"once"!==i||e._ngModelWarningSentOnce)&&("always"!==i||n._ngModelWarningSent)||(kv.ngModelWarning(t),e._ngModelWarningSentOnce=!0,n._ngModelWarningSent=!0))}function qv(t){var e=Zv(t)?t.validators:t;return Array.isArray(e)?zv(e):e||null}function Kv(t,e){var n=Zv(e)?e.asyncValidators:t;return Array.isArray(n)?Vv(n):n||null}function Zv(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var Qv,Jv,$v,tg,eg,ng,ig,rg,og,ag=function(){function t(e,n){_classCallCheck(this,t),this.validator=e,this.asyncValidator=n,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}return _createClass(t,[{key:"setValidators",value:function(t){this.validator=qv(t)}},{key:"setAsyncValidators",value:function(t){this.asyncValidator=Kv(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";var n=iv(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe((function(n){return e.setErrors(n,{emitEvent:t})}))}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()}},{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 lg?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof cg&&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 pc,this.statusChanges=new pc}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":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){Zv(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}},{key:"_parentMarkedDirty",value:function(t){return!t&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}},{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}(),sg=function(t){_inherits(n,t);var e=_createSuper(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 _classCallCheck(this,n),(t=e.call(this,qv(r),Kv(o,r)))._onChange=[],t._applyFormState(i),t._setUpdateStrategy(r),t.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),t._initObservables(),t}return _createClass(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}(ag),lg=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this,qv(i),Kv(r,i))).controls=t,o._initObservables(),o._setUpdateStrategy(i),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),o}return _createClass(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 sg?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){var e=this,n=!1;return this._forEachChild((function(i,r){n=n||e.contains(r)&&t(i)})),n}},{key:"_reduceValue",value:function(){var t=this;return this._reduceChildren({},(function(e,n,i){return(n.enabled||t.disabled)&&(e[i]=n.value),e}))}},{key:"_reduceChildren",value:function(t,e){var n=t;return this._forEachChild((function(t,i){n=e(n,t,i)})),n}},{key:"_allControlsDisabled",value:function(){for(var t=0,e=Object.keys(this.controls);t<e.length;t++){var n=e[t];if(this.controls[n].enabled)return!1}return Object.keys(this.controls).length>0||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}(ag),cg=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this,qv(i),Kv(r,i))).controls=t,o._initObservables(),o._setUpdateStrategy(i),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),o}return _createClass(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 sg?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 ".concat(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=_createForOfIteratorHelper(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}(ag),ug={provide:Hp,useExisting:St((function(){return fg}))},hg=Promise.resolve(null),fg=((Jv=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this)).submitted=!1,r._directives=[],r.ngSubmit=new pc,r.form=new lg({},zv(t),Vv(i)),r}return _createClass(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"addControl",value:function(t){var e=this;hg.then((function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),Mv(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;hg.then((function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name),Xv(e._directives,t)}))}},{key:"addFormGroup",value:function(t){var e=this;hg.then((function(){var n=e._findContainer(t.path),i=new lg({});Lv(i,t),n.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})}))}},{key:"removeFormGroup",value:function(t){var e=this;hg.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;hg.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,Uv(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}(Hp)).\u0275fac=function(t){return new(t||Jv)(rs(Jp,10),rs($p,10))},Jv.\u0275dir=be({type:Jv,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&gs("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[ml([ug]),el]}),Jv),dg=((Qv=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(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 Fv(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 zv(this._validators)}},{key:"asyncValidator",get:function(){return Vv(this._asyncValidators)}}]),n}(Hp)).\u0275fac=function(t){return pg(t||Qv)},Qv.\u0275dir=be({type:Qv,features:[el]}),Qv),pg=ui(dg),vg=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"modelParentException",value:function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n '.concat(yv,'\n\n Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n Example:\n\n \n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n </div>\n '))}},{key:"formGroupNameException",value:function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n ".concat(_v,"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n ").concat(bv))}},{key:"missingNameException",value:function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: <input [(ngModel)]="person.firstName" name="first">\n Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">')}},{key:"modelGroupParentException",value:function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n ".concat(_v,"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n ").concat(bv))}}]),t}(),gg={provide:Hp,useExisting:St((function(){return mg}))},mg=(($v=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this))._parent=t,o._validators=i,o._asyncValidators=r,o}return _createClass(n,[{key:"_checkParentType",value:function(){this._parent instanceof n||this._parent instanceof fg||vg.modelGroupParentException()}}]),n}(dg)).\u0275fac=function(t){return new(t||$v)(rs(Hp,5),rs(Jp,10),rs($p,10))},$v.\u0275dir=be({type:$v,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[ml([gg]),el]}),$v),yg={provide:Gp,useExisting:St((function(){return bg}))},_g=Promise.resolve(null),bg=((eg=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;return _classCallCheck(this,n),(a=e.call(this)).control=new sg,a._registered=!1,a.update=new pc,a._parent=t,a._rawValidators=i||[],a._rawAsyncValidators=r||[],a.valueAccessor=Yv(_assertThisInitialized(a),o),a}return _createClass(n,[{key:"ngOnChanges",value:function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),Hv(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=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:"_setUpControl",value:function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}},{key:"_isStandalone",value:function(){return!this._parent||!(!this.options||!this.options.standalone)}},{key:"_setUpStandalone",value:function(){Mv(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}},{key:"_checkForErrors",value:function(){this._isStandalone()||this._checkParentType(),this._checkName()}},{key:"_checkParentType",value:function(){!(this._parent instanceof mg)&&this._parent instanceof dg?vg.formGroupNameException():this._parent instanceof mg||this._parent instanceof fg||vg.modelParentException()}},{key:"_checkName",value:function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||vg.missingNameException()}},{key:"_updateValue",value:function(t){var e=this;_g.then((function(){e.control.setValue(t,{emitViewToModelChange:!1})}))}},{key:"_updateDisabled",value:function(t){var e=this,n=t.isDisabled.currentValue,i=""===n||n&&"false"!==n;_g.then((function(){i&&!e.control.disabled?e.control.disable():!i&&e.control.disabled&&e.control.enable()}))}},{key:"path",get:function(){return this._parent?Fv(this.name,this._parent):[this.name]}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return zv(this._rawValidators)}},{key:"asyncValidator",get:function(){return Vv(this._rawAsyncValidators)}}]),n}(Gp)).\u0275fac=function(t){return new(t||eg)(rs(Hp,9),rs(Jp,10),rs($p,10),rs(Mp,10))},eg.\u0275dir=be({type:eg,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[ml([yg]),el,sl]}),eg),kg=((tg=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||tg)},tg.\u0275dir=be({type:tg,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),tg),Cg=new Vt("NgModelWithFormControlWarning"),wg={provide:Gp,useExisting:St((function(){return xg}))},xg=((ng=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;return _classCallCheck(this,n),(a=e.call(this))._ngModelWarningConfig=o,a.update=new pc,a._ngModelWarningSent=!1,a._rawValidators=t||[],a._rawAsyncValidators=i||[],a.valueAccessor=Yv(_assertThisInitialized(a),r),a}return _createClass(n,[{key:"ngOnChanges",value:function(t){this._isControlChanged(t)&&(Mv(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),Hv(t,this.viewModel)&&(Gv("formControl",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){kv.disabledAttrWarning()}},{key:"path",get:function(){return[]}},{key:"validator",get:function(){return zv(this._rawValidators)}},{key:"asyncValidator",get:function(){return Vv(this._rawAsyncValidators)}},{key:"control",get:function(){return this.form}}]),n}(Gp)).\u0275fac=function(t){return new(t||ng)(rs(Jp,10),rs($p,10),rs(Mp,10),rs(Cg,8))},ng.\u0275dir=be({type:ng,selectors:[["","formControl",""]],inputs:{isDisabled:["disabled","isDisabled"],form:["formControl","form"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[ml([wg]),el,sl]}),ng._ngModelWarningSentOnce=!1,ng),Sg={provide:Hp,useExisting:St((function(){return Eg}))},Eg=((ig=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this))._validators=t,r._asyncValidators=i,r.submitted=!1,r.directives=[],r.form=null,r.ngSubmit=new pc,r}return _createClass(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 Mv(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){Xv(this.directives,t)}},{key:"addFormGroup",value:function(t){var e=this.form.get(t.path);Lv(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);Lv(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,Uv(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){e.valueAccessor.registerOnChange((function(){return Nv(e)})),e.valueAccessor.registerOnTouched((function(){return Nv(e)})),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&&Mv(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=zv(this._validators);this.form.validator=ev.compose([this.form.validator,t]);var e=Vv(this._asyncValidators);this.form.asyncValidator=ev.composeAsync([this.form.asyncValidator,e])}},{key:"_checkFormPresent",value:function(){this.form||kv.missingFormException()}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}}]),n}(Hp)).\u0275fac=function(t){return new(t||ig)(rs(Jp,10),rs($p,10))},ig.\u0275dir=be({type:ig,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&gs("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[ml([Sg]),el,sl]}),ig),Tg={provide:Hp,useExisting:St((function(){return Og}))},Og=((rg=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this))._parent=t,o._validators=i,o._asyncValidators=r,o}return _createClass(n,[{key:"_checkParentType",value:function(){Pg(this._parent)&&kv.groupParentException()}}]),n}(dg)).\u0275fac=function(t){return new(t||rg)(rs(Hp,13),rs(Jp,10),rs($p,10))},rg.\u0275dir=be({type:rg,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[ml([Tg]),el]}),rg),Ag={provide:Hp,useExisting:St((function(){return Ig}))},Ig=((og=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this))._parent=t,o._validators=i,o._asyncValidators=r,o}return _createClass(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(){Pg(this._parent)&&kv.arrayParentException()}},{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 Fv(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"validator",get:function(){return zv(this._validators)}},{key:"asyncValidator",get:function(){return Vv(this._asyncValidators)}}]),n}(Hp)).\u0275fac=function(t){return new(t||og)(rs(Hp,13),rs(Jp,10),rs($p,10))},og.\u0275dir=be({type:og,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[ml([Ag]),el]}),og);function Pg(t){return!(t instanceof Og||t instanceof Eg||t instanceof Ig)}var Dg,Rg,Fg,Mg,jg,Lg,Ng={provide:Gp,useExisting:St((function(){return Bg}))},Bg=((Dg=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a){var s;return _classCallCheck(this,n),(s=e.call(this))._ngModelWarningConfig=a,s._added=!1,s.update=new pc,s._ngModelWarningSent=!1,s._parent=t,s._rawValidators=i||[],s._rawAsyncValidators=r||[],s.valueAccessor=Yv(_assertThisInitialized(s),o),s}return _createClass(n,[{key:"ngOnChanges",value:function(t){this._added||this._setUpControl(),Hv(t,this.viewModel)&&(Gv("formControlName",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(){!(this._parent instanceof Og)&&this._parent instanceof dg?kv.ngModelGroupException():this._parent instanceof Og||this._parent instanceof Eg||this._parent instanceof Ig||kv.controlParentException()}},{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){kv.disabledAttrWarning()}},{key:"path",get:function(){return Fv(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 zv(this._rawValidators)}},{key:"asyncValidator",get:function(){return Vv(this._rawAsyncValidators)}}]),n}(Gp)).\u0275fac=function(t){return new(t||Dg)(rs(Hp,13),rs(Jp,10),rs($p,10),rs(Mp,10),rs(Cg,8))},Dg.\u0275dir=be({type:Dg,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[ml([Ng]),el,sl]}),Dg._ngModelWarningSentOnce=!1,Dg),zg={provide:Jp,useExisting:St((function(){return Vg})),multi:!0},Vg=((Lg=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"validate",value:function(t){return this.required?ev.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&&"false"!=="".concat(t),this._onChange&&this._onChange()}}]),t}()).\u0275fac=function(t){return new(t||Lg)},Lg.\u0275dir=be({type:Lg,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&ts("required",e.required?"":null)},inputs:{required:"required"},features:[ml([zg])]}),Lg),Hg=((jg=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:jg}),jg.\u0275inj=dt({factory:function(t){return new(t||jg)}}),jg),Wg=((Mg=function(){function t(){_classCallCheck(this,t)}return _createClass(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 lg(n,{asyncValidators:r,updateOn:o,validators:i})}},{key:"control",value:function(t,e,n){return new sg(t,e,n)}},{key:"array",value:function(t,e,n){var i=this,r=t.map((function(t){return i._createControl(t)}));return new cg(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 sg||t instanceof lg||t instanceof cg?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}]),t}()).\u0275fac=function(t){return new(t||Mg)},Mg.\u0275prov=ft({token:Mg,factory:Mg.\u0275fac}),Mg),Ug=((Fg=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:Fg}),Fg.\u0275inj=dt({factory:function(t){return new(t||Fg)},providers:[pv],imports:[Hg]}),Fg),Yg=((Rg=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"withConfig",value:function(e){return{ngModule:t,providers:[{provide:Cg,useValue:e.warnOnNgModelWithFormControl}]}}}]),t}()).\u0275mod=ye({type:Rg}),Rg.\u0275inj=dt({factory:function(t){return new(t||Rg)},providers:[Wg,pv],imports:[Hg]}),Rg),Xg=n("hLX6"),Gg=n("PE4B"),qg=n.n(Gg),Kg={showLeafArrayIndexes:!0,includeNullValues:!0,mapping:function(t){return"boolean"==typeof t?+t?"1":"0":t}};function Zg(t){return!(Array.isArray(t)||"object"!=typeof t||!t||t instanceof Blob)}var Qg,Jg,$g,tm,em,nm,im,rm,om,am,sm,lm,cm,um=((Qg=function(){function t(){_classCallCheck(this,t),this.config$=new Df({})}return _createClass(t,[{key:"setMultiple",value:function(t){if(t){var e=Object.assign({},this.config$.value);Object.entries(t).forEach((function(t){var n=_slicedToArray(t,2),i=n[0],r=n[1];"0"!==r&&"1"!==r||(r=parseInt(r)),Xg.set(i,r,e)})),this.config$.next(e)}}},{key:"merge",value:function(t){this.config$.next(qg()(this.config$.value,t))}},{key:"set",value:function(t,e){var n=Object.assign({},this.config$.value);Xg.set(t,e,n),this.config$.next(n)}},{key:"replace",value:function(t){this.config$.next(t)}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Xg.pick(t,this.config$.value);return null==n?e:n}},{key:"getFlat",value:function(t){return Xg.dot(t?this.config$.value[t]:this.config$.value)}},{key:"all$",value:function(){return this.config$.asObservable()}},{key:"getAll",value:function(){return this.config$.value}},{key:"has",value:function(t){return!!Xg.pick(t,this.config$.value)}},{key:"getJson",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.get(t,e);return"string"!=typeof n?n:JSON.parse(n)}},{key:"getBaseUrl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.has("base_url")&&("production"===this.get("vebto.environment")||t)?this.get("base_url")+"/":document.querySelector("base")?document.querySelector("base").href:window.location.href.split("?")[0].replace(/([^\/]+\.\w+($|\/$))/,"")}},{key:"getAssetUrl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.get("vebto.assetsUrl")||this.getBaseUrl(e),i=this.get("vebto.assetsPrefix");return"production"===this.get("vebto.environment")&&i&&(n+=i+"/"),n+="assets/",t&&(n+=t),n}},{key:"save",value:function(t){this.setMultiple(t.client);var e={files:t.files};e.client=JSON.stringify(t.client),e.server=JSON.stringify(t.server);var n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function t(e,n,i,r){var o=r||new FormData,a=0;for(var s in e){if(e.hasOwnProperty(s)){var l=i||s,c=n.mapping(e[s]);if(i&&Zg(e)&&(l=i+"["+s+"]"),i&&Array.isArray(e)&&(l=Array.isArray(c)||n.showLeafArrayIndexes?i+"["+a+"]":i+"[]"),Array.isArray(c)||Zg(c))t(c,n,l,o);else if(c instanceof FileList)for(var u=0;u<c.length;u++)o.append(l+"["+u+"]",c.item(u));else c instanceof Blob?o.append(l,c,c.name):(null===c&&n.includeNullValues||null!==c)&&void 0!==c&&o.append(l,c)}a++}return o}(t,Object.assign(Object.assign({},Kg),e))}(e);return this.http.post("settings",n)}},{key:"anySocialLoginEnabled",value:function(){var t=this;return["facebook","google","twitter"].filter((function(e){return t.get("social."+e+".enable")})).length>-1}},{key:"setHttpClient",value:function(t){this.http=t}}]),t}()).\u0275fac=function(t){return new(t||Qg)},Qg.\u0275prov=ft({token:Qg,factory:Qg.\u0275fac,providedIn:"root"}),Qg),hm=function(t){return t.blank="Loading Canvas",t.overlayImage="Loading Image",t.mainImage="Loading Image",t.state="Loading State",t.merge="Processing Image",t}({}),fm=(($g=function(){function t(e){_classCallCheck(this,t),this.config=e,this.original={width:0,height:0},this.loaded=new gh(1),this.contentLoadingState$=new gh(1)}return _createClass(t,[{key:"isEmpty",value:function(){return!(this.config.get("pixie.image")||this.config.get("pixie.blankCanvasSize")||this.fabric&&0!==this.fabric.getObjects().length)}},{key:"calcWrapperSize",value:function(){var t=this.wrapperEl.getBoundingClientRect();return{width:t.width,height:t.height}}}]),t}()).\u0275fac=function(t){return new(t||$g)(Zt(um))},$g.\u0275prov=ft({token:$g,factory:$g.\u0275fac}),$g),dm=((Jg=function(){function t(e,n,i){_classCallCheck(this,t),this.fb=e,this.config=n,this.canvasState=i,this.propsChanged$=new E,this.form=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"build",value:function(t){return t.group({fill:[],backgroundColor:[],stroke:[],strokeWidth:[],opacity:[],shadow:t.group({color:[],blur:[],offsetX:[],offsetY:[]}),textAlign:[],underline:[],linethrough:[],fontStyle:[],fontFamily:[],fontWeight:[]})}}]),t}().build(this.fb)}return _createClass(t,[{key:"init",value:function(){var t=this;this.syncForm(),this.form.valueChanges.subscribe((function(e){t.setValues(e)}))}},{key:"isEditing",value:function(){var t=this.get();return t&&t.isEditing}},{key:"setValues",value:function(t){var e=this.get();e&&(e.name===Ap.sticker.name&&t.fill!==e.fill&&e.forEachObject&&e.forEachObject((function(e){return e.set("fill",t.fill)})),this.propsChanged$.next(),e.set(Op(t)),this.canvasState.fabric.requestRenderAll())}},{key:"getValue",value:function(t){return this.get().get(t)}},{key:"get",value:function(){var t=this.canvasState.fabric&&this.canvasState.fabric.getActiveObject();return t&&t.name?t.name.indexOf("crop.")>-1||t.name.indexOf("round.")>-1?null:t:null}},{key:"move",value:function(t,e){var n=this.get();n&&(n.set(t,n[t]+e),this.canvasState.fabric.requestRenderAll())}},{key:"bringToFront",value:function(){var t=this.get();t&&(t.bringToFront(),this.canvasState.fabric.requestRenderAll())}},{key:"sendToBack",value:function(){var t=this.get();t&&(t.sendToBack(),this.canvasState.fabric.requestRenderAll())}},{key:"flipHorizontal",value:function(){var t=this.get();t&&(t.flipX=!t.flipX,this.canvasState.fabric.requestRenderAll())}},{key:"duplicate",value:function(){var t=this,e=this.get();e&&(this.deselect(),e.clone((function(n){n.set({left:e.left+10,top:e.top+10,data:Object.assign(Object.assign({},e.data),{id:Ip(10)}),name:e.name}),t.canvasState.fabric.add(n),t.select(n),t.canvasState.fabric.requestRenderAll()})))}},{key:"getId",value:function(){var t=this.get();return t&&t.data?t.data.id:null}},{key:"on",value:function(t,e){var n=this.get();n&&n.on(t,e)}},{key:"delete",value:function(){var t=this.get();t&&(this.canvasState.fabric.remove(t),this.canvasState.fabric.requestRenderAll())}},{key:"deselect",value:function(){this.canvasState.fabric.discardActiveObject(),this.canvasState.fabric.requestRenderAll()}},{key:"select",value:function(t){this.canvasState.fabric.setActiveObject(t)}},{key:"syncForm",value:function(){this.get()?this.form.patchValue(function(t){if(!t)return{};var e=t.shadow,n={fill:t.fill,opacity:t.opacity,backgroundColor:t.backgroundColor,stroke:t.stroke,strokeWidth:t.strokeWidth};if(e&&(n.shadow={color:e.color||Fu.shadow.color,blur:e.blur||Fu.shadow.blur,offsetX:e.offsetX||Fu.shadow.offsetX,offsetY:e.offsetY||Fu.shadow.offsetY}),"i-text"===t.type){var i=t;n.textAlign=i.textAlign,n.underline=i.underline,n.linethrough=i.linethrough,n.fontStyle=i.fontStyle,n.fontFamily=i.fontFamily,n.fontWeight=i.fontWeight}return n}(this.get()),{emitEvent:!1}):this.form.patchValue(Object.assign(Object.assign({},this.config.get("pixie.objectDefaults.global")),{fontFamily:this.config.get("pixie.objectDefaults.text.fontFamily")}))}}]),t}()).\u0275fac=function(t){return new(t||Jg)(Zt(Wg),Zt(um),Zt(fm))},Jg.\u0275prov=ft({token:Jg,factory:Jg.\u0275fac}),Jg),pm={frame:null,fonts:[]},vm=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[History] Changed",t}(),gm=function(){var t=function t(e){_classCallCheck(this,t),this.id=e};return t.type="[History] Update Pointer By History Item ID",t}(),mm=function(){var t=function t(e){_classCallCheck(this,t),this.item=e};return t.type="[History] Add Item",t}(),ym=function(){var t=function t(e){_classCallCheck(this,t),this.item=e};return t.type="[History] Replace Current Item",t}(),_m=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[History] Reset",t}(),bm=((em=tm=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"addItem",value:function(t,e){var n=e.item,i=[].concat(_toConsumableArray2(t.getState().items.slice(0,t.getState().pointer+1)),[n]);t.patchState({items:i,pointer:i.length-1})}},{key:"replaceCurrentItem",value:function(t,e){var n=t.getState().items.slice();n[t.getState().pointer]=e.item,t.patchState({items:n})}},{key:"updatePointerById",value:function(t,e){var n=e.id,i=t.getState().items.findIndex((function(t){return t.id===n}));t.patchState({pointer:i})}},{key:"resetHistory",value:function(t){t.patchState({items:[],pointer:0})}}],[{key:"canUndo",value:function(t){return t.pointer-1>-1}},{key:"canRedo",value:function(t){var e=t.items,n=t.pointer;return e.length>n+1}},{key:"items",value:function(t){return t.items}},{key:"activeItemId",value:function(t){return t.items[t.pointer].id}},{key:"item",value:function(t){return sp([tm],(function(e){var n=e.pointer;switch(t){case"previous":n=e.pointer-1;break;case"next":n=e.pointer+1;break;default:n=e.pointer}return e.items[n]}))}}]),t}()).\u0275fac=function(t){return new(t||em)},em.\u0275prov=ft({token:em,factory:em.\u0275fac}),ch([Cp(mm),uh("design:type",Function),uh("design:paramtypes",[Object,mm]),uh("design:returntype",void 0)],em.prototype,"addItem",null),ch([Cp(ym),uh("design:type",Function),uh("design:paramtypes",[Object,ym]),uh("design:returntype",void 0)],em.prototype,"replaceCurrentItem",null),ch([Cp(gm),uh("design:type",Function),uh("design:paramtypes",[Object,gm]),uh("design:returntype",void 0)],em.prototype,"updatePointerById",null),ch([Cp(_m),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],em.prototype,"resetHistory",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],em,"canUndo",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],em,"canRedo",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],em,"items",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],em,"activeItemId",null),em=tm=ch([wp({name:"history",defaults:{items:[],pointer:0}})],em)),km=function(){var t=function t(){_classCallCheck(this,t)};return t.FILTER={name:"Applied: filter",icon:"filter-custom"},t.RESIZE={name:"Applied: resize",icon:"resize-custom"},t.CROP={name:"Applied: crop",icon:"crop-custom"},t.TRANSFORM={name:"Applied: transform",icon:"transform-custom"},t.DRAW={name:"Added: drawing",icon:"pencil-custom"},t.TEXT={name:"Added: text",icon:"text-box-custom"},t.SHAPES={name:"Added: shape",icon:"polygon-custom"},t.STICKERS={name:"Added: sticker",icon:"sticker-custom"},t.FRAME={name:"Added: frame",icon:"frame-custom"},t.MERGE={name:"Objects: merged",icon:"merge-custom"},t.CORNERS={name:"Applied: rounded corners",icon:"rounded-corners-custom"},t.BACKGROUND={name:"Changed: background",icon:"background-custom"},t.BG_IMAGE={name:"Changed: background Image",icon:"photo-library"},t.OVERLAY_IMAGE={name:"Added: overlay Image",icon:"photo-library"},t.INITIAL={name:"Initial",icon:"home"},t.LOADED_STATE={name:"Loaded: state",icon:"history"},t.OBJECT_STYLE={name:"Changed: style",icon:"color-custom"},t}(),Cm={selectable:!1,evented:!1,lockMovementX:!0,lockMovementY:!0,lockRotation:!0,lockScalingX:!0,lockScalingY:!0,lockUniScaling:!0,hasControls:!1,hasBorders:!1,hasRotatingPoint:!1,strokeWidth:0},wm=n("epSk"),xm=((cm=function(){function t(e){_classCallCheck(this,t),this.state=e,this.lastPosX=0,this.lastPosY=0,this.isDragging=!1}return _createClass(t,[{key:"set",value:function(t){if(t||(t=this.lastE),t){var e=this.state.calcWrapperSize(),n=this.state.fabric.getWidth(),i=this.state.fabric.getHeight(),r=this.getClientCoords(t),o=this.state.fabric.viewportTransform[4]+r.clientX-this.lastPosX,a=this.state.fabric.viewportTransform[5]+r.clientY-this.lastPosY;o>0||e.width>n?o=0:o+Math.floor(n)-e.width<0&&(o=e.width-Math.floor(n)),a>0||e.height>i?a=0:a+Math.floor(i)-e.height<0&&(a=e.height-Math.floor(i)),this.state.fabric.viewportTransform[4]=o,this.state.fabric.viewportTransform[5]=a,this.state.fabric.requestRenderAll(),this.lastPosX=r.clientX,this.lastPosY=r.clientY,this.lastE=t}}},{key:"reset",value:function(){this.lastPosX=0,this.lastPosY=0,this.lastE=null,this.state.fabric.viewportTransform[4]=0,this.state.fabric.viewportTransform[5]=0}},{key:"init",value:function(){var t=this;this.state.fabric.on("mouse:down",(function(e){if(e.target||t.state.fabric.isDrawingMode)return t.isDragging=!1;var n=t.getClientCoords(e.e);t.isDragging=!0,t.lastPosX=n.clientX,t.lastPosY=n.clientY})),this.state.fabric.on("mouse:move",(function(e){t.isDragging&&t.set(e.e)})),this.state.fabric.on("mouse:up",(function(){t.isDragging=!1}))}},{key:"getClientCoords",value:function(t){var e=0,n=0;return(t=t).touches&&t.touches[0]?(e=t.touches[0].clientX,n=t.touches[0].clientY):(e=t.clientX,n=t.clientY),{clientX:e,clientY:n}}}]),t}()).\u0275fac=function(t){return new(t||cm)(Zt(fm))},cm.\u0275prov=ft({token:cm,factory:cm.\u0275fac}),cm),Sm=((lm=function(){function t(e,n,i,r){_classCallCheck(this,t),this.state=e,this.pan=n,this.config=i,this.store=r,this.maxZoom=200,this.minZoom=100,this.zoomStep=5,this.currentZoom=100}return _createClass(t,[{key:"get",value:function(){return this.currentZoom}},{key:"getScaleFactor",value:function(){return this.state.fabric.getZoom()}},{key:"zoomIn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.zoomStep;this.set(this.currentZoom+t)}},{key:"canZoomIn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.zoomStep;return this.currentZoom+t<=this.maxZoom}},{key:"canZoomOut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.zoomStep;return this.currentZoom-t>=this.minZoom}},{key:"zoomOut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.zoomStep;this.set(this.currentZoom-t)}},{key:"set",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!((t=Math.trunc(t))<this.minZoom||t>this.maxZoom)){var n=t/100,i=this.state.original.width*n,r=this.state.original.height*n;this.state.fabric.setZoom(n),e&&(this.state.fabric.setHeight(r),this.state.fabric.setWidth(i)),this.currentZoom=t,this.store.dispatch(new Gu(this.currentZoom))}}},{key:"fitToScreen",value:function(){if(this.config.get("pixie.tools.zoom.fitImageToScreen")){var t=this.state.calcWrapperSize();if(t.width&&t.height){var e=t.width-40,n=t.height-40;if(this.state.original.height>n||this.state.original.width>e){var i=Math.min(n/this.state.original.height,e/this.state.original.width),r=Math.trunc(100*i);this.minZoom=Math.floor(r/this.zoomStep)*this.zoomStep}else this.minZoom=100;this.currentZoom!==this.minZoom&&this.set(this.minZoom)}}}},{key:"init",value:function(){this.config.get("pixie.tools.zoom.allowUserZoom")&&(this.bindMouseWheel(),this.bindToPinchZoom())}},{key:"bindMouseWheel",value:function(){var t=this;this.state.fabric.on("mouse:wheel",(function(e){e.e.preventDefault(),e.e.stopPropagation(),e.e.deltaY<0?t.zoomIn():t.zoomOut(),t.pan.set(),t.state.fabric.requestRenderAll()}))}},{key:"bindToPinchZoom",value:function(){var t=this,e=new Hammer.Manager(this.state.maskWrapperEl),n=new Hammer.Pinch;e.add([n]),e.on("pinch",(function(e){var n=Math.abs(e.overallVelocity);"pinchout"===e.additionalEvent?t.zoomIn(n):t.zoomOut(n),t.pan.set(),t.state.fabric.requestRenderAll()}))}}]),t}()).\u0275fac=function(t){return new(t||lm)(Zt(fm),Zt(xm),Zt(um),Zt(pp))},lm.\u0275prov=ft({token:lm,factory:lm.\u0275fac}),lm),Em=((sm=function(){function t(e,n,i,r,o){_classCallCheck(this,t),this.pan=e,this.zoom=n,this.state=i,this.activeObject=r,this.config=o,this.minWidth=50,this.minHeight=50}return _createClass(t,[{key:"render",value:function(){this.state.fabric.requestRenderAll()}},{key:"fabric",value:function(){return this.state.fabric}},{key:"getObjectById",value:function(t){return this.state.fabric.getObjects().find((function(e){return e.data&&e.data.id===t}))}},{key:"resize",value:function(t,e){this.state.fabric.setWidth(t*this.zoom.getScaleFactor()),this.state.fabric.setHeight(e*this.zoom.getScaleFactor()),this.state.original.width=t,this.state.original.height=e}},{key:"loadMainImage",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mainImage";return new Promise((function(r){e.state.contentLoadingState$.next({name:i,loading:!0}),e.loadImage(t).then((function(t){if(n)e.fabric().clear();else{var o=e.getMainImage();e.fabric().remove(o)}t.set(Cm),t.name=Ap.mainImage.name,e.state.fabric.add(t),e.resize(t.width,t.height),e.zoom.fitToScreen(),e.state.contentLoadingState$.next({name:i,loading:!1}),r(t);var a=e.config.get("pixie.onMainImageLoaded");a&&a(t)}))}))}},{key:"loadImage",value:function(t){var e=this;return new Promise((function(n){wm.fabric.util.loadImage(t,(function(t){return n(new wm.fabric.Image(t))}),null,e.config.get("pixie.crossOrigin"))}))}},{key:"openNew",value:function(t,e){var n=this;return t=t<this.minWidth?this.minWidth:t,e=e<this.minHeight?this.minHeight:e,this.state.fabric.clear(),this.resize(t,e),new Promise((function(i){setTimeout((function(){n.zoom.fitToScreen(),n.state.contentLoadingState$.next({name:"blank",loading:!1}),i({width:t,height:e})}))}))}},{key:"openImage",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(i){wm.fabric.util.loadImage(t,(function(t){if(t){var r=new wm.fabric.Image(t);r.name=Ap.image.name,r.opacity=0;var o=e.state.original.width,a=e.state.original.height;if(n&&(r.width>=o||r.height>=a)){var s=o-.1*o,l=1/Math.min((a-.1*a)/r.getScaledHeight(),s/r.getScaledWidth());r.scaleX=r.scaleX*(1/l),r.scaleY=r.scaleY*(1/l)}e.state.fabric.add(r),r.viewportCenter(),r.setCoords(),e.render(),e.zoom.fitToScreen(),r.animate("opacity","1",{duration:425,onChange:function(){e.render()},onComplete:function(){i(r)}})}}))}))}},{key:"getMainImage",value:function(){return this.state.fabric.getObjects().find((function(t){return t.name===Ap.mainImage.name}))}},{key:"on",value:function(t,e){this.fabric().on(t,e)}}]),t}()).\u0275fac=function(t){return new(t||sm)(Zt(xm),Zt(Sm),Zt(fm),Zt(dm),Zt(um))},sm.\u0275prov=ft({token:sm,factory:sm.\u0275fac}),sm),Tm=((am=function(){function t(e,n,i,r){_classCallCheck(this,t),this.canvas=e,this.activeObject=n,this.store=i,this.zone=r,this.objects=[],this.init()}return _createClass(t,[{key:"getAll",value:function(){return this.objects}},{key:"get",value:function(t){return this.objects.find((function(e){return e.name===t}))}},{key:"getById",value:function(t){return this.objects.find((function(e){return e.data.id===t}))}},{key:"isActive",value:function(t){var e="string"==typeof t?t:t.data.id;return this.activeObject.getId()===e}},{key:"has",value:function(t){return this.objects.findIndex((function(e){return e.name===t}))>-1}},{key:"select",value:function(t){this.canvas.state.fabric.setActiveObject(t),this.canvas.state.fabric.requestRenderAll()}},{key:"syncObjects",value:function(){this.objects=this.canvas.fabric().getObjects().filter((function(t){return t.name&&!t.name.includes("crop.")&&!t.name.includes("round.")&&!t.name.includes("frame.")})).reverse(),this.store.dispatch(new Xu)}},{key:"init",value:function(){var t=this;this.canvas.state.loaded.subscribe((function(){t.syncObjects(),t.canvas.fabric().on("object:added",(function(e){t.zone.run((function(){return t.syncObjects()}))})),t.canvas.fabric().on("object:removed",(function(){t.zone.run((function(){return t.syncObjects()}))}))}))}}]),t}()).\u0275fac=function(t){return new(t||am)(Zt(Em),Zt(dm),Zt(pp),Zt(ou))},am.\u0275prov=ft({token:am,factory:am.\u0275fac}),am),Om=((om=function(){function t(e){_classCallCheck(this,t),this.canvas=e,this.corners=["topLeft","topRight","bottomLeft","bottomRight"],this.sides=["top","right","bottom","left"]}return _createClass(t,[{key:"getPartNames",value:function(){return this.corners.concat(this.sides)}},{key:"exists",value:function(){return null!=this.config}},{key:"remove",value:function(){var t=this;this.exists()&&(this.canvas.fabric().remove(this.group),this.group.off(),this.group=null,this.config=null,this.getPartNames().forEach((function(e){t[e]=null})),this.canvas.render())}},{key:"is",value:function(t){return!!this.config&&this.config.name===t.name}},{key:"changeColor",value:function(t){var e=this;"basic"===this.config.mode&&(this.getPartNames().forEach((function(n){e[n].set("fill",t)})),this.canvas.render())}},{key:"isBasic",value:function(){return this.config&&"basic"===this.config.mode}},{key:"getMinSize",value:function(){if(this.exists())return this.config.size.min||1}},{key:"getMaxSize",value:function(){if(this.exists())return this.config.size.max||35}},{key:"getDefaultSize",value:function(){if(this.exists())return this.config.size.default||15}}]),t}()).\u0275fac=function(t){return new(t||om)(Zt(Em))},om.\u0275prov=ft({token:om,factory:om.\u0275fac}),om),Am=((rm=function(){function t(e,n,i){_classCallCheck(this,t),this.config=e,this.activeFrame=n,this.canvas=i}return _createClass(t,[{key:"fillParts",value:function(t){var e=this;this.patternCache.forEach((function(n){e.fillPartWithPattern(n,t)}))}},{key:"fillPartWithPattern",value:function(t,e){var n=new wm.fabric.StaticCanvas;n.add(t.img);var i=new wm.fabric.Pattern({source:function(){var e=t.img.getScaledWidth(),i=t.img.getScaledHeight();return e>1&&i>1&&(n.setDimensions({width:e,height:i}),n.renderAll()),n.getElement()},repeat:"repeat"===e?"repeat":"no-repeat"});this.activeFrame[t.name]&&this.activeFrame[t.name].set("fill",i)}},{key:"scale",value:function(t){var e=this,n=this.activeFrame.config.mode;this.patternCache&&(t/=this.canvas.fabric().getRetinaScaling(),this.patternCache.forEach((function(i){"top"===i.name||"bottom"===i.name?"stretch"===n?(e.scalePatternToWidth(i.img,e.canvas.state.original.width-2*t+4),e.scalePatternToHeight(i.img,t)):i.img.scaleToHeight(t):"left"!==i.name&&"right"!==i.name||"stretch"!==n?i.img.scaleToWidth(t):(e.scalePatternToWidth(i.img,t),e.scalePatternToHeight(i.img,e.canvas.state.original.height-2*t+4))})))}},{key:"scalePatternToWidth",value:function(t,e){var n=t.getBoundingRect().width/t.getScaledWidth();t.set("scaleX",e/t.width/n),t.setCoords()}},{key:"scalePatternToHeight",value:function(t,e){var n=t.getBoundingRect().height/t.getScaledHeight();t.set("scaleY",e/t.height/n),t.setCoords()}},{key:"load",value:function(t){var e=this,n=this.activeFrame.getPartNames().map((function(n){return new Promise((function(i){var r=Object.assign({},Cm);e.config.get("pixie.crossOrigin")&&(r.crossOrigin="anonymous"),wm.fabric.Image.fromURL(e.getPartUrl(t,n),(function(t){i({name:n,img:t})}),r)}))}));return Promise.all(n).then((function(n){e.patternCache=n,e.fillParts(t.mode)}))}},{key:"getPartUrl",value:function(t,e){return this.getBaseUrl(t)+"/"+e+".png"}},{key:"getBaseUrl",value:function(t){return this.config.getAssetUrl("images/frames/"+t.name,!0)}}]),t}()).\u0275fac=function(t){return new(t||rm)(Zt(um),Zt(Om),Zt(Em))},rm.\u0275prov=ft({token:rm,factory:rm.\u0275fac}),rm),Im=((im=function(){function t(e,n,i,r){_classCallCheck(this,t),this.config=e,this.activeFrame=n,this.canvas=i,this.patterns=r}return _createClass(t,[{key:"build",value:function(t,e){var n=this;if(this.createGroup(t),this.createParts(t),this.resize(e),this.activeFrame.config=t,this.canvas.fabric().add(this.activeFrame.group),"basic"===t.mode)return this.canvas.render();this.patterns.load(t).then((function(){n.patterns.scale(e),n.canvas.render()}))}},{key:"createGroup",value:function(t){this.activeFrame.group=new wm.fabric.Group([],Object.assign({name:"frame.group",excludeFromExport:!0,width:this.canvas.state.original.width,height:this.canvas.state.original.height,data:{frameName:t.name}},Cm))}},{key:"createParts",value:function(t){var e=this;this.activeFrame.getPartNames().forEach((function(n){var i="basic"===t.mode?e.config.get("pixie.objectDefaults.global.fill"):null;e.activeFrame[n]=new wm.fabric.Rect(Object.assign(Object.assign({},Cm),{fill:i,name:"frame.rect."+n})),e.activeFrame.group.add(e.activeFrame[n])}))}},{key:"resize",value:function(t){var e=this.canvas.state.original.width,n=this.canvas.state.original.height,i=this.activeFrame,r=t;this.positionPart("topLeft",{width:r,height:r}),this.positionPart("topRight",{left:e-i.topLeft.getScaledWidth(),width:r,height:r}),this.positionPart("top",{left:i.topLeft.getScaledWidth()-2,width:e-i.topLeft.getScaledWidth()-i.topRight.getScaledWidth()+4,height:r}),this.positionPart("bottomLeft",{top:n-i.topLeft.getScaledHeight(),width:r,height:r}),this.positionPart("left",{top:i.topLeft.getScaledHeight()-2,width:r,height:n-i.topLeft.getScaledHeight()-i.bottomLeft.getScaledHeight()+4}),this.positionPart("bottomRight",{left:e-i.bottomLeft.getScaledWidth(),top:n-i.topRight.getScaledWidth(),width:r,height:r}),this.positionPart("bottom",{left:i.bottomLeft.getScaledWidth()-2,top:n-i.top.getScaledHeight(),width:i.top.getScaledWidth()+4,height:r}),this.positionPart("right",{left:e-i.left.getScaledWidth(),top:i.topRight.getScaledHeight()-2,width:i.left.width,height:n-i.topRight.getScaledHeight()-i.bottomRight.getScaledHeight()+4})}},{key:"positionPart",value:function(t,e){e.top=-this.activeFrame.group.height/2+(e.top||0),e.left=-this.activeFrame.group.width/2+(e.left||0),this.activeFrame[t].set(e)}}]),t}()).\u0275fac=function(t){return new(t||im)(Zt(um),Zt(Om),Zt(Em),Zt(Am))},im.\u0275prov=ft({token:im,factory:im.\u0275fac}),im),Pm=((nm=function(){function t(e,n,i,r,o){var a=this;_classCallCheck(this,t),this.config=e,this.canvas=n,this.patterns=i,this.activeFrame=r,this.frameBuilder=o,this.frames=[],this.config.all$().subscribe((function(){a.frames=a.config.get("pixie.tools.frame.items")})),this.canvas.state.loaded.subscribe((function(){a.canvas.fabric().on("object:added",(function(){a.activeFrame.group&&a.activeFrame.group.moveTo(98)}))}))}return _createClass(t,[{key:"add",value:function(t){var e=this.getByName(t);if(!this.activeFrame.is(e)){this.activeFrame.exists()&&this.activeFrame.remove();var n=this.calcFrameSize(e.size.default);this.frameBuilder.build(e,n)}}},{key:"resize",value:function(t){var e=this.calcFrameSize(t);this.frameBuilder.resize(e),this.patterns.scale(e),this.canvas.render()}},{key:"changeColor",value:function(t){this.activeFrame.changeColor(t)}},{key:"remove",value:function(){this.activeFrame.remove()}},{key:"getByName",value:function(t){return this.getAll().find((function(e){return e.name===t}))}},{key:"getActive",value:function(){return this.activeFrame.config}},{key:"getAll",value:function(){return this.frames}},{key:"calcFrameSize",value:function(t){return t/100*Math.min(this.canvas.state.original.width,this.canvas.state.original.height)}}]),t}()).\u0275fac=function(t){return new(t||nm)(Zt(um),Zt(Em),Zt(Am),Zt(Om),Zt(Im))},nm.\u0275prov=ft({token:nm,factory:nm.\u0275fac,providedIn:"root"}),nm),Dm=n("J9Y1"),Rm=function t(){_classCallCheck(this,t)},Fm=function t(){_classCallCheck(this,t)},Mm=function(){function t(e){var n=this;_classCallCheck(this,t),this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?function(){n.headers=new Map,e.split("\n").forEach((function(t){var e=t.indexOf(":");if(e>0){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 _createClass(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,_toConsumableArray2(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}(),jm=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"encodeKey",value:function(t){return Lm(t)}},{key:"encodeValue",value:function(t){return Lm(t)}},{key:"decodeKey",value:function(t){return decodeURIComponent(t)}},{key:"decodeValue",value:function(t){return decodeURIComponent(t)}}]),t}();function Lm(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 Nm=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_classCallCheck(this,t),this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new jm,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){var n=new Map;return t.length>0&&t.split("&").forEach((function(t){var i=t.indexOf("="),r=_slicedToArray(-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],2),o=r[0],a=r[1],s=n.get(o)||[];s.push(a),n.set(o,s)})),n}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach((function(t){var i=n.fromObject[t];e.map.set(t,Array.isArray(i)?i:[i])}))):this.map=null}return _createClass(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 Bm(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function zm(t){return"undefined"!=typeof Blob&&t instanceof Blob}function Vm(t){return"undefined"!=typeof FormData&&t instanceof FormData}var Hm=function(){function t(e,n,i,r){var o;if(_classCallCheck(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 Mm),this.params){var a=this.params.toString();if(0===a.length)this.urlWithParams=n;else{var s=n.indexOf("?");this.urlWithParams=n+(-1===s?"?":s<n.length-1?"&":"")+a}}else this.params=new Nm,this.urlWithParams=n}return _createClass(t,[{key:"serializeBody",value:function(){return null===this.body?null:Bm(this.body)||zm(this.body)||Vm(this.body)||"string"==typeof this.body?this.body:this.body instanceof Nm?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}},{key:"detectContentTypeHeader",value:function(){return null===this.body||Vm(this.body)?null:zm(this.body)?this.body.type||null:Bm(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof Nm?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}},{key:"clone",value:function(){var e=arguments.length>0&&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,l=e.headers||this.headers,c=e.params||this.params;return void 0!==e.setHeaders&&(l=Object.keys(e.setHeaders).reduce((function(t,n){return t.set(n,e.setHeaders[n])}),l)),e.setParams&&(c=Object.keys(e.setParams).reduce((function(t,n){return t.set(n,e.setParams[n])}),c)),new t(n,i,o,{params:c,headers:l,reportProgress:s,responseType:r,withCredentials:a})}}]),t}(),Wm=function(){var t={Sent:0,UploadProgress:1,ResponseHeader:2,DownloadProgress:3,Response:4,User:5};return t[t.Sent]="Sent",t[t.UploadProgress]="UploadProgress",t[t.ResponseHeader]="ResponseHeader",t[t.DownloadProgress]="DownloadProgress",t[t.Response]="Response",t[t.User]="User",t}(),Um=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";_classCallCheck(this,t),this.headers=e.headers||new Mm,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},Ym=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,n),(t=e.call(this,i)).type=Wm.ResponseHeader,t}return _createClass(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}(Um),Xm=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _classCallCheck(this,n),(t=e.call(this,i)).type=Wm.Response,t.body=void 0!==i.body?i.body:null,t}return _createClass(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}(Um),Gm=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(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 ".concat(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}(Um);function qm(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}var Km,Zm,Qm,Jm,$m,ty,ey,ny,iy,ry,oy=((Km=function(){function t(e){_classCallCheck(this,t),this.handler=e}return _createClass(t,[{key:"request",value:function(t,e){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t instanceof Hm)n=t;else{var o=void 0;o=r.headers instanceof Mm?r.headers:new Mm(r.headers);var a=void 0;r.params&&(a=r.params instanceof Nm?r.params:new Nm({fromObject:r.params})),n=new Hm(t,e,void 0!==r.body?r.body:null,{headers:o,params:a,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}var s=th(n).pipe(H((function(t){return i.handler.handle(t)}),void 0,1));if(t instanceof Hm||"events"===r.observe)return s;var l=s.pipe(Mf((function(t){return t instanceof Xm})));switch(r.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return l.pipe(L((function(t){if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body})));case"blob":return l.pipe(L((function(t){if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body})));case"text":return l.pipe(L((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 l.pipe(L((function(t){return t.body})))}case"response":return l;default:throw new Error("Unreachable: unhandled observe type ".concat(r.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 Nm).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,qm(n,e))}},{key:"post",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",t,qm(n,e))}},{key:"put",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",t,qm(n,e))}}]),t}()).\u0275fac=function(t){return new(t||Km)(Zt(Rm))},Km.\u0275prov=ft({token:Km,factory:Km.\u0275fac}),Km),ay=function(){function t(e,n){_classCallCheck(this,t),this.next=e,this.interceptor=n}return _createClass(t,[{key:"handle",value:function(t){return this.interceptor.intercept(t,this.next)}}]),t}(),sy=new Vt("HTTP_INTERCEPTORS"),ly=((Zm=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"intercept",value:function(t,e){return e.handle(t)}}]),t}()).\u0275fac=function(t){return new(t||Zm)},Zm.\u0275prov=ft({token:Zm,factory:Zm.\u0275fac}),Zm),cy=/^\)\]\}',?\n/,uy=function t(){_classCallCheck(this,t)},hy=((Jm=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"build",value:function(){return new XMLHttpRequest}}]),t}()).\u0275fac=function(t){return new(t||Jm)},Jm.\u0275prov=ft({token:Jm,factory:Jm.\u0275fac}),Jm),fy=((Qm=function(){function t(e){_classCallCheck(this,t),this.xhrFactory=e}return _createClass(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 b((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,l=function(){if(null!==s)return s;var e=1223===i.status?204:i.status,n=i.statusText||"OK",r=new Mm(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 Ym({headers:r,status:e,statusText:n,url:o})},c=function(){var e=l(),r=e.headers,o=e.status,a=e.statusText,s=e.url,c=null;204!==o&&(c=void 0===i.response?i.responseText:i.response),0===o&&(o=c?200:0);var u=o>=200&&o<300;if("json"===t.responseType&&"string"==typeof c){var h=c;c=c.replace(cy,"");try{c=""!==c?JSON.parse(c):null}catch(f){c=h,u&&(u=!1,c={error:f,text:c})}}u?(n.next(new Xm({body:c,headers:r,status:o,statusText:a,url:s||void 0})),n.complete()):n.error(new Gm({error:c,headers:r,status:o,statusText:a,url:s||void 0}))},u=function(t){var e=l().url,r=new Gm({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:e||void 0});n.error(r)},h=!1,f=function(e){h||(n.next(l()),h=!0);var r={type:Wm.DownloadProgress,loaded:e.loaded};e.lengthComputable&&(r.total=e.total),"text"===t.responseType&&i.responseText&&(r.partialText=i.responseText),n.next(r)},d=function(t){var e={type:Wm.UploadProgress,loaded:t.loaded};t.lengthComputable&&(e.total=t.total),n.next(e)};return i.addEventListener("load",c),i.addEventListener("error",u),t.reportProgress&&(i.addEventListener("progress",f),null!==a&&i.upload&&i.upload.addEventListener("progress",d)),i.send(a),n.next({type:Wm.Sent}),function(){i.removeEventListener("error",u),i.removeEventListener("load",c),t.reportProgress&&(i.removeEventListener("progress",f),null!==a&&i.upload&&i.upload.removeEventListener("progress",d)),i.abort()}}))}}]),t}()).\u0275fac=function(t){return new(t||Qm)(Zt(uy))},Qm.\u0275prov=ft({token:Qm,factory:Qm.\u0275fac}),Qm),dy=new Vt("XSRF_COOKIE_NAME"),py=new Vt("XSRF_HEADER_NAME"),vy=function t(){_classCallCheck(this,t)},gy=((iy=function(){function t(e,n,i){_classCallCheck(this,t),this.doc=e,this.platform=n,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return _createClass(t,[{key:"getToken",value:function(){if("server"===this.platform)return null;var t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ef(t,this.cookieName),this.lastCookieString=t),this.lastToken}}]),t}()).\u0275fac=function(t){return new(t||iy)(Zt(Ph),Zt(Wc),Zt(dy))},iy.\u0275prov=ft({token:iy,factory:iy.\u0275fac}),iy),my=((ny=function(){function t(e,n){_classCallCheck(this,t),this.tokenService=e,this.headerName=n}return _createClass(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}()).\u0275fac=function(t){return new(t||ny)(Zt(vy),Zt(py))},ny.\u0275prov=ft({token:ny,factory:ny.\u0275fac}),ny),yy=((ey=function(){function t(e,n){_classCallCheck(this,t),this.backend=e,this.injector=n,this.chain=null}return _createClass(t,[{key:"handle",value:function(t){if(null===this.chain){var e=this.injector.get(sy,[]);this.chain=e.reduceRight((function(t,e){return new ay(t,e)}),this.backend)}return this.chain.handle(t)}}]),t}()).\u0275fac=function(t){return new(t||ey)(Zt(Fm),Zt(ka))},ey.\u0275prov=ft({token:ey,factory:ey.\u0275fac}),ey),_y=((ty=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"disable",value:function(){return{ngModule:t,providers:[{provide:my,useClass:ly}]}}},{key:"withOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:t,providers:[e.cookieName?{provide:dy,useValue:e.cookieName}:[],e.headerName?{provide:py,useValue:e.headerName}:[]]}}}]),t}()).\u0275mod=ye({type:ty}),ty.\u0275inj=dt({factory:function(t){return new(t||ty)},providers:[my,{provide:sy,useExisting:my,multi:!0},{provide:vy,useClass:gy},{provide:dy,useValue:"XSRF-TOKEN"},{provide:py,useValue:"X-XSRF-TOKEN"}]}),ty),by=(($m=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:$m}),$m.\u0275inj=dt({factory:function(t){return new(t||$m)},providers:[oy,{provide:Rm,useClass:yy},fy,{provide:Fm,useExisting:fy},hy,{provide:uy,useExisting:hy}],imports:[[_y.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),$m),ky=function(t){return t.Default="There was an issue. Please try again later.",t.DefaultUpload="Could not upload file. Please try again later.",t}({}),Cy=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var n in _classCallCheck(this,t),e)this[n]=e[n]},wy=((ry=function(){function t(e){_classCallCheck(this,t),this.settings=e,this.localizationChange=new pc,this.localization={model:new Cy,name:"",lines:{}}}return _createClass(t,[{key:"t",value:function(t,e){if(!t)return"";if(!this.translationsEnabled())return this.replacePlaceholders(t,e);var n=this.localization.lines[t.toLowerCase().trim()]||t;return this.replacePlaceholders(n,e)}},{key:"replacePlaceholders",value:function(t,e){return e?(Object.keys(e).forEach((function(n){var i=new RegExp(":"+n,"g");t=t.replace(i,e[n])})),t):t}},{key:"getActive",value:function(){return this.localization}},{key:"setLocalization",value:function(t){t&&t.lines&&t.model&&this.localization.model.name!==t.model.name&&(t.lines=this.objectKeysToLowerCase(t.lines),this.localization=t,this.localizationChange.emit())}},{key:"objectKeysToLowerCase",value:function(t){var e={};return Object.keys(t).forEach((function(n){e[n.toLowerCase()]=t[n]})),e}},{key:"translationsEnabled",value:function(){return this.settings.get("i18n.enable")}}]),t}()).\u0275fac=function(t){return new(t||ry)(Zt(um))},ry.\u0275prov=ft({token:ry,factory:ry.\u0275fac,providedIn:"root"}),ry);function xy(t){return null!=t&&"false"!=="".concat(t)}function Sy(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}(t)?Number(t):e}function Ey(t){return Array.isArray(t)?t:[t]}function Ty(t){return null==t?"":"string"==typeof t?t:"".concat(t,"px")}function Oy(t){return t instanceof kl?t.nativeElement:t}function Ay(t,e,n,r){return i(n)&&(r=n,n=void 0),r?Ay(t,e,n).pipe(L((function(t){return l(t)?r.apply(void 0,_toConsumableArray2(t)):r(t)}))):new b((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 l=e;e.on(n,i),a=function(){return l.off(n,i)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var c=e;e.addListener(n,i),a=function(){return c.removeListener(n,i)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var u=0,h=e.length;u<h;u++)t(e[u],n,i,r,o)}r.add(a)}(t,e,(function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),i,n)}))}var Iy=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t,i)).scheduler=t,r.work=i,r}return _createClass(n,[{key:"requestAsyncId",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==i&&i>0?_get(_getPrototypeOf(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 _get(_getPrototypeOf(n.prototype),"recycleAsyncId",this).call(this,t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}}]),n}(qu),Py=new(function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(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<r&&(t=n.shift()));if(this.active=!1,e){for(;++i<r&&(t=n.shift());)t.unsubscribe();throw e}}}]),n}(Zu))(Iy),Dy=1,Ry=Promise.resolve(),Fy={};function My(t){return t in Fy&&(delete Fy[t],!0)}var jy=function(t){var e=Dy++;return Fy[e]=!0,Ry.then((function(){return My(e)&&t()})),e},Ly=function(t){My(t)},Ny=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t,i)).scheduler=t,r.work=i,r}return _createClass(n,[{key:"requestAsyncId",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==i&&i>0?_get(_getPrototypeOf(n.prototype),"requestAsyncId",this).call(this,t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=jy(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 _get(_getPrototypeOf(n.prototype),"recycleAsyncId",this).call(this,t,e,i);0===t.actions.length&&(Ly(e),t.scheduled=void 0)}}]),n}(qu),By=new(function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(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<r&&(t=n.shift()));if(this.active=!1,e){for(;++i<r&&(t=n.shift());)t.unsubscribe();throw e}}}]),n}(Zu))(Ny),zy=function(){function t(e){_classCallCheck(this,t),this.durationSelector=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new Vy(t,this.durationSelector))}}]),t}(),Vy=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t)).durationSelector=i,r.hasValue=!1,r}return _createClass(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=M(this,e);!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=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))}},{key:"notifyNext",value:function(t,e,n,i){this.clearThrottle()}},{key:"notifyComplete",value:function(){this.clearThrottle()}}]),n}(j);function Hy(t){return!l(t)&&t-parseFloat(t)+1>=0}function Wy(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)}}function Uy(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qu;return e=function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=-1;return Hy(e)?i=Number(e)<1?1:Number(e):O(e)&&(n=e),O(n)||(n=Qu),new b((function(e){var r=Hy(t)?t:+t-n.now();return n.schedule(Wy,r,{index:0,period:i,subscriber:e})}))}(t,n)},function(t){return t.lift(new zy(e))}}function Yy(){return Y(1)(th.apply(void 0,arguments))}function Xy(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=e[e.length-1];return O(i)?(e.pop(),function(t){return Yy(e,t,i)}):function(t){return Yy(e,t)}}var Gy=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new qy(t))}}]),t}(),qy=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this,t)).hasPrev=!1,i}return _createClass(n,[{key:"_next",value:function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)}}]),n}(v);function Ky(t,e){return"function"==typeof e?function(n){return n.pipe(Ky((function(n,i){return V(t(n,i)).pipe(L((function(t,r){return e(n,t,i,r)})))})))}:function(e){return e.lift(new Qy(t))}}var Zy,Qy=function(){function t(e){_classCallCheck(this,t),this.project=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new Jy(t,this.project))}}]),t}(),Jy=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t)).project=i,r.index=0,r}return _createClass(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,t,n)}},{key:"_innerSub",value:function(t,e,n){var i=this.innerSubscription;i&&i.unsubscribe();var r=new A(this,e,n),o=this.destination;o.add(r),this.innerSubscription=M(this,t,void 0,void 0,r),this.innerSubscription!==r&&o.add(this.innerSubscription)}},{key:"_complete",value:function(){var t=this.innerSubscription;t&&!t.closed||_get(_getPrototypeOf(n.prototype),"_complete",this).call(this),this.unsubscribe()}},{key:"_unsubscribe",value:function(){this.innerSubscription=null}},{key:"notifyComplete",value:function(t){this.destination.remove(t),this.innerSubscription=null,this.isStopped&&_get(_getPrototypeOf(n.prototype),"_complete",this).call(this)}},{key:"notifyNext",value:function(t,e,n,i,r){this.destination.next(e)}}]),n}(j);try{Zy="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(Oz){Zy=!1}var $y,t_,e_,n_,i_=((n_=function t(e){_classCallCheck(this,t),this._platformId=e,this.isBrowser=this._platformId?"browser"===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&&!Zy)&&"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}).\u0275fac=function(t){return new(t||n_)(Zt(Wc,8))},n_.\u0275prov=ft({factory:function(){return new n_(Zt(Wc,8))},token:n_,providedIn:"root"}),n_),r_=((e_=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:e_}),e_.\u0275inj=dt({factory:function(t){return new(t||e_)}}),e_);function o_(t){return function(){if(null==$y&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return $y=!0}}))}finally{$y=$y||!1}return $y}()?t:!!t.capture}function a_(t){if(function(){if(null==t_){var t="undefined"!=typeof document?document.head:null;t_=!(!t||!t.createShadowRoot&&!t.attachShadow)}return t_}()){var e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}var s_,l_,c_,u_,h_,f_,d_,p_=new Vt("cdk-dir-doc",{providedIn:"root",factory:function(){return Qt(Ph)}}),v_=((l_=function(){function t(e){if(_classCallCheck(this,t),this.value="ltr",this.change=new pc,e){var n=e.documentElement?e.documentElement.dir:null,i=(e.body?e.body.dir:null)||n;this.value="ltr"===i||"rtl"===i?i:"ltr"}}return _createClass(t,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),t}()).\u0275fac=function(t){return new(t||l_)(Zt(p_,8))},l_.\u0275prov=ft({factory:function(){return new l_(Zt(p_,8))},token:l_,providedIn:"root"}),l_),g_=((s_=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:s_}),s_.\u0275inj=dt({factory:function(t){return new(t||s_)}}),s_),m_=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];_classCallCheck(this,t),this._multiple=n,this._emitChanges=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new E,i&&i.length&&(n?i.forEach((function(t){return e._markSelected(t)})):this._markSelected(i[0]),this._selectedToEmit.length=0)}return _createClass(t,[{key:"select",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];this._verifyValueAssignment(n),n.forEach((function(e){return t._markSelected(e)})),this._emitChangeEvent()}},{key:"deselect",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];this._verifyValueAssignment(n),n.forEach((function(e){return t._unmarkSelected(e)})),this._emitChangeEvent()}},{key:"toggle",value:function(t){this.isSelected(t)?this.deselect(t):this.select(t)}},{key:"clear",value:function(){this._unmarkAll(),this._emitChangeEvent()}},{key:"isSelected",value:function(t){return this._selection.has(t)}},{key:"isEmpty",value:function(){return 0===this._selection.size}},{key:"hasValue",value:function(){return!this.isEmpty()}},{key:"sort",value:function(t){this._multiple&&this.selected&&this._selected.sort(t)}},{key:"isMultipleSelection",value:function(){return this._multiple}},{key:"_emitChangeEvent",value:function(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}},{key:"_markSelected",value:function(t){this.isSelected(t)||(this._multiple||this._unmarkAll(),this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}},{key:"_unmarkSelected",value:function(t){this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}},{key:"_unmarkAll",value:function(){var t=this;this.isEmpty()||this._selection.forEach((function(e){return t._unmarkSelected(e)}))}},{key:"_verifyValueAssignment",value:function(t){if(t.length>1&&!this._multiple)throw Error("Cannot pass multiple values into SelectionModel with single-value mode.")}},{key:"selected",get:function(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}}]),t}(),y_=((d_=function(){function t(){_classCallCheck(this,t),this._listeners=[]}return _createClass(t,[{key:"notify",value:function(t,e){var n,i=_createForOfIteratorHelper(this._listeners);try{for(i.s();!(n=i.n()).done;)(0,n.value)(t,e)}catch(r){i.e(r)}finally{i.f()}}},{key:"listen",value:function(t){var e=this;return this._listeners.push(t),function(){e._listeners=e._listeners.filter((function(e){return t!==e}))}}},{key:"ngOnDestroy",value:function(){this._listeners=[]}}]),t}()).\u0275fac=function(t){return new(t||d_)},d_.\u0275prov=ft({factory:function(){return new d_},token:d_,providedIn:"root"}),d_),__=((f_=function(){function t(e,n,i){_classCallCheck(this,t),this._ngZone=e,this._platform=n,this._scrolled=new E,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=i}return _createClass(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 b((function(n){t._globalSubscription||t._addGlobalListener();var i=e>0?t._scrolled.pipe(Uy(e)).subscribe(n):t._scrolled.subscribe(n);return t._scrolledCount++,function(){i.unsubscribe(),t._scrolledCount--,t._scrolledCount||t._removeGlobalListener()}})):th()}},{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(Mf((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(){return Ay(t._getWindow().document,"scroll").subscribe((function(){return t._scrolled.next()}))}))}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),t}()).\u0275fac=function(t){return new(t||f_)(Zt(ou),Zt(i_),Zt(Ph,8))},f_.\u0275prov=ft({factory:function(){return new f_(Zt(ou),Zt(i_),Zt(Ph,8))},token:f_,providedIn:"root"}),f_),b_=((h_=function(){function t(e,n,i){var r=this;_classCallCheck(this,t),this._platform=e,this._document=i,n.runOutsideAngular((function(){var t=r._getWindow();r._change=e.isBrowser?G(Ay(t,"resize"),Ay(t,"orientationchange")):th(),r._invalidateCache=r.change().subscribe((function(){return r._updateViewportSize()}))}))}return _createClass(t,[{key:"ngOnDestroy",value:function(){this._invalidateCache.unsubscribe()}},{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(Uy(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}()).\u0275fac=function(t){return new(t||h_)(Zt(i_),Zt(ou),Zt(Ph,8))},h_.\u0275prov=ft({factory:function(){return new h_(Zt(i_),Zt(ou),Zt(Ph,8))},token:h_,providedIn:"root"}),h_),k_=((u_=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:u_}),u_.\u0275inj=dt({factory:function(t){return new(t||u_)}}),u_),C_=((c_=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:c_}),c_.\u0275inj=dt({factory:function(t){return new(t||c_)},imports:[[g_,r_,k_],g_,k_]}),c_);function w_(){throw Error("Host already has a portal attached")}var x_,S_,E_=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"attach",value:function(t){return null==t&&function(){throw Error("Attempting to attach a portal to a null PortalOutlet")}(),t.hasAttached()&&w_(),this._attachedHost=t,t.attach(this)}},{key:"detach",value:function(){var t=this._attachedHost;null==t?function(){throw Error("Attempting to detach a portal that is not attached to a host")}():(this._attachedHost=null,t.detach())}},{key:"setAttachedHost",value:function(t){this._attachedHost=t}},{key:"isAttached",get:function(){return null!=this._attachedHost}}]),t}(),T_=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;return _classCallCheck(this,n),(a=e.call(this)).component=t,a.viewContainerRef=i,a.injector=r,a.componentFactoryResolver=o,a}return n}(E_),O_=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this)).templateRef=t,o.viewContainerRef=i,o.context=r,o}return _createClass(n,[{key:"attach",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=e,_get(_getPrototypeOf(n.prototype),"attach",this).call(this,t)}},{key:"detach",value:function(){return this.context=void 0,_get(_getPrototypeOf(n.prototype),"detach",this).call(this)}},{key:"origin",get:function(){return this.templateRef.elementRef}}]),n}(E_),A_=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this)).element=t instanceof kl?t.nativeElement:t,i}return n}(E_),I_=function(){function t(){_classCallCheck(this,t),this._isDisposed=!1,this.attachDomPortal=null}return _createClass(t,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(t){return t||function(){throw Error("Must provide a portal to attach")}(),this.hasAttached()&&w_(),this._isDisposed&&function(){throw Error("This PortalOutlet has already been disposed")}(),t instanceof T_?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof O_?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof A_?(this._attachedPortal=t,this.attachDomPortal(t)):void function(){throw Error("Attempting to attach an unknown Portal type. BasePortalOutlet accepts either a ComponentPortal or a TemplatePortal.")}()}},{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}(),P_=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a){var s,l;return _classCallCheck(this,n),(l=e.call(this)).outletElement=t,l._componentFactoryResolver=i,l._appRef=r,l._defaultInjector=o,l.attachDomPortal=function(t){if(!l._document)throw Error("Cannot attach DOM portal without _document constructor parameter");var e=t.element;if(!e.parentNode)throw Error("DOM portal content must be attached to a parent node.");var i=l._document.createComment("dom-portal");e.parentNode.insertBefore(i,e),l.outletElement.appendChild(e),_get((s=_assertThisInitialized(l),_getPrototypeOf(n.prototype)),"setDisposeFn",s).call(s,(function(){i.parentNode&&i.parentNode.replaceChild(e,i)}))},l._document=a,l}return _createClass(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.detectChanges(),i.rootNodes.forEach((function(t){return e.outletElement.appendChild(t)})),this.setDisposeFn((function(){var t=n.indexOf(i);-1!==t&&n.remove(t)})),i}},{key:"dispose",value:function(){_get(_getPrototypeOf(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}(I_),D_=((S_=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o,a;return _classCallCheck(this,n),(a=e.call(this))._componentFactoryResolver=t,a._viewContainerRef=i,a._isInitialized=!1,a.attached=new pc,a.attachDomPortal=function(t){if(!a._document)throw Error("Cannot attach DOM portal without _document constructor parameter");var e=t.element;if(!e.parentNode)throw Error("DOM portal content must be attached to a parent node.");var i=a._document.createComment("dom-portal");t.setAttachedHost(_assertThisInitialized(a)),e.parentNode.insertBefore(i,e),a._getRootNode().appendChild(e),_get((o=_assertThisInitialized(a),_getPrototypeOf(n.prototype)),"setDisposeFn",o).call(o,(function(){i.parentNode&&i.parentNode.replaceChild(e,i)}))},a._document=r,a}return _createClass(n,[{key:"ngOnInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){_get(_getPrototypeOf(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]),_get(_getPrototypeOf(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 _get(_getPrototypeOf(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()&&_get(_getPrototypeOf(n.prototype),"detach",this).call(this),t&&_get(_getPrototypeOf(n.prototype),"attach",this).call(this,t),this._attachedPortal=t)}},{key:"attachedRef",get:function(){return this._attachedRef}}]),n}(I_)).\u0275fac=function(t){return new(t||S_)(rs(bl),rs(Gl),rs(Ph))},S_.\u0275dir=be({type:S_,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[el]}),S_),R_=((x_=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:x_}),x_.\u0275inj=dt({factory:function(t){return new(t||x_)}}),x_),F_=function(){function t(e,n){_classCallCheck(this,t),this._parentInjector=e,this._customTokens=n}return _createClass(t,[{key:"get",value:function(t,e){var n=this._customTokens.get(t);return void 0!==n?n:this._parentInjector.get(t,e)}}]),t}();function M_(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return n.length?n.some((function(e){return t[e]})):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var j_=function(){function t(e,n){_classCallCheck(this,t),this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=n}return _createClass(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=Ty(-this._previousScrollPosition.left),t.style.top=Ty(-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}();function L_(){return Error("Scroll strategy has already been attached.")}var N_=function(){function t(e,n,i,r){var o=this;_classCallCheck(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 _createClass(t,[{key:"attach",value:function(t){if(this._overlayRef)throw L_();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}(),B_=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"enable",value:function(){}},{key:"disable",value:function(){}},{key:"attach",value:function(){}}]),t}();function z_(t,e){return e.some((function(e){return t.bottom<e.top||t.top>e.bottom||t.right<e.left||t.left>e.right}))}function V_(t,e){return e.some((function(e){return t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right}))}var H_,W_=function(){function t(e,n,i,r){_classCallCheck(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this._config=r,this._scrollSubscription=null}return _createClass(t,[{key:"attach",value:function(t){if(this._overlayRef)throw L_();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;z_(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}(),U_=((H_=function t(e,n,i,r){var o=this;_classCallCheck(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this.noop=function(){return new B_},this.close=function(t){return new N_(o._scrollDispatcher,o._ngZone,o._viewportRuler,t)},this.block=function(){return new j_(o._viewportRuler,o._document)},this.reposition=function(t){return new W_(o._scrollDispatcher,o._viewportRuler,o._ngZone,t)},this._document=r}).\u0275fac=function(t){return new(t||H_)(Zt(__),Zt(b_),Zt(ou),Zt(Ph))},H_.\u0275prov=ft({factory:function(){return new H_(Zt(__),Zt(b_),Zt(ou),Zt(Ph))},token:H_,providedIn:"root"}),H_),Y_=function t(e){if(_classCallCheck(this,t),this.scrollStrategy=new B_,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e)for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];void 0!==e[r]&&(this[r]=e[r])}},X_=function t(e,n,i,r,o){_classCallCheck(this,t),this.offsetX=i,this.offsetY=r,this.panelClass=o,this.originX=e.originX,this.originY=e.originY,this.overlayX=n.overlayX,this.overlayY=n.overlayY},G_=function t(e,n){_classCallCheck(this,t),this.connectionPair=e,this.scrollableViewProperties=n};function q_(t,e){if("top"!==e&&"bottom"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid ".concat(t,' "').concat(e,'". ')+'Expected "top", "bottom" or "center".')}function K_(t,e){if("start"!==e&&"end"!==e&&"center"!==e)throw Error("ConnectedPosition: Invalid ".concat(t,' "').concat(e,'". ')+'Expected "start", "end" or "center".')}var Z_,Q_,J_=((Z_=function(){function t(e){var n=this;_classCallCheck(this,t),this._attachedOverlays=[],this._keydownListener=function(t){for(var e=n._attachedOverlays,i=e.length-1;i>-1;i--)if(e[i]._keydownEvents.observers.length>0){e[i]._keydownEvents.next(t);break}},this._document=e}return _createClass(t,[{key:"ngOnDestroy",value:function(){this._detach()}},{key:"add",value:function(t){this.remove(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0),this._attachedOverlays.push(t)}},{key:"remove",value:function(t){var e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this._detach()}},{key:"_detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}]),t}()).\u0275fac=function(t){return new(t||Z_)(Zt(Ph))},Z_.\u0275prov=ft({factory:function(){return new Z_(Zt(Ph))},token:Z_,providedIn:"root"}),Z_),$_=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine),tb=((Q_=function(){function t(e,n){_classCallCheck(this,t),this._platform=n,this._document=e}return _createClass(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||$_)for(var e=this._document.querySelectorAll('.cdk-overlay-container[platform="server"], .cdk-overlay-container[platform="test"]'),n=0;n<e.length;n++)e[n].parentNode.removeChild(e[n]);var i=this._document.createElement("div");i.classList.add("cdk-overlay-container"),$_?i.setAttribute("platform","test"):t||i.setAttribute("platform","server"),this._document.body.appendChild(i),this._containerElement=i}}]),t}()).\u0275fac=function(t){return new(t||Q_)(Zt(Ph),Zt(i_))},Q_.\u0275prov=ft({factory:function(){return new Q_(Zt(Ph),Zt(i_))},token:Q_,providedIn:"root"}),Q_),eb=function(){function t(e,n,i,r,o,a,s,l){var c=this;_classCallCheck(this,t),this._portalOutlet=e,this._host=n,this._pane=i,this._config=r,this._ngZone=o,this._keyboardDispatcher=a,this._document=s,this._location=l,this._backdropElement=null,this._backdropClick=new E,this._attachments=new E,this._detachments=new E,this._locationChanges=f.EMPTY,this._backdropClickHandler=function(t){return c._backdropClick.next(t)},this._keydownEvents=new E,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}return _createClass(t,[{key:"attach",value:function(t){var e=this,n=this._portalOutlet.attach(t);return!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.asObservable().pipe(zf(1)).subscribe((function(){e.hasAttached()&&e.updatePosition()})),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&this._location&&(this._locationChanges=this._location.subscribe((function(){return e.dispose()}))),n}},{key:"detach",value:function(){if(this.hasAttached()){this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();var t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),t}}},{key:"dispose",value:function(){var t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()}},{key:"hasAttached",value:function(){return this._portalOutlet.hasAttached()}},{key:"backdropClick",value:function(){return this._backdropClick.asObservable()}},{key:"attachments",value:function(){return this._attachments.asObservable()}},{key:"detachments",value:function(){return this._detachments.asObservable()}},{key:"keydownEvents",value:function(){return this._keydownEvents.asObservable()}},{key:"getConfig",value:function(){return this._config}},{key:"updatePosition",value:function(){this._positionStrategy&&this._positionStrategy.apply()}},{key:"updatePositionStrategy",value:function(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}},{key:"updateSize",value:function(t){this._config=Object.assign(Object.assign({},this._config),t),this._updateElementSize()}},{key:"setDirection",value:function(t){this._config=Object.assign(Object.assign({},this._config),{direction:t}),this._updateElementDirection()}},{key:"addPanelClass",value:function(t){this._pane&&this._toggleClasses(this._pane,t,!0)}},{key:"removePanelClass",value:function(t){this._pane&&this._toggleClasses(this._pane,t,!1)}},{key:"getDirection",value:function(){var t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}},{key:"updateScrollStrategy",value:function(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}},{key:"_updateElementDirection",value:function(){this._host.setAttribute("dir",this.getDirection())}},{key:"_updateElementSize",value:function(){if(this._pane){var t=this._pane.style;t.width=Ty(this._config.width),t.height=Ty(this._config.height),t.minWidth=Ty(this._config.minWidth),t.minHeight=Ty(this._config.minHeight),t.maxWidth=Ty(this._config.maxWidth),t.maxHeight=Ty(this._config.maxHeight)}}},{key:"_togglePointerEvents",value:function(t){this._pane.style.pointerEvents=t?"auto":"none"}},{key:"_attachBackdrop",value:function(){var t=this;this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular((function(){requestAnimationFrame((function(){t._backdropElement&&t._backdropElement.classList.add("cdk-overlay-backdrop-showing")}))})):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")}},{key:"_updateStackingOrder",value:function(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}},{key:"detachBackdrop",value:function(){var t,e=this,n=this._backdropElement;if(n){var i=function i(){n&&(n.removeEventListener("click",e._backdropClickHandler),n.removeEventListener("transitionend",i),n.parentNode&&n.parentNode.removeChild(n)),e._backdropElement==n&&(e._backdropElement=null),e._config.backdropClass&&e._toggleClasses(n,e._config.backdropClass,!1),clearTimeout(t)};n.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular((function(){n.addEventListener("transitionend",i)})),n.style.pointerEvents="none",t=this._ngZone.runOutsideAngular((function(){return setTimeout(i,500)}))}}},{key:"_toggleClasses",value:function(t,e,n){var i=t.classList;Ey(e).forEach((function(t){t&&(n?i.add(t):i.remove(t))}))}},{key:"_detachContentWhenStable",value:function(){var t=this;this._ngZone.runOutsideAngular((function(){var e=t._ngZone.onStable.asObservable().pipe(Zf(G(t._attachments,t._detachments))).subscribe((function(){t._pane&&t._host&&0!==t._pane.children.length||(t._pane&&t._config.panelClass&&t._toggleClasses(t._pane,t._config.panelClass,!1),t._host&&t._host.parentElement&&(t._previousHostParent=t._host.parentElement,t._previousHostParent.removeChild(t._host)),e.unsubscribe())}))}))}},{key:"_disposeScrollStrategy",value:function(){var t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}},{key:"overlayElement",get:function(){return this._pane}},{key:"backdropElement",get:function(){return this._backdropElement}},{key:"hostElement",get:function(){return this._host}}]),t}(),nb=/([A-Za-z%]+)$/,ib=function(){function t(e,n,i,r,o){_classCallCheck(this,t),this._viewportRuler=n,this._document=i,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new E,this._resizeSubscription=f.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges.asObservable(),this.setOrigin(e)}return _createClass(t,[{key:"attach",value:function(t){var e=this;if(this._overlayRef&&t!==this._overlayRef)throw Error("This position strategy is already attached to an overlay");this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe((function(){e._isInitialRender=!0,e.apply()}))}},{key:"apply",value:function(){if(!this._isDisposed&&this._platform.isBrowser)if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)this.reapplyLastPosition();else{this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect();var t,e,n=this._originRect,i=this._overlayRect,r=this._viewportRect,o=[],a=_createForOfIteratorHelper(this._preferredPositions);try{for(a.s();!(e=a.n()).done;){var s=e.value,l=this._getOriginPoint(n,s),c=this._getOverlayPoint(l,i,s),u=this._getOverlayFit(c,i,r,s);if(u.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(s,l);this._canFitWithFlexibleDimensions(u,c,r)?o.push({position:s,origin:l,overlayRect:i,boundingBoxRect:this._calculateBoundingBoxRect(l,s)}):(!t||t.overlayFit.visibleArea<u.visibleArea)&&(t={overlayFit:u,overlayPoint:c,originPoint:l,position:s,overlayRect:i})}}catch(m){a.e(m)}finally{a.f()}if(o.length){var h,f=null,d=-1,p=_createForOfIteratorHelper(o);try{for(p.s();!(h=p.n()).done;){var v=h.value,g=v.boundingBoxRect.width*v.boundingBoxRect.height*(v.position.weight||1);g>d&&(d=g,f=v)}}catch(m){p.e(m)}finally{p.f()}return this._isPushed=!1,void this._applyPosition(f.position,f.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&&rb(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 l=0-o,c=o+e.height-n.height,u=this._subtractOverflows(e.width,0-r,r+e.width-n.width),h=this._subtractOverflows(e.height,l,c),f=u*h;return{visibleArea:f,isCompletelyWithinViewport:e.width*e.height===f,fitsInViewportVertically:h===e.height,fitsInViewportHorizontally:u==e.width}}},{key:"_canFitWithFlexibleDimensions",value:function(t,e,n){if(this._hasFlexibleDimensions){var i=n.bottom-e.y,r=n.right-e.x,o=ob(this._overlayRef.getConfig().minHeight),a=ob(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.right,0),s=Math.max(t.y+e.height-o.bottom,0),l=Math.max(o.top-n.top-t.y,0),c=Math.max(o.left-n.left-t.x,0);return i=e.width<=o.width?c||-a:t.x<this._viewportMargin?o.left-n.left-t.x:0,r=e.height<=o.height?l||-s:t.y<this._viewportMargin?o.top-n.top-t.y:0,this._previousPushAmount={x:i,y:r},{x:t.x+i,y:t.y+r}}},{key:"_applyPosition",value:function(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._lastPosition=t,this._positionChanges.observers.length){var n=this._getScrollVisibility(),i=new G_(t,n);this._positionChanges.next(i)}this._isInitialRender=!1}},{key:"_setTransformOrigin",value:function(t){if(this._transformOriginSelector){var e,n=this._boundingBox.querySelectorAll(this._transformOriginSelector),i=t.overlayY;e="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(var r=0;r<n.length;r++)n[r].style.transformOrigin="".concat(e," ").concat(i)}}},{key:"_calculateBoundingBoxRect",value:function(t,e){var n,i,r,o,a,s,l=this._viewportRect,c=this._isRtl();if("top"===e.overlayY)i=t.y,n=l.height-i+this._viewportMargin;else if("bottom"===e.overlayY)r=l.height-t.y+2*this._viewportMargin,n=l.height-r+this._viewportMargin;else{var u=Math.min(l.bottom-t.y+l.top,t.y),h=this._lastBoundingBoxSize.height;n=2*u,i=t.y-u,n>h&&!this._isInitialRender&&!this._growAfterOpen&&(i=t.y-h/2)}if("end"===e.overlayX&&!c||"start"===e.overlayX&&c)s=l.width-t.x+this._viewportMargin,o=t.x-this._viewportMargin;else if("start"===e.overlayX&&!c||"end"===e.overlayX&&c)a=t.x,o=l.right-t.x;else{var f=Math.min(l.right-t.x+l.left,t.x),d=this._lastBoundingBoxSize.width;o=2*f,a=t.x-f,o>d&&!this._isInitialRender&&!this._growAfterOpen&&(a=t.x-d/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=Ty(n.height),i.top=Ty(n.top),i.bottom=Ty(n.bottom),i.width=Ty(n.width),i.left=Ty(n.left),i.right=Ty(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=Ty(r)),o&&(i.maxWidth=Ty(o))}this._lastBoundingBoxSize=n,rb(this._boundingBox.style,i)}},{key:"_resetBoundingBoxStyles",value:function(){rb(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}},{key:"_resetOverlayElementStyles",value:function(){rb(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();rb(n,this._getExactOverlayY(e,t,a)),rb(n,this._getExactOverlayX(e,t,a))}else n.position="static";var s="",l=this._getOffset(e,"x"),c=this._getOffset(e,"y");l&&(s+="translateX(".concat(l,"px) ")),c&&(s+="translateY(".concat(c,"px)")),n.transform=s.trim(),o.maxHeight&&(i?n.maxHeight=Ty(o.maxHeight):r&&(n.maxHeight="")),o.maxWidth&&(i?n.maxWidth=Ty(o.maxWidth):r&&(n.maxWidth="")),rb(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="".concat(this._document.documentElement.clientHeight-(r.y+this._overlayRect.height),"px"):i.top=Ty(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="".concat(this._document.documentElement.clientWidth-(r.x+this._overlayRect.width),"px"):i.left=Ty(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:V_(t,n),isOriginOutsideView:z_(t,n),isOverlayClipped:V_(e,n),isOverlayOutsideView:z_(e,n)}}},{key:"_subtractOverflows",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return n.reduce((function(t,e){return t-Math.max(e,0)}),t)}},{key:"_getNarrowedViewportRect",value:function(){var t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+t-this._viewportMargin,bottom:n.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}},{key:"_isRtl",value:function(){return"rtl"===this._overlayRef.getDirection()}},{key:"_hasExactPosition",value:function(){return!this._hasFlexibleDimensions||this._isPushed}},{key:"_getOffset",value:function(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}},{key:"_validatePositions",value:function(){if(!this._preferredPositions.length)throw Error("FlexibleConnectedPositionStrategy: At least one position is required.");this._preferredPositions.forEach((function(t){K_("originX",t.originX),q_("originY",t.originY),K_("overlayX",t.overlayX),q_("overlayY",t.overlayY)}))}},{key:"_addPanelClasses",value:function(t){var e=this;this._pane&&Ey(t).forEach((function(t){""!==t&&-1===e._appliedPanelClasses.indexOf(t)&&(e._appliedPanelClasses.push(t),e._pane.classList.add(t))}))}},{key:"_clearPanelClasses",value:function(){var t=this;this._pane&&(this._appliedPanelClasses.forEach((function(e){t._pane.classList.remove(e)})),this._appliedPanelClasses=[])}},{key:"_getOriginRect",value:function(){var t=this._origin;if(t instanceof kl)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();var e=t.width||0,n=t.height||0;return{top:t.y,bottom:t.y+n,left:t.x,right:t.x+e,height:n,width:e}}},{key:"positions",get:function(){return this._preferredPositions}}]),t}();function rb(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function ob(t){if("number"!=typeof t&&null!=t){var e=_slicedToArray(t.split(nb),2),n=e[0],i=e[1];return i&&"px"!==i?null:parseFloat(n)}return t||null}var ab,sb,lb,cb,ub,hb=function(){function t(e,n,i,r,o,a,s){_classCallCheck(this,t),this._preferredPositions=[],this._positionStrategy=new ib(i,r,o,a,s).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(e,n)}return _createClass(t,[{key:"attach",value:function(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)}},{key:"dispose",value:function(){this._positionStrategy.dispose()}},{key:"detach",value:function(){this._positionStrategy.detach()}},{key:"apply",value:function(){this._positionStrategy.apply()}},{key:"recalculateLastPosition",value:function(){this._positionStrategy.reapplyLastPosition()}},{key:"withScrollableContainers",value:function(t){this._positionStrategy.withScrollableContainers(t)}},{key:"withFallbackPosition",value:function(t,e,n,i){var r=new X_(t,e,n,i);return this._preferredPositions.push(r),this._positionStrategy.withPositions(this._preferredPositions),this}},{key:"withDirection",value:function(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this}},{key:"withOffsetX",value:function(t){return this._positionStrategy.withDefaultOffsetX(t),this}},{key:"withOffsetY",value:function(t){return this._positionStrategy.withDefaultOffsetY(t),this}},{key:"withLockedPosition",value:function(t){return this._positionStrategy.withLockedPosition(t),this}},{key:"withPositions",value:function(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this}},{key:"setOrigin",value:function(t){return this._positionStrategy.setOrigin(t),this}},{key:"_isRtl",get:function(){return"rtl"===this._overlayRef.getDirection()}},{key:"onPositionChange",get:function(){return this._positionStrategy.positionChanges}},{key:"positions",get:function(){return this._preferredPositions}}]),t}(),fb=function(){function t(){_classCallCheck(this,t),this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}return _createClass(t,[{key:"attach",value:function(t){var e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add("cdk-global-overlay-wrapper"),this._isDisposed=!1}},{key:"top",value:function(){var t=arguments.length>0&&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),l=!("100%"!==r&&"100vh"!==r||a&&"100%"!==a&&"100vh"!==a);t.position=this._cssPosition,t.marginLeft=s?"0":this._leftOffset,t.marginTop=l?"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=l?"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}(),db=((sb=function(){function t(e,n,i,r){_classCallCheck(this,t),this._viewportRuler=e,this._document=n,this._platform=i,this._overlayContainer=r}return _createClass(t,[{key:"global",value:function(){return new fb}},{key:"connectedTo",value:function(t,e,n){return new hb(e,n,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}},{key:"flexibleConnectedTo",value:function(t){return new ib(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}]),t}()).\u0275fac=function(t){return new(t||sb)(Zt(b_),Zt(Ph),Zt(i_),Zt(tb))},sb.\u0275prov=ft({factory:function(){return new sb(Zt(b_),Zt(Ph),Zt(i_),Zt(tb))},token:sb,providedIn:"root"}),sb),pb=0,vb=((ab=function(){function t(e,n,i,r,o,a,s,l,c,u){_classCallCheck(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=l,this._directionality=c,this._location=u}return _createClass(t,[{key:"create",value:function(t){var e=this._createHostElement(),n=this._createPaneElement(e),i=this._createPortalOutlet(n),r=new Y_(t);return r.direction=r.direction||this._directionality.value,new eb(i,e,n,r,this._ngZone,this._keyboardDispatcher,this._document,this._location)}},{key:"position",value:function(){return this._positionBuilder}},{key:"_createPaneElement",value:function(t){var e=this._document.createElement("div");return e.id="cdk-overlay-".concat(pb++),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(xu)),new P_(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}]),t}()).\u0275fac=function(t){return new(t||ab)(Zt(U_),Zt(tb),Zt(bl),Zt(db),Zt(J_),Zt(ka),Zt(ou),Zt(Ph),Zt(v_),Zt(qh,8))},ab.\u0275prov=ft({token:ab,factory:ab.\u0275fac}),ab),gb=[{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"}],mb=new Vt("cdk-connected-overlay-scroll-strategy"),yb=((cb=function t(e){_classCallCheck(this,t),this.elementRef=e}).\u0275fac=function(t){return new(t||cb)(rs(kl))},cb.\u0275dir=be({type:cb,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),cb),_b=((lb=function(){function t(e,n,i,r,o){_classCallCheck(this,t),this._overlay=e,this._dir=o,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=f.EMPTY,this.viewportMargin=0,this.open=!1,this.backdropClick=new pc,this.positionChange=new pc,this.attach=new pc,this.detach=new pc,this.overlayKeydown=new pc,this._templatePortal=new O_(n,i),this._scrollStrategyFactory=r,this.scrollStrategy=this._scrollStrategyFactory()}return _createClass(t,[{key:"ngOnDestroy",value:function(){this._overlayRef&&this._overlayRef.dispose(),this._backdropSubscription.unsubscribe()}},{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=gb),this._overlayRef=this._overlay.create(this._buildConfig()),this._overlayRef.keydownEvents().subscribe((function(e){t.overlayKeydown.next(e),27!==e.keyCode||M_(e)||(e.preventDefault(),t._detachOverlay())}))}},{key:"_buildConfig",value:function(){var t=this._position=this.positionStrategy||this._createPositionStrategy(),e=new Y_({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,e=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(e),e.positionChanges.subscribe((function(e){return t.positionChange.emit(e)})),e}},{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.attach.emit()),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe((function(e){t.backdropClick.emit(e)})):this._backdropSubscription.unsubscribe()}},{key:"_detachOverlay",value:function(){this._overlayRef&&(this._overlayRef.detach(),this.detach.emit()),this._backdropSubscription.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=xy(t)}},{key:"lockPosition",get:function(){return this._lockPosition},set:function(t){this._lockPosition=xy(t)}},{key:"flexibleDimensions",get:function(){return this._flexibleDimensions},set:function(t){this._flexibleDimensions=xy(t)}},{key:"growAfterOpen",get:function(){return this._growAfterOpen},set:function(t){this._growAfterOpen=xy(t)}},{key:"push",get:function(){return this._push},set:function(t){this._push=xy(t)}},{key:"overlayRef",get:function(){return this._overlayRef}},{key:"dir",get:function(){return this._dir?this._dir.value:"ltr"}}]),t}()).\u0275fac=function(t){return new(t||lb)(rs(vb),rs(Yl),rs(Gl),rs(mb),rs(v_,8))},lb.\u0275dir=be({type:lb,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"},exportAs:["cdkConnectedOverlay"],features:[sl]}),lb),bb={provide:mb,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},kb=((ub=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:ub}),ub.\u0275inj=dt({factory:function(t){return new(t||ub)},providers:[vb,bb],imports:[[g_,R_,C_],C_]}),ub);function Cb(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qu;return function(n){return n.lift(new wb(t,e))}}var wb=function(){function t(e,n){_classCallCheck(this,t),this.dueTime=e,this.scheduler=n}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new xb(t,this.dueTime,this.scheduler))}}]),t}(),xb=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this,t)).dueTime=i,o.scheduler=r,o.debouncedSubscription=null,o.lastValue=null,o.hasValue=!1,o}return _createClass(n,[{key:"_next",value:function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Sb,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}(v);function Sb(t){t.debouncedNext()}var Eb,Tb,Ob,Ab,Ib=((Ab=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"create",value:function(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}]),t}()).\u0275fac=function(t){return new(t||Ab)},Ab.\u0275prov=ft({factory:function(){return new Ab},token:Ab,providedIn:"root"}),Ab),Pb=((Ob=function(){function t(e){_classCallCheck(this,t),this._mutationObserverFactory=e,this._observedElements=new Map}return _createClass(t,[{key:"ngOnDestroy",value:function(){var t=this;this._observedElements.forEach((function(e,n){return t._cleanupObserver(n)}))}},{key:"observe",value:function(t){var e=this,n=Oy(t);return new b((function(t){var i=e._observeElement(n).subscribe(t);return function(){i.unsubscribe(),e._unobserveElement(n)}}))}},{key:"_observeElement",value:function(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{var e=new E,n=this._mutationObserverFactory.create((function(t){return e.next(t)}));n&&n.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:n,stream:e,count:1})}return this._observedElements.get(t).stream}},{key:"_unobserveElement",value:function(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}},{key:"_cleanupObserver",value:function(t){if(this._observedElements.has(t)){var e=this._observedElements.get(t),n=e.observer,i=e.stream;n&&n.disconnect(),i.complete(),this._observedElements.delete(t)}}}]),t}()).\u0275fac=function(t){return new(t||Ob)(Zt(Ib))},Ob.\u0275prov=ft({factory:function(){return new Ob(Zt(Ib))},token:Ob,providedIn:"root"}),Ob),Db=((Tb=function(){function t(e,n,i){_classCallCheck(this,t),this._contentObserver=e,this._elementRef=n,this._ngZone=i,this.event=new pc,this._disabled=!1,this._currentSubscription=null}return _createClass(t,[{key:"ngAfterContentInit",value:function(){this._currentSubscription||this.disabled||this._subscribe()}},{key:"ngOnDestroy",value:function(){this._unsubscribe()}},{key:"_subscribe",value:function(){var t=this;this._unsubscribe();var e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular((function(){t._currentSubscription=(t.debounce?e.pipe(Cb(t.debounce)):e).subscribe(t.event)}))}},{key:"_unsubscribe",value:function(){this._currentSubscription&&this._currentSubscription.unsubscribe()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=xy(t),this._disabled?this._unsubscribe():this._subscribe()}},{key:"debounce",get:function(){return this._debounce},set:function(t){this._debounce=Sy(t),this._subscribe()}}]),t}()).\u0275fac=function(t){return new(t||Tb)(rs(Pb),rs(kl),rs(ou))},Tb.\u0275dir=be({type:Tb,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),Tb),Rb=((Eb=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:Eb}),Eb.\u0275inj=dt({factory:function(t){return new(t||Eb)},providers:[Ib]}),Eb);function Fb(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}var Mb,jb,Lb=0,Nb=new Map,Bb=null,zb=((Mb=function(){function t(e){_classCallCheck(this,t),this._document=e}return _createClass(t,[{key:"describe",value:function(t,e){this._canBeDescribed(t,e)&&("string"!=typeof e?(this._setMessageId(e),Nb.set(e,{messageElement:e,referenceCount:0})):Nb.has(e)||this._createMessageElement(e),this._isElementDescribedByMessage(t,e)||this._addMessageReference(t,e))}},{key:"removeDescription",value:function(t,e){if(this._isElementNode(t)){if(this._isElementDescribedByMessage(t,e)&&this._removeMessageReference(t,e),"string"==typeof e){var n=Nb.get(e);n&&0===n.referenceCount&&this._deleteMessageElement(e)}Bb&&0===Bb.childNodes.length&&this._deleteMessagesContainer()}}},{key:"ngOnDestroy",value:function(){for(var t=this._document.querySelectorAll("[cdk-describedby-host]"),e=0;e<t.length;e++)this._removeCdkDescribedByReferenceIds(t[e]),t[e].removeAttribute("cdk-describedby-host");Bb&&this._deleteMessagesContainer(),Nb.clear()}},{key:"_createMessageElement",value:function(t){var e=this._document.createElement("div");this._setMessageId(e),e.textContent=t,this._createMessagesContainer(),Bb.appendChild(e),Nb.set(t,{messageElement:e,referenceCount:0})}},{key:"_setMessageId",value:function(t){t.id||(t.id="cdk-describedby-message-".concat(Lb++))}},{key:"_deleteMessageElement",value:function(t){var e=Nb.get(t),n=e&&e.messageElement;Bb&&n&&Bb.removeChild(n),Nb.delete(t)}},{key:"_createMessagesContainer",value:function(){if(!Bb){var t=this._document.getElementById("cdk-describedby-message-container");t&&t.parentNode.removeChild(t),(Bb=this._document.createElement("div")).id="cdk-describedby-message-container",Bb.setAttribute("aria-hidden","true"),Bb.style.display="none",this._document.body.appendChild(Bb)}}},{key:"_deleteMessagesContainer",value:function(){Bb&&Bb.parentNode&&(Bb.parentNode.removeChild(Bb),Bb=null)}},{key:"_removeCdkDescribedByReferenceIds",value:function(t){var e=Fb(t,"aria-describedby").filter((function(t){return 0!=t.indexOf("cdk-describedby-message")}));t.setAttribute("aria-describedby",e.join(" "))}},{key:"_addMessageReference",value:function(t,e){var n,i,r,o,a=Nb.get(e);n=t,i="aria-describedby",r=a.messageElement.id,(o=Fb(n,i)).some((function(t){return t.trim()==r.trim()}))||(o.push(r.trim()),n.setAttribute(i,o.join(" "))),t.setAttribute("cdk-describedby-host",""),a.referenceCount++}},{key:"_removeMessageReference",value:function(t,e){var n,i,r,o,a=Nb.get(e);a.referenceCount--,n=t,i="aria-describedby",r=a.messageElement.id,(o=Fb(n,i).filter((function(t){return t!=r.trim()}))).length?n.setAttribute(i,o.join(" ")):n.removeAttribute(i),t.removeAttribute("cdk-describedby-host")}},{key:"_isElementDescribedByMessage",value:function(t,e){var n=Fb(t,"aria-describedby"),i=Nb.get(e),r=i&&i.messageElement.id;return!!r&&-1!=n.indexOf(r)}},{key:"_canBeDescribed",value:function(t,e){if(!this._isElementNode(t))return!1;if(e&&"object"==typeof e)return!0;var n=null==e?"":"".concat(e).trim(),i=t.getAttribute("aria-label");return!(!n||i&&i.trim()===n)}},{key:"_isElementNode",value:function(t){return t.nodeType===this._document.ELEMENT_NODE}}]),t}()).\u0275fac=function(t){return new(t||Mb)(Zt(Ph))},Mb.\u0275prov=ft({factory:function(){return new Mb(Zt(Ph))},token:Mb,providedIn:"root"}),Mb),Vb=function(){function t(e){var n=this;_classCallCheck(this,t),this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new E,this._typeaheadSubscription=f.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._skipPredicateFn=function(t){return t.disabled},this._pressedLetters=[],this.tabOut=new E,this.change=new E,e instanceof gc&&e.changes.subscribe((function(t){if(n._activeItem){var e=t.toArray().indexOf(n._activeItem);e>-1&&e!==n._activeItemIndex&&(n._activeItemIndex=e)}}))}return _createClass(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;if(this._items.length&&this._items.some((function(t){return"function"!=typeof t.getLabel})))throw Error("ListKeyManager items in typeahead mode must implement the `getLabel` method.");return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(td((function(e){return t._pressedLetters.push(e)})),Cb(e),Mf((function(){return t._pressedLetters.length>0})),L((function(){return t._pressedLetters.join("")}))).subscribe((function(e){for(var n=t._getItemsArray(),i=1;i<n.length+1;i++){var r=(t._activeItemIndex+i)%n.length,o=n[r];if(!t._skipPredicateFn(o)&&0===o.getLabel().toUpperCase().trim().indexOf(e)){t.setActiveItem(r);break}}t._pressedLetters=[]})),this}},{key:"setActiveItem",value:function(t){var e=this._activeItemIndex;this.updateActiveItem(t),this._activeItemIndex!==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 9:return void this.tabOut.next();case 40:if(this._vertical&&i){this.setNextItemActive();break}return;case 38:if(this._vertical&&i){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;default:return void((i||M_(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(n>=65&&n<=90||n>=48&&n<=57)&&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 gc?this._items.toArray():this._items}},{key:"activeItemIndex",get:function(){return this._activeItemIndex}},{key:"activeItem",get:function(){return this._activeItem}}]),t}(),Hb=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"setActiveItem",value:function(t){this.activeItem&&this.activeItem.setInactiveStyles(),_get(_getPrototypeOf(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.setActiveStyles()}}]),n}(Vb),Wb=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._origin="program",t}return _createClass(n,[{key:"setFocusOrigin",value:function(t){return this._origin=t,this}},{key:"setActiveItem",value:function(t){_get(_getPrototypeOf(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.focus(this._origin)}}]),n}(Vb),Ub=((jb=function(){function t(e){_classCallCheck(this,t),this._platform=e}return _createClass(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(Oz){return null}}((e=t).ownerDocument&&e.ownerDocument.defaultView||window);if(n){var i=n&&n.nodeName.toLowerCase();if(-1===Xb(n))return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&"object"===i)return!1;if((this._platform.BLINK||this._platform.WEBKIT)&&!this.isVisible(n))return!1}var r=t.nodeName.toLowerCase(),o=Xb(t);if(t.hasAttribute("contenteditable"))return-1!==o;if("iframe"===r)return!1;if("audio"===r){if(!t.hasAttribute("controls"))return!1;if(this._platform.BLINK)return!0}if("video"===r){if(!t.hasAttribute("controls")&&this._platform.TRIDENT)return!1;if(this._platform.BLINK||this._platform.FIREFOX)return!0}return("object"!==r||!this._platform.BLINK&&!this._platform.WEBKIT)&&!(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))&&t.tabIndex>=0}},{key:"isFocusable",value:function(t){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")||Yb(t))}(t)&&!this.isDisabled(t)&&this.isVisible(t)}}]),t}()).\u0275fac=function(t){return new(t||jb)(Zt(i_))},jb.\u0275prov=ft({factory:function(){return new jb(Zt(i_))},token:jb,providedIn:"root"}),jb);function Yb(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 Xb(t){if(!Yb(t))return null;var e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}var Gb,qb=function(){function t(e,n,i,r){var o=this,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];_classCallCheck(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 _createClass(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}},{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<e.length;n++)e[n].hasAttribute("cdk-focus-".concat(t))?console.warn("Found use of deprecated attribute 'cdk-focus-".concat(t,"', ")+"use 'cdkFocusRegion".concat(t,"' instead. The deprecated ")+"attribute will be removed in 8.0.0.",e[n]):e[n].hasAttribute("cdk-focus-region-".concat(t))&&console.warn("Found use of deprecated attribute 'cdk-focus-region-".concat(t,"', ")+"use 'cdkFocusRegion".concat(t,"' instead. The deprecated attribute ")+"will be removed in 8.0.0.",e[n]);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}},{key:"focusInitialElement",value:function(){var t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");return t?(t.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 8.0.0",t),Ei()&&!this._checker.isFocusable(t)&&console.warn("Element matching '[cdkFocusInitial]' is not focusable.",t),t.focus(),!0):this.focusFirstTabbableElement()}},{key:"focusFirstTabbableElement",value:function(){var t=this._getRegionBoundary("start");return t&&t.focus(),!!t}},{key:"focusLastTabbableElement",value:function(){var t=this._getRegionBoundary("end");return t&&t.focus(),!!t}},{key:"hasAttached",value:function(){return this._hasAttached}},{key:"_getFirstTabbableElement",value:function(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;for(var e=t.children||t.childNodes,n=0;n<e.length;n++){var i=e[n].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[n]):null;if(i)return i}return null}},{key:"_getLastTabbableElement",value:function(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;for(var e=t.children||t.childNodes,n=e.length-1;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.asObservable().pipe(zf(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}(),Kb=((Gb=function(){function t(e,n,i){_classCallCheck(this,t),this._checker=e,this._ngZone=n,this._document=i}return _createClass(t,[{key:"create",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new qb(t,this._checker,this._ngZone,this._document,e)}}]),t}()).\u0275fac=function(t){return new(t||Gb)(Zt(Ub),Zt(ou),Zt(Ph))},Gb.\u0275prov=ft({factory:function(){return new Gb(Zt(Ub),Zt(ou),Zt(Ph))},token:Gb,providedIn:"root"}),Gb);"undefined"!=typeof Element&&Element;var Zb,Qb=new Vt("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),Jb=new Vt("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),$b=((Zb=function(){function t(e,n,i,r){_classCallCheck(this,t),this._ngZone=n,this._defaultOptions=r,this._document=i,this._liveElement=e||this._createLiveElement()}return _createClass(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),l=1;l<a;l++)s[l-1]=arguments[l];return 1===s.length&&"number"==typeof s[0]?i=s[0]:(n=(e=_slicedToArray(s,2))[0],i=e[1]),this.clear(),clearTimeout(this._previousTimeout),n||(n=o&&o.politeness?o.politeness:"polite"),null==i&&o&&(i=o.duration),this._liveElement.setAttribute("aria-live",n),this._ngZone.runOutsideAngular((function(){return new Promise((function(e){clearTimeout(r._previousTimeout),r._previousTimeout=setTimeout((function(){r._liveElement.textContent=t,e(),"number"==typeof i&&(r._previousTimeout=setTimeout((function(){return r.clear()}),i))}),100)}))}))}},{key:"clear",value:function(){this._liveElement&&(this._liveElement.textContent="")}},{key:"ngOnDestroy",value:function(){clearTimeout(this._previousTimeout),this._liveElement&&this._liveElement.parentNode&&(this._liveElement.parentNode.removeChild(this._liveElement),this._liveElement=null)}},{key:"_createLiveElement",value:function(){for(var t=this._document.getElementsByClassName("cdk-live-announcer-element"),e=this._document.createElement("div"),n=0;n<t.length;n++)t[n].parentNode.removeChild(t[n]);return e.classList.add("cdk-live-announcer-element"),e.classList.add("cdk-visually-hidden"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),e}}]),t}()).\u0275fac=function(t){return new(t||Zb)(Zt(Qb,8),Zt(ou),Zt(Ph),Zt(Jb,8))},Zb.\u0275prov=ft({factory:function(){return new Zb(Zt(Qb,8),Zt(ou),Zt(Ph),Zt(Jb,8))},token:Zb,providedIn:"root"}),Zb);function tk(t){return 0===t.buttons}var ek,nk=new Vt("cdk-focus-monitor-default-options"),ik=o_({passive:!0,capture:!0}),rk=((ek=function(){function t(e,n,i,r){var o=this;_classCallCheck(this,t),this._ngZone=e,this._platform=n,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._documentKeydownListener=function(){o._lastTouchTarget=null,o._setOriginForCurrentEventQueue("keyboard")},this._documentMousedownListener=function(t){if(!o._lastTouchTarget){var e=tk(t)?"keyboard":"mouse";o._setOriginForCurrentEventQueue(e)}},this._documentTouchstartListener=function(t){null!=o._touchTimeoutId&&clearTimeout(o._touchTimeoutId),o._lastTouchTarget=ok(t),o._touchTimeoutId=setTimeout((function(){return o._lastTouchTarget=null}),650)},this._windowFocusListener=function(){o._windowFocused=!0,o._windowFocusTimeoutId=setTimeout((function(){return o._windowFocused=!1}))},this._rootNodeFocusAndBlurListener=function(t){for(var e=ok(t),n="focus"===t.type?o._onFocus:o._onBlur,i=e;i;i=i.parentElement)n.call(o,t,i)},this._document=i,this._detectionMode=(null==r?void 0:r.detectionMode)||0}return _createClass(t,[{key:"monitor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this._platform.isBrowser)return th(null);var n=Oy(t),i=a_(n)||this._getDocument(),r=this._elementInfo.get(n);if(r)return e&&(r.checkChildren=!0),r.subject.asObservable();var o={checkChildren:e,subject:new E,rootNode:i};return this._elementInfo.set(n,o),this._registerGlobalListeners(o),o.subject.asObservable()}},{key:"stopMonitoring",value:function(t){var e=Oy(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=Oy(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=ok(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===ok(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,ik),n.addEventListener("blur",e._rootNodeFocusAndBlurListener,ik)})),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,ik),t.addEventListener("mousedown",e._documentMousedownListener,ik),t.addEventListener("touchstart",e._documentTouchstartListener,ik),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,ik),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,ik),this._rootNodeFocusListenerCount.delete(e))}if(!--this._monitoredElementCount){var i=this._getDocument(),r=this._getWindow();i.removeEventListener("keydown",this._documentKeydownListener,ik),i.removeEventListener("mousedown",this._documentMousedownListener,ik),i.removeEventListener("touchstart",this._documentTouchstartListener,ik),r.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}}]),t}()).\u0275fac=function(t){return new(t||ek)(Zt(ou),Zt(i_),Zt(Ph,8),Zt(nk,8))},ek.\u0275prov=ft({factory:function(){return new ek(Zt(ou),Zt(i_),Zt(Ph,8),Zt(nk,8))},token:ek,providedIn:"root"}),ek);function ok(t){return t.composedPath?t.composedPath()[0]:t.target}var ak,sk,lk,ck,uk,hk,fk=((sk=function(){function t(e,n){_classCallCheck(this,t),this._platform=e,this._document=n}return _createClass(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}()).\u0275fac=function(t){return new(t||sk)(Zt(i_),Zt(Ph))},sk.\u0275prov=ft({factory:function(){return new sk(Zt(i_),Zt(Ph))},token:sk,providedIn:"root"}),sk),dk=((ak=function t(e){_classCallCheck(this,t),e._applyBodyHighContrastModeCssClasses()}).\u0275mod=ye({type:ak}),ak.\u0275inj=dt({factory:function(t){return new(t||ak)(Zt(fk))},imports:[[r_,Rb]]}),ak),pk=new Ol("9.2.4"),vk=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(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=gk||(gk=document.querySelector("base"))?gk.getAttribute("href"):null;return null==n?null:(e=n,lk||(lk=document.createElement("a")),lk.setAttribute("href",e),"/"===lk.pathname.charAt(0)?lk.pathname:"/"+lk.pathname)}},{key:"resetBaseElement",value:function(){gk=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 ef(document.cookie,t)}}],[{key:"makeCurrent",value:function(){var t;t=new n,Oh||(Oh=t)}}]),n}(function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.call(this)}return _createClass(n,[{key:"supportsDOMEvents",value:function(){return!0}}]),n}(function(){return function t(){_classCallCheck(this,t)}}())),gk=null,mk=new Vt("TRANSITION_ID"),yk=[{provide:Lc,useFactory:function(t,e,n){return function(){n.get(Nc).donePromise.then((function(){var n=Ah();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:[mk,Ph,ka],multi:!0}],_k=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"addToWindow",value:function(t){Rt.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},Rt.getAllAngularTestabilities=function(){return t.getAllTestabilities()},Rt.getAllAngularRootElements=function(){return t.getAllRootElements()},Rt.frameworkStabilizers||(Rt.frameworkStabilizers=[]),Rt.frameworkStabilizers.push((function(t){var e=Rt.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?Ah().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}],[{key:"init",value:function(){var e;e=new t,gu=e}}]),t}(),bk=new Vt("EventManagerPlugins"),kk=((ck=function(){function t(e,n){var i=this;_classCallCheck(this,t),this._zone=n,this._eventNameToPlugin=new Map,e.forEach((function(t){return t.manager=i})),this._plugins=e.slice().reverse()}return _createClass(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<n.length;i++){var r=n[i];if(r.supports(t))return this._eventNameToPlugin.set(t,r),r}throw new Error("No event manager plugin found for event ".concat(t))}}]),t}()).\u0275fac=function(t){return new(t||ck)(Zt(bk),Zt(ou))},ck.\u0275prov=ft({token:ck,factory:ck.\u0275fac}),ck),Ck=function(){function t(e){_classCallCheck(this,t),this._doc=e}return _createClass(t,[{key:"addGlobalEventListener",value:function(t,e,n){var i=Ah().getGlobalEventTarget(this._doc,t);if(!i)throw new Error("Unsupported event target ".concat(i," for event ").concat(e));return this.addEventListener(i,e,n)}}]),t}(),wk=((hk=function(){function t(){_classCallCheck(this,t),this._stylesSet=new Set}return _createClass(t,[{key:"addStyles",value:function(t){var e=this,n=new Set;t.forEach((function(t){e._stylesSet.has(t)||(e._stylesSet.add(t),n.add(t))})),this.onStylesAdded(n)}},{key:"onStylesAdded",value:function(t){}},{key:"getAllStyles",value:function(){return Array.from(this._stylesSet)}}]),t}()).\u0275fac=function(t){return new(t||hk)},hk.\u0275prov=ft({token:hk,factory:hk.\u0275fac}),hk),xk=((uk=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this))._doc=t,i._hostNodes=new Set,i._styleNodes=new Set,i._hostNodes.add(t.head),i}return _createClass(n,[{key:"_addStylesToHost",value:function(t,e){var n=this;t.forEach((function(t){var i=n._doc.createElement("style");i.textContent=t,n._styleNodes.add(e.appendChild(i))}))}},{key:"addHost",value:function(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}},{key:"removeHost",value:function(t){this._hostNodes.delete(t)}},{key:"onStylesAdded",value:function(t){var e=this;this._hostNodes.forEach((function(n){return e._addStylesToHost(t,n)}))}},{key:"ngOnDestroy",value:function(){this._styleNodes.forEach((function(t){return Ah().remove(t)}))}}]),n}(wk)).\u0275fac=function(t){return new(t||uk)(Zt(Ph))},uk.\u0275prov=ft({token:uk,factory:uk.\u0275fac}),uk),Sk={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ek=/%COMP%/g;function Tk(t,e,n){for(var i=0;i<e.length;i++){var r=e[i];Array.isArray(r)?Tk(t,r,n):(r=r.replace(Ek,t),n.push(r))}return n}function Ok(t){return function(e){if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}var Ak,Ik,Pk,Dk,Rk,Fk,Mk=((Ak=function(){function t(e,n,i){_classCallCheck(this,t),this.eventManager=e,this.sharedStylesHost=n,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new jk(e)}return _createClass(t,[{key:"createRenderer",value:function(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case ue.Emulated:var n=this.rendererByCompId.get(e.id);return n||(n=new Lk(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n;case ue.Native:case ue.ShadowDom:return new Nk(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){var i=Tk(e.id,e.styles,[]);this.sharedStylesHost.addStyles(i),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}},{key:"begin",value:function(){}},{key:"end",value:function(){}}]),t}()).\u0275fac=function(t){return new(t||Ak)(Zt(kk),Zt(xk),Zt(Bc))},Ak.\u0275prov=ft({token:Ak,factory:Ak.\u0275fac}),Ak),jk=function(){function t(e){_classCallCheck(this,t),this.eventManager=e,this.data=Object.create(null)}return _createClass(t,[{key:"destroy",value:function(){}},{key:"createElement",value:function(t,e){return e?document.createElementNS(Sk[e]||e,t):document.createElement(t)}},{key:"createComment",value:function(t){return document.createComment(t)}},{key:"createText",value:function(t){return document.createTextNode(t)}},{key:"appendChild",value:function(t,e){t.appendChild(e)}},{key:"insertBefore",value:function(t,e,n){t&&t.insertBefore(e,n)}},{key:"removeChild",value:function(t,e){t&&t.removeChild(e)}},{key:"selectRootElement",value:function(t,e){var n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error('The selector "'.concat(t,'" did not match any elements'));return e||(n.textContent=""),n}},{key:"parentNode",value:function(t){return t.parentNode}},{key:"nextSibling",value:function(t){return t.nextSibling}},{key:"setAttribute",value:function(t,e,n,i){if(i){e=i+":"+e;var r=Sk[i];r?t.setAttributeNS(r,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}},{key:"removeAttribute",value:function(t,e,n){if(n){var i=Sk[n];i?t.removeAttributeNS(i,e):t.removeAttribute("".concat(n,":").concat(e))}else t.removeAttribute(e)}},{key:"addClass",value:function(t,e){t.classList.add(e)}},{key:"removeClass",value:function(t,e){t.classList.remove(e)}},{key:"setStyle",value:function(t,e,n,i){i&xl.DashCase?t.style.setProperty(e,n,i&xl.Important?"important":""):t.style[e]=n}},{key:"removeStyle",value:function(t,e,n){n&xl.DashCase?t.style.removeProperty(e):t.style[e]=""}},{key:"setProperty",value:function(t,e,n){t[e]=n}},{key:"setValue",value:function(t,e){t.nodeValue=e}},{key:"listen",value:function(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Ok(n)):this.eventManager.addEventListener(t,e,Ok(n))}}]),t}(),Lk=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;_classCallCheck(this,n),(a=e.call(this,t)).component=r;var s,l=Tk(o+"-"+r.id,r.styles,[]);return i.addStyles(l),a.contentAttr="_ngcontent-%COMP%".replace(Ek,o+"-"+r.id),a.hostAttr=(s=o+"-"+r.id,"_nghost-%COMP%".replace(Ek,s)),a}return _createClass(n,[{key:"applyToHost",value:function(t){_get(_getPrototypeOf(n.prototype),"setAttribute",this).call(this,t,this.hostAttr,"")}},{key:"createElement",value:function(t,e){var i=_get(_getPrototypeOf(n.prototype),"createElement",this).call(this,t,e);return _get(_getPrototypeOf(n.prototype),"setAttribute",this).call(this,i,this.contentAttr,""),i}}]),n}(jk),Nk=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;_classCallCheck(this,n),(a=e.call(this,t)).sharedStylesHost=i,a.hostEl=r,a.component=o,a.shadowRoot=o.encapsulation===ue.ShadowDom?r.attachShadow({mode:"open"}):r.createShadowRoot(),a.sharedStylesHost.addHost(a.shadowRoot);for(var s=Tk(o.id,o.styles,[]),l=0;l<s.length;l++){var c=document.createElement("style");c.textContent=s[l],a.shadowRoot.appendChild(c)}return a}return _createClass(n,[{key:"nodeOrShadowRoot",value:function(t){return t===this.hostEl?this.shadowRoot:t}},{key:"destroy",value:function(){this.sharedStylesHost.removeHost(this.shadowRoot)}},{key:"appendChild",value:function(t,e){return _get(_getPrototypeOf(n.prototype),"appendChild",this).call(this,this.nodeOrShadowRoot(t),e)}},{key:"insertBefore",value:function(t,e,i){return _get(_getPrototypeOf(n.prototype),"insertBefore",this).call(this,this.nodeOrShadowRoot(t),e,i)}},{key:"removeChild",value:function(t,e){return _get(_getPrototypeOf(n.prototype),"removeChild",this).call(this,this.nodeOrShadowRoot(t),e)}},{key:"parentNode",value:function(t){return this.nodeOrShadowRoot(_get(_getPrototypeOf(n.prototype),"parentNode",this).call(this,this.nodeOrShadowRoot(t)))}}]),n}(jk),Bk=((Ik=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){return _classCallCheck(this,n),e.call(this,t)}return _createClass(n,[{key:"supports",value:function(t){return!0}},{key:"addEventListener",value:function(t,e,n){var i=this;return t.addEventListener(e,n,!1),function(){return i.removeEventListener(t,e,n)}}},{key:"removeEventListener",value:function(t,e,n){return t.removeEventListener(e,n)}}]),n}(Ck)).\u0275fac=function(t){return new(t||Ik)(Zt(Ph))},Ik.\u0275prov=ft({token:Ik,factory:Ik.\u0275fac}),Ik),zk=["alt","control","meta","shift"],Vk={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Hk={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},Wk={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},Uk=((Rk=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){return _classCallCheck(this,n),e.call(this,t)}return _createClass(n,[{key:"supports",value:function(t){return null!=n.parseEventName(t)}},{key:"addEventListener",value:function(t,e,i){var r=n.parseEventName(e),o=n.eventCallback(r.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular((function(){return Ah().onAndCancel(t,r.domEventName,o)}))}}],[{key:"parseEventName",value:function(t){var e=t.toLowerCase().split("."),i=e.shift();if(0===e.length||"keydown"!==i&&"keyup"!==i)return null;var r=n._normalizeKey(e.pop()),o="";if(zk.forEach((function(t){var n=e.indexOf(t);n>-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&&Hk.hasOwnProperty(e)&&(e=Hk[e]))}return Vk[e]||e}(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),zk.forEach((function(i){i!=n&&(0,Wk[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}(Ck)).\u0275fac=function(t){return new(t||Rk)(Zt(Ph))},Rk.\u0275prov=ft({token:Rk,factory:Rk.\u0275fac}),Rk),Yk=((Dk=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||Dk)},Dk.\u0275prov=ft({factory:function(){return Zt(Xk)},token:Dk,providedIn:"root"}),Dk),Xk=((Pk=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this))._doc=t,i}return _createClass(n,[{key:"sanitize",value:function(t,e){if(null==e)return null;switch(t){case qi.NONE:return e;case qi.HTML:return Ci(e,"HTML")?ki(e):function(t,e){var n=null;try{Ri=Ri||new Ti(t);var i=e?String(e):"";n=Ri.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=Ri.getInertBodyElement(i)}while(i!==o);var a=new Wi,s=a.sanitizeChildren(Gi(n)||n);return Ei()&&a.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),s}finally{if(n)for(var l=Gi(n)||n;l.firstChild;)l.removeChild(l.firstChild)}}(this._doc,String(e));case qi.STYLE:return Ci(e,"Style")?ki(e):Qi(e);case qi.SCRIPT:if(Ci(e,"Script"))return ki(e);throw new Error("unsafe value used in a script context");case qi.URL:return wi(e),Ci(e,"URL")?ki(e):Ii(String(e));case qi.RESOURCE_URL:if(Ci(e,"ResourceURL"))return ki(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 new gi(t)}},{key:"bypassSecurityTrustStyle",value:function(t){return new mi(t)}},{key:"bypassSecurityTrustScript",value:function(t){return new yi(t)}},{key:"bypassSecurityTrustUrl",value:function(t){return new _i(t)}},{key:"bypassSecurityTrustResourceUrl",value:function(t){return new bi(t)}}]),n}(Yk)).\u0275fac=function(t){return new(t||Pk)(Zt(Ph))},Pk.\u0275prov=ft({factory:function(){return t=Zt(Ht),new Xk(t.get(Ph));var t},token:Pk,providedIn:"root"}),Pk),Gk=_u(Eu,"browser",[{provide:Wc,useValue:"browser"},{provide:Hc,useValue:function(){vk.makeCurrent(),_k.init()},multi:!0},{provide:Ph,useFactory:function(){return function(t){De=t}(document),document},deps:[]}]),qk=[[],{provide:sa,useValue:"root"},{provide:pi,useFactory:function(){return new pi},deps:[]},{provide:bk,useClass:Bk,multi:!0,deps:[Ph,ou,Wc]},{provide:bk,useClass:Uk,multi:!0,deps:[Ph]},[],{provide:Mk,useClass:Mk,deps:[kk,xk,Bc]},{provide:wl,useExisting:Mk},{provide:wk,useExisting:xk},{provide:xk,useClass:xk,deps:[Ph]},{provide:pu,useClass:pu,deps:[ou]},{provide:kk,useClass:kk,deps:[bk,ou]},[]],Kk=((Fk=function(){function t(e){if(_classCallCheck(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 _createClass(t,null,[{key:"withServerTransition",value:function(e){return{ngModule:t,providers:[{provide:Bc,useValue:e.appId},{provide:mk,useExisting:Bc},yk]}}}]),t}()).\u0275mod=ye({type:Fk}),Fk.\u0275inj=dt({factory:function(t){return new(t||Fk)(Zt(Fk,12))},providers:qk,imports:[Pf,Ou]}),Fk);"undefined"!=typeof window&&window;var Zk=function t(){_classCallCheck(this,t)};function Qk(t,e){return{type:7,name:t,definitions:e,options:{}}}function Jk(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:e,timings:t}}function $k(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:t,options:e}}function tC(t){return{type:6,styles:t,offset:null}}function eC(t,e,n){return{type:0,name:t,styles:e,options:n}}function nC(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:t,animation:e,options:n}}function iC(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:t,animation:e,options:n}}function rC(t){Promise.resolve(null).then(t)}var oC=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;_classCallCheck(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 _createClass(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;rC((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}(),aC=function(){function t(e){var n=this;_classCallCheck(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?rC((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 _createClass(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}();function sC(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function lC(t){switch(t.length){case 0:return new oC;case 1:return t[0];default:return new aC(t)}}function cC(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=[],s=[],l=-1,c=null;if(i.forEach((function(t){var n=t.offset,i=n==l,u=i&&c||{};Object.keys(t).forEach((function(n){var i=n,s=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,a),s){case"!":s=r[n];break;case"*":s=o[n];break;default:s=e.normalizeStyleValue(n,i,s,a)}u[i]=s})),i||s.push(u),c=u,l=n})),a.length){var u="\n - ";throw new Error("Unable to animate due to the following errors:".concat(u).concat(a.join(u)))}return s}function uC(t,e,n,i){switch(e){case"start":t.onStart((function(){return i(n&&hC(n,"start",t))}));break;case"done":t.onDone((function(){return i(n&&hC(n,"done",t))}));break;case"destroy":t.onDestroy((function(){return i(n&&hC(n,"destroy",t))}))}}function hC(t,e,n){var i=n.totalTime,r=fC(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 fC(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 dC(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 pC(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var vC=function(t,e){return!1},gC=function(t,e){return!1},mC=function(t,e,n){return[]},yC=sC();(yC||"undefined"!=typeof Element)&&(vC=function(t,e){return t.contains(e)},gC=function(){if(yC||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])}:gC}(),mC=function(t,e,n){var i=[];if(n)i.push.apply(i,_toConsumableArray2(t.querySelectorAll(e)));else{var r=t.querySelector(e);r&&i.push(r)}return i});var _C=null,bC=!1;function kC(t){_C||(_C=("undefined"!=typeof document?document.body:null)||{},bC=!!_C.style&&"WebkitAppearance"in _C.style);var e=!0;return _C.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(!(e=t in _C.style)&&bC)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in _C.style),e}var CC=gC,wC=vC,xC=mC;function SC(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 EC,TC=((EC=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"validateStyleProperty",value:function(t){return kC(t)}},{key:"matchesElement",value:function(t,e){return CC(t,e)}},{key:"containsElement",value:function(t,e){return wC(t,e)}},{key:"query",value:function(t,e,n){return xC(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return n||""}},{key:"animate",value:function(t,e,n,i,r){return arguments.length>5&&void 0!==arguments[5]&&arguments[5],arguments.length>6&&arguments[6],new oC(n,i)}}]),t}()).\u0275fac=function(t){return new(t||EC)},EC.\u0275prov=ft({token:EC,factory:EC.\u0275fac}),EC),OC=function(){var t=function t(){_classCallCheck(this,t)};return t.NOOP=new TC,t}();function AC(t){if("number"==typeof t)return t;var e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:IC(parseFloat(e[1]),e[2])}function IC(t,e){switch(e){case"s":return 1e3*t;default:return t}}function PC(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=IC(parseFloat(a[1]),a[2]);var s=a[3];null!=s&&(r=IC(parseFloat(s),a[4]));var l=a[5];l&&(o=l)}else i=t;if(!n){var c=!1,u=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),c=!0),r<0&&(e.push("Delay values below 0 are not allowed for this animation step."),c=!0),c&&e.splice(u,0,'The provided timing value "'.concat(t,'" is invalid.'))}return{duration:i,delay:r,easing:o}}(t,e,n)}function DC(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 RC(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 DC(t,n);return n}function FC(t,e,n){return n?e+":"+n+";":""}function MC(t){for(var e="",n=0;n<t.style.length;n++){var i=t.style.item(n);e+=FC(0,i,t.style.getPropertyValue(i))}for(var r in t.style)t.style.hasOwnProperty(r)&&!r.startsWith("_")&&(e+=FC(0,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[r]));t.setAttribute("style",e)}function jC(t,e,n){t.style&&(Object.keys(e).forEach((function(i){var r=UC(i);n&&!n.hasOwnProperty(i)&&(n[i]=t.style[r]),t.style[r]=e[i]})),sC()&&MC(t))}function LC(t,e){t.style&&(Object.keys(e).forEach((function(e){var n=UC(e);t.style[n]=""})),sC()&&MC(t))}function NC(t){return Array.isArray(t)?1==t.length?t[0]:$k(t):t}var BC=new RegExp("{{\\s*(.+?)\\s*}}","g");function zC(t){var e=[];if("string"==typeof t){for(var n;n=BC.exec(t);)e.push(n[1]);BC.lastIndex=0}return e}function VC(t,e,n){var i=t.toString(),r=i.replace(BC,(function(t,i){var r=e[i];return e.hasOwnProperty(i)||(n.push("Please provide a value for the animation param ".concat(i)),r=""),r.toString()}));return r==i?t:r}function HC(t){for(var e=[],n=t.next();!n.done;)e.push(n.value),n=t.next();return e}var WC=/-+([a-z0-9])/g;function UC(t){return t.replace(WC,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e[1].toUpperCase()}))}function YC(t,e){return 0===t||0===e}function XC(t,e,n){var i=Object.keys(n);if(i.length&&e.length){var r=e[0],o=[];if(i.forEach((function(t){r.hasOwnProperty(t)||o.push(t),r[t]=n[t]})),o.length)for(var a=function(){var n=e[s];o.forEach((function(e){n[e]=qC(t,e)}))},s=1;s<e.length;s++)a()}return e}function GC(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error("Unable to resolve animation metadata node #".concat(e.type))}}function qC(t,e){return window.getComputedStyle(t)[e]}var KC=new Set(["true","1"]),ZC=new Set(["false","0"]);function QC(t,e){var n=KC.has(t)||ZC.has(t),i=KC.has(e)||ZC.has(e);return function(r,o){var a="*"==t||t==r,s="*"==e||e==o;return!a&&n&&"boolean"==typeof r&&(a=r?KC.has(t):ZC.has(t)),!s&&i&&"boolean"==typeof o&&(s=o?KC.has(e):ZC.has(e)),a&&s}}var JC=new RegExp("s*:selfs*,?","g");function $C(t,e,n){return new tw(t).build(e,n)}var tw=function(){function t(e){_classCallCheck(this,t),this._driver=e}return _createClass(t,[{key:"build",value:function(t,e){var n=new ew(e);return this._resetContextStyleTimingState(n),GC(this,NC(t),n)}},{key:"_resetContextStyleTimingState",value:function(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}},{key:"visitTrigger",value:function(t,e){var n=this,i=e.queryCount=0,r=e.depCount=0,o=[],a=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach((function(t){if(n._resetContextStyleTimingState(e),0==t.type){var s=t,l=s.name;l.toString().split(/\s*,\s*/).forEach((function(t){s.name=t,o.push(n.visitState(s,e))})),s.name=l}else if(1==t.type){var c=n.visitTransition(t,e);i+=c.queryCount,r+=c.depCount,a.push(c)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")})),{type:7,name:t.name,states:o,transitions:a,queryCount:i,depCount:r,options:null}}},{key:"visitState",value:function(t,e){var n=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(n.containsDynamicStyles){var r=new Set,o=i||{};if(n.styles.forEach((function(t){if(nw(t)){var e=t;Object.keys(e).forEach((function(t){zC(e[t]).forEach((function(t){o.hasOwnProperty(t)||r.add(t)}))}))}})),r.size){var a=HC(r.values());e.errors.push('state("'.concat(t.name,'", ...) must define default values for all the following style substitutions: ').concat(a.join(", ")))}}return{type:0,name:t.name,style:n,options:i?{params:i}:null}}},{key:"visitTransition",value:function(t,e){e.queryCount=0,e.depCount=0;var n,i,r,o=GC(this,NC(t.animation),e);return{type:1,matchers:(n=t.expr,i=e.errors,r=[],"string"==typeof n?n.split(/\s*,\s*/).forEach((function(t){return function(t,e,n){if(":"==t[0]){var i=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e)<parseFloat(t)};default:return e.push('The transition alias value "'.concat(t,'" is not supported')),"* => *"}}(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(QC(o,s)),"<"!=a[0]||"*"==o&&"*"==s||e.push(QC(s,o))}(t,r,i)})):r.push(n),r),animation:o,queryCount:e.queryCount,depCount:e.depCount,options:iw(t.options)}}},{key:"visitSequence",value:function(t,e){var n=this;return{type:2,steps:t.steps.map((function(t){return GC(n,t,e)})),options:iw(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=GC(n,t,e);return r=Math.max(r,e.currentTime),o}));return e.currentTime=r,{type:3,steps:o,options:iw(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 rw(PC(t,e).duration,0,"");var i=t;if(i.split(/\s+/).some((function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)}))){var r=rw(0,0,"");return r.dynamic=!0,r.strValue=i,r}return rw((n=n||PC(i,e)).duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;var r=t.styles?t.styles:tC({});if(5==r.type)n=this.visitKeyframes(r,e);else{var o=t.styles,a=!1;if(!o){a=!0;var s={};i.easing&&(s.easing=i.easing),o=tC(s)}e.currentTime+=i.duration+i.delay;var l=this.visitStyle(o,e);l.isEmptyStep=a,n=l}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?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(nw(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,l,c,u,h=e.collectedStyles[e.currentQuerySelector],f=h[i],d=!0;f&&(o!=r&&o>=f.startTime&&r<=f.endTime&&(e.errors.push('The CSS property "'.concat(i,'" that exists between the times of "').concat(f.startTime,'ms" and "').concat(f.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(o,'ms" and "').concat(r,'ms"')),d=!1),o=f.startTime),d&&(h[i]={startTime:o,endTime:r}),e.options&&(a=t[i],s=e.options,l=e.errors,c=s.params||{},(u=zC(a)).length&&u.forEach((function(t){c.hasOwnProperty(t)||l.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,l=0,c=t.steps.map((function(t){var i=n._makeStyleAst(t,e),c=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(nw(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}}));else if(nw(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(i.styles),u=0;return null!=c&&(r++,u=i.offset=c),s=s||u<0||u>1,a=a||u<l,l=u,o.push(u),i}));s&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),a&&e.errors.push("Please ensure that all keyframe offsets are in order");var u=t.steps.length,h=0;r>0&&r<u?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==r&&(h=1/(u-1));var f=u-1,d=e.currentTime,p=e.currentAnimateTimings,v=p.duration;return c.forEach((function(t,r){var a=h>0?r==f?1:h*r:o[r],s=a*v;e.currentTime=d+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:GC(this,NC(t.animation),e),options:iw(t.options)}}},{key:"visitAnimateChild",value:function(t,e){return e.depCount++,{type:9,options:iw(t.options)}}},{key:"visitAnimateRef",value:function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:iw(t.options)}}},{key:"visitQuery",value:function(t,e){var n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;var r=_slicedToArray(function(t){var e=!!t.split(/\s*,\s*/).find((function(t){return":self"==t}));return e&&(t=t.replace(JC,"")),[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,dC(e.collectedStyles,e.currentQuerySelector,{});var s=GC(this,NC(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:iw(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"}:PC(t.timings,e.errors,!0);return{type:12,animation:GC(this,NC(t.animation),e),timings:n,options:null}}}]),t}(),ew=function t(e){_classCallCheck(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 nw(t){return!Array.isArray(t)&&"object"==typeof t}function iw(t){var e;return t?(t=DC(t)).params&&(t.params=(e=t.params)?DC(e):null):t={},t}function rw(t,e,n){return{duration:t,delay:e,easing:n}}function ow(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 aw=function(){function t(){_classCallCheck(this,t),this._map=new Map}return _createClass(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,_toConsumableArray2(e))}},{key:"has",value:function(t){return this._map.has(t)}},{key:"clear",value:function(){this._map.clear()}}]),t}(),sw=new RegExp(":enter","g"),lw=new RegExp(":leave","g");function cw(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,l=arguments.length>8?arguments[8]:void 0,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new uw).buildKeyframes(t,e,n,i,r,o,a,s,l,c)}var uw=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"buildKeyframes",value:function(t,e,n,i,r,o,a,s,l){var c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];l=l||new aw;var u=new fw(t,e,l,i,r,c,[]);u.options=s,u.currentTimeline.setStyles([o],null,u.errors,s),GC(this,n,u);var h=u.timelines.filter((function(t){return t.containsAnimation()}));if(h.length&&Object.keys(a).length){var f=h[h.length-1];f.allowOnlyTimelineStyles()||f.setStyles([a],null,u.errors,s)}return h.length?h.map((function(t){return t.buildKeyframes()})):[ow(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?AC(n.duration):null,o=null!=n.delay?AC(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),GC(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=hw);var a=AC(o.delay);r.delayNextStep(a)}t.steps.length&&(t.steps.forEach((function(t){return GC(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?AC(t.options.delay):0;t.steps.forEach((function(a){var s=e.createSubContext(t.options);o&&s.delayNextStep(o),GC(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 PC(e.params?VC(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?AC(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=hw);var a=i,s=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=s.length;var l=null;s.forEach((function(i,r){e.currentQueryIndex=r;var s=e.createSubContext(t.options,i);o&&s.delayNextStep(o),i===e.element&&(l=s.currentTimeline),GC(n,t.animation,s),s.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,s.currentTimeline.currentTime)})),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),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 l=e.currentTimeline;s&&l.delayNextStep(s);var c=l.currentTime;GC(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-c+(i.startTime-n.currentTimeline.startTime)}}]),t}(),hw={},fw=function(){function t(e,n,i,r,o,a,s,l){_classCallCheck(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=hw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new dw(this._driver,n,0),s.push(this.currentTimeline)}return _createClass(t,[{key:"updateOptions",value:function(t,e){var n=this;if(t){var i=t,r=this.options;null!=i.duration&&(r.duration=AC(i.duration)),null!=i.delay&&(r.delay=AC(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]=VC(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=hw,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 pw(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(sw,"."+this._enterClassName)).replace(lw,"."+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,_toConsumableArray2(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}(),dw=function(){function t(e,n,i,r){_classCallCheck(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 _createClass(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]||"*",e._currentKeyframe[t]="*"})),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]="*"})):RC(t,!1,i)})),i}(t,this._globalTimelineStyles);Object.keys(a).forEach((function(t){var e=VC(a[t],o,n);r._pendingStyles[t]=e,r._localTimelineStyles.hasOwnProperty(t)||(r._backFill[t]=r._globalTimelineStyles.hasOwnProperty(t)?r._globalTimelineStyles[t]:"*"),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 s=RC(o,!0);Object.keys(s).forEach((function(t){var i=s[t];"!"==i?e.add(t):"*"==i&&n.add(t)})),i||(s.offset=a/t.duration),r.push(s)}));var o=e.size?HC(e.values()):[],a=n.size?HC(n.values()):[];if(i){var s=r[0],l=DC(s);s.offset=0,l.offset=1,r=[s,l]}return ow(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}(),pw=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a,s){var l,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return _classCallCheck(this,n),(l=e.call(this,t,i,s.delay)).element=i,l.keyframes=r,l.preStyleProps=o,l.postStyleProps=a,l._stretchStartingKeyframe=c,l.timings={duration:s.duration,delay:s.delay,easing:s.easing},l}return _createClass(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,l=RC(t[0],!1);l.offset=0,o.push(l);var c=RC(t[0],!1);c.offset=vw(s),o.push(c);for(var u=t.length-1,h=1;h<=u;h++){var f=RC(t[h],!1);f.offset=vw((n+f.offset*i)/a),o.push(f)}i=a,n=0,r="",t=o}return ow(this.element,t,this.preStyleProps,this.postStyleProps,i,n,r,!0)}}]),n}(dw);function vw(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 gw=function t(){_classCallCheck(this,t)},mw=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"normalizePropertyName",value:function(t,e){return UC(t)}},{key:"normalizeStyleValue",value:function(t,e,n,i){var r="",o=n.toString().trim();if(yw[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}(gw),yw=function(t){var e={};return t.forEach((function(t){return e[t]=!0})),e}("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(","));function _w(t,e,n,i,r,o,a,s,l,c,u,h,f){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:o,toState:i,toStyles:a,timelines:s,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:h,errors:f}}var bw={},kw=function(){function t(e,n,i){_classCallCheck(this,t),this._triggerName=e,this.ast=n,this._stateStyles=i}return _createClass(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,l,c){var u=[],h=this.ast.options&&this.ast.options.params||bw,f=this.buildStyles(n,a&&a.params||bw,u),d=s&&s.params||bw,p=this.buildStyles(i,d,u),v=new Set,g=new Map,m=new Map,y="void"===i,_={params:Object.assign(Object.assign({},h),d)},b=c?[]:cw(t,e,this.ast.animation,r,o,f,p,_,l,u),k=0;if(b.forEach((function(t){k=Math.max(t.duration+t.delay,k)})),u.length)return _w(e,this._triggerName,n,i,y,f,p,[],[],g,m,k,u);b.forEach((function(t){var n=t.element,i=dC(g,n,{});t.preStyleProps.forEach((function(t){return i[t]=!0}));var r=dC(m,n,{});t.postStyleProps.forEach((function(t){return r[t]=!0})),n!==e&&v.add(n)}));var C=HC(v.values());return _w(e,this._triggerName,n,i,y,f,p,b,C,g,m,k)}}]),t}(),Cw=function(){function t(e,n){_classCallCheck(this,t),this.styles=e,this.defaultParams=n}return _createClass(t,[{key:"buildStyles",value:function(t,e){var n={},i=DC(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=VC(o,i,e)),n[t]=o}))}})),n}}]),t}(),ww=function(){function t(e,n){var i=this;_classCallCheck(this,t),this.name=e,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach((function(t){i.states[t.name]=new Cw(t.style,t.options&&t.options.params||{})})),xw(this.states,"true","1"),xw(this.states,"false","0"),n.transitions.forEach((function(t){i.transitionFactories.push(new kw(e,t,i.states))})),this.fallbackTransition=new kw(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},this.states)}return _createClass(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 xw(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var Sw=new aw,Ew=function(){function t(e,n,i){_classCallCheck(this,t),this.bodyNode=e,this._driver=n,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}return _createClass(t,[{key:"register",value:function(t,e){var n=[],i=$C(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: ".concat(n.join("\n")));this._animations[t]=i}},{key:"_buildPlayer",value:function(t,e,n){var i=t.element,r=cC(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],s=new Map;if(a?(n=cw(this._driver,e,a,"ng-enter","ng-leave",{},{},r,Sw,o)).forEach((function(t){var e=dC(s,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: ".concat(o.join("\n")));s.forEach((function(t,e){Object.keys(t).forEach((function(n){t[n]=i._driver.computeStyle(e,n,"*")}))}));var l=lC(n.map((function(t){var e=s.get(t.element);return i._buildPlayer(t,{},e)})));return this._playersById[t]=l,l.onDestroy((function(){return i.destroy(t)})),this.players.push(l),l}},{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 ".concat(t));return e}},{key:"listen",value:function(t,e,n,i){var r=fC(e,"","","");return uC(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}(),Tw=[],Ow={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Aw={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Iw=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";_classCallCheck(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=DC(e);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}return _createClass(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}(),Pw=new Iw("void"),Dw=function(){function t(e,n,i){_classCallCheck(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,Bw(n,this._hostClassName)}return _createClass(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=dC(this._elementListeners,t,[]),s={name:e,phase:n,callback:i};a.push(s);var l=dC(this._engine.statesByElement,t,{});return l.hasOwnProperty(e)||(Bw(t,"ng-trigger"),Bw(t,"ng-trigger-"+e),l[e]=Pw),function(){o._engine.afterFlush((function(){var t=a.indexOf(s);t>=0&&a.splice(t,1),o._triggers[e]||delete l[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 Fw(this.id,e,t),s=this._engine.statesByElement.get(t);s||(Bw(t,"ng-trigger"),Bw(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,s={}));var l=s[e],c=new Iw(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),s[e]=c,l||(l=Pw),"void"===c.value||l.value!==c.value){var u=dC(this._engine.playersByElement,t,[]);u.forEach((function(t){t.namespaceId==i.id&&t.triggerName==e&&t.queued&&t.destroy()}));var h=o.matchTransition(l.value,c.value,t,c.params),f=!1;if(!h){if(!r)return;h=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:h,fromState:l,toState:c,player:a,isFallbackTransition:f}),f||(Bw(t,"ng-animate-queued"),a.onStart((function(){zw(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),u.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<n.length;r++){var o=n[r];if(!e.hasOwnProperty(o)||t[o]!==e[o])return!1}return!0}(l.params,c.params)){var d=[],p=o.matchStyles(l.value,l.params,d),v=o.matchStyles(c.value,c.params,d);d.length?this._engine.reportError(d):this._engine.afterFlush((function(){LC(t,p),jC(t,v)}))}}},{key:"deregister",value:function(t){var e=this;delete this._triggers[t],this._engine.statesByElement.forEach((function(e,n){delete e[t]})),this._elementListeners.forEach((function(n,i){e._elementListeners.set(i,n.filter((function(e){return e.name!=t})))}))}},{key:"clearElementCache",value:function(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);var e=this._engine.playersByElement.get(t);e&&(e.forEach((function(t){return t.destroy()})),this._engine.playersByElement.delete(t))}},{key:"_signalRemovalForInnerTriggers",value:function(t,e){var n=this,i=this._engine.driver.query(t,".ng-trigger",!0);i.forEach((function(t){if(!t.__ng_removed){var i=n._engine.fetchNamespacesByElement(t);i.size?i.forEach((function(n){return n.triggerLeaveAnimation(t,e,!1,!0)})):n.clearElementCache(t)}})),this._engine.afterFlushAnimationsDone((function(){return i.forEach((function(t){return n.clearElementCache(t)}))}))}},{key:"triggerLeaveAnimation",value:function(t,e,n,i){var r=this,o=this._engine.statesByElement.get(t);if(o){var a=[];if(Object.keys(o).forEach((function(e){if(r._triggers[e]){var n=r.trigger(t,e,"void",i);n&&a.push(n)}})),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&lC(a).onDone((function(){return r._engine.processLeaveNode(t)})),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(t){var e=this,n=this._elementListeners.get(t);if(n){var i=new Set;n.forEach((function(n){var r=n.name;if(!i.has(r)){i.add(r);var o=e._triggers[r].fallbackTransition,a=e._engine.statesByElement.get(t)[r]||Pw,s=new Iw("void"),l=new Fw(e.id,r,t);e._engine.totalQueuedPlayers++,e._queue.push({element:t,triggerName:r,transition:o,fromState:a,toState:s,player:l,isFallbackTransition:!0})}}))}}},{key:"removeNode",value:function(t,e){var n=this,i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),!this.triggerLeaveAnimation(t,e,!0)){var r=!1;if(i.totalAnimations){var o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else for(var a=t;a=a.parentNode;)if(i.statesByElement.get(a)){r=!0;break}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{var s=t.__ng_removed;s&&s!==Ow||(i.afterFlush((function(){return n.clearElementCache(t)})),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}}},{key:"insertNode",value:function(t,e){Bw(t,this._hostClassName)}},{key:"drainQueuedTransitions",value:function(t){var e=this,n=[];return this._queue.forEach((function(i){var r=i.player;if(!r.destroyed){var o=i.element,a=e._elementListeners.get(o);a&&a.forEach((function(e){if(e.name==i.triggerName){var n=fC(o,i.triggerName,i.fromState.value,i.toState.value);n._data=t,uC(i.player,e.phase,n,e.callback)}})),r.markedForDestroy?e._engine.afterFlush((function(){r.destroy()})):n.push(i)}})),this._queue=[],n.sort((function(t,n){var i=t.transition.ast.depCount,r=n.transition.ast.depCount;return 0==i||0==r?i-r:e._engine.driver.containsElement(t.element,n.element)?1:-1}))}},{key:"destroy",value:function(t){this.players.forEach((function(t){return t.destroy()})),this._signalRemovalForInnerTriggers(this.hostElement,t)}},{key:"elementContainsData",value:function(t){var e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find((function(e){return e.element===t}))||e}}]),t}(),Rw=function(){function t(e,n,i){_classCallCheck(this,t),this.bodyNode=e,this.driver=n,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(t,e){}}return _createClass(t,[{key:"_onRemovalComplete",value:function(t,e){this.onRemovalComplete(t,e)}},{key:"createNamespace",value:function(t,e){var n=new Dw(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}},{key:"_balanceNamespaceList",value:function(t,e){var n=this._namespaceList.length-1;if(n>=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<i.length;r++){var o=n[i[r]].namespaceId;if(o){var a=this._fetchNamespace(o);a&&e.add(a)}}return e}},{key:"trigger",value:function(t,e,n,i){if(Mw(e)){var r=this._fetchNamespace(t);if(r)return r.trigger(e,n,i),!0}return!1}},{key:"insertNode",value:function(t,e,n,i){if(Mw(e)){var r=e.__ng_removed;if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;var o=this.collectedLeaveElements.indexOf(e);o>=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),Bw(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),zw(t,"ng-animate-disabled"))}},{key:"removeNode",value:function(t,e,n,i){if(Mw(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 Mw(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 lC(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=Ow,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<this.collectedEnterElements.length;i++)Bw(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){var r=[];try{n=this._flushAnimations(r,e)}finally{for(var o=0;o<r.length;o++)r[o]()}}else for(var a=0;a<this.collectedLeaveElements.length;a++)this.processLeaveNode(this.collectedLeaveElements[a]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach((function(t){return t()})),this._flushFns=[],this._whenQuietFns.length){var s=this._whenQuietFns;this._whenQuietFns=[],n.length?lC(n).onDone((function(){s.forEach((function(t){return t()}))})):s.forEach((function(t){return t()}))}}},{key:"reportError",value:function(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n ".concat(t.join("\n")))}},{key:"_flushAnimations",value:function(t,e){var n=this,i=new aw,r=[],o=new Map,a=[],s=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach((function(t){u.add(t);for(var e=n.driver.query(t,".ng-animate-queued",!0),i=0;i<e.length;i++)u.add(e[i])}));var h=this.bodyNode,f=Array.from(this.statesByElement.keys()),d=Nw(f,this.collectedEnterElements),p=new Map,v=0;d.forEach((function(t,e){var n="ng-enter"+v++;p.set(e,n),t.forEach((function(t){return Bw(t,n)}))}));for(var g=[],m=new Set,y=new Set,_=0;_<this.collectedLeaveElements.length;_++){var b=this.collectedLeaveElements[_],k=b.__ng_removed;k&&k.setForRemoval&&(g.push(b),m.add(b),k.hasAnimation?this.driver.query(b,".ng-star-inserted",!0).forEach((function(t){return m.add(t)})):y.add(b))}var C=new Map,w=Nw(f,Array.from(m));w.forEach((function(t,e){var n="ng-leave"+v++;C.set(e,n),t.forEach((function(t){return Bw(t,n)}))})),t.push((function(){d.forEach((function(t,e){var n=p.get(e);t.forEach((function(t){return zw(t,n)}))})),w.forEach((function(t,e){var n=C.get(e);t.forEach((function(t){return zw(t,n)}))})),g.forEach((function(t){n.processLeaveNode(t)}))}));for(var x=[],S=[],E=this._namespaceList.length-1;E>=0;E--)this._namespaceList[E].drainQueuedTransitions(e).forEach((function(t){var e=t.player,o=t.element;if(x.push(e),n.collectedEnterElements.length){var u=o.__ng_removed;if(u&&u.setForMove)return void e.destroy()}var f=!h||!n.driver.containsElement(h,o),d=C.get(o),v=p.get(o),g=n._buildInstruction(t,i,v,d,f);if(!g.errors||!g.errors.length)return f||t.isFallbackTransition?(e.onStart((function(){return LC(o,g.fromStyles)})),e.onDestroy((function(){return jC(o,g.toStyles)})),void r.push(e)):(g.timelines.forEach((function(t){return t.stretchStartingKeyframe=!0})),i.append(o,g.timelines),a.push({instruction:g,player:e,element:o}),g.queriedElements.forEach((function(t){return dC(s,t,[]).push(e)})),g.preStyleProps.forEach((function(t,e){var n=Object.keys(t);if(n.length){var i=l.get(e);i||l.set(e,i=new Set),n.forEach((function(t){return i.add(t)}))}})),void g.postStyleProps.forEach((function(t,e){var n=Object.keys(t),i=c.get(e);i||c.set(e,i=new Set),n.forEach((function(t){return i.add(t)}))})));S.push(g)}));if(S.length){var T=[];S.forEach((function(t){T.push("@".concat(t.triggerName," has failed due to:\n")),t.errors.forEach((function(t){return T.push("- ".concat(t,"\n"))}))})),x.forEach((function(t){return t.destroy()})),this.reportError(T)}var O=new Map,A=new Map;a.forEach((function(t){var e=t.element;i.has(e)&&(A.set(e,e),n._beforeAnimationBuild(t.player.namespaceId,t.instruction,O))})),r.forEach((function(t){var e=t.element;n._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach((function(t){dC(O,e,[]).push(t),t.destroy()}))}));var I=g.filter((function(t){return Hw(t,l,c)})),P=new Map;Lw(P,this.driver,y,c,"*").forEach((function(t){Hw(t,l,c)&&I.push(t)}));var D=new Map;d.forEach((function(t,e){Lw(D,n.driver,new Set(t),l,"!")})),I.forEach((function(t){var e=P.get(t),n=D.get(t);P.set(t,Object.assign(Object.assign({},e),n))}));var R=[],F=[],M={};a.forEach((function(t){var e=t.element,a=t.player,s=t.instruction;if(i.has(e)){if(u.has(e))return a.onDestroy((function(){return jC(e,s.toStyles)})),a.disabled=!0,a.overrideTotalTime(s.totalTime),void r.push(a);var l=M;if(A.size>1){for(var c=e,h=[];c=c.parentNode;){var f=A.get(c);if(f){l=f;break}h.push(c)}h.forEach((function(t){return A.set(t,l)}))}var d=n._buildAnimation(a.namespaceId,s,O,o,D,P);if(a.setRealPlayer(d),l===M)R.push(a);else{var p=n.playersByElement.get(l);p&&p.length&&(a.parentPlayer=lC(p)),r.push(a)}}else LC(e,s.fromStyles),a.onDestroy((function(){return jC(e,s.toStyles)})),F.push(a),u.has(e)&&r.push(a)})),F.forEach((function(t){var e=o.get(t.element);if(e&&e.length){var n=lC(e);t.setRealPlayer(n)}})),r.forEach((function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()}));for(var j=0;j<g.length;j++){var L=g[j],N=L.__ng_removed;if(zw(L,"ng-leave"),!N||!N.hasAnimation){var B=[];if(s.size){var z=s.get(L);z&&z.length&&B.push.apply(B,_toConsumableArray2(z));for(var V=this.driver.query(L,".ng-animating",!0),H=0;H<V.length;H++){var W=s.get(V[H]);W&&W.length&&B.push.apply(B,_toConsumableArray2(W))}}var U=B.filter((function(t){return!t.destroyed}));U.length?Vw(this,L,U):this.processLeaveNode(L)}}return g.length=0,R.forEach((function(t){n.players.push(t),t.onDone((function(){t.destroy();var e=n.players.indexOf(t);n.players.splice(e,1)})),t.play()})),R}},{key:"elementContainsData",value:function(t,e){var n=!1,i=e.__ng_removed;return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}},{key:"afterFlush",value:function(t){this._flushFns.push(t)}},{key:"afterFlushAnimationsDone",value:function(t){this._whenQuietFns.push(t)}},{key:"_getPreviousPlayers",value:function(t,e,n,i,r){var o=[];if(e){var a=this.playersByQueriedElement.get(t);a&&(o=a)}else{var s=this.playersByElement.get(t);if(s){var l=!r||"void"==r;s.forEach((function(t){t.queued||(l||t.triggerName==i)&&o.push(t)}))}}return(n||i)&&(o=o.filter((function(t){return!(n&&n!=t.namespaceId||i&&i!=t.triggerName)}))),o}},{key:"_beforeAnimationBuild",value:function(t,e,n){var i,r=this,o=e.element,a=e.isRemovalTransition?void 0:t,s=e.isRemovalTransition?void 0:e.triggerName,l=_createForOfIteratorHelper(e.timelines);try{var c=function(){var t=i.value.element,l=t!==o,c=dC(n,t,[]);r._getPreviousPlayers(t,l,a,s,e.toState).forEach((function(t){var e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),c.push(t)}))};for(l.s();!(i=l.n()).done;)c()}catch(u){l.e(u)}finally{l.f()}LC(o,e.fromStyles)}},{key:"_buildAnimation",value:function(t,e,n,i,r,o){var a=this,s=e.triggerName,l=e.element,c=[],u=new Set,h=new Set,f=e.timelines.map((function(e){var f=e.element;u.add(f);var d=f.__ng_removed;if(d&&d.removedBeforeQueried)return new oC(e.duration,e.delay);var p,v,g=f!==l,m=(p=(n.get(f)||Tw).map((function(t){return t.getRealPlayer()})),v=[],function t(e,n){for(var i=0;i<e.length;i++){var r=e[i];r instanceof aC?t(r.players,n):n.push(r)}}(p,v),v).filter((function(t){return!!t.element&&t.element===f})),y=r.get(f),_=o.get(f),b=cC(0,a._normalizer,0,e.keyframes,y,_),k=a._buildPlayer(e,b,m);if(e.subTimeline&&i&&h.add(f),g){var C=new Fw(t,s,f);C.setRealPlayer(k),c.push(C)}return k}));c.forEach((function(t){dC(a.playersByQueriedElement,t.element,[]).push(t),t.onDone((function(){return function(t,e,n){var i;if(t instanceof Map){if(i=t.get(e)){if(i.length){var r=i.indexOf(n);i.splice(r,1)}0==i.length&&t.delete(e)}}else if(i=t[e]){if(i.length){var o=i.indexOf(n);i.splice(o,1)}0==i.length&&delete t[e]}return i}(a.playersByQueriedElement,t.element,t)}))})),u.forEach((function(t){return Bw(t,"ng-animating")}));var d=lC(f);return d.onDestroy((function(){u.forEach((function(t){return zw(t,"ng-animating")})),jC(l,e.toStyles)})),h.forEach((function(t){dC(i,t,[]).push(d)})),d}},{key:"_buildPlayer",value:function(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new oC(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}(),Fw=function(){function t(e,n,i){_classCallCheck(this,t),this.namespaceId=e,this.triggerName=n,this.element=i,this._player=new oC,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return _createClass(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 uC(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){dC(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 Mw(t){return t&&1===t.nodeType}function jw(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function Lw(t,e,n,i,r){var o=[];n.forEach((function(t){return o.push(jw(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=Aw,a.push(i))})),t.set(i,o)}));var s=0;return n.forEach((function(t){return jw(t,o[s++])})),a}function Nw(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 Bw(t,e){if(t.classList)t.classList.add(e);else{var n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function zw(t,e){if(t.classList)t.classList.remove(e);else{var n=t.$$classes;n&&delete n[e]}}function Vw(t,e,n){lC(n).onDone((function(){return t.processLeaveNode(e)}))}function Hw(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 Ww=function(){function t(e,n,i){var r=this;_classCallCheck(this,t),this.bodyNode=e,this._driver=n,this._triggerCache={},this.onRemovalComplete=function(t,e){},this._transitionEngine=new Rw(e,n,i),this._timelineEngine=new Ew(e,n,i),this._transitionEngine.onRemovalComplete=function(t,e){return r.onRemovalComplete(t,e)}}return _createClass(t,[{key:"registerTrigger",value:function(t,e,n,i,r){var o=t+"-"+i,a=this._triggerCache[o];if(!a){var s=[],l=$C(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 ww(t,e)}(i,l),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=_slicedToArray(pC(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=_slicedToArray(pC(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 Uw(t,e){var n=null,i=null;return Array.isArray(e)&&e.length?(n=Xw(e[0]),e.length>1&&(i=Xw(e[e.length-1]))):e&&(n=Xw(e)),n||i?new Yw(t,n,i):null}var Yw=function(){var t=function(){function t(e,n,i){_classCallCheck(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 _createClass(t,[{key:"start",value:function(){this._state<1&&(this._startStyles&&jC(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(jC(this._element,this._initialStyles),this._endStyles&&(jC(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&&(LC(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(LC(this._element,this._endStyles),this._endStyles=null),jC(this._element,this._initialStyles),this._state=3)}}]),t}();return t.initialStylesByElement=new WeakMap,t}();function Xw(t){for(var e=null,n=Object.keys(t),i=0;i<n.length;i++){var r=n[i];Gw(r)&&((e=e||{})[r]=t[r])}return e}function Gw(t){return"display"===t||"position"===t}var qw=function(){function t(e,n,i,r,o,a,s){var l=this;_classCallCheck(this,t),this._element=e,this._name=n,this._duration=i,this._delay=r,this._easing=o,this._fillMode=a,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(t){return l._handleCallback(t)}}return _createClass(t,[{key:"apply",value:function(){var t,e,n;t=this._element,e="".concat(this._duration,"ms ").concat(this._easing," ").concat(this._delay,"ms 1 normal ").concat(this._fillMode," ").concat(this._name),(n=tx(t,"").trim()).length&&(function(t,e){for(var n=0;n<t.length;n++)t.charAt(n)}(n),e="".concat(n,", ").concat(e)),$w(t,"",e),Jw(this._element,this._eventFn,!1),this._startTime=Date.now()}},{key:"pause",value:function(){Kw(this._element,this._name,"paused")}},{key:"resume",value:function(){Kw(this._element,this._name,"running")}},{key:"setPosition",value:function(t){var e=Zw(this._element,this._name);this._position=t*this._duration,$w(this._element,"Delay","-".concat(this._position,"ms"),e)}},{key:"getPosition",value:function(){return this._position}},{key:"_handleCallback",value:function(t){var e=t._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),Jw(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=tx(t,"").split(","),(i=Qw(n,e))>=0&&(n.splice(i,1),$w(t,"",n.join(","))))}}]),t}();function Kw(t,e,n){$w(t,"PlayState",n,Zw(t,e))}function Zw(t,e){var n=tx(t,"");return n.indexOf(",")>0?Qw(n.split(","),e):Qw([n],e)}function Qw(t,e){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function Jw(t,e,n){n?t.removeEventListener("animationend",e):t.addEventListener("animationend",e)}function $w(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 tx(t,e){return t.style["animation"+e]}var ex=function(){function t(e,n,i,r,o,a,s,l){_classCallCheck(this,t),this.element=e,this.keyframes=n,this.animationName=i,this._duration=r,this._delay=o,this._finalStyles=s,this._specialStyles=l,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 _createClass(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 qw(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]:qC(t.element,i))}))}this.currentSnapshot=e}}]),t}(),nx=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this)).element=t,r._startingStyles={},r.__initialized=!1,r._styles=SC(i),r}return _createClass(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]})),_get(_getPrototypeOf(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])})),_get(_getPrototypeOf(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,_get(_getPrototypeOf(n.prototype),"destroy",this).call(this))}}]),n}(oC),ix=function(){function t(){_classCallCheck(this,t),this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return _createClass(t,[{key:"validateStyleProperty",value:function(t){return kC(t)}},{key:"matchesElement",value:function(t,e){return CC(t,e)}},{key:"containsElement",value:function(t,e){return wC(t,e)}},{key:"query",value:function(t,e,n){return xC(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 SC(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+="".concat(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 ex})),l={};YC(n,i)&&s.forEach((function(t){var e=t.currentSnapshot;Object.keys(e).forEach((function(t){return l[t]=e[t]}))}));var c=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=XC(t,e,l));if(0==n)return new nx(t,c);var u="gen_css_kf_".concat(this._count++),h=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(h);var f=Uw(t,e),d=new ex(t,e,u,n,i,r,c,f);return d.onDestroy((function(){var t;(t=h).parentNode.removeChild(t)})),d}},{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}(),rx=function(){function t(e,n,i,r){_classCallCheck(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 _createClass(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]:qC(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}(),ox=function(){function t(){_classCallCheck(this,t),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(ax().toString()),this._cssKeyframesDriver=new ix}return _createClass(t,[{key:"validateStyleProperty",value:function(t){return kC(t)}},{key:"matchesElement",value:function(t,e){return CC(t,e)}},{key:"containsElement",value:function(t,e){return wC(t,e)}},{key:"query",value:function(t,e,n){return xC(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 l={},c=o.filter((function(t){return t instanceof rx}));YC(n,i)&&c.forEach((function(t){var e=t.currentSnapshot;Object.keys(e).forEach((function(t){return l[t]=e[t]}))}));var u=Uw(t,e=XC(t,e=e.map((function(t){return RC(t,!1)})),l));return new rx(t,e,s,u)}}]),t}();function ax(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var sx,lx=((sx=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this))._nextAnimationId=0,r._renderer=t.createRenderer(i.body,{id:"0",encapsulation:ue.None,styles:[],data:{animation:[]}}),r}return _createClass(n,[{key:"build",value:function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?$k(t):t;return hx(this._renderer,null,e,"register",[n]),new cx(e,this._renderer)}}]),n}(Zk)).\u0275fac=function(t){return new(t||sx)(Zt(wl),Zt(Ph))},sx.\u0275prov=ft({token:sx,factory:sx.\u0275fac}),sx),cx=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this))._id=t,r._renderer=i,r}return _createClass(n,[{key:"create",value:function(t,e){return new ux(this._id,t,e||{},this._renderer)}}]),n}(function(){return function t(){_classCallCheck(this,t)}}()),ux=function(){function t(e,n,i,r){_classCallCheck(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 _createClass(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<e;i++)n[i-1]=arguments[i];return hx(this._renderer,this.element,this.id,t,n)}},{key:"onDone",value:function(t){this._listen("done",t)}},{key:"onStart",value:function(t){this._listen("start",t)}},{key:"onDestroy",value:function(t){this._listen("destroy",t)}},{key:"init",value:function(){this._command("init")}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this._command("play"),this._started=!0}},{key:"pause",value:function(){this._command("pause")}},{key:"restart",value:function(){this._command("restart")}},{key:"finish",value:function(){this._command("finish")}},{key:"destroy",value:function(){this._command("destroy")}},{key:"reset",value:function(){this._command("reset")}},{key:"setPosition",value:function(t){this._command("setPosition",t)}},{key:"getPosition",value:function(){return 0}}]),t}();function hx(t,e,n,i,r){return t.setProperty(e,"@@".concat(n,":").concat(i),r)}var fx,dx,px,vx=((fx=function(){function t(e,n,i){_classCallCheck(this,t),this.delegate=e,this.engine=n,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),n.onRemovalComplete=function(t,e){e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}return _createClass(t,[{key:"createRenderer",value:function(t,e){var n=this,i=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){var r=this._rendererCache.get(i);return r||(r=new gx("",i,this.engine),this._rendererCache.set(i,r)),r}var o=e.id,a=e.id+"-"+this._currentId;return this._currentId++,this.engine.register(a,t),e.data.animation.forEach((function e(i){Array.isArray(i)?i.forEach(e):n.engine.registerTrigger(o,a,t,i.name,i)})),new mx(this,a,i,this.engine)}},{key:"begin",value:function(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}},{key:"_scheduleCountTask",value:function(){var t=this;this.promise.then((function(){t._microtaskId++}))}},{key:"scheduleListenerCallback",value:function(t,e,n){var i=this;t>=0&&t<this._microtaskId?this._zone.run((function(){return e(n)})):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then((function(){i._zone.run((function(){i._animationCallbacksBuffer.forEach((function(t){var e=_slicedToArray(t,2);(0,e[0])(e[1])})),i._animationCallbacksBuffer=[]}))})),this._animationCallbacksBuffer.push([e,n]))}},{key:"end",value:function(){var t=this;this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular((function(){t._scheduleCountTask(),t.engine.flush(t._microtaskId)})),this.delegate.end&&this.delegate.end()}},{key:"whenRenderingDone",value:function(){return this.engine.whenRenderingDone()}}]),t}()).\u0275fac=function(t){return new(t||fx)(Zt(wl),Zt(Ww),Zt(ou))},fx.\u0275prov=ft({token:fx,factory:fx.\u0275fac}),fx),gx=function(){function t(e,n,i){_classCallCheck(this,t),this.namespaceId=e,this.delegate=n,this.engine=i,this.destroyNode=this.delegate.destroyNode?function(t){return n.destroyNode(t)}:null}return _createClass(t,[{key:"destroy",value:function(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}},{key:"createElement",value:function(t,e){return this.delegate.createElement(t,e)}},{key:"createComment",value:function(t){return this.delegate.createComment(t)}},{key:"createText",value:function(t){return this.delegate.createText(t)}},{key:"appendChild",value:function(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}},{key:"insertBefore",value:function(t,e,n){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,!0)}},{key:"removeChild",value:function(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}},{key:"selectRootElement",value:function(t,e){return this.delegate.selectRootElement(t,e)}},{key:"parentNode",value:function(t){return this.delegate.parentNode(t)}},{key:"nextSibling",value:function(t){return this.delegate.nextSibling(t)}},{key:"setAttribute",value:function(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}},{key:"removeAttribute",value:function(t,e,n){this.delegate.removeAttribute(t,e,n)}},{key:"addClass",value:function(t,e){this.delegate.addClass(t,e)}},{key:"removeClass",value:function(t,e){this.delegate.removeClass(t,e)}},{key:"setStyle",value:function(t,e,n,i){this.delegate.setStyle(t,e,n,i)}},{key:"removeStyle",value:function(t,e,n){this.delegate.removeStyle(t,e,n)}},{key:"setProperty",value:function(t,e,n){"@"==e.charAt(0)&&"@.disabled"==e?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}},{key:"setValue",value:function(t,e){this.delegate.setValue(t,e)}},{key:"listen",value:function(t,e,n){return this.delegate.listen(t,e,n)}},{key:"disableAnimations",value:function(t,e){this.engine.disableAnimations(t,e)}},{key:"data",get:function(){return this.delegate.data}}]),t}(),mx=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;return _classCallCheck(this,n),(a=e.call(this,i,r,o)).factory=t,a.namespaceId=i,a}return _createClass(n,[{key:"setProperty",value:function(t,e,n){"@"==e.charAt(0)?"."==e.charAt(1)&&"@.disabled"==e?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}},{key:"listen",value:function(t,e,n){var i,r,o=this;if("@"==e.charAt(0)){var a,s=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t),l=e.substr(1),c="";return"@"!=l.charAt(0)&&(r=(i=l).indexOf("."),l=(a=_slicedToArray([i.substring(0,r),i.substr(r+1)],2))[0],c=a[1]),this.engine.listen(this.namespaceId,s,l,c,(function(t){o.factory.scheduleListenerCallback(t._data||-1,n,t)}))}return this.delegate.listen(t,e,n)}}]),n}(gx),yx=((dx=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){return _classCallCheck(this,n),e.call(this,t.body,i,r)}return n}(Ww)).\u0275fac=function(t){return new(t||dx)(Zt(Ph),Zt(OC),Zt(gw))},dx.\u0275prov=ft({token:dx,factory:dx.\u0275fac}),dx),_x=new Vt("AnimationModuleType"),bx=[{provide:OC,useFactory:function(){return"function"==typeof ax()?new ox:new ix}},{provide:_x,useValue:"BrowserAnimations"},{provide:Zk,useClass:lx},{provide:gw,useFactory:function(){return new mw}},{provide:Ww,useClass:yx},{provide:wl,useFactory:function(t,e,n){return new vx(t,e,n)},deps:[Mk,Ww,ou]}],kx=((px=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:px}),px.\u0275inj=dt({factory:function(t){return new(t||px)},providers:bx,imports:[Kk]}),px),Cx=["*",[["mat-option"],["ng-container"]]],wx=["*","mat-option, ng-container"];function xx(t,e){if(1&t&&us(0,"mat-pseudo-checkbox",3),2&t){var n=ks();as("state",n.selected?"checked":"unchecked")("disabled",n.disabled)}}var Sx,Ex=["*"],Tx=new Ol("9.2.4"),Ox=new Vt("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),Ax=((Sx=function(){function t(e,n,i){_classCallCheck(this,t),this._hasDoneGlobalChecks=!1,this._document=i,e._applyBodyHighContrastModeCssClasses(),this._sanityChecks=n,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}return _createClass(t,[{key:"_getDocument",value:function(){var t=this._document||document;return"object"==typeof t&&t?t:null}},{key:"_getWindow",value:function(){var t=this._getDocument(),e=(null==t?void 0:t.defaultView)||window;return"object"==typeof e&&e?e:null}},{key:"_checksAreEnabled",value:function(){return Ei()&&!this._isTestEnv()}},{key:"_isTestEnv",value:function(){var t=this._getWindow();return t&&(t.__karma__||t.jasmine)}},{key:"_checkDoctypeIsDefined",value:function(){var t=this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.doctype),e=this._getDocument();t&&e&&!e.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}},{key:"_checkThemeIsPresent",value:function(){var t=!this._checksAreEnabled()||!1===this._sanityChecks||!this._sanityChecks.theme,e=this._getDocument();if(!t&&e&&e.body&&"function"==typeof getComputedStyle){var n=e.createElement("div");n.classList.add("mat-theme-loaded-marker"),e.body.appendChild(n);var i=getComputedStyle(n);i&&"none"!==i.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),e.body.removeChild(n)}}},{key:"_checkCdkVersionMatch",value:function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&Tx.full!==pk.full&&console.warn("The Angular Material version ("+Tx.full+") does not match the Angular CDK version ("+pk.full+").\nPlease ensure the versions of these two packages exactly match.")}}]),t}()).\u0275mod=ye({type:Sx}),Sx.\u0275inj=dt({factory:function(t){return new(t||Sx)(Zt(fk),Zt(Ox,8),Zt(Ph,8))},imports:[[g_],g_]}),Sx);function Ix(t){return function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;_classCallCheck(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r)))._disabled=!1,t}return _createClass(n,[{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=xy(t)}}]),n}(t)}function Px(t,e){return function(t){_inherits(i,t);var n=_createSuper(i);function i(){var t;_classCallCheck(this,i);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(t=n.call.apply(n,[this].concat(o))).color=e,t}return _createClass(i,[{key:"color",get:function(){return this._color},set:function(t){var n=t||e;n!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove("mat-".concat(this._color)),n&&this._elementRef.nativeElement.classList.add("mat-".concat(n)),this._color=n)}}]),i}(t)}function Dx(t){return function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;_classCallCheck(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r)))._disableRipple=!1,t}return _createClass(n,[{key:"disableRipple",get:function(){return this._disableRipple},set:function(t){this._disableRipple=xy(t)}}]),n}(t)}function Rx(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(t){_inherits(i,t);var n=_createSuper(i);function i(){var t;_classCallCheck(this,i);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(t=n.call.apply(n,[this].concat(o)))._tabIndex=e,t}return _createClass(i,[{key:"tabIndex",get:function(){return this.disabled?-1:this._tabIndex},set:function(t){this._tabIndex=null!=t?t:e}}]),i}(t)}try{"undefined"!=typeof Intl}catch(Oz){!1}var Fx,Mx,jx,Lx,Nx,Bx,zx,Vx=((Fx=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"isErrorState",value:function(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}]),t}()).\u0275fac=function(t){return new(t||Fx)},Fx.\u0275prov=ft({factory:function(){return new Fx},token:Fx,providedIn:"root"}),Fx),Hx=function(){function t(e,n,i){_classCallCheck(this,t),this._renderer=e,this.element=n,this.config=i,this.state=3}return _createClass(t,[{key:"fadeOut",value:function(){this._renderer.fadeOutRipple(this)}}]),t}(),Wx={enterDuration:450,exitDuration:400},Ux=o_({passive:!0}),Yx=["mousedown","touchstart"],Xx=["mouseup","mouseleave","touchend","touchcancel"],Gx=function(){function t(e,n,i,r){_classCallCheck(this,t),this._target=e,this._ngZone=n,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Oy(i))}return _createClass(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({},Wx),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,l=e-r.top,c=o.enterDuration,u=document.createElement("div");u.classList.add("mat-ripple-element"),u.style.left="".concat(s-a,"px"),u.style.top="".concat(l-a,"px"),u.style.height="".concat(2*a,"px"),u.style.width="".concat(2*a,"px"),null!=i.color&&(u.style.backgroundColor=i.color),u.style.transitionDuration="".concat(c,"ms"),this._containerElement.appendChild(u),window.getComputedStyle(u).getPropertyValue("opacity"),u.style.transform="scale(1)";var h=new Hx(this,u,i);return h.state=0,this._activeRipples.add(h),i.persistent||(this._mostRecentTransientRipple=h),this._runTimeoutOutsideZone((function(){var t=h===n._mostRecentTransientRipple;h.state=1,i.persistent||t&&n._isPointerDown||h.fadeOut()}),c),h}},{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({},Wx),t.config.animation);n.style.transitionDuration="".concat(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=Oy(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(Yx))}},{key:"handleEvent",value:function(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(Xx),this._pointerUpEventsRegistered=!0)}},{key:"_onMousedown",value:function(t){var e=tk(t),n=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;this._target.rippleDisabled||e||n||(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}},{key:"_onTouchStart",value:function(t){if(!this._target.rippleDisabled){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;for(var e=t.changedTouches,n=0;n<e.length;n++)this.fadeInRipple(e[n].clientX,e[n].clientY,this._target.rippleConfig)}}},{key:"_onPointerUp",value:function(){this._isPointerDown&&(this._isPointerDown=!1,this._activeRipples.forEach((function(t){!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()})))}},{key:"_runTimeoutOutsideZone",value:function(t){var e=arguments.length>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,Ux)}))}))}},{key:"_removeTriggerEvents",value:function(){var t=this;this._triggerElement&&(Yx.forEach((function(e){t._triggerElement.removeEventListener(e,t,Ux)})),this._pointerUpEventsRegistered&&Xx.forEach((function(e){t._triggerElement.removeEventListener(e,t,Ux)})))}}]),t}(),qx=new Vt("mat-ripple-global-options"),Kx=((Nx=function(){function t(e,n,i,r,o){_classCallCheck(this,t),this._elementRef=e,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=r||{},this._rippleRenderer=new Gx(this,n,e,i)}return _createClass(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||Nx)(rs(kl),rs(ou),rs(i_),rs(qx,8),rs(_x,8))},Nx.\u0275dir=be({type:Nx,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&Fs("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"]}),Nx),Zx=((Lx=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:Lx}),Lx.\u0275inj=dt({factory:function(t){return new(t||Lx)},imports:[[Ax,r_],Ax]}),Lx),Qx=((jx=function t(e){_classCallCheck(this,t),this._animationMode=e,this.state="unchecked",this.disabled=!1}).\u0275fac=function(t){return new(t||jx)(rs(_x,8))},jx.\u0275cmp=pe({type:jx,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(t,e){2&t&&Fs("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}),jx),Jx=((Mx=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:Mx}),Mx.\u0275inj=dt({factory:function(t){return new(t||Mx)}}),Mx),$x=Ix((function t(){_classCallCheck(this,t)})),tS=0,eS=((Bx=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._labelId="mat-optgroup-label-".concat(tS++),t}return n}($x)).\u0275fac=function(t){return nS(t||Bx)},Bx.\u0275cmp=pe({type:Bx,selectors:[["mat-optgroup"]],hostAttrs:["role","group",1,"mat-optgroup"],hostVars:4,hostBindings:function(t,e){2&t&&(ts("aria-disabled",e.disabled.toString())("aria-labelledby",e._labelId),Fs("mat-optgroup-disabled",e.disabled))},inputs:{disabled:"disabled",label:"label"},exportAs:["matOptgroup"],features:[el],ngContentSelectors:wx,decls:4,vars:2,consts:[[1,"mat-optgroup-label",3,"id"]],template:function(t,e){1&t&&(ws(Cx),ls(0,"label",0),Gs(1),xs(2),cs(),xs(3,1)),2&t&&(as("id",e._labelId),kr(1),Ks("",e.label," "))},styles:[".mat-optgroup-label{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%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),Bx),nS=ui(eS),iS=0,rS=function t(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];_classCallCheck(this,t),this.source=e,this.isUserInput=n},oS=new Vt("MAT_OPTION_PARENT_COMPONENT"),aS=((zx=function(){function t(e,n,i,r){_classCallCheck(this,t),this._element=e,this._changeDetectorRef=n,this._parent=i,this.group=r,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-".concat(iS++),this.onSelectionChange=new pc,this._stateChanges=new E}return _createClass(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){13!==t.keyCode&&32!==t.keyCode||M_(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 rS(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=xy(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||zx)(rs(kl),rs(Zo),rs(oS,8),rs(eS,8))},zx.\u0275cmp=pe({type:zx,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(t,e){1&t&&gs("click",(function(){return e._selectViaInteraction()}))("keydown",(function(t){return e._handleKeydown(t)})),2&t&&(Js("id",e.id),ts("tabindex",e._getTabIndex())("aria-selected",e._getAriaSelected())("aria-disabled",e.disabled.toString()),Fs("mat-selected",e.selected)("mat-option-multiple",e.multiple)("mat-active",e.active)("mat-option-disabled",e.disabled))},inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:Ex,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&&(ws(),ns(0,xx,1,2,"mat-pseudo-checkbox",0),ls(1,"span",1),xs(2),cs(),us(3,"div",2)),2&t&&(as("ngIf",e.multiple),kr(3),as("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disabled||e.disableRipple))},directives:[uf,Kx,Qx],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}),zx);function sS(t,e,n){if(n.length){for(var i=e.toArray(),r=n.toArray(),o=0,a=0;a<t+1;a++)i[a].group&&i[a].group===r[o]&&o++;return o}return 0}var lS,cS,uS,hS,fS,dS=((lS=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:lS}),lS.\u0275inj=dt({factory:function(t){return new(t||lS)},imports:[[Zx,Pf,Jx]]}),lS),pS=new Vt("mat-label-global-options"),vS=["mat-button",""],gS=["*"],mS=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],yS=Px(Ix(Dx((function t(e){_classCallCheck(this,t),this._elementRef=e})))),_S=((uS=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;_classCallCheck(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=_createForOfIteratorHelper(mS);try{for(s.s();!(a=s.n()).done;){var l=a.value;o._hasHostAttributes(l)&&o._getHostElement().classList.add(l)}}catch(c){s.e(c)}finally{s.f()}return t.nativeElement.classList.add("mat-button-base"),o._focusMonitor.monitor(o._elementRef,!0),o.isRoundButton&&(o.color="accent"),o}return _createClass(n,[{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;i<e;i++)n[i]=arguments[i];return n.some((function(e){return t._getHostElement().hasAttribute(e)}))}}]),n}(yS)).\u0275fac=function(t){return new(t||uS)(rs(kl),rs(rk),rs(_x,8))},uS.\u0275cmp=pe({type:uS,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(t,e){var n;1&t&&Tc(Kx,!0),2&t&&Sc(n=Dc())&&(e.ripple=n.first)},hostAttrs:[1,"mat-focus-indicator"],hostVars:3,hostBindings:function(t,e){2&t&&(ts("disabled",e.disabled||null),Fs("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[el],attrs:vS,ngContentSelectors:gS,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,e){1&t&&(ws(),ls(0,"span",0),xs(1),cs(),us(2,"div",1),us(3,"div",2)),2&t&&(kr(2),Fs("mat-button-ripple-round",e.isRoundButton||e.isIconButton),as("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[Kx],styles:[".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover .mat-button-focus-overlay,.mat-stroked-button:hover .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[disabled],.mat-icon-button[disabled],.mat-stroked-button[disabled],.mat-flat-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[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[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[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"],encapsulation:2,changeDetection:0}),uS),bS=((cS=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:cS}),cS.\u0275inj=dt({factory:function(t){return new(t||cS)},imports:[[Zx,Ax],Ax]}),cS),kS={},CS=function(){function t(e){_classCallCheck(this,t),this.resultSelector=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new wS(t,this.resultSelector))}}]),t}(),wS=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t)).resultSelector=i,r.active=0,r.values=[],r.observables=[],r}return _createClass(n,[{key:"_next",value:function(t){this.values.push(kS),this.observables.push(t)}},{key:"_complete",value:function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var i=t[n];this.add(M(this,i,i,n))}}}},{key:"notifyComplete",value:function(t){0==(this.active-=1)&&this.destination.complete()}},{key:"notifyNext",value:function(t,e,n,i,r){var o=this.values,a=this.toRespond?o[n]===kS?--this.toRespond:this.toRespond:0;o[n]=e,0===a&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))}},{key:"_tryResultSelector",value:function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}]),n}(j),xS=function(){function t(e){_classCallCheck(this,t),this.total=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new SS(t,this.total))}}]),t}(),SS=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t)).total=i,r.count=0,r}return _createClass(n,[{key:"_next",value:function(t){++this.count>this.total&&this.destination.next(t)}}]),n}(v),ES=new Set,TS=((fS=function(){function t(e){_classCallCheck(this,t),this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):OS}return _createClass(t,[{key:"matchMedia",value:function(t){return this._platform.WEBKIT&&function(t){if(!ES.has(t))try{hS||((hS=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(hS)),hS.sheet&&(hS.sheet.insertRule("@media ".concat(t," {.fx-query-test{ }}"),0),ES.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}]),t}()).\u0275fac=function(t){return new(t||fS)(Zt(i_))},fS.\u0275prov=ft({factory:function(){return new fS(Zt(i_))},token:fS,providedIn:"root"}),fS);function OS(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var AS,IS=((AS=function(){function t(e,n){_classCallCheck(this,t),this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new E}return _createClass(t,[{key:"ngOnDestroy",value:function(){this._destroySubject.next(),this._destroySubject.complete()}},{key:"isMatched",value:function(t){var e=this;return PS(Ey(t)).some((function(t){return e._registerQuery(t).mql.matches}))}},{key:"observe",value:function(t){var e=this,n=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=null,r=null;return O(e[e.length-1])&&(r=e.pop()),"function"==typeof e[e.length-1]&&(i=e.pop()),1===e.length&&l(e[0])&&(e=e[0]),X(e,r).lift(new CS(i))}(PS(Ey(t)).map((function(t){return e._registerQuery(t).observable})));return(n=Yy(n.pipe(zf(1)),n.pipe((function(t){return t.lift(new xS(1))}),Cb(0)))).pipe(L((function(t){var e={matches:!1,breakpoints:{}};return t.forEach((function(t){e.matches=e.matches||t.matches,e.breakpoints[t.query]=t.matches})),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 b((function(t){var i=function(n){return e._zone.run((function(){return t.next(n)}))};return n.addListener(i),function(){n.removeListener(i)}})).pipe(Xy(n),L((function(e){return{query:t,matches:e.matches}})),Zf(this._destroySubject)),mql:n};return this._queries.set(t,i),i}}]),t}()).\u0275fac=function(t){return new(t||AS)(Zt(TS),Zt(ou))},AS.\u0275prov=ft({factory:function(){return new AS(Zt(TS),Zt(ou))},token:AS,providedIn:"root"}),AS);function PS(t){return t.map((function(t){return t.split(",")})).reduce((function(t,e){return t.concat(e)})).map((function(t){return t.trim()}))}var DS="(max-width: 599.99px) and (orientation: portrait), (max-width: 959.99px) and (orientation: landscape)";function RS(t,e){if(1&t){var n=ds();ls(0,"div",1),ls(1,"button",2),gs("click",(function(){return Qe(n),ks().action()})),Gs(2),cs(),cs()}if(2&t){var i=ks();kr(2),qs(i.data.action)}}function FS(t,e){}var MS,jS,LS,NS,BS,zS,VS,HS,WS,US,YS,XS,GS,qS=Math.pow(2,31)-1,KS=function(){function t(e,n){var i=this;_classCallCheck(this,t),this._overlayRef=n,this._afterDismissed=new E,this._afterOpened=new E,this._onAction=new E,this._dismissedByAction=!1,this.containerInstance=e,this.onAction().subscribe((function(){return i.dismiss()})),e._onExit.subscribe((function(){return i._finishDismiss()}))}return _createClass(t,[{key:"dismiss",value:function(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}},{key:"dismissWithAction",value:function(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete())}},{key:"closeWithAction",value:function(){this.dismissWithAction()}},{key:"_dismissAfter",value:function(t){var e=this;this._durationTimeoutId=setTimeout((function(){return e.dismiss()}),Math.min(t,qS))}},{key:"_open",value:function(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}},{key:"_finishDismiss",value:function(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}},{key:"afterDismissed",value:function(){return this._afterDismissed.asObservable()}},{key:"afterOpened",value:function(){return this.containerInstance._onEnter}},{key:"onAction",value:function(){return this._onAction.asObservable()}}]),t}(),ZS=new Vt("MatSnackBarData"),QS=function t(){_classCallCheck(this,t),this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"},JS=((MS=function(){function t(e,n){_classCallCheck(this,t),this.snackBarRef=e,this.data=n}return _createClass(t,[{key:"action",value:function(){this.snackBarRef.dismissWithAction()}},{key:"hasAction",get:function(){return!!this.data.action}}]),t}()).\u0275fac=function(t){return new(t||MS)(rs(KS),rs(ZS))},MS.\u0275cmp=pe({type:MS,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(ls(0,"span"),Gs(1),cs(),ns(2,RS,3,1,"div",0)),2&t&&(kr(1),qs(e.data.message),kr(1),as("ngIf",e.hasAction))},directives:[uf,_S],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),MS),$S={snackBarState:Qk("state",[eC("void, hidden",tC({transform:"scale(0.8)",opacity:0})),eC("visible",tC({transform:"scale(1)",opacity:1})),nC("* => visible",Jk("150ms cubic-bezier(0, 0, 0.2, 1)")),nC("* => void, * => hidden",Jk("75ms cubic-bezier(0.4, 0.0, 1, 1)",tC({opacity:0})))])},tE=((LS=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;return _classCallCheck(this,n),(a=e.call(this))._ngZone=t,a._elementRef=i,a._changeDetectorRef=r,a.snackBarConfig=o,a._destroyed=!1,a._onExit=new E,a._onEnter=new E,a._animationState="void",a.attachDomPortal=function(t){return a._assertNotAttached(),a._applySnackBarClasses(),a._portalOutlet.attachDomPortal(t)},a._role="assertive"!==o.politeness||o.announcementMessage?"off"===o.politeness?null:"status":"alert",a}return _createClass(n,[{key:"attachComponentPortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}},{key:"onAnimationEnd",value:function(t){var e=t.fromState,n=t.toState;if(("void"===n&&"void"!==e||"hidden"===n)&&this._completeExit(),"visible"===n){var i=this._onEnter;this._ngZone.run((function(){i.next(),i.complete()}))}}},{key:"enter",value:function(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges())}},{key:"exit",value:function(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),this._onExit}},{key:"ngOnDestroy",value:function(){this._destroyed=!0,this._completeExit()}},{key:"_completeExit",value:function(){var t=this;this._ngZone.onMicrotaskEmpty.asObservable().pipe(zf(1)).subscribe((function(){t._onExit.next(),t._onExit.complete()}))}},{key:"_applySnackBarClasses",value:function(){var t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach((function(e){return t.classList.add(e)})):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}},{key:"_assertNotAttached",value:function(){if(this._portalOutlet.hasAttached())throw Error("Attempting to attach snack bar content after content is already attached")}}]),n}(I_)).\u0275fac=function(t){return new(t||LS)(rs(ou),rs(kl),rs(Zo),rs(QS))},LS.\u0275cmp=pe({type:LS,selectors:[["snack-bar-container"]],viewQuery:function(t,e){var n;1&t&&Ec(D_,!0),2&t&&Sc(n=Dc())&&(e._portalOutlet=n.first)},hostAttrs:[1,"mat-snack-bar-container"],hostVars:2,hostBindings:function(t,e){1&t&&ms("@state.done",(function(t){return e.onAnimationEnd(t)})),2&t&&(ts("role",e._role),$s("@state",e._animationState))},features:[el],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&ns(0,FS,0,0,"ng-template",0)},directives:[D_],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[$S.snackBarState]}}),LS),eE=((jS=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:jS}),jS.\u0275inj=dt({factory:function(t){return new(t||jS)},imports:[[kb,R_,Pf,bS,Ax],Ax]}),jS),nE=new Vt("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new QS}}),iE=((XS=function(){function t(e,n,i,r,o,a){_classCallCheck(this,t),this._overlay=e,this._live=n,this._injector=i,this._breakpointObserver=r,this._parentSnackBar=o,this._defaultConfig=a,this._snackBarRefAtThisLevel=null}return _createClass(t,[{key:"openFromComponent",value:function(t,e){return this._attach(t,e)}},{key:"openFromTemplate",value:function(t,e){return this._attach(t,e)}},{key:"open",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=Object.assign(Object.assign({},this._defaultConfig),n);return i.data={message:t,action:e},i.announcementMessage||(i.announcementMessage=t),this.openFromComponent(JS,i)}},{key:"dismiss",value:function(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}},{key:"ngOnDestroy",value:function(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}},{key:"_attachSnackBarContainer",value:function(t,e){var n=new F_(e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,new WeakMap([[QS,e]])),i=new T_(tE,e.viewContainerRef,n),r=t.attach(i);return r.instance.snackBarConfig=e,r.instance}},{key:"_attach",value:function(t,e){var n=Object.assign(Object.assign(Object.assign({},new QS),this._defaultConfig),e),i=this._createOverlay(n),r=this._attachSnackBarContainer(i,n),o=new KS(r,i);if(t instanceof Yl){var a=new O_(t,null,{$implicit:n.data,snackBarRef:o});o.instance=r.attachTemplatePortal(a)}else{var s=this._createInjector(n,o),l=new T_(t,void 0,s),c=r.attachComponentPortal(l);o.instance=c.instance}return this._breakpointObserver.observe("(max-width: 599.99px) and (orientation: portrait)").pipe(Zf(i.detachments())).subscribe((function(t){var e=i.overlayElement.classList;t.matches?e.add("mat-snack-bar-handset"):e.remove("mat-snack-bar-handset")})),this._animateSnackBar(o,n),this._openedSnackBarRef=o,this._openedSnackBarRef}},{key:"_animateSnackBar",value:function(t,e){var n=this;t.afterDismissed().subscribe((function(){n._openedSnackBarRef==t&&(n._openedSnackBarRef=null),e.announcementMessage&&n._live.clear()})),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe((function(){t.containerInstance.enter()})),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe((function(){return t._dismissAfter(e.duration)})),e.announcementMessage&&this._live.announce(e.announcementMessage,e.politeness)}},{key:"_createOverlay",value:function(t){var e=new Y_;e.direction=t.direction;var n=this._overlay.position().global(),i="rtl"===t.direction,r="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!i||"end"===t.horizontalPosition&&i,o=!r&&"center"!==t.horizontalPosition;return r?n.left("0"):o?n.right("0"):n.centerHorizontally(),"top"===t.verticalPosition?n.top("0"):n.bottom("0"),e.positionStrategy=n,this._overlay.create(e)}},{key:"_createInjector",value:function(t,e){return new F_(t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,new WeakMap([[KS,e],[ZS,t.data]]))}},{key:"_openedSnackBarRef",get:function(){var t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel},set:function(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}}]),t}()).\u0275fac=function(t){return new(t||XS)(Zt(vb),Zt($b),Zt(ka),Zt(IS),Zt(XS,12),Zt(nE))},XS.\u0275prov=ft({factory:function(){return new XS(Zt(vb),Zt($b),Zt(Ht),Zt(IS),Zt(XS,12),Zt(nE))},token:XS,providedIn:eE}),XS),rE=((YS=function(){function t(e,n,i){_classCallCheck(this,t),this.settings=e,this.i18n=n,this.snackbar=i}return _createClass(t,[{key:"open",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.duration||0===e.duration||(e.duration=e.action?15e3:3e3),t||(t=ky.Default);var n="string"==typeof t?this.i18n.t(t):this.i18n.t(t.message,t.replacements);return this.snackbar.open(this.i18n.t(n),this.i18n.t(e.action),{duration:e.duration})}},{key:"openComponent",value:function(t,e){return this.snackbar.openFromComponent(t,e)}}]),t}()).\u0275fac=function(t){return new(t||YS)(Zt(um),Zt(wy),Zt(iE))},YS.\u0275prov=ft({token:YS,factory:YS.\u0275fac,providedIn:"root"}),YS),oE=((US=function(){function t(e,n){_classCallCheck(this,t),this.i18n=e,this.toast=n}return _createClass(t,[{key:"handle",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.error||{};if(i.status=t.status,i.errors||(i.errors={}),Object.keys(i.errors).forEach((function(t){var e=i.errors[t];i.errors[t]=Array.isArray(e)?e[0]:e})),n.suppressAuthToast||403!==i.status&&401!==i.status){if(422===i.status&&i.message&&!Object.keys(i.errors).length)this.toast.open(i.message,{duration:15e3});else if(500===i.status){var r=((null==i?void 0:i.message)||ky.Default).substring(0,200);this.toast.open(r,{duration:15e3})}}else this.handle403Error(i);return eh(i)}}]),t}()).\u0275fac=function(t){return new(t||US)(Zt(wy),Zt(rE))},US.\u0275prov=ft({token:US,factory:US.\u0275fac,providedIn:"root"}),US),aE=((WS=function(){function t(e,n){_classCallCheck(this,t),this.httpClient=e,this.errorHandler=n}return _createClass(t,[{key:"get",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.generateHttpParams(n);return this.httpClient.get(this.prefixUri(t),Object.assign({params:r},i)).pipe(Gf((function(n){return e.errorHandler.handle(n,t,i)})))}},{key:"post",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.httpClient.post(this.prefixUri(t),n).pipe(Gf((function(n){return e.errorHandler.handle(n,t)})))}},{key:"put",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=this.spoofHttpMethod(n,"PUT"),this.httpClient.post(this.prefixUri(t),n).pipe(Gf((function(n){return e.errorHandler.handle(n,t)})))}},{key:"delete",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=this.spoofHttpMethod(n,"DELETE"),this.httpClient.post(this.prefixUri(t),n).pipe(Gf((function(n){return e.errorHandler.handle(n,t)})))}},{key:"postWithProgress",value:function(t,e){var n=this,i=new Hm("POST",this.prefixUri(t),e,{reportProgress:!0});return this.httpClient.request(i).pipe(Gf((function(e){return n.errorHandler.handle(e,t)})),Mf((function(t){return[Wm.Sent,Wm.UploadProgress,Wm.Response].includes(t.type)})))}},{key:"prefixUri",value:function(e){return e.indexOf("://")>-1||e.startsWith(t.prefix)?e:"".concat(t.prefix,"/").concat(e)}},{key:"generateHttpParams",value:function(t){var e=new Nm;return t?(Object.keys(t).forEach((function(n){var i=t[n];null==i&&(i=""),e=e.append(n,i)})),e):e}},{key:"spoofHttpMethod",value:function(t,e){return t instanceof FormData?t.append("_method",e):t._method=e,t}}]),t}()).prefix="secure",WS.\u0275fac=function(t){return new(t||WS)(Zt(oy),Zt(oE))},WS.\u0275prov=ft({token:WS,factory:WS.\u0275fac,providedIn:"root"}),WS),sE=((HS=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t,i)).http=t,r.errorHandler=i,r.cache={},r}return _createClass(n,[{key:"getWithCache",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.makeCacheKey(t,n);if(this.cache[i]instanceof b)return this.cache[i];if(this.cache[i])return th(this.cache[i]);var r=this.get(t,n).pipe(et());return r.subscribe((function(t){return e.cache[i]=t}),(function(){})),this.cache[i]=r}},{key:"post",value:function(t,e,i){return this.clearCache(),_get(_getPrototypeOf(n.prototype),"post",this).call(this,t,e)}},{key:"put",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return arguments.length>2&&arguments[2],this.clearCache(),_get(_getPrototypeOf(n.prototype),"put",this).call(this,t,e)}},{key:"delete",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return arguments.length>2&&arguments[2],this.clearCache(),_get(_getPrototypeOf(n.prototype),"delete",this).call(this,t,e)}},{key:"clearCache",value:function(){this.cache={}}},{key:"makeCacheKey",value:function(t,e){return t+JSON.stringify(e)}}]),n}(aE)).\u0275fac=function(t){return new(t||HS)(Zt(oy),Zt(oE))},HS.\u0275prov=ft({token:HS,factory:HS.\u0275fac,providedIn:"root"}),HS),lE=((VS=function(){function t(e){_classCallCheck(this,t),this.config=e,this.original=[],this.filtered=[],this.filters=new lg({search:new sg,category:new sg("handwriting")}),this.totalPages=0,this.perPage=10,this.currentPage=0,this.current$=new Df([]),this.reset(),this.bindToFilters()}return _createClass(t,[{key:"next",value:function(){this.totalPages>this.currentPage+1&&this.setPage(this.currentPage+1)}},{key:"previous",value:function(){this.currentPage-1>0&&this.setPage(this.currentPage-1)}},{key:"setPage",value:function(t){this.currentPage=t,this.current$.next(this.filtered[this.currentPage])}},{key:"filter",value:function(t,e){var n=[];this.original.forEach((function(i){var r=!e||i.family.toLowerCase().includes(e.toLowerCase());i.category.toLowerCase()===t.toLowerCase()&&r&&n.push(i)})),this.filtered=this.chunkFonts(n),this.totalPages=this.filtered.length,this.setPage(0)}},{key:"setFonts",value:function(t){this.original=t,this.filter(this.filters.get("category").value),this.filters.patchValue({category:this.config.get("pixie.tools.text.defaultCategory","handwriting")})}},{key:"getTotal",value:function(){return this.filtered.length*this.perPage}},{key:"reset",value:function(){this.filters.setValue({search:null,category:"handwriting"}),this.setPage(0)}},{key:"chunkFonts",value:function(t){for(var e=[];t.length>0;)e.push(t.splice(0,this.perPage));return e}},{key:"bindToFilters",value:function(){var t=this;this.filters.valueChanges.pipe(Cb(100),id()).subscribe((function(e){return t.filter(e.category,e.search)}))}}]),t}()).\u0275fac=function(t){return new(t||VS)(Zt(um))},VS.\u0275prov=ft({token:VS,factory:VS.\u0275fac}),VS),cE=((zS=function(){function t(e,n,i){var r=this;_classCallCheck(this,t),this.http=e,this.settings=n,this.paginator=i,this.loadedFonts=[],this.paginator.current$.subscribe((function(t){r.loadIntoDom(t)}))}return _createClass(t,[{key:"init",value:function(){return hh(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.settings.get("pixie.tools.text.items",[]),t.t0=this.settings.get("pixie.tools.text.replaceDefault"),t.t0){t.next=8;break}return t.t1=e,t.next=6,this.getGoogleFonts();case 6:t.t2=t.sent,e=t.t1.concat.call(t.t1,t.t2);case 8:this.paginator.setFonts(e);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"loadIntoDom",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;return new Promise((function(i){if(!e||!e.length)return i();if(!(e=e.filter((function(e){return!t.loadedFonts.find((function(t){return t.family===e.family}))}))).length)return i();t.loadedFonts=t.loadedFonts.concat(e);var r=e.filter((function(t){return"google"===t.type})),o=e.filter((function(t){return"custom"===t.type})),a={active:i,context:n,classes:!1};r.length&&(a.google={families:r.map((function(t){return t.family}))}),o.length&&(t.loadCustomFonts(o,n),a.custom={families:o.map((function(t){return t.family}))}),Dm.load(a)}))}},{key:"loadCustomFonts",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(e.length){var i="";e.forEach((function(e){var n=t.settings.getAssetUrl("fonts/"+e.filePath,!0);i+="@font-face { font-family: "+e.family+'; src: url("'+n+'"); }'}));var r=document.createElement("style");r.innerHTML=i,(n||window).document.head.appendChild(r)}}},{key:"getGoogleFonts",value:function(){var t=this.settings.get("pixie.googleFontsApiKey");return this.http.getWithCache("https://www.googleapis.com/webfonts/v1/webfonts?sort=popularity&key="+t).pipe(L((function(t){return t.items.map((function(t){return{family:t.family,category:t.category,type:"google"}}))}))).toPromise()}}]),t}()).\u0275fac=function(t){return new(t||zS)(Zt(sE),Zt(um),Zt(lE))},zS.\u0275prov=ft({token:zS,factory:zS.\u0275fac}),zS),uE=((BS=function(){function t(e,n,i,r,o){_classCallCheck(this,t),this.canvas=e,this.activeObject=n,this.objects=i,this.config=r,this.fontsPaginator=o,this.minWidth=250}return _createClass(t,[{key:"add",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=t||this.config.get("pixie.tools.text.defaultText");var n=Op(Object.assign(Object.assign(Object.assign(Object.assign({},this.activeObject.form.value),this.config.get("pixie.objectDefaults.text")),e),{name:Ap.text.name})),i=new wm.fabric.IText(t,n);this.canvas.fabric().add(i),this.autoPositionText(i),this.canvas.fabric().setActiveObject(i),this.canvas.render(),i.enterEditing(),i.selectAll()}},{key:"autoPositionText",value:function(t){var e=this,n=this.canvas.fabric().getWidth(),i=this.canvas.fabric().getHeight(),r=Math.min(this.canvas.fabric().getWidth(),this.minWidth);t.scaleToWidth(Math.max(n/3,r)),t.getScaledHeight()>i&&t.scaleToHeight(i-t.getScaledHeight()-20),t.viewportCenter(),this.canvas.fabric().getObjects("i-text").forEach((function(n){if(n!==t&&n.intersectsWithObject(t)){var i=n.top-t.top+n.getScaledHeight(),r=t.top+i;r>e.canvas.state.original.height-n.getScaledHeight()&&(r=0),t.set("top",r),t.setCoords()}}))}},{key:"getUsedFonts",value:function(){var t=this;return this.objects.getAll().filter((function(t){return"i-text"===t.type})).map((function(e){return e.activeFont||t.fontsPaginator.original.find((function(t){return t.family===e.fontFamily}))})).filter((function(t){return t&&"basic"!==t.type}))}}]),t}()).\u0275fac=function(t){return new(t||BS)(Zt(Em),Zt(dm),Zt(Tm),Zt(um),Zt(lE))},BS.\u0275prov=ft({token:BS,factory:BS.\u0275fac}),BS),hE=((NS=function(){function t(e,n,i,r,o,a,s,l,c){var u=this;_classCallCheck(this,t),this.canvas=e,this.activeObject=n,this.objects=i,this.frameTool=r,this.googleFonts=o,this.textTool=a,this.store=s,this.actions$=l,this.settings=c,this.canvas.state.contentLoadingState$.pipe(Mf((function(t){return("mainImage"===t.name||"blank"===t.name)&&!1===t.loading}))).subscribe((function(t){u.addInitial()}))}return _createClass(t,[{key:"undo",value:function(){if(this.canUndo())return this.load(this.store.selectSnapshot(bm.item("previous")))}},{key:"redo",value:function(){if(this.canRedo())return this.load(this.store.selectSnapshot(bm.item("next")))}},{key:"canUndo",value:function(){return this.store.selectSnapshot(bm.canUndo)}},{key:"canRedo",value:function(){return this.store.selectSnapshot(bm.canRedo)}},{key:"reload",value:function(){return this.load(this.store.selectSnapshot(bm.item("current")))}},{key:"replaceCurrent",value:function(){var t=this.store.selectSnapshot(bm.item("current"));this.store.dispatch(new ym(this.createHistoryItem(t.name,t.icon)))}},{key:"add",value:function(t,e){this.store.dispatch(new mm(this.createHistoryItem(t.name,t.icon,e)))}},{key:"addFromJson",value:function(t){var e=!this.store.selectSnapshot(bm.items).length;return this.add(e?km.INITIAL:km.LOADED_STATE,"string"==typeof t?JSON.parse(t):t),this.reload()}},{key:"getCurrentCanvasState",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e=[].concat(_toConsumableArray2(Object.keys(Cm)),["crossOrigin","name","displayName","data","activeFont"],_toConsumableArray2(e));var n=this.canvas.fabric().toJSON(e);return n.objects.forEach((function(e){"image"===e.type&&t.settings.get("pixie.crossOrigin")&&(e.crossOrigin="anonymous"),"i-text"===e.type&&(e.selectable=!0,e.lockMovementX=!1,e.lockMovementY=!1,e.lockUniScaling=!1)})),{canvas:n,editor:{frame:this.frameTool.getActive(),fonts:this.textTool.getUsedFonts()},canvasWidth:this.canvas.state.original.width,canvasHeight:this.canvas.state.original.height}}},{key:"clear",value:function(){this.store.dispatch(new _m)}},{key:"addInitial",value:function(){!this.store.selectSnapshot(bm.items).length&&this.add(km.INITIAL)}},{key:"load",value:function(t){var e=this;return new Promise((function(n){e.store.dispatch(new gm(t.id)),t.editor=t.editor||pm,e.googleFonts.loadIntoDom(t.editor.fonts).then((function(){e.canvas.fabric().loadFromJSON(t.canvas||t.state,(function(){e.canvas.zoom.set(1),t.canvasWidth&&t.canvasHeight&&e.canvas.resize(t.canvasWidth,t.canvasHeight),t.editor.frame?e.frameTool.add(t.editor.frame.name):e.frameTool.remove(),e.canvas.render(),e.canvas.fabric().calcOffset(),e.canvas.zoom.fitToScreen(),e.objects.syncObjects(),e.store.dispatch(new vm),n()}),(function(t){t.hasOwnProperty("applyFilters")&&t.applyFilters()}))}))}))}},{key:"getAllItems",value:function(){return this.store.selectSnapshot(bm.items)}},{key:"createHistoryItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;return n||(n=this.getCurrentCanvasState()),Object.assign(n,{name:t,id:Ip(15),icon:e,zoom:this.canvas.zoom.get(),activeObjectId:this.activeObject.getId()})}}]),t}()).\u0275fac=function(t){return new(t||NS)(Zt(Em),Zt(dm),Zt(Tm),Zt(Pm),Zt(cE),Zt(uE),Zt(pp),Zt(Gd),Zt(um))},NS.\u0275prov=ft({token:NS,factory:NS.\u0275fac}),NS),fE=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"ngxsOnInit",value:function(t){var e=this;this.actions$.pipe(Td(Hu),Mf((function(t){return t.panel===e.toolName}))).subscribe((function(n){e.applyChanges(t,n)})),this.actions$.pipe(Td(Wu),Mf((function(t){return t.panel===e.toolName}))).subscribe((function(n){e.cancelChanges(t,n)})),this.actions$.pipe(Td(Vu)).subscribe((function(n){e.resetState(t,n)}))}}]),t}(),dE=((GS=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;return _classCallCheck(this,n),(a=e.call(this)).store=t,a.history=i,a.activeObject=r,a.actions$=o,a.toolName=Ru.OBJECT_SETTINGS,a}return _createClass(n,[{key:"openObjectSettingsPanel",value:function(t,e){t.patchState({activePanel:e.panel})}},{key:"markAsDirty",value:function(t){t.patchState({dirty:!0})}},{key:"cancelChanges",value:function(t){t.getState().activePanel?t.patchState({activePanel:null}):(this.store.dispatch(new zu),this.activeObject.deselect()),t.getState().dirty&&this.history.reload(),t.patchState({dirty:!1})}},{key:"applyChanges",value:function(t){this.store.dispatch(new zu),t.getState().dirty&&this.history.add(km.OBJECT_STYLE),t.patchState({dirty:!1,activePanel:null}),this.activeObject.deselect()}},{key:"resetState",value:function(t){t.setState({dirty:!1,activePanel:null})}}],[{key:"dirty",value:function(t){return t.dirty}},{key:"activePanel",value:function(t){return t.activePanel}}]),n}(fE)).\u0275fac=function(t){return new(t||GS)(Zt(pp),Zt(hE),Zt(dm),Zt(Gd))},GS.\u0275prov=ft({token:GS,factory:GS.\u0275fac}),ch([Cp(Ep),uh("design:type",Function),uh("design:paramtypes",[Object,Ep]),uh("design:returntype",void 0)],GS.prototype,"openObjectSettingsPanel",null),ch([Cp(Tp),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],GS.prototype,"markAsDirty",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],GS,"dirty",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],GS,"activePanel",null),GS=ch([wp({name:Ru.OBJECT_SETTINGS,defaults:{dirty:!1,activePanel:null}})],GS)),pE=function(){var t=function t(e){_classCallCheck(this,t),this.filter=e};return t.type="[Editor.Filter] Toggle Filter",t}(),vE=function(){var t=function t(e){_classCallCheck(this,t),this.filter=e};return t.type="[Editor.Filter] Remove Filter",t}(),gE=function(){var t=function t(e){_classCallCheck(this,t),this.filter=e};return t.type="[Editor.Filter] Open Filter Controls",t}(),mE=function(){var t=function t(e){_classCallCheck(this,t),this.filters=e};return t.type="[Editor.Filter] Set Applied Filters",t}(),yE=[{name:"grayscale"},{name:"blackWhite"},{name:"sharpen",uses:"Convolute",matrix:[0,-1,0,-1,5,-1,0,-1,0]},{name:"invert"},{name:"vintage"},{name:"polaroid"},{name:"kodachrome"},{name:"technicolor"},{name:"brownie"},{name:"sepia"},{name:"removeColor",options:{distance:{type:"slider",current:.1,min:0,max:1,step:.01},color:{current:"#fff",type:"colorPicker"}}},{name:"brightness",options:{brightness:{type:"slider",current:.1,min:-1,max:1,step:.1}}},{name:"gamma",options:{red:{type:"slider",current:.1,min:.2,max:2.2,step:.003921},green:{type:"slider",current:.1,min:.2,max:2.2,step:.003921},blue:{type:"slider",current:.1,min:.2,max:2.2,step:.003921}},apply:function(t,e,n){t.gamma=[t.red,t.green,t.blue]}},{name:"noise",options:{noise:{type:"slider",current:40,max:600}}},{name:"pixelate",options:{blocksize:{type:"slider",min:1,max:40,current:6}}},{name:"blur",uses:"Convolute",matrix:[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9]},{name:"emboss",uses:"Convolute",matrix:[1,1,1,1,.7,-1,-1,-1,-1]},{name:"blendColor",options:{mode:{current:"add",type:"select",available:["add","multiply","subtract","diff","screen","lighten","darken"]},alpha:{type:"slider",current:.5,min:.1,max:1,step:.1},color:{type:"colorPicker",current:"#FF4081"}}}];function _E(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""}var bE,kE,CE,wE,xE,SE,EE,TE,OE,AE,IE,PE,DE,RE,FE,ME,jE,LE,NE,BE,zE,VE,HE=((CE=function(){function t(e,n,i){_classCallCheck(this,t),this.canvas=e,this.store=n,this.actions$=i,this.filtersList=yE,this.syncWithHistory()}return _createClass(t,[{key:"apply",value:function(t){var e=this.getByName(t);if(this.applied(e.name))return this.remove(e.name);this.store.dispatch(new pE(e.name));var n=this.create(e);this.getImages().forEach((function(t){t.filters.push(n),t.applyFilters()})),this.canvas.render()}},{key:"remove",value:function(t){var e=this,n=this.getByName(t);this.store.dispatch(new vE(n.name)),this.getImages().forEach((function(t){var i=e.findFilterIndex(n.name,t.filters);t.filters.splice(i,1),t.applyFilters()})),this.canvas.render()}},{key:"getAll",value:function(){return this.filtersList}},{key:"getByName",value:function(t){return this.filtersList.find((function(e){return e.name===t}))}},{key:"applied",value:function(t){var e=this.canvas.getMainImage();if(e)return this.findFilterIndex(t,e.filters)>-1}},{key:"hasOptions",value:function(t){return!!this.getByName(t).options}},{key:"findFilterIndex",value:function(t,e){var n=this;if(e.length){var i=this.getByName(t);return e.findIndex((function(e){var r=e.type.toLowerCase();return r===t.toLowerCase()||"convolute"===r&&n.matrixAreEqual(i.matrix,e.matrix)}))}}},{key:"matrixAreEqual",value:function(t,e){if(!t||!e||t.length!==e.length)return!1;for(var n=t.length;n--;)if(t[n]!==e[n])return!1;return!0}},{key:"applyValue",value:function(t,e,n){var i=this.getByName(t);this.getImages().forEach((function(t){var r=t.filters.find((function(t){return t.type.toLowerCase()===i.name.toLowerCase()}));r[e]=n,i.apply&&i.apply(r,e,n),t.applyFilters()})),this.canvas.render()}},{key:"create",value:function(t){var e=t.initialConfig||{};if(t.uses)return e.matrix=t.matrix,new(wm.fabric.Image.filters[_E(t.uses)])(e);for(var n in t.options)e[n]=t.options[n].current;return new(wm.fabric.Image.filters[_E(t.name)])(e)}},{key:"addCustom",value:function(t,e,n,i){wm.fabric.Image.filters[_E(t)]=wm.fabric.util.createClass(wm.fabric.Image.filters.BaseFilter,e),wm.fabric.Image.filters[_E(t)].fromObject=wm.fabric.Image.filters.BaseFilter.fromObject,yE.push({name:t,options:n,initialConfig:i})}},{key:"getImages",value:function(){return this.canvas.fabric().getObjects(Ap.image.name)}},{key:"syncWithHistory",value:function(){var t=this;this.actions$.pipe(Td(vm)).subscribe((function(){var e=t.getAll().filter((function(e){return t.applied(e.name)})).map((function(t){return t.name}));t.store.dispatch(new mE(e))}))}}]),t}()).\u0275fac=function(t){return new(t||CE)(Zt(Em),Zt(pp),Zt(Gd))},CE.\u0275prov=ft({token:CE,factory:CE.\u0275fac}),CE),WE=((kE=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;return _classCallCheck(this,n),(a=e.call(this)).store=t,a.history=i,a.actions$=r,a.filterTool=o,a.toolName=Ru.FILTER,a}return _createClass(n,[{key:"toggleFilter",value:function(t,e){t.patchState({dirty:!0,activeFilters:[].concat(_toConsumableArray2(t.getState().activeFilters),[e.filter])})}},{key:"removeFilter",value:function(t,e){var n=t.getState().activeFilters.filter((function(t){return t!==e.filter}));t.patchState({dirty:!0,activeFilters:n})}},{key:"openFilterControls",value:function(t,e){t.patchState({selectedFilter:e.filter})}},{key:"setAppliedFilters",value:function(t,e){var n=e.filters;t.patchState({activeFilters:n})}},{key:"applyChanges",value:function(t){this.store.dispatch(new zu),t.getState().dirty&&this.history.add(km.FILTER),t.patchState({dirty:!1,selectedFilter:null})}},{key:"cancelChanges",value:function(t){var e=this,n=t.getState().selectedFilter;if(n){var i=this.filterTool.getByName(n);Object.keys(i.options).forEach((function(t){e.filterTool.applyValue(n,t,i.options[t].current)})),t.patchState({selectedFilter:null})}else this.store.dispatch(new zu),t.getState().dirty&&this.history.reload(),t.patchState({dirty:!1,selectedFilter:null})}},{key:"resetState",value:function(t){t.setState({dirty:!1,activeFilters:[],selectedFilter:null})}}],[{key:"activeFilters",value:function(t){return t.activeFilters}},{key:"selectedFilter",value:function(t){return t.selectedFilter}},{key:"dirty",value:function(t){return t.dirty}}]),n}(fE)).\u0275fac=function(t){return new(t||kE)(Zt(pp),Zt(hE),Zt(Gd),Zt(HE))},kE.\u0275prov=ft({token:kE,factory:kE.\u0275fac}),ch([Cp(pE),uh("design:type",Function),uh("design:paramtypes",[Object,pE]),uh("design:returntype",void 0)],kE.prototype,"toggleFilter",null),ch([Cp(vE),uh("design:type",Function),uh("design:paramtypes",[Object,vE]),uh("design:returntype",void 0)],kE.prototype,"removeFilter",null),ch([Cp(gE),uh("design:type",Function),uh("design:paramtypes",[Object,gE]),uh("design:returntype",void 0)],kE.prototype,"openFilterControls",null),ch([Cp(mE),uh("design:type",Function),uh("design:paramtypes",[Object,mE]),uh("design:returntype",void 0)],kE.prototype,"setAppliedFilters",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],kE,"activeFilters",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],kE,"selectedFilter",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],kE,"dirty",null),kE=ch([wp({name:"filter",defaults:{dirty:!1,activeFilters:[],selectedFilter:null}})],kE)),UE=((bE=function(){function t(e){_classCallCheck(this,t),this.canvas=e}return _createClass(t,[{key:"apply",value:function(t,e){var n,i,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=Math.ceil(this.canvas.state.original.width),a=Math.ceil(this.canvas.state.original.height),s=Math.ceil(t),l=Math.ceil(e);r?(n=t/100,i=e/100):(n=t/this.canvas.state.original.width,i=e/this.canvas.state.original.height),o===s&&a===l||this.resize(n,i)}},{key:"resize",value:function(t,e){this.canvas.zoom.set(100,!1);var n=Math.round(this.canvas.state.original.height*e),i=Math.round(this.canvas.state.original.width*t);this.canvas.fabric().setHeight(n),this.canvas.fabric().setWidth(i),this.canvas.state.original.width=i,this.canvas.state.original.height=n,this.canvas.fabric().getObjects().forEach((function(n){var i=n.scaleY*e,r=n.left*t,o=n.top*e;n.scaleX=n.scaleX*t,n.scaleY=i,n.left=r,n.top=o,n.setCoords()})),this.canvas.zoom.fitToScreen(),this.canvas.render()}}]),t}()).\u0275fac=function(t){return new(t||bE)(Zt(Em))},bE.\u0275prov=ft({token:bE,factory:bE.\u0275fac}),bE),YE=function(){var t=function t(e){_classCallCheck(this,t),this.params=e};return t.type="[Editor.Resize] Set Resize Dimensions",t}(),XE={dirty:!1,resized:!1,width:null,height:null,usePercentages:!1},GE=((wE=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a){var s;return _classCallCheck(this,n),(s=e.call(this)).store=t,s.history=i,s.actions$=r,s.resizeTool=o,s.toast=a,s.toolName=Ru.RESIZE,s}return _createClass(n,[{key:"setResizeDimensions",value:function(t,e){t.patchState(Object.assign(Object.assign({},e.params),{dirty:!0}))}},{key:"applyChanges",value:function(t){var e=t.getState(),n=e.width,i=e.height,r=e.usePercentages;this.store.dispatch(new zu),this.resizeTool.apply(n,i,r),this.toast.open("Photo resized."),t.getState().dirty&&this.history.add(km.RESIZE),t.patchState(XE)}},{key:"cancelChanges",value:function(t){this.store.dispatch(new zu),t.patchState(XE)}},{key:"resetState",value:function(t){t.setState(XE)}}],[{key:"dirty",value:function(t){return t.dirty}}]),n}(fE)).\u0275fac=function(t){return new(t||wE)(Zt(pp),Zt(hE),Zt(Gd),Zt(UE),Zt(rE))},wE.\u0275prov=ft({token:wE,factory:wE.\u0275fac}),ch([Cp(YE),uh("design:type",Function),uh("design:paramtypes",[Object,YE]),uh("design:returntype",void 0)],wE.prototype,"setResizeDimensions",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],wE,"dirty",null),wE=ch([wp({name:"resize",defaults:XE})],wE)),qE=n("Iab2"),KE=n("RdDz"),ZE=((OE=function(){function t(e,n,i){_classCallCheck(this,t),this.canvas=e,this.canvasState=n,this.config=i,this.initiated=!1,this.gridColor="rgba(244,244,244,.4)",this.aspectRatio="16:9",this.resize$=new E}return _createClass(t,[{key:"draw",value:function(){this.drawMainZone(this.aspectRatio),this.drawOverlay(),this.drawGrid(),this.attachEvents(),this.canvas.render(),this.initiated=!0}},{key:"remove",value:function(){this.initiated&&(this.rect.off(),this.canvas.fabric().discardActiveObject(),this.canvas.fabric().remove(this.rect,this.grid,this.overlay),this.canvas.render(),this.initiated=!1)}},{key:"constrainWithinCanvas",value:function(t){var e=t.left,n=t.top,i=t.getScaledWidth(),r=t.getScaledHeight(),o=this.canvasState.original.width-i,a=this.canvasState.original.height-r;e<0&&(t.left=0),n<0&&(t.top=0),e>o&&(t.left=o),n>a&&(t.top=a)}},{key:"constrainWithinCanvasOnScaling",value:function(t){var e=t.left,n=t.top,i=e+t.getScaledWidth()-1,r=n+t.getScaledHeight()-1;(e<0||i>this.canvasState.original.width||n<0||r>this.canvasState.original.height)&&(t.scaleX=this.lastScaleX||1,t.scaleY=this.lastScaleY||1),e<0&&(t.left=0),n<0&&(t.top=0),this.lastScaleX=t.scaleX,this.lastScaleY=t.scaleY}},{key:"attachEvents",value:function(){var t=this;this.rect.on("moving",(function(){t.constrainWithinCanvas(t.rect),t.drawOverlay(),t.drawGrid(),t.resize$.next()})),this.rect.on("scaling",(function(){t.constrainWithinCanvasOnScaling(t.rect),t.drawOverlay(),t.drawGrid(),t.resize$.next()}))}},{key:"getAdjustedSize",value:function(t,e,n){var i=e,r=n;if(t){var o=t.split(":"),a=parseInt(o[0])/parseInt(o[1]);n*a>e?r=e/a:i=n*a}return{width:i,height:r}}},{key:"drawMainZone",value:function(t){var e=this;if(!this.initiated){var n={fill:"transparent",borderColor:this.gridColor,hasRotatingPoint:!1,name:"crop.zone",lockScalingFlip:!0,minScaleLimit:0,hasControls:!this.config.get("pixie.tools.crop.hideCustomControls")};this.rect=new wm.fabric.Rect(Object.assign(Object.assign({},n),this.config.get("pixie.tools.crop.cropzone",{}))),this.rect.on("deselected",(function(){e.canvas.fabric().setActiveObject(e.rect)})),this.canvas.fabric().add(this.rect),this.rect.moveTo(3),this.canvas.fabric().setActiveObject(this.rect)}var i=this.getAdjustedSize(t,this.canvasState.original.width,this.canvasState.original.height);this.rect.set({width:i.width,height:i.height,lockUniScaling:!!t}),this.rect.viewportCenter(),this.rect.setCoords()}},{key:"drawGrid",value:function(){if(!this.initiated){var t={stroke:this.gridColor,strokeWidth:4,selectable:!1,evented:!1},e=[new wm.fabric.Line([],t),new wm.fabric.Line([],t),new wm.fabric.Line([],t),new wm.fabric.Line([],t)];this.grid=new wm.fabric.Group(e,{name:"crop.grid",selectable:!1,evented:!1}),this.canvas.fabric().add(this.grid),this.grid.moveTo(10)}this.grid.width=this.rect.getScaledWidth(),this.grid.height=this.rect.getScaledHeight(),this.grid.left=this.rect.left,this.grid.top=this.rect.top;var n=this.grid.width/2,i=this.grid.width/3,r=this.grid.height/2,o=this.grid.height/3,a=this.grid.getObjects();a[0].set({x1:-(n-i),y1:-r,x2:-(n-i),y2:r}),a[1].set({x1:n-i,y1:-r,x2:n-i,y2:r}),a[2].set({x1:-n,y1:-(r-o),x2:n,y2:-(r-o)}),a[3].set({x1:-n,y1:r-o,x2:n,y2:r-o})}},{key:"drawOverlay",value:function(){if(!this.initiated){var t=new wm.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1}),e=new wm.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1}),n=new wm.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1}),i=new wm.fabric.Rect({fill:"rgba(0,0,0,0.6)",selectable:!0,evented:!1});this.overlay=new wm.fabric.Group([t,e,n,i],{width:this.canvasState.original.width,height:this.canvasState.original.height,selectable:!1,evented:!1,name:"crop.overlay"}),this.canvas.fabric().add(this.overlay),this.overlay.moveTo(1)}var r=-this.overlay.width/2,o=-this.overlay.height/2,a=this.overlay.getObjects();a[0].set({left:r,top:o,width:this.overlay.width,height:this.rect.getScaledHeight()<0?this.rect.top-Math.abs(this.rect.getScaledHeight()):this.rect.top}),a[1].set({left:(this.rect.getScaledWidth()<0?this.rect.left:this.rect.left+this.rect.getScaledWidth())+r,top:this.rect.top+o,width:this.rect.getScaledWidth()<0?this.canvasState.original.width-(this.rect.left+this.rect.getScaledWidth())-Math.abs(this.rect.getScaledWidth()):this.canvasState.original.width-(this.rect.left+this.rect.getScaledWidth()),height:this.rect.getScaledHeight()}),a[2].set({left:r,top:(this.rect.getScaledHeight()<0?this.rect.top:this.rect.top+this.rect.getScaledHeight())+o,width:this.canvasState.original.width,height:this.rect.getScaledHeight()<0?this.canvasState.original.height-this.rect.top:this.canvasState.original.height-(this.rect.top+this.rect.getScaledHeight())}),a[3].set({left:r,top:this.rect.top+o,width:this.rect.getScaledWidth()>0?this.rect.left:this.rect.left-Math.abs(this.rect.getScaledWidth()),height:this.rect.getScaledHeight()})}},{key:"changeAspectRatio",value:function(t){this.aspectRatio=t,this.drawMainZone(t),this.drawOverlay(),this.drawGrid(),this.canvas.render()}},{key:"getSize",value:function(){return{width:this.rect.getScaledWidth(),height:this.rect.getScaledHeight(),left:this.rect.left,top:this.rect.top}}},{key:"resize",value:function(t,e){this.aspectRatio=null,this.rect.width=t>this.canvasState.original.width?this.canvasState.original.width:t,this.rect.height=e>this.canvasState.original.height?this.canvasState.original.height:e,this.rect.lockUniScaling=!1,this.rect.scaleX=1,this.rect.scaleY=1,this.rect.setCoords(),this.drawOverlay(),this.drawGrid(),this.canvas.render()}}]),t}()).\u0275fac=function(t){return new(t||OE)(Zt(Em),Zt(fm),Zt(um))},OE.\u0275prov=ft({token:OE,factory:OE.\u0275fac}),OE),QE=((TE=function(){function t(e,n){_classCallCheck(this,t),this.canvas=e,this.canvasState=n,this.lineStyle={stroke:"rgba(255,255,255,0.3)",strokeWidth:5,strokeLineCap:"round",strokeLineJoin:"round"}}return _createClass(t,[{key:"add",value:function(t){this.createGroup(),this.addText(t),this.addLines(),this.canvas.fabric().add(this.watermark),this.canvas.render()}},{key:"remove",value:function(){this.watermark&&(this.canvas.fabric().remove(this.watermark),this.watermark=null,this.canvas.render())}},{key:"createGroup",value:function(){this.watermark=new wm.fabric.Group(null,Object.assign({},Cm,{width:this.canvasState.original.width,height:this.canvasState.original.height,excludeFromExport:!0,top:0,left:0}))}},{key:"addText",value:function(t){var e=new wm.fabric.Text(t,{fill:"rgba(255,255,255,0.3)",strokeWidth:2,stroke:"rgba(255,255,255,0.4)",originX:"center",originY:"center",fontWeight:600,fontSize:150,fontFamily:"Courier New"});e.scaleToWidth(this.canvasState.original.width/2),this.watermark.add(e)}},{key:"addLines",value:function(){var t=this.watermark.getObjects("text")[0],e=this.canvasState.original.width/2,n=this.canvasState.original.height/2,i=t.width/4,r=new wm.fabric.Line(null,this.lineStyle),o=new wm.fabric.Line(null,this.lineStyle),a=new wm.fabric.Line(null,this.lineStyle),s=new wm.fabric.Line(null,this.lineStyle);this.watermark.add(r,o,a,s),r.set({x1:i,y1:-100,x2:e,y2:-n}),o.set({x1:i,y1:100,x2:e,y2:n}),a.set({x1:-i,y1:-100,x2:-e,y2:-n}),s.set({x1:-i,y1:100,x2:-e,y2:n})}}]),t}()).\u0275fac=function(t){return new(t||TE)(Zt(Em),Zt(fm))},TE.\u0275prov=ft({token:TE,factory:TE.\u0275fac}),TE),JE=((EE=function(){function t(e,n,i,r,o,a,s){_classCallCheck(this,t),this.canvas=e,this.cropzone=n,this.history=i,this.config=r,this.http=o,this.watermark=a,this.toast=s}return _createClass(t,[{key:"getDefault",value:function(t){return this.config.get("pixie.tools.export.default"+_E(t))}},{key:"export",value:function(t,e,n){t||(t=this.getDefault("name")),e||(e=this.getDefault("format")),n||(n=this.getDefault("quality"));var i,r=t+"."+e;this.applyWaterMark(),i="json"===e?this.getJsonState():this.getDataUrl(e,n),this.watermark.remove(),i&&(this.config.has("pixie.saveUrl")?this.http.post(this.config.get("pixie.saveUrl"),{data:i,filename:r,format:e}).subscribe((function(){}),(function(){})):this.config.has("pixie.onSave")?this.config.get("pixie.onSave")(i,r,e):this.getCanvasBlob(e,i).then((function(t){Object(qE.saveAs)(t,r)})))}},{key:"getCanvasBlob",value:function(t,e){return new Promise((function(n){var i;if("json"===t)i=new Blob([e],{type:"application/json"});else if("svg"===t)i=new Blob([e],{type:"image/svg+xml"});else{var r="image/"+t;e=e.replace(/data:image\/([a-z]*)?;base64,/,""),i=KE(e,r)}n(i)}))}},{key:"getDataUrl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getDefault("format"),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getDefault("quality");this.prepareCanvas();try{return"svg"===t?this.canvas.fabric().toSVG():this.canvas.fabric().toDataURL({format:t,quality:e,multiplier:this.canvas.state.original.width/this.canvas.fabric().getWidth()})}catch(n){if(-1===n.message.toLowerCase().indexOf("tainted"))return null;this.toast.open("Could not export canvas with external image.")}}},{key:"getJsonState",value:function(){return JSON.stringify(this.history.getCurrentCanvasState())}},{key:"prepareCanvas",value:function(){this.canvas.fabric().discardActiveObject(),this.canvas.pan.reset(),this.cropzone.remove()}},{key:"applyWaterMark",value:function(){var t=this.config.get("pixie.watermarkText");t&&this.watermark.add(t)}}]),t}()).\u0275fac=function(t){return new(t||EE)(Zt(Em),Zt(ZE),Zt(hE),Zt(um),Zt(oy),Zt(QE),Zt(rE))},EE.\u0275prov=ft({token:EE,factory:EE.\u0275fac}),EE),$E=((SE=function(){function t(e,n,i,r,o){_classCallCheck(this,t),this.activeObject=e,this.canvas=n,this.saveTool=i,this.objects=r,this.activeFrame=o}return _createClass(t,[{key:"canMerge",value:function(){return this.objects.getAll().filter((function(t){return t.name!==Ap.mainImage.name})).length>0}},{key:"apply",value:function(){this.canvas.state.contentLoadingState$.next({name:"merge",loading:!0});var t=this.saveTool.getDataUrl();return this.clearCanvas(),this.canvas.loadMainImage(t,!1,"merge")}},{key:"clearCanvas",value:function(){this.activeFrame.remove(),this.canvas.fabric().clear()}}]),t}()).\u0275fac=function(t){return new(t||SE)(Zt(dm),Zt(Em),Zt(JE),Zt(Tm),Zt(Om))},SE.\u0275prov=ft({token:SE,factory:SE.\u0275fac}),SE),tT=((xE=function(){function t(e,n,i){_classCallCheck(this,t),this.canvas=e,this.mergeTool=n,this.cropZone=i}return _createClass(t,[{key:"apply",value:function(t){var e=this;return this.cropZone.remove(),this.mergeTool.apply().then((function(){e.canvas.resize(Math.round(t.width),Math.round(t.height));var n=e.canvas.getMainImage();n.cropX=Math.round(t.left),n.cropY=Math.round(t.top),n.width=Math.round(t.width),n.height=Math.round(t.height),e.canvas.render()}))}}]),t}()).\u0275fac=function(t){return new(t||xE)(Zt(Em),Zt($E),Zt(ZE))},xE.\u0275prov=ft({token:xE,factory:xE.\u0275fac}),xE),eT={dirty:!0},nT=((PE=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a,s){var l;return _classCallCheck(this,n),(l=e.call(this)).store=t,l.history=i,l.actions$=r,l.cropTool=o,l.cropZone=a,l.zoom=s,l.toolName=Ru.CROP,l}return _createClass(n,[{key:"applyChanges",value:function(t){var e=this;this.store.dispatch(new zu),this.cropTool.apply(this.cropZone.getSize()).then((function(){e.history.add(km.CROP),t.patchState(eT)}))}},{key:"cancelChanges",value:function(t){this.store.dispatch(new zu),t.patchState(eT)}},{key:"resetState",value:function(t){t.setState(eT)}}],[{key:"dirty",value:function(t){return t.dirty}}]),n}(fE)).\u0275fac=function(t){return new(t||PE)(Zt(pp),Zt(hE),Zt(Gd),Zt(tT),Zt(ZE),Zt(Sm))},PE.\u0275prov=ft({token:PE,factory:PE.\u0275fac}),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],PE,"dirty",null),PE=ch([wp({name:"crop",defaults:eT})],PE)),iT=((IE=function(){function t(e,n){_classCallCheck(this,t),this.canvas=e,this.config=n}return _createClass(t,[{key:"getShapeByName",value:function(t){return this.config.get("pixie.tools.shapes.items").find((function(e){return e.name===t}))}},{key:"addBasicShape",value:function(t){"string"==typeof t&&(t=this.getShapeByName(t));var e,n=t,i=this.canvas.fabric().getWidth(),r=Object.assign(Object.assign({},this.config.get("pixie.objectDefaults.basicShape")),n.options),o=i/2;"circle"===n.name?r.radius=o:"ellipse"===n.name?(r.rx=o,r.ry=o/2):(r.width=o,r.height=o),e="Path"===n.type?new wm.fabric[n.type](r.path,Object.assign({displayName:n.name},r)):new wm.fabric[n.type](r),this.addAndPositionSticker(e)}},{key:"addSticker",value:function(t,e){var n=this.config.get("pixie.tools.stickers.items").find((function(e){return e.name===t}));if("svg"===n.type){var i=this.getStickerUrl(n,e);return this.addSvgSticker(i)}return this.addRegularSticker(n,e)}},{key:"addRegularSticker",value:function(t,e){var n=this;return new Promise((function(i){wm.fabric.util.loadImage(n.getStickerUrl(t,e),(function(t){var e=new wm.fabric.Image(t);n.addAndPositionSticker(e,Ap.sticker),i()}))}))}},{key:"addSvgSticker",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ap.sticker,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return new Promise((function(r){wm.fabric.loadSVGFromURL(t,(function(t,o){var a=wm.fabric.util.groupSVGElements(t,o);e.addAndPositionSticker(a,n,i),r()}))}))}},{key:"addAndPositionSticker",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ap.shape,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.name=e.name,t.set(this.config.get("pixie.objectDefaults.sticker")),this.canvas.fabric().add(t),this.canvas.fabric().setActiveObject(t),n&&t.scaleToWidth(this.canvas.fabric().getWidth()/4),t.viewportCenter(),t.setCoords(),this.canvas.render()}},{key:"getStickerUrl",value:function(t,e){return this.config.getAssetUrl("images/stickers/"+t.name+"/"+e+"."+t.type,!0)}},{key:"getStickerCategoryUrl",value:function(t){return t.thumbnailUrl?this.config.getAssetUrl(t.thumbnailUrl,!0):this.getStickerUrl(t,1)}}]),t}()).\u0275fac=function(t){return new(t||IE)(Zt(Em),Zt(um))},IE.\u0275prov=ft({token:IE,factory:IE.\u0275fac}),IE),rT=function(){var t=function t(e){_classCallCheck(this,t),this.shape=e};return t.type="[Editor.Shapes] Add Shape",t}(),oT=((AE=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;return _classCallCheck(this,n),(a=e.call(this)).store=t,a.shapesTool=i,a.history=r,a.actions$=o,a.toolName=Ru.SHAPES,a}return _createClass(n,[{key:"applyChanges",value:function(t){this.store.dispatch(new Bu(Ru.OBJECT_SETTINGS)),t.getState().dirty&&this.history.add(km.SHAPES),t.patchState({dirty:!1})}},{key:"cancelChanges",value:function(t){this.store.dispatch(new zu),t.getState().dirty&&this.history.reload(),t.patchState({dirty:!1})}},{key:"resetState",value:function(t){t.setState({dirty:!1})}},{key:"addShape",value:function(t,e){t.patchState({dirty:!0}),this.shapesTool.addBasicShape(e.shape)}}],[{key:"dirty",value:function(t){return t.dirty}}]),n}(fE)).\u0275fac=function(t){return new(t||AE)(Zt(pp),Zt(iT),Zt(hE),Zt(Gd))},AE.\u0275prov=ft({token:AE,factory:AE.\u0275fac}),ch([Cp(rT),uh("design:type",Function),uh("design:paramtypes",[Object,rT]),uh("design:returntype",void 0)],AE.prototype,"addShape",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],AE,"dirty",null),AE=ch([wp({name:"shapes",defaults:{dirty:!1}})],AE)),aT=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor.Transform] Mark as Dirty",t}(),sT={dirty:!1},lT=((DE=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this)).store=t,o.history=i,o.actions$=r,o.toolName=Ru.TRANSFORM,o}return _createClass(n,[{key:"markAsDirty",value:function(t){t.patchState({dirty:!0})}},{key:"applyChanges",value:function(t){this.store.dispatch(new zu),t.getState().dirty&&this.history.add(km.TRANSFORM),t.patchState(sT)}},{key:"cancelChanges",value:function(t){this.store.dispatch(new zu),t.getState().dirty&&this.history.reload(),t.patchState(sT)}},{key:"resetState",value:function(t){t.setState(sT)}}],[{key:"dirty",value:function(t){return t.dirty}}]),n}(fE)).\u0275fac=function(t){return new(t||DE)(Zt(pp),Zt(hE),Zt(Gd))},DE.\u0275prov=ft({token:DE,factory:DE.\u0275fac}),ch([Cp(aT),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],DE.prototype,"markAsDirty",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],DE,"dirty",null),DE=ch([wp({name:"transform",defaults:sT})],DE)),cT=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor.Frame] Mark as Dirty",t}(),uT=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor.Frame] Open Frame Controls",t}(),hT={dirty:!1,controlsOpen:!1},fT=((RE=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this)).store=t,o.history=i,o.actions$=r,o.toolName=Ru.FRAME,o}return _createClass(n,[{key:"markAsDirty",value:function(t){t.patchState({dirty:!0})}},{key:"openFrameControls",value:function(t){t.patchState({controlsOpen:!0})}},{key:"applyChanges",value:function(t){this.store.dispatch(new zu),t.getState().dirty&&this.history.add(km.FRAME),t.patchState(hT)}},{key:"cancelChanges",value:function(t){t.getState().dirty&&this.history.reload(),t.getState().controlsOpen?t.patchState({controlsOpen:!1}):(this.store.dispatch(new zu),t.patchState(hT))}},{key:"resetState",value:function(t){t.setState(hT)}}],[{key:"dirty",value:function(t){return t.dirty}},{key:"controlsOpen",value:function(t){return t.controlsOpen}}]),n}(fE)).\u0275fac=function(t){return new(t||RE)(Zt(pp),Zt(hE),Zt(Gd))},RE.\u0275prov=ft({token:RE,factory:RE.\u0275fac}),ch([Cp(cT),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],RE.prototype,"markAsDirty",null),ch([Cp(uT),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],RE.prototype,"openFrameControls",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],RE,"dirty",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],RE,"controlsOpen",null),RE=ch([wp({name:"frame",defaults:hT})],RE)),dT=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor.Draw] Mark as Dirty",t}(),pT=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor.Draw] Open Brush Controls",t}(),vT=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor.Draw] Close Brush Controls",t}(),gT={dirty:!1,brushControlsOpen:!1},mT=((FE=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this)).store=t,o.history=i,o.actions$=r,o.toolName=Ru.DRAW,o}return _createClass(n,[{key:"markAsDirty",value:function(t){t.patchState({dirty:!0})}},{key:"openBrushControls",value:function(t){t.patchState({brushControlsOpen:!0})}},{key:"closeBrushControls",value:function(t){t.patchState({brushControlsOpen:!1})}},{key:"applyChanges",value:function(t){this.store.dispatch(new zu),t.getState().dirty&&this.history.add(km.DRAW),t.patchState(gT)}},{key:"cancelChanges",value:function(t){t.getState().brushControlsOpen||this.store.dispatch(new zu),t.getState().dirty&&this.history.reload(),t.patchState(gT)}},{key:"resetState",value:function(t){t.setState(gT)}}],[{key:"dirty",value:function(t){return t.dirty}},{key:"brushControlsOpen",value:function(t){return t.brushControlsOpen}}]),n}(fE)).\u0275fac=function(t){return new(t||FE)(Zt(pp),Zt(hE),Zt(Gd))},FE.\u0275prov=ft({token:FE,factory:FE.\u0275fac}),ch([Cp(dT),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],FE.prototype,"markAsDirty",null),ch([Cp(pT),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],FE.prototype,"openBrushControls",null),ch([Cp(vT),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],FE.prototype,"closeBrushControls",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],FE,"dirty",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],FE,"brushControlsOpen",null),FE=ch([wp({name:"draw",defaults:gT})],FE)),yT=function(){var t=function t(e){_classCallCheck(this,t),this.category=e};return t.type="[Editor.Stickers] Open Sticker Category",t}(),_T=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor.Stickers] Mark as Dirty",t}(),bT={dirty:!1,activeCategory:null},kT=((jE=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this)).store=t,o.history=i,o.actions$=r,o.toolName=Ru.STICKERS,o}return _createClass(n,[{key:"markAsDirty",value:function(t){t.patchState({dirty:!0})}},{key:"openStickerCategory",value:function(t,e){t.patchState({activeCategory:e.category})}},{key:"applyChanges",value:function(t){this.store.dispatch(new Bu(Ru.OBJECT_SETTINGS)),t.getState().dirty&&this.history.add(km.STICKERS),t.patchState(bT)}},{key:"cancelChanges",value:function(t){t.getState().activeCategory||this.store.dispatch(new zu),t.getState().dirty&&this.history.reload(),t.patchState(bT)}},{key:"resetState",value:function(t){t.setState(bT)}}],[{key:"dirty",value:function(t){return t.dirty}},{key:"activeCategory",value:function(t){return t.activeCategory}}]),n}(fE)).\u0275fac=function(t){return new(t||jE)(Zt(pp),Zt(hE),Zt(Gd))},jE.\u0275prov=ft({token:jE,factory:jE.\u0275fac}),ch([Cp(_T),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],jE.prototype,"markAsDirty",null),ch([Cp(yT),uh("design:type",Function),uh("design:paramtypes",[Object,yT]),uh("design:returntype",void 0)],jE.prototype,"openStickerCategory",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],jE,"dirty",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],jE,"activeCategory",null),jE=ch([wp({name:"stickers",defaults:bT})],jE)),CT=((ME=function(){function t(e,n,i,r){_classCallCheck(this,t),this.activeObject=e,this.canvas=n,this.state=i,this.saveTool=r}return _createClass(t,[{key:"apply",value:function(t){var e=this;this.updatePreview(t),this.state.fabric.remove(this.previewRect),this.state.fabric.clipTo=function(t){e.state.fabric.getRetinaScaling(),e.previewRect.set({width:e.previewRect.width,height:e.previewRect.height,rx:e.previewRect.rx,ry:e.previewRect.ry,stroke:null}),e.previewRect.render(t),e.state.fabric.clipTo=null};var n=this.saveTool.getDataUrl();return this.state.fabric.clear(),this.hidePreview(),this.canvas.loadMainImage(n)}},{key:"getPreviewRadius",value:function(){return this.previewRect.rx}},{key:"updatePreview",value:function(t){this.previewRect.set({rx:t,ry:t}),this.canvas.render()}},{key:"showPreview",value:function(){this.previewRect=new wm.fabric.Rect({width:this.state.original.width,height:this.state.original.height,rx:50,ry:50,objectCaching:!1,fill:"transparent",name:"round.rect",stroke:"rgba(255,255,255,0.8)",strokeWidth:3,strokeDashArray:[4,4],selectable:!1,evented:!1}),this.state.fabric.add(this.previewRect),this.previewRect.moveTo(99),this.previewRect.viewportCenter(),this.canvas.render()}},{key:"hidePreview",value:function(){this.previewRect&&(this.state.fabric.remove(this.previewRect),this.canvas.render(),this.previewRect=null)}}]),t}()).\u0275fac=function(t){return new(t||ME)(Zt(dm),Zt(Em),Zt(fm),Zt(JE))},ME.\u0275prov=ft({token:ME,factory:ME.\u0275fac}),ME),wT={dirty:!0},xT=((LE=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;return _classCallCheck(this,n),(a=e.call(this)).store=t,a.actions$=i,a.history=r,a.roundTool=o,a.toolName=Ru.CORNERS,a}return _createClass(n,[{key:"applyChanges",value:function(t){var e=this;this.store.dispatch(new zu),this.roundTool.apply(this.roundTool.getPreviewRadius()).then((function(){e.history.add(km.CORNERS)})),t.patchState(wT)}},{key:"cancelChanges",value:function(t){this.store.dispatch(new zu),t.patchState(wT)}},{key:"resetState",value:function(t){t.setState(wT)}}],[{key:"dirty",value:function(t){return t.dirty}}]),n}(fE)).\u0275fac=function(t){return new(t||LE)(Zt(pp),Zt(Gd),Zt(hE),Zt(CT))},LE.\u0275prov=ft({token:LE,factory:LE.\u0275fac}),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],LE,"dirty",null),LE=ch([wp({name:"corners",defaults:wT})],LE)),ST=function(){var t=function t(){_classCallCheck(this,t)};return t.type="[Editor.Background] Mark as Dirty",t}(),ET={dirty:!0},TT=((NE=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;return _classCallCheck(this,n),(o=e.call(this)).store=t,o.actions$=i,o.history=r,o.toolName=Ru.BACKGROUND,o}return _createClass(n,[{key:"markAsDirty",value:function(t){t.patchState({dirty:!0})}},{key:"applyChanges",value:function(t){this.store.dispatch(new zu),t.getState().dirty&&this.history.add(km.BACKGROUND),t.patchState(ET)}},{key:"cancelChanges",value:function(t){this.store.dispatch(new zu),t.getState().dirty&&this.history.reload(),t.patchState(ET)}},{key:"resetState",value:function(t){t.setState(ET)}}],[{key:"dirty",value:function(t){return t.dirty}}]),n}(fE)).\u0275fac=function(t){return new(t||NE)(Zt(pp),Zt(Gd),Zt(hE))},NE.\u0275prov=ft({token:NE,factory:NE.\u0275fac}),ch([Cp(ST),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],NE.prototype,"markAsDirty",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],NE,"dirty",null),NE=ch([wp({name:"background",defaults:ET})],NE)),OT=function(){var t=function t(e){_classCallCheck(this,t),this.text=e};return t.type="[Text] Add",t}(),AT={dirty:!1},IT=((VE=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;return _classCallCheck(this,n),(a=e.call(this)).textTool=t,a.store=i,a.history=r,a.actions$=o,a.toolName=Ru.TEXT,a}return _createClass(n,[{key:"add",value:function(t,e){this.textTool.add(e.text),t.setState({dirty:!0})}},{key:"applyChanges",value:function(t){this.store.dispatch(new Bu(Ru.OBJECT_SETTINGS)),t.getState().dirty&&this.history.add(km.TEXT),t.patchState(AT)}},{key:"cancelChanges",value:function(t){this.store.dispatch(new zu),t.getState().dirty&&this.history.reload(),t.patchState(AT)}},{key:"resetState",value:function(t){t.setState(AT)}}],[{key:"dirty",value:function(t){return t.dirty}}]),n}(fE)).\u0275fac=function(t){return new(t||VE)(Zt(uE),Zt(pp),Zt(hE),Zt(Gd))},VE.\u0275prov=ft({token:VE,factory:VE.\u0275fac}),ch([Cp(OT),uh("design:type",Function),uh("design:paramtypes",[Object,OT]),uh("design:returntype",void 0)],VE.prototype,"add",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],VE,"dirty",null),VE=ch([wp({name:"text",defaults:AT})],VE)),PT=((zE=function(){function t(e){var n=this;_classCallCheck(this,t),this.breakpointObserver=e,this.isMobile$=new Df(!1),this.isTablet$=new Df(!1),this.breakpointObserver.observe(DS).subscribe((function(t){n.isMobile$.next(t.matches)})),this.breakpointObserver.observe("(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)").subscribe((function(t){n.isTablet$.next(t.matches)}))}return _createClass(t,[{key:"observe",value:function(t){return this.breakpointObserver.observe(t)}}]),t}()).\u0275fac=function(t){return new(t||zE)(Zt(IS))},zE.\u0275prov=ft({token:zE,factory:zE.\u0275fac,providedIn:"root"}),zE),DT=((BE=function(){function t(e,n,i){_classCallCheck(this,t),this.config=e,this.breakpoints=n,this.activeObject=i}return _createClass(t,[{key:"ngxsAfterBootstrap",value:function(t){this.listenToConfigChange(t),this.listenToBreakpointChange(t)}},{key:"openEditor",value:function(t){t.patchState({visible:!0}),this.config.set("pixie.ui.visible",!0),this.executeCallback("onOpen")}},{key:"closeEditor",value:function(t,e){var n=e.executeCallback,i=this.config.get("pixie.ui.allowEditorClose");n&&(i=!1!==this.executeCallback("onClose")),i&&(t.patchState({visible:!1}),this.config.set("pixie.ui.visible",!1))}},{key:"openPanel",value:function(t,e){t.patchState({activePanel:e.panel})}},{key:"closeForePanel",value:function(t){t.patchState({activePanel:Ru.NAVIGATION})}},{key:"objectSelected",value:function(t,e){var n=this.getActiveObjState();e.fromUserAction&&t.getState().activePanel===Ru.NAVIGATION&&(n.activePanel=Ru.OBJECT_SETTINGS),t.patchState(n),this.activeObject.syncForm()}},{key:"objectDeselected",value:function(t){var e=this.getActiveObjState();t.getState().activePanel!==Ru.OBJECT_SETTINGS||t.getState().objectSettings.dirty||(e.activePanel=Ru.NAVIGATION),t.patchState(e),this.activeObject.syncForm()}},{key:"setZoom",value:function(t,e){var n=e.zoom;t.patchState({zoom:n})}},{key:"executeCallback",value:function(t){var e=this.config.get("pixie."+t);return e&&e()}},{key:"listenToBreakpointChange",value:function(t){var e=this;this.breakpoints.observe("(max-width: 599.99px)").subscribe((function(){t.patchState({navPosition:e.getNavPosition()})}))}},{key:"listenToConfigChange",value:function(t){var e=this;this.config.all$().subscribe((function(){var n=e.config.get("pixie");t.patchState({mode:n.ui.mode,hideToolbar:n.ui.toolbar.hide,visible:n.ui.visible,navItems:n.ui.nav.items,navPosition:e.getNavPosition()})}))}},{key:"getNavPosition",value:function(){var t=this.config.get("pixie.ui.nav.position",Du.TOP);return this.breakpoints.isMobile$.value&&t!==Du.NONE?Du.BOTTOM:t}},{key:"getActiveObjState",value:function(){var t=this.activeObject.get(),e={activeObjId:null,activeObjIsText:!1,activeObjIsSvg:!1};return t&&(e.activeObjId=t.data.id,e.activeObjIsText="i-text"===t.type,e.activeObjIsSvg="group"===t.type&&t.svgUid,e.activeObjIsImage="image"===t.type),e}}],[{key:"visible",value:function(t){return t.visible}},{key:"mode",value:function(t){return t.mode}},{key:"navItems",value:function(t){return t.navItems}},{key:"navPosition",value:function(t){return t.navPosition}},{key:"toolbarHidden",value:function(t){return t.hideToolbar}},{key:"activePanel",value:function(t){return t.activePanel}},{key:"dirty",value:function(t){return t[t.activePanel].dirty}},{key:"zoom",value:function(t){return t.zoom}},{key:"activeObjIsText",value:function(t){return t.activeObjIsText}},{key:"activeObjIsSvg",value:function(t){return t.activeObjIsSvg}},{key:"activeObjIsImage",value:function(t){return t.activeObjIsImage}},{key:"activeObjId",value:function(t){return t.activeObjId}}]),t}()).\u0275fac=function(t){return new(t||BE)(Zt(um),Zt(PT),Zt(dm))},BE.\u0275prov=ft({token:BE,factory:BE.\u0275fac}),ch([Cp(Lu),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE.prototype,"openEditor",null),ch([Cp(Nu),uh("design:type",Function),uh("design:paramtypes",[Object,Nu]),uh("design:returntype",void 0)],BE.prototype,"closeEditor",null),ch([Cp(Bu),uh("design:type",Function),uh("design:paramtypes",[Object,Bu]),uh("design:returntype",void 0)],BE.prototype,"openPanel",null),ch([Cp(zu),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE.prototype,"closeForePanel",null),ch([Cp(Uu),uh("design:type",Function),uh("design:paramtypes",[Object,Uu]),uh("design:returntype",void 0)],BE.prototype,"objectSelected",null),ch([Cp(Yu),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE.prototype,"objectDeselected",null),ch([Cp(Gu),uh("design:type",Function),uh("design:paramtypes",[Object,Gu]),uh("design:returntype",void 0)],BE.prototype,"setZoom",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"visible",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"mode",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"navItems",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"navPosition",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"toolbarHidden",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"activePanel",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"dirty",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"zoom",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"activeObjIsText",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"activeObjIsSvg",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"activeObjIsImage",null),ch([Sp(),uh("design:type",Function),uh("design:paramtypes",[Object]),uh("design:returntype",void 0)],BE,"activeObjId",null),BE=ch([wp({name:"imageEditor",defaults:{mode:Iu.INLINE,hideToolbar:!1,activePanel:Ru.NAVIGATION,navItems:[],navPosition:Du.TOP,activeObjIsText:!1,activeObjIsSvg:!1,activeObjIsImage:!1,activeObjId:null,zoom:100},children:[WE,GE,nT,lT,mT,IT,oT,kT,fT,xT,TT,dE]})],BE)),RT=function(t){return t.image="image/*",t.audio="audio/*",t.video="video/mp4,video/mpeg,video/x-m4v,video/*",t}({});function FT(t){return/(?:\.([^.]+))?$/.exec(t)[1]}var MT=function(){function t(e,n){_classCallCheck(this,t),this.url=null,this.name=e.name,this.size=e.size,this.mime=function(t){var e={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",yaml:"text/yaml",yml:"text/yaml"},n=t.name?FT(t.name):null;return t.type?t.type:n&&e[n]?e[n]:null}(e),this.lastModified=e.lastModified,this.extension=FT(e.name),this.native=e,this.relativePath=n||e.webkitRelativePath||null}return _createClass(t,[{key:"getData",value:function(){var t=this;return new Promise((function(e){var n=new FileReader;n.addEventListener("load",(function(){e(n.result)})),"json"===t.extension?n.readAsText(t.native):n.readAsDataURL(t.native)}))}}]),t}();function jT(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(e){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=document.querySelector("#hidden-file-upload-input");e&&e.remove();var n=document.createElement("input");n.type="file",n.multiple=t.multiple,n.classList.add("hidden"),n.style.display="none",n.style.visibility="hidden",n.id="hidden-file-upload-input";var i=[];return t.extensions&&(t.extensions=t.extensions.map((function(t){return t.startsWith(".")?t:"."+t})),i.push(t.extensions.join(","))),t.types&&i.push(t.types.join(",")),i.length&&(n.accept=i.join(",")),t.directory&&(n.webkitdirectory=!0),document.body.appendChild(n),n}(t);n.onchange=function(t){var i=Array.from(t.target.files).map((function(t){return new MT(t)}));e(i),n.remove()},document.body.appendChild(n),n.click()}))}var LT,NT=((LT=function(){function t(e,n,i){_classCallCheck(this,t),this.settings=e,this.toast=n,this.i18n=i,this.validations=[]}return _createClass(t,[{key:"validate",value:function(t){this.validations.length||this.initValidations();var e=this.validations.find((function(e){return e.fails(t)}));return e&&this.showToast&&this.openErrorToast(e.errorMessage),{failed:!!e,errorMessage:e?e.errorMessage:null}}},{key:"validateWithToast",value:function(t){var e=this.validate(t);return e.failed&&this.openErrorToast(e.errorMessage),e}},{key:"openErrorToast",value:function(t){this.toast.open(t)}}]),t}()).\u0275fac=function(t){return new(t||LT)(Zt(um),Zt(rE),Zt(wy))},LT.\u0275prov=ft({token:LT,factory:LT.\u0275fac,providedIn:"root"}),LT),BT=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"passes",value:function(t){return!this.fails(t)}}]),t}(),zT=["bytes","KB","MB","GB","TB","PB"];function VT(t,e){if(isNaN(parseFloat(String(t)))||!isFinite(t))return null;for(var n=0;t>=1024;)t/=1024,n++;var i=zT[n];return e||(e=function(t){switch(t){case"MB":return 1;case"GB":case"TB":case"PB":return 2;default:return 0}}(i)),"bytes"===i&&t<2&&(i="byte"),parseFloat(t.toFixed(+e).toString()).toString()+" "+i}var HT,WT,UT,YT=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this)).params=t,r.i18n=i,r.errorMessage=r.i18n.t("Maximum file size is :number",{number:VT(+r.params.maxSize)}),r}return _createClass(n,[{key:"fails",value:function(t){return this.params.maxSize<t.size}}]),n}(BT),XT=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this)).params=t,r.i18n=i,r.errorMessage=r.i18n.t("Only these file types are allowed: :extensions",{extensions:r.params.extensions.join(", ")}),r}return _createClass(n,[{key:"fails",value:function(t){return!this.params.extensions.some((function(e){return e.toLowerCase()===t.extension.toLowerCase()}))}}]),n}(BT),GT=((HT=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments)).DEFAULT_MAX_FILE_SIZE_MB=10,t.showToast=!0,t}return _createClass(n,[{key:"initValidations",value:function(){this.validations.push(new YT({maxSize:this.getMaxFileSize()},this.i18n));var t=this.getAllowedExtensions();t&&t.length&&this.validations.push(new XT({extensions:t},this.i18n))}},{key:"getMaxFileSize",value:function(){return this.settings.get("pixie.tools.import.maxFileSize",null===(t=this.DEFAULT_MAX_FILE_SIZE_MB)?null:t*Math.pow(1024,2));var t}},{key:"getAllowedExtensions",value:function(){return this.settings.get("pixie.tools.import.validExtensions")}}]),n}(NT)).\u0275fac=function(t){return qT(t||HT)},HT.\u0275prov=ft({token:HT,factory:HT.\u0275fac,providedIn:"root"}),HT),qT=ui(GT),KT=((WT=function(){function t(e,n,i,r,o,a,s,l,c,u){_classCallCheck(this,t),this.history=e,this.canvas=n,this.toast=i,this.config=r,this.frame=o,this.cropzone=a,this.validator=s,this.store=l,this.shapeTool=c,this.http=u}return _createClass(t,[{key:"openUploadDialog",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{type:"image"};return jT({extensions:this.getUploadAcceptString(e.type)}).then((function(n){return t.loadFile(n[0],e)}))}},{key:"loadFile",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{type:"image"};return this.validateAndGetData(t).then((function(i){return e.executeOnFileOpenCallback(t,n),n.openAsBackground&&"json"!==i.extension?e.openBackgroundImage(i.data):(e.canvas.state.contentLoadingState$.next({name:"json"===i.extension?"state":"overlayImage",loading:!0}),e.openFile(i.data,i.extension).then((function(t){return e.canvas.state.contentLoadingState$.next({name:"json"===i.extension?"state":"overlayImage",loading:!1}),t})))}),(function(){}))}},{key:"importAndGetData",value:function(){var t=this;return new Promise((function(e){jT({types:[RT.image]}).then((function(n){t.validateAndGetData(n[0]).then((function(t){return e(t.data)}))}))}))}},{key:"validateAndGetData",value:function(t){var e=this,n=this.validator.validate(t),i=t.extension;return new Promise((function(r,o){if(n.failed)return o();e.readFile(t,i).then((function(t){return r({data:t,extension:i})}))}))}},{key:"resetEditor",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.canvas.fabric().clear(),this.frame.remove(),this.cropzone.remove(),t.preserveHistory||this.history.clear(),this.config.setMultiple({"pixie.image":null,"pixie.blankCanvasSize":null}),new Promise((function(t){return setTimeout((function(){return t()}))}))}},{key:"openFile",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"png",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.config.get("pixie.tools.import.fitOverlayToScreen");return t instanceof HTMLImageElement&&(t=t.src),"json"===e?this.loadState(t):"svg"===e?this.shapeTool.addSvgSticker(t,Ap.image,n):this.canvas.openImage(t,n)}},{key:"loadStateFromUrl",value:function(t){var e=this;return this.http.get(t).toPromise().then((function(t){return e.loadState(t)}))}},{key:"loadState",value:function(t){var e=this;return this.resetEditor().then((function(){return e.history.addFromJson(t)}))}},{key:"openBackgroundImage",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{resetEditor:!0};return(n.resetEditor?this.resetEditor({preserveHistory:!0}):new Promise((function(t){return t()}))).then((function(){return t instanceof HTMLImageElement&&(t=t.src),e.canvas.loadMainImage(t,n.resetEditor)}))}},{key:"readFile",value:function(t,e){var n=new FileReader;return new Promise((function(i){n.addEventListener("load",(function(){i(n.result)})),"json"===e?n.readAsText(t.native):n.readAsDataURL(t.native)}))}},{key:"getUploadAcceptString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",e=this.config.get("pixie.tools.import.validExtensions");if(e)return e;switch(t){case"image":return["image/*"];case"state":return[".json","application/json"];case"all":default:return["image/*",".json","application/json"]}}},{key:"executeOnFileOpenCallback",value:function(t,e){var n=this.config.get("pixie.onFileOpen");n&&n(t,e)}}]),t}()).\u0275fac=function(t){return new(t||WT)(Zt(hE),Zt(Em),Zt(rE),Zt(um),Zt(Pm),Zt(ZE),Zt(GT),Zt(pp),Zt(iT),Zt(oy))},WT.\u0275prov=ft({token:WT,factory:WT.\u0275fac}),WT),ZT=function(){function t(e){_classCallCheck(this,t),this.overlayRef=e,this.id=Ip(15),this.value=new E}return _createClass(t,[{key:"isOpen",value:function(){return this.overlayRef&&this.overlayRef.hasAttached()}},{key:"close",value:function(){this.overlayRef&&this.overlayRef.dispose()}},{key:"emitValue",value:function(t){this.value.next(t)}},{key:"valueChanged",value:function(){return this.value.asObservable()}},{key:"getPanelEl",value:function(){return this.overlayRef.overlayElement}},{key:"updatePosition",value:function(){return this.overlayRef.updatePosition()}},{key:"afterClosed",value:function(){return this.overlayRef.detachments().pipe(zf(1))}}]),t}(),QT=((UT=function(){function t(e,n,i){_classCallCheck(this,t),this.el=e,this.i18n=n,this.settings=i,this.subscriptions=[]}return _createClass(t,[{key:"ngAfterViewInit",value:function(){var t=this,e=this.i18n.localizationChange.subscribe((function(){return t.translate()}));this.subscriptions.push(e),(this.settings.get("i18n.enable")||this.transValues)&&this.translate()}},{key:"translate",value:function(){var t=this.el.nativeElement;if(t.getAttribute("placeholder")){var e=t.getAttribute("placeholder");t.setAttribute("placeholder",this.i18n.t(e))}else if(t.getAttribute("title")){var n=t.getAttribute("title");t.setAttribute("title",this.i18n.t(n))}else this.translateTextContent(t)}},{key:"translateTextContent",value:function(t){var e=Array.from(t.childNodes);e.sort((function(t,e){return t.nodeType===Node.TEXT_NODE?-1:1}));for(var n=0;n<e.length;n++){var i=e[n],r=i.textContent.trim();if(i.nodeType===Node.TEXT_NODE&&r.length>1)return i.nodeValue=this.i18n.t(r,this.transValues);if(this.translateTextContent(i))return}}},{key:"ngOnDestroy",value:function(){this.subscriptions.filter((function(t){return!!t})).forEach((function(t){return t.unsubscribe()})),this.subscriptions=[]}}]),t}()).\u0275fac=function(t){return new(t||UT)(rs(kl),rs(wy),rs(um))},UT.\u0275dir=be({type:UT,selectors:[["","trans",""],["","trans-placeholder",""],["","trans-title",""]],inputs:{transValues:"transValues"}}),UT);function JT(t){return getComputedStyle(t)}function $T(t,e){for(var n in e){var i=e[n];"number"==typeof i&&(i+="px"),t.style[n]=i}return t}function tO(t){var e=document.createElement("div");return e.className=t,e}var eO="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function nO(t,e){if(!eO)throw new Error("No element matching method supported");return eO.call(t,e)}function iO(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function rO(t,e){return Array.prototype.filter.call(t.children,(function(t){return nO(t,e)}))}var oO=function(t){return"ps__thumb-"+t},aO=function(t){return"ps__rail-"+t},sO=function(t){return"ps--active-"+t},lO=function(t){return"ps--scrolling-"+t},cO={x:null,y:null};function uO(t,e){var n=t.element.classList,i=lO(e);n.contains(i)?clearTimeout(cO[e]):n.add(i)}function hO(t,e){cO[e]=setTimeout((function(){return t.isAlive&&t.element.classList.remove(lO(e))}),t.settings.scrollingThreshold)}var fO=function(t){this.element=t,this.handlers={}},dO={isEmpty:{configurable:!0}};fO.prototype.bind=function(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},fO.prototype.unbind=function(t,e){var n=this;this.handlers[t]=this.handlers[t].filter((function(i){return!(!e||i===e)||(n.element.removeEventListener(t,i,!1),!1)}))},fO.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},dO.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every((function(e){return 0===t.handlers[e].length}))},Object.defineProperties(fO.prototype,dO);var pO=function(){this.eventElements=[]};function vO(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}function gO(t,e,n,i,r){var o;if(void 0===i&&(i=!0),void 0===r&&(r=!1),"top"===e)o=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");o=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,n,i,r){var o=n[0],a=n[1],s=n[2],l=n[3],c=n[4],u=n[5];void 0===i&&(i=!0),void 0===r&&(r=!1);var h=t.element;t.reach[l]=null,h[s]<1&&(t.reach[l]="start"),h[s]>t[o]-t[a]-1&&(t.reach[l]="end"),e&&(h.dispatchEvent(vO("ps-scroll-"+l)),e<0?h.dispatchEvent(vO("ps-scroll-"+c)):e>0&&h.dispatchEvent(vO("ps-scroll-"+u)),i&&function(t,e){uO(t,e),hO(t,e)}(t,l)),t.reach[l]&&(e||r)&&h.dispatchEvent(vO("ps-"+l+"-reach-"+t.reach[l]))}(t,n,o,i,r)}function mO(t){return parseInt(t,10)||0}pO.prototype.eventElement=function(t){var e=this.eventElements.filter((function(e){return e.element===t}))[0];return e||(e=new fO(t),this.eventElements.push(e)),e},pO.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},pO.prototype.unbind=function(t,e,n){var i=this.eventElement(t);i.unbind(e,n),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},pO.prototype.unbindAll=function(){this.eventElements.forEach((function(t){return t.unbindAll()})),this.eventElements=[]},pO.prototype.once=function(t,e,n){var i=this.eventElement(t);i.bind(e,(function t(r){i.unbind(e,t),n(r)}))};var yO={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function _O(t){var e=t.element,n=Math.floor(e.scrollTop),i=e.getBoundingClientRect();t.containerWidth=Math.ceil(i.width),t.containerHeight=Math.ceil(i.height),t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||(rO(e,aO("x")).forEach((function(t){return iO(t)})),e.appendChild(t.scrollbarXRail)),e.contains(t.scrollbarYRail)||(rO(e,aO("y")).forEach((function(t){return iO(t)})),e.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=bO(t,mO(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=mO((t.negativeScrollAdjustment+e.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=bO(t,mO(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=mO(n*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,e){var n={width:e.railXWidth},i=Math.floor(t.scrollTop);n.left=e.isRtl?e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:t.scrollLeft,e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-i:n.top=e.scrollbarXTop+i,$T(e.scrollbarXRail,n);var r={top:i,height:e.railYHeight};e.isScrollbarYUsingRight?r.right=e.isRtl?e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth-9:e.scrollbarYRight-t.scrollLeft:r.left=e.isRtl?e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:e.scrollbarYLeft+t.scrollLeft,$T(e.scrollbarYRail,r),$T(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),$T(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}(e,t),t.scrollbarXActive?e.classList.add(sO("x")):(e.classList.remove(sO("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=!0===t.isRtl?t.contentWidth:0),t.scrollbarYActive?e.classList.add(sO("y")):(e.classList.remove(sO("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0)}function bO(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function kO(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=t.element,f=null,d=null,p=null;function v(e){e.touches&&e.touches[0]&&(e[r]=e.touches[0].pageY),h[l]=f+p*(e[r]-d),uO(t,c),_O(t),e.stopPropagation(),e.preventDefault()}function g(){hO(t,c),t[u].classList.remove("ps--clicking"),t.event.unbind(t.ownerDocument,"mousemove",v)}function m(e,a){f=h[l],a&&e.touches&&(e[r]=e.touches[0].pageY),d=e[r],p=(t[i]-t[n])/(t[o]-t[s]),a?t.event.bind(t.ownerDocument,"touchmove",v):(t.event.bind(t.ownerDocument,"mousemove",v),t.event.once(t.ownerDocument,"mouseup",g),e.preventDefault()),t[u].classList.add("ps--clicking"),e.stopPropagation()}t.event.bind(t[a],"mousedown",(function(t){m(t)})),t.event.bind(t[a],"touchstart",(function(t){m(t,!0)}))}var CO={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",(function(t){return t.stopPropagation()})),t.event.bind(t.scrollbarYRail,"mousedown",(function(e){var n=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top;t.element.scrollTop+=(n>t.scrollbarYTop?1:-1)*t.containerHeight,_O(t),e.stopPropagation()})),t.event.bind(t.scrollbarX,"mousedown",(function(t){return t.stopPropagation()})),t.event.bind(t.scrollbarXRail,"mousedown",(function(e){var n=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left;t.element.scrollLeft+=(n>t.scrollbarXLeft?1:-1)*t.containerWidth,_O(t),e.stopPropagation()}))},"drag-thumb":function(t){kO(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),kO(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",(function(n){if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(nO(e,":hover")||nO(t.scrollbarX,":focus")||nO(t.scrollbarY,":focus"))){var i,r=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(r){if("IFRAME"===r.tagName)r=r.contentDocument.activeElement;else for(;r.shadowRoot;)r=r.shadowRoot.activeElement;if(nO(i=r,"input,[contenteditable]")||nO(i,"select,[contenteditable]")||nO(i,"textarea,[contenteditable]")||nO(i,"button,[contenteditable]"))return}var o=0,a=0;switch(n.which){case 37:o=n.metaKey?-t.contentWidth:n.altKey?-t.containerWidth:-30;break;case 38:a=n.metaKey?t.contentHeight:n.altKey?t.containerHeight:30;break;case 39:o=n.metaKey?t.contentWidth:n.altKey?t.containerWidth:30;break;case 40:a=n.metaKey?-t.contentHeight:n.altKey?-t.containerHeight:-30;break;case 32:a=n.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:a=t.containerHeight;break;case 34:a=-t.containerHeight;break;case 36:a=t.contentHeight;break;case 35:a=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==o||t.settings.suppressScrollY&&0!==a||(e.scrollTop-=a,e.scrollLeft+=o,_O(t),function(n,i){var r=Math.floor(e.scrollTop);if(0===n){if(!t.scrollbarYActive)return!1;if(0===r&&i>0||r>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var o=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===o&&n<0||o>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}(o,a)&&n.preventDefault())}}))},wheel:function(t){var e=t.element;function n(n){var i=function(t){var e=t.deltaX,n=-1*t.deltaY;return void 0!==e&&void 0!==n||(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!=e&&n!=n&&(e=0,n=t.wheelDelta),t.shiftKey?[-n,-e]:[e,n]}(n),r=i[0],o=i[1];if(!function(t,n,i){if(!yO.isWebKit&&e.querySelector("select:focus"))return!0;if(!e.contains(t))return!1;for(var r=t;r&&r!==e;){if(r.classList.contains("ps__child--consume"))return!0;var o=JT(r);if(i&&o.overflowY.match(/(scroll|auto)/)){var a=r.scrollHeight-r.clientHeight;if(a>0&&(r.scrollTop>0&&i<0||r.scrollTop<a&&i>0))return!0}if(n&&o.overflowX.match(/(scroll|auto)/)){var s=r.scrollWidth-r.clientWidth;if(s>0&&(r.scrollLeft>0&&n<0||r.scrollLeft<s&&n>0))return!0}r=r.parentNode}return!1}(n.target,r,o)){var a=!1;t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(o?e.scrollTop-=o*t.settings.wheelSpeed:e.scrollTop+=r*t.settings.wheelSpeed,a=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(r?e.scrollLeft+=r*t.settings.wheelSpeed:e.scrollLeft-=o*t.settings.wheelSpeed,a=!0):(e.scrollTop-=o*t.settings.wheelSpeed,e.scrollLeft+=r*t.settings.wheelSpeed),_O(t),(a=a||function(n,i){var r=Math.floor(e.scrollTop),o=0===e.scrollTop,a=r+e.offsetHeight===e.scrollHeight,s=0===e.scrollLeft,l=e.scrollLeft+e.offsetWidth===e.scrollWidth;return!(Math.abs(i)>Math.abs(n)?o||a:s||l)||!t.settings.wheelPropagation}(r,o))&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault())}}void 0!==window.onwheel?t.event.bind(e,"wheel",n):void 0!==window.onmousewheel&&t.event.bind(e,"mousewheel",n)},touch:function(t){if(yO.supportsTouch||yO.supportsIePointer){var e=t.element,n={},i=0,r={},o=null;yO.supportsTouch?(t.event.bind(e,"touchstart",c),t.event.bind(e,"touchmove",u),t.event.bind(e,"touchend",h)):yO.supportsIePointer&&(window.PointerEvent?(t.event.bind(e,"pointerdown",c),t.event.bind(e,"pointermove",u),t.event.bind(e,"pointerup",h)):window.MSPointerEvent&&(t.event.bind(e,"MSPointerDown",c),t.event.bind(e,"MSPointerMove",u),t.event.bind(e,"MSPointerUp",h)))}function a(n,i){e.scrollTop-=i,e.scrollLeft-=n,_O(t)}function s(t){return t.targetTouches?t.targetTouches[0]:t}function l(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function c(t){if(l(t)){var e=s(t);n.pageX=e.pageX,n.pageY=e.pageY,i=(new Date).getTime(),null!==o&&clearInterval(o)}}function u(o){if(l(o)){var c=s(o),u={pageX:c.pageX,pageY:c.pageY},h=u.pageX-n.pageX,f=u.pageY-n.pageY;if(function(t,n,i){if(!e.contains(t))return!1;for(var r=t;r&&r!==e;){if(r.classList.contains("ps__child--consume"))return!0;var o=JT(r);if(i&&o.overflowY.match(/(scroll|auto)/)){var a=r.scrollHeight-r.clientHeight;if(a>0&&(r.scrollTop>0&&i<0||r.scrollTop<a&&i>0))return!0}if(n&&o.overflowX.match(/(scroll|auto)/)){var s=r.scrollWidth-r.clientWidth;if(s>0&&(r.scrollLeft>0&&n<0||r.scrollLeft<s&&n>0))return!0}r=r.parentNode}return!1}(o.target,h,f))return;a(h,f),n=u;var d=(new Date).getTime(),p=d-i;p>0&&(r.x=h/p,r.y=f/p,i=d),function(n,i){var r=Math.floor(e.scrollTop),o=e.scrollLeft,a=Math.abs(n),s=Math.abs(i);if(s>a){if(i<0&&r===t.contentHeight-t.containerHeight||i>0&&0===r)return 0===window.scrollY&&i>0&&yO.isChrome}else if(a>s&&(n<0&&o===t.contentWidth-t.containerWidth||n>0&&0===o))return!0;return!0}(h,f)&&o.preventDefault()}}function h(){t.settings.swipeEasing&&(clearInterval(o),o=setInterval((function(){t.isInitialized?clearInterval(o):r.x||r.y?Math.abs(r.x)<.01&&Math.abs(r.y)<.01?clearInterval(o):(a(30*r.x,30*r.y),r.x*=.8,r.y*=.8):clearInterval(o)}),10))}}},wO=function(t,e){var n=this;if(void 0===e&&(e={}),"string"==typeof t&&(t=document.querySelector(t)),!t||!t.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var i in this.element=t,t.classList.add("ps"),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},e)this.settings[i]=e[i];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var r,o,a=function(){return t.classList.add("ps--focus")},s=function(){return t.classList.remove("ps--focus")};this.isRtl="rtl"===JT(t).direction,!0===this.isRtl&&t.classList.add("ps__rtl"),this.isNegativeScroll=(o=t.scrollLeft,t.scrollLeft=-1,r=t.scrollLeft<0,t.scrollLeft=o,r),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new pO,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=tO(aO("x")),t.appendChild(this.scrollbarXRail),this.scrollbarX=tO(oO("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",a),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var l=JT(this.scrollbarXRail);this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=mO(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=mO(l.borderLeftWidth)+mO(l.borderRightWidth),$T(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=mO(l.marginLeft)+mO(l.marginRight),$T(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=tO(aO("y")),t.appendChild(this.scrollbarYRail),this.scrollbarY=tO(oO("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",a),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var c=JT(this.scrollbarYRail);this.scrollbarYRight=parseInt(c.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=mO(c.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var e=JT(t);return mO(e.width)+mO(e.paddingLeft)+mO(e.paddingRight)+mO(e.borderLeftWidth)+mO(e.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=mO(c.borderTopWidth)+mO(c.borderBottomWidth),$T(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=mO(c.marginTop)+mO(c.marginBottom),$T(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(t){return CO[t](n)})),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",(function(t){return n.onScroll(t)})),_O(this)};wO.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,$T(this.scrollbarXRail,{display:"block"}),$T(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=mO(JT(this.scrollbarXRail).marginLeft)+mO(JT(this.scrollbarXRail).marginRight),this.railYMarginHeight=mO(JT(this.scrollbarYRail).marginTop)+mO(JT(this.scrollbarYRail).marginBottom),$T(this.scrollbarXRail,{display:"none"}),$T(this.scrollbarYRail,{display:"none"}),_O(this),gO(this,"top",0,!1,!0),gO(this,"left",0,!1,!0),$T(this.scrollbarXRail,{display:""}),$T(this.scrollbarYRail,{display:""}))},wO.prototype.onScroll=function(t){this.isAlive&&(_O(this),gO(this,"top",this.element.scrollTop-this.lastScrollTop),gO(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},wO.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),iO(this.scrollbarX),iO(this.scrollbarY),iO(this.scrollbarXRail),iO(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},wO.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(t){return!t.match(/^ps([-_].+|)$/)})).join(" ")};var xO,SO=wO,EO=new Vt("SUPPORTS_NATIVE_SCROLLBAR_STYLING",{providedIn:"root",factory:function(){if(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>-1)return!1;var t=document.createElement("div");t.className="__sb-test",t.style.overflow="scroll",t.style.width="40px";var e=document.createElement("style");e.innerHTML=".__sb-test::-webkit-scrollbar { width: 0px; }",t.appendChild(e),document.body.appendChild(t);var n=40==t.scrollWidth;return document.body.removeChild(t),n}}),TO=((xO=function(){function t(e,n,i,r,o,a,s){_classCallCheck(this,t),this.el=e,this.renderer=n,this.breakpoints=i,this.ngZone=r,this.mutationObserverFactory=o,this.config=a,this.supportsNativeStyling=s,this.subscriptions=[],this.minLength=100,this.suppressX=!0,this.scrollTop=0,this.native=!0,this.debouncer=new E}return _createClass(t,[{key:"ngAfterViewInit",value:function(){this.renderer.addClass(this.el.nativeElement,this.suppressX?"scroll-container":"scroll-container-x"),this.shouldUseNative()||(this.scrollbar=new SO(this.el.nativeElement,{minScrollbarLength:this.minLength,suppressScrollX:this.suppressX,useBothWheelAxes:!this.suppressX,wheelSpeed:2}),this.native=!1,this.bindToContentChange())}},{key:"update",value:function(){this.native||this.scrollbar.update()}},{key:"setScrollTop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.el.nativeElement.scrollTop=t,this.scrollTop=this.el.nativeElement.scrollTop,this.update()}},{key:"ngOnDestroy",value:function(){this.subscriptions.forEach((function(t){return t.unsubscribe()})),this.subscriptions=[],this.native||this.scrollbar.destroy(),this.debouncer.complete(),this.observer&&this.observer.disconnect()}},{key:"shouldUseNative",value:function(){return!this.config.get("vebto.forceCustomScrollbar")&&!/Edge/.test(navigator.userAgent)&&(!!this.breakpoints.isMobile$.value||this.supportsNativeStyling)}},{key:"bindToContentChange",value:function(){var t=this;this.observer=this.ngZone.runOutsideAngular((function(){return t.mutationObserverFactory.create((function(e){t.debouncer.next(e)}))})),this.observer.observe(this.el.nativeElement,{childList:!0,subtree:!0}),this.ngZone.runOutsideAngular((function(){t.debouncer.subscribe((function(e){return t.update()}))}))}}]),t}()).\u0275fac=function(t){return new(t||xO)(rs(kl),rs(Sl),rs(PT),rs(ou),rs(Ib),rs(um),rs(EO))},xO.\u0275dir=be({type:xO,selectors:[["","customScrollbar",""]],inputs:{minLength:["customScrollbarMinLength","minLength"],suppressX:"suppressX"}}),xO);function OO(t,e){if(1&t){var n=ds();ls(0,"div",6),ls(1,"button",7),gs("click",(function(){return Qe(n),ks().openUploadDialog()})),Gs(2,"Open Photo"),cs(),ls(3,"button",8),gs("click",(function(){return Qe(n),ks().newCanvasFormVisible$.next(!0)})),Gs(4,"Create New"),cs(),cs()}}function AO(t,e){if(1&t){var n=ds();ls(0,"div",9),ls(1,"form",10),gs("ngSubmit",(function(){return Qe(n),ks().createNewCanvas()})),ls(2,"div",11),ls(3,"label",12),Gs(4,"Width"),cs(),us(5,"input",13),cs(),ls(6,"div",11),ls(7,"label",14),Gs(8,"Height"),cs(),us(9,"input",15),cs(),ls(10,"div",16),ls(11,"button",17),gs("click",(function(){return Qe(n),ks().newCanvasFormVisible$.next(!1)})),Gs(12,"Cancel"),cs(),ls(13,"button",18),Gs(14,"Create"),cs(),cs(),cs(),cs()}if(2&t){var i=ks();kr(1),as("formGroup",i.newCanvasForm)}}function IO(t,e){1&t&&(ls(0,"div",19),us(1,"hr"),ls(2,"span",20),Gs(3,"or use a sample"),cs(),cs())}function PO(t,e){if(1&t){var n=ds();ls(0,"img",21),gs("click",(function(){Qe(n);var t=e.$implicit;return ks().openSample(t)})),cs()}if(2&t){var i=e.$implicit;as("src",ks().getSampleUrl(i,!0),$i)}}var DO,RO,FO,MO,jO,LO,NO,BO=((DO=function(){function t(e,n,i,r){_classCallCheck(this,t),this.importTool=e,this.config=n,this.panelRef=i,this.canvas=r,this.newCanvasForm=new lg({width:new sg(800),height:new sg(600)}),this.newCanvasFormVisible$=new Df(!1),this.sampleImages=this.config.get("pixie.ui.openImageDialog.sampleImages")}return _createClass(t,[{key:"openUploadDialog",value:function(){var t=this;this.importTool.openUploadDialog({openAsBackground:!0}).then((function(){return t.close()}))}},{key:"openSample",value:function(t){var e=this;if("function"==typeof t.action)t.action();else{var n=this.getSampleUrl(t);n.endsWith(".json")?this.importTool.loadStateFromUrl(n).then((function(){return e.close()})):this.importTool.openBackgroundImage(n).then((function(){return e.close()}))}}},{key:"createNewCanvas",value:function(){var t=this,e=this.newCanvasForm.get("width").value,n=this.newCanvasForm.get("height").value;this.config.set("pixie.blankCanvasSize",{width:e,height:n}),this.canvas.openNew(e,n).then((function(){return t.close()}))}},{key:"close",value:function(){this.panelRef.close()}},{key:"getSampleUrl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.thumbnail&&e?t.thumbnail:t.url;return-1===n.indexOf("//")?this.config.getAssetUrl(n,!0):n}}]),t}()).\u0275fac=function(t){return new(t||DO)(rs(KT),rs(um),rs(ZT),rs(Em))},DO.\u0275cmp=pe({type:DO,selectors:[["open-sample-image-panel"]],decls:9,vars:7,consts:[["trans",""],["class","buttons",4,"ngIf","ngIfElse"],["canvasFormContainer",""],["class","separator",4,"ngIf"],["customScrollbar","",1,"samples",3,"suppressX"],[3,"src","click",4,"ngFor","ngForOf"],[1,"buttons"],["mat-flat-button","","color","accent","trans","",3,"click"],["mat-stroked-button","","color","accent","trans","",3,"click"],[1,"new-canvas-container"],["ngNativeValidate","",1,"many-inputs",3,"formGroup","ngSubmit"],[1,"input-container"],["for","width","trans",""],["type","number","id","width","min","1","formControlName","width"],["for","height","trans",""],["type","number","id","height","min","1","formControlName","height"],[1,"form-buttons"],["type","button","mat-button","","trans","",3,"click"],["type","submit","mat-raised-button","","color","accent","trans",""],[1,"separator"],["trans","",1,"text"],[3,"src","click"]],template:function(t,e){if(1&t&&(ls(0,"h2",0),Gs(1,"Open a photo or design to get started."),cs(),ns(2,OO,5,0,"div",1),fc(3,"async"),ns(4,AO,15,1,"ng-template",null,2,jc),ns(6,IO,4,0,"div",3),ls(7,"div",4),ns(8,PO,1,1,"img",5),cs()),2&t){var n=is(5);kr(2),as("ngIf",!dc(3,5,e.newCanvasFormVisible$))("ngIfElse",n),kr(4),as("ngIf",e.sampleImages.length),kr(1),as("suppressX",!1),kr(1),as("ngForOf",e.sampleImages)}},directives:[QT,uf,TO,lf,_S,Zp,Eg,fv,zp,Kp,Bg],pipes:[Tf],styles:["pixie-editor .sample-image-panel{max-width:318px}open-sample-image-panel{display:block;padding:15px;border-radius:3px;overflow:hidden;margin:0 auto}open-sample-image-panel h2{font-size:16px;font-weight:400;margin:10px 0;text-align:center}open-sample-image-panel .separator{position:relative;text-align:center;height:30px;display:flex;justify-content:center;align-items:center;margin-bottom:8px}open-sample-image-panel .separator hr{position:absolute;left:0;top:13px;width:100%;height:2px;background-color:rgba(0,0,0,.07);margin:0;border:none}open-sample-image-panel .separator .text{display:block;background-color:var(--be-background);position:relative;z-index:1;padding:0 10px}open-sample-image-panel .buttons{display:flex;justify-content:center;margin:20px 0;text-align:center}open-sample-image-panel .buttons button{display:block;margin:0 10px}open-sample-image-panel .samples{display:flex;padding-bottom:5px}open-sample-image-panel .samples img{cursor:pointer;width:80px;height:80px;flex-shrink:0;-o-object-fit:cover;object-fit:cover;transition:box-shadow .3s ease;margin:0 8px;border-radius:4px;overflow:hidden}open-sample-image-panel .samples img:first-of-type{margin-left:0}open-sample-image-panel .samples img:last-of-type{margin-right:0}open-sample-image-panel .samples img:hover{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}open-sample-image-panel .new-canvas-container{margin:20px 0;padding-top:20px;border-top:2px solid rgba(0,0,0,.07)}open-sample-image-panel .new-canvas-container .form-buttons{text-align:right}"],encapsulation:2,changeDetection:0}),DO),zO=new Vt("OVERLAY_PANEL_DATA"),VO=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"attach",value:function(){}},{key:"enable",value:function(){document.documentElement.classList.add("be-fullscreen-overlay-scrollblock")}},{key:"disable",value:function(){document.documentElement.classList.remove("be-fullscreen-overlay-scrollblock")}}]),t}(),HO={hasBackdrop:!0,closeOnBackdropClick:!0,panelClass:"overlay-panel"},WO=((jO=function(){function t(e,n,i){_classCallCheck(this,t),this.overlay=e,this.breakpoints=n,this.injector=i}return _createClass(t,[{key:"open",value:function(t,e){var n=Object.assign({},HO,e),i={positionStrategy:this.getPositionStrategy(n),hasBackdrop:n.hasBackdrop,panelClass:n.panelClass,backdropClass:n.backdropClass,scrollStrategy:this.getScrollStrategy(n),disposeOnNavigation:!0};n.width&&(i.width=n.width),n.height&&(i.height=n.height);var r=this.overlay.create(i),o=new ZT(r),a=t instanceof Yl?new O_(t,n.viewContainerRef,n.data):new T_(t,null,this.createInjector(n,o));return o.componentRef=r.attach(a),n.closeOnBackdropClick&&(r.backdropClick().subscribe((function(){return o.close()})),r.keydownEvents().pipe(Mf((function(t){return 27===t.keyCode}))).subscribe((function(){return o.close()}))),o}},{key:"getScrollStrategy",value:function(t){return t.fullScreen?new VO:"close"===t.scrollStrategy?this.overlay.scrollStrategies.close():null}},{key:"createInjector",value:function(t,e){var n=new WeakMap;return n.set(ZT,e),n.set(zO,t.data||null),new F_(this.injector,n)}},{key:"getPositionStrategy",value:function(t){if(t.positionStrategy)return t.positionStrategy;var e=this.breakpoints.isMobile$.value&&t.mobilePosition||t.position;return"global"===t.origin||this.positionIsGlobal(e)?this.getGlobalPositionStrategy(e):this.getConnectedPositionStrategy(e,t.origin)}},{key:"positionIsGlobal",value:function(t){return"center"===t||!Array.isArray(t)}},{key:"getGlobalPositionStrategy",value:function(t){if("center"===t)return this.overlay.position().global().centerHorizontally().centerVertically();var e=this.overlay.position().global();return Object.keys(t).forEach((function(n){e[n](t[n])})),e}},{key:"getConnectedPositionStrategy",value:function(t,e){return this.overlay.position().flexibleConnectedTo(e).withPositions(t).withPush(!0).withViewportMargin(5)}}]),t}()).\u0275fac=function(t){return new(t||jO)(Zt(vb),Zt(PT),Zt(ka))},jO.\u0275prov=ft({token:jO,factory:jO.\u0275fac,providedIn:"root"}),jO),UO=((MO=function(){function t(e,n,i,r){_classCallCheck(this,t),this.canvasState=e,this.config=n,this.overlayPanel=i,this.store=r}return _createClass(t,[{key:"open",value:function(){var t=this;if(this.shouldShowOpenImageDialog()){var e=this.overlayPanel.overlay.position().flexibleConnectedTo(new kl(this.canvasState.wrapperEl)).withPositions([{overlayX:"center",overlayY:"center",originX:"center",originY:"center"}]);this.sampleImagePanelRef=this.overlayPanel.open(BO,{hasBackdrop:!0,closeOnBackdropClick:!1,positionStrategy:e,panelClass:["floating-panel","sample-image-panel"]}),this.sampleImagePanelRef.afterClosed().subscribe((function(){t.sampleImagePanelRef=null}))}}},{key:"reposition",value:function(){this.sampleImagePanelRef&&this.sampleImagePanelRef.updatePosition()}},{key:"shouldShowOpenImageDialog",value:function(){return this.store.selectSnapshot(DT.visible)&&!this.sampleImagePanelRef}}]),t}()).\u0275fac=function(t){return new(t||MO)(Zt(fm),Zt(um),Zt(WO),Zt(pp))},MO.\u0275prov=ft({token:MO,factory:MO.\u0275fac,providedIn:"root"}),MO),YO=((FO=function(){function t(e){_classCallCheck(this,t),this.store=e}return _createClass(t,[{key:"openPanel",value:function(t){this.store.dispatch(new Bu(t))}},{key:"closeCurrentPanel",value:function(){this.store.dispatch(new zu)}}]),t}()).\u0275fac=function(t){return new(t||FO)(Zt(pp))},FO.\u0275prov=ft({token:FO,factory:FO.\u0275fac}),FO),XO=((RO=function(){function t(e){_classCallCheck(this,t),this.canvas=e}return _createClass(t,[{key:"rotate",value:function(t,e,n){"basic"===t?this.rotateFixed(e):this.rotateFree(e,n)}},{key:"flip",value:function(t){var e="horizontal"===t?"flipY":"flipX";this.canvas.fabric().forEachObject((function(t){t[e]=!t[e]})),this.canvas.render()}},{key:"rotateFixed",value:function(t){this.canvas.zoom.set(1);var e=(this.canvas.getMainImage().angle+t)%360,n=Math.abs(this.canvas.getMainImage().width*Math.sin(e*Math.PI/180))+Math.abs(this.canvas.getMainImage().height*Math.cos(e*Math.PI/180)),i=Math.abs(this.canvas.getMainImage().height*Math.sin(e*Math.PI/180))+Math.abs(this.canvas.getMainImage().width*Math.cos(e*Math.PI/180));this.canvas.resize(i,n),this.canvas.getMainImage().viewportCenter(),this.canvas.fabric().forEachObject((function(e){e.rotate((e.angle+t)%360),e.setCoords()})),this.canvas.render(),this.canvas.zoom.fitToScreen()}},{key:"rotateFree",value:function(t,e){var n=this;if(!(t>360||t<0)){var i=!1;this.canvas.fabric().forEachObject((function(r){e&&"left"===e?t=r.angle-90:e&&"right"===e&&(t=r.angle+90),"center"===r.originX&&"center"===r.originY||!r.centeredRotation||(n.setOriginToCenter(r),i=!0),r.angle=t=t>360?90:t<0?270:t,r.setCoords(),i&&n.setCenterToOrigin(r)})),this.canvas.render()}}},{key:"setOriginToCenter",value:function(t){t._originalOriginX=t.originX,t._originalOriginY=t.originY;var e=t.getCenterPoint();t.set({originX:"center",originY:"center",left:e.x,top:e.y})}},{key:"setCenterToOrigin",value:function(t){var e=t.translateToOriginPoint(t.getCenterPoint(),t._originalOriginX,t._originalOriginY);t.set({originX:t._originalOriginX,originY:t._originalOriginY,left:e.x,top:e.y})}}]),t}()).\u0275fac=function(t){return new(t||RO)(Zt(Em))},RO.\u0275prov=ft({token:RO,factory:RO.\u0275fac}),RO),GO=function(t){var e=new wm.fabric.PatternBrush(t);return e.getPatternSrc=function(){var t=document.createElement("canvas");t.width=t.height=10;var e=t.getContext("2d");return e.strokeStyle=this.color,e.lineWidth=5,e.beginPath(),e.moveTo(0,5),e.lineTo(10,5),e.closePath(),e.stroke(),t},e},qO=function(t){var e=new wm.fabric.PatternBrush(t);return e.getPatternSrc=function(){var t=document.createElement("canvas");t.width=t.height=10;var e=t.getContext("2d");return e.strokeStyle=this.color,e.lineWidth=5,e.beginPath(),e.moveTo(5,0),e.lineTo(5,10),e.closePath(),e.stroke(),t},e},KO=function(t){var e=new wm.fabric.PatternBrush(t);return e.getPatternSrc=function(){var t=document.createElement("canvas");t.width=t.height=12;var e=t.getContext("2d");return e.fillStyle=this.color,e.fillRect(0,0,10,10),t},e},ZO=function(t){var e=new wm.fabric.PatternBrush(t);return e.getPatternSrc=function(){var t=document.createElement("canvas"),e=new wm.fabric.Rect({width:10,height:10,angle:45,fill:this.color}),n=e.getBoundingRect().width;t.width=t.height=n+5,e.set({left:n/2,top:n/2});var i=t.getContext("2d");return e.render(i),t},e},QO=((LO=function(){function t(e,n){_classCallCheck(this,t),this.config=e,this.canvasState=n,this.enabled=!1,this.customBrushes={VLineBrush:GO,HLineBrush:qO,DiamondBrush:ZO,SquareBrush:KO},this.currentBrush={type:"PencilBrush",color:this.config.get("pixie.objectDefaults.global.fill"),width:Au[1]}}return _createClass(t,[{key:"enable",value:function(){this.canvasState.fabric.isDrawingMode=!0,this.setBrushType(this.currentBrush.type),this.enabled=!0,this.canvasState.fabric.on("object:added",this.onDrawingAdded)}},{key:"disable",value:function(){this.canvasState.fabric.isDrawingMode=!1,this.enabled=!1,this.canvasState.fabric.off("object:added",this.onDrawingAdded)}},{key:"getBrushType",value:function(){return this.currentBrush.type}},{key:"setBrushType",value:function(t){this.currentBrush.type=t;var e=wm.fabric[t]?new wm.fabric[t](this.canvasState.fabric):this.customBrushes[t](this.canvasState.fabric);this.canvasState.fabric.freeDrawingBrush=e,this.applyBrushStyles()}},{key:"applyBrushStyles",value:function(){var t=this;Object.keys(this.currentBrush).forEach((function(e){t.canvasState.fabric.freeDrawingBrush[e]=t.currentBrush[e]}))}},{key:"setBrushSize",value:function(t){this.currentBrush.width=t,this.applyBrushStyles()}},{key:"getBrushSize",value:function(){return this.currentBrush.width}},{key:"setBrushColor",value:function(t){this.currentBrush.color=t,this.applyBrushStyles()}},{key:"getBrushColor",value:function(){return this.currentBrush.color}},{key:"onDrawingAdded",value:function(t){"path"!==t.target.type&&"group"!==t.target.type||(t.target.name=Ap.drawing.name)}}]),t}()).\u0275fac=function(t){return new(t||LO)(Zt(um),Zt(fm))},LO.\u0275prov=ft({token:LO,factory:LO.\u0275fac}),LO),JO=[{type:"linear",x1:-80,y1:0,x2:80,y2:0,colorStops:{0:"#ffe47b",1:"rgb(111,154,211)"}},{type:"linear",x1:0,y1:-120,x2:0,y2:120,colorStops:{0:"#ff4040",1:"#e6399b"}},{type:"linear",x1:-90,y1:-90,x2:90,y2:90,colorStops:{0:"rgb(166,111,213)",.5:"rgba(106, 72, 215, 0.5)",1:"#200772"}},{type:"radial",r1:100,r2:10,x1:0,y1:0,x2:0,y2:0,colorStops:{0:"#FF4F4F",1:"rgb(255, 239, 64)"}},{type:"radial",r1:100,r2:10,x1:0,y1:0,x2:20,y2:20,colorStops:{0:"#ffe47b",.5:"rgb(111,154,211)",1:"rgb(166,111,213)"}},{type:"radial",r1:50,r2:80,x1:45,y1:45,x2:52,y2:50,colorStops:{0:"rgb(155, 237, 0)",1:"rgba(0, 164, 128,0.4)"}},{type:"linear",x1:-90,y1:-90,x2:90,y2:90,colorStops:{0:"#9ecb2d",.5:"#72aa00",1:"#bfd255"}},{type:"radial",r1:100,r2:50,x1:30,y1:0,x2:0,y2:0,colorStops:{0:"#aebcbf",1:"#0a0809"}},{type:"linear",x1:-80,y1:0,x2:80,y2:0,colorStops:{0:"#ffffff",1:"#f6f6f6"}},{type:"linear",x1:0,y1:-120,x2:0,y2:120,colorStops:{0:"#fefcea",1:"#f1da36"}},{type:"linear",x1:-90,y1:-90,x2:90,y2:90,colorStops:{0:"rgb(166,111,213)",.5:"rgba(106, 72, 215, 0.5)",1:"#ff1a00"}},{type:"linear",x1:0,y1:-120,x2:0,y2:120,colorStops:{0:"#b7deed",1:"#21b4e2"}},{type:"linear",x1:-80,y1:100,x2:80,y2:-100,colorStops:{0:"#ffe47b",1:"rgb(111,154,211)"}}],$O=((NO=function(){function t(e,n){_classCallCheck(this,t),this.activeObject=e,this.canvas=n}return _createClass(t,[{key:"withPattern",value:function(t){var e=this;wm.fabric.util.loadImage(t,(function(t){var n=new wm.fabric.Pattern({source:t,repeat:"repeat"});e.activeObject.setValues({fill:n})}))}},{key:"withGradient",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",n=this.activeObject.get();n&&(n.setGradient(e,JO[t]),this.activeObject.propsChanged$.next(),this.canvas.render())}},{key:"addGradient",value:function(t){JO.unshift(t)}}]),t}()).\u0275fac=function(t){return new(t||NO)(Zt(dm),Zt(Em))},NO.\u0275prov=ft({token:NO,factory:NO.\u0275fac}),NO);function tA(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qu;return(!Hy(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=Qu),new b((function(n){return n.add(e.schedule(eA,t,{subscriber:n,counter:0,period:t})),n}))}function eA(t){var e=t.subscriber,n=t.counter,i=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:i},i)}function nA(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function iA(t,e){var n=e?"":"none";nA(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:n,msUserSelect:n,webkitUserSelect:n,MozUserSelect:n})}function rA(t){var e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function oA(t,e){return t.getPropertyValue(e).split(",").map((function(t){return t.trim()}))}function aA(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}}function sA(t,e,n){var i=t.top,r=t.bottom,o=t.left,a=t.right;return n>=i&&n<=r&&e>=o&&e<=a}function lA(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function cA(t,e,n,i){var r=t.top,o=t.right,a=t.bottom,s=t.left,l=t.width*e,c=t.height*e;return i>r-c&&i<a+c&&n>s-l&&n<o+l}var uA=function(){function t(e,n){_classCallCheck(this,t),this._document=e,this._viewportRuler=n,this.positions=new Map}return _createClass(t,[{key:"clear",value:function(){this.positions.clear()}},{key:"cache",value:function(t){var e=this;this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),t.forEach((function(t){e.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:aA(t)})}))}},{key:"handleScroll",value:function(t){var e=t.target,n=this.positions.get(e);if(!n)return null;var i,r,o=e===this._document?e.documentElement:e,a=n.scrollPosition;if(e===this._document){var s=this._viewportRuler.getViewportScrollPosition();i=s.top,r=s.left}else i=e.scrollTop,r=e.scrollLeft;var l=a.top-i,c=a.left-r;return this.positions.forEach((function(t,n){t.clientRect&&e!==n&&o.contains(n)&&lA(t.clientRect,l,c)})),a.top=i,a.left=r,{top:l,left:c}}}]),t}(),hA=o_({passive:!0}),fA=o_({passive:!1}),dA=function(){function t(e,n,i,r,o,a){var s=this;_classCallCheck(this,t),this._config=n,this._document=i,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=a,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new E,this._pointerMoveSubscription=f.EMPTY,this._pointerUpSubscription=f.EMPTY,this._scrollSubscription=f.EMPTY,this._resizeSubscription=f.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new E,this.started=new E,this.released=new E,this.ended=new E,this.entered=new E,this.exited=new E,this.dropped=new E,this.moved=this._moveEvents.asObservable(),this._pointerDown=function(t){if(s.beforeStarted.next(),s._handles.length){var e=s._handles.find((function(e){var n=t.target;return!!n&&(n===e||e.contains(n))}));!e||s._disabledHandles.has(e)||s.disabled||s._initializeDragSequence(e,t)}else s.disabled||s._initializeDragSequence(s._rootElement,t)},this._pointerMove=function(t){t.preventDefault();var e=s._getPointerPositionOnPage(t);if(s._hasStartedDragging){s._boundaryElement&&(s._previewRect&&(s._previewRect.width||s._previewRect.height)||(s._previewRect=(s._preview||s._rootElement).getBoundingClientRect()));var n=s._getConstrainedPointerPosition(e);if(s._hasMoved=!0,s._updatePointerDirectionDelta(n),s._dropContainer)s._updateActiveDropContainer(n);else{var i=s._activeTransform;i.x=n.x-s._pickupPositionOnPage.x+s._passiveTransform.x,i.y=n.y-s._pickupPositionOnPage.y+s._passiveTransform.y,s._applyRootElementTransform(i.x,i.y),"undefined"!=typeof SVGElement&&s._rootElement instanceof SVGElement&&s._rootElement.setAttribute("transform","translate(".concat(i.x," ").concat(i.y,")"))}s._moveEvents.observers.length&&s._ngZone.run((function(){s._moveEvents.next({source:s,pointerPosition:n,event:t,distance:s._getDragDistance(n),delta:s._pointerDirectionDelta})}))}else if(Math.abs(e.x-s._pickupPositionOnPage.x)+Math.abs(e.y-s._pickupPositionOnPage.y)>=s._config.dragStartThreshold){if(!(Date.now()>=s._dragStartTime+s._getDragStartDelay(t)))return void s._endDragSequence(t);s._dropContainer&&s._dropContainer.isDragging()||(s._hasStartedDragging=!0,s._ngZone.run((function(){return s._startDragSequence(t)})))}},this._pointerUp=function(t){s._endDragSequence(t)},this.withRootElement(e),this._parentPositions=new uA(i,o),a.registerDragItem(this)}return _createClass(t,[{key:"getPlaceholderElement",value:function(){return this._placeholder}},{key:"getRootElement",value:function(){return this._rootElement}},{key:"getVisibleElement",value:function(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}},{key:"withHandles",value:function(t){return this._handles=t.map((function(t){return Oy(t)})),this._handles.forEach((function(t){return iA(t,!1)})),this._toggleNativeDragInteractions(),this}},{key:"withPreviewTemplate",value:function(t){return this._previewTemplate=t,this}},{key:"withPlaceholderTemplate",value:function(t){return this._placeholderTemplate=t,this}},{key:"withRootElement",value:function(t){var e=this,n=Oy(t);return n!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular((function(){n.addEventListener("mousedown",e._pointerDown,fA),n.addEventListener("touchstart",e._pointerDown,hA)})),this._initialTransform=void 0,this._rootElement=n),this}},{key:"withBoundaryElement",value:function(t){var e=this;return this._boundaryElement=t?Oy(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe((function(){return e._containInsideBoundaryOnResize()}))),this}},{key:"dispose",value:function(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&mA(this._rootElement),mA(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._placeholderTemplate=this._previewTemplate=this._anchor=null}},{key:"isDragging",value:function(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}},{key:"reset",value:function(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}},{key:"disableHandle",value:function(t){this._handles.indexOf(t)>-1&&this._disabledHandles.add(t)}},{key:"enableHandle",value:function(t){this._disabledHandles.delete(t)}},{key:"withDirection",value:function(t){return this._direction=t,this}},{key:"_withDropContainer",value:function(t){this._dropContainer=t}},{key:"getFreeDragPosition",value:function(){var t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}},{key:"setFreeDragPosition",value:function(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}},{key:"_sortFromLastPointerPosition",value:function(){var t=this._pointerPositionAtLastDirectionChange;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t))}},{key:"_removeSubscriptions",value:function(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}},{key:"_destroyPreview",value:function(){this._preview&&mA(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}},{key:"_destroyPlaceholder",value:function(){this._placeholder&&mA(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}},{key:"_endDragSequence",value:function(t){var e=this;this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then((function(){e._cleanupDragArtifacts(t),e._cleanupCachedDimensions(),e._dragDropRegistry.stopDragging(e)}))):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run((function(){e.ended.next({source:e,distance:e._getDragDistance(e._getPointerPositionOnPage(t))})})),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}},{key:"_startDragSequence",value:function(t){this.started.next({source:this}),yA(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();var e,n=this._dropContainer;if(n){var i=this._rootElement,r=i.parentNode,o=this._preview=this._createPreviewElement(),a=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment("");r.insertBefore(s,i),i.style.display="none",this._document.body.appendChild(r.replaceChild(a,i)),(e=this._document,e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement||e.body).appendChild(o),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}},{key:"_initializeDragSequence",value:function(t,e){var n=this;e.stopPropagation();var i=this.isDragging(),r=yA(e),o=!r&&0!==e.button,a=this._rootElement,s=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),!(i||o||s)){this._handles.length&&(this._rootElementTapHighlight=a.style.webkitTapHighlightColor,a.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe((function(t){n._updateOnScroll(t)})),this._boundaryElement&&(this._boundaryRect=aA(this._boundaryElement));var l=this._previewTemplate;this._pickupPositionInElement=l&&l.template&&!l.matchSize?{x:0,y:0}:this._getPointerPositionInElement(t,e);var c=this._pickupPositionOnPage=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:c.x,y:c.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}}},{key:"_cleanupDragArtifacts",value:function(t){var e=this;this._rootElement.style.display="",this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run((function(){var n=e._dropContainer,i=n.getItemIndex(e),r=e._getPointerPositionOnPage(t),o=e._getDragDistance(e._getPointerPositionOnPage(t)),a=n._isOverContainer(r.x,r.y);e.ended.next({source:e,distance:o}),e.dropped.next({item:e,currentIndex:i,previousIndex:e._initialIndex,container:n,previousContainer:e._initialContainer,isPointerOverContainer:a,distance:o}),n.drop(e,i,e._initialContainer,a,o,e._initialIndex),e._dropContainer=e._initialContainer}))}},{key:"_updateActiveDropContainer",value:function(t){var e=this,n=t.x,i=t.y,r=this._initialContainer._getSiblingContainerFromPosition(this,n,i);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(n,i)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run((function(){e.exited.next({item:e,container:e._dropContainer}),e._dropContainer.exit(e),e._dropContainer=r,e._dropContainer.enter(e,n,i,r===e._initialContainer&&r.sortingDisabled?e._initialIndex:void 0),e.entered.next({item:e,container:r,currentIndex:r.getItemIndex(e)})})),this._dropContainer._startScrollingIfNecessary(n,i),this._dropContainer._sortItem(this,n,i,this._pointerDirectionDelta),this._preview.style.transform=pA(n-this._pickupPositionInElement.x,i-this._pickupPositionInElement.y)}},{key:"_createPreviewElement",value:function(){var t,e=this._previewTemplate,n=this.previewClass,i=e?e.template:null;if(i&&e){var r=e.matchSize?this._rootElement.getBoundingClientRect():null,o=e.viewContainer.createEmbeddedView(i,e.context);o.detectChanges(),t=_A(o,this._document),this._previewRef=o,e.matchSize?bA(t,r):t.style.transform=pA(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{var a=this._rootElement;bA(t=vA(a),a.getBoundingClientRect())}return nA(t.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:"".concat(this._config.zIndex||1e3)}),iA(t,!1),t.classList.add("cdk-drag-preview"),t.setAttribute("dir",this._direction),n&&(Array.isArray(n)?n.forEach((function(e){return t.classList.add(e)})):t.classList.add(n)),t}},{key:"_animatePreviewToPlaceholder",value:function(){var t=this;if(!this._hasMoved)return Promise.resolve();var e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=pA(e.left,e.top);var n=function(t){var e=getComputedStyle(t),n=oA(e,"transition-property"),i=n.find((function(t){return"transform"===t||"all"===t}));if(!i)return 0;var r=n.indexOf(i),o=oA(e,"transition-duration"),a=oA(e,"transition-delay");return rA(o[r])+rA(a[r])}(this._preview);return 0===n?Promise.resolve():this._ngZone.runOutsideAngular((function(){return new Promise((function(e){var i=function n(i){(!i||i.target===t._preview&&"transform"===i.propertyName)&&(t._preview.removeEventListener("transitionend",n),e(),clearTimeout(r))},r=setTimeout(i,1.5*n);t._preview.addEventListener("transitionend",i)}))}))}},{key:"_createPlaceholderElement",value:function(){var t,e=this._placeholderTemplate,n=e?e.template:null;return n?(this._placeholderRef=e.viewContainer.createEmbeddedView(n,e.context),this._placeholderRef.detectChanges(),t=_A(this._placeholderRef,this._document)):t=vA(this._rootElement),t.classList.add("cdk-drag-placeholder"),t}},{key:"_getPointerPositionInElement",value:function(t,e){var n=this._rootElement.getBoundingClientRect(),i=t===this._rootElement?null:t,r=i?i.getBoundingClientRect():n,o=yA(e)?e.targetTouches[0]:e,a=this._getViewportScrollPosition();return{x:r.left-n.left+(o.pageX-r.left-a.left),y:r.top-n.top+(o.pageY-r.top-a.top)}}},{key:"_getPointerPositionOnPage",value:function(t){var e=yA(t)?t.touches[0]||t.changedTouches[0]:t,n=this._getViewportScrollPosition();return{x:e.pageX-n.left,y:e.pageY-n.top}}},{key:"_getConstrainedPointerPosition",value:function(t){var e=this.constrainPosition?this.constrainPosition(t,this):t,n=this._dropContainer?this._dropContainer.lockAxis:null;if("x"===this.lockAxis||"x"===n?e.y=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==n||(e.x=this._pickupPositionOnPage.x),this._boundaryRect){var i=this._pickupPositionInElement,r=i.x,o=i.y,a=this._boundaryRect,s=this._previewRect,l=a.top+o,c=a.bottom-(s.height-o);e.x=gA(e.x,a.left+r,a.right-(s.width-r)),e.y=gA(e.y,l,c)}return e}},{key:"_updatePointerDirectionDelta",value:function(t){var e=t.x,n=t.y,i=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,o=Math.abs(e-r.x),a=Math.abs(n-r.y);return o>this._config.pointerDirectionChangeThreshold&&(i.x=e>r.x?1:-1,r.x=e),a>this._config.pointerDirectionChangeThreshold&&(i.y=n>r.y?1:-1,r.y=n),i}},{key:"_toggleNativeDragInteractions",value:function(){if(this._rootElement&&this._handles){var t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,iA(this._rootElement,t))}}},{key:"_removeRootElementListeners",value:function(t){t.removeEventListener("mousedown",this._pointerDown,fA),t.removeEventListener("touchstart",this._pointerDown,hA)}},{key:"_applyRootElementTransform",value:function(t,e){var n=pA(t,e);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?n+" "+this._initialTransform:n}},{key:"_getDragDistance",value:function(t){var e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}},{key:"_cleanupCachedDimensions",value:function(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}},{key:"_containInsideBoundaryOnResize",value:function(){var t=this._passiveTransform,e=t.x,n=t.y;if(!(0===e&&0===n||this.isDragging())&&this._boundaryElement){var i=this._boundaryElement.getBoundingClientRect(),r=this._rootElement.getBoundingClientRect();if(!(0===i.width&&0===i.height||0===r.width&&0===r.height)){var o=i.left-r.left,a=r.right-i.right,s=i.top-r.top,l=r.bottom-i.bottom;i.width>r.width?(o>0&&(e+=o),a>0&&(e-=a)):e=0,i.height>r.height?(s>0&&(n+=s),l>0&&(n-=l)):n=0,e===this._passiveTransform.x&&n===this._passiveTransform.y||this.setFreeDragPosition({y:n,x:e})}}}},{key:"_getDragStartDelay",value:function(t){var e=this.dragStartDelay;return"number"==typeof e?e:yA(t)?e.touch:e?e.mouse:0}},{key:"_updateOnScroll",value:function(t){var e=this._parentPositions.handleScroll(t);this._boundaryRect&&e&&lA(this._boundaryRect,e.top,e.left)}},{key:"_getViewportScrollPosition",value:function(){var t=this._parentPositions.positions.get(this._document);return t?t.scrollPosition:this._viewportRuler.getViewportScrollPosition()}},{key:"disabled",get:function(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)},set:function(t){var e=xy(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions())}}]),t}();function pA(t,e){return"translate3d(".concat(Math.round(t),"px, ").concat(Math.round(e),"px, 0)")}function vA(t){var e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),i=t.querySelectorAll("canvas");e.removeAttribute("id");for(var r=0;r<n.length;r++)n[r].removeAttribute("id");if(i.length)for(var o=e.querySelectorAll("canvas"),a=0;a<i.length;a++){var s=o[a].getContext("2d");s&&s.drawImage(i[a],0,0)}return e}function gA(t,e,n){return Math.max(e,Math.min(n,t))}function mA(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function yA(t){return"t"===t.type[0]}function _A(t,e){var n=t.rootNodes;if(1===n.length&&n[0].nodeType===e.ELEMENT_NODE)return n[0];var i=e.createElement("div");return n.forEach((function(t){return i.appendChild(t)})),i}function bA(t,e){t.style.width="".concat(e.width,"px"),t.style.height="".concat(e.height,"px"),t.style.transform=pA(e.left,e.top)}function kA(t,e,n){var i=CA(e,t.length-1),r=CA(n,t.length-1);if(i!==r){for(var o=t[i],a=r<i?-1:1,s=i;s!==r;s+=a)t[s]=t[s+a];t[r]=o}}function CA(t,e){return Math.max(0,Math.min(e,t))}var wA=function(){function t(e,n,i,r,o){var a=this;_classCallCheck(this,t),this._dragDropRegistry=n,this._ngZone=r,this._viewportRuler=o,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.enterPredicate=function(){return!0},this.beforeStarted=new E,this.entered=new E,this.exited=new E,this.dropped=new E,this.sorted=new E,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=f.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new E,this._cachedShadowRoot=null,this._startScrollInterval=function(){a._stopScrolling(),tA(0,Py).pipe(Zf(a._stopScrollTimers)).subscribe((function(){var t=a._scrollNode;1===a._verticalScrollDirection?SA(t,-2):2===a._verticalScrollDirection&&SA(t,2),1===a._horizontalScrollDirection?EA(t,-2):2===a._horizontalScrollDirection&&EA(t,2)}))},this.element=Oy(e),this._document=i,this.withScrollableParents([this.element]),n.registerDropContainer(this),this._parentPositions=new uA(i,o)}return _createClass(t,[{key:"dispose",value:function(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}},{key:"isDragging",value:function(){return this._isDragging}},{key:"start",value:function(){var t=this,e=Oy(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._cacheItems(),this._siblings.forEach((function(e){return e._startReceiving(t)})),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}},{key:"enter",value:function(t,e,n,i){var r;this.start(),null==i?-1===(r=this.sortingDisabled?this._draggables.indexOf(t):-1)&&(r=this._getItemIndexFromPointerPosition(t,e,n)):r=i;var o=this._activeDraggables,a=o.indexOf(t),s=t.getPlaceholderElement(),l=o[r];if(l===t&&(l=o[r+1]),a>-1&&o.splice(a,1),l&&!this._dragDropRegistry.isDragging(l)){var c=l.getRootElement();c.parentElement.insertBefore(s,c),o.splice(r,0,t)}else{var u=Oy(this.element);this._shouldEnterAsFirstChild(e,n)?(u.insertBefore(s,o[0].getRootElement()),o.unshift(t)):(u.appendChild(s),o.push(t))}s.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}},{key:"exit",value:function(t){this._reset(),this.exited.next({item:t,container:this})}},{key:"drop",value:function(t,e,n,i,r,o){this._reset(),null==o&&(o=n.getItemIndex(t)),this.dropped.next({item:t,currentIndex:e,previousIndex:o,container:this,previousContainer:n,isPointerOverContainer:i,distance:r})}},{key:"withItems",value:function(t){var e=this,n=this._draggables;return this._draggables=t,t.forEach((function(t){return t._withDropContainer(e)})),this.isDragging()&&(n.filter((function(t){return t.isDragging()})).every((function(e){return-1===t.indexOf(e)}))?this._reset():this._cacheItems()),this}},{key:"withDirection",value:function(t){return this._direction=t,this}},{key:"connectedTo",value:function(t){return this._siblings=t.slice(),this}},{key:"withOrientation",value:function(t){return this._orientation=t,this}},{key:"withScrollableParents",value:function(t){var e=Oy(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e].concat(_toConsumableArray2(t)):t.slice(),this}},{key:"getScrollableParents",value:function(){return this._scrollableElements}},{key:"getItemIndex",value:function(t){return this._isDragging?xA("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,(function(e){return e.drag===t})):this._draggables.indexOf(t)}},{key:"isReceiving",value:function(){return this._activeSiblings.size>0}},{key:"_sortItem",value:function(t,e,n,i){if(!this.sortingDisabled&&cA(this._clientRect,.05,e,n)){var r=this._itemPositions,o=this._getItemIndexFromPointerPosition(t,e,n,i);if(!(-1===o&&r.length>0)){var a="horizontal"===this._orientation,s=xA(r,(function(e){return e.drag===t})),l=r[o],c=r[s].clientRect,u=l.clientRect,h=s>o?1:-1;this._previousSwap.drag=l.drag,this._previousSwap.delta=a?i.x:i.y;var f=this._getItemOffsetPx(c,u,h),d=this._getSiblingOffsetPx(s,r,h),p=r.slice();kA(r,s,o),this.sorted.next({previousIndex:s,currentIndex:o,container:this,item:t}),r.forEach((function(e,n){if(p[n]!==e){var i=e.drag===t,r=i?f:d,o=i?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=r,a?(o.style.transform="translate3d(".concat(Math.round(e.offset),"px, 0, 0)"),lA(e.clientRect,0,r)):(o.style.transform="translate3d(0, ".concat(Math.round(e.offset),"px, 0)"),lA(e.clientRect,r,0))}}))}}}},{key:"_startScrollingIfNecessary",value:function(t,e){var n=this;if(!this.autoScrollDisabled){var i,r=0,o=0;if(this._parentPositions.positions.forEach((function(a,s){var l;s!==n._document&&a.clientRect&&!i&&cA(a.clientRect,.05,t,e)&&(l=_slicedToArray(function(t,e,n,i){var r=TA(e,i),o=OA(e,n),a=0,s=0;if(r){var l=t.scrollTop;1===r?l>0&&(a=1):t.scrollHeight-l>t.clientHeight&&(a=2)}if(o){var c=t.scrollLeft;1===o?c>0&&(s=1):t.scrollWidth-c>t.clientWidth&&(s=2)}return[a,s]}(s,a.clientRect,t,e),2),r=l[0],o=l[1],(r||o)&&(i=s))})),!r&&!o){var a=this._viewportRuler.getViewportSize(),s=a.width,l=a.height,c={width:s,height:l,top:0,right:s,bottom:l,left:0};r=TA(c,e),o=OA(c,t),i=window}!i||r===this._verticalScrollDirection&&o===this._horizontalScrollDirection&&i===this._scrollNode||(this._verticalScrollDirection=r,this._horizontalScrollDirection=o,this._scrollNode=i,(r||o)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}}},{key:"_stopScrolling",value:function(){this._stopScrollTimers.next()}},{key:"_cacheParentPositions",value:function(){var t=Oy(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}},{key:"_cacheItemPositions",value:function(){var t="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map((function(t){var e=t.getVisibleElement();return{drag:t,offset:0,clientRect:aA(e)}})).sort((function(e,n){return t?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top}))}},{key:"_reset",value:function(){var t=this;this._isDragging=!1;var e=Oy(this.element).style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach((function(t){var e=t.getRootElement();e&&(e.style.transform="")})),this._siblings.forEach((function(e){return e._stopReceiving(t)})),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}},{key:"_getSiblingOffsetPx",value:function(t,e,n){var i="horizontal"===this._orientation,r=e[t].clientRect,o=e[t+-1*n],a=r[i?"width":"height"]*n;if(o){var s=i?"left":"top",l=i?"right":"bottom";-1===n?a-=o.clientRect[s]-r[l]:a+=r[s]-o.clientRect[l]}return a}},{key:"_getItemOffsetPx",value:function(t,e,n){var i="horizontal"===this._orientation,r=i?e.left-t.left:e.top-t.top;return-1===n&&(r+=i?e.width-t.width:e.height-t.height),r}},{key:"_shouldEnterAsFirstChild",value:function(t,e){if(!this._activeDraggables.length)return!1;var n=this._itemPositions,i="horizontal"===this._orientation;if(n[0].drag!==this._activeDraggables[0]){var r=n[n.length-1].clientRect;return i?t>=r.right:e>=r.bottom}var o=n[0].clientRect;return i?t<=o.left:e<=o.top}},{key:"_getItemIndexFromPointerPosition",value:function(t,e,n,i){var r=this,o="horizontal"===this._orientation;return xA(this._itemPositions,(function(a,s,l){var c=a.drag,u=a.clientRect;if(c===t)return l.length<2;if(i){var h=o?i.x:i.y;if(c===r._previousSwap.drag&&h===r._previousSwap.delta)return!1}return o?e>=Math.floor(u.left)&&e<Math.floor(u.right):n>=Math.floor(u.top)&&n<Math.floor(u.bottom)}))}},{key:"_cacheItems",value:function(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}},{key:"_isOverContainer",value:function(t,e){return sA(this._clientRect,t,e)}},{key:"_getSiblingContainerFromPosition",value:function(t,e,n){return this._siblings.find((function(i){return i._canReceive(t,e,n)}))}},{key:"_canReceive",value:function(t,e,n){if(!sA(this._clientRect,e,n)||!this.enterPredicate(t,this))return!1;var i=this._getShadowRoot().elementFromPoint(e,n);if(!i)return!1;var r=Oy(this.element);return i===r||r.contains(i)}},{key:"_startReceiving",value:function(t){var e=this._activeSiblings;e.has(t)||(e.add(t),this._cacheParentPositions(),this._listenToScrollEvents())}},{key:"_stopReceiving",value:function(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe()}},{key:"_listenToScrollEvents",value:function(){var t=this;this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe((function(e){if(t.isDragging()){var n=t._parentPositions.handleScroll(e);n&&(t._itemPositions.forEach((function(t){lA(t.clientRect,n.top,n.left)})),t._itemPositions.forEach((function(e){var n=e.drag;t._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})))}else t.isReceiving()&&t._cacheParentPositions()}))}},{key:"_getShadowRoot",value:function(){if(!this._cachedShadowRoot){var t=a_(Oy(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}}]),t}();function xA(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1}function SA(t,e){t===window?t.scrollBy(0,e):t.scrollTop+=e}function EA(t,e){t===window?t.scrollBy(e,0):t.scrollLeft+=e}function TA(t,e){var n=t.top,i=t.bottom,r=.05*t.height;return e>=n-r&&e<=n+r?1:e>=i-r&&e<=i+r?2:0}function OA(t,e){var n=t.left,i=t.right,r=.05*t.width;return e>=n-r&&e<=n+r?1:e>=i-r&&e<=i+r?2:0}var AA,IA,PA,DA,RA,FA,MA=o_({passive:!1,capture:!0}),jA=((AA=function(){function t(e,n){var i=this;_classCallCheck(this,t),this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new E,this.pointerUp=new E,this.scroll=new E,this._preventDefaultWhileDragging=function(t){i._activeDragInstances.size&&t.preventDefault()},this._document=n}return _createClass(t,[{key:"registerDropContainer",value:function(t){this._dropInstances.has(t)||this._dropInstances.add(t)}},{key:"registerDragItem",value:function(t){var e=this;this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular((function(){e._document.addEventListener("touchmove",e._preventDefaultWhileDragging,MA)}))}},{key:"removeDropContainer",value:function(t){this._dropInstances.delete(t)}},{key:"removeDragItem",value:function(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._preventDefaultWhileDragging,MA)}},{key:"startDragging",value:function(t,e){var n=this;if(!this._activeDragInstances.has(t)&&(this._activeDragInstances.add(t),1===this._activeDragInstances.size)){var i=e.type.startsWith("touch"),r=i?"touchend":"mouseup";this._globalListeners.set(i?"touchmove":"mousemove",{handler:function(t){return n.pointerMove.next(t)},options:MA}).set(r,{handler:function(t){return n.pointerUp.next(t)},options:!0}).set("scroll",{handler:function(t){return n.scroll.next(t)},options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:MA}),this._ngZone.runOutsideAngular((function(){n._globalListeners.forEach((function(t,e){n._document.addEventListener(e,t.handler,t.options)}))}))}}},{key:"stopDragging",value:function(t){this._activeDragInstances.delete(t),0===this._activeDragInstances.size&&this._clearGlobalListeners()}},{key:"isDragging",value:function(t){return this._activeDragInstances.has(t)}},{key:"ngOnDestroy",value:function(){var t=this;this._dragInstances.forEach((function(e){return t.removeDragItem(e)})),this._dropInstances.forEach((function(e){return t.removeDropContainer(e)})),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}},{key:"_clearGlobalListeners",value:function(){var t=this;this._globalListeners.forEach((function(e,n){t._document.removeEventListener(n,e.handler,e.options)})),this._globalListeners.clear()}}]),t}()).\u0275fac=function(t){return new(t||AA)(Zt(ou),Zt(Ph))},AA.\u0275prov=ft({factory:function(){return new AA(Zt(ou),Zt(Ph))},token:AA,providedIn:"root"}),AA),LA={dragStartThreshold:5,pointerDirectionChangeThreshold:5},NA=((IA=function(){function t(e,n,i,r){_classCallCheck(this,t),this._document=e,this._ngZone=n,this._viewportRuler=i,this._dragDropRegistry=r}return _createClass(t,[{key:"createDrag",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:LA;return new dA(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}},{key:"createDropList",value:function(t){return new wA(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}]),t}()).\u0275fac=function(t){return new(t||IA)(Zt(Ph),Zt(ou),Zt(b_),Zt(jA))},IA.\u0275prov=ft({factory:function(){return new IA(Zt(Ph),Zt(ou),Zt(b_),Zt(jA))},token:IA,providedIn:"root"}),IA),BA=new Vt("CDK_DRAG_PARENT"),zA=((RA=function(){function t(e,n){_classCallCheck(this,t),this.element=e,this._stateChanges=new E,this._disabled=!1,this._parentDrag=n,iA(e.nativeElement,!1)}return _createClass(t,[{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=xy(t),this._stateChanges.next(this)}}]),t}()).\u0275fac=function(t){return new(t||RA)(rs(kl),rs(BA,8))},RA.\u0275dir=be({type:RA,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:["cdkDragHandleDisabled","disabled"]}}),RA),VA=((DA=function t(e){_classCallCheck(this,t),this.templateRef=e}).\u0275fac=function(t){return new(t||DA)(rs(Yl))},DA.\u0275dir=be({type:DA,selectors:[["ng-template","cdkDragPlaceholder",""]],inputs:{data:"data"}}),DA),HA=((PA=function(){function t(e){_classCallCheck(this,t),this.templateRef=e,this._matchSize=!1}return _createClass(t,[{key:"matchSize",get:function(){return this._matchSize},set:function(t){this._matchSize=xy(t)}}]),t}()).\u0275fac=function(t){return new(t||PA)(rs(Yl))},PA.\u0275dir=be({type:PA,selectors:[["ng-template","cdkDragPreview",""]],inputs:{matchSize:"matchSize",data:"data"}}),PA),WA=new Vt("CDK_DRAG_CONFIG"),UA=new Vt("CDK_DROP_LIST"),YA=((FA=function(){function t(e,n,i,r,o,a,s,l,c){var u=this;_classCallCheck(this,t),this.element=e,this.dropContainer=n,this._document=i,this._ngZone=r,this._viewContainerRef=o,this._dir=s,this._changeDetectorRef=c,this._destroyed=new E,this.started=new pc,this.released=new pc,this.ended=new pc,this.entered=new pc,this.exited=new pc,this.dropped=new pc,this.moved=new b((function(t){var e=u._dragRef.moved.pipe(L((function(t){return{source:u,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}}))).subscribe(t);return function(){e.unsubscribe()}})),this._dragRef=l.createDrag(e,{dragStartThreshold:a&&null!=a.dragStartThreshold?a.dragStartThreshold:5,pointerDirectionChangeThreshold:a&&null!=a.pointerDirectionChangeThreshold?a.pointerDirectionChangeThreshold:5,zIndex:null==a?void 0:a.zIndex}),this._dragRef.data=this,a&&this._assignDefaults(a),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}return _createClass(t,[{key:"getPlaceholderElement",value:function(){return this._dragRef.getPlaceholderElement()}},{key:"getRootElement",value:function(){return this._dragRef.getRootElement()}},{key:"reset",value:function(){this._dragRef.reset()}},{key:"getFreeDragPosition",value:function(){return this._dragRef.getFreeDragPosition()}},{key:"ngAfterViewInit",value:function(){var t=this;this._ngZone.onStable.asObservable().pipe(zf(1),Zf(this._destroyed)).subscribe((function(){t._updateRootElement(),t._handles.changes.pipe(Xy(t._handles),td((function(e){var n=e.filter((function(e){return e._parentDrag===t})).map((function(t){return t.element}));t._dragRef.withHandles(n)})),Ky((function(t){return G.apply(void 0,_toConsumableArray2(t.map((function(t){return t._stateChanges.pipe(Xy(t))}))))})),Zf(t._destroyed)).subscribe((function(e){var n=t._dragRef,i=e.element.nativeElement;e.disabled?n.disableHandle(i):n.enableHandle(i)})),t.freeDragPosition&&t._dragRef.setFreeDragPosition(t.freeDragPosition)}))}},{key:"ngOnChanges",value:function(t){var e=t.rootElementSelector,n=t.freeDragPosition;e&&!e.firstChange&&this._updateRootElement(),n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}},{key:"ngOnDestroy",value:function(){this.dropContainer&&this.dropContainer.removeItem(this),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}},{key:"_updateRootElement",value:function(){var t=this.element.nativeElement,e=this.rootElementSelector?XA(t,this.rootElementSelector):t;if(e&&e.nodeType!==this._document.ELEMENT_NODE)throw Error("cdkDrag must be attached to an element node. "+'Currently attached to "'.concat(e.nodeName,'".'));this._dragRef.withRootElement(e||t)}},{key:"_getBoundaryElement",value:function(){var t=this.boundaryElement;if(!t)return null;if("string"==typeof t)return XA(this.element.nativeElement,t);var e=Oy(t);if(Ei()&&!e.contains(this.element.nativeElement))throw Error("Draggable element is not inside of the node passed into cdkDragBoundary.");return e}},{key:"_syncInputs",value:function(t){var e=this;t.beforeStarted.subscribe((function(){if(!t.isDragging()){var n=e._dir,i=e.dragStartDelay,r=e._placeholderTemplate?{template:e._placeholderTemplate.templateRef,context:e._placeholderTemplate.data,viewContainer:e._viewContainerRef}:null,o=e._previewTemplate?{template:e._previewTemplate.templateRef,context:e._previewTemplate.data,matchSize:e._previewTemplate.matchSize,viewContainer:e._viewContainerRef}:null;t.disabled=e.disabled,t.lockAxis=e.lockAxis,t.dragStartDelay="object"==typeof i&&i?i:Sy(i),t.constrainPosition=e.constrainPosition,t.previewClass=e.previewClass,t.withBoundaryElement(e._getBoundaryElement()).withPlaceholderTemplate(r).withPreviewTemplate(o),n&&t.withDirection(n.value)}}))}},{key:"_handleEvents",value:function(t){var e=this;t.started.subscribe((function(){e.started.emit({source:e}),e._changeDetectorRef.markForCheck()})),t.released.subscribe((function(){e.released.emit({source:e})})),t.ended.subscribe((function(t){e.ended.emit({source:e,distance:t.distance}),e._changeDetectorRef.markForCheck()})),t.entered.subscribe((function(t){e.entered.emit({container:t.container.data,item:e,currentIndex:t.currentIndex})})),t.exited.subscribe((function(t){e.exited.emit({container:t.container.data,item:e})})),t.dropped.subscribe((function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:e,distance:t.distance})}))}},{key:"_assignDefaults",value:function(t){var e=t.lockAxis,n=t.dragStartDelay,i=t.constrainPosition,r=t.previewClass,o=t.boundaryElement,a=t.draggingDisabled,s=t.rootElementSelector;this.disabled=null!=a&&a,this.dragStartDelay=n||0,e&&(this.lockAxis=e),i&&(this.constrainPosition=i),r&&(this.previewClass=r),o&&(this.boundaryElement=o),s&&(this.rootElementSelector=s)}},{key:"disabled",get:function(){return this._disabled||this.dropContainer&&this.dropContainer.disabled},set:function(t){this._disabled=xy(t),this._dragRef.disabled=this._disabled}}]),t}()).\u0275fac=function(t){return new(t||FA)(rs(kl),rs(UA,12),rs(Ph),rs(ou),rs(Gl),rs(WA,8),rs(v_,8),rs(NA),rs(Zo))},FA.\u0275dir=be({type:FA,selectors:[["","cdkDrag",""]],contentQueries:function(t,e,n){var i;1&t&&(Ac(n,HA,!0),Ac(n,VA,!0),Ac(n,zA,!0)),2&t&&(Sc(i=Dc())&&(e._previewTemplate=i.first),Sc(i=Dc())&&(e._placeholderTemplate=i.first),Sc(i=Dc())&&(e._handles=i))},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,e){2&t&&Fs("cdk-drag-disabled",e.disabled)("cdk-drag-dragging",e._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[ml([{provide:BA,useExisting:FA}]),sl]}),FA);function XA(t,e){for(var n=t.parentElement;n;){if(n.matches?n.matches(e):n.msMatchesSelector(e))return n;n=n.parentElement}return null}var GA,qA,KA,ZA=((KA=function(){function t(){_classCallCheck(this,t),this._items=new Set,this._disabled=!1}return _createClass(t,[{key:"ngOnDestroy",value:function(){this._items.clear()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=xy(t)}}]),t}()).\u0275fac=function(t){return new(t||KA)},KA.\u0275dir=be({type:KA,selectors:[["","cdkDropListGroup",""]],inputs:{disabled:["cdkDropListGroupDisabled","disabled"]},exportAs:["cdkDropListGroup"]}),KA),QA=0,JA=((qA=function(){function t(e,n,i,r,o,a,s){var l=this;_classCallCheck(this,t),this.element=e,this._changeDetectorRef=i,this._dir=r,this._group=o,this._scrollDispatcher=a,this._destroyed=new E,this.connectedTo=[],this.id="cdk-drop-list-".concat(QA++),this.enterPredicate=function(){return!0},this.dropped=new pc,this.entered=new pc,this.exited=new pc,this.sorted=new pc,this._unsortedItems=new Set,this._dropListRef=n.createDropList(e),this._dropListRef.data=this,s&&this._assignDefaults(s),this._dropListRef.enterPredicate=function(t,e){return l.enterPredicate(t.data,e.data)},this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),o&&o._items.add(this)}return _createClass(t,[{key:"addItem",value:function(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}},{key:"removeItem",value:function(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}},{key:"getSortedItems",value:function(){return Array.from(this._unsortedItems).sort((function(t,e){return t._dragRef.getVisibleElement().compareDocumentPosition(e._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}))}},{key:"ngOnDestroy",value:function(){var e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}},{key:"start",value:function(){this._dropListRef.start()}},{key:"drop",value:function(t,e,n,i){this._dropListRef.drop(t._dragRef,e,n._dropListRef,i,{x:0,y:0})}},{key:"enter",value:function(t,e,n){this._dropListRef.enter(t._dragRef,e,n)}},{key:"exit",value:function(t){this._dropListRef.exit(t._dragRef)}},{key:"getItemIndex",value:function(t){return this._dropListRef.getItemIndex(t._dragRef)}},{key:"_setupInputSyncSubscription",value:function(e){var n=this;this._dir&&this._dir.change.pipe(Xy(this._dir.value),Zf(this._destroyed)).subscribe((function(t){return e.withDirection(t)})),e.beforeStarted.subscribe((function(){var i=Ey(n.connectedTo).map((function(e){return"string"==typeof e?t._dropLists.find((function(t){return t.id===e})):e}));if(n._group&&n._group._items.forEach((function(t){-1===i.indexOf(t)&&i.push(t)})),!n._scrollableParentsResolved&&n._scrollDispatcher){var r=n._scrollDispatcher.getAncestorScrollContainers(n.element).map((function(t){return t.getElementRef().nativeElement}));n._dropListRef.withScrollableParents(r),n._scrollableParentsResolved=!0}e.disabled=n.disabled,e.lockAxis=n.lockAxis,e.sortingDisabled=xy(n.sortingDisabled),e.autoScrollDisabled=xy(n.autoScrollDisabled),e.connectedTo(i.filter((function(t){return t&&t!==n})).map((function(t){return t._dropListRef}))).withOrientation(n.orientation)}))}},{key:"_handleEvents",value:function(t){var e=this;t.beforeStarted.subscribe((function(){e._syncItemsWithRef(),e._changeDetectorRef.markForCheck()})),t.entered.subscribe((function(t){e.entered.emit({container:e,item:t.item.data,currentIndex:t.currentIndex})})),t.exited.subscribe((function(t){e.exited.emit({container:e,item:t.item.data}),e._changeDetectorRef.markForCheck()})),t.sorted.subscribe((function(t){e.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:e,item:t.item.data})})),t.dropped.subscribe((function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance}),e._changeDetectorRef.markForCheck()}))}},{key:"_assignDefaults",value:function(t){var e=t.lockAxis,n=t.draggingDisabled,i=t.sortingDisabled,r=t.listAutoScrollDisabled,o=t.listOrientation;this.disabled=null!=n&&n,this.sortingDisabled=null!=i&&i,this.autoScrollDisabled=null!=r&&r,this.orientation=o||"vertical",e&&(this.lockAxis=e)}},{key:"_syncItemsWithRef",value:function(){this._dropListRef.withItems(this.getSortedItems().map((function(t){return t._dragRef})))}},{key:"disabled",get:function(){return this._disabled||!!this._group&&this._group.disabled},set:function(t){this._dropListRef.disabled=this._disabled=xy(t)}}]),t}()).\u0275fac=function(t){return new(t||qA)(rs(kl),rs(NA),rs(Zo),rs(v_,8),rs(ZA,12),rs(__),rs(WA,8))},qA.\u0275dir=be({type:qA,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,e){2&t&&(Js("id",e.id),Fs("cdk-drop-list-disabled",e.disabled)("cdk-drop-list-dragging",e._dropListRef.isDragging())("cdk-drop-list-receiving",e._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[ml([{provide:ZA,useValue:void 0},{provide:UA,useExisting:qA}])]}),qA._dropLists=[],qA),$A=((GA=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:GA}),GA.\u0275inj=dt({factory:function(t){return new(t||GA)},providers:[NA],imports:[k_]}),GA);function tI(t){return new b((function(e){var n;try{n=t()}catch(i){return void e.error(i)}return(n?V(n):$u()).subscribe(e)}))}function eI(t,e){}var nI=function t(){_classCallCheck(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},iI={dialogContainer:Qk("dialogContainer",[eC("void, exit",tC({opacity:0,transform:"scale(0.7)"})),eC("enter",tC({transform:"none"})),nC("* => enter",Jk("150ms cubic-bezier(0, 0, 0.2, 1)",tC({transform:"none",opacity:1}))),nC("* => void, * => exit",Jk("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",tC({opacity:0})))])};function rI(){throw Error("Attempting to attach dialog content after content is already attached")}var oI,aI,sI,lI=((oI=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a){var s;return _classCallCheck(this,n),(s=e.call(this))._elementRef=t,s._focusTrapFactory=i,s._changeDetectorRef=r,s._config=a,s._elementFocusedBeforeDialogWasOpened=null,s._state="enter",s._animationStateChanged=new pc,s.attachDomPortal=function(t){return s._portalOutlet.hasAttached()&&rI(),s._setupFocusTrap(),s._portalOutlet.attachDomPortal(t)},s._ariaLabelledBy=a.ariaLabelledBy||null,s._document=o,s}return _createClass(n,[{key:"attachComponentPortal",value:function(t){return this._portalOutlet.hasAttached()&&rI(),this._setupFocusTrap(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._portalOutlet.hasAttached()&&rI(),this._setupFocusTrap(),this._portalOutlet.attachTemplatePortal(t)}},{key:"_recaptureFocus",value:function(){this._containsFocus()||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)||t.focus()}this._focusTrap&&this._focusTrap.destroy()}},{key:"_setupFocusTrap",value:function(){var t=this;this._focusTrap||(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)),this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement,this._elementRef.nativeElement.focus&&Promise.resolve().then((function(){return t._elementRef.nativeElement.focus()})))}},{key:"_containsFocus",value:function(){var t=this._elementRef.nativeElement,e=this._document.activeElement;return t===e||t.contains(e)}},{key:"_onAnimationDone",value:function(t){"enter"===t.toState?this._trapFocus():"exit"===t.toState&&this._restoreFocus(),this._animationStateChanged.emit(t)}},{key:"_onAnimationStart",value:function(t){this._animationStateChanged.emit(t)}},{key:"_startExitAnimation",value:function(){this._state="exit",this._changeDetectorRef.markForCheck()}}]),n}(I_)).\u0275fac=function(t){return new(t||oI)(rs(kl),rs(Kb),rs(Zo),rs(Ph,8),rs(nI))},oI.\u0275cmp=pe({type:oI,selectors:[["mat-dialog-container"]],viewQuery:function(t,e){var n;1&t&&Ec(D_,!0),2&t&&Sc(n=Dc())&&(e._portalOutlet=n.first)},hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(t,e){1&t&&ms("@dialogContainer.start",(function(t){return e._onAnimationStart(t)}))("@dialogContainer.done",(function(t){return e._onAnimationDone(t)})),2&t&&(ts("id",e._id)("role",e._config.role)("aria-labelledby",e._config.ariaLabel?null:e._ariaLabelledBy)("aria-label",e._config.ariaLabel)("aria-describedby",e._config.ariaDescribedBy||null),$s("@dialogContainer",e._state))},features:[el],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&ns(0,eI,0,0,"ng-template",0)},directives:[D_],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:[iI.dialogContainer]}}),oI),cI=0,uI=function(){function t(e,n){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mat-dialog-".concat(cI++);_classCallCheck(this,t),this._overlayRef=e,this._containerInstance=n,this.id=r,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new E,this._afterClosed=new E,this._beforeClosed=new E,this._state=0,n._id=r,n._animationStateChanged.pipe(Mf((function(t){return"done"===t.phaseName&&"enter"===t.toState})),zf(1)).subscribe((function(){i._afterOpened.next(),i._afterOpened.complete()})),n._animationStateChanged.pipe(Mf((function(t){return"done"===t.phaseName&&"exit"===t.toState})),zf(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(Mf((function(t){return 27===t.keyCode&&!i.disableClose&&!M_(t)}))).subscribe((function(t){t.preventDefault(),i.close()})),e.backdropClick().subscribe((function(){i.disableClose?i._containerInstance._recaptureFocus():i.close()}))}return _createClass(t,[{key:"close",value:function(t){var e=this;this._result=t,this._containerInstance._animationStateChanged.pipe(Mf((function(t){return"start"===t.phaseName})),zf(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._containerInstance._startExitAnimation(),this._state=1}},{key:"afterOpened",value:function(){return this._afterOpened.asObservable()}},{key:"afterClosed",value:function(){return this._afterClosed.asObservable()}},{key:"beforeClosed",value:function(){return this._beforeClosed.asObservable()}},{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}(),hI=new Vt("MatDialogData"),fI=new Vt("mat-dialog-default-options"),dI=new Vt("mat-dialog-scroll-strategy"),pI={provide:dI,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.block()}}},vI=((sI=function(){function t(e,n,i,r,o,a,s){var l=this;_classCallCheck(this,t),this._overlay=e,this._injector=n,this._defaultOptions=r,this._parentDialog=a,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new E,this._afterOpenedAtThisLevel=new E,this._ariaHiddenElements=new Map,this.afterAllClosed=tI((function(){return l.openDialogs.length?l._afterAllClosed:l._afterAllClosed.pipe(Xy(void 0))})),this._scrollStrategy=o}return _createClass(t,[{key:"open",value:function(t,e){var n=this;if((e=function(t,e){return Object.assign(Object.assign({},e),t)}(e,this._defaultOptions||new nI)).id&&this.getDialogById(e.id))throw Error('Dialog with id "'.concat(e.id,'" exists already. The dialog id must be unique.'));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),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 Y_({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=ka.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:nI,useValue:e}]}),i=new T_(lI,e.viewContainerRef,n,e.componentFactoryResolver);return t.attach(i).instance}},{key:"_attachDialogContent",value:function(t,e,n,i){var r=new uI(n,e,i.id);if(t instanceof Yl)e.attachTemplatePortal(new O_(t,null,{$implicit:i.data,dialogRef:r}));else{var o=this._createInjector(i,r,e),a=e.attachComponentPortal(new T_(t,i.viewContainerRef,o));r.componentInstance=a.instance}return r.updateSize(i.width,i.height).updatePosition(i.position),r}},{key:"_createInjector",value:function(t,e,n){var i=t&&t.viewContainerRef&&t.viewContainerRef.injector,r=[{provide:lI,useValue:n},{provide:hI,useValue:t.data},{provide:uI,useValue:e}];return!t.direction||i&&i.get(v_,null)||r.push({provide:v_,useValue:{value:t.direction,change:th()}}),ka.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._afterAllClosed.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}},{key:"_afterAllClosed",get:function(){var t=this._parentDialog;return t?t._afterAllClosed:this._afterAllClosedAtThisLevel}}]),t}()).\u0275fac=function(t){return new(t||sI)(Zt(vb),Zt(ka),Zt(qh,8),Zt(fI,8),Zt(dI),Zt(sI,12),Zt(tb))},sI.\u0275prov=ft({token:sI,factory:sI.\u0275fac}),sI),gI=((aI=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:aI}),aI.\u0275inj=dt({factory:function(t){return new(t||aI)},providers:[vI,pI],imports:[[kb,R_,Ax],Ax]}),aI),mI=function(){function t(e){_classCallCheck(this,t),this.callback=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new yI(t,this.callback))}}]),t}(),yI=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t)).add(new f(i)),r}return n}(v),_I=["*"];function bI(t){return Error('Unable to find icon with the name "'.concat(t,'"'))}function kI(t){return Error("The URL provided to MatIconRegistry was not trusted as a resource URL "+"via Angular's DomSanitizer. Attempted URL was \"".concat(t,'".'))}function CI(t){return Error("The literal provided to MatIconRegistry was not trusted as safe HTML by "+"Angular's DomSanitizer. Attempted literal was \"".concat(t,'".'))}var wI,xI=function t(e,n){_classCallCheck(this,t),this.options=n,e.nodeName?this.svgElement=e:this.url=e},SI=((wI=function(){function t(e,n,i,r){_classCallCheck(this,t),this._httpClient=e,this._sanitizer=n,this._errorHandler=r,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons",this._document=i}return _createClass(t,[{key:"addSvgIcon",value:function(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}},{key:"addSvgIconLiteral",value:function(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}},{key:"addSvgIconInNamespace",value:function(t,e,n,i){return this._addSvgIconConfig(t,e,new xI(n,i))}},{key:"addSvgIconLiteralInNamespace",value:function(t,e,n,i){var r=this._sanitizer.sanitize(qi.HTML,n);if(!r)throw CI(n);var o=this._createSvgElementForSingleIcon(r,i);return this._addSvgIconConfig(t,e,new xI(o,i))}},{key:"addSvgIconSet",value:function(t,e){return this.addSvgIconSetInNamespace("",t,e)}},{key:"addSvgIconSetLiteral",value:function(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}},{key:"addSvgIconSetInNamespace",value:function(t,e,n){return this._addSvgIconSetConfig(t,new xI(e,n))}},{key:"addSvgIconSetLiteralInNamespace",value:function(t,e,n){var i=this._sanitizer.sanitize(qi.HTML,e);if(!i)throw CI(e);var r=this._svgElementFromString(i);return this._addSvgIconSetConfig(t,new xI(r,n))}},{key:"registerFontClassAlias",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this._fontCssClassesByAlias.set(t,e),this}},{key:"classNameForFontAlias",value:function(t){return this._fontCssClassesByAlias.get(t)||t}},{key:"setDefaultFontSetClass",value:function(t){return this._defaultFontSetClass=t,this}},{key:"getDefaultFontSetClass",value:function(){return this._defaultFontSetClass}},{key:"getSvgIconFromUrl",value:function(t){var e=this,n=this._sanitizer.sanitize(qi.RESOURCE_URL,t);if(!n)throw kI(t);var i=this._cachedIconsByUrl.get(n);return i?th(EI(i)):this._loadSvgIconFromConfig(new xI(t)).pipe(td((function(t){return e._cachedIconsByUrl.set(n,t)})),L((function(t){return EI(t)})))}},{key:"getNamedSvgIcon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=TI(e,t),i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);var r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):eh(bI(n))}},{key:"ngOnDestroy",value:function(){this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}},{key:"_getSvgFromConfig",value:function(t){return t.svgElement?th(EI(t.svgElement)):this._loadSvgIconFromConfig(t).pipe(td((function(e){return t.svgElement=e})),L((function(t){return EI(t)})))}},{key:"_getSvgFromIconSetConfigs",value:function(t,e){var n=this,i=this._extractIconWithNameFromAnySet(t,e);return i?th(i):Rf(e.filter((function(t){return!t.svgElement})).map((function(t){return n._loadSvgIconSetFromConfig(t).pipe(Gf((function(e){var i="Loading icon set URL: ".concat(n._sanitizer.sanitize(qi.RESOURCE_URL,t.url)," failed: ").concat(e.message);return n._errorHandler?n._errorHandler.handleError(new Error(i)):console.error(i),th(null)})))}))).pipe(L((function(){var i=n._extractIconWithNameFromAnySet(t,e);if(!i)throw bI(t);return i})))}},{key:"_extractIconWithNameFromAnySet",value:function(t,e){for(var n=e.length-1;n>=0;n--){var i=e[n];if(i.svgElement){var r=this._extractSvgIconFromSet(i.svgElement,t,i.options);if(r)return r}}return null}},{key:"_loadSvgIconFromConfig",value:function(t){var e=this;return this._fetchUrl(t.url).pipe(L((function(n){return e._createSvgElementForSingleIcon(n,t.options)})))}},{key:"_loadSvgIconSetFromConfig",value:function(t){var e=this;return t.svgElement?th(t.svgElement):this._fetchUrl(t.url).pipe(L((function(n){return t.svgElement||(t.svgElement=e._svgElementFromString(n)),t.svgElement})))}},{key:"_createSvgElementForSingleIcon",value:function(t,e){var n=this._svgElementFromString(t);return this._setSvgAttributes(n,e),n}},{key:"_extractSvgIconFromSet",value:function(t,e,n){var i=t.querySelector('[id="'.concat(e,'"]'));if(!i)return null;var r=i.cloneNode(!0);if(r.removeAttribute("id"),"svg"===r.nodeName.toLowerCase())return this._setSvgAttributes(r,n);if("symbol"===r.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(r),n);var o=this._svgElementFromString("<svg></svg>");return o.appendChild(r),this._setSvgAttributes(o,n)}},{key:"_svgElementFromString",value:function(t){var e=this._document.createElement("DIV");e.innerHTML=t;var n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}},{key:"_toSvgElement",value:function(t){for(var e=this._svgElementFromString("<svg></svg>"),n=t.attributes,i=0;i<n.length;i++){var r=n[i],o=r.name,a=r.value;"id"!==o&&e.setAttribute(o,a)}for(var s=0;s<t.childNodes.length;s++)t.childNodes[s].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[s].cloneNode(!0));return e}},{key:"_setSvgAttributes",value:function(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}},{key:"_fetchUrl",value:function(t){var e=this;if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==t)throw Error('Cannot fetch icon from URL "'.concat(t,'".'));var n=this._sanitizer.sanitize(qi.RESOURCE_URL,t);if(!n)throw kI(t);var i=this._inProgressUrlFetches.get(n);if(i)return i;var r,o=this._httpClient.get(n,{responseType:"text"}).pipe((r=function(){return e._inProgressUrlFetches.delete(n)},function(t){return t.lift(new mI(r))}),et());return this._inProgressUrlFetches.set(n,o),o}},{key:"_addSvgIconConfig",value:function(t,e,n){return this._svgIconConfigs.set(TI(t,e),n),this}},{key:"_addSvgIconSetConfig",value:function(t,e){var n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}}]),t}()).\u0275fac=function(t){return new(t||wI)(Zt(oy,8),Zt(Yk),Zt(Ph,8),Zt(pi,8))},wI.\u0275prov=ft({factory:function(){return new wI(Zt(oy,8),Zt(Yk),Zt(Ph,8),Zt(pi,8))},token:wI,providedIn:"root"}),wI);function EI(t){return t.cloneNode(!0)}function TI(t,e){return t+":"+e}var OI,AI,II=Px((function t(e){_classCallCheck(this,t),this._elementRef=e})),PI=new Vt("mat-icon-location",{providedIn:"root",factory:function(){var t=Qt(Ph),e=t?t.location:null;return{getPathname:function(){return e?e.pathname+e.search:""}}}}),DI=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],RI=DI.map((function(t){return"[".concat(t,"]")})).join(", "),FI=/^url\(['"]?#(.*?)['"]?\)$/,MI=((AI=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a){var s;return _classCallCheck(this,n),(s=e.call(this,t))._iconRegistry=i,s._location=o,s._errorHandler=a,s._inline=!1,s._currentIconFetch=f.EMPTY,r||t.nativeElement.setAttribute("aria-hidden","true"),s}return _createClass(n,[{key:"_splitIconName",value:function(t){if(!t)return["",""];var e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error('Invalid icon name: "'.concat(t,'"'))}}},{key:"ngOnChanges",value:function(t){var e=this,n=t.svgIcon;if(n)if(this._currentIconFetch.unsubscribe(),this.svgIcon){var i=_slicedToArray(this._splitIconName(this.svgIcon),2),r=i[0],o=i[1];this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(o,r).pipe(zf(1)).subscribe((function(t){return e._setSvgElement(t)}),(function(t){var n="Error retrieving icon ".concat(r,":").concat(o,"! ").concat(t.message);e._errorHandler?e._errorHandler.handleError(new Error(n)):console.error(n)}))}else n.previousValue&&this._clearSvgElement();this._usingFontIcon()&&this._updateFontIconClasses()}},{key:"ngOnInit",value:function(){this._usingFontIcon()&&this._updateFontIconClasses()}},{key:"ngAfterViewChecked",value:function(){var t=this._elementsWithExternalReferences;if(t&&this._location&&t.size){var e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}},{key:"ngOnDestroy",value:function(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}},{key:"_usingFontIcon",value:function(){return!this.svgIcon}},{key:"_setSvgElement",value:function(t){this._clearSvgElement();for(var e=t.querySelectorAll("style"),n=0;n<e.length;n++)e[n].textContent+=" ";if(this._location){var i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(i)}this._elementRef.nativeElement.appendChild(t)}},{key:"_clearSvgElement",value:function(){var t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){var n=t.childNodes[e];1===n.nodeType&&"svg"!==n.nodeName.toLowerCase()||t.removeChild(n)}}},{key:"_updateFontIconClasses",value:function(){if(this._usingFontIcon()){var t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}}},{key:"_cleanupFontValue",value:function(t){return"string"==typeof t?t.trim().split(" ")[0]:t}},{key:"_prependPathToReferences",value:function(t){var e=this._elementsWithExternalReferences;e&&e.forEach((function(e,n){e.forEach((function(e){n.setAttribute(e.name,"url('".concat(t,"#").concat(e.value,"')"))}))}))}},{key:"_cacheChildrenWithExternalReferences",value:function(t){for(var e=t.querySelectorAll(RI),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map,i=function(t){DI.forEach((function(i){var r=e[t],o=r.getAttribute(i),a=o?o.match(FI):null;if(a){var s=n.get(r);s||(s=[],n.set(r,s)),s.push({name:i,value:a[1]})}}))},r=0;r<e.length;r++)i(r)}},{key:"inline",get:function(){return this._inline},set:function(t){this._inline=xy(t)}},{key:"fontSet",get:function(){return this._fontSet},set:function(t){this._fontSet=this._cleanupFontValue(t)}},{key:"fontIcon",get:function(){return this._fontIcon},set:function(t){this._fontIcon=this._cleanupFontValue(t)}}]),n}(II)).\u0275fac=function(t){return new(t||AI)(rs(kl),rs(SI),os("aria-hidden"),rs(PI,8),rs(pi,8))},AI.\u0275cmp=pe({type:AI,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:4,hostBindings:function(t,e){2&t&&Fs("mat-icon-inline",e.inline)("mat-icon-no-color","primary"!==e.color&&"accent"!==e.color&&"warn"!==e.color)},inputs:{color:"color",inline:"inline",fontSet:"fontSet",fontIcon:"fontIcon",svgIcon:"svgIcon"},exportAs:["matIcon"],features:[el,sl],ngContentSelectors:_I,decls:1,vars:0,template:function(t,e){1&t&&(ws(),xs(0))},styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),AI),jI=((OI=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:OI}),OI.\u0275inj=dt({factory:function(t){return new(t||OI)},imports:[[Ax],Ax]}),OI);function LI(t,e){1&t&&us(0,"div",11)}function NI(t,e){1&t&&(ls(0,"div",12),us(1,"div",13),cs())}function BI(t,e){if(1&t){var n=ds();ls(0,"div",6),ls(1,"div",7),gs("click",(function(){Qe(n);var t=e.$implicit;return ks().selectObject(t)})),fc(2,"async"),us(3,"mat-icon",8),ls(4,"div",1),Gs(5),cs(),ns(6,LI,1,0,"div",9),ns(7,NI,2,0,"div",10),cs(),cs()}if(2&t){var i=e.$implicit,r=ks();as("cdkDragData",i.data.id)("cdkDragDisabled",r.shouldDisableObject(i)),kr(1),Fs("disabled",r.shouldDisableObject(i))("active",dc(2,9,r.activeObjId$)===i.data.id),ts("data-id",i.data.id),kr(2),as("svgIcon",r.getIcon(i)),kr(2),qs(r.getObjectDisplayName(i))}}var zI,VI=((zI=function(){function t(e,n,i,r,o){_classCallCheck(this,t),this.objects=e,this.panelRef=n,this.controls=i,this.canvasState=r,this.store=o}return _createClass(t,[{key:"getIcon",value:function(t){return Ap[t.name].icon}},{key:"selectObject",value:function(t){this.objects.select(t),this.store.selectSnapshot(DT.dirty)||this.store.dispatch(new Bu(Ru.OBJECT_SETTINGS))}},{key:"getObjectDisplayName",value:function(t){var e=t.displayName||t.name;return e?e.replace(/([A-Z])/g," $1"):""}},{key:"reorderObjects",value:function(t){kA(this.objects.getAll(),t.previousIndex,t.currentIndex);var e=this.objects.getAll().slice().reverse().findIndex((function(e){return e.data.id===t.item.data}));this.objects.getById(t.item.data).moveTo(e),this.canvasState.fabric.requestRenderAll()}},{key:"shouldDisableObject",value:function(t){return!t.selectable&&t.name!==Ap.drawing.name}}]),t}()).\u0275fac=function(t){return new(t||zI)(rs(Tm),rs(ZT),rs(YO),rs(fm),rs(pp))},zI.\u0275cmp=pe({type:zI,selectors:[["objects-panel"]],hostVars:3,hostBindings:function(t,e){2&t&&($s("@dialogContainer","enter"),Fs("floating-panel",!0))},decls:7,vars:1,consts:[[1,"header"],["trans","",1,"name"],["mat-icon-button","",1,"close-button",3,"click"],["svgIcon","close"],["customScrollbar","","cdkDropList","",1,"items-list",3,"cdkDropListDropped"],["class","reorder-item-wrapper drag-item","cdkDrag","","cdkDragBoundary",".items-list","cdkDragLockAxis","y",3,"cdkDragData","cdkDragDisabled",4,"ngFor","ngForOf"],["cdkDrag","","cdkDragBoundary",".items-list","cdkDragLockAxis","y",1,"reorder-item-wrapper","drag-item",3,"cdkDragData","cdkDragDisabled"],[1,"floating-panel-item",3,"click"],[1,"list-icon",3,"svgIcon"],["class","drag-preview",4,"cdkDragPreview"],["class","drag-placeholder",4,"cdkDragPlaceholder"],[1,"drag-preview"],[1,"drag-placeholder"],[1,"placeholder-inner"]],template:function(t,e){1&t&&(ls(0,"div",0),ls(1,"div",1),Gs(2,"Objects"),cs(),ls(3,"button",2),gs("click",(function(){return e.panelRef.close()})),us(4,"mat-icon",3),cs(),cs(),ls(5,"div",4),gs("cdkDropListDropped",(function(t){return e.reorderObjects(t)})),ns(6,BI,8,11,"div",5),cs()),2&t&&(kr(6),as("ngForOf",e.objects.getAll()))},directives:[QT,_S,MI,TO,JA,lf,YA,HA,VA],pipes:[Tf],styles:["objects-panel{display:block}objects-panel .action-button{vertical-align:middle;width:20px;height:20px;line-height:20px;margin:0 5px}objects-panel .action-button mat-icon{width:20px;height:20px}objects-panel .drag-placeholder{transition:transform .25s cubic-bezier(0,0,.2,1);padding:5px 10px}objects-panel .drag-placeholder .placeholder-inner{height:48px;background:var(--be-background-alternative);border:3px dotted var(--be-divider-default)}objects-panel .cdk-drag-animating,objects-panel .cdk-drop-list-dragging .drag-item:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"],encapsulation:2,data:{animation:[iI.dialogContainer]},changeDetection:0}),ch([xp(DT.activeObjId),uh("design:type",b)],zI.prototype,"activeObjId$",void 0),zI);function HI(t,e){if(1&t){var n=ds();ls(0,"div",7),gs("click",(function(){Qe(n);var t=e.$implicit;return ks(2).loadHistoryState(t)})),us(1,"mat-icon",8),ls(2,"div",1),Gs(3),cs(),cs()}if(2&t){var i=e.$implicit,r=ks().ngIf;Fs("active",i.id===r),kr(1),as("svgIcon",i.icon),kr(2),qs(i.name)}}function WI(t,e){if(1&t&&(ls(0,"div",5),ns(1,HI,4,4,"div",6),fc(2,"async"),cs()),2&t){var n=ks();kr(1),as("ngForOf",dc(2,1,n.items$))}}var UI,YI,XI,GI,qI,KI,ZI=((UI=function(){function t(e,n){_classCallCheck(this,t),this.history=e,this.panelRef=n}return _createClass(t,[{key:"loadHistoryState",value:function(t){return this.history.load(t)}}]),t}()).\u0275fac=function(t){return new(t||UI)(rs(hE),rs(ZT))},UI.\u0275cmp=pe({type:UI,selectors:[["history-panel"]],hostVars:3,hostBindings:function(t,e){2&t&&($s("@dialogContainer","enter"),Fs("floating-panel",!0))},decls:7,vars:3,consts:[[1,"header"],["trans","",1,"name"],["mat-icon-button","",1,"close-button",3,"click"],["svgIcon","close"],["class","items-list","customScrollbar","",4,"ngIf"],["customScrollbar","",1,"items-list"],["class","floating-panel-item",3,"active","click",4,"ngFor","ngForOf"],[1,"floating-panel-item",3,"click"],[1,"list-icon",3,"svgIcon"]],template:function(t,e){1&t&&(ls(0,"div",0),ls(1,"div",1),Gs(2,"History"),cs(),ls(3,"button",2),gs("click",(function(){return e.panelRef.close()})),us(4,"mat-icon",3),cs(),cs(),ns(5,WI,3,3,"div",4),fc(6,"async")),2&t&&(kr(5),as("ngIf",dc(6,1,e.activeItemId$)))},directives:[QT,_S,MI,uf,TO,lf],pipes:[Tf],styles:["history-panel{display:block;bottom:5px;right:5px}"],encapsulation:2,data:{animation:[iI.dialogContainer]},changeDetection:0}),ch([xp(bm.items),uh("design:type",b)],UI.prototype,"items$",void 0),ch([xp(bm.activeItemId),uh("design:type",b)],UI.prototype,"activeItemId$",void 0),UI),QI=["input"],JI=function(){return{enterDuration:150}},$I=["*"],tP=new Vt("mat-radio-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}}),eP=0,nP={provide:Mp,useExisting:St((function(){return rP})),multi:!0},iP=function t(e,n){_classCallCheck(this,t),this.source=e,this.value=n},rP=((YI=function(){function t(e){_classCallCheck(this,t),this._changeDetector=e,this._value=null,this._name="mat-radio-group-".concat(eP++),this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=function(){},this.onTouched=function(){},this.change=new pc}return _createClass(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 iP(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=xy(t),this._markRadiosForCheck()}},{key:"required",get:function(){return this._required},set:function(t){this._required=xy(t),this._markRadiosForCheck()}}]),t}()).\u0275fac=function(t){return new(t||YI)(rs(Zo))},YI.\u0275dir=be({type:YI,selectors:[["mat-radio-group"]],contentQueries:function(t,e,n){var i;1&t&&Ac(n,sP,!0),2&t&&Sc(i=Dc())&&(e._radios=i)},hostAttrs:["role","radiogroup",1,"mat-radio-group"],inputs:{name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"},exportAs:["matRadioGroup"],features:[ml([nP])]}),YI),oP=Dx(Rx((function t(e){_classCallCheck(this,t),this._elementRef=e}))),aP=((GI=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a,s,l){var c;return _classCallCheck(this,n),(c=e.call(this,i))._changeDetector=r,c._focusMonitor=o,c._radioDispatcher=a,c._animationMode=s,c._providerOverride=l,c._uniqueId="mat-radio-".concat(++eP),c.id=c._uniqueId,c.change=new pc,c._checked=!1,c._value=null,c._removeUniqueSelectionListener=function(){},c.radioGroup=t,c._removeUniqueSelectionListener=a.listen((function(t,e){t!==c.id&&e===c.name&&(c.checked=!1)})),c}return _createClass(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 iP(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=xy(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(xy(t))}},{key:"required",get:function(){return this._required||this.radioGroup&&this.radioGroup.required},set:function(t){this._required=xy(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"".concat(this.id||this._uniqueId,"-input")}}]),n}(oP)).\u0275fac=function(t){return new(t||GI)(rs(rP,8),rs(kl),rs(Zo),rs(rk),rs(y_),rs(_x,8),rs(tP,8))},GI.\u0275dir=be({type:GI,viewQuery:function(t,e){var n;1&t&&Tc(QI,!0),2&t&&Sc(n=Dc())&&(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:[el]}),GI),sP=((XI=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(aP)).\u0275fac=function(t){return lP(t||XI)},XI.\u0275cmp=pe({type:XI,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(t,e){1&t&&gs("focus",(function(){return e._inputElement.nativeElement.focus()})),2&t&&(ts("tabindex",-1)("id",e.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),Fs("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:[el],ngContentSelectors:$I,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&&(ws(),ls(0,"label",0,1),ls(2,"div",2),us(3,"div",3),us(4,"div",4),ls(5,"input",5,6),gs("change",(function(t){return e._onInputChange(t)}))("click",(function(t){return e._onInputClick(t)})),cs(),ls(7,"div",7),us(8,"div",8),cs(),cs(),ls(9,"div",9),ls(10,"span",10),Gs(11,"\xa0"),cs(),xs(12),cs(),cs()),2&t){var n=is(1);ts("for",e.inputId),kr(5),as("id",e.inputId)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex)("required",e.required),ts("name",e.name)("value",e.value)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-describedby",e.ariaDescribedby),kr(2),as("matRippleTrigger",n)("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",uc(18,JI)),kr(2),Fs("mat-radio-label-before","before"==e.labelPosition)}},directives:[Kx],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}),XI),lP=ui(sP),cP=((qI=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:qI}),qI.\u0275inj=dt({factory:function(t){return new(t||qI)},imports:[[Zx,Ax],Ax]}),qI),uP=["sliderWrapper"],hP=o_({passive:!1}),fP={provide:Mp,useExisting:St((function(){return vP})),multi:!0},dP=function t(){_classCallCheck(this,t)},pP=Rx(Px(Ix((function t(e){_classCallCheck(this,t),this._elementRef=e})),"accent")),vP=((KI=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a,s,l,c){var u;return _classCallCheck(this,n),(u=e.call(this,t))._focusMonitor=i,u._changeDetectorRef=r,u._dir=o,u._animationMode=s,u._ngZone=l,u._invert=!1,u._max=100,u._min=0,u._step=1,u._thumbLabel=!1,u._tickInterval=0,u._value=null,u._vertical=!1,u.change=new pc,u.input=new pc,u.valueChange=new pc,u.onTouched=function(){},u._percent=0,u._isSliding=!1,u._isActive=!1,u._tickIntervalPercent=0,u._sliderDimensions=null,u._controlValueAccessorChangeFn=function(){},u._dirChangeSubscription=f.EMPTY,u._pointerDown=function(t){u.disabled||u._isSliding||!gP(t)&&0!==t.button||u._runInsideZone((function(){var e=u.value,n=mP(t);u._isSliding=!0,u._lastPointerEvent=t,t.preventDefault(),u._focusHostElement(),u._onMouseenter(),u._bindGlobalEvents(t),u._focusHostElement(),u._updateValueFromPosition(n),u._valueOnSlideStart=u.value,u._pointerPositionOnStart=n,e!=u.value&&(u._emitInputEvent(),u._emitChangeEvent())}))},u._pointerMove=function(t){if(u._isSliding){t.preventDefault();var e=u.value;u._lastPointerEvent=t,u._updateValueFromPosition(mP(t)),e!=u.value&&u._emitInputEvent()}},u._pointerUp=function(t){if(u._isSliding){var e=u._pointerPositionOnStart,n=mP(t);t.preventDefault(),u._removeGlobalEvents(),u._valueOnSlideStart=u._pointerPositionOnStart=u._lastPointerEvent=null,u._isSliding=!1,u._valueOnSlideStart==u.value||u.disabled||!e||e.x===n.x&&e.y===n.y||u._emitChangeEvent()}},u._windowBlur=function(){u._lastPointerEvent&&u._pointerUp(u._lastPointerEvent)},u._document=c,u.tabIndex=parseInt(a)||0,u._runOutsizeZone((function(){var e=t.nativeElement;e.addEventListener("mousedown",u._pointerDown,hP),e.addEventListener("touchstart",u._pointerDown,hP)})),u}return _createClass(n,[{key:"focus",value:function(t){this._focusHostElement(t)}},{key:"blur",value:function(){this._blurHostElement()}},{key:"_shouldInvertMouseCoords",value:function(){return"rtl"!=this._getDirection()||this.vertical?this._invertAxis:!this._invertAxis}},{key:"_getDirection",value:function(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"}},{key:"ngOnInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){t._isActive=!!e&&"keyboard"!==e,t._changeDetectorRef.detectChanges()})),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe((function(){t._changeDetectorRef.markForCheck()})))}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;t.removeEventListener("mousedown",this._pointerDown,hP),t.removeEventListener("touchstart",this._pointerDown,hP),this._lastPointerEvent=null,this._removeGlobalEvents(),this._focusMonitor.stopMonitoring(this._elementRef),this._dirChangeSubscription.unsubscribe()}},{key:"_onMouseenter",value:function(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())}},{key:"_onFocus",value:function(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()}},{key:"_onBlur",value:function(){this.onTouched()}},{key:"_onKeydown",value:function(t){if(!this.disabled&&!M_(t)){var e=this.value;switch(t.keyCode){case 33:this._increment(10);break;case 34:this._increment(-10);break;case 35:this.value=this.max;break;case 36:this.value=this.min;break;case 37:this._increment("rtl"==this._getDirection()?1:-1);break;case 38:this._increment(1);break;case 39:this._increment("rtl"==this._getDirection()?-1:1);break;case 40:this._increment(-1);break;default:return}e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding=!0,t.preventDefault()}}},{key:"_onKeyup",value:function(){this._isSliding=!1}},{key:"_getWindow",value:function(){var t;return(null===(t=this._document)||void 0===t?void 0:t.defaultView)||window}},{key:"_bindGlobalEvents",value:function(t){var e=this._document;if(void 0!==e&&e){var n=gP(t),i=n?"touchend":"mouseup";e.addEventListener(n?"touchmove":"mousemove",this._pointerMove,hP),e.addEventListener(i,this._pointerUp,hP),n&&e.addEventListener("touchcancel",this._pointerUp,hP)}var r=this._getWindow();void 0!==r&&r&&r.addEventListener("blur",this._windowBlur)}},{key:"_removeGlobalEvents",value:function(){var t=this._document;void 0!==t&&t&&(t.removeEventListener("mousemove",this._pointerMove,hP),t.removeEventListener("mouseup",this._pointerUp,hP),t.removeEventListener("touchmove",this._pointerMove,hP),t.removeEventListener("touchend",this._pointerUp,hP),t.removeEventListener("touchcancel",this._pointerUp,hP));var e=this._getWindow();void 0!==e&&e&&e.removeEventListener("blur",this._windowBlur)}},{key:"_increment",value:function(t){this.value=this._clamp((this.value||0)+this.step*t,this.min,this.max)}},{key:"_updateValueFromPosition",value:function(t){if(this._sliderDimensions){var e=this._clamp(((this.vertical?t.y:t.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._shouldInvertMouseCoords()&&(e=1-e),0===e)this.value=this.min;else if(1===e)this.value=this.max;else{var n=this._calculateValue(e),i=Math.round((n-this.min)/this.step)*this.step+this.min;this.value=this._clamp(i,this.min,this.max)}}}},{key:"_emitChangeEvent",value:function(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())}},{key:"_emitInputEvent",value:function(){this.input.emit(this._createChangeEvent())}},{key:"_updateTickIntervalPercent",value:function(){if(this.tickInterval&&this._sliderDimensions)if("auto"==this.tickInterval){var t=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,e=Math.ceil(30/(t*this.step/(this.max-this.min)));this._tickIntervalPercent=e*this.step/t}else this._tickIntervalPercent=this.tickInterval*this.step/(this.max-this.min)}},{key:"_createChangeEvent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.value,e=new dP;return e.source=this,e.value=t,e}},{key:"_calculatePercentage",value:function(t){return((t||0)-this.min)/(this.max-this.min)}},{key:"_calculateValue",value:function(t){return this.min+t*(this.max-this.min)}},{key:"_clamp",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.max(e,Math.min(t,n))}},{key:"_getSliderDimensions",value:function(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null}},{key:"_focusHostElement",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_blurHostElement",value:function(){this._elementRef.nativeElement.blur()}},{key:"_runInsideZone",value:function(t){this._ngZone?this._ngZone.run(t):t()}},{key:"_runOutsizeZone",value:function(t){this._ngZone?this._ngZone.runOutsideAngular(t):t()}},{key:"writeValue",value:function(t){this.value=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:"invert",get:function(){return this._invert},set:function(t){this._invert=xy(t)}},{key:"max",get:function(){return this._max},set:function(t){this._max=Sy(t,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}},{key:"min",get:function(){return this._min},set:function(t){this._min=Sy(t,this._min),null===this._value&&(this.value=this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}},{key:"step",get:function(){return this._step},set:function(t){this._step=Sy(t,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()}},{key:"thumbLabel",get:function(){return this._thumbLabel},set:function(t){this._thumbLabel=xy(t)}},{key:"tickInterval",get:function(){return this._tickInterval},set:function(t){this._tickInterval="auto"===t?"auto":"number"==typeof t||"string"==typeof t?Sy(t,this._tickInterval):0}},{key:"value",get:function(){return null===this._value&&(this.value=this._min),this._value},set:function(t){if(t!==this._value){var e=Sy(t);this._roundToDecimal&&(e=parseFloat(e.toFixed(this._roundToDecimal))),this._value=e,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}}},{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=xy(t)}},{key:"displayValue",get:function(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0}},{key:"percent",get:function(){return this._clamp(this._percent)}},{key:"_invertAxis",get:function(){return this.vertical?!this.invert:this.invert}},{key:"_isMinValue",get:function(){return 0===this.percent}},{key:"_thumbGap",get:function(){return this.disabled?7:this._isMinValue&&!this.thumbLabel?this._isActive?10:7:0}},{key:"_trackBackgroundStyles",get:function(){var t=this.vertical?"1, ".concat(1-this.percent,", 1"):"".concat(1-this.percent,", 1, 1");return{transform:"translate".concat(this.vertical?"Y":"X","(").concat(this._shouldInvertMouseCoords()?"-":"").concat(this._thumbGap,"px) scale3d(").concat(t,")")}}},{key:"_trackFillStyles",get:function(){var t=this.percent,e=this.vertical?"1, ".concat(t,", 1"):"".concat(t,", 1, 1");return{transform:"translate".concat(this.vertical?"Y":"X","(").concat(this._shouldInvertMouseCoords()?"":"-").concat(this._thumbGap,"px) scale3d(").concat(e,")"),display:0===t?"none":""}}},{key:"_ticksContainerStyles",get:function(){return{transform:"translate".concat(this.vertical?"Y":"X","(").concat(this.vertical||"rtl"!=this._getDirection()?"-":"").concat(this._tickIntervalPercent/2*100,"%)")}}},{key:"_ticksStyles",get:function(){var t,e=100*this._tickIntervalPercent,n={backgroundSize:this.vertical?"2px ".concat(e,"%"):"".concat(e,"% 2px"),transform:"translateZ(0) translate".concat(this.vertical?"Y":"X","(").concat(this.vertical||"rtl"!=this._getDirection()?"":"-").concat(e/2,"%)").concat(this.vertical||"rtl"!=this._getDirection()?"":" rotate(180deg)")};return this._isMinValue&&this._thumbGap&&(t=this.vertical?this._invertAxis?"Bottom":"Top":this._invertAxis?"Right":"Left",n["padding".concat(t)]="".concat(this._thumbGap,"px")),n}},{key:"_thumbContainerStyles",get:function(){return{transform:"translate".concat(this.vertical?"Y":"X","(-").concat(100*(("rtl"!=this._getDirection()||this.vertical?this._invertAxis:!this._invertAxis)?this.percent:1-this.percent),"%)")}}}]),n}(pP)).\u0275fac=function(t){return new(t||KI)(rs(kl),rs(rk),rs(Zo),rs(v_,8),os("tabindex"),rs(_x,8),rs(ou),rs(Ph,8))},KI.\u0275cmp=pe({type:KI,selectors:[["mat-slider"]],viewQuery:function(t,e){var n;1&t&&Tc(uP,!0),2&t&&Sc(n=Dc())&&(e._sliderWrapper=n.first)},hostAttrs:["role","slider",1,"mat-slider","mat-focus-indicator"],hostVars:28,hostBindings:function(t,e){1&t&&gs("focus",(function(){return e._onFocus()}))("blur",(function(){return e._onBlur()}))("keydown",(function(t){return e._onKeydown(t)}))("keyup",(function(){return e._onKeyup()}))("mouseenter",(function(){return e._onMouseenter()}))("selectstart",(function(t){return t.preventDefault()})),2&t&&(Js("tabIndex",e.tabIndex),ts("aria-disabled",e.disabled)("aria-valuemax",e.max)("aria-valuemin",e.min)("aria-valuenow",e.value)("aria-orientation",e.vertical?"vertical":"horizontal"),Fs("mat-slider-disabled",e.disabled)("mat-slider-has-ticks",e.tickInterval)("mat-slider-horizontal",!e.vertical)("mat-slider-axis-inverted",e._invertAxis)("mat-slider-invert-mouse-coords",e._shouldInvertMouseCoords())("mat-slider-sliding",e._isSliding)("mat-slider-thumb-label-showing",e.thumbLabel)("mat-slider-vertical",e.vertical)("mat-slider-min-value",e._isMinValue)("mat-slider-hide-last-tick",e.disabled||e._isMinValue&&e._thumbGap&&e._invertAxis)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",color:"color",tabIndex:"tabIndex",invert:"invert",max:"max",min:"min",value:"value",step:"step",thumbLabel:"thumbLabel",tickInterval:"tickInterval",vertical:"vertical",displayWith:"displayWith"},outputs:{change:"change",input:"input",valueChange:"valueChange"},exportAs:["matSlider"],features:[ml([fP]),el],decls:13,vars:6,consts:[[1,"mat-slider-wrapper"],["sliderWrapper",""],[1,"mat-slider-track-wrapper"],[1,"mat-slider-track-background",3,"ngStyle"],[1,"mat-slider-track-fill",3,"ngStyle"],[1,"mat-slider-ticks-container",3,"ngStyle"],[1,"mat-slider-ticks",3,"ngStyle"],[1,"mat-slider-thumb-container",3,"ngStyle"],[1,"mat-slider-focus-ring"],[1,"mat-slider-thumb"],[1,"mat-slider-thumb-label"],[1,"mat-slider-thumb-label-text"]],template:function(t,e){1&t&&(ls(0,"div",0,1),ls(2,"div",2),us(3,"div",3),us(4,"div",4),cs(),ls(5,"div",5),us(6,"div",6),cs(),ls(7,"div",7),us(8,"div",8),us(9,"div",9),ls(10,"div",10),ls(11,"span",11),Gs(12),cs(),cs(),cs(),cs()),2&t&&(kr(3),as("ngStyle",e._trackBackgroundStyles),kr(1),as("ngStyle",e._trackFillStyles),kr(1),as("ngStyle",e._ticksContainerStyles),kr(1),as("ngStyle",e._ticksStyles),kr(1),as("ngStyle",e._thumbContainerStyles),kr(5),qs(e.displayValue))},directives:[wf],styles:['.mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mat-slider:not(.mat-slider-disabled):active,.mat-slider.mat-slider-sliding:not(.mat-slider-disabled){cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-wrapper{position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider.cdk-keyboard-focused .mat-slider-focus-ring,.mat-slider.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb{cursor:-webkit-grab;cursor:grab}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(0.7);transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-radius 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.cdk-high-contrast-active .mat-slider-thumb-label{outline:solid 1px}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-sliding .mat-slider-track-fill,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-thumb-container{transition-duration:0ms}.mat-slider-has-ticks .mat-slider-wrapper::after{content:"";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{display:none}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(0.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(0.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(0.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-track-fill,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after{transition:none}\n'],encapsulation:2,changeDetection:0}),KI);function gP(t){return"t"===t.type[0]}function mP(t){var e=gP(t)?t.touches[0]||t.changedTouches[0]:t;return{x:e.clientX,y:e.clientY}}var yP,_P,bP,kP,CP,wP,xP,SP,EP,TP,OP,AP,IP,PP=((wP=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:wP}),wP.\u0275inj=dt({factory:function(t){return new(t||wP)},imports:[[Pf,Ax],Ax]}),wP),DP=((CP=function(){function t(e){_classCallCheck(this,t),this.i18n=e}return _createClass(t,[{key:"transform",value:function(t){return this.i18n.t(t)}}]),t}()).\u0275fac=function(t){return new(t||CP)(rs(wy))},CP.\u0275pipe=ke({name:"trans",type:CP,pure:!0}),CP),RP=((kP=function(){function t(e,n,i){_classCallCheck(this,t),this.config=e,this.exportTool=n,this.dialogRef=i,this.quality$=new Df(10*this.config.get("pixie.tools.export.defaultQuality")),this.exportForm=new lg({name:new sg(this.config.get("pixie.tools.export.defaultName")),format:new sg(this.config.get("pixie.tools.export.defaultFormat")),quality:new sg(this.config.get("pixie.tools.export.defaultQuality"))})}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this.exportForm.get("format").valueChanges.subscribe((function(e){"jpeg"!==e?t.exportForm.get("quality").disable():t.exportForm.get("quality").enable()})),this.exportForm.get("quality").valueChanges.subscribe((function(e){t.quality$.next(10*e)}))}},{key:"export",value:function(){var t=this.exportForm.value;this.exportTool.export(t.name,t.format,t.quality),this.dialogRef.close()}}]),t}()).\u0275fac=function(t){return new(t||kP)(rs(um),rs(JE),rs(uI))},kP.\u0275cmp=pe({type:kP,selectors:[["export-panel"]],decls:20,vars:7,consts:[["ngNativeValidate","",3,"formGroup","ngSubmit"],[1,"input-container","name-input-container"],["for","name","trans",""],["type","text","id","name","formControlName","name","required",""],["formControlName","format","required",""],["value","jpeg"],["value","png"],["value","json"],[1,"input-container"],["for","quality",1,"slider-label"],["formControlName","quality","id","quality","min","0.1","max","1","step","0.1","required",""],["mat-raised-button","","color","accent","trans","",1,"save-button"]],template:function(t,e){1&t&&(ls(0,"form",0),gs("ngSubmit",(function(){return e.export()})),ls(1,"div",1),ls(2,"label",2),Gs(3,"File Name"),cs(),us(4,"input",3),cs(),ls(5,"mat-radio-group",4),ls(6,"mat-radio-button",5),Gs(7,"JPEG"),cs(),ls(8,"mat-radio-button",6),Gs(9,"PNG"),cs(),ls(10,"mat-radio-button",7),Gs(11,"JSON"),cs(),cs(),ls(12,"div",8),ls(13,"label",9),Gs(14),fc(15,"trans"),fc(16,"async"),cs(),us(17,"mat-slider",10),cs(),ls(18,"button",11),Gs(19,"Save"),cs(),cs()),2&t&&(as("formGroup",e.exportForm),kr(14),Zs("",dc(15,3,"Quality")," (",dc(16,5,e.quality$),")"))},directives:[Zp,Eg,QT,zp,Kp,Bg,Vg,rP,sP,vP,_S],pipes:[DP,Tf],styles:[".export-panel-dialog-container.be-modal{width:255px}.export-panel-dialog-container.be-modal .mat-dialog-container{padding:18px}export-panel{display:block}export-panel .name-input-container{margin-bottom:18px}export-panel .mat-radio-group{display:block;width:100%;margin-bottom:5px}export-panel .mat-radio-button~.mat-radio-button{margin-left:16px}export-panel .mat-slider{display:block;width:100%;margin:0 -6px}export-panel .slider-label{position:relative;bottom:-15px;pointer-events:none}export-panel .save-button{margin-top:15px;display:block;width:100%}"],encapsulation:2,changeDetection:0}),kP),FP=((bP=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"ngOnInit",value:function(){}}]),t}()).\u0275fac=function(t){return new(t||bP)},bP.\u0275cmp=pe({type:bP,selectors:[["image-loading-panel"]],decls:2,vars:0,template:function(t,e){1&t&&(ls(0,"p"),Gs(1,"image-loading-panel works!"),cs())},styles:[""],encapsulation:2}),bP),MP=((_P=function(){function t(e){_classCallCheck(this,t),this.dialog=e}return _createClass(t,[{key:"open",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e||(e={}),"string"==typeof n&&(n={panelClass:n}),Array.isArray(n.panelClass)||(n.panelClass=[n.panelClass]),void 0===n.restoreFocus&&(n.restoreFocus=!1),n.panelClass.push("be-modal"),this.dialog.open(t,Object.assign(Object.assign({},n),{data:e}))}},{key:"show",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.open(t,e)}},{key:"anyDialogOpen",value:function(){return this.dialog.openDialogs.length>0}},{key:"closeAll",value:function(){this.dialog.closeAll()}}]),t}()).\u0275fac=function(t){return new(t||_P)(Zt(vI))},_P.\u0275prov=ft({token:_P,factory:_P.\u0275fac,providedIn:"root"}),_P),jP=((yP=function(){function t(e,n,i,r,o){_classCallCheck(this,t),this.overlayPanel=e,this.state=n,this.openSampleImageDialog=i,this.breakpoints=r,this.dialog=o}return _createClass(t,[{key:"openSampleImagePanel",value:function(){this.openSampleImageDialog.open()}},{key:"openExportPanel",value:function(){this.dialog.open(RP,null,{panelClass:"export-panel-dialog-container"})}},{key:"toggleHistory",value:function(){this.closePanel("objects"),this.panelIsOpen("history")?this.historyPanelRef.close():this.openHistoryPanel()}},{key:"toggleObjects",value:function(){this.closePanel("history"),this.panelIsOpen("objects")?this.objectsPanelRef.close():this.openObjectsPanel()}},{key:"openHistoryPanel",value:function(){this.historyPanelRef=this.overlayPanel.open(ZI,this.getPanelConfig())}},{key:"openObjectsPanel",value:function(){this.objectsPanelRef=this.overlayPanel.open(VI,this.getPanelConfig())}},{key:"closePanel",value:function(t){switch(t){case"history":this.historyPanelRef&&this.historyPanelRef.close();break;case"objects":this.objectsPanelRef&&this.objectsPanelRef.close()}}},{key:"panelIsOpen",value:function(t){var e="history"===t?this.historyPanelRef:this.objectsPanelRef;return e&&e.isOpen()}},{key:"getPanelConfig",value:function(){return{hasBackdrop:!1,positionStrategy:this.getPositionStrategy(),panelClass:["floating-panel-container",this.breakpoints.isMobile$.value?"is-mobile":null]}}},{key:"getPositionStrategy",value:function(){return this.breakpoints.isMobile$.value?this.overlayPanel.overlay.position().flexibleConnectedTo(new kl(this.state.wrapperEl)).withPositions([{overlayX:"center",overlayY:"center",originX:"center",originY:"center"}]):this.overlayPanel.overlay.position().flexibleConnectedTo(new kl(this.state.wrapperEl)).withPositions([{overlayX:"end",overlayY:"bottom",originX:"end",originY:"bottom",offsetY:-10,offsetX:-10}])}},{key:"toggleImageLoading",value:function(){this.imageLoadingPanelRef?(this.imageLoadingPanelRef.close(),this.imageLoadingPanelRef=null):this.imageLoadingPanelRef=this.overlayPanel.open(FP,{})}}]),t}()).\u0275fac=function(t){return new(t||yP)(Zt(WO),Zt(fm),Zt(UO),Zt(PT),Zt(MP))},yP.\u0275prov=ft({token:yP,factory:yP.\u0275fac}),yP),LP=n("NmYn"),NP=n.n(LP),BP=((TP=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"get",value:function(t){var e=this.getCookieRegExp(t).exec(document.cookie);return e&&e[1]}},{key:"set",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,i=new Date;i.setDate(i.getDate()+n),document.cookie="".concat(t,"=").concat(e,"; expires=").concat(i.toUTCString(),"; path=/;")}},{key:"getCookieRegExp",value:function(t){var e=t.replace(/([\[\]\{\}\(\)\|\=\;\+\?\,\.\*\^\$])/gi,"\\$1");return new RegExp("(?:^"+e+"|;\\s*"+e+")=(.*?)(?:;|$)","g")}}]),t}()).\u0275fac=function(t){return new(t||TP)},TP.\u0275prov=ft({token:TP,factory:TP.\u0275fac,providedIn:"root"}),TP),zP=((EP=function(){function t(e,n){_classCallCheck(this,t),this.cookie=e,this.settings=n,this.selectedTheme$=new Df(null),this.rootEl=document.documentElement}return _createClass(t,[{key:"registerThemes",value:function(t){this.registeredThemes=t||{},this.select(this.getPreferredTheme())}},{key:"select",value:function(t){var e=this,n=this.registeredThemes[t];n&&(this.selectedTheme$.next(n),this.setPreferredTheme(t),n.is_dark?(this.rootEl.classList.remove("be-light-mode"),this.rootEl.classList.add("be-dark-mode")):(this.rootEl.classList.remove("be-dark-mode"),this.rootEl.classList.add("be-light-mode")),Object.entries(n.colors).forEach((function(t){var n=_slicedToArray(t,2),i=n[0],r=n[1];e.rootEl.style.setProperty(i,r)})))}},{key:"toggle",value:function(){this.select(this.selectedTheme$.value.is_dark?"light":"dark")}},{key:"isDarkMode",value:function(){return this.selectedTheme$.value&&this.selectedTheme$.value.is_dark}},{key:"setRootEl",value:function(t){this.rootEl=t}},{key:"getPreferredTheme",value:function(){var t=this.settings.get("themes.default_mode","light");return this.settings.get("themes.user_change")&&this.cookie.get(this.storageKey())||t}},{key:"setPreferredTheme",value:function(t){this.cookie.set(this.storageKey(),t,90)}},{key:"storageKey",value:function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!t)return t;var i=NP()(t,{lower:!0,replacement:e,strict:n,remove:/[*+~.()'"!:@?/]/g});return i||(i=t.replace(/\s+/g,"-").toLowerCase()),i}(this.settings.get("branding.site_name"))+".theme"}}]),t}()).\u0275fac=function(t){return new(t||EP)(Zt(BP),Zt(um))},EP.\u0275prov=ft({token:EP,factory:EP.\u0275fac,providedIn:"root"}),EP),VP=((SP=function(){function t(e,n,i,r,o,a,s,l,c,u,h,f,d,p,v,g,m,y,_,b,k,C,w,x,S){_classCallCheck(this,t),this.filterTool=e,this.resizeTool=n,this.cropTool=i,this.transformTool=r,this.drawTool=o,this.textTool=a,this.shapesTool=s,this.frameTool=l,this.cornerTool=c,this.exportTool=u,this.importTool=h,this.canvas=f,this.watermark=d,this.history=p,this.activeObject=v,this.objectList=g,this.controls=m,this.cropZone=y,this.mergeTool=_,this.fillTool=b,this.fonts=k,this.floatingPanels=C,this.zoom=w,this.toast=x,this.themes=S}return _createClass(t,[{key:"get",value:function(t){return"canvas"===t?this.canvas:this[t]||this[t+"Tool"]}}]),t}()).\u0275fac=function(t){return new(t||SP)(Zt(HE),Zt(UE),Zt(tT),Zt(XO),Zt(QO),Zt(uE),Zt(iT),Zt(Pm),Zt(CT),Zt(JE),Zt(KT),Zt(Em),Zt(QE),Zt(hE),Zt(dm),Zt(Tm),Zt(YO),Zt(ZE),Zt($E),Zt($O),Zt(cE),Zt(jP),Zt(Sm),Zt(rE),Zt(zP))},SP.\u0275prov=ft({token:SP,factory:SP.\u0275fac}),SP),HP=((xP=function(){function t(e,n,i,r,o,a,s,l,c,u,h){_classCallCheck(this,t),this.importTool=e,this.canvas=n,this.history=i,this.store=r,this.openSampleImagePanel=o,this.toast=a,this.editorControls=s,this.settings=l,this.httpClient=c,this.tools=u,this.themes=h}return _createClass(t,[{key:"openEditorWithImage",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.openFile(t,"png",n).then((function(){return e.open()}))}},{key:"openMainImage",value:function(t){this.openFile(t,"png",!0)}},{key:"openFile",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"png",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n?this.importTool.openBackgroundImage(t):this.importTool.openFile(t,e)}},{key:"newCanvas",value:function(t,e){return this.canvas.openNew(t,e)}},{key:"loadState",value:function(t){var e=this;return this.canvas.state.contentLoadingState$.next({name:"state",loading:!0}),("string"==typeof t&&(t.endsWith(".json")||t.startsWith("http"))?this.importTool.loadStateFromUrl(t):this.importTool.loadState(t)).then((function(){e.canvas.state.contentLoadingState$.next({name:"state",loading:!1})}))}},{key:"loadStateFromUrl",value:function(t){this.importTool.loadStateFromUrl(t)}},{key:"getState",value:function(t){return JSON.stringify(this.history.getCurrentCanvasState(t))}},{key:"open",value:function(t){var e=this;t&&this.setConfig(t),this.store.dispatch(new Lu).pipe(oh(0,Py)).subscribe((function(){e.canvas.zoom.fitToScreen(),e.history.addInitial(),e.canvas.state.isEmpty()&&e.settings.get("pixie.ui.openImageDialog.show")&&e.openSampleImagePanel.open()}))}},{key:"close",value:function(){return this.store.dispatch(new Nu)}},{key:"applyChanges",value:function(t){t=t||this.store.selectSnapshot(DT.activePanel)||Ru.OBJECT_SETTINGS,this.store.dispatch(new Hu(t))}},{key:"cancelChanges",value:function(t){t=t||this.store.selectSnapshot(DT.activePanel)||Ru.OBJECT_SETTINGS,this.store.dispatch(new Wu(t))}},{key:"openPanel",value:function(t){this.store.dispatch(new Bu(t))}},{key:"on",value:function(t,e){return this.canvas.fabric().on(t,e)}},{key:"isDirty",value:function(){return this.store.selectSnapshot(DT.dirty)}},{key:"getTool",value:function(t){return this.tools.get(t)}},{key:"get",value:function(t){return this.getTool(t)}},{key:"getControlsPosition",value:function(){return this.store.selectSnapshot(DT.navPosition)}},{key:"notify",value:function(t,e){return this.toast.open(t,e)}},{key:"resetEditor",value:function(t,e){var n=this;return new Promise((function(i){n.importTool.resetEditor(),t&&n.setConfig(t,e),n.store.dispatch([new Vu]),n.loadInitialContent().then((function(){n.editorControls.closeCurrentPanel(),t&&n.history.addInitial(),i()}))}))}},{key:"resetAndOpenEditor",value:function(t,e){var n=this;return this.resetEditor(t,e).then((function(){return n.open()}))}},{key:"setConfig",value:function(t,e){if("string"==typeof t&&void 0!==e){var n=t.indexOf("vebto.")>-1?t:"pixie."+t;this.settings.set(n,e)}else if("object"==typeof t){var i={pixie:t};i.pixie.sentry_public&&this.settings.set("logging.sentry_public",i.pixie.sentry_public),this.settings.merge(i)}}},{key:"getDefaultConfig",value:function(t){return Xg.pick(t,ju)}},{key:"http",value:function(){return this.httpClient}},{key:"loadInitialContent",value:function(){var t,e=this,n=this.settings.get("pixie.image");n instanceof HTMLImageElement&&(n=n.src);var i=this.settings.get("pixie.blankCanvasSize"),r=this.settings.get("pixie.state");return n?t=n.endsWith(".json")||n.startsWith('{"canvas')?this.loadState(n):this.canvas.loadMainImage(n):r?t=this.loadState(r):i&&(t=this.canvas.openNew(i.width,i.height)),(t||Promise.resolve()).then((function(){e.canvas.state.loaded.next(!0),e.canvas.state.isEmpty()&&e.settings.get("pixie.ui.openImageDialog.show")&&e.openSampleImagePanel.open()}))}}],[{key:"mergeConfig",value:function(e){var n=qg()(ju,e||{});return t.replaceDefaultConfigItems(n,e)}},{key:"replaceDefaultConfigItems",value:function(e,n){for(var i in e)if(i.startsWith("replaceDefault")&&e[i]){var r=(o=i.replace("replaceDefault","")||"items")?o.charAt(0).toLowerCase()+o.slice(1):"";e[r]=n?n[r]:[]}else"object"==typeof e[i]&&t.replaceDefaultConfigItems(e[i],n&&n[i]);var o;return e}}]),t}()).\u0275fac=function(t){return new(t||xP)(Zt(KT),Zt(Em),Zt(hE),Zt(pp),Zt(UO),Zt(rE),Zt(YO),Zt(um),Zt(oy),Zt(VP),Zt(zP))},xP.\u0275prov=ft({token:xP,factory:xP.\u0275fac,providedIn:"root"}),xP),WP=function(){function t(e){_classCallCheck(this,t),this.delayDurationSelector=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new UP(t,this.delayDurationSelector))}}]),t}(),UP=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t)).delayDurationSelector=i,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return _createClass(n,[{key:"notifyNext",value:function(t,e,n,i,r){this.destination.next(t),this.removeSubscription(r),this.tryComplete()}},{key:"notifyError",value:function(t,e){this._error(t)}},{key:"notifyComplete",value:function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()}},{key:"_next",value:function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(i){this.destination.error(i)}}},{key:"_complete",value:function(){this.completed=!0,this.tryComplete(),this.unsubscribe()}},{key:"removeSubscription",value:function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue}},{key:"tryDelay",value:function(t,e){var n=M(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))}},{key:"tryComplete",value:function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()}}]),n}(j),YP=function(t){return t[t.ENTER=13]="ENTER",t[t.SPACE=32]="SPACE",t[t.ESCAPE=27]="ESCAPE",t[t.DELETE=46]="DELETE",t[t.ARROW_UP=38]="ARROW_UP",t[t.ARROW_RIGHT=39]="ARROW_RIGHT",t[t.ARROW_DOWN=40]="ARROW_DOWN",t[t.ARROW_LEFT=37]="ARROW_LEFT",t[t.S=83]="S",t[t.N=78]="N",t[t.A=65]="A",t[t.T=84]="T",t[t.B=66]="B",t[t.C=67]="C",t[t.O=79]="O",t[t.P=80]="P",t[t.R=82]="R",t[t.F=70]="F",t[t.Y=89]="Y",t[t.Z=90]="Z",t}({}),XP=((IP=function(){function t(){_classCallCheck(this,t),this.bindings=[]}return _createClass(t,[{key:"add",value:function(t,e){this.bindings.push({keybind:this.parseKeybindString(t),keybindString:t,callback:e})}},{key:"addWithPreventDefault",value:function(t,e){this.bindings.push({keybind:this.parseKeybindString(t),keybindString:t,callback:e,preventDefault:!0})}},{key:"listenOn",value:function(t){var e=this;return Ay(t,"keydown").subscribe((function(t){e.executeBindings(t)}))}},{key:"executeBindings",value:function(t){var e=this;this.bindings.forEach((function(n){e.bindingMatches(n.keybind,t)&&(n.preventDefault&&t.preventDefault&&t.preventDefault(),n.callback(t))}))}},{key:"bindingMatches",value:function(t,e){return YP[t.key.toUpperCase()]===e.keyCode&&e.ctrlKey===t.ctrl&&e.shiftKey===t.shift}},{key:"parseKeybindString",value:function(t){var e=t.trim().split("+"),n={ctrl:!1,shift:!1,key:""};return e.forEach((function(t){"ctrl"===(t=t.trim().toLowerCase())?n.ctrl=!0:"shift"===t?n.shift=!0:n.key=t})),n}}]),t}()).\u0275fac=function(t){return new(t||IP)},IP.\u0275prov=ft({token:IP,factory:IP.\u0275fac,providedIn:"root"}),IP),GP=((AP=function(){function t(e,n,i){_classCallCheck(this,t),this.state=e,this.keybinds=n,this.activeObject=i}return _createClass(t,[{key:"init",value:function(){var t=this;this.state.loaded.pipe(zf(1)).subscribe((function(){t.keybinds.listenOn(document),t.keybinds.add("arrow_up",(function(e){t.maybePreventDefault(e),t.activeObject.move("top",-1)})),t.keybinds.add("arrow_right",(function(e){t.maybePreventDefault(e),t.activeObject.move("left",1)})),t.keybinds.add("arrow_down",(function(e){t.maybePreventDefault(e),t.activeObject.move("top",1)})),t.keybinds.add("arrow_left",(function(e){t.maybePreventDefault(e),t.activeObject.move("left",-1)})),t.keybinds.add("delete",(function(e){t.maybePreventDefault(e),t.activeObject.isEditing()||t.activeObject.delete()}))}))}},{key:"maybePreventDefault",value:function(t){t.preventDefault&&"pixie-editor"===document.activeElement.tagName.toLowerCase()&&t.preventDefault()}}]),t}()).\u0275fac=function(t){return new(t||AP)(Zt(fm),Zt(XP),Zt(dm))},AP.\u0275prov=ft({token:AP,factory:AP.\u0275fac}),AP),qP=((OP=function(){function t(e,n,i){_classCallCheck(this,t),this.domSanitizer=e,this.el=n,this.config=i}return _createClass(t,[{key:"ngAfterViewInit",value:function(){this.el.nativeElement.style.backgroundImage=this.getStyle()}},{key:"getStyle",value:function(){return"url("+this.config.getAssetUrl(this.url,!0)+")"}}]),t}()).\u0275fac=function(t){return new(t||OP)(rs(Yk),rs(kl),rs(um))},OP.\u0275dir=be({type:OP,selectors:[["","backgroundImage",""]],inputs:{url:["backgroundImage","url"]}}),OP);function KP(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return hh(this,void 0,void 0,regeneratorRuntime.mark((function n(){var i,r,o,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r=t,new Promise((function(t){r.createReader().readEntries((function(e){return t(e)}))}));case 2:i=n.sent,n.t0=regeneratorRuntime.keys(i);case 4:if((n.t1=n.t0()).done){n.next=19;break}if(o=n.t1.value,!(a=i[o]).isDirectory){n.next=12;break}return n.next=10,KP(a,e);case 10:n.next=17;break;case 12:return n.t2=e,n.next=15,ZP(a);case 15:n.t3=n.sent,n.t2.push.call(n.t2,n.t3);case 17:n.next=4;break;case 19:return n.abrupt("return",e);case 20:case"end":return n.stop()}}),n)})))}function ZP(t){return new Promise((function(e){t.file((function(n){e(new MT(n,t.fullPath))}))}))}var QP,JP=((QP=function(){function t(e){_classCallCheck(this,t),this.el=e,this.disableDropzoneClick=!1,this.disableDropzone=!1,this.uploadConfig={},this.filesDropped=new pc}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this,e=this.el.nativeElement;e.addEventListener("dragenter",(function(e){return t.handleDragEnter(e)})),e.addEventListener("dragover",(function(e){return t.handleDragOver(e)})),e.addEventListener("dragleave",(function(e){return t.handleDragLeave(e)})),e.addEventListener("drop",(function(e){return t.handleDrop(e)})),this.disableDropzoneClick||(this.clickButton?this.clickButton.nativeElement:e).addEventListener("click",(function(){return t.handleClick()}))}},{key:"ngOnDestroy",value:function(){this.removeClassesFromDropzone()}},{key:"handleClick",value:function(){var t=this;this.disableDropzone||jT(this.uploadConfig).then((function(e){t.emitUploadEvent(e)}))}},{key:"handleDragEnter",value:function(t){this.dropzoneDisabled(t)||this.el.nativeElement.classList.add("file-over-dropzone")}},{key:"handleDragOver",value:function(t){return t.preventDefault&&t.preventDefault(),t.dataTransfer.dropEffect=this.dropzoneDisabled(t)?"none":"move",!1}},{key:"handleDragLeave",value:function(t){var e=document.elementFromPoint(t.clientX,t.clientY);this.el.nativeElement.contains(e)||this.removeClassesFromDropzone()}},{key:"handleDrop",value:function(t){return hh(this,void 0,void 0,regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),t.preventDefault(),this.removeClassesFromDropzone(),!this.dropzoneDisabled(t)&&t.dataTransfer.items){e.next=2;break}return e.abrupt("return");case 2:if(n=Array.from(t.dataTransfer.items).filter((function(t){return"file"===t.kind})).map((function(t){return t.webkitGetAsEntry()})),e.t0=n.length,!e.t0){e.next=10;break}return e.t1=this,e.next=8,function(t){return hh(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:n=[],e.t0=regeneratorRuntime.keys(t);case 2:if((e.t1=e.t0()).done){e.next=20;break}if(i=e.t1.value,!(r=t[i]).isDirectory){e.next=13;break}return e.t2=n,e.next=9,KP(r);case 9:e.t3=e.sent,n=e.t2.concat.call(e.t2,e.t3),e.next=18;break;case 13:return e.t4=n,e.next=16,ZP(r);case 16:e.t5=e.sent,e.t4.push.call(e.t4,e.t5);case 18:e.next=2;break;case 20:return e.abrupt("return",n);case 21:case"end":return e.stop()}}),e)})))}(n);case 8:e.t2=e.sent,e.t1.emitUploadEvent.call(e.t1,e.t2);case 10:case"end":return e.stop()}}),e,this)})))}},{key:"emitUploadEvent",value:function(t){this.filesDropped.emit(t)}},{key:"removeClassesFromDropzone",value:function(){this.el.nativeElement.classList.remove("file-over-dropzone")}},{key:"dropzoneDisabled",value:function(t){var e=t.dataTransfer.types.find((function(t){return"files"===t.toLowerCase()}));return this.disableDropzone||!e}}]),t}()).\u0275fac=function(t){return new(t||QP)(rs(kl))},QP.\u0275dir=be({type:QP,selectors:[["","fileDropzone",""]],inputs:{disableDropzoneClick:"disableDropzoneClick",disableDropzone:"disableDropzone",clickButton:"clickButton",uploadConfig:["fileDropzone","uploadConfig"]},outputs:{filesDropped:"filesDropped"}}),QP);function $P(t){return t.replace(/([A-Z])/g," $1")}function tD(t,e){if(1&t&&(ls(0,"span",2),Gs(1),cs()),2&t){var n=ks().ngIf,i=ks();kr(1),qs(i.getToolDisplayName(n))}}function eD(t,e){1&t&&(ls(0,"span",2),Gs(1,"Editor"),cs())}function nD(t,e){if(1&t&&(hs(0),ns(1,tD,2,1,"span",1),ns(2,eD,2,0,"span",1),fs()),2&t){var n=e.ngIf;kr(1),as("ngIf","navigation"!==n),kr(1),as("ngIf","navigation"===n)}}var iD,rD=((iD=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"getToolDisplayName",value:function(t){return $P(t)}}]),t}()).\u0275fac=function(t){return new(t||iD)},iD.\u0275cmp=pe({type:iD,selectors:[["toolbar-panel-name-widget"]],decls:2,vars:3,consts:[[4,"ngIf"],["trans","",4,"ngIf"],["trans",""]],template:function(t,e){1&t&&(ns(0,nD,3,2,"ng-container",0),fc(1,"async")),2&t&&as("ngIf",dc(1,1,e.activePanel$))},directives:[uf,QT],pipes:[Tf],styles:["[_nghost-%COMP%]{display:inline-block;font-size:15px;text-transform:capitalize;text-align:center;width:140px}"],changeDetection:0}),ch([xp(DT.activePanel),uh("design:type",b)],iD.prototype,"activePanel$",void 0),iD),oD=["mat-menu-item",""],aD=["*"];function sD(t,e){if(1&t){var n=ds();ls(0,"div",0),gs("keydown",(function(t){return Qe(n),ks()._handleKeydown(t)}))("click",(function(){return Qe(n),ks().closed.emit("click")}))("@transformMenu.start",(function(t){return Qe(n),ks()._onAnimationStart(t)}))("@transformMenu.done",(function(t){return Qe(n),ks()._onAnimationDone(t)})),ls(1,"div",1),xs(2),cs(),cs()}if(2&t){var i=ks();as("id",i.panelId)("ngClass",i._classList)("@transformMenu",i._panelAnimationState),ts("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby||null)("aria-describedby",i.ariaDescribedby||null)}}var lD,cD,uD,hD,fD,dD,pD,vD,gD,mD,yD={transformMenu:Qk("transformMenu",[eC("void",tC({opacity:0,transform:"scale(0.8)"})),nC("void => enter",function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:3,steps:t,options:e}}([iC(".mat-menu-content, .mat-mdc-menu-content",Jk("100ms linear",tC({opacity:1}))),Jk("120ms cubic-bezier(0, 0, 0.2, 1)",tC({transform:"scale(1)"}))])),nC("* => void",Jk("100ms 25ms linear",tC({opacity:0})))]),fadeInItems:Qk("fadeInItems",[eC("showing",tC({opacity:1})),nC("void => *",[tC({opacity:0}),Jk("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},_D=((lD=function(){function t(e,n,i,r,o,a,s){_classCallCheck(this,t),this._template=e,this._componentFactoryResolver=n,this._appRef=i,this._injector=r,this._viewContainerRef=o,this._document=a,this._changeDetectorRef=s,this._attached=new E}return _createClass(t,[{key:"attach",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._portal||(this._portal=new O_(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new P_(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));var e=this._template.elementRef.nativeElement;e.parentNode.insertBefore(this._outlet.outletElement,e),this._changeDetectorRef&&this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,t),this._attached.next()}},{key:"detach",value:function(){this._portal.isAttached&&this._portal.detach()}},{key:"ngOnDestroy",value:function(){this._outlet&&this._outlet.dispose()}}]),t}()).\u0275fac=function(t){return new(t||lD)(rs(Yl),rs(bl),rs(xu),rs(ka),rs(Gl),rs(Ph),rs(Zo))},lD.\u0275dir=be({type:lD,selectors:[["ng-template","matMenuContent",""]]}),lD),bD=new Vt("MAT_MENU_PANEL"),kD=Dx(Ix((function t(){_classCallCheck(this,t)}))),CD=((cD=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var a;return _classCallCheck(this,n),(a=e.call(this))._elementRef=t,a._focusMonitor=r,a._parentMenu=o,a.role="menuitem",a._hovered=new E,a._focused=new E,a._highlighted=!1,a._triggersSubmenu=!1,r&&r.monitor(a._elementRef,!1),o&&o.addItem&&o.addItem(_assertThisInitialized(a)),a._document=i,a}return _createClass(n,[{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?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e),this._focused.next(this)}},{key:"ngOnDestroy",value:function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._elementRef.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._elementRef.nativeElement,e=this._document?this._document.TEXT_NODE:3,n="";if(t.childNodes)for(var i=t.childNodes.length,r=0;r<i;r++)t.childNodes[r].nodeType===e&&(n+=t.childNodes[r].textContent);return n.trim()}}]),n}(kD)).\u0275fac=function(t){return new(t||cD)(rs(kl),rs(Ph),rs(rk),rs(bD,8))},cD.\u0275cmp=pe({type:cD,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:10,hostBindings:function(t,e){1&t&&gs("click",(function(t){return e._checkDisabled(t)}))("mouseenter",(function(){return e._handleMouseEnter()})),2&t&&(ts("role",e.role)("tabindex",e._getTabIndex())("aria-disabled",e.disabled.toString())("disabled",e.disabled||null),Fs("mat-menu-item",!0)("mat-menu-item-highlighted",e._highlighted)("mat-menu-item-submenu-trigger",e._triggersSubmenu))},inputs:{disabled:"disabled",disableRipple:"disableRipple",role:"role"},exportAs:["matMenuItem"],features:[el],attrs:oD,ngContentSelectors:aD,decls:2,vars:2,consts:[["matRipple","",1,"mat-menu-ripple",3,"matRippleDisabled","matRippleTrigger"]],template:function(t,e){1&t&&(ws(),xs(0),us(1,"div",0)),2&t&&(kr(1),as("matRippleDisabled",e.disableRipple||e.disabled)("matRippleTrigger",e._getHostElement()))},directives:[Kx],encapsulation:2,changeDetection:0}),cD),wD=new Vt("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}}),xD=0,SD=((hD=function(){function t(e,n,i){_classCallCheck(this,t),this._elementRef=e,this._ngZone=n,this._defaultOptions=i,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new gc,this._tabSubscription=f.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new E,this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new pc,this.close=this.closed,this.panelId="mat-menu-panel-".concat(xD++)}return _createClass(t,[{key:"ngOnInit",value:function(){this.setPositionClasses()}},{key:"ngAfterContentInit",value:function(){var t=this;this._updateDirectDescendants(),this._keyManager=new Wb(this._directDescendantItems).withWrap().withTypeAhead(),this._tabSubscription=this._keyManager.tabOut.subscribe((function(){return t.closed.emit("tab")})),this._directDescendantItems.changes.pipe(Xy(this._directDescendantItems),Ky((function(t){return G.apply(void 0,_toConsumableArray2(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(Xy(this._directDescendantItems),Ky((function(t){return G.apply(void 0,_toConsumableArray2(t.map((function(t){return t._hovered}))))})))}},{key:"addItem",value:function(t){}},{key:"removeItem",value:function(t){}},{key:"_handleKeydown",value:function(t){var e=t.keyCode,n=this._keyManager;switch(e){case 27:M_(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;case 36:case 35:M_(t)||(36===e?n.setFirstItemActive():n.setLastItemActive(),t.preventDefault());break;default:38!==e&&40!==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(zf(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:"setElevation",value:function(t){var e="mat-elevation-z".concat(Math.min(4+t,24)),n=Object.keys(this._classList).find((function(t){return t.startsWith("mat-elevation-z")}));n&&n!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)}},{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["mat-menu-before"]="before"===t,n["mat-menu-after"]="after"===t,n["mat-menu-above"]="above"===e,n["mat-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(Xy(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){"before"!==t&&"after"!==t&&function(){throw Error('xPosition value must be either \'before\' or after\'.\n Example: <mat-menu xPosition="before" #menu="matMenu"></mat-menu>')}(),this._xPosition=t,this.setPositionClasses()}},{key:"yPosition",get:function(){return this._yPosition},set:function(t){"above"!==t&&"below"!==t&&function(){throw Error('yPosition value must be either \'above\' or below\'.\n Example: <mat-menu yPosition="above" #menu="matMenu"></mat-menu>')}(),this._yPosition=t,this.setPositionClasses()}},{key:"overlapTrigger",get:function(){return this._overlapTrigger},set:function(t){this._overlapTrigger=xy(t)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=xy(t)}},{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="")}},{key:"classList",get:function(){return this.panelClass},set:function(t){this.panelClass=t}}]),t}()).\u0275fac=function(t){return new(t||hD)(rs(kl),rs(ou),rs(wD))},hD.\u0275dir=be({type:hD,contentQueries:function(t,e,n){var i;1&t&&(Ac(n,_D,!0),Ac(n,CD,!0),Ac(n,CD,!1)),2&t&&(Sc(i=Dc())&&(e.lazyContent=i.first),Sc(i=Dc())&&(e._allItems=i),Sc(i=Dc())&&(e.items=i))},viewQuery:function(t,e){var n;1&t&&Tc(Yl,!0),2&t&&Sc(n=Dc())&&(e.templateRef=n.first)},inputs:{backdropClass:"backdropClass",xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{closed:"closed",close:"close"}}),hD),ED=((uD=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(SD)).\u0275fac=function(t){return TD(t||uD)},uD.\u0275dir=be({type:uD,features:[el]}),uD),TD=ui(ED),OD=((fD=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){return _classCallCheck(this,n),e.call(this,t,i,r)}return n}(ED)).\u0275fac=function(t){return new(t||fD)(rs(kl),rs(ou),rs(wD))},fD.\u0275cmp=pe({type:fD,selectors:[["mat-menu"]],exportAs:["matMenu"],features:[ml([{provide:bD,useExisting:ED},{provide:ED,useExisting:fD}]),el],ngContentSelectors:aD,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-menu-panel",3,"id","ngClass","keydown","click"],[1,"mat-menu-content"]],template:function(t,e){1&t&&(ws(),ns(0,sD,3,6,"ng-template"))},directives:[af],styles:['.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-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;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}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:"";display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n'],encapsulation:2,data:{animation:[yD.transformMenu,yD.fadeInItems]},changeDetection:0}),fD),AD=new Vt("mat-menu-scroll-strategy"),ID={provide:AD,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},PD=o_({passive:!0}),DD=((mD=function(){function t(e,n,i,r,o,a,s,l){var c=this;_classCallCheck(this,t),this._overlay=e,this._element=n,this._viewContainerRef=i,this._parentMenu=o,this._menuItemInstance=a,this._dir=s,this._focusMonitor=l,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=f.EMPTY,this._hoverSubscription=f.EMPTY,this._menuCloseSubscription=f.EMPTY,this._handleTouchStart=function(){return c._openedBy="touch"},this._openedBy=null,this.restoreFocus=!0,this.menuOpened=new pc,this.onMenuOpen=this.menuOpened,this.menuClosed=new pc,this.onMenuClose=this.menuClosed,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,PD),a&&(a._triggersSubmenu=this.triggersSubmenu()),this._scrollStrategy=r}return _createClass(t,[{key:"ngAfterContentInit",value:function(){this._checkMenu(),this._handleHover()}},{key:"ngOnDestroy",value:function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,PD),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}},{key:"triggersSubmenu",value:function(){return!(!this._menuItemInstance||!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 ED&&this.menu._startAnimation()}}},{key:"closeMenu",value:function(){this.menu.close.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?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(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 ED?(e._resetAnimation(),e.lazyContent?e._animationDone.pipe(Mf((function(t){return"void"===t.toState})),zf(1),Zf(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._menuItemInstance._highlighted=t)}},{key:"_checkMenu",value:function(){this.menu||function(){throw Error('matMenuTriggerFor: must pass in an mat-menu instance.\n\n Example:\n <mat-menu #menu="matMenu"></mat-menu>\n <button [matMenuTriggerFor]="menu"></button>')}()}},{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 Y_({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),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=_slicedToArray("before"===this.menu.xPosition?["end","start"]:["start","end"],2),n=e[0],i=e[1],r=_slicedToArray("above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],2),o=r[0],a=r[1],s=o,l=a,c=n,u=i,h=0;this.triggersSubmenu()?(u=n="before"===this.menu.xPosition?"start":"end",i=c="end"===n?"start":"end",h="bottom"===o?8:-8):this.menu.overlapTrigger||(s="top"===o?"bottom":"top",l="top"===a?"bottom":"top"),t.withPositions([{originX:n,originY:s,overlayX:c,overlayY:o,offsetY:h},{originX:i,originY:s,overlayX:u,overlayY:o,offsetY:h},{originX:n,originY:l,overlayX:c,overlayY:a,offsetY:-h},{originX:i,originY:l,overlayX:u,overlayY:a,offsetY:-h}])}},{key:"_menuClosingActions",value:function(){var t=this,e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments();return G(e,this._parentMenu?this._parentMenu.closed:th(),this._parentMenu?this._parentMenu._hovered().pipe(Mf((function(e){return e!==t._menuItemInstance})),Mf((function(){return t._menuOpen}))):th(),n)}},{key:"_handleMousedown",value:function(t){tk(t)||(this._openedBy=0===t.button?"mouse":null,this.triggersSubmenu()&&t.preventDefault())}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;this.triggersSubmenu()&&(39===e&&"ltr"===this.dir||37===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(Mf((function(e){return e===t._menuItemInstance&&!e.disabled})),oh(0,By)).subscribe((function(){t._openedBy="mouse",t.menu instanceof ED&&t.menu._isAnimating?t.menu._animationDone.pipe(zf(1),oh(0,By),Zf(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_(this.menu.templateRef,this._viewContainerRef)),this._portal}},{key:"_deprecatedMatMenuTriggerFor",get:function(){return this.menu},set:function(t){this.menu=t}},{key:"menu",get:function(){return this._menu},set:function(t){var e=this;t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.asObservable().subscribe((function(t){e._destroyMenu(),"click"!==t&&"tab"!==t||!e._parentMenu||e._parentMenu.closed.emit(t)}))))}},{key:"menuOpen",get:function(){return this._menuOpen}},{key:"dir",get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}}]),t}()).\u0275fac=function(t){return new(t||mD)(rs(vb),rs(kl),rs(Gl),rs(AD),rs(ED,8),rs(CD,10),rs(v_,8),rs(rk))},mD.\u0275dir=be({type:mD,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:["aria-haspopup","true",1,"mat-menu-trigger"],hostVars:2,hostBindings:function(t,e){1&t&&gs("mousedown",(function(t){return e._handleMousedown(t)}))("keydown",(function(t){return e._handleKeydown(t)}))("click",(function(t){return e._handleClick(t)})),2&t&&ts("aria-expanded",e.menuOpen||null)("aria-controls",e.menuOpen?e.menu.panelId:null)},inputs:{restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"],_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]}),mD),RD=((gD=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:gD}),gD.\u0275inj=dt({factory:function(t){return new(t||gD)},providers:[ID],imports:[Ax]}),gD),FD=((vD=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:vD}),vD.\u0275inj=dt({factory:function(t){return new(t||vD)},providers:[ID],imports:[[Pf,Ax,Zx,kb,RD],k_,Ax,RD]}),vD),MD=((pD=function t(e,n){_classCallCheck(this,t),this.zoom=e,this.config=n}).\u0275fac=function(t){return new(t||pD)(rs(Sm),rs(um))},pD.\u0275cmp=pe({type:pD,selectors:[["toolbar-zoom-widget"]],decls:10,vars:5,consts:[["mat-icon-button","",3,"disabled","click"],["svgIcon","remove"],[1,"current"],["trans",""],[1,"value"],["svgIcon","add"]],template:function(t,e){1&t&&(ls(0,"button",0),gs("click",(function(){return e.zoom.zoomOut()})),us(1,"mat-icon",1),cs(),ls(2,"div",2),ls(3,"div",3),Gs(4,"Zoom"),cs(),ls(5,"div",4),Gs(6),fc(7,"async"),cs(),cs(),ls(8,"button",0),gs("click",(function(){return e.zoom.zoomIn()})),us(9,"mat-icon",5),cs()),2&t&&(as("disabled",!e.config.get("pixie.tools.zoom.disableMinimumZoom")&&!e.zoom.canZoomOut()),kr(6),Ks("",dc(7,3,e.zoom$),"%"),kr(2),as("disabled",!e.zoom.canZoomIn()))},directives:[_S,MI,QT],pipes:[Tf],styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:140px;text-transform:capitalize}.current[_ngcontent-%COMP%]{margin:0 8px}.value[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0}),ch([xp(DT.zoom),uh("design:type",b)],pD.prototype,"zoom$",void 0),pD),jD=((dD=function t(e,n){_classCallCheck(this,t),this.history=e,this.config=n}).\u0275fac=function(t){return new(t||dD)(rs(hE),rs(um))},dD.\u0275cmp=pe({type:dD,selectors:[["toolbar-undo-widget"]],decls:6,vars:10,consts:[["mat-icon-button","",3,"disabled","click"],["svgIcon","undo"],["svgIcon","redo"]],template:function(t,e){1&t&&(ls(0,"button",0),gs("click",(function(){return e.history.undo()})),fc(1,"async"),us(2,"mat-icon",1),cs(),ls(3,"button",0),gs("click",(function(){return e.history.redo()})),fc(4,"async"),us(5,"mat-icon",2),cs()),2&t&&(Fs("invisible",e.config.get("pixie.ui.toolbar.hideHistoryButtons")),as("disabled",!dc(1,6,e.canUndo$)),kr(3),Fs("invisible",e.config.get("pixie.ui.toolbar.hideHistoryButtons")),as("disabled",!dc(4,8,e.canRedo$)))},directives:[_S,MI],pipes:[Tf],styles:[""],changeDetection:0}),ch([xp(bm.canUndo),uh("design:type",b)],dD.prototype,"canUndo$",void 0),ch([xp(bm.canRedo),uh("design:type",b)],dD.prototype,"canRedo$",void 0),dD);function LD(t,e){if(1&t&&(ls(0,"span",9),Gs(1),cs()),2&t){var n=ks(4);kr(1),qs(n.item.text)}}function ND(t,e){if(1&t){var n=ds();ls(0,"button",6),gs("click",(function(){Qe(n);var t=ks(3);return t.executeOpenButtonAction(t.item.action)})),us(1,"mat-icon",7),ns(2,LD,2,1,"span",8),cs()}if(2&t){var i=ks(3);Fs("mat-icon-button","compact"===i.toolbarMode||i.item.icon&&!i.item.text),kr(1),as("svgIcon",i.item.icon),kr(1),as("ngIf","compact"!==i.toolbarMode)}}function BD(t,e){if(1&t&&(ls(0,"span",9),Gs(1),cs()),2&t){var n=ks(4);kr(1),qs(n.item.text)}}function zD(t,e){if(1&t){var n=ds();ls(0,"button",14),gs("click",(function(){Qe(n);var t=e.$implicit;return ks(4).executeOpenButtonAction(t.action)})),Gs(1),cs()}if(2&t){var i=e.$implicit;kr(1),qs(i.label)}}function VD(t,e){if(1&t&&(ls(0,"button",10),us(1,"mat-icon",7),ns(2,BD,2,1,"span",8),cs(),ls(3,"mat-menu",11,12),ns(5,zD,2,1,"button",13),cs()),2&t){var n=is(4),i=ks(3);Fs("mat-icon-button","compact"===i.toolbarMode||i.item.icon&&!i.item.text),as("matMenuTriggerFor",n),kr(1),as("svgIcon",i.item.icon),kr(1),as("ngIf","compact"!==i.toolbarMode),kr(1),as("overlapTrigger",!1),kr(2),as("ngForOf",i.item.dropdownItems)}}function HD(t,e){if(1&t&&(hs(0),ns(1,ND,3,4,"button",4),ns(2,VD,6,7,"ng-template",null,5,jc),fs()),2&t){var n=is(3),i=ks(2);kr(1),as("ngIf",!i.item.dropdownItems)("ngIfElse",n)}}function WD(t,e){1&t&&(hs(0),us(1,"toolbar-zoom-widget"),fs())}function UD(t,e){1&t&&us(0,"toolbar-undo-widget")}function YD(t,e){1&t&&us(0,"toolbar-panel-name-widget")}function XD(t,e){1&t&&us(0,"img",15),2&t&&as("src",ks(2).item.src,$i)}function GD(t,e){if(1&t&&(hs(0),hs(1,1),ns(2,HD,4,2,"ng-container",2),ns(3,WD,2,0,"ng-container",2),ns(4,UD,1,0,"toolbar-undo-widget",2),ns(5,YD,1,0,"toolbar-panel-name-widget",2),ns(6,XD,1,1,"img",3),fs(),fs()),2&t){var n=ks();kr(1),as("ngSwitch",n.item.type),kr(1),as("ngSwitchCase","button"),kr(1),as("ngSwitchCase","zoomWidget"),kr(1),as("ngSwitchCase","undoWidget"),kr(1),as("ngSwitchCase","panelNameWidget"),kr(1),as("ngSwitchCase","image")}}var qD,KD=((qD=function(){function t(e,n,i,r,o,a,s,l,c,u){_classCallCheck(this,t),this.history=e,this.config=n,this.zoom=i,this.panels=r,this.breakpoints=o,this.importTool=a,this.exportTool=s,this.canvas=l,this.store=c,this.el=u}return _createClass(t,[{key:"ngOnChanges",value:function(){this.shouldRenderItem=this.shouldRender(),this.isDropdownButton=Array.isArray(this.item.action),this.shouldRenderItem&&(this.item.marginLeft&&(this.el.nativeElement.style.marginLeft=this.item.marginLeft),this.item.marginRight&&(this.el.nativeElement.style.marginRight=this.item.marginRight))}},{key:"executeOpenButtonAction",value:function(t){"function"==typeof t?t():"string"==typeof t&&this[t]()}},{key:"exportImage",value:function(){this.config.get("pixie.ui.showExportPanel")?this.panels.openExportPanel():this.exportTool.export()}},{key:"openBackgroundImage",value:function(){var t=this;this.importTool.openUploadDialog({type:"image",openAsBackground:!0}).then((function(){t.history.add(km.BG_IMAGE)}))}},{key:"openOverlayImage",value:function(){var t=this;this.importTool.openUploadDialog().then((function(e){e&&(t.canvas.fabric().setActiveObject(e),t.history.add(km.OVERLAY_IMAGE))}))}},{key:"openStateFile",value:function(){return this.importTool.openUploadDialog({type:"state"})}},{key:"closeEditor",value:function(){this.store.dispatch(new Nu)}},{key:"toggleObjects",value:function(){this.panels.toggleObjects()}},{key:"toggleHistory",value:function(){this.panels.toggleHistory()}},{key:"shouldRender",value:function(){var t;if("compact"===this.toolbarMode&&!this.item.showInCompactMode&&!this.item.compactModeOnly)return!1;if(this.item.compactModeOnly&&"compact"!==this.toolbarMode)return!1;if(!(null===(t=this.item)||void 0===t?void 0:t.condition))return!0;var e=Object.keys(this.item.condition)[0],n=this.item.condition[e];return this.config.get("pixie.".concat(e))===n}}]),t}()).\u0275fac=function(t){return new(t||qD)(rs(hE),rs(um),rs(Sm),rs(jP),rs(PT),rs(KT),rs(JE),rs(Em),rs(pp),rs(kl))},qD.\u0275cmp=pe({type:qD,selectors:[["toolbar-item"]],inputs:{item:"item",toolbarMode:"toolbarMode",editorMode:"editorMode"},features:[sl],decls:1,vars:1,consts:[[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","toolbar-image","alt","",3,"src",4,"ngSwitchCase"],["mat-button","",3,"mat-icon-button","click",4,"ngIf","ngIfElse"],["dropdownButton",""],["mat-button","",3,"click"],[3,"svgIcon"],["class","name","trans","",4,"ngIf"],["trans","",1,"name"],["mat-button","",3,"matMenuTriggerFor"],[3,"overlapTrigger"],["openMenu","matMenu"],["mat-menu-item","","trans","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","","trans","",3,"click"],["alt","",1,"toolbar-image",3,"src"]],template:function(t,e){1&t&&ns(0,GD,7,6,"ng-container",0),2&t&&as("ngIf",e.shouldRenderItem)},directives:[uf,bf,kf,_S,MI,QT,DD,OD,lf,CD,MD,jD,rD],styles:["[_nghost-%COMP%]{display:inline-block}.mat-button[_ngcontent-%COMP%]:not(.mat-icon-button) .mat-icon[_ngcontent-%COMP%]{margin-right:5px}.toolbar-image[_ngcontent-%COMP%]{display:inline-block;max-height:32px;width:auto;vertical-align:middle}"],changeDetection:0}),qD);function ZD(t,e){if(1&t){var n=ds();hs(0),ls(1,"div",3),ls(2,"button",4),gs("click",(function(){return Qe(n),ks(4).cancelChanges()})),us(3,"mat-icon",5),cs(),cs(),ls(4,"div",6),us(5,"toolbar-panel-name-widget"),cs(),ls(6,"div",7),ls(7,"button",4),gs("click",(function(){return Qe(n),ks(4).applyChanges()})),us(8,"mat-icon",8),cs(),cs(),fs()}}function QD(t,e){if(1&t&&(hs(0),us(1,"toolbar-item",10),fs()),2&t){var n=e.$implicit,i=ks(2).ngIf,r=ks(2).ngIf;kr(1),as("item",n)("toolbarMode",r)("editorMode",i)}}function JD(t,e){if(1&t&&(hs(0),us(1,"toolbar-item",10),fs()),2&t){var n=e.$implicit,i=ks(2).ngIf,r=ks(2).ngIf;kr(1),as("item",n)("toolbarMode",r)("editorMode",i)}}function $D(t,e){if(1&t&&(hs(0),us(1,"toolbar-item",10),fs()),2&t){var n=e.$implicit,i=ks(2).ngIf,r=ks(2).ngIf;kr(1),as("item",n)("toolbarMode",r)("editorMode",i)}}function tR(t,e){if(1&t&&(ls(0,"div",3),ns(1,QD,2,3,"ng-container",9),cs(),ls(2,"div",6),ns(3,JD,2,3,"ng-container",9),cs(),ls(4,"div",7),ns(5,$D,2,3,"ng-container",9),cs()),2&t){var n=ks(4);kr(1),as("ngForOf",n.items.left),kr(2),as("ngForOf",n.items.center),kr(2),as("ngForOf",n.items.right)}}function eR(t,e){if(1&t&&(hs(0),ns(1,ZD,9,0,"ng-container",1),ns(2,tR,6,3,"ng-template",null,2,jc),fs()),2&t){var n=is(3),i=ks().ngIf,r=ks().ngIf;kr(1),as("ngIf","compact"===r&&"navigation"!==i)("ngIfElse",n)}}function nR(t,e){if(1&t&&(hs(0),ns(1,eR,4,2,"ng-container",0),fc(2,"async"),fs()),2&t){var n=ks(2);kr(1),as("ngIf",dc(2,1,n.editorMode$))}}function iR(t,e){if(1&t&&(hs(0),ns(1,nR,3,3,"ng-container",0),fc(2,"async"),fs()),2&t){var n=ks();kr(1),as("ngIf",dc(2,1,n.activePanel$))}}var rR,oR,aR=((rR=function(){function t(e,n,i,r,o,a){_classCallCheck(this,t),this.config=e,this.breakpoints=n,this.canvas=i,this.floatingPanels=r,this.store=o,this.cd=a,this.toolbarMode$=new Df("regular"),this.items={left:[],center:[],right:[]}}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this.config.all$().subscribe((function(){Object.keys(t.items).forEach((function(e){var n=t.config.get("pixie.ui.toolbar.".concat(e,"Items"));t.items[e]!==n&&(t.items[e]=n,t.cd.markForCheck())}))})),this.breakpoints.observe("(max-width: 920px)").subscribe((function(e){return t.toolbarMode$.next(e.matches?"compact":"regular")}))}},{key:"applyChanges",value:function(){var t=this.store.selectSnapshot(DT.activePanel);this.store.dispatch(new Hu(t))}},{key:"cancelChanges",value:function(){var t=this.store.selectSnapshot(DT.activePanel);this.store.dispatch(new Wu(t))}}]),t}()).\u0275fac=function(t){return new(t||rR)(rs(um),rs(PT),rs(Em),rs(jP),rs(pp),rs(Zo))},rR.\u0275cmp=pe({type:rR,selectors:[["toolbar"]],decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngIf","ngIfElse"],["regularActions",""],[1,"left"],["mat-icon-button","",3,"click"],["svgIcon","close"],[1,"center"],[1,"right"],["svgIcon","check"],[4,"ngFor","ngForOf"],[3,"item","toolbarMode","editorMode"]],template:function(t,e){1&t&&(ns(0,iR,3,3,"ng-container",0),fc(1,"async")),2&t&&as("ngIf",dc(1,1,e.toolbarMode$))},directives:[uf,_S,MI,rD,lf,KD],pipes:[Tf],styles:["[_nghost-%COMP%]{display:flex;align-items:center;height:50px;padding:0 20px;color:var(--be-accent-contrast);background-color:var(--be-primary-default);position:relative;z-index:3;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.mat-icon-button[disabled][disabled][_ngcontent-%COMP%]{color:hsla(0,0%,100%,.3)}.left[_ngcontent-%COMP%]{margin-right:auto}.right[_ngcontent-%COMP%]{margin-left:auto}.status-bar[_ngcontent-%COMP%]{height:30px;background-color:var(--be-primary-default);text-align:center;line-height:30px}"],changeDetection:0}),ch([xp(DT.activePanel),uh("design:type",b)],rR.prototype,"activePanel$",void 0),ch([xp(DT.mode),uh("design:type",b)],rR.prototype,"editorMode$",void 0),rR),sR={tooltipState:Qk("state",[eC("initial, void, hidden",tC({opacity:0,transform:"scale(0)"})),eC("visible",tC({transform:"scale(1)"})),nC("* => visible",Jk("200ms cubic-bezier(0, 0, 0.2, 1)",(oR=[tC({opacity:0,transform:"scale(0)",offset:0}),tC({opacity:.5,transform:"scale(0.99)",offset:.5}),tC({opacity:1,transform:"scale(1)",offset:1})],{type:5,steps:oR}))),nC("* => hidden",Jk("100ms cubic-bezier(0, 0, 0.2, 1)",tC({opacity:0})))])},lR=o_({passive:!0});function cR(t){return Error('Tooltip position "'.concat(t,'" is invalid.'))}var uR,hR,fR,dR=new Vt("mat-tooltip-scroll-strategy"),pR={provide:dR,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:20})}}},vR=new Vt("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),gR=((fR=function(){function t(e,n,i,r,o,a,s,l,c,u,h,f){var d=this;_classCallCheck(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=l,this._dir=u,this._defaultOptions=h,this._position="below",this._disabled=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=new Map,this._destroyed=new E,this._handleKeydown=function(t){d._isTooltipVisible()&&27===t.keyCode&&!M_(t)&&(t.preventDefault(),t.stopPropagation(),d._ngZone.run((function(){return d.hide(0)})))},this._scrollStrategy=c,h&&(h.position&&(this.position=h.position),h.touchGestures&&(this.touchGestures=h.touchGestures)),l.monitor(n).pipe(Zf(this._destroyed)).subscribe((function(t){t?"keyboard"===t&&o.run((function(){return d.show()})):o.run((function(){return d.hide(0)}))})),o.runOutsideAngular((function(){n.nativeElement.addEventListener("keydown",d._handleKeydown)}))}return _createClass(t,[{key:"ngOnInit",value:function(){this._setupPointerEvents()}},{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,n){t.removeEventListener(n,e,lR)})),this._passiveListeners.clear(),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 T_(mR,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Zf(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(Zf(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(Zf(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;if("above"==n||"below"==n)t={originX:"center",originY:"above"==n?"top":"bottom"};else if("before"==n||"left"==n&&e||"right"==n&&!e)t={originX:"start",originY:"center"};else{if(!("after"==n||"right"==n&&e||"left"==n&&!e))throw cR(n);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;if("above"==n)t={overlayX:"center",overlayY:"bottom"};else if("below"==n)t={overlayX:"center",overlayY:"top"};else if("before"==n||"left"==n&&e||"right"==n&&!e)t={overlayX:"end",overlayY:"center"};else{if(!("after"==n||"right"==n&&e||"left"==n&&!e))throw cR(n);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.asObservable().pipe(zf(1),Zf(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:"_setupPointerEvents",value:function(){var t=this;if(this._platform.IOS||this._platform.ANDROID){if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();var e=function(){clearTimeout(t._touchstartTimeout),t.hide(t._defaultOptions.touchendHideDelay)};this._passiveListeners.set("touchend",e).set("touchcancel",e).set("touchstart",(function(){clearTimeout(t._touchstartTimeout),t._touchstartTimeout=setTimeout((function(){return t.show()}),500)}))}}else this._passiveListeners.set("mouseenter",(function(){return t.show()})).set("mouseleave",(function(){return t.hide()}));this._passiveListeners.forEach((function(e,n){t._elementRef.nativeElement.addEventListener(n,e,lR)}))}},{key:"_disableNativeGesturesIfNecessary",value:function(){var t=this._elementRef.nativeElement,e=t.style,n=this.touchGestures;"off"!==n&&(("on"===n||"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName)&&(e.userSelect=e.msUserSelect=e.webkitUserSelect=e.MozUserSelect="none"),"on"!==n&&t.draggable||(e.webkitUserDrag="none"),e.touchAction="none",e.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=xy(t),this._disabled&&this.hide(0)}},{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?"".concat(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(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}()).\u0275fac=function(t){return new(t||fR)(rs(vb),rs(kl),rs(__),rs(Gl),rs(ou),rs(i_),rs(zb),rs(rk),rs(dR),rs(v_,8),rs(vR,8),rs(kl))},fR.\u0275dir=be({type:fR,selectors:[["","matTooltip",""]],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),fR),mR=((hR=function(){function t(e,n){_classCallCheck(this,t),this._changeDetectorRef=e,this._breakpointObserver=n,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new E,this._isHandset=this._breakpointObserver.observe(DS)}return _createClass(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.asObservable()}},{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}()).\u0275fac=function(t){return new(t||hR)(rs(Zo),rs(IS))},hR.\u0275cmp=pe({type:hR,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&gs("click",(function(){return e._handleBodyInteraction()}),!1,Xn),2&t&&Rs("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){var n;1&t&&(ls(0,"div",0),gs("@state.start",(function(){return e._animationStart()}))("@state.done",(function(t){return e._animationDone(t)})),fc(1,"async"),Gs(2),cs()),2&t&&(Fs("mat-tooltip-handset",null==(n=dc(1,5,e._isHandset))?null:n.matches),as("ngClass",e.tooltipClass)("@state",e._visibility),kr(2),qs(e.message))},directives:[af],pipes:[Tf],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:[sR.tooltipState]},changeDetection:0}),hR),yR=((uR=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:uR}),uR.\u0275inj=dt({factory:function(t){return new(t||uR)},providers:[pR],imports:[[dk,Pf,kb,Ax],Ax,k_]}),uR);function _R(t,e){if(1&t){var n=ds();hs(0),ls(1,"button",3),gs("click",(function(){return Qe(n),ks().activeObject.duplicate()})),fc(2,"trans"),us(3,"mat-icon",4),cs(),ls(4,"button",3),gs("click",(function(){return Qe(n),ks().activeObject.flipHorizontal()})),fc(5,"trans"),us(6,"mat-icon",5),cs(),ls(7,"button",3),gs("click",(function(){return Qe(n),ks().bringActiveObjectToFront()})),fc(8,"trans"),us(9,"mat-icon",6),cs(),ls(10,"button",3),gs("click",(function(){return Qe(n),ks().deleteObject()})),fc(11,"trans"),us(12,"mat-icon",7),cs(),ls(13,"button",8),gs("click",(function(){return Qe(n),ks().openObjSettingsPanel()})),fc(14,"async"),fc(15,"trans"),us(16,"mat-icon",9),cs(),fs()}if(2&t){var i=ks();kr(1),as("matTooltip",dc(2,6,"Duplicate")),kr(3),as("matTooltip",dc(5,8,"Flip")),kr(3),as("matTooltip",dc(8,10,"Bring to front")),kr(3),as("matTooltip",dc(11,12,"Delete")),kr(3),as("disabled",dc(14,14,i.dirty$))("matTooltip",dc(15,16,"Customize"))}}function bR(t,e){if(1&t){var n=ds();ls(0,"div",10),ls(1,"button",11),gs("click",(function(){return Qe(n),ks().history.undo()})),fc(2,"async"),us(3,"mat-icon",12),cs(),ls(4,"button",11),gs("click",(function(){return Qe(n),ks().history.redo()})),fc(5,"async"),us(6,"mat-icon",13),cs(),cs()}if(2&t){var i=ks();kr(1),as("disabled",!dc(2,2,i.canUndo$)),kr(3),as("disabled",!dc(5,4,i.canRedo$))}}var kR,CR=((kR=function(){function t(e,n,i,r,o,a){_classCallCheck(this,t),this.history=e,this.activeObject=n,this.controls=i,this.breakpoints=r,this.objects=o,this.store=a,this.mobileMode=!1}return _createClass(t,[{key:"deleteObject",value:function(){var t=this.activeObject.get();t&&(this.activeObject.delete(),this.history.add({name:"Deleted: ".concat(t.name),icon:"delete-custom"}))}},{key:"openObjectDrawer",value:function(){switch(this.activeObject.get().name){case Ap.shape.name:this.controls.openPanel(Ru.SHAPES);break;case Ap.sticker.name:this.controls.openPanel(Ru.STICKERS);break;case Ap.text.name:this.controls.openPanel(Ru.TEXT)}}},{key:"openObjSettingsPanel",value:function(){this.store.dispatch(new Bu(Ru.OBJECT_SETTINGS))}},{key:"bringActiveObjectToFront",value:function(){this.activeObject.bringToFront(),this.objects.syncObjects()}}]),t}()).\u0275fac=function(t){return new(t||kR)(rs(hE),rs(dm),rs(YO),rs(PT),rs(Tm),rs(pp))},kR.\u0275cmp=pe({type:kR,selectors:[["floating-object-controls"]],hostVars:2,hostBindings:function(t,e){2&t&&Fs("mobile-mode",e.mobileMode)},inputs:{mobileMode:"mobileMode"},decls:4,vars:4,consts:[[1,"left"],[4,"ngIf"],["class","right",4,"ngIf"],["mat-icon-button","",3,"matTooltip","click"],["svgIcon","copy-custom"],["svgIcon","flip"],["svgIcon","flip-to-front"],["svgIcon","delete-custom"],["mat-icon-button","",3,"disabled","matTooltip","click"],["svgIcon","settings-custom"],[1,"right"],["mat-icon-button","",3,"disabled","click"],["svgIcon","undo"],["svgIcon","redo"]],template:function(t,e){1&t&&(ls(0,"div",0),ns(1,_R,17,18,"ng-container",1),fc(2,"async"),cs(),ns(3,bR,7,6,"div",2)),2&t&&(kr(1),as("ngIf",dc(2,2,e.activeObjId$)),kr(2),as("ngIf",e.mobileMode))},directives:[uf,_S,gR,MI],pipes:[Tf,DP],styles:["floating-object-controls{display:none;position:absolute;bottom:-60px;height:50px;left:10px;right:10px;padding:5px;max-width:210px;background-color:#fff;background-color:var(--be-background);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);border-radius:2px}floating-object-controls.mobile-mode,floating-object-controls.visible{display:flex}floating-object-controls .left{flex:1 1 auto;text-align:left}floating-object-controls .right{flex:0 0 100px;text-align:right}floating-object-controls.mobile-mode{top:-50px;height:40px;bottom:0;background-color:transparent;box-shadow:none;padding:0;max-width:none}floating-object-controls.mobile-mode .mat-icon-button{background-color:var(--be-background);border-radius:3px;margin:0 3px;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}floating-object-controls.mobile-mode .mat-icon-button .mat-button-ripple{border-radius:3px}"],encapsulation:2}),ch([xp(bm.canUndo),uh("design:type",b)],kR.prototype,"canUndo$",void 0),ch([xp(bm.canRedo),uh("design:type",b)],kR.prototype,"canRedo$",void 0),ch([xp(DT.activeObjId),uh("design:type",b)],kR.prototype,"activeObjId$",void 0),ch([xp(DT.dirty),uh("design:type",b)],kR.prototype,"dirty$",void 0),kR),wR=n("Q1FS");function xR(t,e){if(1&t&&us(0,"img",3),2&t){var n=ks();as("src",n.src,$i)("alt",n.alt)("ngClass",n.className)}}function SR(t,e){if(1&t&&us(0,"img",3),2&t){var n=ks();as("src",n.src,$i)("alt",n.alt)("ngClass",n.className)}}function ER(t,e){if(1&t&&us(0,"mat-icon",4),2&t){var n=ks();as("svgIcon",n.src)("ngClass",n.className)}}var TR,OR=((TR=function(){function t(e,n){_classCallCheck(this,t),this.settings=e,this.el=n,this.alt="",this.className="",this.type$=new Df(null)}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this.type$.subscribe((function(e){t.el.nativeElement.classList.remove("image"),t.el.nativeElement.classList.remove("icon"),t.el.nativeElement.classList.add("absolute"===e||"relative"===e?"image":"icon")}))}},{key:"ngOnChanges",value:function(){var t;this.src&&((t=this.src)&&!/^[a-z]:\\/.test(t)&&/^[a-z][a-z\d+\-.]*:/.test(t)?this.type$.next("absolute"):this.src.indexOf(".")>-1?this.type$.next("relative"):this.type$.next("icon"))}}]),t}()).\u0275fac=function(t){return new(t||TR)(rs(um),rs(kl))},TR.\u0275cmp=pe({type:TR,selectors:[["image-or-icon"]],inputs:{src:"src",alt:"alt",className:"className"},features:[sl],decls:5,vars:6,consts:[[3,"ngSwitch"],[3,"src","alt","ngClass",4,"ngSwitchCase"],[3,"svgIcon","ngClass",4,"ngSwitchCase"],[3,"src","alt","ngClass"],[3,"svgIcon","ngClass"]],template:function(t,e){1&t&&(hs(0,0),fc(1,"async"),ns(2,xR,1,3,"img",1),ns(3,SR,1,3,"img",1),ns(4,ER,1,2,"mat-icon",2),fs()),2&t&&(as("ngSwitch",dc(1,4,e.type$)),kr(2),as("ngSwitchCase","absolute"),kr(1),as("ngSwitchCase","relative"),kr(1),as("ngSwitchCase","icon"))},directives:[bf,kf,af,MI],pipes:[Tf],styles:[".inherit-size[_nghost-%COMP%] img[_ngcontent-%COMP%], .inherit-size [_nghost-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%}.icon[_nghost-%COMP%], .icon [_nghost-%COMP%]{display:inline-block;width:24px;height:24px}.mat-icon[_ngcontent-%COMP%]{width:100%;height:100%}img[_ngcontent-%COMP%]{max-width:100%;max-height:100%;height:auto;-o-object-fit:cover;object-fit:cover;margin:auto}"],changeDetection:0}),TR);function AR(t,e){1&t&&us(0,"div",4)}function IR(t,e){if(1&t){var n=ds();ls(0,"button",5),gs("click",(function(){Qe(n);var t=ks().$implicit;return ks().executeNavItemAction(t)})),us(1,"image-or-icon",6),ls(2,"span",7),Gs(3),cs(),cs()}if(2&t){var i=ks().$implicit;as("disabled",ks().navItemIsDisabled(i)),kr(1),as("src",i.icon),kr(2),qs(i.display_name||i.name)}}function PR(t,e){if(1&t&&(hs(0),ns(1,AR,1,0,"div",2),ns(2,IR,4,3,"button",3),fs()),2&t){var n=e.$implicit;kr(1),as("ngIf","separator"===n.type),kr(1),as("ngIf","separator"!==n.type)}}var DR,RR=((DR=function(){function t(e,n,i,r,o,a,s,l,c,u){_classCallCheck(this,t),this.controls=e,this.canvas=n,this.saveTool=i,this.config=r,this.mergeTool=o,this.history=a,this.toast=s,this.store=l,this.actions$=c,this.changeDetector=u}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this.actions$.pipe(Td(Xu)).subscribe((function(){t.changeDetector.markForCheck()}))}},{key:"executeNavItemAction",value:function(t){return"merge"===t.action?this.merge():"string"==typeof t.action?this.store.dispatch(new Bu(t.action)):void("function"==typeof t.action&&t.action())}},{key:"navItemIsDisabled",value:function(t){var e=!!this.canvas.getMainImage();return t.name===Ru.MERGE?!this.mergeTool.canMerge():t.name===Ru.TRANSFORM&&!e}},{key:"merge",value:function(){var t=this;this.mergeTool.apply().then((function(){t.history.add(km.MERGE),t.toast.open("Objects merged.")}))}}]),t}()).\u0275fac=function(t){return new(t||DR)(rs(YO),rs(Em),rs(JE),rs(um),rs($E),rs(hE),rs(rE),rs(pp),rs(Gd),rs(Zo))},DR.\u0275cmp=pe({type:DR,selectors:[["navigation-bar"]],decls:3,vars:4,consts:[["customScrollbar","",1,"scroll-container",3,"suppressX"],[4,"ngFor","ngForOf"],["class","separator",4,"ngIf"],["class","no-style control-button",3,"disabled","click",4,"ngIf"],[1,"separator"],[1,"no-style","control-button",3,"disabled","click"],[1,"control-icon","inherit-size",3,"src"],["trans","",1,"name"]],template:function(t,e){1&t&&(ls(0,"div",0),ns(1,PR,3,2,"ng-container",1),fc(2,"async"),cs()),2&t&&(as("suppressX",!1),kr(1),as("ngForOf",dc(2,2,e.navItems$)))},directives:[TO,lf,uf,OR,QT],pipes:[Tf],styles:["navigation-bar{display:block;width:100%;height:100%;padding:0 12px}navigation-bar .scroll-container{display:flex;align-items:center;justify-content:center;width:100%;height:100%;position:relative;overflow-x:auto;overflow-y:hidden;white-space:nowrap}@media only screen and (max-width:1150px){navigation-bar .scroll-container{justify-content:flex-start}navigation-bar .scroll-container .separator{display:none}}navigation-bar button.control-button{text-align:center;margin:0 12px;flex:0 0 auto}navigation-bar button.control-button[disabled]{opacity:.4;cursor:default}navigation-bar button.control-button .control-icon{display:inline-block;width:38px;height:38px;margin:0 auto;color:var(--be-text)}navigation-bar button.control-button .name{display:block;margin-top:2px;text-transform:uppercase;font-size:13px}navigation-bar .separator{height:75px;width:1px;flex:0 0 1px;background-color:var(--be-divider-lighter);margin:0 20px}"],encapsulation:2,changeDetection:0}),ch([xp(DT.navItems),uh("design:type",wR.Observable)],DR.prototype,"navItems$",void 0),DR),FR=["dialogPopup"],MR=["hueSlider"],jR=["alphaSlider"];function LR(t,e){if(1&t&&us(0,"div"),2&t){var n=ks();Qs("arrow arrow-",n.cpUsePosition,""),Rs("top",n.arrowTop,"px")}}function NR(t,e){if(1&t){var n=ds();ls(0,"div",26),gs("newValue",(function(t){return Qe(n),ks().onColorChange(t)}))("dragStart",(function(){return Qe(n),ks().onDragStart("saturation-lightness")}))("dragEnd",(function(){return Qe(n),ks().onDragEnd("saturation-lightness")})),us(1,"div",13),cs()}if(2&t){var i=ks();Rs("background-color",i.hueSliderColor),as("rgX",1)("rgY",1),kr(1),Rs("top",null==i.slider?null:i.slider.v,"px")("left",null==i.slider?null:i.slider.s,"px")}}function BR(t,e){if(1&t){var n=ds();ls(0,"button",27),gs("click",(function(t){Qe(n);var e=ks();return e.onAddPresetColor(t,e.selectedColor)})),Gs(1),cs()}if(2&t){var i=ks();Ms(i.cpAddColorButtonClass),as("disabled",i.cpPresetColors&&i.cpPresetColors.length>=i.cpMaxPresetColorsLength),kr(1),Ks(" ",i.cpAddColorButtonText," ")}}function zR(t,e){1&t&&us(0,"div",28)}function VR(t,e){if(1&t){var n=ds();ls(0,"input",34),gs("keyup.enter",(function(t){return Qe(n),ks(2).onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks(2).onAlphaInput(t)})),cs()}if(2&t){var i=ks(2);as("rg",1)("value",null==i.cmykText?null:i.cmykText.a)}}function HR(t,e){1&t&&(ls(0,"div"),Gs(1,"A"),cs())}function WR(t,e){if(1&t){var n=ds();ls(0,"div",29),ls(1,"div",30),ls(2,"input",31),gs("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onCyanInput(t)})),cs(),ls(3,"input",31),gs("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onMagentaInput(t)})),cs(),ls(4,"input",31),gs("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onYellowInput(t)})),cs(),ls(5,"input",31),gs("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onBlackInput(t)})),cs(),ns(6,VR,1,2,"input",32),cs(),ls(7,"div",30),ls(8,"div"),Gs(9,"C"),cs(),ls(10,"div"),Gs(11,"M"),cs(),ls(12,"div"),Gs(13,"Y"),cs(),ls(14,"div"),Gs(15,"K"),cs(),ns(16,HR,2,0,"div",33),cs(),cs()}if(2&t){var i=ks();Rs("display",3!==i.format?"none":"block"),kr(2),as("rg",100)("value",null==i.cmykText?null:i.cmykText.c),kr(1),as("rg",100)("value",null==i.cmykText?null:i.cmykText.m),kr(1),as("rg",100)("value",null==i.cmykText?null:i.cmykText.y),kr(1),as("rg",100)("value",null==i.cmykText?null:i.cmykText.k),kr(1),as("ngIf","disabled"!==i.cpAlphaChannel),kr(10),as("ngIf","disabled"!==i.cpAlphaChannel)}}function UR(t,e){if(1&t){var n=ds();ls(0,"input",34),gs("keyup.enter",(function(t){return Qe(n),ks(2).onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks(2).onAlphaInput(t)})),cs()}if(2&t){var i=ks(2);as("rg",1)("value",null==i.hslaText?null:i.hslaText.a)}}function YR(t,e){1&t&&(ls(0,"div"),Gs(1,"A"),cs())}function XR(t,e){if(1&t){var n=ds();ls(0,"div",35),ls(1,"div",30),ls(2,"input",36),gs("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onHueInput(t)})),cs(),ls(3,"input",31),gs("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onSaturationInput(t)})),cs(),ls(4,"input",31),gs("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onLightnessInput(t)})),cs(),ns(5,UR,1,2,"input",32),cs(),ls(6,"div",30),ls(7,"div"),Gs(8,"H"),cs(),ls(9,"div"),Gs(10,"S"),cs(),ls(11,"div"),Gs(12,"L"),cs(),ns(13,YR,2,0,"div",33),cs(),cs()}if(2&t){var i=ks();Rs("display",2!==i.format?"none":"block"),kr(2),as("rg",360)("value",null==i.hslaText?null:i.hslaText.h),kr(1),as("rg",100)("value",null==i.hslaText?null:i.hslaText.s),kr(1),as("rg",100)("value",null==i.hslaText?null:i.hslaText.l),kr(1),as("ngIf","disabled"!==i.cpAlphaChannel),kr(8),as("ngIf","disabled"!==i.cpAlphaChannel)}}function GR(t,e){if(1&t){var n=ds();ls(0,"input",34),gs("keyup.enter",(function(t){return Qe(n),ks(2).onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks(2).onAlphaInput(t)})),cs()}if(2&t){var i=ks(2);as("rg",1)("value",null==i.rgbaText?null:i.rgbaText.a)}}function qR(t,e){1&t&&(ls(0,"div"),Gs(1,"A"),cs())}function KR(t,e){if(1&t){var n=ds();ls(0,"div",37),ls(1,"div",30),ls(2,"input",38),gs("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onRedInput(t)})),cs(),ls(3,"input",38),gs("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onGreenInput(t)})),cs(),ls(4,"input",38),gs("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onBlueInput(t)})),cs(),ns(5,GR,1,2,"input",32),cs(),ls(6,"div",30),ls(7,"div"),Gs(8,"R"),cs(),ls(9,"div"),Gs(10,"G"),cs(),ls(11,"div"),Gs(12,"B"),cs(),ns(13,qR,2,0,"div",33),cs(),cs()}if(2&t){var i=ks();Rs("display",1!==i.format?"none":"block"),kr(2),as("rg",255)("value",null==i.rgbaText?null:i.rgbaText.r),kr(1),as("rg",255)("value",null==i.rgbaText?null:i.rgbaText.g),kr(1),as("rg",255)("value",null==i.rgbaText?null:i.rgbaText.b),kr(1),as("ngIf","disabled"!==i.cpAlphaChannel),kr(8),as("ngIf","disabled"!==i.cpAlphaChannel)}}function ZR(t,e){if(1&t){var n=ds();ls(0,"input",34),gs("keyup.enter",(function(t){return Qe(n),ks(2).onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks(2).onAlphaInput(t)})),cs()}if(2&t){var i=ks(2);as("rg",1)("value",i.hexAlpha)}}function QR(t,e){1&t&&(ls(0,"div"),Gs(1,"A"),cs())}function JR(t,e){if(1&t){var n=ds();ls(0,"div",39),ls(1,"div",30),ls(2,"input",40),gs("blur",(function(){return Qe(n),ks().onHexInput(null)}))("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onHexInput(t)})),cs(),ns(3,ZR,1,2,"input",32),cs(),ls(4,"div",30),ls(5,"div"),Gs(6,"Hex"),cs(),ns(7,QR,2,0,"div",33),cs(),cs()}if(2&t){var i=ks();Rs("display",0!==i.format?"none":"block"),Fs("hex-alpha","forced"===i.cpAlphaChannel),kr(2),as("value",i.hexText),kr(1),as("ngIf","forced"===i.cpAlphaChannel),kr(4),as("ngIf","forced"===i.cpAlphaChannel)}}function $R(t,e){if(1&t){var n=ds();ls(0,"input",34),gs("keyup.enter",(function(t){return Qe(n),ks(2).onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks(2).onAlphaInput(t)})),cs()}if(2&t){var i=ks(2);as("rg",1)("value",null==i.hslaText?null:i.hslaText.a)}}function tF(t,e){if(1&t){var n=ds();ls(0,"div",41),ls(1,"div",30),ls(2,"input",31),gs("keyup.enter",(function(t){return Qe(n),ks().onAcceptColor(t)}))("newValue",(function(t){return Qe(n),ks().onValueInput(t)})),cs(),ns(3,$R,1,2,"input",32),cs(),ls(4,"div",30),ls(5,"div"),Gs(6,"V"),cs(),ls(7,"div"),Gs(8,"A"),cs(),cs(),cs()}if(2&t){var i=ks();kr(2),as("rg",100)("value",null==i.hslaText?null:i.hslaText.l),kr(1),as("ngIf","disabled"!==i.cpAlphaChannel)}}function eF(t,e){if(1&t){var n=ds();ls(0,"div",42),ls(1,"span",43),gs("click",(function(){return Qe(n),ks().onFormatToggle(-1)})),cs(),ls(2,"span",43),gs("click",(function(){return Qe(n),ks().onFormatToggle(1)})),cs(),cs()}}function nF(t,e){if(1&t){var n=ds();ls(0,"span",50),gs("click",(function(t){Qe(n);var e=ks().$implicit;return ks(3).onRemovePresetColor(t,e)})),cs()}2&t&&Ms(ks(4).cpRemoveColorButtonClass)}function iF(t,e){if(1&t){var n=ds();ls(0,"div",48),gs("click",(function(){Qe(n);var t=e.$implicit;return ks(3).setColorFromString(t)})),ns(1,nF,1,3,"span",49),cs()}if(2&t){var i=e.$implicit,r=ks(3);Rs("background-color",i),kr(1),as("ngIf",r.cpAddColorButton)}}function rF(t,e){if(1&t&&(ls(0,"div"),ns(1,iF,2,3,"div",47),cs()),2&t){var n=ks(2);Ms(n.cpPresetColorsClass),kr(1),as("ngForOf",n.cpPresetColors)}}function oF(t,e){if(1&t&&(ls(0,"div"),Gs(1),cs()),2&t){var n=ks(2);Ms(n.cpPresetEmptyMessageClass),kr(1),qs(n.cpPresetEmptyMessage)}}function aF(t,e){if(1&t&&(ls(0,"div",44),us(1,"hr"),ls(2,"div",45),Gs(3),cs(),ns(4,rF,2,4,"div",46),ns(5,oF,2,4,"div",46),cs()),2&t){var n=ks();kr(3),qs(n.cpPresetLabel),kr(1),as("ngIf",null==n.cpPresetColors?null:n.cpPresetColors.length),kr(1),as("ngIf",!(null!=n.cpPresetColors&&n.cpPresetColors.length)&&n.cpAddColorButton)}}function sF(t,e){if(1&t){var n=ds();ls(0,"button",53),gs("click",(function(t){return Qe(n),ks(2).onCancelColor(t)})),Gs(1),cs()}if(2&t){var i=ks(2);Ms(i.cpCancelButtonClass),kr(1),qs(i.cpCancelButtonText)}}function lF(t,e){if(1&t){var n=ds();ls(0,"button",53),gs("click",(function(t){return Qe(n),ks(2).onAcceptColor(t)})),Gs(1),cs()}if(2&t){var i=ks(2);Ms(i.cpOKButtonClass),kr(1),qs(i.cpOKButtonText)}}function cF(t,e){if(1&t&&(ls(0,"div",51),ns(1,sF,2,4,"button",52),ns(2,lF,2,4,"button",52),cs()),2&t){var n=ks();kr(1),as("ngIf",n.cpCancelButton),kr(1),as("ngIf",n.cpOKButton)}}var uF,hF,fF,dF,pF,vF,gF,mF=function(t){return t[t.HEX=0]="HEX",t[t.RGBA=1]="RGBA",t[t.HSLA=2]="HSLA",t[t.CMYK=3]="CMYK",t}({}),yF=function t(e,n,i,r){_classCallCheck(this,t),this.r=e,this.g=n,this.b=i,this.a=r},_F=function t(e,n,i,r){_classCallCheck(this,t),this.h=e,this.s=n,this.v=i,this.a=r},bF=function t(e,n,i,r){_classCallCheck(this,t),this.h=e,this.s=n,this.l=i,this.a=r},kF=function t(e,n,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;_classCallCheck(this,t),this.c=e,this.m=n,this.y=i,this.k=r,this.a=o},CF=((hF=function(){function t(){_classCallCheck(this,t),this.newValue=new pc}return _createClass(t,[{key:"inputChange",value:function(t){var e=t.target.value;if(void 0===this.rg)this.newValue.emit(e);else{var n=parseFloat(e);this.newValue.emit({v:n,rg:this.rg})}}}]),t}()).\u0275fac=function(t){return new(t||hF)},hF.\u0275dir=be({type:hF,selectors:[["","text",""]],hostBindings:function(t,e){1&t&&gs("input",(function(t){return e.inputChange(t)}))},inputs:{rg:"rg",text:"text"},outputs:{newValue:"newValue"}}),hF),wF=((uF=function(){function t(e){var n=this;_classCallCheck(this,t),this.elRef=e,this.dragEnd=new pc,this.dragStart=new pc,this.newValue=new pc,this.listenerMove=function(t){return n.move(t)},this.listenerStop=function(){return n.stop()}}return _createClass(t,[{key:"mouseDown",value:function(t){this.start(t)}},{key:"touchStart",value:function(t){this.start(t)}},{key:"move",value:function(t){t.preventDefault(),this.setCursor(t)}},{key:"start",value:function(t){this.setCursor(t),t.stopPropagation(),document.addEventListener("mouseup",this.listenerStop),document.addEventListener("touchend",this.listenerStop),document.addEventListener("mousemove",this.listenerMove),document.addEventListener("touchmove",this.listenerMove),this.dragStart.emit()}},{key:"stop",value:function(){document.removeEventListener("mouseup",this.listenerStop),document.removeEventListener("touchend",this.listenerStop),document.removeEventListener("mousemove",this.listenerMove),document.removeEventListener("touchmove",this.listenerMove),this.dragEnd.emit()}},{key:"getX",value:function(t){var e=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==t.pageX?t.pageX:t.touches[0].pageX)-e.left-window.pageXOffset}},{key:"getY",value:function(t){var e=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==t.pageY?t.pageY:t.touches[0].pageY)-e.top-window.pageYOffset}},{key:"setCursor",value:function(t){var e=this.elRef.nativeElement.offsetWidth,n=this.elRef.nativeElement.offsetHeight,i=Math.max(0,Math.min(this.getX(t),e)),r=Math.max(0,Math.min(this.getY(t),n));void 0!==this.rgX&&void 0!==this.rgY?this.newValue.emit({s:i/e,v:1-r/n,rgX:this.rgX,rgY:this.rgY}):void 0===this.rgX&&void 0!==this.rgY?this.newValue.emit({v:r/n,rgY:this.rgY}):void 0!==this.rgX&&void 0===this.rgY&&this.newValue.emit({v:i/e,rgX:this.rgX})}}]),t}()).\u0275fac=function(t){return new(t||uF)(rs(kl))},uF.\u0275dir=be({type:uF,selectors:[["","slider",""]],hostBindings:function(t,e){1&t&&gs("mousedown",(function(t){return e.mouseDown(t)}))("touchstart",(function(t){return e.touchStart(t)}))},inputs:{rgX:"rgX",rgY:"rgY",slider:"slider"},outputs:{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}}),uF),xF=function t(e,n,i,r){_classCallCheck(this,t),this.h=e,this.s=n,this.v=i,this.a=r},SF=function t(e,n,i,r){_classCallCheck(this,t),this.h=e,this.s=n,this.v=i,this.a=r},EF=((vF=function(){function t(){_classCallCheck(this,t),this.active=null}return _createClass(t,[{key:"setActive",value:function(t){this.active&&this.active!==t&&"inline"!==this.active.cpDialogDisplay&&this.active.closeDialog(),this.active=t}},{key:"hsva2hsla",value:function(t){var e=t.h,n=t.s,i=t.v,r=t.a;if(0===i)return new bF(e,0,0,r);if(0===n&&1===i)return new bF(e,1,1,r);var o=i*(2-n)/2;return new bF(e,i*n/(1-Math.abs(2*o-1)),o,r)}},{key:"hsla2hsva",value:function(t){var e=Math.min(t.h,1),n=Math.min(t.s,1),i=Math.min(t.l,1),r=Math.min(t.a,1);if(0===i)return new _F(e,0,0,r);var o=i+n*(1-Math.abs(2*i-1))/2;return new _F(e,2*(o-i)/o,o,r)}},{key:"hsvaToRgba",value:function(t){var e,n,i,r=t.h,o=t.s,a=t.v,s=t.a,l=Math.floor(6*r),c=6*r-l,u=a*(1-o),h=a*(1-c*o),f=a*(1-(1-c)*o);switch(l%6){case 0:e=a,n=f,i=u;break;case 1:e=h,n=a,i=u;break;case 2:e=u,n=a,i=f;break;case 3:e=u,n=h,i=a;break;case 4:e=f,n=u,i=a;break;case 5:e=a,n=u,i=h;break;default:e=0,n=0,i=0}return new yF(e,n,i,s)}},{key:"cmykToRgb",value:function(t){return new yF((1-t.c)*(1-t.k),(1-t.m)*(1-t.k),(1-t.y)*(1-t.k),t.a)}},{key:"rgbaToCmyk",value:function(t){var e=1-Math.max(t.r,t.g,t.b);return 1===e?new kF(0,0,0,1,t.a):new kF((1-t.r-e)/(1-e),(1-t.g-e)/(1-e),(1-t.b-e)/(1-e),e,t.a)}},{key:"rgbaToHsva",value:function(t){var e,n,i=Math.min(t.r,1),r=Math.min(t.g,1),o=Math.min(t.b,1),a=Math.min(t.a,1),s=Math.max(i,r,o),l=Math.min(i,r,o),c=s,u=s-l;if(n=0===s?0:u/s,s===l)e=0;else{switch(s){case i:e=(r-o)/u+(r<o?6:0);break;case r:e=(o-i)/u+2;break;case o:e=(i-r)/u+4;break;default:e=0}e/=6}return new _F(e,n,c,a)}},{key:"rgbaToHex",value:function(t,e){var n="#"+(1<<24|t.r<<16|t.g<<8|t.b).toString(16).substr(1);return e&&(n+=(256|Math.round(255*t.a)).toString(16).substr(1)),n}},{key:"normalizeCMYK",value:function(t){return new kF(t.c/100,t.m/100,t.y/100,t.k/100,t.a)}},{key:"denormalizeCMYK",value:function(t){return new kF(Math.floor(100*t.c),Math.floor(100*t.m),Math.floor(100*t.y),Math.floor(100*t.k),t.a)}},{key:"denormalizeRGBA",value:function(t){return new yF(Math.round(255*t.r),Math.round(255*t.g),Math.round(255*t.b),t.a)}},{key:"stringToHsva",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=null;t=(t||"").toLowerCase();var i=[{re:/(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return new yF(parseInt(t[2],10)/255,parseInt(t[3],10)/255,parseInt(t[4],10)/255,isNaN(parseFloat(t[5]))?1:parseFloat(t[5]))}},{re:/(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(t){return new bF(parseInt(t[2],10)/360,parseInt(t[3],10)/100,parseInt(t[4],10)/100,isNaN(parseFloat(t[5]))?1:parseFloat(t[5]))}}];for(var r in i.push(e?{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,parse:function(t){return new yF(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,parseInt(t[4]||"FF",16)/255)}}:{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,parse:function(t){return new yF(parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255,1)}}),i.push({re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,parse:function(t){return new yF(parseInt(t[1]+t[1],16)/255,parseInt(t[2]+t[2],16)/255,parseInt(t[3]+t[3],16)/255,1)}}),i)if(i.hasOwnProperty(r)){var o=i[r],a=o.re.exec(t),s=a&&o.parse(a);if(s)return s instanceof yF?n=this.rgbaToHsva(s):s instanceof bF&&(n=this.hsla2hsva(s)),n}return n}},{key:"outputFormat",value:function(t,e,n){switch("auto"===e&&(e=t.a<1?"rgba":"hex"),e){case"hsla":var i=this.hsva2hsla(t),r=new bF(Math.round(360*i.h),Math.round(100*i.s),Math.round(100*i.l),Math.round(100*i.a)/100);return t.a<1||"always"===n?"hsla("+r.h+","+r.s+"%,"+r.l+"%,"+r.a+")":"hsl("+r.h+","+r.s+"%,"+r.l+"%)";case"rgba":var o=this.denormalizeRGBA(this.hsvaToRgba(t));return t.a<1||"always"===n?"rgba("+o.r+","+o.g+","+o.b+","+Math.round(100*o.a)/100+")":"rgb("+o.r+","+o.g+","+o.b+")";default:var a="always"===n||"forced"===n;return this.rgbaToHex(this.denormalizeRGBA(this.hsvaToRgba(t)),a)}}}]),t}()).\u0275fac=function(t){return new(t||vF)},vF.\u0275prov=ft({token:vF,factory:vF.\u0275fac}),vF),TF=((pF=function(){function t(e,n,i){_classCallCheck(this,t),this.elRef=e,this.cdRef=n,this.service=i,this.isIE10=!1,this.dialogArrowSize=10,this.dialogArrowOffset=15,this.dialogInputFields=[mF.HEX,mF.RGBA,mF.HSLA,mF.CMYK],this.useRootViewContainer=!1}return _createClass(t,[{key:"handleEsc",value:function(t){this.show&&"popup"===this.cpDialogDisplay&&this.onCancelColor(t)}},{key:"handleEnter",value:function(t){this.show&&"popup"===this.cpDialogDisplay&&this.onAcceptColor(t)}},{key:"ngOnInit",value:function(){var t=this;this.slider=new xF(0,0,0,0),this.sliderDimMax=new SF(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.format=this.cpCmykEnabled?mF.CMYK:"rgba"===this.cpOutputFormat?mF.RGBA:"hsla"===this.cpOutputFormat?mF.HSLA:mF.HEX,this.listenerMouseDown=function(e){t.onMouseDown(e)},this.listenerResize=function(){t.onResize()},this.openDialog(this.initialColor,!1)}},{key:"ngOnDestroy",value:function(){this.closeDialog()}},{key:"ngAfterViewInit",value:function(){230===this.cpWidth&&"inline"!==this.cpDialogDisplay||(this.sliderDimMax=new SF(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.updateColorPicker(!1),this.cdRef.detectChanges())}},{key:"openDialog",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.service.setActive(this),this.width||(this.cpWidth=this.directiveElementRef.nativeElement.offsetWidth),this.height||(this.height=320),this.setInitialColor(t),this.setColorFromString(t,e),this.openColorPicker()}},{key:"closeDialog",value:function(){this.closeColorPicker()}},{key:"setupDialog",value:function(t,e,n,i,r,o,a,s,l,c,u,h,f,d,p,v,g,m,y,_,b,k,C,w,x,S,E,T,O,A,I,P,D,R,F){this.setInitialColor(n),this.setColorMode(s),this.isIE10=10===function(){var t="";"undefined"!=typeof navigator&&(t=navigator.userAgent.toLowerCase());var e=t.indexOf("msie ");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}(),this.directiveInstance=t,this.directiveElementRef=e,this.cpDisableInput=h,this.cpCmykEnabled=l,this.cpAlphaChannel=c,this.cpOutputFormat=u,this.cpDialogDisplay=o,this.cpIgnoredElements=f,this.cpSaveClickOutside=d,this.cpCloseClickOutside=p,this.useRootViewContainer=v,this.width=this.cpWidth=parseInt(i,10),this.height=this.cpHeight=parseInt(r,10),this.cpPosition=g,this.cpPositionOffset=parseInt(m,10),this.cpOKButton=S,this.cpOKButtonText=T,this.cpOKButtonClass=E,this.cpCancelButton=O,this.cpCancelButtonText=I,this.cpCancelButtonClass=A,this.fallbackColor=a||"#fff",this.setPresetConfig(_,b),this.cpPresetColorsClass=k,this.cpMaxPresetColorsLength=C,this.cpPresetEmptyMessage=w,this.cpPresetEmptyMessageClass=x,this.cpAddColorButton=P,this.cpAddColorButtonText=R,this.cpAddColorButtonClass=D,this.cpRemoveColorButtonClass=F,y||(this.dialogArrowOffset=0),"inline"===o&&(this.dialogArrowSize=0,this.dialogArrowOffset=0),"hex"===u&&"always"!==c&&"forced"!==c&&(this.cpAlphaChannel="disabled")}},{key:"setColorMode",value:function(t){switch(t.toString().toUpperCase()){case"1":case"C":case"COLOR":this.cpColorMode=1;break;case"2":case"G":case"GRAYSCALE":this.cpColorMode=2;break;case"3":case"P":case"PRESETS":this.cpColorMode=3;break;default:this.cpColorMode=1}}},{key:"setInitialColor",value:function(t){this.initialColor=t}},{key:"setPresetConfig",value:function(t,e){this.cpPresetLabel=t,this.cpPresetColors=e}},{key:"setColorFromString",value:function(t){var e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];("always"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel)&&((e=this.service.stringToHsva(t,!0))||this.hsva)||(e=this.service.stringToHsva(t,!1)),e||this.hsva||(e=this.service.stringToHsva(this.fallbackColor,!1)),e&&(this.hsva=e,this.sliderH=this.hsva.h,"hex"===this.cpOutputFormat&&"disabled"===this.cpAlphaChannel&&(this.hsva.a=1),this.updateColorPicker(n,i))}},{key:"onResize",value:function(){"fixed"===this.position?this.setDialogPosition():"inline"!==this.cpDialogDisplay&&this.closeColorPicker()}},{key:"onDragEnd",value:function(t){this.directiveInstance.sliderDragEnd({slider:t,color:this.outputColor})}},{key:"onDragStart",value:function(t){this.directiveInstance.sliderDragStart({slider:t,color:this.outputColor})}},{key:"onMouseDown",value:function(t){!this.show||this.isIE10||"popup"!==this.cpDialogDisplay||t.target===this.directiveElementRef.nativeElement||this.isDescendant(this.elRef.nativeElement,t.target)||this.isDescendant(this.directiveElementRef.nativeElement,t.target)||0!==this.cpIgnoredElements.filter((function(e){return e===t.target})).length||(this.cpSaveClickOutside?this.directiveInstance.colorSelected(this.outputColor):(this.hsva=null,this.setColorFromString(this.initialColor,!1),this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor),this.directiveInstance.colorCanceled()),this.cpCloseClickOutside&&this.closeColorPicker())}},{key:"onAcceptColor",value:function(t){t.stopPropagation(),this.outputColor&&this.directiveInstance.colorSelected(this.outputColor),"popup"===this.cpDialogDisplay&&this.closeColorPicker()}},{key:"onCancelColor",value:function(t){this.hsva=null,t.stopPropagation(),this.directiveInstance.colorCanceled(),this.setColorFromString(this.initialColor,!0),"popup"===this.cpDialogDisplay&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor,!0),this.closeColorPicker())}},{key:"onFormatToggle",value:function(t){var e=this.dialogInputFields.length-(this.cpCmykEnabled?0:1),n=((this.dialogInputFields.indexOf(this.format)+t)%e+e)%e;this.format=this.dialogInputFields[n]}},{key:"onColorChange",value:function(t){this.hsva.s=t.s/t.rgX,this.hsva.v=t.v/t.rgY,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"lightness",value:this.hsva.v,color:this.outputColor}),this.directiveInstance.sliderChanged({slider:"saturation",value:this.hsva.s,color:this.outputColor})}},{key:"onHueChange",value:function(t){this.hsva.h=t.v/t.rgX,this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"hue",value:this.hsva.h,color:this.outputColor})}},{key:"onValueChange",value:function(t){this.hsva.v=t.v/t.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"value",value:this.hsva.v,color:this.outputColor})}},{key:"onAlphaChange",value:function(t){this.hsva.a=t.v/t.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"alpha",value:this.hsva.a,color:this.outputColor})}},{key:"onHexInput",value:function(t){if(null===t)this.updateColorPicker();else{t&&"#"!==t[0]&&(t="#"+t);var e=/^#([a-f0-9]{3}|[a-f0-9]{6})$/gi;"always"===this.cpAlphaChannel&&(e=/^#([a-f0-9]{3}|[a-f0-9]{6}|[a-f0-9]{8})$/gi);var n=e.test(t);n&&(t.length<5&&(t="#"+t.substring(1).split("").map((function(t){return t+t})).join("")),"forced"===this.cpAlphaChannel&&(t+=Math.round(255*this.hsva.a).toString(16)),this.setColorFromString(t,!0,!1)),this.directiveInstance.inputChanged({input:"hex",valid:n,value:t,color:this.outputColor})}}},{key:"onRedInput",value:function(t){var e=this.service.hsvaToRgba(this.hsva),n=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;n&&(e.r=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"red",valid:n,value:e.r,color:this.outputColor})}},{key:"onBlueInput",value:function(t){var e=this.service.hsvaToRgba(this.hsva),n=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;n&&(e.b=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"blue",valid:n,value:e.b,color:this.outputColor})}},{key:"onGreenInput",value:function(t){var e=this.service.hsvaToRgba(this.hsva),n=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;n&&(e.g=t.v/t.rg,this.hsva=this.service.rgbaToHsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"green",valid:n,value:e.g,color:this.outputColor})}},{key:"onHueInput",value:function(t){var e=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;e&&(this.hsva.h=t.v/t.rg,this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"hue",valid:e,value:this.hsva.h,color:this.outputColor})}},{key:"onValueInput",value:function(t){var e=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;e&&(this.hsva.v=t.v/t.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"value",valid:e,value:this.hsva.v,color:this.outputColor})}},{key:"onAlphaInput",value:function(t){var e=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;e&&(this.hsva.a=t.v/t.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"alpha",valid:e,value:this.hsva.a,color:this.outputColor})}},{key:"onLightnessInput",value:function(t){var e=this.service.hsva2hsla(this.hsva),n=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;n&&(e.l=t.v/t.rg,this.hsva=this.service.hsla2hsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"lightness",valid:n,value:e.l,color:this.outputColor})}},{key:"onSaturationInput",value:function(t){var e=this.service.hsva2hsla(this.hsva),n=!isNaN(t.v)&&t.v>=0&&t.v<=t.rg;n&&(e.s=t.v/t.rg,this.hsva=this.service.hsla2hsva(e),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"saturation",valid:n,value:e.s,color:this.outputColor})}},{key:"onCyanInput",value:function(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.c=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"cyan",valid:!0,value:this.cmyk.c,color:this.outputColor})}},{key:"onMagentaInput",value:function(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.m=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"magenta",valid:!0,value:this.cmyk.m,color:this.outputColor})}},{key:"onYellowInput",value:function(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.y=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"yellow",valid:!0,value:this.cmyk.y,color:this.outputColor})}},{key:"onBlackInput",value:function(t){!isNaN(t.v)&&t.v>=0&&t.v<=t.rg&&(this.cmyk.k=t.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"black",valid:!0,value:this.cmyk.k,color:this.outputColor})}},{key:"onAddPresetColor",value:function(t,e){t.stopPropagation(),this.cpPresetColors.filter((function(t){return t===e})).length||(this.cpPresetColors=this.cpPresetColors.concat(e),this.directiveInstance.presetColorsChanged(this.cpPresetColors))}},{key:"onRemovePresetColor",value:function(t,e){t.stopPropagation(),this.cpPresetColors=this.cpPresetColors.filter((function(t){return t!==e})),this.directiveInstance.presetColorsChanged(this.cpPresetColors)}},{key:"openColorPicker",value:function(){var t=this;this.show||(this.show=!0,this.hidden=!0,setTimeout((function(){t.hidden=!1,t.setDialogPosition(),t.cdRef.detectChanges()}),0),this.directiveInstance.stateChanged(!0),this.isIE10||(document.addEventListener("mousedown",this.listenerMouseDown),document.addEventListener("touchstart",this.listenerMouseDown)),window.addEventListener("resize",this.listenerResize))}},{key:"closeColorPicker",value:function(){this.show&&(this.show=!1,this.directiveInstance.stateChanged(!1),this.isIE10||(document.removeEventListener("mousedown",this.listenerMouseDown),document.removeEventListener("touchstart",this.listenerMouseDown)),window.removeEventListener("resize",this.listenerResize),this.cdRef.destroyed||this.cdRef.detectChanges())}},{key:"updateColorPicker",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.sliderDimMax){var i,r,o;2===this.cpColorMode&&(this.hsva.s=0);var a=this.outputColor;if(r=this.service.hsva2hsla(this.hsva),this.cpCmykEnabled?(n?(o=this.service.cmykToRgb(this.service.normalizeCMYK(this.cmyk)),this.hsva=this.service.rgbaToHsva(o)):(o=this.service.hsvaToRgba(this.hsva),this.cmyk=this.service.denormalizeCMYK(this.service.rgbaToCmyk(o))),o=this.service.denormalizeRGBA(o),this.sliderH=this.hsva.h):o=this.service.denormalizeRGBA(this.service.hsvaToRgba(this.hsva)),i=this.service.denormalizeRGBA(this.service.hsvaToRgba(new _F(this.sliderH||this.hsva.h,1,1,1))),e&&(this.hslaText=new bF(Math.round(360*r.h),Math.round(100*r.s),Math.round(100*r.l),Math.round(100*r.a)/100),this.rgbaText=new yF(o.r,o.g,o.b,Math.round(100*o.a)/100),this.cpCmykEnabled&&(this.cmykText=new kF(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k,Math.round(100*this.cmyk.a)/100)),this.hexText=this.service.rgbaToHex(o,"always"===this.cpAlphaChannel),this.hexAlpha=this.rgbaText.a),"auto"===this.cpOutputFormat&&this.format!==mF.RGBA&&this.format!==mF.CMYK&&this.hsva.a<1&&(this.format=this.hsva.a<1?mF.RGBA:mF.HEX),this.hueSliderColor="rgb("+i.r+","+i.g+","+i.b+")",this.alphaSliderColor="rgb("+o.r+","+o.g+","+o.b+")",this.outputColor=this.service.outputFormat(this.hsva,this.cpOutputFormat,this.cpAlphaChannel),this.selectedColor=this.service.outputFormat(this.hsva,"rgba",null),this.format!==mF.CMYK)this.cmykColor="";else if("always"===this.cpAlphaChannel||"enabled"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel){var s=Math.round(100*this.cmyk.a)/100;this.cmykColor="cmyka(".concat(this.cmyk.c,",").concat(this.cmyk.m,",").concat(this.cmyk.y,",").concat(this.cmyk.k,",").concat(s,")")}else this.cmykColor="cmyk(".concat(this.cmyk.c,",").concat(this.cmyk.m,",").concat(this.cmyk.y,",").concat(this.cmyk.k,")");this.slider=new xF((this.sliderH||this.hsva.h)*this.sliderDimMax.h-8,this.hsva.s*this.sliderDimMax.s-8,(1-this.hsva.v)*this.sliderDimMax.v-8,this.hsva.a*this.sliderDimMax.a-8),t&&a!==this.outputColor&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.outputColor))}}},{key:"setDialogPosition",value:function(){if("inline"===this.cpDialogDisplay)this.position="relative";else{for(var t,e="static",n="",i=null,r=null,o=this.directiveElementRef.nativeElement.parentNode,a=this.dialogElement.nativeElement.offsetHeight;null!==o&&"HTML"!==o.tagName;){if("static"!==(e=(t=window.getComputedStyle(o)).getPropertyValue("position"))&&null===i&&(i=o),(n=t.getPropertyValue("transform"))&&"none"!==n&&null===r&&(r=o),"fixed"===e){i=r;break}o=o.parentNode}var s=this.createDialogBox(this.directiveElementRef.nativeElement,"fixed"!==e);if(this.useRootViewContainer||"fixed"===e&&(!i||i instanceof HTMLUnknownElement))this.top=s.top,this.left=s.left;else{null===i&&(i=o);var l=this.createDialogBox(i,"fixed"!==e);this.top=s.top-l.top,this.left=s.left-l.left}"fixed"===e&&(this.position="fixed");var c=this.cpPosition;if("auto"===this.cpPosition){var u="right",h="bottom",f=Math.max(document.documentElement.clientWidth,window.innerWidth||0),d=Math.max(document.documentElement.clientHeight,window.innerHeight||0);this.left+this.cpWidth>f&&(u="left"),this.top+a>d&&(h="top"),c=u+"-"+h}this.cpUsePosition=c,"top"===c?(this.arrowTop=a-1,this.top-=a+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*s.width-this.dialogArrowOffset):"bottom"===c?(this.top+=s.height+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*s.width-this.dialogArrowOffset):"top-left"===c||"left-top"===c?(this.top-=a-s.height+s.height*this.cpPositionOffset/100,this.left-=this.cpWidth+this.dialogArrowSize-2-this.dialogArrowOffset):"top-right"===c||"right-top"===c?(this.top-=a-s.height+s.height*this.cpPositionOffset/100,this.left+=s.width+this.dialogArrowSize-2-this.dialogArrowOffset):"left"===c||"bottom-left"===c||"left-bottom"===c?(this.top+=s.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left-=this.cpWidth+this.dialogArrowSize-2):(this.top+=s.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left+=s.width+this.dialogArrowSize-2)}}},{key:"isDescendant",value:function(t,e){for(var n=e.parentNode;null!==n;){if(n===t)return!0;n=n.parentNode}return!1}},{key:"createDialogBox",value:function(t,e){return{top:t.getBoundingClientRect().top+(e?window.pageYOffset:0),left:t.getBoundingClientRect().left+(e?window.pageXOffset:0),width:t.offsetWidth,height:t.offsetHeight}}}]),t}()).\u0275fac=function(t){return new(t||pF)(rs(kl),rs(Zo),rs(EF))},pF.\u0275cmp=pe({type:pF,selectors:[["color-picker"]],viewQuery:function(t,e){var n;1&t&&(Ec(FR,!0),Ec(MR,!0),Ec(jR,!0)),2&t&&(Sc(n=Dc())&&(e.dialogElement=n.first),Sc(n=Dc())&&(e.hueSlider=n.first),Sc(n=Dc())&&(e.alphaSlider=n.first))},hostBindings:function(t,e){1&t&&gs("keyup.esc",(function(t){return e.handleEsc(t)}),!1,Yn)("keyup.enter",(function(t){return e.handleEnter(t)}),!1,Yn)},decls:28,vars:47,consts:[[1,"color-picker",3,"click"],["dialogPopup",""],[3,"class","top",4,"ngIf"],["class","saturation-lightness",3,"slider","rgX","rgY","background-color","newValue","dragStart","dragEnd",4,"ngIf"],[1,"hue-alpha","box"],[1,"left"],[1,"selected-color-background"],[1,"selected-color"],["type","button",3,"class","disabled","click",4,"ngIf"],[1,"right"],["style","height: 16px;",4,"ngIf"],[1,"hue",3,"slider","rgX","newValue","dragStart","dragEnd"],["hueSlider",""],[1,"cursor"],[1,"value",3,"slider","rgX","newValue","dragStart","dragEnd"],["valueSlider",""],[1,"alpha",3,"slider","rgX","newValue","dragStart","dragEnd"],["alphaSlider",""],["class","cmyk-text",3,"display",4,"ngIf"],["class","hsla-text",3,"display",4,"ngIf"],["class","rgba-text",3,"display",4,"ngIf"],["class","hex-text",3,"hex-alpha","display",4,"ngIf"],["class","value-text",4,"ngIf"],["class","type-policy",4,"ngIf"],["class","preset-area",4,"ngIf"],["class","button-area",4,"ngIf"],[1,"saturation-lightness",3,"slider","rgX","rgY","newValue","dragStart","dragEnd"],["type","button",3,"disabled","click"],[2,"height","16px"],[1,"cmyk-text"],[1,"box"],["type","number","pattern","[0-9]*","min","0","max","100",3,"text","rg","value","keyup.enter","newValue"],["type","number","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1","step","0.1",3,"text","rg","value","keyup.enter","newValue",4,"ngIf"],[4,"ngIf"],["type","number","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1","step","0.1",3,"text","rg","value","keyup.enter","newValue"],[1,"hsla-text"],["type","number","pattern","[0-9]*","min","0","max","360",3,"text","rg","value","keyup.enter","newValue"],[1,"rgba-text"],["type","number","pattern","[0-9]*","min","0","max","255",3,"text","rg","value","keyup.enter","newValue"],[1,"hex-text"],[3,"text","value","blur","keyup.enter","newValue"],[1,"value-text"],[1,"type-policy"],[1,"type-policy-arrow",3,"click"],[1,"preset-area"],[1,"preset-label"],[3,"class",4,"ngIf"],["class","preset-color",3,"backgroundColor","click",4,"ngFor","ngForOf"],[1,"preset-color",3,"click"],[3,"class","click",4,"ngIf"],[3,"click"],[1,"button-area"],["type","button",3,"class","click",4,"ngIf"],["type","button",3,"click"]],template:function(t,e){1&t&&(ls(0,"div",0,1),gs("click",(function(t){return t.stopPropagation()})),ns(2,LR,1,5,"div",2),ns(3,NR,2,8,"div",3),ls(4,"div",4),ls(5,"div",5),us(6,"div",6),us(7,"div",7),ns(8,BR,2,5,"button",8),cs(),ls(9,"div",9),ns(10,zR,1,0,"div",10),ls(11,"div",11,12),gs("newValue",(function(t){return e.onHueChange(t)}))("dragStart",(function(){return e.onDragStart("hue")}))("dragEnd",(function(){return e.onDragEnd("hue")})),us(13,"div",13),cs(),ls(14,"div",14,15),gs("newValue",(function(t){return e.onValueChange(t)}))("dragStart",(function(){return e.onDragStart("value")}))("dragEnd",(function(){return e.onDragEnd("value")})),us(16,"div",13),cs(),ls(17,"div",16,17),gs("newValue",(function(t){return e.onAlphaChange(t)}))("dragStart",(function(){return e.onDragStart("alpha")}))("dragEnd",(function(){return e.onDragEnd("alpha")})),us(19,"div",13),cs(),cs(),cs(),ns(20,WR,17,12,"div",18),ns(21,XR,14,10,"div",19),ns(22,KR,14,10,"div",20),ns(23,JR,8,7,"div",21),ns(24,tF,9,3,"div",22),ns(25,eF,3,0,"div",23),ns(26,aF,6,3,"div",24),ns(27,cF,3,2,"div",25),cs()),2&t&&(Rs("display",e.show?"block":"none")("visibility",e.hidden?"hidden":"visible")("top",e.top,"px")("left",e.left,"px")("position",e.position)("height",e.cpHeight,"px")("width",e.cpWidth,"px"),Fs("open",e.show),kr(2),as("ngIf","popup"==e.cpDialogDisplay),kr(1),as("ngIf",1===(e.cpColorMode||1)),kr(4),Rs("background-color",e.selectedColor),kr(1),as("ngIf",e.cpAddColorButton),kr(2),as("ngIf","disabled"===e.cpAlphaChannel),kr(1),Rs("display",1===(e.cpColorMode||1)?"block":"none"),as("rgX",1),kr(2),Rs("left",null==e.slider?null:e.slider.h,"px"),kr(1),Rs("display",2===(e.cpColorMode||1)?"block":"none"),as("rgX",1),kr(2),Rs("right",null==e.slider?null:e.slider.v,"px"),kr(1),Rs("display","disabled"===e.cpAlphaChannel?"none":"block")("background-color",e.alphaSliderColor),as("rgX",1),kr(2),Rs("left",null==e.slider?null:e.slider.a,"px"),kr(1),as("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),kr(1),as("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),kr(1),as("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),kr(1),as("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),kr(1),as("ngIf",!e.cpDisableInput&&2===(e.cpColorMode||1)),kr(1),as("ngIf",!e.cpDisableInput&&1===(e.cpColorMode||1)),kr(1),as("ngIf",(null==e.cpPresetColors?null:e.cpPresetColors.length)||e.cpAddColorButton),kr(1),as("ngIf",e.cpOKButton||e.cpCancelButton))},directives:[uf,wF,CF,lf],styles:[".color-picker{position:absolute;z-index:1000;width:230px;height:auto;border:1px solid #777;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:-moz-submit-invalid,.color-picker input:-moz-ui-invalid,.color-picker input:invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .arrow{position:absolute;z-index:999999;width:0;height:0;border-style:solid}.color-picker .arrow.arrow-top{left:8px;border-width:10px 5px;border-color:#777 transparent transparent}.color-picker .arrow.arrow-bottom{top:-20px;left:8px;border-width:10px 5px;border-color:transparent transparent #777}.color-picker .arrow.arrow-left-top,.color-picker .arrow.arrow-top-left{right:-21px;bottom:8px;border-width:5px 10px;border-color:transparent transparent transparent #777}.color-picker .arrow.arrow-right-top,.color-picker .arrow.arrow-top-right{bottom:8px;left:-20px;border-width:5px 10px;border-color:transparent #777 transparent transparent}.color-picker .arrow.arrow-bottom-left,.color-picker .arrow.arrow-left,.color-picker .arrow.arrow-left-bottom{top:8px;right:-21px;border-width:5px 10px;border-color:transparent transparent transparent #777}.color-picker .arrow.arrow-bottom-right,.color-picker .arrow.arrow-right,.color-picker .arrow.arrow-right-bottom{top:8px;left:-20px;border-width:5px 10px;border-color:transparent #777 transparent transparent}.color-picker .cursor{position:relative;width:16px;height:16px;border:2px solid #222;border-radius:50%;cursor:default}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;padding:12px 8px}.color-picker .button-area{padding:0 16px 16px;text-align:right}.color-picker .button-area button{margin-left:8px}.color-picker .preset-area{padding:4px 15px}.color-picker .preset-area .preset-label{overflow:hidden;width:100%;padding:4px;font-size:11px;white-space:nowrap;text-align:left;text-overflow:ellipsis;color:#555}.color-picker .preset-area .preset-color{position:relative;display:inline-block;width:18px;height:18px;margin:4px 6px 8px;border:1px solid #a9a9a9;border-radius:25%;cursor:pointer}.color-picker .preset-area .preset-empty-message{min-height:18px;margin-top:4px;margin-bottom:8px;font-style:italic;text-align:center}.color-picker .hex-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .hex-text .box{padding:0 24px 8px 8px}.color-picker .hex-text .box div{float:left;flex:1 1 auto;text-align:center;color:#555;clear:left}.color-picker .hex-text .box input{flex:1 1 auto;padding:1px;border:1px solid #a9a9a9}.color-picker .hex-alpha .box div:first-child,.color-picker .hex-alpha .box input:first-child{flex-grow:3;margin-right:8px}.color-picker .cmyk-text,.color-picker .hsla-text,.color-picker .rgba-text,.color-picker .value-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .cmyk-text .box,.color-picker .hsla-text .box,.color-picker .rgba-text .box{padding:0 24px 8px 8px}.color-picker .value-text .box{padding:0 8px 8px}.color-picker .cmyk-text .box div,.color-picker .hsla-text .box div,.color-picker .rgba-text .box div,.color-picker .value-text .box div{flex:1 1 auto;margin-right:8px;text-align:center;color:#555}.color-picker .cmyk-text .box div:last-child,.color-picker .hsla-text .box div:last-child,.color-picker .rgba-text .box div:last-child,.color-picker .value-text .box div:last-child{margin-right:0}.color-picker .cmyk-text .box input,.color-picker .hsla-text .box input,.color-picker .rgba-text .box input,.color-picker .value-text .box input{float:left;flex:1;padding:1px;margin:0 8px 0 0;border:1px solid #a9a9a9}.color-picker .cmyk-text .box input:last-child,.color-picker .hsla-text .box input:last-child,.color-picker .rgba-text .box input:last-child,.color-picker .value-text .box input:last-child{margin-right:0}.color-picker .hue-alpha{align-items:center;margin-bottom:3px}.color-picker .hue{direction:ltr;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC)}.color-picker .value{direction:rtl;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAACTklEQVR42u3SYUcrABhA4U2SkmRJMmWSJklKJiWZZpKUJJskKUmaTFImKZOUzMySpGRmliRNJilJSpKSJEtmSpIpmWmSdO736/6D+x7OP3gUCoWCv1cqlSQlJZGcnExKSgqpqamkpaWRnp5ORkYGmZmZqFQqsrKyyM7OJicnh9zcXNRqNXl5eeTn56PRaCgoKKCwsJCioiK0Wi3FxcWUlJRQWlpKWVkZ5eXlVFRUUFlZiU6no6qqiurqampqaqitraWurg69Xk99fT0GgwGj0UhDQwONjY00NTXR3NxMS0sLra2ttLW10d7ejslkwmw209HRQWdnJ11dXXR3d9PT00Nvby99fX309/czMDDA4OAgFouFoaEhrFYrw8PDjIyMMDo6ytjYGDabjfHxcSYmJpicnGRqagq73c709DQzMzPMzs4yNzfH/Pw8DocDp9OJy+XC7XazsLDA4uIiS0tLLC8vs7KywurqKmtra3g8HrxeLz6fD7/fz/r6OhsbG2xubrK1tcX29jaBQICdnR2CwSC7u7vs7e2xv7/PwcEBh4eHHB0dcXx8zMnJCaenp5ydnXF+fs7FxQWXl5dcXV1xfX3Nzc0Nt7e33N3dEQqFuL+/5+HhgXA4TCQS4fHxkaenJ56fn3l5eeH19ZVoNMrb2xvv7+98fHwQi8WIx+N8fn6SSCT4+vri+/ubn58ffn9/+VcKgSWwBJbAElgCS2AJLIElsASWwBJYAktgCSyBJbAElsASWAJLYAksgSWwBJbAElgCS2AJLIElsP4/WH8AmJ5Z6jHS4h8AAAAASUVORK5CYII=)}.color-picker .alpha{direction:ltr;width:100%;height:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==)}.color-picker .type-policy{position:absolute;top:218px;right:12px;width:16px;height:24px;background-size:8px 16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-position:center}.color-picker .type-policy .type-policy-arrow{display:block;width:100%;height:50%}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;border:1px solid #a9a9a9;border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC)}.color-picker .saturation-lightness{direction:ltr;width:100%;height:130px;border:none;cursor:pointer;touch-action:manipulation;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOYAAACCCAYAAABSD7T3AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwksPWR6lgAAIABJREFUeNrtnVuT47gRrAHN+P//Or/61Y5wONZ7mZ1u3XAeLMjJZGZVgdKsfc5xR3S0RIIUW+CHzCpc2McYo7XGv3ex7UiZd57rjyzzv+v+33X/R/+3r/f7vR386Y+TvKNcf/wdhTLPcv9qU2wZd74uth0t1821jkIZLPcsI/6nWa4XvutquU0Z85mnx80S/ZzgpnLnOtHNt7/ofx1TKXcSNzN/7qbMQ3ju7rNQmMYYd/4s2j9aa+P+gGaMcZrb1M/tdrvf7/d2v99P9/t93O/3cbvdxu12G9frdVwul3E+n8c///nP+2+//Xb66aefxl//+tfx5z//2YK5Al2rgvf4UsbpdGrB52bAvArXpuzjmiqAVSGz5eDmGYXzhbAZmCrnmzddpUU+8Y1dAOYeXCtDUwVwV7YCGH6uAmyMcZ9l5vkUaBPGMUZ7/J5w/792/fvv9Xq93263dr/fTxPECeME8nK5jM/Pz/HTTz/dv337dvrll1/GP/7xj/G3v/1t/OUvfwkVswongjdOp9PzH3U3D3zmWGnZVXn4jCqs7wC2BKP4/8tAzkZsoWx6XrqeHZymvp4ABCBJhTQwKfDT8gzrZCIqi5AhiACjBfEB2rP8/X63MM7f6/V6v9/v7Xa7bYC83W7jcrlsVHIq5ffv30+//fbb+OWXX8ZPP/00/v73v4+ff/75JSvbeu+bL2WMMaFbAlpBNM85QX+ct6qoSqkPAwuQlBVKqGNFSUOAA3Bmu7gC5hNOd15nSwvAOUW7C4giUCV8Sgn5L9hNFIqTsp0GxI0ysioyjAjkY/tGJVEpz+fz+OWXX+7fv38//f777+Pbt2/j119/HT///PP49ddfx8fHRwrmTjV779EXu2px2xhjwtdJZQcAWQIPLPISsMJaSwiD8gzIKrwSyATE5j5nAbR5c1dBUwBlsEWW0h6LqiYsqFPAQxCyRZ3wOSARxmlXMX5k64pQfvv27f75+dk+Pj5OHx8f4/v37+Pbt2/jt99+G9++fRsfHx/jcrmUFLO31gYDWblxRIs/TqfT7ousxJsAxXA2Gc7TA9XdgfdoHbFsj76X2+1WArgI1ageGwA3qupqoHsmcbI6Fu93quggFa9d7LeDtgKfAFHBJ+NEByIkcJ5KervdTmhhGcgJJSZ5vn//fj+fz+18Pp8+Pz/H5+fnmGD+/vvv4/v37+Pj42N8fn6O2+1Ws7JjjP6wraMI5E4RZ8x2vV5TSwkquotV7/d7Tz6HFWsD/qNcdw0CQ3q/321c686TwDVIdbuy73zNldhSHb8I2klZznm+InBS4U6n0302aBFsLhHDAKJVJVglfI9jhvu53W53sLANYNxAiDA6MCeUHx8f9+v12i6XS7tcLqcZW57P5yeY8/fz83Ocz+fnsSmYUyknWEG85WBst9stzSLyMdfr9Qi08iY15UZ0LlDGLhR3o5zK2j7OPUTD0E+nU3tk7Xb/16NFbhloAMuY1zjLUOO3BKeIDe+Z8s3/J4gFo4TM5jPmuRg28foUKKVSwo16TgA5npywcWLHgYl/Pz8/73/605/ab7/91m63W7tcLie0sZj4mao5gTyfz88E0f1+j8EcYzwTPEG2cqjyfHNF0M8fuqEiaOVnRzZZQNh5fwQyHg/HDGfJo89Q1zb/quu5XC6773I2XKfTqd/v9+d3wuqWva/YTdUdEV3fhIv/Viyps6YE3x3r43K5bJQS66zaxVGFsvd+//j4aF+/fm3fv39vt9utff36tf3+++/tdrudvn37ZuNLBaaCMgUzC+rZRiFowxUuJI8YMqcCp9Opq5vagaYU6lGJA1XQqejchw6Cj0Gw5nYBrGw01A2O206n04BGouNNyTfp/FwElhUey6nXrIKw7QQWddxuN2ldL5fL839gSPF8ahu/JvBO48CPSuqMf8Vp9/P53L58+dLu93s7n8/tfr8/39/v9/b5+TkhPJ3P56mQ436/j+/fv+/iSgbzer0+AZx/5+88bv6OMda6S5z6kd21fYC9dxv7cIJJ2d9AOS30fPMzyHiTM8B4DF6XUlYHp4KQW3W+1t77MNB1vGHxWq7Xa7vf78+y5/N5A+H1et29xuP5dbYtyaRu4AksbPq6936fjRzXRxBbPr/b+b18+fKljTHaBBBfn8/n0/1+H1++fBnn8zm0sB8fH5u4cr5GuBhMVk0EEn9RsctgVhM+ixlJtMA23R8B6yysAstBOgFXIKKCMIgToMqNEu2fYMH7ztc732dQKkCj1ytAZtY0Kx8pIr8GGJ+AT3V+2Hirhl++fBmXy2Wz73w+b17P8p+fn8/tUwGVleVkTyUb68DkfayWY4zxNRihU4EpLJPZVrK+u7J4/mgfKqeLW9X2REWlItL1diynbDDb3+jXgYjQqn0rrxWc+NkILP7F7xIbMvx7vV53x40xnlbWJF12ZSag/N0pW6t+ZzmOMzHjajKwDfond78zYTdfq18up97zr2q8v3IioBprRtBl0EZ9og5WBRGOdOHjIjXF7UotFbgOWnXzIJyzYvjG5IYgsmMOxHkz8OsMSrVNWeq5T8DaOcbEv1Od5rbs9aO7YvMet63EkF++fMExq+MRl4/L5bLZN/+ez+fnZ6KazuMqXSQVO5spJXflHAIzes/xJseckRJiDMog9d6VfRrqXMr6KpVV27jRwJacGovOAM1zMdQMnwK1AubK63kdCChvI1C7g0z9nf/D+Xze2Vj8H7Gx4P9duQlsYCrqyN8XqG3Hm/10Oj3jw/n+crlstuM+jPmmxT2dTuPz83Pzt2pn1XsEHX/bnPaVqVmh0xwOt0o6XLLAHePUU203wHfcrspCwmV3TryB5s0Mseeg97x/BwzCjBlbB+pRAPla0BVQuT6V6QHdBlj3d0KG147b+DqxQeUymDO43W4dQar+TIjwmAd0z8/h65vf0/yLv3Pb5XLpru/ydDo9s7ET0I+Pj6dKK9VUEIeKWQWPAOrJ8LKd4vE+t91Y3e7UFlWatg2VwJnb+HPmtvm/sfK59/OaWF3x/eP1UPHvA5DDYDpYXfb0drv1V2DkBkxtw/tEWVVlXWdC9pFYs5/jfh9dS/16vW7s6lTG+TfqsxSJHxkXXq/Xdr1eu4LsfD6P3vsT3N77DkL+zPm5jSdKL4zR3AxQd6rHkLkYlSowsrq7znzu6wSwdsMJOXmA5fBcjxtgMGBYHlr5zokhtsMCTgXLQOW4XC6dEyEMprL8mAQzXRgduix2yZzorxkYsDn3hB1VeMLGsXsVtgl2pW8S3svk0vw7R4hNaHvv4cACl5HFzwIH0Kc6zu4XjDPR/jpAVxWzO1Xk2DDb3vTcxeGU1iWZHkmIDWziWKvirCJ4Dravs6IJ/GG6cTqWdXDy+fArQDVVkLqkVjAoZIITdmmIqXwqa95N3+MGYoZQdRVNO53Y1xRkhO16vY7eu507Ca9lJnbGpxOemQhSw/AQsmmp5zU9BiU8G6wvX76M6/U6Pj4+do0Bz4CpgiknTUeDqwlKBmg3u4OVjrZ1A+rAcgaejWq6eJCvCYFDONSwOgHX4EQRw8lxbzDOdEK6gZ3Hk1b+8g2o1JFtKXyv/fEdTXuWjWXdAZiBp6ADeDrCFiim7B6ZFneeI7Gvm/PMkUDX67W7xI8b0D7/v8dA9qfN5oaCf74WZjH0mf1cmfY1Y0JUFmVrTWu8uzkNcLtEj7u5FXBTkfC6GOA5q8YMxO8KVvF6sAVGdcrUbsKODcQKkLMOMdmlxum642YrPm26AlhZW1YB1R+rrGswE8TaYAWeUMxdf+WjwSvZ2Ef3ytOyfn5+PpVPAaqOn43MtNBqvmjjxbjM4lZjZY4gqNMI5ktaW/sYKNwS+9lFQzGihmMCKPa7+Z0V6Eb0GRmobtpX8JljWu5FMLN5ja6hG9kwQgZqf5+1NH5UxzkFReCdWhJ8XdlGUkxO7HRlYRm4mVO43W7ter12TPJEw/rmEN3L5SKHIWZg9mz+pUoKOYq5bJTJdX2gme1UcxMZQFaEQIlHct32M+Y1BzGkGuzfiyAN9z+ugplZ1symCrDCYYkGxDTpI9RzBy0rHyeDUC1nWaeUaD9n4xkNyYMBDZtzZ3B++fJlY21XFDOcARJlabOyiS3uCpLI9jrZjCDkaVvcCCjwognKShWdzXZWlZMvVTgD8LpqlCLrqgbcB+qYwrgKYpT0ccCqbKyCValkEabn/FynogCrPKfqf51xJ7sGB2ZXcZmxoSOztjx300DZi7a0/2AIR0UlBag9SuDw6KcAzlaB7vHZvWpjK90dyrq6bKyDUZQbR0B05biLQkHIcSUmgIK+SwuqgHCnoio2RQU1yj+BnBy9pphVKLGyC7ZzFK1pxWK+E8IhVCWLN/uLtnUU4ayoYLoaANz8FdtaSvY4pV0BEW2ls61czqllBKpTyKgMAhrZ1cdc1RROtPmvWNkdcKZ7ZKxaWjiPLJMpp7OZKxA+rqG/oJLjxf0pnJlqLoDZo3gyU0mKGys2taKecj/d1C+rJSplBqlTyAqgR+D8KjKlmRL2gtUcAdCtsL+ijCNT1oqqqkH2OHEbG5sDFnUg5Aa+yLou2VU1ptj1S2ZQqv1ORZN9IWzRfgaRBxKoBE8UWyqlJFtrIc0AxNjSjed99CTY/XDfSzCz5M0IZoVEsWnPFNTsl8ooVC1TzbGgqFZNDSgVwKK+1sGDMKqxZCWGVMDysiEr1jVSQJUYwj5iHOlThdHt44SQg9CN+nl8D90NMIgAdgr46JqRiR9I8vRdFvbr17m/yxUMKjNLMiVUADwu2CWGhhi+F55TWM9M9cogzms1dnM4uOF/LAEYWdcqnM7yFmyq3IfwmOROd7Y1iFWtOjoY8To41mTV5IysgFFuRzsbWFGbNIIJCDv1dOo4lZG7jWBwRFtVTKuWyeCByJKOan8oZ3ep9XddNl0tDuaywLz9cXPYeDAA0SpkBO9sbVcTOVWldPv4uyzEkzxHtjvonHoSkFEWNoo1d8DhcQputd2ppNon4BzoAiJ1hBFQg0dVtdbGHHDQWushmNEQukLM2QO1G2Y8bgTXqFhcBJj7EjPgcPts8US8qPpPB/dXznOh5Z438tzH5ec6QgrOKrRRfKmysBmUDB+PhYabMlVPER+GCSITTzr7am2tArH3bgcEzPJm+cr5jJ4NnHNFDVrFXcI5Le9k5Jnw+bedbV+FfRzZIHaOOaOsLY0/7UGs58DjrGwKMIMFIGzOEW1/jGsdAtCN6hEAI4hBe9YXeRROBSVPAVPAqvIM5bx5hVKWAMP6zBRy3iescridVdFBinBxXDnG2GRY2XbCvp1lhvGtO9Bxu5h908XQu42lnSArMFdizMim8uwRCxPGnnOS8lwpnbOiDqTAjsrRN/PcoAScCbaACqVM40ylnjjTBs+bwWlAG23/UKbdkiwKWIQPGzWaczpoSlxPEj822cNWkpS7FyzsDrqpfgpG3jahw2vgbaSQAxuLWZYt7JzyNe8JoZpNAcvDFOdw0wqYT9AK1rZz/DdbSlLPp0ryIxgQJlK9AZlEq7IOXpohg9PIhrCng88JsOxiV4ZWAYfg4sikx/8ky2Z9l862uqwrfscIH8+ugTmVGyiddeVYUgEMn4GZzg14EwIsh9sx2cKKiWXReuOE5gzGOQgdlRKVVdlevqb279Xq0Qnsts2VDaBO0coezsruWtHApu6sKG4IBhN0aGU2kLrMKGRTN3HmbCDwKV14zvkMEDG4QfZVspVlaNU2mhc5TEZ3N1h/zqTheuLpW05ZWTGVjb3dbnNmxKZBnN8JqidaVLKAOyARNLS+MB54Z2+VaqoMLKroVBlngefnTPAcoHNWCSvlfA8CI0HEmBNBnBlXyMrzU7A7WVm94PPqQ2gmqKx+WDGsnvilmcSOBJqOK1nYyAIzuAyesq3UdSK3KfWcYKD95HmfYOU3qser2CtYEUA+FpfqdNvgPBZUBhDrGONRVlQsh8rLcaUCykHG0OOUwTlLBrsh5soEMGezi1E4HRVt1icp5wZEFXdibCkG8Y8vX75sbO4E0iom9z+hjSiOfy3DhpXItpVhE+UGQdvoWjtChmrGHf4YAzKgBNnGtuJxFCeGdhUAfQLLK8kBYAP6gvFJZajMG3Xkycy8KuC0q4Eyymwtwdxdv2M0mIBtK0LKnf640j00Auq4gUkdWGlhs22qJc6dZCsL19oxnlTJG4SYVRIGpD8TPFBuM6OElbS1pldid4mGAyN6ZIupbC5bXJN9fdpbThSxLUaI8IG1XIYBxW3Tjs6KQosKcxfxcQmdnwRGM10GnFcCy2XYunLMyAkdgk4mePiczsLygthcBut6goOqS7YVFXADLjaosB6s6ofcZWAZSIRYqSUkizYwttYab3vUOQ9w2HRxIIg8WwRVeE68xi4UtL3zRphxplzwuZrcqYCq1I3jPI5dnJIygEohMbPqVJSzrwzxBJTs5zN+ReUSgxikPQVF3JVBeNQxbHENrEMNvEdFZVV9lH9+ORGEsNZQpyTNc4C3AG7XF4ngzq+DrO2zbuaaOXgdaFcdkEotoSFBVX2qJ0C8OWZeG4KGlpghA0XfTOPCqV2qqwQ26QWfF2PMLhI2w1lVAa2aPsYd0za25MQRwgcZN6uQDCi+ZxiD4XEM2kZxOT41FnZnaRlcpZouzlRqqdbQVWopQoSB58RV50lBNrHi/AwXS5LrwDVlpY3Fc3ByiYGc52Trist6kOXdwInAQtJpp5QchyaquYOV7Su+fxVMaV3dc0RE2S6mUY0gLt2pMcYqrKIQ9w2l1gpQUMtQYcmmbt5DTNxdhnUCjQqtbK9SUSzvrC0mmhhE1e2FS2+oxypy/ZASutkmtjx3vcBC24PX65nbqkBCRhfjS9kIYPnee8cMagVOhI/3T1fAmdtAWZsCswTJCkQVNa0qWKSKPOpHAUhD9DrbVcyoYkwqhvh17vYAayXLQyKGYdxlUDFp494rBXRjYgO17DDYetNIUj/ezp6S0lnlpEwsWmJMkOwsKXeZKEAjIHn0EQJISaRBcO6UMINz7p/bEjjnw4ft+xmDvksxX4G2rIris7qaeKwAFMP2Oi7n4criuZwtpSUwpfLxSnORSrIqusc5ZFaXysqRWjiZ2DyAWEIL35tVSoQElFACjOeGGSE7AHEQgdo/LSvCOgGBvkxsmDbvlS3Fp5vhaB2TAGqRKrKKMrhLVpaGzEVjZ0OQxDhaCTA+QyRR1d15aQzrJntL3RibsipjG6jlgL4yqbS0sNYg1e84vhbBVrElK64CUcWYXDfKxhpIuxiVJZUxsbMy/uRBKTNRQ4kQ3LdRYLS0rJjRPlTPqY6gdJsEDc+aQXAn+HgsNUCbRuF0Oj0zwnA7bWDkbhO5Ens00qeQhS1laBMl5M/cAaxsLF8rKyql+Tf7ELLEGu/ixiimdCvo0TjfpjKwaggen4eh5v7LokLKbLuyvHhcZG8dhGrEDx7Hg93ZppJF7qBqO3iVveXEDQNInzeoe8Yq6ePaZBZ2JviM3W2UAGotekRCAGq4EkF1X3DOnR11yRsBL1tRa0PVcZiNFXZ2c34FskvomInQQ6lzpJoZbJxk43NwKJFBquJSsrByHydxKOnTxQASBmS3j+JMnsHSla3Ec6K9VWoJVn9zfjwOM7hqYAAqJQwE2a3nA48J2QGegRkpZNivSY+ys3EkKd4oJIwsvIHl3cWgLt5k4NH6OmtLWdpurOkwEMupYc7eMtDRhOcI2ui5JhVIzXzLyto/GAPuZoyo8wkoduVgJglCt7OhGbgID4Mq4si+63zUS1FuFFXFlqyaj2emHlLMcBqYu0FMuR28BbB7lOxRMSiCQXFhCKuwkhZ+pYDiGSgbsKKV8MiSRsuHSIWM9rklRiIlZZuqXjsQK8ooYJMgq3JKWVkhHbhsVxFUzthOWPkYijcbx54IKsSdT+uLr3crGKyoYgFiGR9iBk4kfloUX+JIlQRQqabmpgnhqtpQpb6RVQ1WH5DnrS4hEoGZqaerQ2dhFbz8XePxShmDbo70eISjoorO2vK8SJXI4SUmEU4zWKDzUDtWTYw7xXlbSTEj4FRg7zKnKoGRALv0Gs9Tgc1BpCywGZRQAtqVz2xrBcAMzEpfZwFSa2G5W0QBFjSMapWAEFa3HcGN7CxDzECyIkJ97qwrqWNTWVo876PPsjPkj2wvgroM5lLZKMETKVql/CvnWVFiFa/SzJUQwkoZsr67Y6vlSRV3/2tmNTOY3vnaxYwMuoPKqdzR1w7IqHymlPxaAThfU7Ko2ZXYj4AYJHL+kNdKwRQYESTRa5fsUZ/rVC1TMTyWVyYoqNtuzaHsMyv2tvoarxdfqwYgU1axFo/cnql1FGsqK+uAROV8BX4GU8WcZTATi2q7Qcyi0O0V+GhWBMNRUkn8H1SsWVE5By3Gi0ECqUeJoBfAtDa4amkdXG37AGP5Ggeb84p7UazpoKRzdFzeQ8HkoHGxprKy/Hpm5t12p47J6xTYDEz7uINEXSuxYXvFskYAc+ySxH9sf5ftKzU6IbwVBcUGg5e5FMCEXSErZR0wGayV19woM9guPjTqJdVTqR4uE4nJnLldWVkECCZLd2VLF+xtamex7IpiriSDUpvrpn9lrwGMCHyppMH+ps6LILsuFGUj1XEOXiqbqSHPUKnClpWV68kqtURVNDY4TNaocykoYeTU5ngGEQa/S1DnnE4AeXMcKjHPAmFVjCBENaeyLVNHfr3px8xUstJ94hIpfH4HKE/eDaArK6lSyVVFbdt1gxTIVk3pppVlFXi4pEhVBTObquohU85MLXn1iahvUkHJjSCMc01tLFveVVBx0DodM6jftCu7DOtIzYxrc0qp1JGP2ayYFz2Gb6HvMrO8cnGtV6Gjm3uImSfD2GpWK6uowbZGMxFKQCo1pOMtcMXFpRst+hXGoAomF3sSTBGgTglbBKWwsQ3tZqaYSp0Z1CimRDWFcCJUPYJ00BI5FkKYNoifuQxmN88SWVXWLMaUqqqgC0BmQJR6sk3u9NCf6jYLXxAfqsYEgVLAhRY2AtgtflZNFmFyhxdrLkAdWlk4D88M2ixHyepIdhMHrG/iR1ZGtq0MGpbDbRPYOXeSY1M6Ny4ZstvGSktK+XbFPATj2D371saPEsAMXhXrsZ0km/XStkhhMyBfsa6uXFZe2VCe+YMr1+GKgwrQyNYq1VRrB+EizAow6NsdNKcyVEkYeM73ys6q4kAHp6BiFklTkIrVC5oYV7uzwOGCz4UJ0Stq2lWMJy4wtb+RetL6tZFicnJmBw5UjCvXXMZVJX2MQkbf+XN5EWd78Vz8/JEsMZTBiKNzsm1inLRUQ74H4NidaqI68j5sAFgxcRveC7ieLJXfQYxjZZ2CsiWFewZXJmBIlZ1tdtrX4hSuateKso/RZOtOKW2nmq1oTzeK6dRWAWu2NRVb4hq0SXm1GvtugHrbr5IXqmSktg5CuDE2MSlPwsY5kNE2Wp3AqiZbWVLAxiBF+2iBZbuNj6MB6rsMLC7FyasaYDyo7KkoPyEtw3pEMXfPvxAJi2jAQQgjrz0rLIZSWZlIoNhwd5xK4AR9mYNjWAaLrnuImJeBVN9zBORObVvbr+mTTfFSEJLSRnHo7hEJoIi8MFqjxmvgmF5URZz4zLFgZZ8Ctu2X7ggVccKm9gVxIsOHqxXgNMKnFWZYnf1dBnOhayXq17QwFlWW09eNKyVJFmXqaONGA5aCegMbJ3UUkGY1ic3nKWgjq8qfVYGQG1gRt6rs62a6HiqqUOqdesK5NmX4nGofJoiE1d0dF9lVVkvT1/kEEaaCoYOwFpcVcoLM+7669PxC9rWqktH0sWUYld0VCpuBZ/stVRcGgy9WX2+U1Qthi9SzAqSxzZsy+OiFzBYnySGV6Gku44rD8BCOZBV3BvD5+AKRHNwMEsB6EzHnJpkTAeiUlEGkcECeB6GDZTp5YEJTlvdrknxYjTllMkfNtXwDjM7uVjK5JXUUn43rrqpK2jytaxHW0M5G8DC8rtHMYs7KSgduVQMGTYFqFvVS6rkD3sDJ46afdYFwoq11AOKCBLhvwoUgc8IGANycR6knZrdJPdsuxnyjfd3FovTlRMdEdtOl5CMV5EHsXQBis7TOwvIDZaGj2Vnpbh7cpK63VwYEMLwqbjzyl699sawFFkF1yqjUU31HfC6sW1ZFVFuXVXVgz9keEaw0ys1lWfm+azQAQSWA+hKYVfsZjPncAcUB9oIayy/UZXRNckDGji77GsWbvBo6tPrWPqOyVkBUq+INeqpzNdYs/u0ifh5qmpqIW+33JVSUcwY70KL4U9lYdU6ljtSls7lmfi9g3YzeQfVkaGFaV3ODCnaD2N8wsEDFklE3RzM3ZghdYkWHsszq70FIecnKkVkt8ezMzRq9bkGuKojRLBVSod3Y1yPqKgYW7JRQTPVyy5xIYLjOgxgT52RKJUY1dOrIiRd4futQx/A5AcSmEjz0vFWrkLzvbWAu9HOWbGgxFk1VNTpnBKk6TgwisI/HcxYXP1uAWO72ULFlBTq+aSu2VTUs6hrxM2CF+hEor1VIA9ZmFUaab1lSSgZsVs4sxzHlVLoJHr9H4DhONTkI1XC0/wiY2NoWAG5RlnHFnq6oLccpQddMuJ/O17JVA5OHLi0BqCztq7Y1++ucCd98qLI8MIHBV/cKjxQTme3hFBS3MyCqnDsuym2o80HjvFFTtrURmNaGJsmVahImjTsUXKtQZTAVs7Mvv8/+fzUrZAXcLJ6M4koe6XP0b6SmWWNDzyUpQ8bl+LtWx4tuqZ36cRYV3yuVxPNwvIiqiQCSmu7srgTzR6nkyhpCarXwFy1vGd5iP2cY06lFr5Njhhg1Y6+NB28ftbK83s8rf7kLJbKwDFPbLg25a0AdZJEiqr5phixKMDlRUtcssq1hriLqGoH+zeNgVm9OemjsETV8JdF0NHnkIFxWY1OB4Yrp7rtWJ7NgAAAPXklEQVQ3oNs5nplyVf8u2FoLu1JrHveaZWQjqAkshtFa2gzsSG3Zpkbvg3HafF9slPPlldjFlK80Gysm8Mr4MPhneNWENPGjAIpmilTPATdTRTXlCBYHYAQuPwA36xIpWtGN4q3Y2MhiGsUpuSSnlEJRD8PorC7CFYVw+F51qThgabxsTxWzCGY0ZSsb3lfqAy0OPNjNy8xiQQKsHYFQ2HBZVvVbBuq3m1oWKajqaonsM6uZUr6CjXWNZ0l5E3h3jURma6kP3MJIiy1Lm+kahQq41N2iZja5sjtlLYNZHZrH6qUGm4vMbDp6Rw2CFmvuyFkrBcCyMtFqBaECmsHoK9BZ2LA/lJcRqSaDqnaWbrZdGaz3DLgIvBln4woGztbyJGqslwxkhhHrTjTYFXCtOoKS8uLdofVdAbOylGU6nlYpXWZts4nXBq6WxJitMNokHUJnbnJplQm+aGpY2a5GMV2QD1hRubBPFKdumf5OHkLHz0F9luE5kjBjRa0nFE5CUGqHw32MmjZ6xkgINVnSnZ1VZStK2qKlRaLlQgK7uTq7JFXJwM+3SOEKyhZNI+tJ0I5qMYy9k2qJD7dVWdqKXa0CKNR0Ccjg+B2IYu2fcBZJZkMFgM11r0X92wilghFGgzVnexlqB7xL9mS29SiYUVY2nXOZjNBRsyDsQPRWW5hrZ4XcdC4HVWRbjgJr4sFofK5SzjQ7rhI1UebdPdEbj6sqIvTZQZ5va08rABsAW0UxeWytAk7A2KJ9ZpxzCioB24XFtYAeXYxr6anSqhLgppEqWbGwLunTgrV+IjWlL29ljaAl4EQMGsErp4apeZiquwRXLXAqOCeru32mmydc6oWTSWpFAGdzeTB8RTHVMEtlM90CbbQCYhPjq3egYr1FGdYIQjiuDGZ5zZ/AzobKGOyLxti6c4Rwtv2anyWlLICnlLhxJRXt6A5ebDBWFNONbxWZ2d02mnu4S9YECpeppV1zSWRBWxHYzVIv1CXSouwqqX3jBBBDZdYQbpTQW4ZQlS8r5kH4suSRmg2++3JN10x1PaAmEkmtYlEdeGpJEM6kOuCqCR22oSujj5IV2HdT0zj5prLKTjXFAPjdQlyq7xIBxAQP5yMczG4VxAKw0n6ilZ2QBce2pLulkuxxqnoIzFfgqyqjil9S1VNwBrFmeyeops8yOjZUybZdfS8CuaTIJumzs5tODaNtLpFDQ/PcJGweLhmeL1nB0KqiUDScsiUVD89Di3HtrKtSULw3RLiygZD+7sF8JTObgYsrGvDNUFRGl1iy0Ll1YkUc2aJYMog920I8qW6YDCg1Mqk0JHJFKXkbgbRreI+qpYNOZHrVcDUba7pjsphSJNtK6upgRNAVoOS0mugBeN4bIZgHhuPZ/s1ENaX6KsVr+YNrh1Nb7ipR0PE5zbNRegCbrHRUw6Yf07dLBJl1f8KB9as2V1nNqAsl62LBBhehwalerkHmB1JFIEZKSEusdl5JQj1nJlHXSCF342gJ9CYGrXelknJIXqVP8sD+qtplCR3XH2qfKq0ygMp+KnVkKxNlZ8m2YkIlVMiCnXUwl7qznBKSvQz3m3Pt6oQbXO5b5FixCh/fHxUQW/AEcK6zCNqKQnL9sywqmKuwvqSYzT/aPVNNpVyhvRW21aqciCsjdWvBwILUvh5VyCzbWoC1pJjJ680CWsl+udKB6T5RwG1mlohnlpbg47iz5U9ha0FGtmRLFYBtO99y97Ap0z+ZDTAog6kSLZsMHg/IFkkgp6CpvU2U0cYVSdnmkjwBdOmXbxTWNWzuIbipMioVxEckZEoahSOiy2M3K0jcC1LhVDwaqG0ZvkcWqCnrG4GIxykrqlbWdw6LQyBaZR8HmLRIhQWsHswD42ZXVLNkf9l+FlW0HVQ2lwFsC/Z1FdzlQR0KaPfo+Fdfu+/dwVRICu1CGR7AEIiAhc+AZUF0kOBaPxmUqg4i64vQnU4nFDYJ9Nz+1fVXveH9qmr+kPILx8oKcRV/BFbxbE0JMT0kSD4w6L/lNY8ocsqagVdU3A3MjxhxcGuqzsPH4irpaow1q6OyrVjvp9Npc59E91LldboYVzJWdimWfAW2SNEKcDaX2FmBLLA/uKxlmhh613Is1URQApbKfttwxL02q6Onx5pQxSbPojAg+v5hAnN6LHVRDXIsvKtRjiS0qJUyZTAXVbAK82ElFJWaQdVoqUC1Unt7BVaTQudM6SuqexjQJN4+0icaxv/utbKv83ETbT8H8gjcOKxOJmbUa6OOVXht3dFY6rHv9XoNzFLceEA1o8+pKm0LAHPHZ2rYKjFq0hfZFixsqHJgD3eD5n+U0kb1mFjXkn2lvMSSOsNE/CdIAKF0Sytq6urOHUN5gwg4GZosgbmggM5ucra2qrS2Ig1cbiBBcxYzgzUDNLCvL8GbZXNp6ORy3LmS+Kk83zRIAK6A1ioKa2I9NapIuiUFdfC9766PFZUtqUr6KbWk+zZU1a/ZrIXEztrjTOfz7hwKziCeXIaraHtbZIMz+2pGgazCmw4qWAFvEdhodYp0Xq0pV7G1YWYWbO4qhGq42+Z8BYtrLWvluNPpZAeaFFS1vubPgbgxsqcpnAaszBovKaFoDQ8BGtjfUOl4NAG2nmQV04feJgumvX2fsrQEWZghL0JnVdYkn3DOZIeRN86RqPWCmsvGVqEMRnwxQAxwS8EMYo3IzmY2+BCcLp4MKiuyuhImamlbZFcNoNl7tp+RHd18ZjQIRKyXdFRhN98/hyKqwXWNo7O1wiaXoHN108REZZWEq6grnIfjzeg8jdRf1XEL4kkXa5bBjKxoKaljBjeHlVxQ4GaycpW4lDOAKtnTxHAtOfzOtZwHAM7sqVXkV6yu6kap1nHkXKqWF/4XHqjenNKqBjpR3l1ch3Ejg1+EsgdQhsdG0B4FM9sWAVWpuAyiwTPleZxt9VyZVS2qXfReWqTAilpr9ApoWTjxymit7NwV4JTriZyOA9B0k7HFfULourmKYHVnRQvqGL5HMHdqFcR2qWpmcK6eTwx2dipWrviDilr+fKWq3OWRWdHKwA4eu8wjchbeRzFilqjjZN3ufCpfkJ0/scVpnYk6L0PI77lxdWCZ87WiWm7B/AGquQSnujGKsB8CJmiJq8q1pKIVWyqOiTK66r18BN8r74/AE71fdC3yPS2MxdOpnE1tlVxD9JmVOoggN+r4PjAXVFPa3Eg5jVJGFVUGNolH20GVrUB7BOySWq6WqYQdWR92pcFMYMwckbSgCKCqD67DiiWu1g8MQC9ByfcFqW1L+jL714qNCuznoSxt0da2gtWN1G8F0BK0NN0nuimelUF9dIdAfjO44UT3CjQLoUeLHJFTO3gmpRuIIOvwBQCbqNeo3qtZ9iF6xVK13GRlo4zqimq+CGdTiR1uRY8oqgE02hZBa79kZXPMquxRHKla2saZWN4mRqZUj0vLCKhkjKnqOQHNuSZVJoKvAqS1wpEquvWDC1B2ypwrCPsRMEPVTODMLJMDv6qeKXwi2JYV5Sq4qKyvgGsHCLiuj2jR59V8gMqSJ2FJZRXEHVRHj3sFPrct6OpqlW1GpatQdt0GvwfM6n63InsGVFhJGaBqgqqIV6IsXllZgySPq4R3bnt3wi5cv+cN2yqQLW1T95KYVsWWtKk4cB9W53WQQflQYR6Wl4HaJZjvVE0D5yvq+RKgZCs5qdBEP5sD94cAvQLlSgNaSMAtHx88BuNQ41zdFsX30zKbcs0MLD/ihkpQzl0wiTqKLTfbKmCmyYICnK0IbaieC4CG9iSyLQ7cIMGQwau6TKoq60Apl3WN40LZpca1CKKK9VQyyIEn8w0F8F6CL2h8o3ixGwC7s7EWzCOqmcApYxYD4jsAzVS0sl2t98pA7vrKophCVSonbYpgH6mvSn24pTBV4sdtV3BtMq5k82y+IADvUJ0uAlkCVTxIaPm+UNu/qkV4F1TzHXCGrXIAqItBKypqK99VtAOVs64O4ObX7pHLVCpYHcRmwvLR7TvYAKBBN58LGVzDuFz+hQbWgncQyCZAk+VbsPSouf93261iZgmfCpwRbAvqmSqriU2PwhjaoOyYqtIegVXViTsmyta6bGySpY3gyRrpIyAeaWDDxtpsXwKyalMDKNP7YBXMqEskUsi2uC8FNAPxAKTVfT1o6VzM0E0jF+1rWcUuHvdyg7vgoFplX8HpvHpMCOMRUPHzZkInsqlFKNX/EIO52E0SxSzOwob2VmRLW5D1XIU0rbgM1AzWgyC7fe8G7xUAK/taEBat7luqtyP7EmsaJQOj5F+mrnZfCuYCfBUAWwShyd6pMY/vAHG1UqOYpbI/gy5T0CMKm+UO3gFuC85dgfDVeguPDfITrIBLsLrcgdh3CFgFZjaKJ4Iv3F8ANEqvuxR1tVKOgLoCa1jxboBAkj6v7j/icFbA7f4rfRnQDLRViG13i0vqBQrYVqBbADZT0ZpiHoSzvQpopKIFS3sE1HfBWlHXd0H7LnArqvougMtljHBgZnh3Eoz/BKjLML4Z2Aq0+hEJr9jaVUBbvNzCIUiroC7AWmmFw4o5AK3MtB5VypZMSFgs05JyGVwlwBqsEGAAa2ZU1CjUexXGsE4rKriilBvFzOKKo3AuAroE6QFQU3u8YpNXwS5k+1TZt5UrwouN4KiUEw+k3ZWDp1RXHNRqXb21Ts39945yZSg3VnZFNQ9CF3XeZyr5DgBXKiwCMa2MxeTDYXgP1Fsf9QNKZc0k81RJk3r6EQ3rCmBVyLL75EjZ1pIVDHoFtiOAHoB0BdTVylqBsKKKS+AeBXJVLY+CXASuGvO/Auq7GuEjDfGKg1oKa1z/dmmi9I9SUGNhl0AtfulHAawoYrnSkmNXAVuGEhrEVXvUF+A5Ct2PqNOjDetyna4CmeUolmeXLN4Aq7C5Sj10Q7yjgl+t6CNxSRHmI5X+CpwreYB3Qfdqna4q21KdBuc4GoZsn49ZOOiVinwHqK9WzjvgeweEh2AU5+vtxZ9Cd9Wqkh49V18E5oj6vVyn0RStAyGIO5edXRKd5B0VGVXq2yr3xYp+5Ut+C4QJ4P1N339pQMjRejj4vb/Dcr6rQc3O/0rjmtZpeYCBiCHfCemRbNhbK/pNUPc3wfKy5f2D7OlL3/uPhve/oU4T0F8f+VNM2vyoiv0jK+KHQfdHq+0bncz4oz73/+Y6LbKw1o/5B7eOf1Rl/0du9B9tn/9bvrf/j+v0h6ttn2tp/r/4819y4/zv5391uvzzfwDifz6phT1MPgAAAABJRU5ErkJggg==)}.color-picker .cp-add-color-button-class{position:absolute;display:inline;padding:0;margin:3px -3px;border:0;cursor:pointer;background:0 0}.color-picker .cp-add-color-button-class:hover{text-decoration:underline}.color-picker .cp-add-color-button-class:disabled{cursor:not-allowed;color:#999}.color-picker .cp-add-color-button-class:disabled:hover{text-decoration:none}.color-picker .cp-remove-color-button-class{position:absolute;top:-5px;right:-5px;display:block;width:10px;height:10px;border-radius:50%;cursor:pointer;text-align:center;background:#fff;box-shadow:1px 1px 5px #333}.color-picker .cp-remove-color-button-class::before{content:'x';position:relative;bottom:3.5px;display:inline-block;font-size:10px}"],encapsulation:2}),pF),OF=((dF=function(){function t(e,n,i,r,o,a){_classCallCheck(this,t),this.injector=e,this.cfr=n,this.appRef=i,this.vcRef=r,this.elRef=o,this._service=a,this.dialogCreated=!1,this.ignoreChanges=!1,this.viewAttachedToAppRef=!1,this.cpWidth="230px",this.cpHeight="auto",this.cpToggle=!1,this.cpDisabled=!1,this.cpIgnoredElements=[],this.cpFallbackColor="",this.cpColorMode="color",this.cpCmykEnabled=!1,this.cpOutputFormat="auto",this.cpAlphaChannel="enabled",this.cpDisableInput=!1,this.cpDialogDisplay="popup",this.cpSaveClickOutside=!0,this.cpCloseClickOutside=!0,this.cpUseRootViewContainer=!1,this.cpPosition="auto",this.cpPositionOffset="0%",this.cpPositionRelativeToArrow=!1,this.cpOKButton=!1,this.cpOKButtonText="OK",this.cpOKButtonClass="cp-ok-button-class",this.cpCancelButton=!1,this.cpCancelButtonText="Cancel",this.cpCancelButtonClass="cp-cancel-button-class",this.cpPresetLabel="Preset colors",this.cpPresetColorsClass="cp-preset-colors-class",this.cpMaxPresetColorsLength=6,this.cpPresetEmptyMessage="No colors added",this.cpPresetEmptyMessageClass="preset-empty-message",this.cpAddColorButton=!1,this.cpAddColorButtonText="Add color",this.cpAddColorButtonClass="cp-add-color-button-class",this.cpRemoveColorButtonClass="cp-remove-color-button-class",this.cpInputChange=new pc(!0),this.cpToggleChange=new pc(!0),this.cpSliderChange=new pc(!0),this.cpSliderDragEnd=new pc(!0),this.cpSliderDragStart=new pc(!0),this.colorPickerOpen=new pc(!0),this.colorPickerClose=new pc(!0),this.colorPickerCancel=new pc(!0),this.colorPickerSelect=new pc(!0),this.colorPickerChange=new pc(!1),this.cpCmykColorChange=new pc(!0),this.cpPresetColorsChange=new pc(!0)}return _createClass(t,[{key:"handleClick",value:function(){this.inputFocus()}},{key:"handleFocus",value:function(){this.inputFocus()}},{key:"handleInput",value:function(t){this.inputChange(t)}},{key:"ngOnDestroy",value:function(){null!=this.cmpRef&&(this.viewAttachedToAppRef&&this.appRef.detachView(this.cmpRef.hostView),this.cmpRef.destroy(),this.cmpRef=null,this.dialog=null)}},{key:"ngOnChanges",value:function(t){t.cpToggle&&!this.cpDisabled&&(t.cpToggle.currentValue?this.openDialog():t.cpToggle.currentValue||this.closeDialog()),t.colorPicker&&(this.dialog&&!this.ignoreChanges&&("inline"===this.cpDialogDisplay&&this.dialog.setInitialColor(t.colorPicker.currentValue),this.dialog.setColorFromString(t.colorPicker.currentValue,!1),this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay&&this.cmpRef.changeDetectorRef.detectChanges()),this.ignoreChanges=!1),(t.cpPresetLabel||t.cpPresetColors)&&this.dialog&&this.dialog.setPresetConfig(this.cpPresetLabel,this.cpPresetColors)}},{key:"openDialog",value:function(){if(this.dialogCreated)this.dialog&&this.dialog.openDialog(this.colorPicker);else{var t=this.vcRef;if(this.dialogCreated=!0,this.viewAttachedToAppRef=!1,this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay){var e=this.injector.get(this.appRef.componentTypes[0],ka.NULL);e!==ka.NULL?(t=e.vcRef||e.viewContainerRef||this.vcRef)===this.vcRef&&console.warn("You are using cpUseRootViewContainer, but the root component is not exposing viewContainerRef!Please expose it by adding 'public vcRef: ViewContainerRef' to the constructor."):this.viewAttachedToAppRef=!0}var n=this.cfr.resolveComponentFactory(TF);if(this.viewAttachedToAppRef)this.cmpRef=n.create(this.injector),this.appRef.attachView(this.cmpRef.hostView),document.body.appendChild(this.cmpRef.hostView.rootNodes[0]);else{var i=Ba.fromResolvedProviders([],t.parentInjector);this.cmpRef=t.createComponent(n,0,i,[])}this.cmpRef.instance.setupDialog(this,this.elRef,this.colorPicker,this.cpWidth,this.cpHeight,this.cpDialogDisplay,this.cpFallbackColor,this.cpColorMode,this.cpCmykEnabled,this.cpAlphaChannel,this.cpOutputFormat,this.cpDisableInput,this.cpIgnoredElements,this.cpSaveClickOutside,this.cpCloseClickOutside,this.cpUseRootViewContainer,this.cpPosition,this.cpPositionOffset,this.cpPositionRelativeToArrow,this.cpPresetLabel,this.cpPresetColors,this.cpPresetColorsClass,this.cpMaxPresetColorsLength,this.cpPresetEmptyMessage,this.cpPresetEmptyMessageClass,this.cpOKButton,this.cpOKButtonClass,this.cpOKButtonText,this.cpCancelButton,this.cpCancelButtonClass,this.cpCancelButtonText,this.cpAddColorButton,this.cpAddColorButtonClass,this.cpAddColorButtonText,this.cpRemoveColorButtonClass),this.dialog=this.cmpRef.instance,this.vcRef!==t&&this.cmpRef.changeDetectorRef.detectChanges()}}},{key:"closeDialog",value:function(){this.dialog&&"popup"===this.cpDialogDisplay&&this.dialog.closeDialog()}},{key:"cmykChanged",value:function(t){this.cpCmykColorChange.emit(t)}},{key:"stateChanged",value:function(t){this.cpToggleChange.emit(t),t?this.colorPickerOpen.emit(this.colorPicker):this.colorPickerClose.emit(this.colorPicker)}},{key:"colorChanged",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.ignoreChanges=e,this.colorPickerChange.emit(t)}},{key:"colorSelected",value:function(t){this.colorPickerSelect.emit(t)}},{key:"colorCanceled",value:function(){this.colorPickerCancel.emit()}},{key:"inputFocus",value:function(){var t=this.elRef.nativeElement,e=this.cpIgnoredElements.filter((function(e){return e===t}));this.cpDisabled||e.length||("undefined"!=typeof document&&t===document.activeElement?this.openDialog():this.dialog&&this.dialog.show?this.closeDialog():this.openDialog())}},{key:"inputChange",value:function(t){this.dialog?this.dialog.setColorFromString(t.target.value,!0):(this.colorPicker=t.target.value,this.colorPickerChange.emit(this.colorPicker))}},{key:"inputChanged",value:function(t){this.cpInputChange.emit(t)}},{key:"sliderChanged",value:function(t){this.cpSliderChange.emit(t)}},{key:"sliderDragEnd",value:function(t){this.cpSliderDragEnd.emit(t)}},{key:"sliderDragStart",value:function(t){this.cpSliderDragStart.emit(t)}},{key:"presetColorsChanged",value:function(t){this.cpPresetColorsChange.emit(t)}}]),t}()).\u0275fac=function(t){return new(t||dF)(rs(ka),rs(bl),rs(xu),rs(Gl),rs(kl),rs(EF))},dF.\u0275dir=be({type:dF,selectors:[["","colorPicker",""]],hostBindings:function(t,e){1&t&&gs("click",(function(){return e.handleClick()}))("focus",(function(){return e.handleFocus()}))("input",(function(t){return e.handleInput(t)}))},inputs:{cpWidth:"cpWidth",cpHeight:"cpHeight",cpToggle:"cpToggle",cpDisabled:"cpDisabled",cpIgnoredElements:"cpIgnoredElements",cpFallbackColor:"cpFallbackColor",cpColorMode:"cpColorMode",cpCmykEnabled:"cpCmykEnabled",cpOutputFormat:"cpOutputFormat",cpAlphaChannel:"cpAlphaChannel",cpDisableInput:"cpDisableInput",cpDialogDisplay:"cpDialogDisplay",cpSaveClickOutside:"cpSaveClickOutside",cpCloseClickOutside:"cpCloseClickOutside",cpUseRootViewContainer:"cpUseRootViewContainer",cpPosition:"cpPosition",cpPositionOffset:"cpPositionOffset",cpPositionRelativeToArrow:"cpPositionRelativeToArrow",cpOKButton:"cpOKButton",cpOKButtonText:"cpOKButtonText",cpOKButtonClass:"cpOKButtonClass",cpCancelButton:"cpCancelButton",cpCancelButtonText:"cpCancelButtonText",cpCancelButtonClass:"cpCancelButtonClass",cpPresetLabel:"cpPresetLabel",cpPresetColorsClass:"cpPresetColorsClass",cpMaxPresetColorsLength:"cpMaxPresetColorsLength",cpPresetEmptyMessage:"cpPresetEmptyMessage",cpPresetEmptyMessageClass:"cpPresetEmptyMessageClass",cpAddColorButton:"cpAddColorButton",cpAddColorButtonText:"cpAddColorButtonText",cpAddColorButtonClass:"cpAddColorButtonClass",cpRemoveColorButtonClass:"cpRemoveColorButtonClass",colorPicker:"colorPicker",cpPresetColors:"cpPresetColors"},outputs:{cpInputChange:"cpInputChange",cpToggleChange:"cpToggleChange",cpSliderChange:"cpSliderChange",cpSliderDragEnd:"cpSliderDragEnd",cpSliderDragStart:"cpSliderDragStart",colorPickerOpen:"colorPickerOpen",colorPickerClose:"colorPickerClose",colorPickerCancel:"colorPickerCancel",colorPickerSelect:"colorPickerSelect",colorPickerChange:"colorPickerChange",cpCmykColorChange:"cpCmykColorChange",cpPresetColorsChange:"cpPresetColorsChange"},exportAs:["ngxColorPicker"],features:[sl]}),dF),AF=((fF=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:fF}),fF.\u0275inj=dt({factory:function(t){return new(t||fF)},providers:[EF],imports:[[Pf]]}),fF),IF=["trigger"],PF=((gF=function(){function t(e,n){_classCallCheck(this,t),this.data=e,this.overlayPanelRef=n}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this.color=this.getInitialColor(),setTimeout((function(){t.trigger.nativeElement.click()}))}},{key:"emitSelectedEvent",value:function(t){this.color=t,this.overlayPanelRef.emitValue(t)}},{key:"getInitialColor",value:function(){var t=this.data&&this.data.color||null;return t&&"rgba(0,0,0,0)"===t.replace(/ /g,"")&&(t=void 0),t}}]),t}()).\u0275fac=function(t){return new(t||gF)(rs(zO,8),rs(ZT))},gF.\u0275cmp=pe({type:gF,selectors:[["ng-component"]],viewQuery:function(t,e){var n;1&t&&Ec(IF,!0),2&t&&Sc(n=Dc())&&(e.trigger=n.first)},features:[ml([EF])],decls:2,vars:5,consts:[[1,"trigger",3,"colorPicker","cpAlphaChannel","cpOutputFormat","cpDialogDisplay","cpToggle","colorPickerChange"],["trigger",""]],template:function(t,e){1&t&&(ls(0,"div",0,1),gs("colorPickerChange",(function(t){return e.emitSelectedEvent(t)})),cs()),2&t&&as("colorPicker",e.color)("cpAlphaChannel","always")("cpOutputFormat","rgba")("cpDialogDisplay","inline")("cpToggle",!1)},directives:[OF],styles:["[_nghost-%COMP%]{width:230px;height:277px}.trigger[_ngcontent-%COMP%], [_nghost-%COMP%]{display:block}"],changeDetection:0}),gF),DF=[{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top",offsetY:5,offsetX:5},{originX:"center",originY:"top",overlayX:"center",overlayY:"bottom"}],RF=["colorPickerButton"];function FF(t,e){if(1&t){var n=ds();ls(0,"button",6),gs("click",(function(){Qe(n);var t=e.$implicit;return ks().changeColor(t)})),fc(1,"async"),cs()}if(2&t){var i=e.$implicit,r=ks();Rs("background",i,tr),Fs("selected",dc(1,4,r.selectedColor$)===i)}}var MF,jF=["*"],LF=((MF=function(){function t(e,n){_classCallCheck(this,t),this.overlayPanel=e,this.config=n,this.compact=!1,this.selectedColor$=new Df("#000"),this.colors=this.config.get("pixie.ui.colorPresets.items")}return _createClass(t,[{key:"changeColor",value:function(t){this.selectedColor$.next(t),this.propagateChange(t)}},{key:"openColorPicker",value:function(){var t=this;this.overlayPanel.open(PF,{position:DF,hasBackdrop:!0,origin:this.colorPickerButton}).valueChanged().subscribe((function(e){return t.changeColor(e)}))}},{key:"writeValue",value:function(t){this.selectedColor$.next(t)}},{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"registerOnTouched",value:function(){}}]),t}()).\u0275fac=function(t){return new(t||MF)(rs(WO),rs(um))},MF.\u0275cmp=pe({type:MF,selectors:[["color-widget"]],viewQuery:function(t,e){var n;1&t&&Tc(RF,!0,kl),2&t&&Sc(n=Dc())&&(e.colorPickerButton=n.first)},hostAttrs:[1,"color-widget"],hostVars:2,hostBindings:function(t,e){2&t&&Fs("compact",e.compact)},inputs:{compact:"compact"},features:[ml([{provide:Mp,useExisting:MF,multi:!0}])],ngContentSelectors:jF,decls:7,vars:1,consts:[[1,"colors"],["mat-icon-button","",1,"color-picker-button",3,"click"],["colorPickerButton",""],["svgIcon","color-wheel-custom"],["class","no-style color control",3,"background","selected","click",4,"ngFor","ngForOf"],["trans","",1,"bottom-label"],[1,"no-style","color","control",3,"click"]],template:function(t,e){1&t&&(ws(),ls(0,"div",0),ls(1,"button",1,2),gs("click",(function(){return e.openColorPicker()})),us(3,"mat-icon",3),cs(),ns(4,FF,2,6,"button",4),cs(),ls(5,"div",5),xs(6),cs()),2&t&&(kr(4),as("ngForOf",e.colors))},directives:[_S,MI,lf,QT],pipes:[Tf],styles:[".be-dark-mode button.color.selected{box-shadow:inset 0 0 0 2px rgba(0,0,0,.5),0 0 0 2px #fff}color-widget{display:block;margin:0 25px}color-widget .color-picker-button{margin-right:5px;width:50px;height:50px}color-widget .color-picker-button svg{-webkit-filter:drop-shadow(3px 3px 2px rgba(0,0,0,.1));filter:drop-shadow(3px 3px 2px rgba(0,0,0,.1))}color-widget .color-picker-button .mat-icon{width:40px;height:40px}@media only screen and (max-width:599.99px){color-widget .color-picker-button{width:45px;height:45px;line-height:45px;margin-right:10px}color-widget .color-picker-button .mat-icon{width:35px;height:35px}}color-widget .colors{display:flex;align-items:center;justify-content:center;width:358px;overflow:hidden;margin:auto}color-widget button.color{width:25px;height:25px;flex-shrink:0;border:1px solid var(--be-divider-default);border-radius:50%;margin:0 5px;transition:box-shadow 125ms ease-out;position:relative;z-index:2}color-widget button.color.selected{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}"],encapsulation:2,changeDetection:0}),MF);function NF(t,e){if(1&t){var n=ds();hs(0),ls(1,"color-widget",4),gs("ngModelChange",(function(t){return Qe(n),ks(3).applyFilterValue("color",t)})),cs(),fs()}if(2&t){var i=ks(3);kr(1),as("formControl",i.colorFormControl)}}function BF(t,e){if(1&t&&(ls(0,"option",9),Gs(1),cs()),2&t){var n=e.$implicit;as("value",n),kr(1),qs(n)}}function zF(t,e){if(1&t){var n=ds();ls(0,"div",5),ls(1,"label",6),Gs(2),cs(),ls(3,"select",7),gs("change",(function(t){Qe(n);var e=ks().$implicit;return ks(2).applyFilterValue(e.key,t.target.value)})),ns(4,BF,2,2,"option",8),cs(),cs()}if(2&t){var i=ks().$implicit;kr(1),as("for",i.key),kr(1),qs(i.key),kr(1),as("id",i.key),kr(1),as("ngForOf",i.value.available)}}function VF(t,e){if(1&t){var n=ds();ls(0,"div",10),ls(1,"div",11),Gs(2),cs(),ls(3,"mat-slider",12),gs("input",(function(t){Qe(n);var e=ks().$implicit;return ks(2).applyFilterValue(e.key,t.value)})),cs(),cs()}if(2&t){var i=ks().$implicit;kr(2),qs(i.key),kr(1),as("value",i.value.current)("min",i.value.min||0)("max",i.value.max||100)("step",i.value.step||1)}}function HF(t,e){if(1&t&&(hs(0),ns(1,NF,2,1,"ng-container",0),ns(2,zF,5,4,"div",2),ns(3,VF,4,5,"div",3),fs()),2&t){var n=e.$implicit;kr(1),as("ngIf","colorPicker"===n.value.type),kr(1),as("ngIf","select"===n.value.type),kr(1),as("ngIf","slider"===n.value.type)}}function WF(t,e){if(1&t&&(hs(0),ns(1,HF,4,3,"ng-container",1),fc(2,"keyvalue"),fs()),2&t){var n=e.ngIf,i=ks();kr(1),as("ngForOf",dc(2,1,i.getFilterOptions(n)))}}var UF,YF=((UF=function(){function t(e,n){_classCallCheck(this,t),this.filterTool=e,this.store=n,this.colorFormControl=new sg}return _createClass(t,[{key:"applyFilterValue",value:function(t,e){var n=this.store.selectSnapshot(WE.selectedFilter);this.filterTool.applyValue(n,t,e)}},{key:"getFilterOptions",value:function(t){return this.filterTool.getByName(t).options}}]),t}()).\u0275fac=function(t){return new(t||UF)(rs(HE),rs(pp))},UF.\u0275cmp=pe({type:UF,selectors:[["filter-controls"]],decls:2,vars:3,consts:[[4,"ngIf"],[4,"ngFor","ngForOf"],["class","input-container",4,"ngIf"],["class","slider-container",4,"ngIf"],[3,"formControl","ngModelChange"],[1,"input-container"],["trans","",3,"for"],[3,"id","change"],["trans","",3,"value",4,"ngFor","ngForOf"],["trans","",3,"value"],[1,"slider-container"],["trans","",1,"slider-label"],[3,"value","min","max","step","input"]],template:function(t,e){1&t&&(ns(0,WF,3,3,"ng-container",0),fc(1,"async")),2&t&&as("ngIf",dc(1,1,e.selectedFilter$))},directives:[uf,lf,LF,Kp,xg,QT,Tv,Rv,vP],pipes:[Tf,Of],styles:["filter-controls .input-container{max-width:120px}filter-controls .input-container label{display:none}"],encapsulation:2,changeDetection:0}),ch([xp(WE.selectedFilter),uh("design:type",b)],UF.prototype,"selectedFilter$",void 0),UF);function XF(t,e){if(1&t){var n=ds();ls(0,"button",10),gs("click",(function(t){Qe(n);var e=ks(2).$implicit;return ks(2).showFilterControls(e),t.stopPropagation()})),us(1,"mat-icon",13),cs()}}function GF(t,e){if(1&t){var n=ds();ls(0,"div",9),ls(1,"button",10),gs("click",(function(t){Qe(n);var e=ks().$implicit;return ks(2).removeFilter(e),t.stopPropagation()})),us(2,"mat-icon",11),cs(),ns(3,XF,2,0,"button",12),cs()}if(2&t){var i=ks().$implicit,r=ks(2);kr(3),as("ngIf",r.filterTool.hasOptions(i))}}function qF(t,e){if(1&t){var n=ds();ls(0,"div",4),gs("click",(function(){Qe(n);var t=e.$implicit;return ks(2).applyFilter(t)})),ls(1,"div",5),us(2,"img",6),ns(3,GF,4,1,"div",7),cs(),ls(4,"div",8),Gs(5),cs(),cs()}if(2&t){var i=e.$implicit,r=ks().ngIf,o=ks();kr(2),as("src",o.getFilterImage(i),$i),kr(1),as("ngIf",r.indexOf(i)>-1),kr(2),qs(o.getFilterDisplayName(i))}}function KF(t,e){if(1&t&&(ls(0,"div",2),fc(1,"async"),ns(2,qF,6,3,"div",3),cs()),2&t){var n=ks();Fs("hidden",dc(1,3,n.selectedFilter$)),kr(2),as("ngForOf",n.filterList)}}function ZF(t,e){1&t&&us(0,"filter-controls",14),2&t&&as("ngClass",e.ngIf)}var QF,JF,$F,tM,eM,nM,iM=((QF=function(){function t(e,n,i,r){_classCallCheck(this,t),this.settings=e,this.filterTool=n,this.store=i,this.config=r,this.filterList=[],this.filterList=this.config.get("pixie.tools.filter.items")}return _createClass(t,[{key:"applyFilter",value:function(t){this.filterTool.apply(t)}},{key:"removeFilter",value:function(t){this.filterTool.remove(t)}},{key:"getFilterImage",value:function(t){return this.settings.getAssetUrl("images/filters/square/"+t.replace(" ","-")+".jpg",!0)}},{key:"showFilterControls",value:function(t){this.store.dispatch(new gE(t))}},{key:"getFilterDisplayName",value:function(t){return"blackWhite"===t?"Black & White":$P(t)}}]),t}()).\u0275fac=function(t){return new(t||QF)(rs(um),rs(HE),rs(pp),rs(um))},QF.\u0275cmp=pe({type:QF,selectors:[["filter-drawer"]],hostAttrs:[1,"controls-drawer"],decls:4,vars:6,consts:[["class","tool-panel-content filter-list",3,"hidden",4,"ngIf"],["class","tool-panel-content",3,"ngClass",4,"ngIf"],[1,"tool-panel-content","filter-list"],["class","button-with-image",3,"click",4,"ngFor","ngForOf"],[1,"button-with-image",3,"click"],[1,"image-container"],["alt","Filter preview",3,"src"],["class","button-overlay",4,"ngIf"],["trans","",1,"bottom-label"],[1,"button-overlay"],["mat-icon-button","",3,"click"],["svgIcon","cancel"],["mat-icon-button","",3,"click",4,"ngIf"],["svgIcon","settings"],[1,"tool-panel-content",3,"ngClass"]],template:function(t,e){1&t&&(ns(0,KF,3,5,"div",0),fc(1,"async"),ns(2,ZF,1,1,"filter-controls",1),fc(3,"async")),2&t&&(as("ngIf",dc(1,2,e.activeFilters$)),kr(2),as("ngIf",dc(3,4,e.selectedFilter$)))},directives:[uf,lf,QT,_S,MI,YF,af],pipes:[Tf],styles:["filter-drawer.controls-drawer .filter-list{justify-content:flex-start}filter-drawer .button-with-image{position:relative}filter-drawer .button-with-image:first-of-type{margin-left:0}filter-drawer .button-with-image img{border-radius:4px;width:65px;height:65px}filter-drawer .button-with-image .bottom-label{margin-top:3px;font-size:11px}"],encapsulation:2,changeDetection:0}),ch([xp(DT.activePanel),uh("design:type",b)],QF.prototype,"forePanel$",void 0),ch([xp(WE.activeFilters),uh("design:type",b)],QF.prototype,"activeFilters$",void 0),ch([xp(WE.selectedFilter),uh("design:type",b)],QF.prototype,"selectedFilter$",void 0),ch([xp(WE.dirty),uh("design:type",b)],QF.prototype,"dirty$",void 0),QF),rM=["input"],oM=function(){return{enterDuration:150}},aM=["*"],sM=new Vt("mat-checkbox-default-options",{providedIn:"root",factory:function(){return{color:"accent",clickAction:"check-indeterminate"}}}),lM=new Vt("mat-checkbox-click-action"),cM=0,uM={provide:Mp,useExisting:St((function(){return dM})),multi:!0},hM=function t(){_classCallCheck(this,t)},fM=Rx(Px(Dx(Ix((function t(e){_classCallCheck(this,t),this._elementRef=e}))))),dM=((nM=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a,s,l,c){var u;return _classCallCheck(this,n),(u=e.call(this,t))._changeDetectorRef=i,u._focusMonitor=r,u._ngZone=o,u._clickAction=s,u._animationMode=l,u._options=c,u.ariaLabel="",u.ariaLabelledby=null,u._uniqueId="mat-checkbox-".concat(++cM),u.id=u._uniqueId,u.labelPosition="after",u.name=null,u.change=new pc,u.indeterminateChange=new pc,u._onTouched=function(){},u._currentAnimationClass="",u._currentCheckState=0,u._controlValueAccessorChangeFn=function(){},u._checked=!1,u._disabled=!1,u._indeterminate=!1,u._options=u._options||{},u._options.color&&(u.color=u._options.color),u.tabIndex=parseInt(a)||0,u._focusMonitor.monitor(t,!0).subscribe((function(t){t||Promise.resolve().then((function(){u._onTouched(),i.markForCheck()}))})),u._clickAction=u._clickAction||u._options.clickAction,u}return _createClass(n,[{key:"ngAfterViewInit",value:function(){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 hM;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-".concat(n)}},{key:"_syncIndeterminate",value:function(t){var e=this._inputElement;e&&(e.nativeElement.indeterminate=t)}},{key:"inputId",get:function(){return"".concat(this.id||this._uniqueId,"-input")}},{key:"required",get:function(){return this._required},set:function(t){this._required=xy(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=xy(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=xy(t),e&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}}]),n}(fM)).\u0275fac=function(t){return new(t||nM)(rs(kl),rs(Zo),rs(rk),rs(ou),os("tabindex"),rs(lM,8),rs(_x,8),rs(sM,8))},nM.\u0275cmp=pe({type:nM,selectors:[["mat-checkbox"]],viewQuery:function(t,e){var n;1&t&&(Tc(rM,!0),Tc(Kx,!0)),2&t&&(Sc(n=Dc())&&(e._inputElement=n.first),Sc(n=Dc())&&(e.ripple=n.first))},hostAttrs:[1,"mat-checkbox"],hostVars:12,hostBindings:function(t,e){2&t&&(Js("id",e.id),ts("tabindex",null),Fs("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",value:"value"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[ml([uM]),el],ngContentSelectors:aM,decls:17,vars:19,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&&(ws(),ls(0,"label",0,1),ls(2,"div",2),ls(3,"input",3,4),gs("change",(function(t){return e._onInteractionEvent(t)}))("click",(function(t){return e._onInputClick(t)})),cs(),ls(5,"div",5),us(6,"div",6),cs(),us(7,"div",7),ls(8,"div",8),xn(),ls(9,"svg",9),us(10,"path",10),cs(),Sn(),us(11,"div",11),cs(),cs(),ls(12,"span",12,13),gs("cdkObserveContent",(function(){return e._onLabelTextChange()})),ls(14,"span",14),Gs(15,"\xa0"),cs(),xs(16),cs(),cs()),2&t){var n=is(1),i=is(13);ts("for",e.inputId),kr(2),Fs("mat-checkbox-inner-container-no-side-margin",!i.textContent||!i.textContent.trim()),kr(1),as("id",e.inputId)("required",e.required)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex),ts("value",e.value)("name",e.name)("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby)("aria-checked",e._getAriaChecked()),kr(2),as("matRippleTrigger",n)("matRippleDisabled",e._isRippleDisabled())("matRippleRadius",20)("matRippleCentered",!0)("matRippleAnimation",uc(18,oM))}},directives:[Kx,Db],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}.mat-checkbox.cdk-keyboard-focused .cdk-high-contrast-active .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}),nM),pM=((eM=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:eM}),eM.\u0275inj=dt({factory:function(t){return new(t||eM)}}),eM),vM=((tM=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:tM}),tM.\u0275inj=dt({factory:function(t){return new(t||tM)},imports:[[Zx,Ax,Rb,pM],Ax,pM]}),tM),gM=(($F=function(){function t(e,n,i,r,o,a,s){_classCallCheck(this,t),this.canvas=e,this.history=n,this.resizeTool=i,this.controls=r,this.toast=o,this.store=a,this.config=s,this.resizeForm=new lg({width:new sg,height:new sg,usePercentages:new sg(!1),maintainAspectRatio:new sg(!0)})}return _createClass(t,[{key:"minWidth",value:function(){var t=this.config.get("pixie.tools.resize.minWidth",50);return this.resizeForm.value.usePercentages?Math.ceil(100*t/this.canvas.state.original.width):t}},{key:"maxWidth",value:function(){var t=this.config.get("pixie.tools.resize.maxWidth",2400);return this.resizeForm.value.usePercentages?Math.ceil(100*t/this.canvas.state.original.width):t}},{key:"minHeight",value:function(){var t=this.config.get("pixie.tools.resize.minHeight",50);return this.resizeForm.value.usePercentages?Math.ceil(100*t/this.canvas.state.original.height):t}},{key:"maxHeight",value:function(){var t=this.config.get("pixie.tools.resize.maxHeight",2400);return this.resizeForm.value.usePercentages?Math.ceil(100*t/this.canvas.state.original.height):t}},{key:"ngOnInit",value:function(){this.resizeForm.patchValue({width:this.resizeForm.value.usePercentages?100:this.canvas.state.original.width,height:this.resizeForm.value.usePercentages?100:this.canvas.state.original.height}),this.bindToWidthControl(),this.bindToHeightControl(),this.bindToPercentageControl(),this.syncFormWithState()}},{key:"applyChanges",value:function(){this.store.selectSnapshot(GE.dirty)&&this.store.dispatch(new Hu(Ru.RESIZE))}},{key:"syncFormWithState",value:function(){var t=this;this.resizeForm.valueChanges.pipe(Cb(200),Mf((function(){return t.store.selectSnapshot(DT.activePanel)===Ru.RESIZE}))).subscribe((function(){var e=t.applyMinMaxRestrictions(t.resizeForm.getRawValue());t.store.dispatch(new YE(e))}))}},{key:"applyMinMaxRestrictions",value:function(t){return t.width<this.minWidth()&&(t.width=this.minWidth(),t.maintainAspectRatio&&(t.height=this.aspectToHeight(t.width))),t.width>this.maxWidth()&&(t.width=this.maxWidth(),t.maintainAspectRatio&&(t.height=this.aspectToHeight(t.width))),t.height<this.minHeight()&&(t.height=this.minHeight(),t.maintainAspectRatio&&(t.width=this.aspectToWidth(t.height))),t.height>this.maxHeight()&&(t.height=this.maxHeight(),t.maintainAspectRatio&&(t.width=this.aspectToWidth(t.height))),t}},{key:"bindToPercentageControl",value:function(){var t=this;this.resizeForm.get("usePercentages").valueChanges.subscribe((function(e){t.resizeForm.patchValue(e?{width:100,height:100}:{width:t.canvas.state.original.width,height:t.canvas.state.original.height})}))}},{key:"bindToWidthControl",value:function(){var t=this;this.resizeForm.get("width").valueChanges.pipe(Mf((function(){return t.resizeForm.value.maintainAspectRatio}))).subscribe((function(e){t.resizeForm.get("height").setValue(t.aspectToHeight(e),{emitEvent:!1})}))}},{key:"bindToHeightControl",value:function(){var t=this;this.resizeForm.get("height").valueChanges.pipe(Mf((function(){return t.resizeForm.value.maintainAspectRatio}))).subscribe((function(e){t.resizeForm.get("width").setValue(t.aspectToWidth(e),{emitEvent:!1})}))}},{key:"aspectToWidth",value:function(t){return this.resizeForm.value.usePercentages?t:Math.floor(this.canvas.state.original.width/(this.canvas.state.original.height/t))}},{key:"aspectToHeight",value:function(t){return this.resizeForm.value.usePercentages?t:Math.floor(this.canvas.state.original.height/(this.canvas.state.original.width/t))}}]),t}()).\u0275fac=function(t){return new(t||$F)(rs(Em),rs(hE),rs(UE),rs(YO),rs(rE),rs(pp),rs(um))},$F.\u0275cmp=pe({type:$F,selectors:[["resize-drawer"]],hostAttrs:[1,"controls-drawer"],decls:16,vars:5,consts:[["ngNativeValidate","",1,"tool-panel-content",3,"formGroup","ngSubmit"],[1,"size-inputs-container"],[1,"input-container"],["for","width","trans",""],["type","number","id","width","name","width","formControlName","width","required","",1,"size-input",3,"min","max"],["for","height","trans",""],["type","number","id","height","name","height","formControlName","height","required","",1,"size-input",3,"min","max"],["type","submit",1,"hidden"],[1,"checkbox-container"],["formControlName","maintainAspectRatio","trans","",1,"aspect-ratio-checkbox"],["formControlName","usePercentages","trans","",1,"percentages-checkbox"]],template:function(t,e){1&t&&(ls(0,"form",0),gs("ngSubmit",(function(){return e.applyChanges()})),ls(1,"div",1),ls(2,"div",2),ls(3,"label",3),Gs(4,"Width"),cs(),us(5,"input",4),cs(),ls(6,"div",2),ls(7,"label",5),Gs(8,"Height"),cs(),us(9,"input",6),cs(),cs(),us(10,"button",7),ls(11,"div",8),ls(12,"mat-checkbox",9),Gs(13,"Maintain Aspect Ratio"),cs(),ls(14,"mat-checkbox",10),Gs(15,"Use Percentages"),cs(),cs(),cs()),2&t&&(as("formGroup",e.resizeForm),kr(5),as("min",e.minWidth())("max",e.maxWidth()),kr(4),as("min",e.minHeight())("max",e.maxHeight()))},directives:[Zp,Eg,QT,fv,zp,Kp,Bg,Vg,dM],styles:["resize-drawer{display:block}resize-drawer .checkbox-container{text-align:left;margin-left:15px;margin-top:15px}resize-drawer .mat-checkbox{display:block}resize-drawer .mat-checkbox:first-of-type{margin-bottom:8px}resize-drawer .input-container{display:inline-block;width:auto;margin:0 15px 0 0;text-align:center}resize-drawer .input-container label{padding:0}resize-drawer input{width:95px;height:45px;border-radius:3px}resize-drawer form{margin:0}@media only screen and (max-width:599.99px){resize-drawer .tool-panel-content{flex-direction:column;justify-content:center}resize-drawer .tool-panel-content>:first-child,resize-drawer .tool-panel-content>:last-child{margin:auto}resize-drawer .input-container .percentages-checkbox{display:none}resize-drawer .input-container>.aspect-ratio-checkbox{margin-bottom:0}}"],encapsulation:2,changeDetection:0}),$F),mM=((JF=function(){function t(e,n){_classCallCheck(this,t),this.store=e,this.transformTool=n}return _createClass(t,[{key:"rotateLeft",value:function(){this.transformTool.rotate("basic",-90),this.markAsDirty()}},{key:"rotateRight",value:function(){this.transformTool.rotate("basic",90),this.markAsDirty()}},{key:"skew",value:function(t){this.transformTool.rotate("skew",t.value)}},{key:"flipHorizontal",value:function(){this.transformTool.flip("horizontal"),this.markAsDirty()}},{key:"flipVertical",value:function(){this.transformTool.flip("vertical"),this.markAsDirty()}},{key:"markAsDirty",value:function(){this.store.dispatch(new aT)}}]),t}()).\u0275fac=function(t){return new(t||JF)(rs(pp),rs(XO))},JF.\u0275cmp=pe({type:JF,selectors:[["transform-drawer"]],hostAttrs:[1,"controls-drawer"],decls:12,vars:2,consts:[[1,"tool-panel-content"],[1,"buttons-container"],[1,"rotate-button","button-with-image","small",3,"click"],["svgIcon","rotate-left"],["svgIcon","rotate-right"],["svgIcon","flip-vertical-custom"],["svgIcon","flip-horizontal-custom"],[3,"min","max","input","change"]],template:function(t,e){1&t&&(ls(0,"div",0),ls(1,"div",1),ls(2,"button",2),gs("click",(function(){return e.rotateLeft()})),us(3,"mat-icon",3),cs(),ls(4,"button",2),gs("click",(function(){return e.rotateRight()})),us(5,"mat-icon",4),cs(),cs(),ls(6,"div",1),ls(7,"button",2),gs("click",(function(){return e.flipVertical()})),us(8,"mat-icon",5),cs(),ls(9,"button",2),gs("click",(function(){return e.flipHorizontal()})),us(10,"mat-icon",6),cs(),cs(),ls(11,"mat-slider",7),gs("input",(function(t){return e.skew(t)}))("change",(function(){return e.markAsDirty()})),cs(),cs()),2&t&&(kr(11),as("min",0)("max",360))},directives:[MI,vP],styles:["transform-drawer{display:block}transform-drawer .tool-panel-content{flex-wrap:wrap}transform-drawer .buttons-container{margin:0 20px}transform-drawer .button-with-image.small{width:55px;height:55px}transform-drawer .button-with-image.small img,transform-drawer .button-with-image.small mat-icon{width:30px;height:30px}@media only screen and (max-width:599.99px){transform-drawer.controls-drawer .content{justify-content:center}transform-drawer .buttons-container,transform-drawer.controls-drawer .content>:first-child,transform-drawer.controls-drawer .content>:last-child{margin:0}transform-drawer .mat-slider{display:none}}"],encapsulation:2,changeDetection:0}),JF),yM=["ratioPreview"];function _M(t,e){if(1&t){var n=ds();ls(0,"div",4),ls(1,"div",5),ls(2,"div",6),ls(3,"label",7),Gs(4,"Width"),cs(),ls(5,"input",8),gs("ngModelChange",(function(t){return Qe(n),ks().cropzoneWidth=t}))("ngModelChange",(function(){return Qe(n),ks().resizeCropzone()})),cs(),cs(),ls(6,"div",6),ls(7,"label",9),Gs(8,"Height"),cs(),ls(9,"input",10),gs("ngModelChange",(function(t){return Qe(n),ks().cropzoneHeight=t}))("ngModelChange",(function(){return Qe(n),ks().resizeCropzone()})),cs(),cs(),cs(),cs()}if(2&t){var i=ks();kr(5),as("ngModel",i.cropzoneWidth)("max",i.canvasState.original.width),kr(4),as("ngModel",i.cropzoneHeight)("max",i.canvasState.original.height)}}function bM(t,e){if(1&t){var n=ds();ls(0,"div",11),gs("click",(function(){Qe(n);var t=e.$implicit;return ks().applyAspectRatio(t.ratio)})),us(1,"div",12,13),ls(3,"div",14),Gs(4),cs(),cs()}if(2&t){var i=e.$implicit;Fs("selected",ks().cropZone.aspectRatio===i.ratio),kr(1),ts("data-ratio",i.ratio),kr(3),qs(i.name)}}var kM,CM=((kM=function(){function t(e,n,i,r){var o=this;_classCallCheck(this,t),this.cropZone=e,this.config=n,this.canvasState=i,this.cd=r,this.subscription=this.config.all$().subscribe((function(){o.presets=o.config.get("pixie.tools.crop.presets"),o.cropZone.aspectRatio=o.config.get("pixie.tools.crop.defaultRatio")}))}return _createClass(t,[{key:"ngAfterViewInit",value:function(){var t=this;this.ratioPreviews.forEach((function(e){var n=t.cropZone.getAdjustedSize(e.nativeElement.dataset.ratio,40,30);e.nativeElement.style.width=n.width+"px",e.nativeElement.style.height=n.height+"px"}))}},{key:"ngOnInit",value:function(){var t=this;this.cropZone.draw(),this.updateZoneSize(),this.cropZone.resize$.subscribe((function(){return t.updateZoneSize()}))}},{key:"ngOnDestroy",value:function(){this.cropZone.remove(),this.subscription.unsubscribe()}},{key:"applyAspectRatio",value:function(t){this.cropZone.changeAspectRatio(t),this.updateZoneSize()}},{key:"updateZoneSize",value:function(){var t=this.cropZone.getSize();this.cropzoneHeight=Math.floor(t.height),this.cropzoneWidth=Math.floor(t.width),this.cd.markForCheck()}},{key:"resizeCropzone",value:function(){this.cropZone.resize(this.cropzoneWidth||this.canvasState.original.width,this.cropzoneHeight)}}]),t}()).\u0275fac=function(t){return new(t||kM)(rs(ZE),rs(um),rs(fm),rs(Zo))},kM.\u0275cmp=pe({type:kM,selectors:[["crop-drawer"]],viewQuery:function(t,e){var n;1&t&&Tc(yM,!0),2&t&&Sc(n=Dc())&&(e.ratioPreviews=n)},hostAttrs:[1,"controls-drawer"],decls:4,vars:2,consts:[[1,"tool-panel-content"],[1,"aspect-ratios"],["class","custom-ratio-container",4,"ngIf"],["class","aspect-ratio",3,"selected","click",4,"ngFor","ngForOf"],[1,"custom-ratio-container"],[1,"inputs"],[1,"input-container"],["for","width","trans",""],["type","number","id","width","min","1",3,"ngModel","max","ngModelChange"],["for","height","trans",""],["type","number","id","height","min","1",3,"ngModel","max","ngModelChange"],[1,"aspect-ratio",3,"click"],[1,"preview"],["ratioPreview",""],["trans","",1,"name"]],template:function(t,e){1&t&&(ls(0,"div",0),ls(1,"div",1),ns(2,_M,10,4,"div",2),ns(3,bM,5,4,"div",3),cs(),cs()),2&t&&(kr(2),as("ngIf",!e.config.get("pixie.tools.crop.hideCustomControls")),kr(1),as("ngForOf",e.presets))},directives:[uf,lf,QT,fv,zp,Kp,bg],styles:["crop-drawer{display:block}crop-drawer .custom-ratio-container{padding-right:10px;border-right:1px solid var(--be-divider-default)}crop-drawer .custom-ratio-container .input-container{display:inline-block;width:auto;margin:0 15px;text-align:center}crop-drawer .custom-ratio-container .input-container.checkbox-container{text-align:left}crop-drawer .custom-ratio-container .input-container>input{width:95px;height:45px;border-radius:3px}crop-drawer .custom-ratio-container .input-container>label{padding:0}crop-drawer .custom-ratio-container .input-container>.mat-checkbox{display:block}crop-drawer .custom-ratio-container .input-container>.mat-checkbox:first-of-type{margin-bottom:8px}crop-drawer .aspect-ratios{display:flex;align-items:flex-end}crop-drawer .aspect-ratios>.aspect-ratio{cursor:pointer;padding:0 20px}crop-drawer .aspect-ratios>.aspect-ratio.selected,crop-drawer .aspect-ratios>.aspect-ratio:hover .name{color:var(--be-accent-default)}crop-drawer .aspect-ratios>.aspect-ratio>.preview{width:40px;height:30px;border:3px solid}crop-drawer .aspect-ratios>.aspect-ratio>.name{font-size:15px;text-align:center;margin-top:6px}@media only screen and (max-width:1250px){crop-drawer .custom-ratio-container{display:none}}"],encapsulation:2,changeDetection:0}),kM),wM=function(t,e){return{width:t,height:e}};function xM(t,e){if(1&t){var n=ds();ls(0,"button",11),gs("click",(function(){Qe(n);var t=e.$implicit;return ks().drawTool.setBrushSize(t)})),cs()}if(2&t){var i=e.$implicit;Fs("selected",ks().drawTool.getBrushSize()===i),as("ngStyle",(3,r=wM,o=i+"px",a=i+"px",function(t,e,n,i,r,o,a){var s=e+3;return $a(t,s,r,o)?Qa(t,s+2,i(r,o)):hc(t,s+2)}(Ke(),on(),0,r,o,a)))}var r,o,a}function SM(t,e){if(1&t){var n=ds();ls(0,"button",12),gs("click",(function(){Qe(n);var t=e.$implicit;return ks().setBrushType(t)})),us(1,"img",13),cs()}if(2&t){var i=e.$implicit,r=ks();Fs("selected",r.drawTool.getBrushType()==i),kr(1),Ss("alt","",i," brush preview"),as("src",r.getBrushPreviewUrl(i),$i)}}var EM,TM=((EM=function(){function t(e,n,i,r,o,a,s){_classCallCheck(this,t),this.drawTool=e,this.settings=n,this.canvas=i,this.config=r,this.store=o,this.theme=a,this.objects=s,this.brushSizes$=new Df([]),this.brushTypes$=new Df([]),this.currentDrawings=[],this.brushSizes$.next(this.config.get("pixie.tools.draw.brushSizes")),this.brushTypes$.next(this.config.get("pixie.tools.draw.brushTypes"))}return _createClass(t,[{key:"ngOnInit",value:function(){this.drawTool.enable(),this.canvas.fabric().on("object:added",this.maybeMarkAsDirty.bind(this)),this.currentDrawings=this.getAllDrawings().map((function(t){return t.data.id}))}},{key:"ngOnDestroy",value:function(){this.drawTool.disable(),this.canvas.fabric().off("object:added",this.maybeMarkAsDirty.bind(this))}},{key:"getBrushPreviewUrl",value:function(t){var e=t.replace("Brush","").toLowerCase();return this.settings.getAssetUrl("images/brushes/".concat(this.theme.selectedTheme$.value.is_dark?"white":"black","/").concat(e,".png"),!0)}},{key:"setBrushType",value:function(t){this.drawTool.setBrushType(t),this.store.dispatch(new vT)}},{key:"maybeMarkAsDirty",value:function(){var t=this,e=this.getAllDrawings().find((function(e){return-1===t.currentDrawings.indexOf(e.data.id)}));e&&(this.store.dispatch(new dT),e.set({strokeWidth:e.strokeWidth}),this.objects.syncObjects(),this.canvas.render())}},{key:"openBrushControls",value:function(){this.store.dispatch(new pT)}},{key:"getAllDrawings",value:function(){return this.canvas.fabric().getObjects().filter((function(t){return t.name===Ap.drawing.name}))}}]),t}()).\u0275fac=function(t){return new(t||EM)(rs(QO),rs(um),rs(Em),rs(um),rs(pp),rs(zP),rs(Tm))},EM.\u0275cmp=pe({type:EM,selectors:[["draw-drawer"]],hostAttrs:[1,"controls-drawer"],decls:19,vars:17,consts:[[1,"tool-panel-content","main-content"],["trans","",3,"ngModel","ngModelChange"],[1,"brush-type-button-wrapper"],["mat-icon-button","",1,"round-action-button",3,"click"],["svgIcon","pencil-custom"],["trans","",1,"bottom-label"],[1,"brush-sizes","brush-controls"],[1,"sizes","controls"],["class","no-style size control",3,"ngStyle","selected","click",4,"ngFor","ngForOf"],[1,"tool-panel-content","brush-types-content"],["class","no-style button-with-image",3,"selected","click",4,"ngFor","ngForOf"],[1,"no-style","size","control",3,"ngStyle","click"],[1,"no-style","button-with-image",3,"click"],[3,"src","alt"]],template:function(t,e){1&t&&(ls(0,"div",0),fc(1,"async"),ls(2,"color-widget",1),gs("ngModelChange",(function(t){return e.drawTool.currentBrush.color=t}))("ngModelChange",(function(t){return e.drawTool.setBrushColor(t)})),Gs(3,"Brush Color"),cs(),ls(4,"div",2),ls(5,"button",3),gs("click",(function(){return e.openBrushControls()})),us(6,"mat-icon",4),cs(),ls(7,"div",5),Gs(8,"Brush Type"),cs(),cs(),ls(9,"div",6),ls(10,"div",7),ns(11,xM,1,6,"button",8),fc(12,"async"),cs(),ls(13,"div",5),Gs(14,"Brush Size"),cs(),cs(),cs(),ls(15,"div",9),fc(16,"async"),ns(17,SM,2,4,"button",10),fc(18,"async"),cs()),2&t&&(Fs("hidden",dc(1,9,e.brushControlsOpen$)),kr(2),as("ngModel",e.drawTool.currentBrush.color),kr(3),Rs("color",e.drawTool.getBrushColor()),kr(6),as("ngForOf",dc(12,11,e.brushSizes$)),kr(4),Fs("hidden",!dc(16,13,e.brushControlsOpen$)),kr(2),as("ngForOf",dc(18,15,e.brushTypes$)))},directives:[LF,QT,Kp,bg,_S,MI,lf,wf],pipes:[Tf],styles:["draw-drawer .brush-sizes{margin-left:25px}draw-drawer .brush-sizes .sizes{display:flex;align-items:center;margin-top:16px}draw-drawer .brush-sizes .sizes .size{width:10px;height:10px;max-width:30px;max-height:30px;border:3px solid;margin:0 8px;border-radius:50%}draw-drawer .brush-sizes .sizes .size.selected{border-color:var(--be-accent-default)}draw-drawer .brush-sizes .bottom-label{margin-top:17px}draw-drawer .brush-type-button-wrapper{margin:0 15px}@media only screen and (max-width:695px){draw-drawer .main-content{flex-direction:column;justify-content:center}draw-drawer .bottom-label{display:none}draw-drawer .brush-type-button-wrapper{position:absolute;right:5px;top:20px}draw-drawer color-widget{margin-right:auto}draw-drawer .brush-sizes{margin-left:auto}draw-drawer .brush-sizes .sizes{margin-top:10px}draw-drawer.controls-drawer .brush-types-content{justify-content:flex-start}}"],encapsulation:2,changeDetection:0}),ch([xp(mT.brushControlsOpen),uh("design:type",b)],EM.prototype,"brushControlsOpen$",void 0),EM),OM=function(t){return t.display="Display",t.handwriting="Hand Writing",t.monospace="Mono Space",t["sans-serif"]="Sans Serif",t.serif="Serif",t}({}),AM=["underline"],IM=["connectionContainer"],PM=["inputContainer"],DM=["label"];function RM(t,e){1&t&&(hs(0),ls(1,"div",14),us(2,"div",15),us(3,"div",16),us(4,"div",17),cs(),ls(5,"div",18),us(6,"div",15),us(7,"div",16),us(8,"div",17),cs(),fs())}function FM(t,e){1&t&&(ls(0,"div",19),xs(1,1),cs())}function MM(t,e){if(1&t&&(hs(0),xs(1,2),ls(2,"span"),Gs(3),cs(),fs()),2&t){var n=ks(2);kr(3),qs(n._control.placeholder)}}function jM(t,e){1&t&&xs(0,3,["*ngSwitchCase","true"])}function LM(t,e){1&t&&(ls(0,"span",23),Gs(1," *"),cs())}function NM(t,e){if(1&t){var n=ds();ls(0,"label",20,21),gs("cdkObserveContent",(function(){return Qe(n),ks().updateOutlineGap()})),ns(2,MM,4,1,"ng-container",12),ns(3,jM,1,0,void 0,12),ns(4,LM,2,0,"span",22),cs()}if(2&t){var i=ks();Fs("mat-empty",i._control.empty&&!i._shouldAlwaysFloat)("mat-form-field-empty",i._control.empty&&!i._shouldAlwaysFloat)("mat-accent","accent"==i.color)("mat-warn","warn"==i.color),as("cdkObserveContentDisabled","outline"!=i.appearance)("id",i._labelId)("ngSwitch",i._hasLabel()),ts("for",i._control.id)("aria-owns",i._control.id),kr(2),as("ngSwitchCase",!1),kr(1),as("ngSwitchCase",!0),kr(1),as("ngIf",!i.hideRequiredMarker&&i._control.required&&!i._control.disabled)}}function BM(t,e){1&t&&(ls(0,"div",24),xs(1,4),cs())}function zM(t,e){if(1&t&&(ls(0,"div",25,26),us(2,"span",27),cs()),2&t){var n=ks();kr(2),Fs("mat-accent","accent"==n.color)("mat-warn","warn"==n.color)}}function VM(t,e){1&t&&(ls(0,"div"),xs(1,5),cs()),2&t&&as("@transitionMessages",ks()._subscriptAnimationState)}function HM(t,e){if(1&t&&(ls(0,"div",31),Gs(1),cs()),2&t){var n=ks(2);as("id",n._hintLabelId),kr(1),qs(n.hintLabel)}}function WM(t,e){if(1&t&&(ls(0,"div",28),ns(1,HM,2,2,"div",29),xs(2,6),us(3,"div",30),xs(4,7),cs()),2&t){var n=ks();as("@transitionMessages",n._subscriptAnimationState),kr(1),as("ngIf",n.hintLabel)}}var UM,YM,XM=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],GM=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"],qM=0,KM=((UM=function t(){_classCallCheck(this,t),this.id="mat-error-".concat(qM++)}).\u0275fac=function(t){return new(t||UM)},UM.\u0275dir=be({type:UM,selectors:[["mat-error"]],hostAttrs:["role","alert",1,"mat-error"],hostVars:1,hostBindings:function(t,e){2&t&&ts("id",e.id)},inputs:{id:"id"}}),UM),ZM={transitionMessages:Qk("transitionMessages",[eC("enter",tC({opacity:1,transform:"translateY(0%)"})),nC("void => enter",[tC({opacity:0,transform:"translateY(-100%)"}),Jk("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},QM=((YM=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||YM)},YM.\u0275dir=be({type:YM}),YM);function JM(t){return Error("A hint was already declared for 'align=\"".concat(t,"\"'."))}var $M,tj,ej,nj,ij,rj,oj,aj=0,sj=((ij=function t(){_classCallCheck(this,t),this.align="start",this.id="mat-hint-".concat(aj++)}).\u0275fac=function(t){return new(t||ij)},ij.\u0275dir=be({type:ij,selectors:[["mat-hint"]],hostAttrs:[1,"mat-hint"],hostVars:4,hostBindings:function(t,e){2&t&&(ts("id",e.id)("align",null),Fs("mat-right","end"==e.align))},inputs:{align:"align",id:"id"}}),ij),lj=((nj=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||nj)},nj.\u0275dir=be({type:nj,selectors:[["mat-label"]]}),nj),cj=((ej=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||ej)},ej.\u0275dir=be({type:ej,selectors:[["mat-placeholder"]]}),ej),uj=((tj=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||tj)},tj.\u0275dir=be({type:tj,selectors:[["","matPrefix",""]]}),tj),hj=(($M=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||$M)},$M.\u0275dir=be({type:$M,selectors:[["","matSuffix",""]]}),$M),fj=0,dj=Px((function t(e){_classCallCheck(this,t),this._elementRef=e}),"primary"),pj=new Vt("MAT_FORM_FIELD_DEFAULT_OPTIONS"),vj=new Vt("MatFormField"),gj=((oj=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a,s,l,c){var u;return _classCallCheck(this,n),(u=e.call(this,t))._elementRef=t,u._changeDetectorRef=i,u._dir=o,u._defaults=a,u._platform=s,u._ngZone=l,u._outlineGapCalculationNeededImmediately=!1,u._outlineGapCalculationNeededOnStable=!1,u._destroyed=new E,u._showAlwaysAnimate=!1,u._subscriptAnimationState="",u._hintLabel="",u._hintLabelId="mat-hint-".concat(fj++),u._labelId="mat-form-field-label-".concat(fj++),u._labelOptions=r||{},u.floatLabel=u._getDefaultFloatLabelState(),u._animationsEnabled="NoopAnimations"!==c,u.appearance=a&&a.appearance?a.appearance:"legacy",u._hideRequiredMarker=!(!a||null==a.hideRequiredMarker)&&a.hideRequiredMarker,u}return _createClass(n,[{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-".concat(e.controlType)),e.stateChanges.pipe(Xy(null)).subscribe((function(){t._validatePlaceholders(),t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()})),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(Zf(this._destroyed)).subscribe((function(){return t._changeDetectorRef.markForCheck()})),this._ngZone.runOutsideAngular((function(){t._ngZone.onStable.asObservable().pipe(Zf(t._destroyed)).subscribe((function(){t._outlineGapCalculationNeededOnStable&&t.updateOutlineGap()}))})),G(this._prefixChildren.changes,this._suffixChildren.changes).subscribe((function(){t._outlineGapCalculationNeededOnStable=!0,t._changeDetectorRef.markForCheck()})),this._hintChildren.changes.pipe(Xy(null)).subscribe((function(){t._processHints(),t._changeDetectorRef.markForCheck()})),this._errorChildren.changes.pipe(Xy(null)).subscribe((function(){t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()})),this._dir&&this._dir.change.pipe(Zf(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._labelChild}},{key:"_shouldLabelFloat",value:function(){return this._canLabelFloat&&(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,Ay(this._label.nativeElement,"transitionend").pipe(zf(1)).subscribe((function(){t._showAlwaysAnimate=!1}))),this.floatLabel="always",this._changeDetectorRef.markForCheck())}},{key:"_validatePlaceholders",value:function(){if(this._control.placeholder&&this._placeholderChild)throw Error("Placeholder attribute and child element were both specified.")}},{key:"_processHints",value:function(){this._validateHints(),this._syncDescribedByIds()}},{key:"_validateHints",value:function(){var t,e,n=this;this._hintChildren&&this._hintChildren.forEach((function(i){if("start"===i.align){if(t||n.hintLabel)throw JM("start");t=i}else if("end"===i.align){if(e)throw JM("end");e=i}}))}},{key:"_getDefaultFloatLabelState",value:function(){return this._defaults&&this._defaults.floatLabel||this._labelOptions.float||"auto"}},{key:"_syncDescribedByIds",value:function(){if(this._control){var t=[];if("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=this._errorChildren.map((function(t){return t.id})));this._control.setDescribedByIds(t)}}},{key:"_validateControlChild",value:function(){if(!this._control)throw Error("mat-form-field must contain a MatFormFieldControl.")}},{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);var s,l=this._getStartEnd(a),c=this._getStartEnd(t.children[0].getBoundingClientRect()),u=0,h=_createForOfIteratorHelper(t.children);try{for(h.s();!(s=h.n()).done;)u+=s.value.offsetWidth}catch(p){h.e(p)}finally{h.f()}e=Math.abs(c-l)-5,n=u>0?.75*u+10:0}for(var f=0;f<r.length;f++)r[f].style.width="".concat(e,"px");for(var d=0;d<o.length;d++)o[d].style.width="".concat(n,"px");this._outlineGapCalculationNeededOnStable=this._outlineGapCalculationNeededImmediately=!1}else this._outlineGapCalculationNeededImmediately=!0}},{key:"_getStartEnd",value:function(t){return this._dir&&"rtl"===this._dir.value?t.right:t.left}},{key:"_isAttachedToDOM",value:function(){var t=this._elementRef.nativeElement;if(t.getRootNode){var e=t.getRootNode();return e&&e!==t}return document.documentElement.contains(t)}},{key:"appearance",get:function(){return this._appearance},set:function(t){var e=this._appearance;this._appearance=t||this._defaults&&this._defaults.appearance||"legacy","outline"===this._appearance&&e!==t&&(this._outlineGapCalculationNeededOnStable=!0)}},{key:"hideRequiredMarker",get:function(){return this._hideRequiredMarker},set:function(t){this._hideRequiredMarker=xy(t)}},{key:"_shouldAlwaysFloat",get:function(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}},{key:"_canLabelFloat",get:function(){return"never"!==this.floatLabel}},{key:"hintLabel",get:function(){return this._hintLabel},set:function(t){this._hintLabel=t,this._processHints()}},{key:"floatLabel",get:function(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel},set:function(t){t!==this._floatLabel&&(this._floatLabel=t||this._getDefaultFloatLabelState(),this._changeDetectorRef.markForCheck())}},{key:"_control",get:function(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic},set:function(t){this._explicitFormFieldControl=t}},{key:"_labelChild",get:function(){return this._labelChildNonStatic||this._labelChildStatic}}]),n}(dj)).\u0275fac=function(t){return new(t||oj)(rs(kl),rs(Zo),rs(pS,8),rs(v_,8),rs(pj,8),rs(i_),rs(ou),rs(_x,8))},oj.\u0275cmp=pe({type:oj,selectors:[["mat-form-field"]],contentQueries:function(t,e,n){var i;1&t&&(Ac(n,QM,!0),Ic(n,QM,!0),Ac(n,lj,!0),Ic(n,lj,!0),Ac(n,cj,!0),Ac(n,KM,!0),Ac(n,sj,!0),Ac(n,uj,!0),Ac(n,hj,!0)),2&t&&(Sc(i=Dc())&&(e._controlNonStatic=i.first),Sc(i=Dc())&&(e._controlStatic=i.first),Sc(i=Dc())&&(e._labelChildNonStatic=i.first),Sc(i=Dc())&&(e._labelChildStatic=i.first),Sc(i=Dc())&&(e._placeholderChild=i.first),Sc(i=Dc())&&(e._errorChildren=i),Sc(i=Dc())&&(e._hintChildren=i),Sc(i=Dc())&&(e._prefixChildren=i),Sc(i=Dc())&&(e._suffixChildren=i))},viewQuery:function(t,e){var n;1&t&&(Tc(AM,!0),Ec(IM,!0),Tc(PM,!0),Tc(DM,!0)),2&t&&(Sc(n=Dc())&&(e.underlineRef=n.first),Sc(n=Dc())&&(e._connectionContainerRef=n.first),Sc(n=Dc())&&(e._inputContainerRef=n.first),Sc(n=Dc())&&(e._label=n.first))},hostAttrs:[1,"mat-form-field"],hostVars:44,hostBindings:function(t,e){2&t&&Fs("mat-form-field-appearance-standard","standard"==e.appearance)("mat-form-field-appearance-fill","fill"==e.appearance)("mat-form-field-appearance-outline","outline"==e.appearance)("mat-form-field-appearance-legacy","legacy"==e.appearance)("mat-form-field-invalid",e._control.errorState)("mat-form-field-can-float",e._canLabelFloat)("mat-form-field-should-float",e._shouldLabelFloat())("mat-form-field-has-label",e._hasFloatingLabel())("mat-form-field-hide-placeholder",e._hideControlPlaceholder())("mat-form-field-disabled",e._control.disabled)("mat-form-field-autofilled",e._control.autofilled)("mat-focused",e._control.focused)("mat-accent","accent"==e.color)("mat-warn","warn"==e.color)("ng-untouched",e._shouldForward("untouched"))("ng-touched",e._shouldForward("touched"))("ng-pristine",e._shouldForward("pristine"))("ng-dirty",e._shouldForward("dirty"))("ng-valid",e._shouldForward("valid"))("ng-invalid",e._shouldForward("invalid"))("ng-pending",e._shouldForward("pending"))("_mat-animation-noopable",!e._animationsEnabled)},inputs:{color:"color",floatLabel:"floatLabel",appearance:"appearance",hideRequiredMarker:"hideRequiredMarker",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[ml([{provide:vj,useExisting:oj}]),el],ngContentSelectors:GM,decls:15,vars:8,consts:[[1,"mat-form-field-wrapper"],[1,"mat-form-field-flex",3,"click"],["connectionContainer",""],[4,"ngIf"],["class","mat-form-field-prefix",4,"ngIf"],[1,"mat-form-field-infix"],["inputContainer",""],[1,"mat-form-field-label-wrapper"],["class","mat-form-field-label",3,"cdkObserveContentDisabled","id","mat-empty","mat-form-field-empty","mat-accent","mat-warn","ngSwitch","cdkObserveContent",4,"ngIf"],["class","mat-form-field-suffix",4,"ngIf"],["class","mat-form-field-underline",4,"ngIf"],[1,"mat-form-field-subscript-wrapper",3,"ngSwitch"],[4,"ngSwitchCase"],["class","mat-form-field-hint-wrapper",4,"ngSwitchCase"],[1,"mat-form-field-outline"],[1,"mat-form-field-outline-start"],[1,"mat-form-field-outline-gap"],[1,"mat-form-field-outline-end"],[1,"mat-form-field-outline","mat-form-field-outline-thick"],[1,"mat-form-field-prefix"],[1,"mat-form-field-label",3,"cdkObserveContentDisabled","id","ngSwitch","cdkObserveContent"],["label",""],["class","mat-placeholder-required mat-form-field-required-marker","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"mat-placeholder-required","mat-form-field-required-marker"],[1,"mat-form-field-suffix"],[1,"mat-form-field-underline"],["underline",""],[1,"mat-form-field-ripple"],[1,"mat-form-field-hint-wrapper"],["class","mat-hint",3,"id",4,"ngIf"],[1,"mat-form-field-hint-spacer"],[1,"mat-hint",3,"id"]],template:function(t,e){1&t&&(ws(XM),ls(0,"div",0),ls(1,"div",1,2),gs("click",(function(t){return e._control.onContainerClick&&e._control.onContainerClick(t)})),ns(3,RM,9,0,"ng-container",3),ns(4,FM,2,0,"div",4),ls(5,"div",5,6),xs(7),ls(8,"span",7),ns(9,NM,5,16,"label",8),cs(),cs(),ns(10,BM,2,0,"div",9),cs(),ns(11,zM,3,4,"div",10),ls(12,"div",11),ns(13,VM,2,1,"div",12),ns(14,WM,5,2,"div",13),cs(),cs()),2&t&&(kr(3),as("ngIf","outline"==e.appearance),kr(1),as("ngIf",e._prefixChildren.length),kr(5),as("ngIf",e._hasFloatingLabel()),kr(1),as("ngIf",e._suffixChildren.length),kr(1),as("ngIf","outline"!=e.appearance),kr(1),as("ngSwitch",e._getDisplayedMessages()),kr(1),as("ngSwitchCase","error"),kr(1),as("ngSwitchCase","hint"))},directives:[uf,bf,kf,Db],styles:[".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:scaleX(1);transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n",'.mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:"";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n','.mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:" ";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n',".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n",".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n",".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"],encapsulation:2,data:{animation:[ZM.transitionMessages]},changeDetection:0}),oj),mj=((rj=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:rj}),rj.\u0275inj=dt({factory:function(t){return new(t||rj)},imports:[[Pf,Ax,Rb],Ax]}),rj),yj=["trigger"],_j=["panel"];function bj(t,e){if(1&t&&(ls(0,"span",8),Gs(1),cs()),2&t){var n=ks();kr(1),qs(n.placeholder||"\xa0")}}function kj(t,e){if(1&t&&(ls(0,"span"),Gs(1),cs()),2&t){var n=ks(2);kr(1),qs(n.triggerValue||"\xa0")}}function Cj(t,e){1&t&&xs(0,0,["*ngSwitchCase","true"])}function wj(t,e){1&t&&(ls(0,"span",9),ns(1,kj,2,1,"span",10),ns(2,Cj,1,0,void 0,11),cs()),2&t&&(as("ngSwitch",!!ks().customTrigger),kr(2),as("ngSwitchCase",!0))}function xj(t,e){if(1&t){var n=ds();ls(0,"div",12),ls(1,"div",13,14),gs("@transformPanel.done",(function(t){return Qe(n),ks()._panelDoneAnimatingStream.next(t.toState)}))("keydown",(function(t){return Qe(n),ks()._handleKeydown(t)})),xs(3,1),cs(),cs()}if(2&t){var i=ks();as("@transformPanelWrap",void 0),kr(1),Qs("mat-select-panel ",i._getPanelTheme(),""),Rs("transform-origin",i._transformOrigin)("font-size",i._triggerFontSize,"px"),as("ngClass",i.panelClass)("@transformPanel",i.multiple?"showing-multiple":"showing"),ts("id",i.id+"-panel")}}var Sj,Ej,Tj,Oj=[[["mat-select-trigger"]],"*"],Aj=["mat-select-trigger","*"],Ij={transformPanelWrap:Qk("transformPanelWrap",[nC("* => void",iC("@transformPanel",[function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:9,options:t}}()],{optional:!0}))]),transformPanel:Qk("transformPanel",[eC("void",tC({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),eC("showing",tC({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),eC("showing-multiple",tC({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),nC("void => *",Jk("120ms cubic-bezier(0, 0, 0.2, 1)")),nC("* => void",Jk("100ms 25ms linear",tC({opacity:0})))])},Pj=0,Dj=new Vt("mat-select-scroll-strategy"),Rj=new Vt("MAT_SELECT_CONFIG"),Fj={provide:Dj,deps:[vb],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},Mj=function t(e,n){_classCallCheck(this,t),this.source=e,this.value=n},jj=Dx(Rx(Ix(function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;_classCallCheck(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))).errorState=!1,t.stateChanges=new E,t}return _createClass(n,[{key:"updateErrorState",value:function(){var t=this.errorState,e=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);e!==t&&(this.errorState=e,this.stateChanges.next())}}]),n}((function t(e,n,i,r,o){_classCallCheck(this,t),this._elementRef=e,this._defaultErrorStateMatcher=n,this._parentForm=i,this._parentFormGroup=r,this.ngControl=o}))))),Lj=((Tj=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||Tj)},Tj.\u0275dir=be({type:Tj,selectors:[["mat-select-trigger"]]}),Tj),Nj=((Ej=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a,s,l,c,u,h,f,d,p,v){var g;return _classCallCheck(this,n),(g=e.call(this,a,o,l,c,h))._viewportRuler=t,g._changeDetectorRef=i,g._ngZone=r,g._dir=s,g._parentFormField=u,g.ngControl=h,g._liveAnnouncer=p,g._panelOpen=!1,g._required=!1,g._scrollTop=0,g._multiple=!1,g._compareWith=function(t,e){return t===e},g._uid="mat-select-".concat(Pj++),g._destroy=new E,g._triggerFontSize=0,g._onChange=function(){},g._onTouched=function(){},g._optionIds="",g._transformOrigin="top",g._panelDoneAnimatingStream=new E,g._offsetY=0,g._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],g._disableOptionCentering=!1,g._focused=!1,g.controlType="mat-select",g.ariaLabel="",g.optionSelectionChanges=tI((function(){var t=g.options;return t?t.changes.pipe(Xy(t),Ky((function(){return G.apply(void 0,_toConsumableArray2(t.map((function(t){return t.onSelectionChange}))))}))):g._ngZone.onStable.asObservable().pipe(zf(1),Ky((function(){return g.optionSelectionChanges})))})),g.openedChange=new pc,g._openedStream=g.openedChange.pipe(Mf((function(t){return t})),L((function(){}))),g._closedStream=g.openedChange.pipe(Mf((function(t){return!t})),L((function(){}))),g.selectionChange=new pc,g.valueChange=new pc,g.ngControl&&(g.ngControl.valueAccessor=_assertThisInitialized(g)),g._scrollStrategyFactory=d,g._scrollStrategy=g._scrollStrategyFactory(),g.tabIndex=parseInt(f)||0,g.id=g.id,v&&(null!=v.disableOptionCentering&&(g.disableOptionCentering=v.disableOptionCentering),null!=v.typeaheadDebounceInterval&&(g.typeaheadDebounceInterval=v.typeaheadDebounceInterval)),g}return _createClass(n,[{key:"ngOnInit",value:function(){var t=this;this._selectionModel=new m_(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(id(),Zf(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(Zf(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(Zf(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(Xy(null),Zf(this._destroy)).subscribe((function(){t._resetOptions(),t._initializeSelection()}))}},{key:"ngDoCheck",value:function(){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.asObservable().pipe(zf(1)).subscribe((function(){t._triggerFontSize&&t.overlayDir.overlayRef&&t.overlayDir.overlayRef.overlayElement&&(t.overlayDir.overlayRef.overlayElement.style.fontSize="".concat(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.options&&this._setSelectionByValue(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=40===e||38===e||37===e||39===e,i=13===e||32===e,r=this._keyManager;if(!r.isTyping()&&i&&!M_(t)||(this.multiple||t.altKey)&&n)t.preventDefault(),this.open();else if(!this.multiple){var o=this.selected;36===e||35===e?(36===e?r.setFirstItemActive():r.setLastItemActive(),t.preventDefault()):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=40===n||38===n,r=e.isTyping();if(36===n||35===n)t.preventDefault(),36===n?e.setFirstItemActive():e.setLastItemActive();else if(i&&t.altKey)t.preventDefault(),this.close();else if(r||13!==n&&32!==n||!e.activeItem||M_(t))if(!r&&this._multiple&&65===n&&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(zf(1)).subscribe((function(){t._changeDetectorRef.detectChanges(),t._calculateOverlayOffsetX(),t.panel.nativeElement.scrollTop=t._scrollTop}))}},{key:"_getPanelTheme",value:function(){return this._parentFormField?"mat-".concat(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){if(!Array.isArray(t))throw Error("Value must be an array in multiple-selection mode.");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.setActiveItem(n):this.panelOpen||this._keyManager.setActiveItem(-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 Ei()&&console.warn(i),!1}}));return n&&this._selectionModel.select(n),n}},{key:"_initKeyManager",value:function(){var t=this;this._keyManager=new Hb(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Zf(this._destroy)).subscribe((function(){t.panelOpen&&(!t.multiple&&t._keyManager.activeItem&&t._keyManager.activeItem._selectViaInteraction(),t.focus(),t.close())})),this._keyManager.change.pipe(Zf(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=G(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Zf(e)).subscribe((function(e){t._onSelect(e.source,e.isUserInput),e.isUserInput&&!t.multiple&&t._panelOpen&&(t.close(),t.focus())})),G.apply(void 0,_toConsumableArray2(this.options.map((function(t){return t._stateChanges})))).pipe(Zf(e)).subscribe((function(){t._changeDetectorRef.markForCheck(),t.stateChanges.next()})),this._setOptionIds()}},{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(),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 Mj(this,e)),this._changeDetectorRef.markForCheck()}},{key:"_setOptionIds",value:function(){this._optionIds=this.options.map((function(t){return t.id})).join(" ")}},{key:"_highlightCorrectOption",value:function(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}},{key:"_scrollActiveOptionIntoView",value:function(){var t,e,n,i,r=this._keyManager.activeItemIndex||0,o=sS(r,this.options,this.optionGroups);this.panel.nativeElement.scrollTop=(t=r+o,e=this._getItemHeight(),n=this.panel.nativeElement.scrollTop,(i=t*e)<n?i:i+e>n+256?Math.max(0,i-256+e):n)}},{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+=sS(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:"_getAriaLabel",value:function(){return this.ariaLabelledby?null:this.ariaLabel||this.placeholder}},{key:"_getAriaLabelledby",value:function(){return this.ariaLabelledby?this.ariaLabelledby:this._parentFormField&&this._parentFormField._hasFloatingLabel()&&!this._getAriaLabel()&&this._parentFormField._labelId||null}},{key:"_getAriaActiveDescendant",value:function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}},{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:"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=xy(t),this.stateChanges.next()}},{key:"multiple",get:function(){return this._multiple},set:function(t){if(this._selectionModel)throw Error("Cannot change `multiple` mode of select after initialization.");this._multiple=xy(t)}},{key:"disableOptionCentering",get:function(){return this._disableOptionCentering},set:function(t){this._disableOptionCentering=xy(t)}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){if("function"!=typeof t)throw Error("`compareWith` must be a function.");this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){t!==this._value&&(this.writeValue(t),this._value=t)}},{key:"typeaheadDebounceInterval",get:function(){return this._typeaheadDebounceInterval},set:function(t){this._typeaheadDebounceInterval=Sy(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}(jj)).\u0275fac=function(t){return new(t||Ej)(rs(b_),rs(Zo),rs(ou),rs(Vx),rs(kl),rs(v_,8),rs(fg,8),rs(Eg,8),rs(vj,8),rs(Gp,10),os("tabindex"),rs(Dj),rs($b),rs(Rj,8))},Ej.\u0275cmp=pe({type:Ej,selectors:[["mat-select"]],contentQueries:function(t,e,n){var i;1&t&&(Ac(n,Lj,!0),Ac(n,aS,!0),Ac(n,eS,!0)),2&t&&(Sc(i=Dc())&&(e.customTrigger=i.first),Sc(i=Dc())&&(e.options=i),Sc(i=Dc())&&(e.optionGroups=i))},viewQuery:function(t,e){var n;1&t&&(Tc(yj,!0),Tc(_j,!0),Tc(_b,!0)),2&t&&(Sc(n=Dc())&&(e.trigger=n.first),Sc(n=Dc())&&(e.panel=n.first),Sc(n=Dc())&&(e.overlayDir=n.first))},hostAttrs:["role","listbox",1,"mat-select"],hostVars:19,hostBindings:function(t,e){1&t&&gs("keydown",(function(t){return e._handleKeydown(t)}))("focus",(function(){return e._onFocus()}))("blur",(function(){return e._onBlur()})),2&t&&(ts("id",e.id)("tabindex",e.tabIndex)("aria-label",e._getAriaLabel())("aria-labelledby",e._getAriaLabelledby())("aria-required",e.required.toString())("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-owns",e.panelOpen?e._optionIds:null)("aria-multiselectable",e.multiple)("aria-describedby",e._ariaDescribedby||null)("aria-activedescendant",e._getAriaActiveDescendant()),Fs("mat-select-disabled",e.disabled)("mat-select-invalid",e.errorState)("mat-select-required",e.required)("mat-select-empty",e.empty))},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:[ml([{provide:QM,useExisting:Ej},{provide:oS,useExisting:Ej}]),el,sl],ngContentSelectors:Aj,decls:9,vars:9,consts:[["cdk-overlay-origin","","aria-hidden","true",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"],[3,"ngClass","keydown"],["panel",""]],template:function(t,e){if(1&t&&(ws(Oj),ls(0,"div",0,1),gs("click",(function(){return e.toggle()})),ls(3,"div",2),ns(4,bj,2,1,"span",3),ns(5,wj,3,2,"span",4),cs(),ls(6,"div",5),us(7,"div",6),cs(),cs(),ns(8,xj,4,11,"ng-template",7),gs("backdropClick",(function(){return e.close()}))("attach",(function(){return e._onAttached()}))("detach",(function(){return e.close()}))),2&t){var n=is(1);kr(3),as("ngSwitch",e.empty),kr(1),as("ngSwitchCase",!0),kr(1),as("ngSwitchCase",!1),kr(3),as("cdkConnectedOverlayScrollStrategy",e._scrollStrategy)("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",e.panelOpen)("cdkConnectedOverlayPositions",e._positions)("cdkConnectedOverlayMinWidth",null==e._triggerRect?null:e._triggerRect.width)("cdkConnectedOverlayOffsetY",e._offsetY)}},directives:[yb,bf,kf,_b,Cf,af],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:[Ij.transformPanelWrap,Ij.transformPanel]},changeDetection:0}),Ej),Bj=((Sj=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:Sj}),Sj.\u0275inj=dt({factory:function(t){return new(t||Sj)},providers:[Fj],imports:[[Pf,kb,dS,Ax],k_,mj,dS,Ax]}),Sj);function zj(t,e){if(1&t&&(ls(0,"mat-option",19),Gs(1),cs()),2&t){var n=e.$implicit;as("value",n),kr(1),Ks(" ",n," ")}}function Vj(t,e){if(1&t){var n=ds();ls(0,"mat-form-field",16),ls(1,"mat-select",17),gs("selectionChange",(function(t){return Qe(n),ks(2)._changePageSize(t.value)})),ns(2,zj,2,2,"mat-option",18),cs(),cs()}if(2&t){var i=ks(2);as("color",i.color),kr(1),as("value",i.pageSize)("disabled",i.disabled)("aria-label",i._intl.itemsPerPageLabel),kr(1),as("ngForOf",i._displayedPageSizeOptions)}}function Hj(t,e){if(1&t&&(ls(0,"div",20),Gs(1),cs()),2&t){var n=ks(2);kr(1),qs(n.pageSize)}}function Wj(t,e){if(1&t&&(ls(0,"div",12),ls(1,"div",13),Gs(2),cs(),ns(3,Vj,3,5,"mat-form-field",14),ns(4,Hj,2,1,"div",15),cs()),2&t){var n=ks();kr(2),Ks(" ",n._intl.itemsPerPageLabel," "),kr(1),as("ngIf",n._displayedPageSizeOptions.length>1),kr(1),as("ngIf",n._displayedPageSizeOptions.length<=1)}}function Uj(t,e){if(1&t){var n=ds();ls(0,"button",21),gs("click",(function(){return Qe(n),ks().firstPage()})),xn(),ls(1,"svg",7),us(2,"path",22),cs(),cs()}if(2&t){var i=ks();as("matTooltip",i._intl.firstPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),ts("aria-label",i._intl.firstPageLabel)}}function Yj(t,e){if(1&t){var n=ds();xn(),Sn(),ls(0,"button",23),gs("click",(function(){return Qe(n),ks().lastPage()})),xn(),ls(1,"svg",7),us(2,"path",24),cs(),cs()}if(2&t){var i=ks();as("matTooltip",i._intl.lastPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),ts("aria-label",i._intl.lastPageLabel)}}var Xj,Gj,qj,Kj=((Xj=function t(){_classCallCheck(this,t),this.changes=new E,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 ".concat(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)}}).\u0275fac=function(t){return new(t||Xj)},Xj.\u0275prov=ft({factory:function(){return new Xj},token:Xj,providedIn:"root"}),Xj),Zj={provide:Kj,deps:[[new at,new lt,Kj]],useFactory:function(t){return t||new Kj}},Qj=new Vt("MAT_PAGINATOR_DEFAULT_OPTIONS"),Jj=Ix(function(t){return function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;_classCallCheck(this,n);for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r)))._isInitialized=!1,t._pendingSubscribers=[],t.initialized=new b((function(e){t._isInitialized?t._notifySubscriber(e):t._pendingSubscribers.push(e)})),t}return _createClass(n,[{key:"_markInitialized",value:function(){if(this._isInitialized)throw Error("This directive has already been marked as initialized and should not be called twice.");this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}},{key:"_notifySubscriber",value:function(t){t.next(),t.complete()}}]),n}(t)}((function t(){_classCallCheck(this,t)}))),$j=((qj=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;if(_classCallCheck(this,n),(o=e.call(this))._intl=t,o._changeDetectorRef=i,o._pageIndex=0,o._length=0,o._pageSizeOptions=[],o._hidePageSize=!1,o._showFirstLastButtons=!1,o.page=new pc,o._intlChanges=t.changes.subscribe((function(){return o._changeDetectorRef.markForCheck()})),r){var a=r.pageSize,s=r.pageSizeOptions,l=r.hidePageSize,c=r.showFirstLastButtons;null!=a&&(o._pageSize=a),null!=s&&(o._pageSizeOptions=s),null!=l&&(o._hidePageSize=l),null!=c&&(o._showFirstLastButtons=c)}return _possibleConstructorReturn(o)}return _createClass(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<t&&0!=this.pageSize}},{key:"getNumberOfPages",value:function(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}},{key:"_changePageSize",value:function(t){var e=this.pageIndex;this.pageIndex=Math.floor(this.pageIndex*this.pageSize/t)||0,this.pageSize=t,this._emitPageEvent(e)}},{key:"_nextButtonsDisabled",value:function(){return this.disabled||!this.hasNextPage()}},{key:"_previousButtonsDisabled",value:function(){return this.disabled||!this.hasPreviousPage()}},{key:"_updateDisplayedPageSizeOptions",value:function(){this._initialized&&(this.pageSize||(this._pageSize=0!=this.pageSizeOptions.length?this.pageSizeOptions[0]:50),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),-1===this._displayedPageSizeOptions.indexOf(this.pageSize)&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((function(t,e){return t-e})),this._changeDetectorRef.markForCheck())}},{key:"_emitPageEvent",value:function(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}},{key:"pageIndex",get:function(){return this._pageIndex},set:function(t){this._pageIndex=Math.max(Sy(t),0),this._changeDetectorRef.markForCheck()}},{key:"length",get:function(){return this._length},set:function(t){this._length=Sy(t),this._changeDetectorRef.markForCheck()}},{key:"pageSize",get:function(){return this._pageSize},set:function(t){this._pageSize=Math.max(Sy(t),0),this._updateDisplayedPageSizeOptions()}},{key:"pageSizeOptions",get:function(){return this._pageSizeOptions},set:function(t){this._pageSizeOptions=(t||[]).map((function(t){return Sy(t)})),this._updateDisplayedPageSizeOptions()}},{key:"hidePageSize",get:function(){return this._hidePageSize},set:function(t){this._hidePageSize=xy(t)}},{key:"showFirstLastButtons",get:function(){return this._showFirstLastButtons},set:function(t){this._showFirstLastButtons=xy(t)}}]),n}(Jj)).\u0275fac=function(t){return new(t||qj)(rs(Kj),rs(Zo),rs(Qj,8))},qj.\u0275cmp=pe({type:qj,selectors:[["mat-paginator"]],hostAttrs:[1,"mat-paginator"],inputs:{disabled:"disabled",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",color:"color"},outputs:{page:"page"},exportAs:["matPaginator"],features:[el],decls:14,vars:14,consts:[[1,"mat-paginator-outer-container"],[1,"mat-paginator-container"],["class","mat-paginator-page-size",4,"ngIf"],[1,"mat-paginator-range-actions"],[1,"mat-paginator-range-label"],["mat-icon-button","","type","button","class","mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-paginator-page-size"],[1,"mat-paginator-page-size-label"],["class","mat-paginator-page-size-select",3,"color",4,"ngIf"],["class","mat-paginator-page-size-value",4,"ngIf"],[1,"mat-paginator-page-size-select",3,"color"],[3,"value","disabled","aria-label","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(t,e){1&t&&(ls(0,"div",0),ls(1,"div",1),ns(2,Wj,5,3,"div",2),ls(3,"div",3),ls(4,"div",4),Gs(5),cs(),ns(6,Uj,3,5,"button",5),ls(7,"button",6),gs("click",(function(){return e.previousPage()})),xn(),ls(8,"svg",7),us(9,"path",8),cs(),cs(),Sn(),ls(10,"button",9),gs("click",(function(){return e.nextPage()})),xn(),ls(11,"svg",7),us(12,"path",10),cs(),cs(),ns(13,Yj,3,5,"button",11),cs(),cs(),cs()),2&t&&(kr(2),as("ngIf",!e.hidePageSize),kr(3),Ks(" ",e._intl.getRangeLabel(e.pageIndex,e.pageSize,e.length)," "),kr(1),as("ngIf",e.showFirstLastButtons),kr(1),as("matTooltip",e._intl.previousPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),ts("aria-label",e._intl.previousPageLabel),kr(3),as("matTooltip",e._intl.nextPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),ts("aria-label",e._intl.nextPageLabel),kr(3),as("ngIf",e.showFirstLastButtons))},directives:[uf,_S,gR,gj,Nj,lf,aS],styles:[".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;min-height:56px;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}\n"],encapsulation:2,changeDetection:0}),qj),tL=((Gj=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:Gj}),Gj.\u0275inj=dt({factory:function(t){return new(t||Gj)},providers:[Zj],imports:[[Pf,bS,Bj,yR]]}),Gj);function eL(t,e){if(1&t&&(ls(0,"option",13),Gs(1),cs()),2&t){var n=e.$implicit;as("value",n.key),kr(1),qs(n.value)}}function nL(t,e){if(1&t){var n=ds();ls(0,"button",14),gs("click",(function(){Qe(n);var t=e.$implicit;return ks().applyFont(t)})),Gs(1),cs()}if(2&t){var i=e.$implicit;Rs("font-family",i.family),kr(1),qs(i.family)}}var iL,rL,oL,aL=((oL=function(){function t(e,n){_classCallCheck(this,t),this.overlayPanelRef=e,this.fonts=n,this.fontCategories=OM}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this.fonts.init().then((function(){t.fonts.paginator.filters.valueChanges.subscribe((function(){t.paginator.firstPage()}))}))}},{key:"ngOnDestroy",value:function(){this.fonts.paginator.reset()}},{key:"applyFont",value:function(t){this.overlayPanelRef.emitValue(t),this.overlayPanelRef.close()}},{key:"changePage",value:function(t){this.fonts.paginator.setPage(t.pageIndex)}}]),t}()).\u0275fac=function(t){return new(t||oL)(rs(ZT),rs(cE))},oL.\u0275cmp=pe({type:oL,selectors:[["google-fonts-panel"]],viewQuery:function(t,e){var n;1&t&&Ec($j,!0),2&t&&Sc(n=Dc())&&(e.paginator=n.first)},decls:16,vars:10,consts:[[1,"header"],["trans","",1,"name"],[1,"close-button","no-style",3,"click"],["svgIcon","close"],[1,"many-inputs",3,"formGroup"],[1,"input-container","search"],["type","search","placeholder","Search...","formControlName","search","trans-placeholder",""],[1,"input-container","category"],["formControlName","category"],["trans","",3,"value",4,"ngFor","ngForOf"],[1,"fonts"],["class","no-style font",3,"fontFamily","click",4,"ngFor","ngForOf"],[3,"length","pageSize","hidePageSize","page"],["trans","",3,"value"],[1,"no-style","font",3,"click"]],template:function(t,e){1&t&&(ls(0,"div",0),ls(1,"div",1),Gs(2,"Font Picker"),cs(),ls(3,"button",2),gs("click",(function(){return e.overlayPanelRef.close()})),us(4,"mat-icon",3),cs(),cs(),ls(5,"form",4),ls(6,"div",5),us(7,"input",6),cs(),ls(8,"div",7),ls(9,"select",8),ns(10,eL,2,2,"option",9),fc(11,"keyvalue"),cs(),cs(),cs(),ls(12,"div",10),ns(13,nL,2,3,"button",11),fc(14,"async"),cs(),ls(15,"mat-paginator",12),gs("page",(function(t){return e.changePage(t)})),cs()),2&t&&(kr(5),as("formGroup",e.fonts.paginator.filters),kr(5),as("ngForOf",dc(11,6,e.fontCategories)),kr(3),as("ngForOf",dc(14,8,e.fonts.paginator.current$)),kr(2),as("length",e.fonts.paginator.getTotal())("pageSize",10)("hidePageSize",!0))},directives:[QT,MI,kg,Zp,Eg,zp,Kp,Bg,Ev,lf,$j,Tv,Rv],pipes:[Of,Tf],styles:["google-fonts-panel{display:block;width:320px;max-height:90vh;background-color:#fff;background-color:var(--be-background);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);border-radius:4px;color:var(--be-text);overflow:auto}google-fonts-panel .header{display:flex;align-items:center;padding:12px;color:var(--be-accent-contrast);border-bottom:1px solid var(--be-divider-default);background-color:var(--be-primary-default)}google-fonts-panel .header .close-button{margin-left:auto}google-fonts-panel .many-inputs{padding:10px}google-fonts-panel .many-inputs .input-container{width:auto}google-fonts-panel .many-inputs .input-container input{background-color:var(--be-background);border-color:var(--be-divider-default)}google-fonts-panel .fonts{text-align:center;padding:10px 0}google-fonts-panel .fonts .font{display:block;font-size:28px;margin-bottom:10px;width:100%;transition:color .2s ease;text-align:center;line-height:45px}google-fonts-panel .fonts .font:hover{color:var(--be-accent-default)}"],encapsulation:2,changeDetection:0}),oL),sL=((rL=function(){function t(e){_classCallCheck(this,t),this.overlayPanel=e,this.selectedFont$=new Df(null)}return _createClass(t,[{key:"openGoogleFontsPanel",value:function(){var t=this;this.overlayPanel.open(aL,{position:"center",origin:"global"}).valueChanged().subscribe((function(e){t.selectedFont$.next(e),t.propagateChange(e)}))}},{key:"writeValue",value:function(t){this.selectedFont$.next(t)}},{key:"registerOnChange",value:function(t){this.propagateChange=t}},{key:"registerOnTouched",value:function(){}},{key:"fontFamily$",get:function(){return this.selectedFont$.pipe(L((function(t){return t&&"string"!=typeof t?t.family:t})))}}]),t}()).\u0275fac=function(t){return new(t||rL)(rs(WO))},rL.\u0275cmp=pe({type:rL,selectors:[["text-font-selector"]],features:[ml([{provide:Mp,useExisting:rL,multi:!0}])],decls:6,vars:7,consts:[[1,"select-font-button","no-style",3,"click"],[1,"text"],["svgIcon","keyboard-arrow-down"]],template:function(t,e){1&t&&(ls(0,"button",0),gs("click",(function(){return e.openGoogleFontsPanel()})),fc(1,"async"),ls(2,"span",1),Gs(3),fc(4,"async"),cs(),us(5,"mat-icon",2),cs()),2&t&&(Rs("font-family",dc(1,3,e.fontFamily$)),kr(3),qs(dc(4,5,e.fontFamily$)))},directives:[MI],pipes:[Tf],styles:["text-font-selector{display:block;position:relative;font-size:16px;font-weight:500;border:1px solid rgba(0,0,0,.12);border:1px solid var(--be-divider-default);padding:0 10px;width:170px;border-radius:4px}text-font-selector button.select-font-button{display:inline-flex;align-items:center;width:100%;line-height:inherit}text-font-selector button.select-font-button .text{flex:1 1 auto;text-align:center;max-width:calc(100% - 24px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}text-font-selector button.select-font-button .mat-icon{flex:0 0 24px}text-font-selector button.select-font-button svg{display:block}"],encapsulation:2,changeDetection:0}),rL),lL=((iL=function(){function t(e,n,i,r){_classCallCheck(this,t),this.store=e,this.activeObject=n,this.googleFonts=i,this.settings=r}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this.settings.get("pixie.objectDefaults.text.fontFamily"),e=this.settings.get("pixie.tools.text.items",[]).filter((function(t){return"custom"===t.type})).map((function(t){return t.family.toLowerCase()}));if(t){if("string"==typeof t){var n=e.includes(t.toLowerCase());t={family:t,type:n?"custom":"google"}}this.googleFonts.loadIntoDom([t])}}},{key:"addText",value:function(){this.store.dispatch(new OT)}}]),t}()).\u0275fac=function(t){return new(t||iL)(rs(pp),rs(dm),rs(cE),rs(um))},iL.\u0275cmp=pe({type:iL,selectors:[["text-drawer"]],hostAttrs:[1,"controls-drawer"],decls:12,vars:1,consts:[[1,"tool-panel-content",3,"formGroup"],["formControlName","fill","trans",""],[1,"add-text-button-wrapper"],[1,"round-action-button","add-text-button",3,"click"],["svgIcon","add"],["trans","",1,"bottom-label"],[1,"font-selector-wrapper"],["formControlName","fontFamily"]],template:function(t,e){1&t&&(ls(0,"div",0),ls(1,"color-widget",1),Gs(2,"Color Picker"),cs(),ls(3,"div",2),ls(4,"div",3),gs("click",(function(){return e.addText()})),us(5,"mat-icon",4),cs(),ls(6,"div",5),Gs(7,"Add Text"),cs(),cs(),ls(8,"div",6),us(9,"text-font-selector",7),ls(10,"div",5),Gs(11,"Font"),cs(),cs(),cs()),2&t&&as("formGroup",e.activeObject.form)},directives:[Zp,Eg,LF,Kp,Bg,QT,MI,sL],styles:["text-drawer{display:block}text-drawer .font-selector-wrapper{margin-left:25px}text-drawer text-font-selector{line-height:48px;margin-bottom:10px}text-drawer .add-text-button-wrapper{margin:0 25px}@media only screen and (max-width:700px){text-drawer{overflow:hidden}text-drawer.controls-drawer .tool-panel-content{flex-wrap:wrap}text-drawer.controls-drawer .font-selector-wrapper{margin-left:auto}text-drawer.controls-drawer .bottom-label{display:none}text-drawer.controls-drawer .add-text-button-wrapper{margin-top:10px}text-drawer.controls-drawer .add-text-button{background-color:var(--be-accent-default);color:var(--be-accent-contrast);border:none;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);margin-bottom:3px}text-drawer.controls-drawer text-font-selector{margin-left:0}}"],encapsulation:2,changeDetection:0}),iL);function cL(t,e){if(1&t&&(xn(),ls(0,"svg",6),us(1,"path"),cs()),2&t){var n=ks().$implicit;kr(1),ts("d",n.options.path)("stroke-width",n.options.strokeWidth||10)}}function uL(t,e){1&t&&us(0,"mat-icon",7),2&t&&as("svgIcon",ks().$implicit.name+"-custom")}function hL(t,e){if(1&t){var n=ds();ls(0,"button",2),gs("click",(function(){Qe(n);var t=e.$implicit;return ks().addShape(t.name)})),ns(1,cL,2,2,"svg",3),ns(2,uL,1,1,"mat-icon",4),ls(3,"span",5),Gs(4),cs(),cs()}if(2&t){var i=e.$implicit;kr(1),as("ngIf","Path"===i.type),kr(1),as("ngIf","Path"!==i.type),kr(2),qs(i.name)}}var fL,dL=((fL=function(){function t(e,n){_classCallCheck(this,t),this.config=e,this.store=n,this.shapes=this.config.get("pixie.tools.shapes.items")}return _createClass(t,[{key:"addShape",value:function(t){this.store.dispatch(new rT(t))}}]),t}()).\u0275fac=function(t){return new(t||fL)(rs(um),rs(pp))},fL.\u0275cmp=pe({type:fL,selectors:[["shapes-drawer"]],hostAttrs:[1,"controls-drawer"],decls:2,vars:1,consts:[[1,"tool-panel-content"],["class","button-with-image",3,"click",4,"ngFor","ngForOf"],[1,"button-with-image",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -100 512 700",4,"ngIf"],[3,"svgIcon",4,"ngIf"],["trans","",1,"name","bottom-label"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -100 512 700"],[3,"svgIcon"]],template:function(t,e){1&t&&(ls(0,"div",0),ns(1,hL,5,3,"button",1),cs()),2&t&&(kr(1),as("ngForOf",e.shapes))},directives:[lf,uf,QT,MI],styles:["shapes-drawer{display:block}shapes-drawer .content.stickers-visible{justify-content:flex-start}shapes-drawer .button-with-image>svg path{fill:transparent;stroke:currentColor;stroke-width:25}shapes-drawer .basic-shape{margin:0 10px;cursor:pointer}shapes-drawer .basic-shape .preview{background-color:var(--be-accent-default);height:50px}shapes-drawer .basic-shape .rectangle{width:50px}shapes-drawer .basic-shape .circle{width:50px;border-radius:50%}shapes-drawer .basic-shape .triangle{width:50px;background-color:transparent;border-left:18px solid transparent;border-right:18px solid transparent;border-bottom:33px solid var(--be-accent-default)}shapes-drawer .basic-shape .ellipse{width:80px;height:50px;border-radius:50%}shapes-drawer .stickers-drawer .content-wrapper>.shapes{justify-content:normal}shapes-drawer .shape:first-of-type{margin-left:0}"],encapsulation:2,changeDetection:0}),ch([xp(oT.dirty),uh("design:type",b)],fL.prototype,"dirty$",void 0),fL);function pL(t,e){if(1&t&&(ls(0,"span",8),Gs(1),cs()),2&t){var n=ks().$implicit;kr(1),qs(n)}}function vL(t,e){if(1&t){var n=ds();ls(0,"button",4,5),gs("click",(function(){Qe(n);var t=e.$implicit,i=is(1),r=ks().ngIf;return ks().addSticker(r.name,t),i.blur()})),us(2,"img",6),ns(3,pL,2,1,"span",7),cs()}if(2&t){var i=e.$implicit,r=ks().ngIf,o=ks();Fs("no-label",!r.list)("dark-bg",r.darkBg),kr(2),as("src",o.shapesTool.getStickerUrl(r,i),$i),kr(1),as("ngIf",r.list)}}function gL(t,e){if(1&t&&(ls(0,"div",2),ns(1,vL,4,6,"button",3),cs()),2&t){var n=e.ngIf,i=ks();kr(1),as("ngForOf",i.getStickersIterable(n))}}function mL(t,e){if(1&t){var n=ds();ls(0,"div",10),gs("click",(function(){Qe(n);var t=e.$implicit;return ks(2).openStickersCategory(t)})),us(1,"img",11),ls(2,"div",8),Gs(3),cs(),cs()}if(2&t){var i=e.$implicit,r=ks(2);kr(1),as("src",r.shapesTool.getStickerCategoryUrl(i),$i),kr(2),qs(i.name)}}function yL(t,e){if(1&t&&(ls(0,"div",2),ns(1,mL,4,2,"div",9),cs()),2&t){var n=ks();kr(1),as("ngForOf",n.categories)}}var _L,bL,kL=((bL=function(){function t(e,n,i){_classCallCheck(this,t),this.shapesTool=e,this.config=n,this.store=i,this.categories=this.config.get("pixie.tools.stickers.items")}return _createClass(t,[{key:"addSticker",value:function(t,e){var n=this;this.shapesTool.addSticker(t,e).then((function(){n.store.dispatch(new _T)}))}},{key:"openStickersCategory",value:function(t){this.store.dispatch(new yT(t))}},{key:"getStickersIterable",value:function(t){return t.list?t.list:Array.from(Array(t.items).keys())}}]),t}()).\u0275fac=function(t){return new(t||bL)(rs(iT),rs(um),rs(pp))},bL.\u0275cmp=pe({type:bL,selectors:[["stickers-drawer"]],hostAttrs:[1,"controls-drawer"],decls:4,vars:4,consts:[["class","tool-panel-content",4,"ngIf","ngIfElse"],["categoryList",""],[1,"tool-panel-content"],["class","sticker button-with-image",3,"no-label","dark-bg","click",4,"ngFor","ngForOf"],[1,"sticker","button-with-image",3,"click"],["button",""],["alt","Sticker preview image",3,"src"],["class","bottom-label","trans","",4,"ngIf"],["trans","",1,"bottom-label"],["class","category button-with-image",3,"click",4,"ngFor","ngForOf"],[1,"category","button-with-image",3,"click"],["alt","Sticker category preview image",3,"src"]],template:function(t,e){if(1&t&&(ns(0,gL,2,1,"div",0),fc(1,"async"),ns(2,yL,2,1,"ng-template",null,1,jc)),2&t){var n=is(3);as("ngIf",dc(1,2,e.activeCategory$))("ngIfElse",n)}},directives:[uf,lf,QT],pipes:[Tf],styles:["stickers-drawer .button-with-image.dark-bg{background-color:rgba(0,0,0,.12)}"],encapsulation:2,changeDetection:0}),ch([xp(kT.activeCategory),uh("design:type",b)],bL.prototype,"activeCategory$",void 0),bL),CL=((_L=function(){function t(e,n){_classCallCheck(this,t),this.activeObject=e,this.roundTool=n,this.radius=50}return _createClass(t,[{key:"ngOnInit",value:function(){this.roundTool.showPreview()}},{key:"ngOnDestroy",value:function(){this.roundTool.hidePreview()}}]),t}()).\u0275fac=function(t){return new(t||_L)(rs(dm),rs(CT))},_L.\u0275cmp=pe({type:_L,selectors:[["round-drawer"]],hostAttrs:[1,"controls-drawer"],decls:5,vars:1,consts:[[1,"tool-panel-content"],[1,"slider-container"],["trans","",1,"slider-label"],["min","1","max","300",3,"ngModel","input","ngModelChange"]],template:function(t,e){1&t&&(ls(0,"div",0),ls(1,"div",1),ls(2,"div",2),Gs(3,"Radius"),cs(),ls(4,"mat-slider",3),gs("input",(function(t){return e.roundTool.updatePreview(t.value)}))("ngModelChange",(function(t){return e.radius=t})),cs(),cs(),cs()),2&t&&(kr(4),as("ngModel",e.radius))},directives:[QT,vP,Kp,bg],styles:[""],encapsulation:2,changeDetection:0}),_L);function wL(t,e){if(1&t){var n=ds();ls(0,"div",12),ls(1,"button",13),gs("click",(function(t){return Qe(n),ks(2).removeFrame(),t.stopPropagation()})),us(2,"mat-icon",14),cs(),ls(3,"button",13),gs("click",(function(t){Qe(n);var e=ks().$implicit;return ks().showFrameConfig(e),t.stopPropagation()})),us(4,"mat-icon",15),cs(),cs()}}function xL(t,e){if(1&t){var n=ds();ls(0,"div",7),gs("click",(function(){Qe(n);var t=e.$implicit;return ks().selectFrame(t)})),ls(1,"div",8),us(2,"img",9),ns(3,wL,5,0,"div",10),cs(),ls(4,"span",11),Gs(5),cs(),cs()}if(2&t){var i=e.$implicit,r=ks();kr(2),as("src",r.getFrameThumbUrl(i),$i),kr(1),as("ngIf",r.frameIsActive(i)),kr(2),qs(i.display_name||i.name)}}function SL(t,e){1&t&&us(0,"color-widget",16)}var EL,TL,OL,AL,IL,PL,DL,RL,FL,ML=((TL=function(){function t(e,n,i){_classCallCheck(this,t),this.frameTool=e,this.activeFrame=n,this.store=i,this.frameControlsForm=new lg({size:new sg,color:new sg})}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this.frameControlsForm.get("color").valueChanges.subscribe((function(e){t.frameTool.changeColor(e)})),this.frameControlsForm.valueChanges.pipe(Cb(150)).subscribe((function(){t.markAsDirty()}))}},{key:"getFrameThumbUrl",value:function(t){return this.frameTool.patterns.getBaseUrl(t)+"/thumbnail.png"}},{key:"selectFrame",value:function(t){this.markAsDirty(),this.frameTool.add(t.name)}},{key:"scaleFrame",value:function(t){this.frameTool.resize(t)}},{key:"frameIsActive",value:function(t){return this.activeFrame.is(t)}},{key:"removeFrame",value:function(){this.activeFrame.remove()}},{key:"showFrameConfig",value:function(t){this.frameControlsForm.patchValue({size:t.size.default},{emitEvent:!1}),this.store.dispatch(new uT)}},{key:"markAsDirty",value:function(){this.store.dispatch(new cT)}}]),t}()).\u0275fac=function(t){return new(t||TL)(rs(Pm),rs(Om),rs(pp))},TL.\u0275cmp=pe({type:TL,selectors:[["frame-drawer"]],hostAttrs:[1,"controls-drawer"],decls:10,vars:13,consts:[[1,"tool-panel-content","main-content"],["class","button-with-image",3,"click",4,"ngFor","ngForOf"],[1,"tool-panel-content","frame-controls",3,"formGroup"],["formControlName","color",4,"ngIf"],[1,"slider-container"],["trans","",1,"slider-label"],["formControlName","size",3,"min","max","input"],[1,"button-with-image",3,"click"],[1,"image-container"],[3,"src"],["class","button-overlay",4,"ngIf"],["trans","",1,"bottom-label"],[1,"button-overlay"],["mat-icon-button","",3,"click"],["svgIcon","cancel"],["svgIcon","settings"],["formControlName","color"]],template:function(t,e){1&t&&(ls(0,"section",0),fc(1,"async"),ns(2,xL,6,3,"div",1),cs(),ls(3,"section",2),fc(4,"async"),ns(5,SL,1,0,"color-widget",3),ls(6,"div",4),ls(7,"div",5),Gs(8,"Size"),cs(),ls(9,"mat-slider",6),gs("input",(function(t){return e.scaleFrame(t.value)})),cs(),cs(),cs()),2&t&&(Fs("hidden",dc(1,9,e.controlsOpen$)),kr(2),as("ngForOf",e.frameTool.getAll()),kr(1),Fs("hidden",!dc(4,11,e.controlsOpen$)),as("formGroup",e.frameControlsForm),kr(2),as("ngIf",e.activeFrame.isBasic()),kr(4),as("min",e.activeFrame.getMinSize())("max",e.activeFrame.getMaxSize()))},directives:[lf,Zp,Eg,uf,QT,vP,Kp,Bg,_S,MI,LF],pipes:[Tf],styles:["frame-drawer .button-with-image{position:relative}frame-drawer .button-with-image img{border-radius:4px;width:65px;height:65px}frame-drawer .button-with-image .bottom-label{margin-top:3px;font-size:11px}@media only screen and (max-width:599.99px){frame-drawer.controls-drawer .main-content{justify-content:flex-start}frame-drawer .frame-controls{padding:0 15px}}"],encapsulation:2,changeDetection:0}),ch([xp(fT.controlsOpen),uh("design:type",b)],TL.prototype,"controlsOpen$",void 0),TL),jL=((EL=function(){function t(e,n){_classCallCheck(this,t),this.store=e,this.canvas=n,this.colorControl=new sg}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this.colorControl.valueChanges.subscribe((function(e){e&&(t.canvas.fabric().setBackgroundColor(e),t.canvas.render(),t.store.dispatch(new ST))}))}}]),t}()).\u0275fac=function(t){return new(t||EL)(rs(pp),rs(Em))},EL.\u0275cmp=pe({type:EL,selectors:[["canvas-background-drawer"]],hostAttrs:[1,"controls-drawer"],decls:3,vars:1,consts:[[1,"tool-panel-content"],["trans","",3,"formControl"]],template:function(t,e){1&t&&(ls(0,"div",0),ls(1,"color-widget",1),Gs(2,"Canvas Background"),cs(),cs()),2&t&&(kr(1),as("formControl",e.colorControl))},directives:[LF,QT,Kp,xg],styles:[""],encapsulation:2,changeDetection:0}),EL),LL=["button"],NL=["*"],BL=new Vt("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),zL={provide:Mp,useExisting:St((function(){return UL})),multi:!0},VL=function t(){_classCallCheck(this,t)},HL=0,WL=function t(e,n){_classCallCheck(this,t),this.source=e,this.value=n},UL=((OL=function(){function t(e,n){_classCallCheck(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-".concat(HL++),this.valueChange=new pc,this.change=new pc,this.appearance=n&&n.appearance?n.appearance:"standard"}return _createClass(t,[{key:"ngOnInit",value:function(){this._selectionModel=new m_(this.multiple,void 0,!1)}},{key:"ngAfterContentInit",value:function(){var t;(t=this._selectionModel).select.apply(t,_toConsumableArray2(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 WL(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;if(this._rawValue=t,this._buttonToggles)if(this.multiple&&t){if(!Array.isArray(t))throw Error("Value must be an array in multiple-selection mode.");this._clearSelection(),t.forEach((function(t){return e._selectValue(t)}))}else 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=xy(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=xy(t)}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=xy(t),this._buttonToggles&&this._buttonToggles.forEach((function(t){return t._markForCheck()}))}}]),t}()).\u0275fac=function(t){return new(t||OL)(rs(Zo),rs(BL,8))},OL.\u0275dir=be({type:OL,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,n){var i;1&t&&Ac(n,XL,!0),2&t&&Sc(i=Dc())&&(e._buttonToggles=i)},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(ts("aria-disabled",e.disabled),Fs("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:[ml([zL,{provide:VL,useExisting:OL}])]}),OL),YL=Dx((function t(){_classCallCheck(this,t)})),XL=((PL=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,a,s){var l;_classCallCheck(this,n),(l=e.call(this))._changeDetectorRef=i,l._elementRef=r,l._focusMonitor=o,l._isSingleSelector=!1,l._checked=!1,l.ariaLabelledby=null,l._disabled=!1,l.change=new pc;var c=Number(a);return l.tabIndex=c||0===c?c:null,l.buttonToggleGroup=t,l.appearance=s&&s.appearance?s.appearance:"standard",l}return _createClass(n,[{key:"ngOnInit",value:function(){var t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this._type=this._isSingleSelector?"radio":"checkbox",this.id=this.id||"mat-button-toggle-".concat(HL++),this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked)),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 WL(this,this.value))}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}},{key:"buttonId",get:function(){return"".concat(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=xy(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=xy(t)}}]),n}(YL)).\u0275fac=function(t){return new(t||PL)(rs(UL,8),rs(Zo),rs(kl),rs(rk),os("tabindex"),rs(BL,8))},PL.\u0275cmp=pe({type:PL,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){var n;1&t&&Tc(LL,!0),2&t&&Sc(n=Dc())&&(e._buttonElement=n.first)},hostAttrs:[1,"mat-button-toggle"],hostVars:11,hostBindings:function(t,e){1&t&&gs("focus",(function(){return e.focus()})),2&t&&(ts("tabindex",-1)("id",e.id)("name",null),Fs("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:[el],ngContentSelectors:NL,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&&(ws(),ls(0,"button",0,1),gs("click",(function(){return e._onButtonClick()})),ls(2,"div",2),xs(3),cs(),cs(),us(4,"div",3),us(5,"div",4)),2&t){var n=is(1);as("id",e.buttonId)("disabled",e.disabled||null),ts("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),kr(5),as("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[Kx],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{line-height:48px;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 48px}.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}),PL),GL=((IL=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:IL}),IL.\u0275inj=dt({factory:function(t){return new(t||IL)},imports:[[Ax,Zx],Ax]}),IL),qL=((AL=function(){function t(e){_classCallCheck(this,t),this.activeObject=e}return _createClass(t,[{key:"setTextStyle",value:function(t){this.activeObject.form.patchValue({underline:t.value.indexOf("underline")>-1,linethrough:t.value.indexOf("linethrough")>-1,fontStyle:t.value.indexOf("italic")>-1?"italic":"normal"})}}]),t}()).\u0275fac=function(t){return new(t||AL)(rs(dm))},AL.\u0275cmp=pe({type:AL,selectors:[["text-controls-drawer"]],decls:16,vars:5,consts:[[3,"formGroup"],["formControlName","textAlign","aria-label","Text Align",1,"text-align-group"],["value","left"],["svgIcon","format-align-left"],["value","center"],["svgIcon","format-align-center"],["value","right"],["svgIcon","format-align-right"],["aria-label","Text Style",3,"multiple","change"],["value","underline",3,"checked"],["svgIcon","format-underlined"],["value","linethrough",3,"checked"],["svgIcon","format-strikethrough"],["value","italic",3,"checked"],["svgIcon","format-italic"],["formControlName","fontFamily"]],template:function(t,e){1&t&&(hs(0,0),ls(1,"mat-button-toggle-group",1),ls(2,"mat-button-toggle",2),us(3,"mat-icon",3),cs(),ls(4,"mat-button-toggle",4),us(5,"mat-icon",5),cs(),ls(6,"mat-button-toggle",6),us(7,"mat-icon",7),cs(),cs(),ls(8,"mat-button-toggle-group",8),gs("change",(function(t){return e.setTextStyle(t)})),ls(9,"mat-button-toggle",9),us(10,"mat-icon",10),cs(),ls(11,"mat-button-toggle",11),us(12,"mat-icon",12),cs(),ls(13,"mat-button-toggle",13),us(14,"mat-icon",14),cs(),cs(),us(15,"text-font-selector",15),fs()),2&t&&(as("formGroup",e.activeObject.form),kr(8),as("multiple",!0),kr(1),as("checked",e.activeObject.form.get("underline").value),kr(2),as("checked",e.activeObject.form.get("linethrough").value),kr(2),as("checked","italic"===e.activeObject.form.get("fontStyle").value))},directives:[Zp,Eg,UL,Kp,Bg,XL,MI,sL],styles:["text-controls-drawer .mat-button-toggle-group{margin-right:15px}text-controls-drawer text-font-selector{line-height:48px}"],encapsulation:2,changeDetection:0}),AL),KL=["*"],ZL=((DL=function t(e){_classCallCheck(this,t),this.activeObject=e}).\u0275fac=function(t){return new(t||DL)(rs(dm))},DL.\u0275cmp=pe({type:DL,selectors:[["color-controls-drawer"]],inputs:{controlName:"controlName"},ngContentSelectors:KL,decls:2,vars:1,consts:[[3,"formControl"]],template:function(t,e){1&t&&(ws(),ls(0,"color-widget",0),xs(1),cs()),2&t&&as("formControl",e.activeObject.form.get(e.controlName))},directives:[LF,Kp,xg],styles:["color-controls-drawer{display:block}color-controls-drawer color-widget{margin:0 auto}"],encapsulation:2,changeDetection:0}),DL),QL=["colorPickerButton"],JL=((FL=function(){function t(e,n){_classCallCheck(this,t),this.overlayPanel=e,this.activeObject=n}return _createClass(t,[{key:"openColorPicker",value:function(){var t=this;this.overlayPanel.open(PF,{position:DF,origin:this.colorPickerButton}).valueChanged().subscribe((function(e){t.activeObject.form.get("shadow.color").patchValue(e)}))}}]),t}()).\u0275fac=function(t){return new(t||FL)(rs(WO),rs(dm))},FL.\u0275cmp=pe({type:FL,selectors:[["shadow-controls-drawer"]],viewQuery:function(t,e){var n;1&t&&Tc(QL,!0,kl),2&t&&Sc(n=Dc())&&(e.colorPickerButton=n.first)},decls:16,vars:1,consts:[["mat-icon-button","",1,"round-action-button","color-picker-button",3,"click"],["colorPickerButton",""],["svgIcon","color-wheel-custom"],[3,"formGroup"],[1,"slider-container"],["trans","",1,"slider-label"],["min","1","max","20","formControlName","blur"],["min","1","max","20","formControlName","offsetX"],["min","1","max","20","formControlName","offsetY"]],template:function(t,e){1&t&&(ls(0,"button",0,1),gs("click",(function(){return e.openColorPicker()})),us(2,"mat-icon",2),cs(),hs(3,3),ls(4,"div",4),ls(5,"div",5),Gs(6,"Blur"),cs(),us(7,"mat-slider",6),cs(),ls(8,"div",4),ls(9,"div",5),Gs(10,"Offset X"),cs(),us(11,"mat-slider",7),cs(),ls(12,"div",4),ls(13,"div",5),Gs(14,"Offset Y"),cs(),us(15,"mat-slider",8),cs(),fs()),2&t&&(kr(3),as("formGroup",e.activeObject.form.get("shadow")))},directives:[_S,MI,Zp,Eg,QT,vP,Kp,Bg],styles:["shadow-controls-drawer{padding:0 20px}@media only screen and (max-width:599.99px){shadow-controls-drawer{padding:0 5px}shadow-controls-drawer .slider-container{margin:0 5px}}"],encapsulation:2}),FL),$L=((RL=function t(e){_classCallCheck(this,t),this.activeObject=e}).\u0275fac=function(t){return new(t||RL)(rs(dm))},RL.\u0275cmp=pe({type:RL,selectors:[["outline-controls-drawer"]],decls:6,vars:1,consts:[[3,"formGroup"],["formControlName","stroke"],[1,"slider-container"],["trans","",1,"slider-label"],["min","0","max","20","step","1","formControlName","strokeWidth"]],template:function(t,e){1&t&&(hs(0,0),us(1,"color-widget",1),ls(2,"div",2),ls(3,"div",3),Gs(4,"Outline Width"),cs(),us(5,"mat-slider",4),cs(),fs()),2&t&&as("formGroup",e.activeObject.form)},directives:[Zp,Eg,LF,Kp,Bg,QT,vP],styles:["outline-controls-drawer{display:block}outline-controls-drawer .slider-container{margin:0}outline-controls-drawer .tool-panel-content{flex-direction:column}"],encapsulation:2,changeDetection:0}),RL);function tN(t,e){if(1&t){var n=ds();ls(0,"div",4),gs("click",(function(){Qe(n);var t=e.$implicit;return ks().fillWithPattern(t)})),us(1,"div",5),cs()}if(2&t){var i=e.$implicit,r=ks();kr(1),Rs("background-image",r.getTextureBgStyle(i),tr)}}var eN,nN=((eN=function(){function t(e,n,i,r,o){_classCallCheck(this,t),this.activeObject=e,this.settings=n,this.sanitizer=i,this.fillTool=r,this.importTool=o,this.defaultTextures=Array.from(Array(28).keys())}return _createClass(t,[{key:"getTextureBgStyle",value:function(t){return this.sanitizer.bypassSecurityTrustStyle("url("+this.getTextureUrl(t)+")")}},{key:"getTextureUrl",value:function(t){return this.settings.getAssetUrl("images/textures/"+t+".png",!0)}},{key:"fillWithPattern",value:function(t){this.fillTool.withPattern(this.getTextureUrl(t))}},{key:"openUploadDialog",value:function(){var t=this;this.importTool.importAndGetData().then((function(e){t.fillTool.withPattern(e)}))}}]),t}()).\u0275fac=function(t){return new(t||eN)(rs(dm),rs(um),rs(Yk),rs($O),rs(KT))},eN.\u0275cmp=pe({type:eN,selectors:[["texture-controls-drawer"]],decls:5,vars:1,consts:[[1,"button-with-image",3,"click"],["svgIcon","add-image-custom"],["trans","",1,"bottom-label"],["class","texture button-with-image",3,"click",4,"ngFor","ngForOf"],[1,"texture","button-with-image",3,"click"],[1,"bg-image"]],template:function(t,e){1&t&&(ls(0,"div",0),gs("click",(function(){return e.openUploadDialog()})),us(1,"mat-icon",1),ls(2,"div",2),Gs(3,"Upload"),cs(),cs(),ns(4,tN,2,2,"div",3)),2&t&&(kr(4),as("ngForOf",e.defaultTextures))},directives:[MI,QT,lf],styles:["texture-controls-drawer .texture{margin:0 5px}texture-controls-drawer .texture:first-of-type{margin-left:0}"],encapsulation:2,changeDetection:0}),eN);function iN(t,e){if(1&t){var n=ds();ls(0,"div",1),gs("click",(function(){Qe(n);var t=e.index;return ks().fillWithGradient(t)})),us(1,"div",2),cs()}if(2&t){var i=e.index,r=ks();kr(1),Rs("background-image",r.getGradientBgStyle(i+1),tr)}}var rN,oN,aN=((oN=function(){function t(e,n,i,r){_classCallCheck(this,t),this.activeObject=e,this.settings=n,this.sanitizer=i,this.fillTool=r,this.defaultGradients=JO}return _createClass(t,[{key:"getGradientBgStyle",value:function(t){return this.sanitizer.bypassSecurityTrustStyle("url("+this.getGradientUrl(t)+")")}},{key:"getGradientUrl",value:function(t){return this.settings.getAssetUrl("images/gradients/"+t+".png",!0)}},{key:"fillWithGradient",value:function(t){this.fillTool.withGradient(t)}}]),t}()).\u0275fac=function(t){return new(t||oN)(rs(dm),rs(um),rs(Yk),rs($O))},oN.\u0275cmp=pe({type:oN,selectors:[["gradient-controls-drawer"]],decls:1,vars:1,consts:[["class","gradient button-with-image no-label",3,"click",4,"ngFor","ngForOf"],[1,"gradient","button-with-image","no-label",3,"click"],[1,"bg-image"]],template:function(t,e){1&t&&ns(0,iN,2,2,"div",0),2&t&&as("ngForOf",e.defaultGradients)},directives:[lf],styles:[""],encapsulation:2,changeDetection:0}),oN),sN=((rN=function t(e){_classCallCheck(this,t),this.activeObject=e}).\u0275fac=function(t){return new(t||rN)(rs(dm))},rN.\u0275cmp=pe({type:rN,selectors:[["opacity-controls-drawer"]],decls:4,vars:1,consts:[[1,"slider-container"],["trans","",1,"slider-label"],["min","0.1","max","1","step","0.1",3,"formControl"]],template:function(t,e){1&t&&(ls(0,"div",0),ls(1,"div",1),Gs(2,"Opacity"),cs(),us(3,"mat-slider",2),cs()),2&t&&(kr(3),as("formControl",e.activeObject.form.get("opacity")))},directives:[QT,vP,Kp,xg],styles:[""],encapsulation:2,changeDetection:0}),rN);function lN(t,e){if(1&t){var n=ds();ls(0,"div",2),gs("click",(function(){return Qe(n),ks().openPanel("textStyle")})),us(1,"mat-icon",13),ls(2,"div",4),Gs(3,"Text Style"),cs(),cs()}}function cN(t,e){if(1&t){var n=ds();hs(0),ls(1,"div",2),gs("click",(function(){return Qe(n),ks().openPanel("outline")})),us(2,"mat-icon",14),ls(3,"div",4),Gs(4,"Outline"),cs(),cs(),ls(5,"div",2),gs("click",(function(){return Qe(n),ks().openPanel("background")})),us(6,"mat-icon",15),ls(7,"div",4),Gs(8,"Background"),cs(),cs(),fs()}}function uN(t,e){if(1&t){var n=ds();ls(0,"div",2),gs("click",(function(){return Qe(n),ks().openPanel("gradient")})),us(1,"mat-icon",16),ls(2,"div",4),Gs(3,"Gradient"),cs(),cs()}}function hN(t,e){if(1&t){var n=ds();ls(0,"div",2),gs("click",(function(){return Qe(n),ks().replaceImage()})),us(1,"mat-icon",17),ls(2,"div",4),Gs(3,"Replace"),cs(),cs()}}function fN(t,e){1&t&&us(0,"text-controls-drawer",0)}function dN(t,e){1&t&&(ls(0,"color-controls-drawer",18),Gs(1,"Color"),cs())}function pN(t,e){1&t&&us(0,"shadow-controls-drawer",0)}function vN(t,e){1&t&&us(0,"outline-controls-drawer",0)}function gN(t,e){1&t&&(ls(0,"color-controls-drawer",19),Gs(1,"Background Color"),cs())}function mN(t,e){1&t&&us(0,"texture-controls-drawer",0)}function yN(t,e){1&t&&us(0,"gradient-controls-drawer",0)}function _N(t,e){1&t&&us(0,"opacity-controls-drawer",0)}var bN,kN=((bN=function(){function t(e,n,i,r,o){_classCallCheck(this,t),this.activeObject=e,this.history=n,this.store=i,this.importTool=r,this.canvas=o}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this.subscription=this.activeObject.propsChanged$.pipe(zf(1)).subscribe((function(){t.store.dispatch(new Tp)}))}},{key:"ngOnDestroy",value:function(){this.subscription.unsubscribe()}},{key:"openPanel",value:function(t){this.store.dispatch(new Ep(t))}},{key:"replaceImage",value:function(){var t=this;this.importTool.importAndGetData().then((function(e){t.activeObject.get().setSrc(e,(function(){t.canvas.render()}))}))}}]),t}()).\u0275fac=function(t){return new(t||bN)(rs(dm),rs(hE),rs(pp),rs(KT),rs(Em))},bN.\u0275cmp=pe({type:bN,selectors:[["object-settings-drawer"]],hostAttrs:[1,"controls-drawer"],decls:36,vars:27,consts:[[1,"tool-panel-content"],["class","button-with-image",3,"click",4,"ngIf"],[1,"button-with-image",3,"click"],["svgIcon","color-custom"],["trans","",1,"bottom-label"],["svgIcon","shadow-custom"],[4,"ngIf"],["svgIcon","texture-custom"],["svgIcon","opacity-custom"],[3,"ngSwitch"],["class","tool-panel-content",4,"ngSwitchCase"],["class","tool-panel-content","controlName","fill","trans","",4,"ngSwitchCase"],["class","tool-panel-content","controlName","backgroundColor","trans","",4,"ngSwitchCase"],["svgIcon","text-options-custom"],["svgIcon","outline-custom"],["svgIcon","background-custom"],["svgIcon","gradient-custom"],["svgIcon","switch-camera"],["controlName","fill","trans","",1,"tool-panel-content"],["controlName","backgroundColor","trans","",1,"tool-panel-content"]],template:function(t,e){1&t&&(ls(0,"div",0),fc(1,"async"),ns(2,lN,4,0,"div",1),fc(3,"async"),ls(4,"div",2),gs("click",(function(){return e.openPanel("color")})),us(5,"mat-icon",3),ls(6,"div",4),Gs(7,"Color"),cs(),cs(),ls(8,"div",2),gs("click",(function(){return e.openPanel("shadow")})),us(9,"mat-icon",5),ls(10,"div",4),Gs(11,"Shadow"),cs(),cs(),ns(12,cN,9,0,"ng-container",6),fc(13,"async"),ls(14,"div",2),gs("click",(function(){return e.openPanel("texture")})),us(15,"mat-icon",7),ls(16,"div",4),Gs(17,"Texture"),cs(),cs(),ns(18,uN,4,0,"div",1),fc(19,"async"),ls(20,"div",2),gs("click",(function(){return e.openPanel("opacity")})),us(21,"mat-icon",8),ls(22,"div",4),Gs(23,"Opacity"),cs(),cs(),ns(24,hN,4,0,"div",1),fc(25,"async"),cs(),hs(26,9),fc(27,"async"),ns(28,fN,1,0,"text-controls-drawer",10),ns(29,dN,2,0,"color-controls-drawer",11),ns(30,pN,1,0,"shadow-controls-drawer",10),ns(31,vN,1,0,"outline-controls-drawer",10),ns(32,gN,2,0,"color-controls-drawer",12),ns(33,mN,1,0,"texture-controls-drawer",10),ns(34,yN,1,0,"gradient-controls-drawer",10),ns(35,_N,1,0,"opacity-controls-drawer",10),fs()),2&t&&(Fs("hidden",dc(1,15,e.activePanel$)),kr(2),as("ngIf",dc(3,17,e.activeObjIsText$)),kr(10),as("ngIf",!dc(13,19,e.activeObjIsSvg$)),kr(6),as("ngIf",!dc(19,21,e.activeObjIsSvg$)),kr(6),as("ngIf",dc(25,23,e.activeObjIsImage$)),kr(2),as("ngSwitch",dc(27,25,e.activePanel$)),kr(2),as("ngSwitchCase","textStyle"),kr(1),as("ngSwitchCase","color"),kr(1),as("ngSwitchCase","shadow"),kr(1),as("ngSwitchCase","outline"),kr(1),as("ngSwitchCase","background"),kr(1),as("ngSwitchCase","texture"),kr(1),as("ngSwitchCase","gradient"),kr(1),as("ngSwitchCase","opacity"))},directives:[uf,MI,QT,bf,kf,qL,ZL,JL,$L,nN,aN,sN],pipes:[Tf],styles:["object-settings-drawer .button-with-image .mat-icon{margin-top:8px;vertical-align:middle}"],encapsulation:2,changeDetection:0}),ch([xp(dE.activePanel),uh("design:type",b)],bN.prototype,"activePanel$",void 0),ch([xp(DT.activeObjIsText),uh("design:type",b)],bN.prototype,"activeObjIsText$",void 0),ch([xp(DT.activeObjIsSvg),uh("design:type",b)],bN.prototype,"activeObjIsSvg$",void 0),ch([xp(DT.activeObjIsImage),uh("design:type",b)],bN.prototype,"activeObjIsImage$",void 0),bN);function CN(t,e){if(1&t){var n=ds();ls(0,"button",2),gs("click",(function(t){return Qe(n),e.$implicit.action(t)})),us(1,"image-or-icon",3),ls(2,"span",4),Gs(3),cs(),cs()}if(2&t){var i=e.$implicit;kr(1),as("src",i.thumbnail),kr(2),qs(i.name)}}var wN,xN=((wN=function t(e,n){_classCallCheck(this,t),this.config=e,this.store=n,this.items=[],this.items=this.config.get("pixie.ui.nav.customPanels",{}).overlays}).\u0275fac=function(t){return new(t||wN)(rs(um),rs(pp))},wN.\u0275cmp=pe({type:wN,selectors:[["custom-drawer"]],hostAttrs:[1,"controls-drawer"],decls:2,vars:1,consts:[[1,"tool-panel-content"],["class","button-with-image",3,"click",4,"ngFor","ngForOf"],[1,"button-with-image",3,"click"],[3,"src"],["trans","",1,"name","bottom-label"]],template:function(t,e){1&t&&(ls(0,"div",0),ns(1,CN,4,2,"button",1),cs()),2&t&&(kr(1),as("ngForOf",e.items))},directives:[lf,OR,QT],styles:[""],encapsulation:2,changeDetection:0}),ch([xp(DT.activePanel),uh("design:type",b)],wN.prototype,"panelName$",void 0),wN);function SN(t,e){1&t&&us(0,"navigation-bar"),2&t&&as("@controlsAnimation",void 0)}function EN(t,e){1&t&&(ls(0,"span",10),Gs(1,"Cancel"),cs())}function TN(t,e){1&t&&(ls(0,"span",10),Gs(1,"Close"),cs())}function ON(t,e){1&t&&us(0,"filter-drawer"),2&t&&as("@controlsAnimation",void 0)}function AN(t,e){1&t&&us(0,"resize-drawer"),2&t&&as("@controlsAnimation",void 0)}function IN(t,e){1&t&&us(0,"transform-drawer"),2&t&&as("@controlsAnimation",void 0)}function PN(t,e){1&t&&us(0,"crop-drawer"),2&t&&as("@controlsAnimation",void 0)}function DN(t,e){1&t&&us(0,"draw-drawer"),2&t&&as("@controlsAnimation",void 0)}function RN(t,e){1&t&&us(0,"text-drawer"),2&t&&as("@controlsAnimation",void 0)}function FN(t,e){1&t&&us(0,"shapes-drawer"),2&t&&as("@controlsAnimation",void 0)}function MN(t,e){1&t&&us(0,"stickers-drawer"),2&t&&as("@controlsAnimation",void 0)}function jN(t,e){1&t&&us(0,"round-drawer"),2&t&&as("@controlsAnimation",void 0)}function LN(t,e){1&t&&us(0,"frame-drawer"),2&t&&as("@controlsAnimation",void 0)}function NN(t,e){1&t&&us(0,"canvas-background-drawer"),2&t&&as("@controlsAnimation",void 0)}function BN(t,e){1&t&&us(0,"object-settings-drawer"),2&t&&as("@controlsAnimation",void 0)}function zN(t,e){1&t&&us(0,"custom-drawer"),2&t&&as("@controlsAnimation",void 0)}function VN(t,e){if(1&t){var n=ds();hs(0),ns(1,SN,1,1,"navigation-bar",0),ls(2,"div",1),ls(3,"button",2),gs("click",(function(){return Qe(n),ks().imageEditor.cancelChanges()})),ns(4,EN,2,0,"span",3),fc(5,"async"),ns(6,TN,2,0,"ng-template",null,4,jc),cs(),ls(8,"div",5),ns(9,ON,1,1,"filter-drawer",6),ns(10,AN,1,1,"resize-drawer",6),ns(11,IN,1,1,"transform-drawer",6),ns(12,PN,1,1,"crop-drawer",6),ns(13,DN,1,1,"draw-drawer",6),ns(14,RN,1,1,"text-drawer",6),ns(15,FN,1,1,"shapes-drawer",6),ns(16,MN,1,1,"stickers-drawer",6),ns(17,jN,1,1,"round-drawer",6),ns(18,LN,1,1,"frame-drawer",6),ns(19,NN,1,1,"canvas-background-drawer",6),ns(20,BN,1,1,"object-settings-drawer",6),ns(21,zN,1,1,"custom-drawer",7),cs(),ls(22,"button",8),gs("click",(function(){return Qe(n),ks().imageEditor.applyChanges()})),fc(23,"async"),Gs(24,"Apply"),cs(),cs(),ls(25,"floating-object-controls",9),fc(26,"async"),fc(27,"async"),cs(),fs()}if(2&t){var i=e.ngIf,r=is(7),o=ks();kr(1),as("ngIf","navigation"===i),kr(1),Fs("hidden","navigation"===i),as("ngSwitch",i),kr(2),as("ngIf",dc(5,23,o.dirty$))("ngIfElse",r),kr(4),as("suppressX",!1),kr(1),as("ngSwitchCase","filter"),kr(1),as("ngSwitchCase","resize"),kr(1),as("ngSwitchCase","transform"),kr(1),as("ngSwitchCase","crop"),kr(1),as("ngSwitchCase","draw"),kr(1),as("ngSwitchCase","text"),kr(1),as("ngSwitchCase","shapes"),kr(1),as("ngSwitchCase","stickers"),kr(1),as("ngSwitchCase","corners"),kr(1),as("ngSwitchCase","frame"),kr(1),as("ngSwitchCase","background"),kr(1),as("ngSwitchCase","objectSettings"),kr(2),as("disabled",!dc(23,25,o.dirty$)),kr(3),Fs("visible",dc(26,27,o.activeObjId$)),as("mobileMode",dc(27,29,o.compactMode$))}}var HN,WN=((HN=function t(e,n,i,r){_classCallCheck(this,t),this.controls=e,this.activeObject=n,this.breakpoints=i,this.imageEditor=r,this.compactMode$=this.breakpoints.observe("(max-width: 920px)").pipe(L((function(t){return t.matches})))}).\u0275fac=function(t){return new(t||HN)(rs(YO),rs(dm),rs(PT),rs(HP))},HN.\u0275cmp=pe({type:HN,selectors:[["editor-controls"]],decls:2,vars:3,consts:[[4,"ngIf"],[1,"tool-panel-container",3,"ngSwitch"],["mat-raised-button","","trans","",1,"cancel-button",3,"click"],["trans","",4,"ngIf","ngIfElse"],["close",""],["customScrollbar","",1,"drawer-wrapper",3,"suppressX"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-raised-button","","color","accent","trans","",1,"apply-button",3,"disabled","click"],[3,"mobileMode"],["trans",""]],template:function(t,e){1&t&&(ns(0,VN,28,31,"ng-container",0),fc(1,"async")),2&t&&as("ngIf",dc(1,1,e.activePanel$))},directives:[uf,bf,_S,QT,TO,kf,Cf,CR,RR,iM,gM,mM,CM,TM,lL,dL,kL,CL,ML,jL,kN,xN],pipes:[Tf],styles:["editor-controls{display:block;z-index:2;width:100%;background-color:var(--be-background);height:115px;position:relative;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}editor-controls .drawer,editor-controls navigation-bar{position:absolute;top:0;left:0}editor-controls .bottom-label{display:block;margin-top:5px;text-align:center;font-size:13px;text-transform:capitalize;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}editor-controls .button-with-image{text-align:center;cursor:pointer;margin:0 5px;padding:5px;width:90px;height:90px;flex-shrink:0;border-radius:4px;border:1px solid var(--be-divider-default);background-color:var(--be-background);color:var(--be-text);transition:box-shadow .3s ease}editor-controls .button-with-image.no-label>img,editor-controls .button-with-image.no-label>mat-icon{width:80px;height:80px}editor-controls .button-with-image:hover{box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12)}editor-controls .button-with-image .bottom-label{font-size:12px}editor-controls .button-with-image>svg,editor-controls .button-with-image img{display:block;width:60px;height:60px;margin:0 auto}editor-controls .button-with-image .mat-icon{width:40px;height:40px;margin:auto}editor-controls .button-with-image .bg-image{width:100%;height:100%}editor-controls .button-with-image .image-container{width:100%;position:relative;border-radius:3px;overflow:hidden}editor-controls .button-with-image .button-overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:hsla(0,0%,100%,.8);color:var(--be-accent-default);padding-top:5px}editor-controls .button-with-image .button-overlay mat-icon{width:34px;height:34px;line-height:34px}editor-controls .round-action-button{display:flex;justify-content:center;align-items:center;border:1px solid var(--be-divider-default);width:60px;height:60px;line-height:60px;border-radius:50%;cursor:pointer;margin:auto}editor-controls .round-action-button mat-icon{width:45px;height:45px}@media only screen and (max-width:920px){editor-controls .round-action-button{width:40px;height:40px;line-height:40px}editor-controls .round-action-button mat-icon{width:25px;height:25px}}editor-controls .slider-container{display:inline-flex;align-items:center;width:100%;max-width:400px;margin:0 30px}editor-controls .slider-container>.slider-label{text-transform:capitalize;white-space:nowrap;font-size:13px;margin-right:10px;padding-left:8px}editor-controls .slider-container>.mat-slider{flex:1 1 auto}editor-controls.position-bottom floating-object-controls{bottom:120px}"],encapsulation:2,data:{animation:[Qk("controlsAnimation",[nC(":enter",[tC({opacity:0}),Jk("225ms cubic-bezier(.4,0,.2,1)",tC({opacity:1}))]),nC(":leave",[Jk("0ms cubic-bezier(.4,0,.2,1)",tC({opacity:0}))])])]},changeDetection:0}),ch([xp(DT.activePanel),uh("design:type",b)],HN.prototype,"activePanel$",void 0),ch([xp(DT.activeObjId),uh("design:type",b)],HN.prototype,"activeObjId$",void 0),ch([xp(DT.dirty),uh("design:type",b)],HN.prototype,"dirty$",void 0),HN),UN=["canvasWrapper"],YN=["canvasMaskWrapper"];function XN(t,e){1&t&&us(0,"toolbar")}function GN(t,e){1&t&&us(0,"editor-controls",10)}function qN(t,e){if(1&t&&(ls(0,"div",11),Gs(1),cs()),2&t){var n=ks();as("@imageLoadingAnimation",void 0),kr(1),Ks("",n.loadState.message,"...")}}function KN(t,e){1&t&&us(0,"editor-controls",12)}var ZN,QN,JN,$N,tB=((ZN=function(){function t(e,n,i,r,o,a,s,l,c,u,h,f,d,p,v,g){_classCallCheck(this,t),this.canvas=e,this.history=n,this.controls=i,this.breakpoints=r,this.floatingPanels=o,this.canvasKeybinds=a,this.el=s,this.activeObject=l,this.config=c,this.store=u,this.i18n=h,this.importTool=f,this.zoom=d,this.pan=p,this.imageEditor=v,this.cd=g,this.dropzoneConfig={types:[RT.image]},this.loadState={canvasVisible:!1,messageVisible:!1,message:null}}return _createClass(t,[{key:"ngAfterViewInit",value:function(){var t=this;this.canvas.state.wrapperEl=this.canvasWrapper.nativeElement,this.canvas.state.maskWrapperEl=this.canvasMaskWrapper.nativeElement,this.config.all$().pipe(L((function(t){return t.pixie.languages.active})),id()).subscribe((function(){t.setLocalization()})),this.bindToLoadingState(),this.initFabric().then((function(){t.activeObject.init(),t.canvasKeybinds.init(),t.fitCanvasToScreenOnResize(),t.openObjectSettingsOnDoubleClick(),t.closePanelsOnObjectDelete(),t.handleObjectSelection(),t.updateHistoryOnObjectModification(),t.bindToClickOutsideCanvas(),t.ignoreMobileKeyboard(),t.canvasMaskWrapper.nativeElement.classList.remove("not-loaded")}))}},{key:"initFabric",value:function(){var t=document.querySelector("#pixie-canvas");this.canvas.state.fabric=new wm.fabric.Canvas(t),this.canvas.state.fabric.selection=!1,this.canvas.state.fabric.renderOnAddRemove=!1;var e=this.config.get("pixie.textureSize");e&&(wm.fabric.textureSize=e);var n=Op(this.config.get("pixie.objectDefaults.global"));for(var i in n)wm.fabric.Object.prototype[i]=n[i];return this.canvas.state.fabric.on("object:added",(function(t){t.target.data&&t.target.data.id||(t.target.data||(t.target.data={}),t.target.data.id=Ip(10))})),this.pan.init(),this.zoom.init(),this.imageEditor.loadInitialContent()}},{key:"closePanelsOnObjectDelete",value:function(){var t=this;this.canvas.fabric().on("object:delete",(function(){return t.controls.closeCurrentPanel()}))}},{key:"openObjectSettingsOnDoubleClick",value:function(){var t=this;this.canvas.fabric().on("mouse:dblclick",(function(){t.activeObject.getId()&&!t.store.selectSnapshot(DT.dirty)&&t.store.dispatch(new Bu(Ru.OBJECT_SETTINGS))}))}},{key:"updateHistoryOnObjectModification",value:function(){var t=this;this.canvas.fabric().on("object:modified",(function(e){e.e&&!t.store.selectSnapshot(DT.dirty)&&t.history.replaceCurrent()}))}},{key:"handleObjectSelection",value:function(){var t=this;this.canvas.fabric().on("selection:created",(function(e){return t.onObjectSelection(e)})),this.canvas.fabric().on("selection:updated",(function(e){return t.onObjectSelection(e)})),this.canvas.fabric().on("selection:cleared",(function(e){t.store.dispatch(new Yu(null!=e.e))}))}},{key:"onObjectSelection",value:function(t){this.store.dispatch(new Uu(t.target.name,null!=t.e))}},{key:"fitCanvasToScreenOnResize",value:function(){var t=this;Ay(window,"resize").pipe(Cb(200),id()).subscribe((function(){t.canvas.zoom.fitToScreen()}))}},{key:"setLocalization",value:function(){var t=this.config.get("pixie.languages.active","default");if("default"!==t){this.config.get("i18n.enable")||this.config.set("i18n.enable",!0);var e=this.config.get("pixie.languages.custom.".concat(t));this.i18n.setLocalization({name:t,model:new Cy({name:t}),lines:e})}}},{key:"bindToClickOutsideCanvas",value:function(){var t=this;this.canvas.state.wrapperEl.addEventListener("click",(function(e){"canvas"!==e.target.nodeName.toLowerCase()&&t.activeObject.deselect()}))}},{key:"ignoreMobileKeyboard",value:function(){var t=this;this.config.get("pixie.ui.ignoreMobileKeyboard")&&this.breakpoints.isMobile$.pipe(Mf((function(t){return!!t})),zf(1)).subscribe((function(){var e=t.el.nativeElement.offsetHeight;t.config.get("pixie.ui.mode")===Iu.OVERLAY&&(e-=40),t.el.nativeElement.style.minHeight=e+"px"}))}},{key:"onFileDropped",value:function(t){var e=this,n=this.config.get("pixie.tools.import.openDroppedImageAsBackground");this.importTool.loadFile(t[0],{openAsBackground:n}).then((function(t){t&&e.activeObject.select(t)}))}},{key:"bindToLoadingState",value:function(){var t,e=this;this.canvas.state.contentLoadingState$.pipe(Xy({}),L((function(t){return t.date=Date.now(),t})),(function(t){return t.lift(new Gy)}),(t=function(t){var e=_slicedToArray(t,2),n=e[0],i=e[1];return tA(("overlayImage"===i.name||!i.loading&&"blank"!==i.name)&&500-(i.date-n.date)||0)},function(e){return e.lift(new WP(t))})).subscribe((function(t){var n=t[1];e.loadState={canvasVisible:"overlayImage"===n.name||!n.loading,messageVisible:"blank"!==n.name&&n.loading,message:hm[n.name]},e.cd.markForCheck()}))}},{key:"navHidden",get:function(){return this.store.selectSnapshot(DT.navPosition)===Du.NONE}}]),t}()).\u0275fac=function(t){return new(t||ZN)(rs(Em),rs(hE),rs(YO),rs(PT),rs(jP),rs(GP),rs(kl),rs(dm),rs(um),rs(pp),rs(wy),rs(KT),rs(Sm),rs(xm),rs(HP),rs(Zo))},ZN.\u0275cmp=pe({type:ZN,selectors:[["image-editor"]],viewQuery:function(t,e){var n;1&t&&(Tc(UN,!0),Tc(YN,!0)),2&t&&(Sc(n=Dc())&&(e.canvasWrapper=n.first),Sc(n=Dc())&&(e.canvasMaskWrapper=n.first))},hostVars:2,hostBindings:function(t,e){2&t&&Fs("nav-hidden",e.navHidden)},decls:13,vars:13,consts:[[4,"ngIf"],["class","position-top",4,"ngIf"],["backgroundImage","images/viewport-bg.png",1,"canvas-wrapper",3,"fileDropzone","disableDropzoneClick","filesDropped"],["canvasWrapper",""],[1,"canvas-mask-wrapper"],["canvasMaskWrapper",""],["backgroundImage","images/canvas-bg.png",1,"bg-wrapper"],["id","pixie-canvas"],["class","image-loading-message",4,"ngIf"],["class","position-bottom",4,"ngIf"],[1,"position-top"],[1,"image-loading-message"],[1,"position-bottom"]],template:function(t,e){1&t&&(ns(0,XN,1,0,"toolbar",0),fc(1,"async"),ns(2,GN,1,0,"editor-controls",1),fc(3,"async"),ls(4,"div",2,3),gs("filesDropped",(function(t){return e.onFileDropped(t)})),ls(6,"div",4,5),ls(8,"div",6),us(9,"canvas",7),cs(),ns(10,qN,2,2,"div",8),cs(),cs(),ns(11,KN,1,0,"editor-controls",9),fc(12,"async")),2&t&&(as("ngIf",!dc(1,7,e.toolbarHidden$)),kr(2),as("ngIf","top"===dc(3,9,e.navPosition$)),kr(2),as("fileDropzone",e.dropzoneConfig)("disableDropzoneClick",!0),kr(4),as("@fadeInCanvas",e.loadState.canvasVisible),kr(2),as("ngIf",e.loadState.messageVisible),kr(1),as("ngIf","bottom"===dc(12,11,e.navPosition$)))},directives:[uf,qP,JP,aR,WN],pipes:[Tf],styles:[".be-dark-mode .canvas-wrapper{background-image:none!important;background-color:var(--be-background-alternative)}.be-dark-mode .image-loading-message{background-color:#fafafa;color:rgba(0,0,0,.87)}image-editor{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;margin:0 auto;position:relative}image-editor.nav-hidden .canvas-wrapper{height:calc(100% - 50px)}image-editor .canvas-wrapper{height:calc(100% - 165px);width:100%;display:flex;align-items:center}image-editor .canvas-wrapper .canvas-mask-wrapper{margin:auto;position:relative}image-editor .canvas-wrapper .canvas-container{margin:auto}image-editor .image-loading-message{position:absolute;margin:auto;height:32px;top:0;left:0;bottom:0;right:0;z-index:10;padding:6px;border-radius:20px;background-color:var(--be-background-alternative);max-width:140px;text-align:center}#pixie-canvas,image-editor .image-loading-message{box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}"],encapsulation:2,data:{animation:[Qk("imageLoadingAnimation",[nC(":enter",[tC({transform:"translateY(60%)"}),Jk("325ms cubic-bezier(.4,0,.2,1)",tC({opacity:1,transform:"translateY(0%)"}))]),nC(":leave",[Jk("325ms cubic-bezier(.4,0,.2,1)",tC({opacity:0,transform:"translateY(-60%)"}))])]),Qk("fadeInCanvas",[eC("true",tC({opacity:1,boxShadow:"*"})),eC("false",tC({opacity:0,boxShadow:"none"})),nC("* => true",Jk("325ms ease-in"))])]},changeDetection:0}),ch([xp(DT.navPosition),uh("design:type",b)],ZN.prototype,"navPosition$",void 0),ch([xp(DT.toolbarHidden),uh("design:type",b)],ZN.prototype,"toolbarHidden$",void 0),ZN),eB=["overlay"],nB=["*"],iB=(($N=function(){function t(e,n,i){_classCallCheck(this,t),this.store=e,this.config=n,this.el=i}return _createClass(t,[{key:"ngOnInit",value:function(){this.bindToOverlayClick(this.overlay)}},{key:"bindToOverlayClick",value:function(t){var e=this;t.nativeElement.addEventListener("click",(function(){e.store.dispatch(new Nu)}))}},{key:"onAnimationStart",value:function(){this.el.nativeElement.style.display="block"}},{key:"onAnimationEnd",value:function(){this.el.nativeElement.style.display=this.editorVisible?"block":"none"}},{key:"editorVisible",get:function(){return this.store.selectSnapshot(DT.visible)}},{key:"overlayMode",get:function(){return this.store.selectSnapshot(DT.mode)===Iu.OVERLAY}},{key:"inlineMode",get:function(){return this.store.selectSnapshot(DT.mode)===Iu.INLINE}},{key:"width",get:function(){return this.config.get("pixie.ui.width")}},{key:"height",get:function(){return this.config.get("pixie.ui.height")}},{key:"compact",get:function(){return this.config.get("pixie.ui.compact")}}]),t}()).\u0275fac=function(t){return new(t||$N)(rs(pp),rs(um),rs(kl))},$N.\u0275cmp=pe({type:$N,selectors:[["pixie-editor"]],viewQuery:function(t,e){var n;1&t&&Ec(eB,!0),2&t&&Sc(n=Dc())&&(e.overlay=n.first)},hostVars:11,hostBindings:function(t,e){1&t&&ms("@editorVisible.start",(function(){return e.onAnimationStart()}))("@editorVisible.done",(function(){return e.onAnimationEnd()})),2&t&&($s("@editorVisible",e.editorVisible),Rs("width",e.width)("height",e.height),Fs("mode-overlay",e.overlayMode)("mode-inline",e.inlineMode)("ui-compact",e.compact))},ngContentSelectors:nB,decls:5,vars:0,consts:[[1,"overlay"],["overlay",""],[1,"loader"]],template:function(t,e){1&t&&(ws(),us(0,"image-editor"),us(1,"div",0,1),ls(3,"div",2),xs(4),cs())},directives:[tB],styles:["pixie-editor{display:block;width:100%;height:100%}pixie-editor .overlay{display:none}"],encapsulation:2,data:{animation:[Qk("editorVisible",[eC("true",tC({opacity:"*"})),eC("false",tC({opacity:"0"})),nC("true <=> false",Jk("325ms cubic-bezier(.4,0,.2,1)"))])]},changeDetection:0}),$N),rB=((JN=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var r;return _classCallCheck(this,n),(r=e.call(this,t,i)).i18n=t,r.toast=i,r}return _createClass(n,[{key:"handle403Error",value:function(t){}}]),n}(oE)).\u0275fac=function(t){return new(t||JN)(Zt(wy),Zt(rE))},JN.\u0275prov=ft({token:JN,factory:JN.\u0275fac,providedIn:"root"}),JN),oB=((QN=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:QN}),QN.\u0275inj=dt({factory:function(t){return new(t||QN)}}),QN);function aB(t,e){return function(){return t.setMultiple(Object.assign(Object.assign({},{base_url:e.baseUrl,version:"2.2.2",logging:{sentry_public:e.sentry_public},vebto:{environment:"production"},themes:{default_mode:e.ui.defaultTheme}}),{pixie:e})),new Promise((function(t){return t()}))}}var sB,lB,cB,uB,hB,fB,dB,pB,vB,gB,mB,yB,_B=((gB=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:gB}),gB.\u0275inj=dt({factory:function(t){return new(t||gB)},providers:[{provide:Lc,useFactory:aB,deps:[um,Mu],multi:!0},um,{provide:oE,useClass:rB},Em,xm,Sm,fm,GP,Tm,dm,HE,UE,hE,XO,ZE,tT,QO,uE,iT,JE,KT,$O,$E,CT,QE,Pm,Am,Om,Im,VP],imports:[[Pf,oB,kp.forRoot([DT,WE,GE,nT,lT,mT,oT,kT,dE,IT,fT,xT,TT,bm],{developmentMode:!1})],oB]}),gB),bB=((vB=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:vB}),vB.\u0275inj=dt({factory:function(t){return new(t||vB)},providers:[cE,lE],imports:[[Yg,Pf,by,oB,jI,yR,tL]]}),vB),kB=((pB=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:pB}),pB.\u0275inj=dt({factory:function(t){return new(t||pB)}}),pB),CB=((dB=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:dB}),dB.\u0275inj=dt({factory:function(t){return new(t||dB)},imports:[[by]]}),dB),wB=((fB=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:fB}),fB.\u0275inj=dt({factory:function(t){return new(t||fB)}}),fB),xB=((hB=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:hB}),hB.\u0275inj=dt({factory:function(t){return new(t||hB)},imports:[[wB,Zx,Ax,Rb],wB,Ax]}),hB),SB=((uB=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:uB}),uB.\u0275inj=dt({factory:function(t){return new(t||uB)},imports:[[Pf,jI]]}),uB),EB=((cB=function t(){_classCallCheck(this,t)}).components={panel:PF},cB.\u0275mod=ye({type:cB}),cB.\u0275inj=dt({factory:function(t){return new(t||cB)},imports:[[Pf,AF,kb,oB,jI]]}),cB),TB=((lB=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:lB}),lB.\u0275inj=dt({factory:function(t){return new(t||lB)},providers:[rE],imports:[[Pf,Ug,Yg,bB,kB,CB,_B,SB,EB,PP,bS,vM,jI,xB,eE,cP,FD,GL,yR]]}),lB),OB=((sB=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"_createContainer",value:function(){var t=document.createElement("div");t.classList.add("editor-overlay-container","cdk-overlay-container"),document.querySelector("image-editor").appendChild(t),this._containerElement=t}}]),n}(tb)).\u0275fac=function(t){return AB(t||sB)},sB.\u0275prov=ft({token:sB,factory:sB.\u0275fac}),sB),AB=ui(OB),IB={"--be-primary-lighter":"#3e4a66","--be-primary-default":"#2B3346","--be-primary-darker":"#181c26","--be-accent-default":"#1565C0","--be-accent-lighter":"#B9D1EC","--be-accent-contrast":"rgba(255, 255, 255, 1)","--be-accent-emphasis":"rgba(185, 209, 236, 0.1)","--be-background":"rgb(255, 255, 255)","--be-background-alternative":"rgb(250, 250, 250)","--be-foreground-base":"black","--be-text":"rgba(0, 0, 0, 0.87)","--be-hint-text":"rgba(0, 0, 0, 0.38)","--be-secondary-text":"rgba(0, 0, 0, 0.54)","--be-label":"rgba(0, 0, 0, 0.87)","--be-disabled-button-text":"rgba(0, 0, 0, 0.26)","--be-divider-lighter":"rgba(0, 0, 0, 0.07)","--be-divider-default":"rgba(0, 0, 0, 0.12)","--be-hover":"rgba(0,0,0,0.04)","--be-selected-button":"rgb(224, 224, 224)","--be-chip":"#e0e0e0","--be-link":"#3f51b5","--be-backdrop":"black","--be-raised-button":"#fff","--be-disabled-toggle":"rgb(238, 238, 238)","--be-disabled-button":"rgba(0, 0, 0, 0.12)"},PB={"--be-primary-lighter":"#2a2a2a","--be-primary-default":"#262626","--be-primary-darker":"#181c26","--be-accent-default":"#8AB2E0","--be-accent-lighter":"#B9D1EC","--be-accent-contrast":"rgba(255, 255, 255, 1)","--be-accent-emphasis":"rgba(185, 209, 236, 0.1)","--be-foreground-base":"#fff","--be-text":"#fff","--be-hint-text":"rgba(255, 255, 255, 0.5)","--be-secondary-text":"rgba(255, 255, 255, 0.7)","--be-label":"rgba(255, 255, 255, 0.7)","--be-background":"#1D1D1D","--be-background-alternative":"#121212","--be-divider-lighter":"rgba(255, 255, 255, 0.07)","--be-divider-default":"rgba(255, 255, 255, 0.12)","--be-disabled-button-text":"rgba(255, 255, 255, 0.3)","--be-disabled-toggle":"#000","--be-chip":"#616161","--be-hover":"rgba(255, 255, 255, 0.04)","--be-selected-button":"#212121","--be-disabled-button":"rgba(255, 255, 255, 0.12)","--be-raised-button":"#424242","--be-backdrop":"#BDBDBD","--be-link":"#c5cae9"},DB={light:{name:"light",colors:IB},dark:{name:"dark",is_dark:!0,colors:PB},blue:{name:"blue",colors:Object.assign(Object.assign({},IB),{"--be-primary-default":"#0069c0","--be-primary-lighter":"#2196f3","--be-accent-default":"#009688","--be-accent-lighter":"#52c7b8"})},orange:{name:"orange",colors:Object.assign(Object.assign({},IB),{"--be-primary-default":"#e53935","--be-primary-lighter":"#ff6f60","--be-accent-default":"#e53935","--be-accent-lighter":"#ff6f60"})}},RB=((yB=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:yB}),yB.\u0275inj=dt({factory:function(t){return new(t||yB)},imports:[[Pf,Ax],Ax]}),yB),FB=((mB=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:mB}),mB.\u0275inj=dt({factory:function(t){return new(t||mB)},imports:[[Pf,bS,RB,jI]]}),mB);function MB(){return(MB=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function jB(t){return function(t){if(Array.isArray(t))return LB(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return LB(t,void 0);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)?LB(t,void 0):void 0}}(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 LB(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function NB(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mimeType:e.mimeType||null,onBeforeSend:e.onBeforeSend||Function.prototype,onSuccess:e.onSuccess||Function.prototype,onError:e.onError||Function.prototype,onComplete:e.onComplete||Function.prototype},i=Array.isArray(t)?t:[t],r=Array.apply(null,Array(i.length)).map((function(t){return null}));function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e="<"===t.trim().charAt(0);return!e}function a(t,e){n.onError(t,i[e],e)}function s(t,e){var o=n.onSuccess(t,i[e],e);r[e]=t=!1===o?"":o||t,-1===r.indexOf(null)&&n.onComplete(r)}var l=document.createElement("a");i.forEach((function(t,e){if(l.setAttribute("href",t),l.href=String(l.href),Boolean(document.all&&!window.atob)&&l.host.split(":")[0]!==location.host.split(":")[0])if(l.protocol===location.protocol){var i=new XDomainRequest;i.open("GET",t),i.timeout=0,i.onprogress=Function.prototype,i.ontimeout=Function.prototype,i.onload=function(){o(i.responseText)?s(i.responseText,e):a(i,e)},i.onerror=function(t){a(i,e)},setTimeout((function(){i.send()}),0)}else console.warn("Internet Explorer 9 Cross-Origin (CORS) requests must use the same protocol (".concat(t,")")),a(null,e);else{var r=new XMLHttpRequest;r.open("GET",t),n.mimeType&&r.overrideMimeType&&r.overrideMimeType(n.mimeType),n.onBeforeSend(r,t,e),r.onreadystatechange=function(){4===r.readyState&&(200===r.status&&o(r.responseText)?s(r.responseText,e):a(r,e))},r.send()}}))}function BB(t){var e=/\/\*[\s\S]+?\*\//g,n=/(?:@import\s*)(?:url\(\s*)?(?:['"])([^'"]*)(?:['"])(?:\s*\))?(?:[^;]*;)/g,i={rootElement:t.rootElement||document,include:t.include||'style,link[rel="stylesheet"]',exclude:t.exclude||null,filter:t.filter||null,skipDisabled:!1!==t.skipDisabled,useCSSOM:t.useCSSOM||!1,onBeforeSend:t.onBeforeSend||Function.prototype,onSuccess:t.onSuccess||Function.prototype,onError:t.onError||Function.prototype,onComplete:t.onComplete||Function.prototype},r=Array.apply(null,i.rootElement.querySelectorAll(i.include)).filter((function(t){return!((e=t).matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector).call(e,i.exclude);var e})),o=Array.apply(null,Array(r.length)).map((function(t){return null}));function a(){if(-1===o.indexOf(null)){var t=o.join("");i.onComplete(t,o,r)}}function s(t,e,n,r){var s=i.onSuccess(t,n,r);!function t(e,n,r,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],c=l(e,r,s);c.rules.length?NB(c.absoluteUrls,{onBeforeSend:function(t,e,r){i.onBeforeSend(t,n,e)},onSuccess:function(t,e,r){var o=i.onSuccess(t,n,e),a=l(t=!1===o?"":o||t,e,s);return a.rules.forEach((function(e,n){t=t.replace(e,a.absoluteRules[n])})),t},onError:function(i,l,u){a.push({xhr:i,url:l}),s.push(c.rules[u]),t(e,n,r,o,a,s)},onComplete:function(i){i.forEach((function(t,n){e=e.replace(c.rules[n],t)})),t(e,n,r,o,a,s)}}):o(e,a)}(t=void 0!==s&&!1===Boolean(s)?"":s||t,n,r,(function(t,r){null===o[e]&&(r.forEach((function(t){return i.onError(t.xhr,n,t.url)})),o[e]=!i.filter||i.filter.test(t)?t:"",a())}))}function l(t,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o={};return o.rules=(t.replace(e,"").match(n)||[]).filter((function(t){return-1===r.indexOf(t)})),o.urls=o.rules.map((function(t){return t.replace(n,"$1")})),o.absoluteUrls=o.urls.map((function(t){return zB(t,i)})),o.absoluteRules=o.rules.map((function(t,e){var n=o.urls[e],r=zB(o.absoluteUrls[e],i);return t.replace(n,r)})),o}r.length?r.forEach((function(t,e){var n=t.getAttribute("href"),r=t.getAttribute("rel"),l="LINK"===t.nodeName&&n&&r&&-1!==r.toLowerCase().indexOf("stylesheet"),c=!1!==i.skipDisabled&&t.disabled,u="STYLE"===t.nodeName;if(l&&!c)NB(n,{mimeType:"text/css",onBeforeSend:function(e,n,r){i.onBeforeSend(e,t,n)},onSuccess:function(i,r,o){var a=zB(n);s(i,e,t,a)},onError:function(n,r,s){o[e]="",i.onError(n,t,r),a()}});else if(u&&!c){var h=t.textContent;i.useCSSOM&&(h=Array.apply(null,t.sheet.cssRules).map((function(t){return t.cssText})).join("")),s(h,e,t,location.href)}else o[e]="",a()})):i.onComplete("",[])}function zB(t,e){var n=document.implementation.createHTMLDocument(""),i=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(i),n.body.appendChild(r),i.href=e||document.baseURI||(document.querySelector("base")||{}).href||location.href,r.href=t,r.href}var VB=HB;function HB(t,e,n){t instanceof RegExp&&(t=WB(t,n)),e instanceof RegExp&&(e=WB(e,n));var i=UB(t,e,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+t.length,i[1]),post:n.slice(i[1]+e.length)}}function WB(t,e){var n=e.match(t);return n?n[0]:null}function UB(t,e,n){var i,r,o,a,s,l=n.indexOf(t),c=n.indexOf(e,l+1),u=l;if(l>=0&&c>0){for(i=[],o=n.length;u>=0&&!s;)u==l?(i.push(u),l=n.indexOf(t,u+1)):1==i.length?s=[i.pop(),c]:((r=i.pop())<o&&(o=r,a=c),c=n.indexOf(e,u+1)),u=l<c&&l>=0?l:c;i.length&&(s=[o,a])}return s}function YB(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={preserveStatic:!0,removeComments:!1},i=MB({},n,e),r=[];function o(t){throw new Error("CSS parse error: ".concat(t))}function a(e){var n=e.exec(t);if(n)return t=t.slice(n[0].length),n}function s(){return a(/^{\s*/)}function l(){return a(/^}/)}function c(){a(/^\s*/)}function u(){if(c(),"/"===t[0]&&"*"===t[1]){for(var e=2;t[e]&&("*"!==t[e]||"/"!==t[e+1]);)e++;if(!t[e])return o("end of comment is missing");var n=t.slice(2,e);return t=t.slice(e+2),{type:"comment",comment:n}}}function h(){for(var t,e=[];t=u();)e.push(t);return i.removeComments?[]:e}function f(){for(c();"}"===t[0];)o("extra closing bracket");var e=a(/^(("(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^{])+)/);if(e)return e[0].trim().replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(t){return t.replace(/,/g,"\u200c")})).split(/\s*(?![^(]*\)),\s*/).map((function(t){return t.replace(/\u200C/g,",")}))}function d(){if("@"===t[0])return E();a(/^([;\s]*)+/);var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=a(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(n){if(n=n[0].trim(),!a(/^:\s*/))return o("property missing ':'");var i=a(/^((?:\/\*.*?\*\/|'(?:\\'|.)*?'|"(?:\\"|.)*?"|\((\s*'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^)]*?)\s*\)|[^};])+)/),r={type:"declaration",property:n.replace(e,""),value:i?i[0].replace(e,"").trim():""};return a(/^[;\s]*/),r}}function p(){if(!s())return o("missing '{'");for(var t,e=h();t=d();)e.push(t),e=e.concat(h());return l()?e:o("missing '}'")}function v(){c();for(var t,e=[];t=a(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)e.push(t[1]),a(/^,\s*/);if(e.length)return{type:"keyframe",values:e,declarations:p()}}function g(){var t=a(/^@([-\w]+)?keyframes\s*/);if(t){var e=t[1];if(!(t=a(/^([-\w]+)\s*/)))return o("@keyframes missing name");var n,i=t[1];if(!s())return o("@keyframes missing '{'");for(var r=h();n=v();)r.push(n),r=r.concat(h());return l()?{type:"keyframes",name:i,vendor:e,keyframes:r}:o("@keyframes missing '}'")}}function m(){if(a(/^@page */))return{type:"page",selectors:f()||[],declarations:p()}}function y(){var t=a(/@(top|bottom|left|right)-(left|center|right|top|middle|bottom)-?(corner)?\s*/);if(t)return{type:"page-margin-box",name:"".concat(t[1],"-").concat(t[2])+(t[3]?"-".concat(t[3]):""),declarations:p()}}function _(){if(a(/^@font-face\s*/))return{type:"font-face",declarations:p()}}function b(){var t=a(/^@supports *([^{]+)/);if(t)return{type:"supports",supports:t[1].trim(),rules:O()}}function k(){if(a(/^@host\s*/))return{type:"host",rules:O()}}function C(){var t=a(/^@media([^{]+)*/);if(t)return{type:"media",media:(t[1]||"").trim(),rules:O()}}function w(){var t=a(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return{type:"custom-media",name:t[1].trim(),media:t[2].trim()}}function x(){var t=a(/^@([-\w]+)?document *([^{]+)/);if(t)return{type:"document",document:t[2].trim(),vendor:t[1]?t[1].trim():null,rules:O()}}function S(){var t=a(/^@(import|charset|namespace)\s*([^;]+);/);if(t)return{type:t[1],name:t[2].trim()}}function E(){if(c(),"@"===t[0]){var e=S()||_()||C()||g()||b()||x()||w()||k()||m()||y();return e&&!i.preserveStatic?(e.declarations?e.declarations.some((function(t){return/var\(/.test(t.value)})):(e.keyframes||e.rules||[]).some((function(t){return(t.declarations||[]).some((function(t){return/var\(/.test(t.value)}))})))?e:{}:e}}function T(){if(!i.preserveStatic){var e=VB("{","}",t);if(e){var n=/:(?:root|host)(?![.:#(])/.test(e.pre)&&/--\S*\s*:/.test(e.body),r=/var\(/.test(e.body);if(!n&&!r)return t=t.slice(e.end+1),{}}}var a=f()||[],s=i.preserveStatic?p():p().filter((function(t){var e=a.some((function(t){return/:(?:root|host)(?![.:#(])/.test(t)}))&&/^--\S/.test(t.property),n=/var\(/.test(t.value);return e||n}));return a.length||o("selector missing"),{type:"rule",selectors:a,declarations:s}}function O(e){if(!e&&!s())return o("missing '{'");for(var n,i=h();t.length&&(e||"}"!==t[0])&&(n=E()||T());)n.type&&i.push(n),i=i.concat(h());return e||l()?i:o("missing '}'")}return{type:"stylesheet",stylesheet:{rules:O(!0),errors:r}}}function XB(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={parseHost:!1,store:{},onWarning:function(){}},i=MB({},n,e),r=new RegExp(":".concat(i.parseHost?"host":"root","$"));return"string"==typeof t&&(t=YB(t,i)),t.stylesheet.rules.forEach((function(t){"rule"===t.type&&t.selectors.some((function(t){return r.test(t)}))&&t.declarations.forEach((function(t,e){var n=t.property,r=t.value;n&&0===n.indexOf("--")&&(i.store[n]=r)}))})),i.store}function GB(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i={charset:function(t){return"@charset "+t.name+";"},comment:function(t){return 0===t.comment.indexOf("__CSSVARSPONYFILL")?"/*"+t.comment+"*/":""},"custom-media":function(t){return"@custom-media "+t.name+" "+t.media+";"},declaration:function(t){return t.property+":"+t.value+";"},document:function(t){return"@"+(t.vendor||"")+"document "+t.document+"{"+r(t.rules)+"}"},"font-face":function(t){return"@font-face{"+r(t.declarations)+"}"},host:function(t){return"@host{"+r(t.rules)+"}"},import:function(t){return"@import "+t.name+";"},keyframe:function(t){return t.values.join(",")+"{"+r(t.declarations)+"}"},keyframes:function(t){return"@"+(t.vendor||"")+"keyframes "+t.name+"{"+r(t.keyframes)+"}"},media:function(t){return"@media "+t.media+"{"+r(t.rules)+"}"},namespace:function(t){return"@namespace "+t.name+";"},page:function(t){return"@page "+(t.selectors.length?t.selectors.join(", "):"")+"{"+r(t.declarations)+"}"},"page-margin-box":function(t){return"@"+t.name+"{"+r(t.declarations)+"}"},rule:function(t){var e=t.declarations;if(e.length)return t.selectors.join(",")+"{"+r(e)+"}"},supports:function(t){return"@supports "+t.supports+"{"+r(t.rules)+"}"}};function r(t){for(var r="",o=0;o<t.length;o++){var a=t[o];n&&n(a);var s=i[a.type](a);s&&(r+=s,s.length&&a.selectors&&(r+=e))}return r}return r(t.stylesheet.rules)}function qB(t,e){t.rules.forEach((function(n){n.rules?qB(n,e):n.keyframes?n.keyframes.forEach((function(t){"keyframe"===t.type&&e(t.declarations,n)})):n.declarations&&e(n.declarations,t)}))}function KB(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={preserveStatic:!0,preserveVars:!1,variables:{},onWarning:function(){}},i=MB({},n,e);return"string"==typeof t&&(t=YB(t,i)),qB(t.stylesheet,(function(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=r.type,a=r.property,s=r.value;if("declaration"===o)if(i.preserveVars||!a||0!==a.indexOf("--")){if(-1!==s.indexOf("var(")){var l=QB(s,i);l!==r.value&&(l=ZB(l),i.preserveVars?(t.splice(n,0,{type:o,property:a,value:l}),n++):r.value=l)}}else t.splice(n,1),n--}})),GB(t)}function ZB(t){return(t.match(/calc\(([^)]+)\)/g)||[]).forEach((function(e){var n="calc".concat(e.split("calc").join(""));t=t.replace(e,n)})),t}function QB(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(-1===t.indexOf("var("))return t;var i=VB("(",")",t);function r(t){var i=t.split(",")[0].replace(/[\s\n\t]/g,""),r=(t.match(/(?:\s*,\s*){1}(.*)?/)||[])[1],o=Object.prototype.hasOwnProperty.call(e.variables,i)?String(e.variables[i]):void 0,a=o||(r?String(r):void 0),s=n||t;return o||e.onWarning('variable "'.concat(i,'" is undefined')),a&&"undefined"!==a&&a.length>0?QB(a,e,s):"var(".concat(s,")")}if(i){if("var"===i.pre.slice(-3)){var o=0===i.body.trim().length;return o?(e.onWarning("var() must contain a non-whitespace string"),t):i.pre.slice(0,-3)+r(i.body)+QB(i.post,e)}return i.pre+"(".concat(QB(i.body,e),")")+QB(i.post,e)}return-1!==t.indexOf("var(")&&e.onWarning('missing closing ")" in the value "'.concat(t,'"')),t}HB.range=UB;var JB="undefined"!=typeof window,$B=JB&&window.CSS&&window.CSS.supports&&window.CSS.supports("(--a: 0)"),tz={group:0,job:0},ez={rootElement:JB?document:null,shadowDOM:!1,include:"style,link[rel=stylesheet]",exclude:"",variables:{},onlyLegacy:!0,preserveStatic:!0,preserveVars:!1,silent:!1,updateDOM:!0,updateURLs:!0,watch:null,onBeforeSend:function(){},onError:function(){},onWarning:function(){},onSuccess:function(){},onComplete:function(){},onFinally:function(){}},nz={cssComments:/\/\*[\s\S]+?\*\//g,cssKeyframes:/@(?:-\w*-)?keyframes/,cssMediaQueries:/@media[^{]+\{([\s\S]+?})\s*}/g,cssUrls:/url\((?!['"]?(?:data|http|\/\/):)['"]?([^'")]*)['"]?\)/g,cssVarDeclRules:/(?::(?:root|host)(?![.:#(])[\s,]*[^{]*{\s*[^}]*})/g,cssVarDecls:/(?:[\s;]*)(-{2}\w[\w-]*)(?:\s*:\s*)([^;]*);/g,cssVarFunc:/var\(\s*--[\w-]/,cssVars:/(?:(?::(?:root|host)(?![.:#(])[\s,]*[^{]*{\s*[^;]*;*\s*)|(?:var\(\s*))(--[^:)]+)(?:\s*[:)])/},iz={dom:{},job:{},user:{}},rz=!1,oz=null,az=0,sz=null,lz=!1;function cz(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="cssVars(): ",n=MB({},ez,t);function i(t,i,r,o){!n.silent&&window.console&&console.error("".concat(e).concat(t,"\n"),i),n.onError(t,i,r,o)}function r(t){!n.silent&&window.console&&console.warn("".concat(e).concat(t)),n.onWarning(t)}function o(t){n.onFinally(Boolean(t),$B,gz()-n.__benchmark)}if(JB){if(n.watch)return n.watch=ez.watch,uz(n),void cz(n);if(!1===n.watch&&oz&&(oz.disconnect(),oz=null),!n.__benchmark){if(rz===n.rootElement)return void hz(t);if(n.__benchmark=gz(),n.exclude=[oz?'[data-cssvars]:not([data-cssvars=""])':'[data-cssvars="out"]',n.exclude].filter((function(t){return t})).join(","),n.variables=pz(n.variables),!oz){var a=Array.apply(null,n.rootElement.querySelectorAll('[data-cssvars="out"]'));if(a.forEach((function(t){var e=t.getAttribute("data-cssvars-group");e&&n.rootElement.querySelector('[data-cssvars="src"][data-cssvars-group="'.concat(e,'"]'))||t.parentNode.removeChild(t)})),az){var s=n.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])');s.length<az&&(az=s.length,iz.dom={})}}}if("loading"!==document.readyState)if($B&&n.onlyLegacy){var l=!1;if(n.updateDOM){var c=n.rootElement.host||(n.rootElement===document?document.documentElement:n.rootElement);Object.keys(n.variables).forEach((function(t){var e=n.variables[t];l=l||e!==getComputedStyle(c).getPropertyValue(t),c.style.setProperty(t,e)}))}o(l)}else!lz&&(n.shadowDOM||n.rootElement.shadowRoot||n.rootElement.host)?BB({rootElement:ez.rootElement,include:ez.include,exclude:n.exclude,skipDisabled:!1,onSuccess:function(t,e,n){return(t=((t=t.replace(nz.cssComments,"").replace(nz.cssMediaQueries,"")).match(nz.cssVarDeclRules)||[]).join(""))||!1},onComplete:function(t,e,i){XB(t,{store:iz.dom,onWarning:r}),lz=!0,cz(n)}}):(rz=n.rootElement,BB({rootElement:n.rootElement,include:n.include,exclude:n.exclude,skipDisabled:!1,onBeforeSend:n.onBeforeSend,onError:function(t,e,n){var r=t.responseURL||vz(n,location.href),o=t.statusText?"(".concat(t.statusText,")"):"Unspecified Error"+(0===t.status?" (possibly CORS related)":"");i("CSS XHR Error: ".concat(r," ").concat(t.status," ").concat(o),e,t,r)},onSuccess:function(t,e,i){var r=n.onSuccess(t,e,i);return t=void 0!==r&&!1===Boolean(r)?"":r||t,n.updateURLs&&(t=dz(t,i)),t},onComplete:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=MB({},iz.dom,iz.user);if(iz.job={},a.forEach((function(t,o){var a=e[o];if(nz.cssVars.test(a))try{var s=YB(a,{preserveStatic:n.preserveStatic,removeComments:!0});XB(s,{parseHost:Boolean(n.rootElement.host),store:iz.dom,onWarning:r}),t.__cssVars={tree:s}}catch(l){i(l.message,t)}})),MB(iz.job,iz.dom),n.updateDOM?(MB(iz.user,n.variables),MB(iz.job,iz.user)):(MB(iz.job,iz.user,n.variables),MB(s,n.variables)),tz.job>0&&Boolean(Object.keys(iz.job).length>Object.keys(s).length||Boolean(Object.keys(s).length&&Object.keys(iz.job).some((function(t){return iz.job[t]!==s[t]})))))mz(n.rootElement),cz(n);else{var l=[],c=[],u=!1;if(n.updateDOM&&tz.job++,a.forEach((function(t,o){var a=!t.__cssVars;if(t.__cssVars)try{KB(t.__cssVars.tree,MB({},n,{variables:iz.job,onWarning:r}));var s=GB(t.__cssVars.tree);if(n.updateDOM){var h=nz.cssVarFunc.test(e[o]);if(t.getAttribute("data-cssvars")||t.setAttribute("data-cssvars","src"),s.length&&h){var f=t.getAttribute("data-cssvars-group")||++tz.group,d=s.replace(/\s/g,""),p=n.rootElement.querySelector('[data-cssvars="out"][data-cssvars-group="'.concat(f,'"]'))||document.createElement("style");u=u||nz.cssKeyframes.test(s),n.preserveStatic&&(t.sheet.disabled=!0),p.hasAttribute("data-cssvars")||p.setAttribute("data-cssvars","out"),d===t.textContent.replace(/\s/g,"")?(a=!0,p&&p.parentNode&&(t.removeAttribute("data-cssvars-group"),p.parentNode.removeChild(p))):d!==p.textContent.replace(/\s/g,"")&&([t,p].forEach((function(t){t.setAttribute("data-cssvars-job",tz.job),t.setAttribute("data-cssvars-group",f)})),p.textContent=s,l.push(s),c.push(p),p.parentNode||t.parentNode.insertBefore(p,t.nextSibling))}}else t.textContent.replace(/\s/g,"")!==s&&l.push(s)}catch(v){i(v.message,t)}a&&t.setAttribute("data-cssvars","skip"),t.hasAttribute("data-cssvars-job")||t.setAttribute("data-cssvars-job",tz.job)})),az=n.rootElement.querySelectorAll('[data-cssvars]:not([data-cssvars="out"])').length,n.shadowDOM)for(var h,f=[n.rootElement].concat(jB(n.rootElement.querySelectorAll("*"))),d=0;h=f[d];++d)if(h.shadowRoot&&h.shadowRoot.querySelector("style")){var p=MB({},n,{rootElement:h.shadowRoot});cz(p)}n.updateDOM&&u&&fz(n.rootElement),rz=!1,n.onComplete(l.join(""),c,JSON.parse(JSON.stringify(iz.job)),gz()-n.__benchmark),o(c.length)}}}));else document.addEventListener("DOMContentLoaded",(function e(n){cz(t),document.removeEventListener("DOMContentLoaded",e)}))}}function uz(t){function e(t){return t.hasAttribute("disabled")||(t.sheet||{}).disabled}function n(t){return"LINK"===t.tagName&&-1!==(t.getAttribute("rel")||"").indexOf("stylesheet")&&!e(t)}window.MutationObserver&&(oz&&(oz.disconnect(),oz=null),(oz=new MutationObserver((function(i){i.some((function(i){var r,o=!1;return"attributes"===i.type?o=n(i.target):"childList"===i.type&&(r=i.addedNodes,o=Array.apply(null,r).some((function(t){var i=1===t.nodeType&&t.hasAttribute("data-cssvars"),r=function(t){return"STYLE"===t.tagName&&!e(t)}(t)&&nz.cssVars.test(t.textContent);return!i&&(n(t)||r)}))||Array.apply(null,i.removedNodes).some((function(e){var n=1===e.nodeType,i=n&&"out"===e.getAttribute("data-cssvars"),r=n&&"src"===e.getAttribute("data-cssvars"),o=r;if(r||i){var a=e.getAttribute("data-cssvars-group"),s=t.rootElement.querySelector('[data-cssvars-group="'.concat(a,'"]'));r&&(mz(t.rootElement),iz.dom={}),s&&s.parentNode.removeChild(s)}return o}))),o}))&&cz(t)}))).observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0}))}function hz(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;clearTimeout(sz),sz=setTimeout((function(){t.__benchmark=null,cz(t)}),e)}function fz(t){var e=["animation-name","-moz-animation-name","-webkit-animation-name"].filter((function(t){return getComputedStyle(document.body)[t]}))[0];if(e){for(var n=t.getElementsByTagName("*"),i=[],r=0,o=n.length;r<o;r++){var a=n[r];"none"!==getComputedStyle(a)[e]&&(a.style[e]+="__CSSVARSPONYFILL-KEYFRAMES__",i.push(a))}document;for(var s=0,l=i.length;s<l;s++){var c=i[s].style;c[e]=c[e].replace("__CSSVARSPONYFILL-KEYFRAMES__","")}}}function dz(t,e){return(t.replace(nz.cssComments,"").match(nz.cssUrls)||[]).forEach((function(n){var i=n.replace(nz.cssUrls,"$1"),r=vz(i,e);t=t.replace(n,n.replace(i,r))})),t}function pz(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=/^-{2}/;return Object.keys(t).reduce((function(n,i){return n[e.test(i)?i:"--".concat(i.replace(/^-+/,""))]=t[i],n}),{})}function vz(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location.href,n=document.implementation.createHTMLDocument(""),i=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(i),n.body.appendChild(r),i.href=e,r.href=t,r.href}function gz(){return JB&&(window.performance||{}).now?window.performance.now():(new Date).getTime()}function mz(t){Array.apply(null,t.querySelectorAll('[data-cssvars="skip"],[data-cssvars="src"]')).forEach((function(t){return t.setAttribute("data-cssvars","")}))}cz.reset=function(){for(var t in tz.job=0,tz.group=0,rz=!1,oz&&(oz.disconnect(),oz=null),az=0,sz=null,lz=!1,iz)iz[t]={}};var yz=cz;function _z(t,e,n,i){return function(){var r=t.getAssetUrl("icons/merged.svg",!0);e.addSvgIconSet(n.bypassSecurityTrustResourceUrl(r));var o=t.get("pixie.ui.themes"),a=Object.assign({},DB);o&&o.length&&o.forEach((function(t){var e=t.is_dark?PB:IB,n=Object.assign(Object.assign({},t),{colors:Object.assign(Object.assign({},e),t.colors)});a[n.name]=n}));var s=document.documentElement.querySelector("pixie-editor");return i.setRootEl(s),i.registerThemes(a),"undefined"!=typeof window&&window.CSS&&window.CSS.supports&&window.CSS.supports("(--a: 0)")||yz({variables:i.selectedTheme$.value.colors}),new Promise((function(t){return t()}))}}var bz,kz=((bz=function t(){_classCallCheck(this,t)}).\u0275mod=ye({type:bz}),bz.\u0275inj=dt({factory:function(t){return new(t||bz)},providers:[{provide:Lc,useFactory:_z,deps:[um,SI,Yk,zP],multi:!0},YO,jP,WO,{provide:tb,useClass:OB}],imports:[[Pf,Yg,_B,TB,kB,PP,cP,bS,jI,$A,yR,gI,cP,FB]]}),bz),Cz=n("NlKi"),wz=["Uncaught (in promise): [object Object]","Uncaught (in promise): [object Undefined]","[object Object]",'{"isTrusted"\n true}',"Uncaught (in promise): ChunkLoadError: Loading chunk","Http failure response for","Http failure during parsing for","Non-Error exception captured with keys: messages, originalError, status, type\u2026","Uncaught (in promise): TypeError: Cannot read property 'setAttribute' of undefined","Uncaught (in promise): TypeError: Cannot read property 'getRng' of undefined","Cannot assign to read only property 'className' of object '[object SVGSVGElement]'",'The animation trigger "transform" has failed to build due to the following errors',"NotSupportedError: Failed to execute 'animate' on 'Element': Partial keyframes are not supported.","Cannot call method 'split' of undefined","Cannot call method 'trim' of undefined","undefined is not a function","has no method 'closest'","Object doesn't support property or method 'closest'","Object doesn't support property or method 'setPrototypeOf'","requestAnimationFrame is not defined","Object [object DOMWindow] has no method 'cancelAnimationFrame'","'block' member of ScrollIntoViewOptions 'center' is not a valid value for enumeration ScrollLogicalPosition.","Setting the playback rate is not enabled for this video."];function xz(t){return new Ez(t)}var Sz,Ez=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this)).settings=t,i.installed=!1,i}return _createClass(n,[{key:"handleError",value:function(t,e){t&&(_get(_getPrototypeOf(n.prototype),"handleError",this).call(this,t),this.installSentry()&&Cz.captureException(t.originalError||t,e))}},{key:"installSentry",value:function(){return!!this.installed||!!this.settings.has("logging.sentry_public")&&(Cz.config(this.settings.get("logging.sentry_public"),{release:this.settings.get("version"),ignoreErrors:wz}).install(),this.installed=!0)}}]),n}(pi),Tz=((Sz=function(){function t(e){_classCallCheck(this,t),this.injector=e}return _createClass(t,[{key:"ngDoBootstrap",value:function(t){var e=this.injector.get(Mu).selector;t.bootstrap(iB,e)}}]),t}()).\u0275mod=ye({type:Sz}),Sz.\u0275inj=dt({factory:function(t){return new(t||Sz)(Zt(ka))},providers:[{provide:pi,useFactory:xz,deps:[um]}],imports:[[Kk,kz,kx]]}),Sz);(function(){if(Si)throw new Error("Cannot enable prod mode after platform setup.");xi=!1})(),window.Pixie=function(){function t(e){if(_classCallCheck(this,t),this.version="2.2.2",this.proxySupported="function"==typeof Proxy,this.initPixie(e),this.proxySupported)return new Proxy(this,{get:function(t,e){var n=t.appModule.injector,i=!t.hasOwnProperty(e)&&"destroyEditor"!==e&&n?n.get(HP):t,r=i[e];return"function"!=typeof r?r:function(){return n.get(ou).run(r,i,arguments)}}})}return _createClass(t,[{key:"initPixie",value:function(t){var e=HP.mergeConfig(t);Gk([{provide:Mu,useValue:e}]).bootstrapModule(Tz).then(this.onAngularReady.bind(this)).catch((function(t){return console.log(t)}))}},{key:"onAngularReady",value:function(t){this.proxySupported?this.appModule=t:window.pixie=t.injector.get(HP),t.injector.get(Em).state.loaded.pipe(zf(1)).subscribe((function(){var e=t.injector.get(um).get("pixie.onLoad");e&&e()}))}},{key:"destroyEditor",value:function(){this.appModule.destroy(),this.appModule=null}}]),t}()},zfKp:function(t,e,n){"use strict";e.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"}},[[0,0]]]);
//# sourceMappingURL=main-es5.728d41b72b1aea710e5c.js.map