diff --git a/CHANGELOG.md b/CHANGELOG.md index 1416bbfaa..5ce7553e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ The detailed rules and walkthrough of writing a changelog is located [here](http *Note: This changelog is implemented since `2.0.0-alpha` version. All records before it are drafted based on [release notes](https://github.com/CertifaiAI/classifai/releases) might not be as detailed.* ## [Unreleased] ### Added +- Project versioning [WIP] +- Project import image from cloud storage [WIP] +- Database migration [WIP] + +## [2.0.0-alpha1] - 2021-02-26 +### Added +- Label filtering feature - Added CodeofConduct.md and Contributing.md - Changed create project workflow to insert project name, project folder, and label file in the same window @@ -16,12 +23,9 @@ The detailed rules and walkthrough of writing a changelog is located [here](http - CHANGELOG.md - Project renaming - Project reloading -- Project versioning [WIP] - Project import export -- Project import image from cloud storage [WIP] - Project starring - Project is_new label -- Database migration [WIP] ### Changed - Image validation method from reading files -> reading metadata @@ -82,6 +86,7 @@ The detailed rules and walkthrough of writing a changelog is located [here](http - Distribution for Windows(7, 8, 10), Mac, Ubuntu(18 LTS, 20 LTS) and Centos(7, 8) [Unreleased]: https://github.com/CertifaiAI/classifai/compare/main...v2_alpha?expand=1 +[2.0.0-alpha1]: https://github.com/CertifaiAI/classifai/releases/tag/v2.0.0-alpha1 [1.0.0]: https://github.com/CertifaiAI/classifai/releases/tag/v1.0 [1.1.0]: https://github.com/CertifaiAI/classifai/releases/tag/v1.1.0 [1.1.1]: https://github.com/CertifaiAI/classifai/releases/tag/v1.1.1 diff --git a/classifai-core/src/main/resources/webroot/1-es2015.1a4c49d42291db64cbca.js b/classifai-core/src/main/resources/webroot/1-es2015.1a4c49d42291db64cbca.js new file mode 100644 index 000000000..f3370b73d --- /dev/null +++ b/classifai-core/src/main/resources/webroot/1-es2015.1a4c49d42291db64cbca.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"/1FC":function(t,e,n){"use strict";e.a=Array.isArray},"/uUt":function(t,e,n){"use strict";n.d(e,"a",function(){return r});var o=n("7o/Q");function r(t,e){return n=>n.lift(new i(t,e))}class i{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new a(t,this.compare,this.keySelector))}}class a extends o.a{constructor(t,e,n){super(t),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:n}=this;e=n?n(t):t}catch(o){return this.destination.error(o)}let n=!1;if(this.hasKey)try{const{compare:t}=this;n=t(this.key,e)}catch(o){return this.destination.error(o)}else this.hasKey=!0;n||(this.key=e,this.destination.next(t))}}},"1G5W":function(t,e,n){"use strict";n.d(e,"a",function(){return r});var o=n("zx2A");function r(t){return e=>e.lift(new i(t))}class i{constructor(t){this.notifier=t}call(t,e){const n=new a(t),r=Object(o.c)(this.notifier,new o.a(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n}}class a extends o.b{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}},"25cm":function(t,e,n){"use strict";var o=n("tPH9"),r=n("/1FC");e.a=function(t,e,n){var i=e(t);return Object(r.a)(t)?i:Object(o.a)(i,n(t))}},"3/ER":function(t,e,n){"use strict";(function(t){var o=n("Ju5/"),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=r&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===r?o.a.Buffer:void 0,c=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var n=t.length,o=c?c(n):new t.constructor(n);return t.copy(o),o}}).call(this,n("3UD+")(t))},"3UD+":function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},"3cmB":function(t,e,n){"use strict";var o=n("Y7yP"),r=n("Ju5/"),i=Object(o.a)(r.a,"Map");e.a=i},"5WsY":function(t,e,n){"use strict";var o=n("vJtL"),r=n("Js68");e.a=function(t){return null!=t&&Object(r.a)(t.length)&&!Object(o.a)(t)}},"7gMY":function(t,e,n){"use strict";var o=n("8M4i"),r=n("EUcb"),i=function(t){return Object(r.a)(t)&&"[object Arguments]"==Object(o.a)(t)},a=Object.prototype,c=a.hasOwnProperty,s=a.propertyIsEnumerable,u=i(function(){return arguments}())?i:function(t){return Object(r.a)(t)&&c.call(t,"callee")&&!s.call(t,"callee")},l=n("/1FC"),b=n("WOAq"),f=/^(?:0|[1-9]\d*)$/,p=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&f.test(t))&&t>-1&&t%1==0&&t=e.status}function o(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,i=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(t,i,a){var c=r.URL||r.webkitURL,s=document.createElement("a");s.download=i=i||t.name||"download",s.rel="noopener","string"==typeof t?(s.href=t,s.origin===location.origin?o(s):n(s.href)?e(t,i,a):o(s,s.target="_blank")):(s.href=c.createObjectURL(t),setTimeout(function(){c.revokeObjectURL(s.href)},4e4),setTimeout(function(){o(s)},0))}:"msSaveOrOpenBlob"in navigator?function(t,r,i){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,i),r);else if(n(t))e(t,r,i);else{var a=document.createElement("a");a.href=t,a.target="_blank",setTimeout(function(){o(a)})}}:function(t,n,o,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,o);var c="application/octet-stream"===t.type,s=/constructor/i.test(r.HTMLElement)||r.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||c&&s||i)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var t=l.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=t:location=t,a=null},l.readAsDataURL(t)}else{var b=r.URL||r.webkitURL,f=b.createObjectURL(t);a?a.location=f:location.href=f,a=null,setTimeout(function(){b.revokeObjectURL(f)},4e4)}});r.saveAs=a.saveAs=a,t.exports=a})?o.apply(e,[]):o)||(t.exports=r)},IzLi:function(t,e,n){"use strict";e.a=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},Js68:function(t,e,n){"use strict";e.a=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},"Ju5/":function(t,e,n){"use strict";var o=n("XqMk"),r="object"==typeof self&&self&&self.Object===Object&&self,i=o.a||r||Function("return this")();e.a=i},L3Qv:function(t,e,n){"use strict";e.a=function(){return!1}},LY9J:function(t,e,n){"use strict";n.d(e,"a",function(){return f});var o=n("/uUt"),r=n("cxbk"),i=n("fXoL"),a=n("tk/3"),c=n("14na"),s=n("tyNb"),u=n("mrSG"),l=n("Iab2");let b=(()=>{class t{downloadUnsupportedImageList(t,e){return Object(u.a)(this,void 0,void 0,function*(){let n=e.join("\n");return this.saveFile({content:n,filename:t+"_unsupported_images.txt",type:"text/plain;charset=utf-8"}),e.length})}saveFile({content:t,filename:e,type:n}){const o=new Blob([t],{type:n});l.saveAs(o,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Db({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),f=(()=>{class t{constructor(t,e,n,i){this.http=t,this.mode=e,this.router=n,this._unsupportedImageService=i,this.hostPort=r.a.baseURL,this.imageLabellingMode=null,this.getProjectList=()=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/meta`),this.createNewProject=(t,e,n)=>this.http.put(this.hostPort+"v2/projects",{project_name:t,annotation_type:"bndbox"===this.imageLabellingMode?"boundingbox":"segmentation",project_path:n,label_file_path:e}),this.importProject=()=>this.http.put(this.hostPort+"v2/newproject",{}),this.renameProject=(t,e)=>this.http.put(`${this.hostPort}v2/${this.imageLabellingMode}/projects/${t}/rename/${e}`,{}),this.deleteProject=t=>this.http.delete(`${this.hostPort}${this.imageLabellingMode}/projects/${t}`),this.updateProjectLoadStatus=t=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/${t}`),this.checkProjectStatus=t=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/meta`),this.manualCloseProject=(t,e="closed")=>this.http.put(`${this.hostPort}${this.imageLabellingMode}/projects/${t}`,{status:e}),this.checkExistProjectStatus=t=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/loadingstatus`),this.getThumbnailList=(t,e)=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/uuid/${e}/thumbnail`),this.localUploadStatus=t=>this.http.get(`${this.hostPort}v2/${this.imageLabellingMode}/projects/${t}`),this.updateLabelList=(t,e)=>this.http.put(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/newlabels`,{label_list:e}),this.updateProjectStatus=(t,e,n)=>this.http.put(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/${"loaded"===n?"status":n}`,{status:e.toString()}),this.importStatus=()=>this.http.get(`${this.hostPort}v2/${this.imageLabellingMode}/projects/importstatus`),this.mode.imgLabelMode$.pipe(Object(o.a)()).subscribe(t=>t?this.imageLabellingMode=t:this.router.navigate(["/"]))}importLabelFile(){return this.http.put(this.hostPort+"v2/labelfiles",{})}importLabelFileStatus(){return this.http.get(this.hostPort+"v2/labelfiles")}importProjectFolder(){return this.http.put(this.hostPort+"v2/folders",{})}importProjectFolderStatus(){return this.http.get(this.hostPort+"v2/folders")}downloadUnsupportedImageList(t,e){return this._unsupportedImageService.downloadUnsupportedImageList(t,e)}}return t.\u0275fac=function(e){return new(e||t)(i.Qb(a.b),i.Qb(c.a),i.Qb(s.a),i.Qb(b))},t.\u0275prov=i.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})()},OObL:function(t,e,n){"use strict";n.d(e,"a",function(){return a});var o=n("fXoL"),r=n("44N4"),i=n("sYmb");let a=(()=>{class t{constructor(){this._modalUnsupportedImage="",this._unsupportedImageList=[]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Bb({type:t,selectors:[["unsupported-image-modal"]],inputs:{_modalUnsupportedImage:"_modalUnsupportedImage",_unsupportedImageBodyStyle:"_unsupportedImageBodyStyle",_unsupportedImageList:"_unsupportedImageList"},decls:15,vars:19,consts:[[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"modal-content-container"],[1,"error-msg"],["href","https://github.com/CertifaiAI/CertifAI-Knowledge-Base/wiki/Image-Type-Unsupported-Walkaround","target","_blank","rel","noopener"],["src","../../assets/icons/help.svg","alt","help",1,"help-icon-sm"]],template:function(t,e){1&t&&(o.Mb(0,"modal",0),o.Wb(1,"translate"),o.Mb(2,"div",1),o.Mb(3,"p",2),o.oc(4),o.Wb(5,"translate"),o.Wb(6,"translate"),o.Mb(7,"a",3),o.Ib(8,"img",4),o.Lb(),o.Lb(),o.Mb(9,"p",2),o.oc(10),o.Wb(11,"translate"),o.Ib(12,"br"),o.oc(13),o.Wb(14,"translate"),o.Lb(),o.Lb(),o.Lb()),2&t&&(o.ac("id",e._modalUnsupportedImage)("modalBodyStyle",e._unsupportedImageBodyStyle)("modalTitle",o.Xb(1,9,"unsupportedImage"))("scrollable",!1),o.xb(4),o.sc(" ",o.Xb(5,11,"containsUnsupportedImage1")," ",e._unsupportedImageList.length," ",o.Xb(6,13,"containsUnsupportedImage2")," "),o.xb(6),o.qc(" ",o.Xb(11,15,"unsupportedImageList1"),""),o.xb(3),o.qc("",o.Xb(14,17,"unsupportedImageList2")," "))},directives:[r.a],pipes:[i.c],styles:[".modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.help-icon-sm[_ngcontent-%COMP%]{height:2vh}"]}),t})()},TFwu:function(t,e,n){"use strict";var o=n("25cm"),r=n("jN84"),i=n("mkut");e.a=function(t){return Object(o.a)(t,i.a,r.a)}},TJKd:function(t,e,n){"use strict";n.d(e,"a",function(){return a});var o=n("fXoL"),r=n("ofXK");function i(t,e){1&t&&(o.Kb(0),o.Mb(1,"div",1),o.Mb(2,"div",2),o.Mb(3,"div",3),o.Ib(4,"div",4),o.Ib(5,"div",4),o.Lb(),o.Mb(6,"div",5),o.Ib(7,"div",4),o.Ib(8,"div",4),o.Lb(),o.Lb(),o.Lb(),o.Jb())}let a=(()=>{class t{constructor(){this._loading=!0}ngOnInit(){}ngOnChanges(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=o.Bb({type:t,selectors:[["spinner"]],inputs:{_loading:"_loading"},features:[o.vb],decls:1,vars:1,consts:[[4,"ngIf"],[1,"mesh-loader-container"],[1,"mesh-loader"],[1,"set-one"],[1,"circle"],[1,"set-two"]],template:function(t,e){1&t&&o.mc(0,i,9,0,"ng-container",0),2&t&&o.ac("ngIf",e._loading)},directives:[r.k],styles:[".mesh-loader-container[_ngcontent-%COMP%]{overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;opacity:.85;z-index:10000;cursor:progress}.mesh-loader[_ngcontent-%COMP%]{overflow:hidden;height:100%;width:100%}.mesh-loader[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]{width:1.6276041667vw;height:3.3156498674vh;position:absolute;background:#2d8ceb;border-radius:50%;margin:-.8138020833vw;-webkit-animation:mesh 3s ease-in-out infinite;animation:mesh 3s ease-in-out -1.5s infinite}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]:last-child{-webkit-animation-delay:0s;animation-delay:0s}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{transform:rotate(90deg)}@-webkit-keyframes mesh{0%{transform-origin:50% -100%;transform:rotate(0)}50%{transform-origin:50% -100%;transform:rotate(1turn)}50.00001%{transform-origin:50% 200%;transform:rotate(0deg)}to{transform-origin:50% 200%;transform:rotate(1turn)}}@keyframes mesh{0%{transform-origin:50% -100%;transform:rotate(0)}50%{transform-origin:50% -100%;transform:rotate(1turn)}50.00001%{transform-origin:50% 200%;transform:rotate(0deg)}to{transform-origin:50% 200%;transform:rotate(1turn)}}"]}),t})()},U6JX:function(t,e,n){"use strict";e.a=function(t,e){return function(n){return t(e(n))}}},WJ6P:function(t,e,n){"use strict";e.a=function(){return[]}},WOAq:function(t,e,n){"use strict";(function(t){var o=n("Ju5/"),r=n("L3Qv"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,c=a&&a.exports===i?o.a.Buffer:void 0;e.a=(c?c.isBuffer:void 0)||r.a}).call(this,n("3UD+")(t))},XIp8:function(t,e,n){"use strict";var o=n("CfRg");e.a=function(t){return Object(o.a)(t,5)}},XqMk:function(t,e,n){"use strict";var o="object"==typeof global&&global&&global.Object===Object&&global;e.a=o},Y7yP:function(t,e,n){"use strict";var o,r=n("vJtL"),i=n("Ju5/").a["__core-js_shared__"],a=(o=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"",c=n("IzLi"),s=n("dLWn"),u=/^\[object .+?Constructor\]$/,l=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.a=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Object(c.a)(t)||(e=t,a&&a in e))&&(Object(r.a)(t)?l:u).test(Object(s.a)(t));var e}(n)?n:void 0}},YHEm:function(t,e,n){"use strict";e.a=function(t,e){return t===e||t!=t&&e!=e}},YM6B:function(t,e,n){"use strict";var o=n("Y7yP"),r=n("Ju5/"),i=Object(o.a)(r.a,"DataView"),a=n("3cmB"),c=Object(o.a)(r.a,"Promise"),s=Object(o.a)(r.a,"Set"),u=Object(o.a)(r.a,"WeakMap"),l=n("8M4i"),b=n("dLWn"),f=Object(b.a)(i),p=Object(b.a)(a.a),h=Object(b.a)(c),d=Object(b.a)(s),g=Object(b.a)(u),v=l.a;(i&&"[object DataView]"!=v(new i(new ArrayBuffer(1)))||a.a&&"[object Map]"!=v(new a.a)||c&&"[object Promise]"!=v(c.resolve())||s&&"[object Set]"!=v(new s)||u&&"[object WeakMap]"!=v(new u))&&(v=function(t){var e=Object(l.a)(t),n="[object Object]"==e?t.constructor:void 0,o=n?Object(b.a)(n):"";if(o)switch(o){case f:return"[object DataView]";case p:return"[object Map]";case h:return"[object Promise]";case d:return"[object Set]";case g:return"[object WeakMap]"}return e}),e.a=v},cxbk:function(t,e,n){"use strict";n.d(e,"a",function(){return o});const o={production:!0,baseURL:"http://localhost:9999/"}},dLWn:function(t,e,n){"use strict";var o=Function.prototype.toString;e.a=function(t){if(null!=t){try{return o.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},jN84:function(t,e,n){"use strict";var o=n("WJ6P"),r=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;e.a=i?function(t){return null==t?[]:(t=Object(t),function(e,n){for(var o=-1,i=null==e?0:e.length,a=0,c=[];++o=0)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=i),new o.a(n=>(n.add(e.schedule(s,t,{subscriber:n,counter:0,period:t})),n))}function s(t){const{subscriber:e,counter:n,period:o}=t;e.next(n),this.schedule({subscriber:e,counter:n+1,period:o},o)}},mkut:function(t,e,n){"use strict";var o=n("7gMY"),r=n("pyRK"),i=n("U6JX"),a=Object(i.a)(Object.keys,Object),c=Object.prototype.hasOwnProperty,s=n("5WsY");e.a=function(t){return Object(s.a)(t)?Object(o.a)(t):function(t){if(!Object(r.a)(t))return a(t);var e=[];for(var n in Object(t))c.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}},mrSG:function(t,e,n){"use strict";function o(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r-1},a.prototype.set=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this},e.a=a},oSzE:function(t,e,n){"use strict";var o=n("nLtN"),r=n("3cmB"),i=n("DlmY");function a(t){var e=this.__data__=new o.a(t);this.size=e.size}a.prototype.clear=function(){this.__data__=new o.a,this.size=0},a.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},a.prototype.get=function(t){return this.__data__.get(t)},a.prototype.has=function(t){return this.__data__.has(t)},a.prototype.set=function(t,e){var n=this.__data__;if(n instanceof o.a){var a=n.__data__;if(!r.a||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i.a(a)}return n.set(t,e),this.size=n.size,this},e.a=a},oYcn:function(t,e,n){"use strict";var o=n("8M4i"),r=n("Js68"),i=n("EUcb"),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var c=n("ovuK"),s=n("xutz"),u=s.a&&s.a.isTypedArray,l=u?Object(c.a)(u):function(t){return Object(i.a)(t)&&Object(r.a)(t.length)&&!!a[Object(o.a)(t)]};e.a=l},ovuK:function(t,e,n){"use strict";e.a=function(t){return function(e){return t(e)}}},pyRK:function(t,e,n){"use strict";var o=Object.prototype;e.a=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||o)}},tPH9:function(t,e,n){"use strict";e.a=function(t,e){for(var n=-1,o=e.length,r=t.length;++n{class t{constructor(t){this._router=t,this.logoSrc="../../../assets/icons/classifai_logo_white.svg",this.headerLabels=[{name:"pageHeader.home",url:"/",disable:!1}],this.bindImagePath=t=>{this.jsonSchema={logos:"/imglabel"===t?[{imgPath:"../../../assets/icons/add_user.svg",hoverLabel:"Add user to project",alt:"pageHeader.addUser",onClick:()=>null}]:[{imgPath:"../../../assets/icons/profile.svg",hoverLabel:"pageHeader.profile",alt:"Profile",onClick:()=>null}]}};const{url:e}=t;this.bindImagePath(e)}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(o.Hb(r.a))},t.\u0275cmp=o.Bb({type:t,selectors:[["page-header"]],inputs:{_onChange:"_onChange"},decls:7,vars:3,consts:[[1,"header-container"],[1,"container-flex-start"],[1,"logo-container"],["alt","logo","title","Classifai",1,"logo","position-absolute",3,"src"],[4,"ngFor","ngForOf"],[1,"container-flex-end"],[4,"ngIf"],[1,"link",3,"routerLink"],["routerLinkActive","active-link",1,"btn-container",3,"ngClass","routerLinkActiveOptions"],[1,"label"],[1,"link"],["routerLinkActive","active-link",1,"btn-container",2,"cursor","not-allowed",3,"ngClass","routerLinkActiveOptions"],[1,"label",2,"cursor","not-allowed"],[1,"utility-icon-container"],[1,"img","utility-icon-light",3,"src","alt","title"]],template:function(t,e){1&t&&(o.Mb(0,"div",0),o.Mb(1,"div",1),o.Mb(2,"div",2),o.Ib(3,"img",3),o.Lb(),o.mc(4,b,3,2,"ng-container",4),o.Lb(),o.Mb(5,"div",5),o.mc(6,f,4,6,"ng-container",4),o.Lb(),o.Lb()),2&t&&(o.xb(3),o.ac("src",e.logoSrc,o.jc),o.xb(1),o.ac("ngForOf",e.headerLabels),o.xb(2),o.ac("ngForOf",e.jsonSchema.logos))},directives:[i.j,i.k,r.c,r.b,i.i],pipes:[a.c],styles:[".header-container[_ngcontent-%COMP%]{min-width:100vw;max-width:100vw;min-height:4.3vh;max-height:4.3vh;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);display:flex;justify-content:space-between;z-index:1000;position:relative}.container-flex-start[_ngcontent-%COMP%]{display:flex}.container-flex-end[_ngcontent-%COMP%]{display:flex;min-width:6.5vw;max-width:6.5vw}.logo-container[_ngcontent-%COMP%]{min-width:2.15vw;max-width:2.15vw}.logo[_ngcontent-%COMP%], .utility-icon-dark[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{min-width:1.6vw;max-width:1.6vw;min-height:inherit;max-height:inherit;padding:.32vw}.utility-icon-dark[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active{background:#696969}.utility-icon-dark[_ngcontent-%COMP%]:active{background:#a9a9a9}.img[_ngcontent-%COMP%]{margin-left:4.2vw}.position-absolute[_ngcontent-%COMP%]{position:absolute}.utility-icon-container[_ngcontent-%COMP%]{display:flex;min-height:3.4vh;max-height:3.4vh}.img-container[_ngcontent-%COMP%]:hover .img-description[_ngcontent-%COMP%]{visibility:visible;opacity:1}.btn-container[_ngcontent-%COMP%]{min-height:4.36vh;max-height:4.36vh;font-size:2vh;background:#525353;border-left:.0625vw solid hsla(0,0%,100%,.25);cursor:pointer;align-items:center;justify-content:center;display:flex;padding:0 1.5vw}.btn-container[_ngcontent-%COMP%]:hover{background:#383535}.last-btn-container[_ngcontent-%COMP%]{border-right:.0625vw solid hsla(0,0%,100%,.25)}.link[_ngcontent-%COMP%]{text-decoration:none;color:#fff}.label[_ngcontent-%COMP%]{white-space:nowrap;border:none;color:#fff;cursor:pointer}.active-link[_ngcontent-%COMP%]{background:#383535}"],changeDetection:0}),t})()},xutz:function(t,e,n){"use strict";(function(t){var o=n("XqMk"),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=r&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===r&&o.a.process,c=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();e.a=c}).call(this,n("3UD+")(t))},ylTp:function(t,e,n){"use strict";var o=n("Ju5/");e.a=o.a.Symbol}}]); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/1-es2015.c83ba7dddca90736bd83.js b/classifai-core/src/main/resources/webroot/1-es2015.c83ba7dddca90736bd83.js deleted file mode 100644 index aa4d46c84..000000000 --- a/classifai-core/src/main/resources/webroot/1-es2015.c83ba7dddca90736bd83.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"/1FC":function(t,e,n){"use strict";e.a=Array.isArray},"/uUt":function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("7o/Q");function o(t,e){return n=>n.lift(new i(t,e))}class i{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new a(t,this.compare,this.keySelector))}}class a extends r.a{constructor(t,e,n){super(t),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:n}=this;e=n?n(t):t}catch(r){return this.destination.error(r)}let n=!1;if(this.hasKey)try{const{compare:t}=this;n=t(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;n||(this.key=e,this.destination.next(t))}}},"1G5W":function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("zx2A");function o(t){return e=>e.lift(new i(t))}class i{constructor(t){this.notifier=t}call(t,e){const n=new a(t),o=Object(r.c)(this.notifier,new r.a(n));return o&&!n.seenValue?(n.add(o),e.subscribe(n)):n}}class a extends r.b{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}},"25cm":function(t,e,n){"use strict";var r=n("tPH9"),o=n("/1FC");e.a=function(t,e,n){var i=e(t);return Object(o.a)(t)?i:Object(r.a)(i,n(t))}},"3/ER":function(t,e,n){"use strict";(function(t){var r=n("Ju5/"),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.a.Buffer:void 0,c=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var n=t.length,r=c?c(n):new t.constructor(n);return t.copy(r),r}}).call(this,n("3UD+")(t))},"3UD+":function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},"3cmB":function(t,e,n){"use strict";var r=n("Y7yP"),o=n("Ju5/"),i=Object(r.a)(o.a,"Map");e.a=i},"5WsY":function(t,e,n){"use strict";var r=n("vJtL"),o=n("Js68");e.a=function(t){return null!=t&&Object(o.a)(t.length)&&!Object(r.a)(t)}},"7gMY":function(t,e,n){"use strict";var r=n("8M4i"),o=n("EUcb"),i=function(t){return Object(o.a)(t)&&"[object Arguments]"==Object(r.a)(t)},a=Object.prototype,c=a.hasOwnProperty,s=a.propertyIsEnumerable,u=i(function(){return arguments}())?i:function(t){return Object(o.a)(t)&&c.call(t,"callee")&&!s.call(t,"callee")},l=n("/1FC"),b=n("WOAq"),f=/^(?:0|[1-9]\d*)$/,p=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&f.test(t))&&t>-1&&t%1==0&&t=e.status}function r(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 o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,i=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(t,i,a){var c=o.URL||o.webkitURL,s=document.createElement("a");s.download=i=i||t.name||"download",s.rel="noopener","string"==typeof t?(s.href=t,s.origin===location.origin?r(s):n(s.href)?e(t,i,a):r(s,s.target="_blank")):(s.href=c.createObjectURL(t),setTimeout(function(){c.revokeObjectURL(s.href)},4e4),setTimeout(function(){r(s)},0))}:"msSaveOrOpenBlob"in navigator?function(t,o,i){if(o=o||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,i),o);else if(n(t))e(t,o,i);else{var a=document.createElement("a");a.href=t,a.target="_blank",setTimeout(function(){r(a)})}}:function(t,n,r,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,r);var c="application/octet-stream"===t.type,s=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||c&&s||i)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var t=l.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=t:location=t,a=null},l.readAsDataURL(t)}else{var b=o.URL||o.webkitURL,f=b.createObjectURL(t);a?a.location=f:location.href=f,a=null,setTimeout(function(){b.revokeObjectURL(f)},4e4)}});o.saveAs=a.saveAs=a,t.exports=a})?r.apply(e,[]):r)||(t.exports=o)},IzLi:function(t,e,n){"use strict";e.a=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},Js68:function(t,e,n){"use strict";e.a=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},"Ju5/":function(t,e,n){"use strict";var r=n("XqMk"),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||o||Function("return this")();e.a=i},L3Qv:function(t,e,n){"use strict";e.a=function(){return!1}},LY9J:function(t,e,n){"use strict";n.d(e,"a",function(){return f});var r=n("/uUt"),o=n("cxbk"),i=n("fXoL"),a=n("tk/3"),c=n("14na"),s=n("tyNb"),u=n("mrSG"),l=n("Iab2");let b=(()=>{class t{downloadUnsupportedImageList(t,e){return Object(u.a)(this,void 0,void 0,function*(){let n=e.join("\n");return this.saveFile({content:n,filename:t+"_unsupported_images.txt",type:"text/plain;charset=utf-8"}),e.length})}saveFile({content:t,filename:e,type:n}){const r=new Blob([t],{type:n});l.saveAs(r,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Db({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),f=(()=>{class t{constructor(t,e,n,i){this.http=t,this.mode=e,this.router=n,this._unsupportedImageService=i,this.hostPort=o.a.baseURL,this.imageLabellingMode=null,this.getProjectList=()=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/meta`),this.createNewProject=(t,e,n)=>this.http.put(this.hostPort+"v2/projects",{project_name:t,annotation_type:"bndbox"===this.imageLabellingMode?"boundingbox":"segmentation",project_path:n,label_file_path:e}),this.importProject=()=>this.http.put(this.hostPort+"v2/newproject",{}),this.renameProject=(t,e)=>this.http.put(`${this.hostPort}v2/${this.imageLabellingMode}/projects/${t}/rename/${e}`,{}),this.deleteProject=t=>this.http.delete(`${this.hostPort}${this.imageLabellingMode}/projects/${t}`),this.updateProjectLoadStatus=t=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/${t}`),this.checkProjectStatus=t=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/meta`),this.manualCloseProject=(t,e="closed")=>this.http.put(`${this.hostPort}${this.imageLabellingMode}/projects/${t}`,{status:e}),this.checkExistProjectStatus=t=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/loadingstatus`),this.getThumbnailList=(t,e)=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/uuid/${e}/thumbnail`),this.localUploadStatus=t=>this.http.get(`${this.hostPort}v2/${this.imageLabellingMode}/projects/${t}`),this.updateLabelList=(t,e)=>this.http.put(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/newlabels`,{label_list:e}),this.updateProjectStatus=(t,e,n)=>this.http.put(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/${"loaded"===n?"status":n}`,{status:e.toString()}),this.importStatus=()=>this.http.get(`${this.hostPort}v2/${this.imageLabellingMode}/projects/importstatus`),this.mode.imgLabelMode$.pipe(Object(r.a)()).subscribe(t=>t?this.imageLabellingMode=t:this.router.navigate(["/"]))}importLabelFile(){return this.http.put(this.hostPort+"v2/labelfiles",{})}importLabelFileStatus(){return this.http.get(this.hostPort+"v2/labelfiles")}importProjectFolder(){return this.http.put(this.hostPort+"v2/folders",{})}importProjectFolderStatus(){return this.http.get(this.hostPort+"v2/folders")}downloadUnsupportedImageList(t,e){return this._unsupportedImageService.downloadUnsupportedImageList(t,e)}}return t.\u0275fac=function(e){return new(e||t)(i.Qb(a.b),i.Qb(c.a),i.Qb(s.a),i.Qb(b))},t.\u0275prov=i.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})()},OObL:function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n("fXoL"),o=n("44N4"),i=n("sYmb");let a=(()=>{class t{constructor(){this._modalUnsupportedImage="",this._unsupportedImageList=[]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["unsupported-image-modal"]],inputs:{_modalUnsupportedImage:"_modalUnsupportedImage",_unsupportedImageBodyStyle:"_unsupportedImageBodyStyle",_unsupportedImageList:"_unsupportedImageList"},decls:15,vars:19,consts:[[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"modal-content-container"],[1,"error-msg"],["href","https://github.com/CertifaiAI/CertifAI-Knowledge-Base/wiki/Image-Type-Unsupported-Walkaround","target","_blank","rel","noopener"],["src","../../assets/icons/help.svg","alt","help",1,"help-icon-sm"]],template:function(t,e){1&t&&(r.Mb(0,"modal",0),r.Wb(1,"translate"),r.Mb(2,"div",1),r.Mb(3,"p",2),r.oc(4),r.Wb(5,"translate"),r.Wb(6,"translate"),r.Mb(7,"a",3),r.Ib(8,"img",4),r.Lb(),r.Lb(),r.Mb(9,"p",2),r.oc(10),r.Wb(11,"translate"),r.Ib(12,"br"),r.oc(13),r.Wb(14,"translate"),r.Lb(),r.Lb(),r.Lb()),2&t&&(r.ac("id",e._modalUnsupportedImage)("modalBodyStyle",e._unsupportedImageBodyStyle)("modalTitle",r.Xb(1,9,"unsupportedImage"))("scrollable",!1),r.xb(4),r.sc(" ",r.Xb(5,11,"containsUnsupportedImage1")," ",e._unsupportedImageList.length," ",r.Xb(6,13,"containsUnsupportedImage2")," "),r.xb(6),r.qc(" ",r.Xb(11,15,"unsupportedImageList1"),""),r.xb(3),r.qc("",r.Xb(14,17,"unsupportedImageList2")," "))},directives:[o.a],pipes:[i.c],styles:[".modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.help-icon-sm[_ngcontent-%COMP%]{height:2vh}"]}),t})()},TFwu:function(t,e,n){"use strict";var r=n("25cm"),o=n("jN84"),i=n("mkut");e.a=function(t){return Object(r.a)(t,i.a,o.a)}},TJKd:function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n("fXoL"),o=n("ofXK");function i(t,e){1&t&&(r.Kb(0),r.Mb(1,"div",1),r.Mb(2,"div",2),r.Mb(3,"div",3),r.Ib(4,"div",4),r.Ib(5,"div",4),r.Lb(),r.Mb(6,"div",5),r.Ib(7,"div",4),r.Ib(8,"div",4),r.Lb(),r.Lb(),r.Lb(),r.Jb())}let a=(()=>{class t{constructor(){this._loading=!0}ngOnInit(){}ngOnChanges(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["spinner"]],inputs:{_loading:"_loading"},features:[r.vb],decls:1,vars:1,consts:[[4,"ngIf"],[1,"mesh-loader-container"],[1,"mesh-loader"],[1,"set-one"],[1,"circle"],[1,"set-two"]],template:function(t,e){1&t&&r.mc(0,i,9,0,"ng-container",0),2&t&&r.ac("ngIf",e._loading)},directives:[o.k],styles:[".mesh-loader-container[_ngcontent-%COMP%]{overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;opacity:.85;z-index:10000;cursor:progress}.mesh-loader[_ngcontent-%COMP%]{overflow:hidden;height:100%;width:100%}.mesh-loader[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]{width:1.6276041667vw;height:3.3156498674vh;position:absolute;background:#2d8ceb;border-radius:50%;margin:-.8138020833vw;-webkit-animation:mesh 3s ease-in-out infinite;animation:mesh 3s ease-in-out -1.5s infinite}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]:last-child{-webkit-animation-delay:0s;animation-delay:0s}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{-webkit-transform:rotate(90deg);transform:rotate(90deg)}@-webkit-keyframes mesh{0%{-webkit-transform-origin:50% -100%;transform-origin:50% -100%;-webkit-transform:rotate(0);transform:rotate(0)}50%{-webkit-transform-origin:50% -100%;transform-origin:50% -100%;-webkit-transform:rotate(1turn);transform:rotate(1turn)}50.00001%{-webkit-transform-origin:50% 200%;transform-origin:50% 200%;-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform-origin:50% 200%;transform-origin:50% 200%;-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes mesh{0%{-webkit-transform-origin:50% -100%;transform-origin:50% -100%;-webkit-transform:rotate(0);transform:rotate(0)}50%{-webkit-transform-origin:50% -100%;transform-origin:50% -100%;-webkit-transform:rotate(1turn);transform:rotate(1turn)}50.00001%{-webkit-transform-origin:50% 200%;transform-origin:50% 200%;-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform-origin:50% 200%;transform-origin:50% 200%;-webkit-transform:rotate(1turn);transform:rotate(1turn)}}"]}),t})()},U6JX:function(t,e,n){"use strict";e.a=function(t,e){return function(n){return t(e(n))}}},WJ6P:function(t,e,n){"use strict";e.a=function(){return[]}},WOAq:function(t,e,n){"use strict";(function(t){var r=n("Ju5/"),o=n("L3Qv"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,c=a&&a.exports===i?r.a.Buffer:void 0;e.a=(c?c.isBuffer:void 0)||o.a}).call(this,n("3UD+")(t))},XIp8:function(t,e,n){"use strict";var r=n("CfRg");e.a=function(t){return Object(r.a)(t,5)}},XqMk:function(t,e,n){"use strict";var r="object"==typeof global&&global&&global.Object===Object&&global;e.a=r},Y7yP:function(t,e,n){"use strict";var r,o=n("vJtL"),i=n("Ju5/").a["__core-js_shared__"],a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",c=n("IzLi"),s=n("dLWn"),u=/^\[object .+?Constructor\]$/,l=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.a=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Object(c.a)(t)||(e=t,a&&a in e))&&(Object(o.a)(t)?l:u).test(Object(s.a)(t));var e}(n)?n:void 0}},YHEm:function(t,e,n){"use strict";e.a=function(t,e){return t===e||t!=t&&e!=e}},YM6B:function(t,e,n){"use strict";var r=n("Y7yP"),o=n("Ju5/"),i=Object(r.a)(o.a,"DataView"),a=n("3cmB"),c=Object(r.a)(o.a,"Promise"),s=Object(r.a)(o.a,"Set"),u=Object(r.a)(o.a,"WeakMap"),l=n("8M4i"),b=n("dLWn"),f=Object(b.a)(i),p=Object(b.a)(a.a),h=Object(b.a)(c),d=Object(b.a)(s),g=Object(b.a)(u),v=l.a;(i&&"[object DataView]"!=v(new i(new ArrayBuffer(1)))||a.a&&"[object Map]"!=v(new a.a)||c&&"[object Promise]"!=v(c.resolve())||s&&"[object Set]"!=v(new s)||u&&"[object WeakMap]"!=v(new u))&&(v=function(t){var e=Object(l.a)(t),n="[object Object]"==e?t.constructor:void 0,r=n?Object(b.a)(n):"";if(r)switch(r){case f:return"[object DataView]";case p:return"[object Map]";case h:return"[object Promise]";case d:return"[object Set]";case g:return"[object WeakMap]"}return e}),e.a=v},cxbk:function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r={production:!0,baseURL:"http://localhost:9999/"}},dLWn:function(t,e,n){"use strict";var r=Function.prototype.toString;e.a=function(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},jN84:function(t,e,n){"use strict";var r=n("WJ6P"),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;e.a=i?function(t){return null==t?[]:(t=Object(t),function(e,n){for(var r=-1,i=null==e?0:e.length,a=0,c=[];++r=0)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=i),new r.a(n=>(n.add(e.schedule(s,t,{subscriber:n,counter:0,period:t})),n))}function s(t){const{subscriber:e,counter:n,period:r}=t;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}},mkut:function(t,e,n){"use strict";var r=n("7gMY"),o=n("pyRK"),i=n("U6JX"),a=Object(i.a)(Object.keys,Object),c=Object.prototype.hasOwnProperty,s=n("5WsY");e.a=function(t){return Object(s.a)(t)?Object(r.a)(t):function(t){if(!Object(o.a)(t))return a(t);var e=[];for(var n in Object(t))c.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}},mrSG:function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o-1},a.prototype.set=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},e.a=a},oSzE:function(t,e,n){"use strict";var r=n("nLtN"),o=n("3cmB"),i=n("DlmY");function a(t){var e=this.__data__=new r.a(t);this.size=e.size}a.prototype.clear=function(){this.__data__=new r.a,this.size=0},a.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},a.prototype.get=function(t){return this.__data__.get(t)},a.prototype.has=function(t){return this.__data__.has(t)},a.prototype.set=function(t,e){var n=this.__data__;if(n instanceof r.a){var a=n.__data__;if(!o.a||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i.a(a)}return n.set(t,e),this.size=n.size,this},e.a=a},oYcn:function(t,e,n){"use strict";var r=n("8M4i"),o=n("Js68"),i=n("EUcb"),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var c=n("ovuK"),s=n("xutz"),u=s.a&&s.a.isTypedArray,l=u?Object(c.a)(u):function(t){return Object(i.a)(t)&&Object(o.a)(t.length)&&!!a[Object(r.a)(t)]};e.a=l},ovuK:function(t,e,n){"use strict";e.a=function(t){return function(e){return t(e)}}},pyRK:function(t,e,n){"use strict";var r=Object.prototype;e.a=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},tPH9:function(t,e,n){"use strict";e.a=function(t,e){for(var n=-1,r=e.length,o=t.length;++n{class t{constructor(t){this._router=t,this.logoSrc="../../../assets/icons/classifai_logo_white.svg",this.headerLabels=[{name:"pageHeader.home",url:"/",disable:!1}],this.bindImagePath=t=>{this.jsonSchema={logos:"/imglabel"===t?[{imgPath:"../../../assets/icons/add_user.svg",hoverLabel:"Add user to project",alt:"pageHeader.addUser",onClick:()=>null}]:[{imgPath:"../../../assets/icons/profile.svg",hoverLabel:"pageHeader.profile",alt:"Profile",onClick:()=>null}]}};const{url:e}=t;this.bindImagePath(e)}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(o.a))},t.\u0275cmp=r.Bb({type:t,selectors:[["page-header"]],inputs:{_onChange:"_onChange"},decls:7,vars:3,consts:[[1,"header-container"],[1,"container-flex-start"],[1,"logo-container"],["alt","logo","title","Classifai",1,"logo","position-absolute",3,"src"],[4,"ngFor","ngForOf"],[1,"container-flex-end"],[4,"ngIf"],[1,"link",3,"routerLink"],["routerLinkActive","active-link",1,"btn-container",3,"ngClass","routerLinkActiveOptions"],[1,"label"],[1,"link"],["routerLinkActive","active-link",1,"btn-container",2,"cursor","not-allowed",3,"ngClass","routerLinkActiveOptions"],[1,"label",2,"cursor","not-allowed"],[1,"utility-icon-container"],[1,"img","utility-icon-light",3,"src","alt","title"]],template:function(t,e){1&t&&(r.Mb(0,"div",0),r.Mb(1,"div",1),r.Mb(2,"div",2),r.Ib(3,"img",3),r.Lb(),r.mc(4,b,3,2,"ng-container",4),r.Lb(),r.Mb(5,"div",5),r.mc(6,f,4,6,"ng-container",4),r.Lb(),r.Lb()),2&t&&(r.xb(3),r.ac("src",e.logoSrc,r.jc),r.xb(1),r.ac("ngForOf",e.headerLabels),r.xb(2),r.ac("ngForOf",e.jsonSchema.logos))},directives:[i.j,i.k,o.c,o.b,i.i],pipes:[a.c],styles:[".header-container[_ngcontent-%COMP%]{min-width:100vw;max-width:100vw;min-height:4.3vh;max-height:4.3vh;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);-webkit-justify-content:space-between;justify-content:space-between;z-index:1000;position:relative}.container-flex-end[_ngcontent-%COMP%], .container-flex-start[_ngcontent-%COMP%], .header-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex}.container-flex-end[_ngcontent-%COMP%]{min-width:6.5vw;max-width:6.5vw}.logo-container[_ngcontent-%COMP%]{min-width:2.15vw;max-width:2.15vw}.logo[_ngcontent-%COMP%], .utility-icon-dark[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{min-width:1.6vw;max-width:1.6vw;min-height:inherit;max-height:inherit;padding:.32vw}.utility-icon-dark[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active{background:#696969}.utility-icon-dark[_ngcontent-%COMP%]:active{background:#a9a9a9}.img[_ngcontent-%COMP%]{margin-left:4.2vw}.position-absolute[_ngcontent-%COMP%]{position:absolute}.utility-icon-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;min-height:3.4vh;max-height:3.4vh}.img-container[_ngcontent-%COMP%]:hover .img-description[_ngcontent-%COMP%]{visibility:visible;opacity:1}.btn-container[_ngcontent-%COMP%]{min-height:4.36vh;max-height:4.36vh;font-size:2vh;background:#525353;border-left:.0625vw solid hsla(0,0%,100%,.25);cursor:pointer;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;display:-webkit-flex;display:flex;padding:0 1.5vw}.btn-container[_ngcontent-%COMP%]:hover{background:#383535}.last-btn-container[_ngcontent-%COMP%]{border-right:.0625vw solid hsla(0,0%,100%,.25)}.link[_ngcontent-%COMP%]{text-decoration:none;color:#fff}.label[_ngcontent-%COMP%]{white-space:nowrap;border:none;color:#fff;cursor:pointer}.active-link[_ngcontent-%COMP%]{background:#383535}"],changeDetection:0}),t})()},xutz:function(t,e,n){"use strict";(function(t){var r=n("XqMk"),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.a.process,c=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();e.a=c}).call(this,n("3UD+")(t))},ylTp:function(t,e,n){"use strict";var r=n("Ju5/");e.a=r.a.Symbol}}]); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/1-es5.1a4c49d42291db64cbca.js b/classifai-core/src/main/resources/webroot/1-es5.1a4c49d42291db64cbca.js new file mode 100644 index 000000000..864c10c43 --- /dev/null +++ b/classifai-core/src/main/resources/webroot/1-es5.1a4c49d42291db64cbca.js @@ -0,0 +1 @@ +!function(){function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&e(t,n)}function e(t,n){return(e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,n)}function n(t){var e=function(){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}}();return function(){var n,a=o(t);if(e){var i=o(this).constructor;n=Reflect.construct(a,arguments,i)}else n=a.apply(this,arguments);return r(this,n)}}function r(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n-1&&t%1==0&&t=e.status}function r(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 o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),i=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(t,a,i){var c=o.URL||o.webkitURL,u=document.createElement("a");u.download=a=a||t.name||"download",u.rel="noopener","string"==typeof t?(u.href=t,u.origin===location.origin?r(u):n(u.href)?e(t,a,i):r(u,u.target="_blank")):(u.href=c.createObjectURL(t),setTimeout(function(){c.revokeObjectURL(u.href)},4e4),setTimeout(function(){r(u)},0))}:"msSaveOrOpenBlob"in navigator?function(t,o,a){if(o=o||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,a),o);else if(n(t))e(t,o,a);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout(function(){r(i)})}}:function(t,n,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,r);var c="application/octet-stream"===t.type,u=/constructor/i.test(o.HTMLElement)||o.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||c&&u||a)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var t=l.result;t=s?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},l.readAsDataURL(t)}else{var f=o.URL||o.webkitURL,b=f.createObjectURL(t);i?i.location=b:location.href=b,i=null,setTimeout(function(){f.revokeObjectURL(b)},4e4)}});o.saveAs=i.saveAs=i,t.exports=i})?r.apply(e,[]):r)||(t.exports=o)},IzLi:function(t,e,n){"use strict";e.a=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},Js68:function(t,e,n){"use strict";e.a=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},"Ju5/":function(t,e,n){"use strict";var r=n("XqMk"),o="object"==typeof self&&self&&self.Object===Object&&self,a=r.a||o||Function("return this")();e.a=a},L3Qv:function(t,e,n){"use strict";e.a=function(){return!1}},LY9J:function(t,e,n){"use strict";n.d(e,"a",function(){return v});var r,o,i=n("/uUt"),u=n("cxbk"),s=n("fXoL"),l=n("tk/3"),f=n("14na"),b=n("tyNb"),p=n("mrSG"),d=n("Iab2"),h=((o=function(){function t(){a(this,t)}return c(t,[{key:"downloadUnsupportedImageList",value:function(t,e){return Object(p.a)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.join("\n"),n.abrupt("return",(this.saveFile({content:r,filename:t+"_unsupported_images.txt",type:"text/plain;charset=utf-8"}),e.length));case 2:case"end":return n.stop()}},n,this)}))}},{key:"saveFile",value:function(t){var e=t.content,n=t.filename,r=t.type,o=new Blob([e],{type:r});d.saveAs(o,n)}}]),t}()).\u0275fac=function(t){return new(t||o)},o.\u0275prov=s.Db({token:o,factory:o.\u0275fac,providedIn:"root"}),o),v=((r=function(){function t(e,n,r,o){var c=this;a(this,t),this.http=e,this.mode=n,this.router=r,this._unsupportedImageService=o,this.hostPort=u.a.baseURL,this.imageLabellingMode=null,this.getProjectList=function(){return c.http.get("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/meta"))},this.createNewProject=function(t,e,n){return c.http.put(c.hostPort+"v2/projects",{project_name:t,annotation_type:"bndbox"===c.imageLabellingMode?"boundingbox":"segmentation",project_path:n,label_file_path:e})},this.importProject=function(){return c.http.put(c.hostPort+"v2/newproject",{})},this.renameProject=function(t,e){return c.http.put("".concat(c.hostPort,"v2/").concat(c.imageLabellingMode,"/projects/").concat(t,"/rename/").concat(e),{})},this.deleteProject=function(t){return c.http.delete("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t))},this.updateProjectLoadStatus=function(t){return c.http.get("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t))},this.checkProjectStatus=function(t){return c.http.get("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t,"/meta"))},this.manualCloseProject=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"closed";return c.http.put("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t),{status:e})},this.checkExistProjectStatus=function(t){return c.http.get("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t,"/loadingstatus"))},this.getThumbnailList=function(t,e){return c.http.get("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t,"/uuid/").concat(e,"/thumbnail"))},this.localUploadStatus=function(t){return c.http.get("".concat(c.hostPort,"v2/").concat(c.imageLabellingMode,"/projects/").concat(t))},this.updateLabelList=function(t,e){return c.http.put("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t,"/newlabels"),{label_list:e})},this.updateProjectStatus=function(t,e,n){return c.http.put("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t,"/").concat("loaded"===n?"status":n),{status:e.toString()})},this.importStatus=function(){return c.http.get("".concat(c.hostPort,"v2/").concat(c.imageLabellingMode,"/projects/importstatus"))},this.mode.imgLabelMode$.pipe(Object(i.a)()).subscribe(function(t){return t?c.imageLabellingMode=t:c.router.navigate(["/"])})}return c(t,[{key:"importLabelFile",value:function(){return this.http.put(this.hostPort+"v2/labelfiles",{})}},{key:"importLabelFileStatus",value:function(){return this.http.get(this.hostPort+"v2/labelfiles")}},{key:"importProjectFolder",value:function(){return this.http.put(this.hostPort+"v2/folders",{})}},{key:"importProjectFolderStatus",value:function(){return this.http.get(this.hostPort+"v2/folders")}},{key:"downloadUnsupportedImageList",value:function(t,e){return this._unsupportedImageService.downloadUnsupportedImageList(t,e)}}]),t}()).\u0275fac=function(t){return new(t||r)(s.Qb(l.b),s.Qb(f.a),s.Qb(b.a),s.Qb(h))},r.\u0275prov=s.Db({token:r,factory:r.\u0275fac,providedIn:"any"}),r)},OObL:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("fXoL"),o=n("44N4"),i=n("sYmb"),c=function(){var t=function t(){a(this,t),this._modalUnsupportedImage="",this._unsupportedImageList=[]};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["unsupported-image-modal"]],inputs:{_modalUnsupportedImage:"_modalUnsupportedImage",_unsupportedImageBodyStyle:"_unsupportedImageBodyStyle",_unsupportedImageList:"_unsupportedImageList"},decls:15,vars:19,consts:[[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"modal-content-container"],[1,"error-msg"],["href","https://github.com/CertifaiAI/CertifAI-Knowledge-Base/wiki/Image-Type-Unsupported-Walkaround","target","_blank","rel","noopener"],["src","../../assets/icons/help.svg","alt","help",1,"help-icon-sm"]],template:function(t,e){1&t&&(r.Mb(0,"modal",0),r.Wb(1,"translate"),r.Mb(2,"div",1),r.Mb(3,"p",2),r.oc(4),r.Wb(5,"translate"),r.Wb(6,"translate"),r.Mb(7,"a",3),r.Ib(8,"img",4),r.Lb(),r.Lb(),r.Mb(9,"p",2),r.oc(10),r.Wb(11,"translate"),r.Ib(12,"br"),r.oc(13),r.Wb(14,"translate"),r.Lb(),r.Lb(),r.Lb()),2&t&&(r.ac("id",e._modalUnsupportedImage)("modalBodyStyle",e._unsupportedImageBodyStyle)("modalTitle",r.Xb(1,9,"unsupportedImage"))("scrollable",!1),r.xb(4),r.sc(" ",r.Xb(5,11,"containsUnsupportedImage1")," ",e._unsupportedImageList.length," ",r.Xb(6,13,"containsUnsupportedImage2")," "),r.xb(6),r.qc(" ",r.Xb(11,15,"unsupportedImageList1"),""),r.xb(3),r.qc("",r.Xb(14,17,"unsupportedImageList2")," "))},directives:[o.a],pipes:[i.c],styles:[".modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.help-icon-sm[_ngcontent-%COMP%]{height:2vh}"]}),t}()},TFwu:function(t,e,n){"use strict";var r=n("25cm"),o=n("jN84"),a=n("mkut");e.a=function(t){return Object(r.a)(t,a.a,o.a)}},TJKd:function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("fXoL"),o=n("ofXK");function i(t,e){1&t&&(r.Kb(0),r.Mb(1,"div",1),r.Mb(2,"div",2),r.Mb(3,"div",3),r.Ib(4,"div",4),r.Ib(5,"div",4),r.Lb(),r.Mb(6,"div",5),r.Ib(7,"div",4),r.Ib(8,"div",4),r.Lb(),r.Lb(),r.Lb(),r.Jb())}var u=function(){var t=function(){function t(){a(this,t),this._loading=!0}return c(t,[{key:"ngOnInit",value:function(){}},{key:"ngOnChanges",value:function(t){}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["spinner"]],inputs:{_loading:"_loading"},features:[r.vb],decls:1,vars:1,consts:[[4,"ngIf"],[1,"mesh-loader-container"],[1,"mesh-loader"],[1,"set-one"],[1,"circle"],[1,"set-two"]],template:function(t,e){1&t&&r.mc(0,i,9,0,"ng-container",0),2&t&&r.ac("ngIf",e._loading)},directives:[o.k],styles:[".mesh-loader-container[_ngcontent-%COMP%]{overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;opacity:.85;z-index:10000;cursor:progress}.mesh-loader[_ngcontent-%COMP%]{overflow:hidden;height:100%;width:100%}.mesh-loader[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]{width:1.6276041667vw;height:3.3156498674vh;position:absolute;background:#2d8ceb;border-radius:50%;margin:-.8138020833vw;-webkit-animation:mesh 3s ease-in-out infinite;animation:mesh 3s ease-in-out -1.5s infinite}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]:last-child{-webkit-animation-delay:0s;animation-delay:0s}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{transform:rotate(90deg)}@-webkit-keyframes mesh{0%{transform-origin:50% -100%;transform:rotate(0)}50%{transform-origin:50% -100%;transform:rotate(1turn)}50.00001%{transform-origin:50% 200%;transform:rotate(0deg)}to{transform-origin:50% 200%;transform:rotate(1turn)}}@keyframes mesh{0%{transform-origin:50% -100%;transform:rotate(0)}50%{transform-origin:50% -100%;transform:rotate(1turn)}50.00001%{transform-origin:50% 200%;transform:rotate(0deg)}to{transform-origin:50% 200%;transform:rotate(1turn)}}"]}),t}()},U6JX:function(t,e,n){"use strict";e.a=function(t,e){return function(n){return t(e(n))}}},WJ6P:function(t,e,n){"use strict";e.a=function(){return[]}},WOAq:function(t,e,n){"use strict";(function(t){var r=n("Ju5/"),o=n("L3Qv"),a="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=a&&"object"==typeof t&&t&&!t.nodeType&&t,c=i&&i.exports===a?r.a.Buffer:void 0;e.a=(c?c.isBuffer:void 0)||o.a}).call(this,n("3UD+")(t))},XIp8:function(t,e,n){"use strict";var r=n("CfRg");e.a=function(t){return Object(r.a)(t,5)}},XqMk:function(t,e,n){"use strict";var r="object"==typeof global&&global&&global.Object===Object&&global;e.a=r},Y7yP:function(t,e,n){"use strict";var r,o=n("vJtL"),a=n("Ju5/").a["__core-js_shared__"],i=(r=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",c=n("IzLi"),u=n("dLWn"),s=/^\[object .+?Constructor\]$/,l=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.a=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Object(c.a)(t)||(e=t,i&&i in e))&&(Object(o.a)(t)?l:s).test(Object(u.a)(t));var e}(n)?n:void 0}},YHEm:function(t,e,n){"use strict";e.a=function(t,e){return t===e||t!=t&&e!=e}},YM6B:function(t,e,n){"use strict";var r=n("Y7yP"),o=n("Ju5/"),a=Object(r.a)(o.a,"DataView"),i=n("3cmB"),c=Object(r.a)(o.a,"Promise"),u=Object(r.a)(o.a,"Set"),s=Object(r.a)(o.a,"WeakMap"),l=n("8M4i"),f=n("dLWn"),b=Object(f.a)(a),p=Object(f.a)(i.a),d=Object(f.a)(c),h=Object(f.a)(u),v=Object(f.a)(s),g=l.a;(a&&"[object DataView]"!=g(new a(new ArrayBuffer(1)))||i.a&&"[object Map]"!=g(new i.a)||c&&"[object Promise]"!=g(c.resolve())||u&&"[object Set]"!=g(new u)||s&&"[object WeakMap]"!=g(new s))&&(g=function(t){var e=Object(l.a)(t),n="[object Object]"==e?t.constructor:void 0,r=n?Object(f.a)(n):"";if(r)switch(r){case b:return"[object DataView]";case p:return"[object Map]";case d:return"[object Promise]";case h:return"[object Set]";case v:return"[object WeakMap]"}return e}),e.a=g},cxbk:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r={production:!0,baseURL:"http://localhost:9999/"}},dLWn:function(t,e,n){"use strict";var r=Function.prototype.toString;e.a=function(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},jN84:function(t,e,n){"use strict";var r=n("WJ6P"),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;e.a=a?function(t){return null==t?[]:(t=Object(t),function(e,n){for(var r=-1,a=null==e?0:e.length,i=0,c=[];++r0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;return t=e,(Object(i.a)(t)||!(t-parseFloat(t)+1>=0)||e<0)&&(e=0),n&&"function"==typeof n.schedule||(n=a),new r.a(function(t){return t.add(n.schedule(u,e,{subscriber:t,counter:0,period:e})),t})}function u(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}},mkut:function(t,e,n){"use strict";var r=n("7gMY"),o=n("pyRK"),a=n("U6JX"),i=Object(a.a)(Object.keys,Object),c=Object.prototype.hasOwnProperty,u=n("5WsY");e.a=function(t){return Object(u.a)(t)?Object(r.a)(t):function(t){if(!Object(o.a)(t))return i(t);var e=[];for(var n in Object(t))c.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}},mrSG:function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o-1},i.prototype.set=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},e.a=i},oSzE:function(t,e,n){"use strict";var r=n("nLtN"),o=n("3cmB"),a=n("DlmY");function i(t){var e=this.__data__=new r.a(t);this.size=e.size}i.prototype.clear=function(){this.__data__=new r.a,this.size=0},i.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},i.prototype.get=function(t){return this.__data__.get(t)},i.prototype.has=function(t){return this.__data__.has(t)},i.prototype.set=function(t,e){var n=this.__data__;if(n instanceof r.a){var i=n.__data__;if(!o.a||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new a.a(i)}return n.set(t,e),this.size=n.size,this},e.a=i},oYcn:function(t,e,n){"use strict";var r=n("8M4i"),o=n("Js68"),a=n("EUcb"),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1;var c=n("ovuK"),u=n("xutz"),s=u.a&&u.a.isTypedArray,l=s?Object(c.a)(s):function(t){return Object(a.a)(t)&&Object(o.a)(t.length)&&!!i[Object(r.a)(t)]};e.a=l},ovuK:function(t,e,n){"use strict";e.a=function(t){return function(e){return t(e)}}},pyRK:function(t,e,n){"use strict";var r=Object.prototype;e.a=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},tPH9:function(t,e,n){"use strict";e.a=function(t,e){for(var n=-1,r=e.length,o=t.length;++n-1&&t%1==0&&t=e.status}function r(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 o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,i=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(t,i,a){var c=o.URL||o.webkitURL,u=document.createElement("a");u.download=i=i||t.name||"download",u.rel="noopener","string"==typeof t?(u.href=t,u.origin===location.origin?r(u):n(u.href)?e(t,i,a):r(u,u.target="_blank")):(u.href=c.createObjectURL(t),setTimeout(function(){c.revokeObjectURL(u.href)},4e4),setTimeout(function(){r(u)},0))}:"msSaveOrOpenBlob"in navigator?function(t,o,i){if(o=o||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,i),o);else if(n(t))e(t,o,i);else{var a=document.createElement("a");a.href=t,a.target="_blank",setTimeout(function(){r(a)})}}:function(t,n,r,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,r);var c="application/octet-stream"===t.type,u=/constructor/i.test(o.HTMLElement)||o.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||c&&u||i)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var t=l.result;t=s?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=t:location=t,a=null},l.readAsDataURL(t)}else{var f=o.URL||o.webkitURL,b=f.createObjectURL(t);a?a.location=b:location.href=b,a=null,setTimeout(function(){f.revokeObjectURL(b)},4e4)}});o.saveAs=a.saveAs=a,t.exports=a})?r.apply(e,[]):r)||(t.exports=o)},IzLi:function(t,e,n){"use strict";e.a=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},Js68:function(t,e,n){"use strict";e.a=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},"Ju5/":function(t,e,n){"use strict";var r=n("XqMk"),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||o||Function("return this")();e.a=i},L3Qv:function(t,e,n){"use strict";e.a=function(){return!1}},LY9J:function(t,e,n){"use strict";n.d(e,"a",function(){return g});var r,o,a=n("/uUt"),u=n("cxbk"),s=n("fXoL"),l=n("tk/3"),f=n("14na"),b=n("tyNb"),p=n("mrSG"),d=n("Iab2"),h=((o=function(){function t(){i(this,t)}return c(t,[{key:"downloadUnsupportedImageList",value:function(t,e){return Object(p.a)(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.join("\n"),n.abrupt("return",(this.saveFile({content:r,filename:t+"_unsupported_images.txt",type:"text/plain;charset=utf-8"}),e.length));case 2:case"end":return n.stop()}},n,this)}))}},{key:"saveFile",value:function(t){var e=t.content,n=t.filename,r=t.type,o=new Blob([e],{type:r});d.saveAs(o,n)}}]),t}()).\u0275fac=function(t){return new(t||o)},o.\u0275prov=s.Db({token:o,factory:o.\u0275fac,providedIn:"root"}),o),g=((r=function(){function t(e,n,r,o){var c=this;i(this,t),this.http=e,this.mode=n,this.router=r,this._unsupportedImageService=o,this.hostPort=u.a.baseURL,this.imageLabellingMode=null,this.getProjectList=function(){return c.http.get("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/meta"))},this.createNewProject=function(t,e,n){return c.http.put(c.hostPort+"v2/projects",{project_name:t,annotation_type:"bndbox"===c.imageLabellingMode?"boundingbox":"segmentation",project_path:n,label_file_path:e})},this.importProject=function(){return c.http.put(c.hostPort+"v2/newproject",{})},this.renameProject=function(t,e){return c.http.put("".concat(c.hostPort,"v2/").concat(c.imageLabellingMode,"/projects/").concat(t,"/rename/").concat(e),{})},this.deleteProject=function(t){return c.http.delete("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t))},this.updateProjectLoadStatus=function(t){return c.http.get("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t))},this.checkProjectStatus=function(t){return c.http.get("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t,"/meta"))},this.manualCloseProject=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"closed";return c.http.put("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t),{status:e})},this.checkExistProjectStatus=function(t){return c.http.get("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t,"/loadingstatus"))},this.getThumbnailList=function(t,e){return c.http.get("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t,"/uuid/").concat(e,"/thumbnail"))},this.localUploadStatus=function(t){return c.http.get("".concat(c.hostPort,"v2/").concat(c.imageLabellingMode,"/projects/").concat(t))},this.updateLabelList=function(t,e){return c.http.put("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t,"/newlabels"),{label_list:e})},this.updateProjectStatus=function(t,e,n){return c.http.put("".concat(c.hostPort).concat(c.imageLabellingMode,"/projects/").concat(t,"/").concat("loaded"===n?"status":n),{status:e.toString()})},this.importStatus=function(){return c.http.get("".concat(c.hostPort,"v2/").concat(c.imageLabellingMode,"/projects/importstatus"))},this.mode.imgLabelMode$.pipe(Object(a.a)()).subscribe(function(t){return t?c.imageLabellingMode=t:c.router.navigate(["/"])})}return c(t,[{key:"importLabelFile",value:function(){return this.http.put(this.hostPort+"v2/labelfiles",{})}},{key:"importLabelFileStatus",value:function(){return this.http.get(this.hostPort+"v2/labelfiles")}},{key:"importProjectFolder",value:function(){return this.http.put(this.hostPort+"v2/folders",{})}},{key:"importProjectFolderStatus",value:function(){return this.http.get(this.hostPort+"v2/folders")}},{key:"downloadUnsupportedImageList",value:function(t,e){return this._unsupportedImageService.downloadUnsupportedImageList(t,e)}}]),t}()).\u0275fac=function(t){return new(t||r)(s.Qb(l.b),s.Qb(f.a),s.Qb(b.a),s.Qb(h))},r.\u0275prov=s.Db({token:r,factory:r.\u0275fac,providedIn:"any"}),r)},OObL:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("fXoL"),o=n("44N4"),a=n("sYmb"),c=function(){var t=function t(){i(this,t),this._modalUnsupportedImage="",this._unsupportedImageList=[]};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["unsupported-image-modal"]],inputs:{_modalUnsupportedImage:"_modalUnsupportedImage",_unsupportedImageBodyStyle:"_unsupportedImageBodyStyle",_unsupportedImageList:"_unsupportedImageList"},decls:15,vars:19,consts:[[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"modal-content-container"],[1,"error-msg"],["href","https://github.com/CertifaiAI/CertifAI-Knowledge-Base/wiki/Image-Type-Unsupported-Walkaround","target","_blank","rel","noopener"],["src","../../assets/icons/help.svg","alt","help",1,"help-icon-sm"]],template:function(t,e){1&t&&(r.Mb(0,"modal",0),r.Wb(1,"translate"),r.Mb(2,"div",1),r.Mb(3,"p",2),r.oc(4),r.Wb(5,"translate"),r.Wb(6,"translate"),r.Mb(7,"a",3),r.Ib(8,"img",4),r.Lb(),r.Lb(),r.Mb(9,"p",2),r.oc(10),r.Wb(11,"translate"),r.Ib(12,"br"),r.oc(13),r.Wb(14,"translate"),r.Lb(),r.Lb(),r.Lb()),2&t&&(r.ac("id",e._modalUnsupportedImage)("modalBodyStyle",e._unsupportedImageBodyStyle)("modalTitle",r.Xb(1,9,"unsupportedImage"))("scrollable",!1),r.xb(4),r.sc(" ",r.Xb(5,11,"containsUnsupportedImage1")," ",e._unsupportedImageList.length," ",r.Xb(6,13,"containsUnsupportedImage2")," "),r.xb(6),r.qc(" ",r.Xb(11,15,"unsupportedImageList1"),""),r.xb(3),r.qc("",r.Xb(14,17,"unsupportedImageList2")," "))},directives:[o.a],pipes:[a.c],styles:[".modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.help-icon-sm[_ngcontent-%COMP%]{height:2vh}"]}),t}()},TFwu:function(t,e,n){"use strict";var r=n("25cm"),o=n("jN84"),i=n("mkut");e.a=function(t){return Object(r.a)(t,i.a,o.a)}},TJKd:function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("fXoL"),o=n("ofXK");function a(t,e){1&t&&(r.Kb(0),r.Mb(1,"div",1),r.Mb(2,"div",2),r.Mb(3,"div",3),r.Ib(4,"div",4),r.Ib(5,"div",4),r.Lb(),r.Mb(6,"div",5),r.Ib(7,"div",4),r.Ib(8,"div",4),r.Lb(),r.Lb(),r.Lb(),r.Jb())}var u=function(){var t=function(){function t(){i(this,t),this._loading=!0}return c(t,[{key:"ngOnInit",value:function(){}},{key:"ngOnChanges",value:function(t){}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["spinner"]],inputs:{_loading:"_loading"},features:[r.vb],decls:1,vars:1,consts:[[4,"ngIf"],[1,"mesh-loader-container"],[1,"mesh-loader"],[1,"set-one"],[1,"circle"],[1,"set-two"]],template:function(t,e){1&t&&r.mc(0,a,9,0,"ng-container",0),2&t&&r.ac("ngIf",e._loading)},directives:[o.k],styles:[".mesh-loader-container[_ngcontent-%COMP%]{overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;opacity:.85;z-index:10000;cursor:progress}.mesh-loader[_ngcontent-%COMP%]{overflow:hidden;height:100%;width:100%}.mesh-loader[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]{width:1.6276041667vw;height:3.3156498674vh;position:absolute;background:#2d8ceb;border-radius:50%;margin:-.8138020833vw;-webkit-animation:mesh 3s ease-in-out infinite;animation:mesh 3s ease-in-out -1.5s infinite}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]:last-child{-webkit-animation-delay:0s;animation-delay:0s}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%}.mesh-loader[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:last-child{-webkit-transform:rotate(90deg);transform:rotate(90deg)}@-webkit-keyframes mesh{0%{-webkit-transform-origin:50% -100%;transform-origin:50% -100%;-webkit-transform:rotate(0);transform:rotate(0)}50%{-webkit-transform-origin:50% -100%;transform-origin:50% -100%;-webkit-transform:rotate(1turn);transform:rotate(1turn)}50.00001%{-webkit-transform-origin:50% 200%;transform-origin:50% 200%;-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform-origin:50% 200%;transform-origin:50% 200%;-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes mesh{0%{-webkit-transform-origin:50% -100%;transform-origin:50% -100%;-webkit-transform:rotate(0);transform:rotate(0)}50%{-webkit-transform-origin:50% -100%;transform-origin:50% -100%;-webkit-transform:rotate(1turn);transform:rotate(1turn)}50.00001%{-webkit-transform-origin:50% 200%;transform-origin:50% 200%;-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform-origin:50% 200%;transform-origin:50% 200%;-webkit-transform:rotate(1turn);transform:rotate(1turn)}}"]}),t}()},U6JX:function(t,e,n){"use strict";e.a=function(t,e){return function(n){return t(e(n))}}},WJ6P:function(t,e,n){"use strict";e.a=function(){return[]}},WOAq:function(t,e,n){"use strict";(function(t){var r=n("Ju5/"),o=n("L3Qv"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,c=a&&a.exports===i?r.a.Buffer:void 0;e.a=(c?c.isBuffer:void 0)||o.a}).call(this,n("3UD+")(t))},XIp8:function(t,e,n){"use strict";var r=n("CfRg");e.a=function(t){return Object(r.a)(t,5)}},XqMk:function(t,e,n){"use strict";var r="object"==typeof global&&global&&global.Object===Object&&global;e.a=r},Y7yP:function(t,e,n){"use strict";var r,o=n("vJtL"),i=n("Ju5/").a["__core-js_shared__"],a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",c=n("IzLi"),u=n("dLWn"),s=/^\[object .+?Constructor\]$/,l=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.a=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!Object(c.a)(t)||(e=t,a&&a in e))&&(Object(o.a)(t)?l:s).test(Object(u.a)(t));var e}(n)?n:void 0}},YHEm:function(t,e,n){"use strict";e.a=function(t,e){return t===e||t!=t&&e!=e}},YM6B:function(t,e,n){"use strict";var r=n("Y7yP"),o=n("Ju5/"),i=Object(r.a)(o.a,"DataView"),a=n("3cmB"),c=Object(r.a)(o.a,"Promise"),u=Object(r.a)(o.a,"Set"),s=Object(r.a)(o.a,"WeakMap"),l=n("8M4i"),f=n("dLWn"),b=Object(f.a)(i),p=Object(f.a)(a.a),d=Object(f.a)(c),h=Object(f.a)(u),g=Object(f.a)(s),v=l.a;(i&&"[object DataView]"!=v(new i(new ArrayBuffer(1)))||a.a&&"[object Map]"!=v(new a.a)||c&&"[object Promise]"!=v(c.resolve())||u&&"[object Set]"!=v(new u)||s&&"[object WeakMap]"!=v(new s))&&(v=function(t){var e=Object(l.a)(t),n="[object Object]"==e?t.constructor:void 0,r=n?Object(f.a)(n):"";if(r)switch(r){case b:return"[object DataView]";case p:return"[object Map]";case d:return"[object Promise]";case h:return"[object Set]";case g:return"[object WeakMap]"}return e}),e.a=v},cxbk:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r={production:!0,baseURL:"http://localhost:9999/"}},dLWn:function(t,e,n){"use strict";var r=Function.prototype.toString;e.a=function(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},jN84:function(t,e,n){"use strict";var r=n("WJ6P"),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols;e.a=i?function(t){return null==t?[]:(t=Object(t),function(e,n){for(var r=-1,i=null==e?0:e.length,a=0,c=[];++r0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return t=e,(Object(a.a)(t)||!(t-parseFloat(t)+1>=0)||e<0)&&(e=0),n&&"function"==typeof n.schedule||(n=i),new r.a(function(t){return t.add(n.schedule(u,e,{subscriber:t,counter:0,period:e})),t})}function u(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}},mkut:function(t,e,n){"use strict";var r=n("7gMY"),o=n("pyRK"),i=n("U6JX"),a=Object(i.a)(Object.keys,Object),c=Object.prototype.hasOwnProperty,u=n("5WsY");e.a=function(t){return Object(u.a)(t)?Object(r.a)(t):function(t){if(!Object(o.a)(t))return a(t);var e=[];for(var n in Object(t))c.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}},mrSG:function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o-1},a.prototype.set=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},e.a=a},oSzE:function(t,e,n){"use strict";var r=n("nLtN"),o=n("3cmB"),i=n("DlmY");function a(t){var e=this.__data__=new r.a(t);this.size=e.size}a.prototype.clear=function(){this.__data__=new r.a,this.size=0},a.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},a.prototype.get=function(t){return this.__data__.get(t)},a.prototype.has=function(t){return this.__data__.has(t)},a.prototype.set=function(t,e){var n=this.__data__;if(n instanceof r.a){var a=n.__data__;if(!o.a||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i.a(a)}return n.set(t,e),this.size=n.size,this},e.a=a},oYcn:function(t,e,n){"use strict";var r=n("8M4i"),o=n("Js68"),i=n("EUcb"),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var c=n("ovuK"),u=n("xutz"),s=u.a&&u.a.isTypedArray,l=s?Object(c.a)(s):function(t){return Object(i.a)(t)&&Object(o.a)(t.length)&&!!a[Object(r.a)(t)]};e.a=l},ovuK:function(t,e,n){"use strict";e.a=function(t){return function(e){return t(e)}}},pyRK:function(t,e,n){"use strict";var r=Object.prototype;e.a=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},tPH9:function(t,e,n){"use strict";e.a=function(t,e){for(var n=-1,r=e.length,o=t.length;++n{class t{constructor(t,e,n){this.http=t,this.mode=e,this.router=n,this.hostPort=f.a.baseURL,this.imageLabellingMode=null,this.getBase64Thumbnail=(t,e)=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/uuid/${e}/imgsrc`),this.updateLabelList=(t,e)=>this.http.put(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/newlabels`,{label_list:e}),this.updateProjectProgress=(t,e,n)=>this.http.put(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/uuid/${e}/update`,Object.assign({},n)),this.exportProject=(t,e)=>this.http.put(`${this.hostPort}v2/${this.imageLabellingMode}/projects/${t}/export/${e}`,{newprojectid:t}),this.reloadProject=t=>this.http.put(`${this.hostPort}v2/${this.imageLabellingMode}/projects/${t}/reload`,{newprojectid:t}),this.reloadProjectStatus=t=>this.http.get(`${this.hostPort}v2/${this.imageLabellingMode}/projects/${t}/reloadstatus`),this.renameImage=(t,e,n)=>this.http.put(`${this.hostPort}v2/${this.imageLabellingMode}/projects/${n}/imgsrc/rename`,{uuid:t,new_fname:e}),this.mode.imgLabelMode$.pipe(Object(g.a)()).subscribe(t=>t?this.imageLabellingMode=t:this.router.navigate(["/"]))}checkIfBboxMetaType(t){return Array.isArray(t)?void 0!==t[0].bnd_box:void 0!==t.bnd_box}exportProjectStatus(){return this.http.get(`${this.hostPort}v2/${this.imageLabellingMode}/projects/exportstatus`)}}return t.\u0275fac=function(e){return new(e||t)(u.Qb(m.b),u.Qb(p.a),u.Qb(b.a))},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();var v=n("1F7/"),y=n("LY9J"),x=n("2Vo4");const w={annotation:-1,isDlbClick:!1};let S=(()=>{class t{constructor(){this.labelStateSubject=new x.a(w),this.labelStaging$=this.labelStateSubject.asObservable(),this.setState=t=>{this.labelStateSubject.next(t?Object.assign(Object.assign({},w),t):w)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();const C={scroll:!1,drag:!1,draw:!1,fitCenter:!1,clear:!1,isActiveModal:!1,save:!1,keyInfo:!1};let M=(()=>{class t{constructor(){this.actionSubject=new x.a(C),this.action$=this.actionSubject.asObservable(),this.setState=t=>{this.actionSubject.next(t?Object.assign(Object.assign({},C),t):C)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})(),k=(()=>{class t{constructor(t){this._imgLblApiService=t,this.getRouteState=t=>{const{state:e}=t;return Object.assign({},e)},this.displayLabelList=(t,e)=>t.map(t=>t.label_list?Object.assign(Object.assign({},t),{label_list:e}):t),this.calculateIndex=(t,e,n)=>{let i=e;return 1===t?i>=n-1?n-1:i+=1:i<=0?0:e-=1},this.checkAnnotationMetadataProp=({bnd_box:t,polygons:e})=>null!=t?t:e,this.changeAnnotationLabel=(t,{label:e,index:n})=>t.map(t=>t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(t=>{var{bnd_box:i,polygons:o}=t,s=Object(a.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},s),{bnd_box:null==i?void 0:i.map((t,i)=>i===n?Object.assign(Object.assign({},t),{label:e}):t),polygons:null==o?void 0:o.map((t,i)=>i===n?Object.assign(Object.assign({},t),{label:e}):t)})})}):t),this.deleteAnnotation=(t,e)=>t.map(t=>t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(t=>{var{bnd_box:n,polygons:i}=t,o=Object(a.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},o),{bnd_box:null==n?void 0:n.filter((t,n)=>n!==e),polygons:null==i?void 0:i.filter((t,n)=>n!==e)})})}):t),this.submitLabel=(t,e,n,{mainLabelRegion:i,subLabelRegion:o})=>t.map(t=>t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(t=>{var{bnd_box:s,polygons:r}=t,l=Object(a.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},l),{bnd_box:null==s?void 0:s.map((t,a)=>a===n?Object.assign(Object.assign({},t),{region:i,subLabel:t.subLabel&&t.subLabel.length>0?[...t.subLabel,{label:e,region:o}]:[{label:e,region:o}]}):t),polygons:null==r?void 0:r.map((t,a)=>a===n?Object.assign(Object.assign({},t),{region:i,subLabel:t.subLabel&&t.subLabel.length>0?[...t.subLabel,{label:e,region:o}]:[{label:e,region:o}]}):t)})})}):t),this.removeSubLabel=(t,{selectedAnnoIndex:e,selectedSubLabelIndex:n})=>t.map(t=>t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(t=>{var{bnd_box:i,polygons:o}=t,s=Object(a.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},s),{bnd_box:null==i?void 0:i.map((t,i)=>{var a;return i===e?Object.assign(Object.assign({},t),{subLabel:null===(a=t.subLabel)||void 0===a?void 0:a.filter((t,e)=>e!==n)}):t}),polygons:null==o?void 0:o.map((t,i)=>{var a;return i===e?Object.assign(Object.assign({},t),{subLabel:null===(a=t.subLabel)||void 0===a?void 0:a.filter((t,e)=>e!==n)}):t})})})}):t),this.setLocalStorageProjectProgress=(t,e)=>{localStorage.setItem(`${t}_${this._imgLblApiService.imageLabellingMode}`,JSON.stringify({cache:e}))},this.getLocalStorageProjectProgress=t=>{const e=localStorage.getItem(`${t}_${this._imgLblApiService.imageLabellingMode}`);return e?JSON.parse(e):null},this.updateProjectProgress=(t,e)=>{t.forEach(({annotation:t})=>{t&&(this.setLocalStorageProjectProgress(e,t),null==t||t.forEach(t=>{this._imgLblApiService.updateProjectProgress(e,t.uuid,t).pipe(Object(s.a)()).subscribe(({})=>{})}))})}}}return t.\u0275fac=function(e){return new(e||t)(u.Qb(_))},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();var P=n("I7yr"),O=n("F7l1"),L=n("Iab2"),I=n("xOOu");let A=(()=>{class t{exportSaveFormat({saveCurrentImage:t,saveFormat:e,metadata:n,projectName:i,fullLabelList:o,labelList:s,projectFullMetadata:r}){return Object(a.a)(this,void 0,void 0,function*(){switch(e){case"pascalVoc":if(!n)return{message:0,msg:"warning.noMetadata"};if(!(null==n?void 0:n.bnd_box))return{message:0,msg:"warning.noBoundingBox"};if(!s)return{message:0,msg:"warning.noLabelList"};if(t){const t=this.calBoxCoorOriginalImages(n),e=this.getFileName(n.img_path),{img_path:i,img_depth:a,img_ori_w:o,img_ori_h:r}=n,l=this.generatePascalVocFormat({img_path:i,img_depth:a,img_ori_w:o,img_ori_h:r,bnd_box:t},s),c=e.split(".");return this.saveFile({content:l,filename:c[0]+".xml",type:"text/xml;charset=utf-8"}),{message:1,msg:"success"}}{if(!r)return{message:0,msg:"warning.noImageList"};const t=[];let e=!0;return r.forEach(n=>{const i=(n.bnd_box?n.bnd_box.map(t=>t.label):[]).some(t=>s.indexOf(t)>=0);if(n.bnd_box&&n.bnd_box.length>0&&i){e=!1;const i=this.calBoxCoorOriginalImages(n),a=this.getFileName(n.img_path),{img_path:o,img_depth:r,img_ori_w:l,img_ori_h:c}=n,h=this.generatePascalVocFormat({img_path:o,img_depth:r,img_ori_w:l,img_ori_h:c,bnd_box:i},s),d=a.split(".");t.push({filename:d[0]+".xml",content:h})}}),e?{message:0,msg:"warning.noLabelSelected"}:t?(yield this.saveAsZip(t,"pascal_voc",i),{message:1,msg:"success"}):{message:0,msg:"warning.noProgress"}}case"yolo":if(!n)return{message:0,msg:"warning.noMetadata"};if(!(null==n?void 0:n.bnd_box))return{message:0,msg:"warning.noBoundingBox"};if(!s)return{message:0,msg:"warning.noLabelList"};if(t){const t=this.calBoxCoorOriginalImages(n),e=this.getFileName(n.img_path),{img_ori_w:i,img_ori_h:a}=n,o=this.generateYoloFormat(Object.assign({},{img_ori_w:i,img_ori_h:a,bnd_box:t}),s),r=e.split(".");return this.saveFile({content:o,filename:r[0]+".txt",type:"text/plain;charset=utf-8"}),{message:1,msg:"success"}}{if(!r)return{message:0,msg:"warning.noImageList"};const t=[];let n=!0;return r.forEach(e=>{const i=(e.bnd_box?e.bnd_box.map(t=>t.label):[]).some(t=>s.indexOf(t)>=0);if(e.bnd_box&&e.bnd_box.length>0&&i){n=!1;const i=this.calBoxCoorOriginalImages(e),a=this.getFileName(e.img_path),{img_ori_w:o,img_ori_h:r}=e,l=this.generateYoloFormat(Object.assign({},{img_ori_w:o,img_ori_h:r,bnd_box:i}),s),c=a.split(".");t.push({filename:c[0]+".txt",content:l})}}),n?{message:0,msg:"warning.noLabelSelected"}:t?(yield this.saveAsZip(t,e,i),{message:1,msg:"success"}):{message:0,msg:"warning.noProgress"}}case"ocr":if(!n)return{message:0,msg:"warning.noMetadata"};if(!(null==n?void 0:n.bnd_box))return{message:0,msg:"warning.noBoundingBox"};if(!r)return{message:0,msg:"warning.noImageList"};if(!o)return{message:0,msg:"warning.noImageList"};let a="",l=0;return r.forEach((t,e)=>{0===e&&(a+="filename,x1,y1,x2,y2,label\n");const n=this.calBoxCoorOriginalImages(t),i=this.getFileName(t.img_path),s=this.generateOCRFormat({bnd_box:n},i,o);""===s&&l++,a+=""+s}),a&&l!==r.length?(this.saveFile({content:a,filename:i+"_text_ocr_labels.csv",type:"text/csv;charset=utf-8"}),{message:1,msg:"success"}):{message:0,msg:"warning.noProgress"};case"label":if(!s)return{message:0,msg:"warning.noLabelList"};const c=i+"_label.txt",h=this.generateLabelFormat(s);return""===h?{message:0,msg:"warning.noLabelSelected"}:(this.saveFile({content:h,filename:c,type:"text/plain;charset=utf-8"}),{message:1,msg:"success"});case"coco":if(!r)return{message:0,msg:"warning.noImageList"};const d=this.calPolyCoorOriginalImages(r),u=this.getCocoContent(d,s),b=this.getCocoFileName(i);return this.saveFile({content:u,filename:b,type:"text/json;charset=utf-8"}),{message:1,msg:"success"};case"json":if(!n)return{message:0,msg:"warning.noMetadata"};if(!(null==n?void 0:n.polygons))return{message:0,msg:"warning.noPolygon"};if(!r)return{message:0,msg:"warning.noImageList"};const g=this.calPolyCoorOriginalImages(r),f=this.getJsonContent(g),m=this.getJsonFileName(i);return this.saveFile({content:f,filename:m,type:"text/json;charset=utf-8"}),{message:1,msg:"success"}}})}calBoxCoorOriginalImages({bnd_box:t,img_w:e,img_h:n,img_ori_w:i,img_ori_h:o}){const s=i/e,r=o/n;return t.map(t=>{const e=Object(a.b)(t,["subLabel","region"]),n=t.distancetoImg.x*s,i=n+(t.x2-t.x1)*s,o=t.distancetoImg.y*r,l=o+(t.y2-t.y1)*r;return Object.assign(Object.assign({},e),{x1:n,x2:i,y1:o,y2:l})})}calPolyCoorOriginalImages(t){return t.map(t=>{var{img_ori_w:e,img_ori_h:n,img_w:i,img_h:o,polygons:s}=t,r=Object(a.b)(t,["img_ori_w","img_ori_h","img_w","img_h","polygons"]);const l=e/i,c=n/o,h=s.filter(({coorPt:t})=>t.map(({distancetoImg:t})=>({distancetoImg:t,x:t.x*l,y:t.y*c})));return Object.assign(Object.assign({},r),{img_ori_w:e,img_ori_h:n,img_w:i,img_h:o,polygons:h})})}generatePascalVocFormat({bnd_box:t,img_path:e,img_depth:n,img_ori_w:i,img_ori_h:a},o){let s="\n";const r=this.getItemName("file",e),l=this.getItemName("folder",e),c=this.createNode("folder");s+="\t"+c[0]+l+c[1];const h=this.createNode("filename");s+="\t"+h[0]+r+h[1];const d=this.createNode("path");s+="\t"+d[0]+e.split("\\").join("/")+d[1];const u=this.createNode("source"),b=this.createNode("database");s+="\t"+u[0]+"\n",s+="\t\t"+b[0]+"unknown"+b[1],s+="\t"+u[1];const g=this.createNode("size");s+="\t"+g[0]+"\n";const f=this.createNode("width"),m=this.createNode("height"),p=this.createNode("depth");s+="\t\t"+f[0]+i.toString()+f[1],s+="\t\t"+m[0]+a.toString()+m[1],s+="\t\t"+p[0]+(null==n?void 0:n.toString())+p[1],s+="\t"+g[1];const _=this.createNode("segmented");s+="\t"+_[0]+"0"+_[1];const v=this.createNode("object");for(const[y,{label:x,x1:w,x2:S,y1:C,y2:M}]of t.entries())if(-1!==o.indexOf(x)){s+="\t"+v[0]+"\n";const t=this.createNode("name"),e=this.createNode("pose"),n=this.createNode("truncated"),i=this.createNode("difficult"),a=this.createNode("bndbox"),o=this.createNode("xmin"),r=this.createNode("ymin"),l=this.createNode("xmax"),c=this.createNode("ymax");s+="\t\t"+t[0]+x+t[1],s+="\t\t"+e[0]+"Unspecified"+e[1],s+="\t\t"+n[0]+"0"+n[1],s+="\t\t"+i[0]+"0"+i[1],s+="\t\t"+a[0]+"\n",s+="\t\t\t"+o[0]+Math.floor(w).toString()+o[1],s+="\t\t\t"+r[0]+Math.floor(C).toString()+r[1],s+="\t\t\t"+l[0]+Math.floor(S).toString()+l[1],s+="\t\t\t"+c[0]+Math.floor(M).toString()+c[1],s+="\t\t"+a[1],s+="\t"+v[1]}return s+="",s}generateYoloFormat({bnd_box:t,img_ori_w:e,img_ori_h:n},i){return t.reduce((a,{x1:o,x2:s,y1:r,y2:l,label:c},h)=>{if(-1===i.indexOf(c))return a;const d=(o+s)/2,u=(r+l)/2,b=s-o,g=l-r;return a+=i.indexOf(c).toString()+" ",a+=`${(d/e).toString()} ${(u/n).toString()} `,a+=`${(b/e).toString()} ${(g/n).toString()} `,h!==t.length&&(a+="\n"),a},"")}generateOCRFormat({bnd_box:t},e,n){return t.reduce((t,{x1:i,x2:a,y1:o,y2:s,label:r})=>-1===n.indexOf(r)?(t+=`${e},${i.toString()},${o.toString()}`,t+=`,${a.toString()},${s.toString()},${r.toString()}\n`):t,"")}getItemName(t,e){const n=e.split("\\").join("/").split("/");return"folder"===t?(n.pop(),n.join("/")):n[n.length-1]}createNode(t){return["<"+t+">","\n"]}generateLabelFormat(t){return t.reduce((t,e,n)=>n!==(t+=e).length?t+"\n":t,"")}saveFile({content:t,filename:e,type:n}){const i=new Blob([t],{type:n});L.saveAs(i,e)}saveAsZip(t,e,n){return Object(a.a)(this,void 0,void 0,function*(){const i=new I;for(const[e,{content:n,filename:o}]of t.entries())i.file(o,n);const a=yield i.generateAsync({type:"blob"});L.saveAs(a,`${n}_${e}_labels.zip`)})}getFileName(t){const e=t.split("\\").join("/").split("/");return e[e.length-1]}getCocoFileName(t){return t+"_segmentation_coco.json"}getJsonFileName(t){return t+"_segmentation_JSON.json"}getCocoContent(t,e){let n="{";return n+=this.generateCocoInfo(),n+=this.generateCocoImage(t),n+=this.generateCocoAnnotation(t,e),n+=this.generateCocoLicense(),n+=this.generateCocoCategory(e),n+="}",n=n.replace(/(}{)/gi,"},{"),n}generateCocoInfo(){const t=new Date;let e='"info":{';return e+=`year:"${t.getFullYear().toString()}",`,e+='version:"1.0",',e+='description:"VIA project exported to COCO format using classifai(https://classifai.ai/)",',e+='contributor:"",',e+='url:"https://classifai.ai/",',e+=`date_created:"${t.toUTCString()}"`,e+="},",e}generateCocoImage(t){let e="images:[";return e+=t.reduce((e,{img_ori_w:n,img_ori_h:i,img_path:a},o)=>(e+=`{id:${(o+1).toString()},`,e+=`width:${n.toString()},`,e+=`height:${i.toString()},`,e+=`file_name:"${this.getFileName(a)}",`,e+="license:0,",e+='date_captured:""}',o!==t.length&&(e+=","),e),""),e+="],",e}generateCocoAnnotation(t,e){let n="annotations:[",i=0;return n+=t.reduce((n,{polygons:o},s)=>(o.length>0&&(i+=1,n+=this.calPolyCoorOriginalImages(t).map(({polygons:t})=>t)[0].reduce((t,n,o)=>{var{coorPt:r,label:l}=n,c=Object(a.b)(n,["coorPt","label"]);t+="{segmentation:[",r.length>0&&(t+="[",t+=r.reduce((t,{x:e,y:n},i)=>(t+=e.toString()+",",t+=""+n.toString(),i!==r.length-1&&(t+=","),t),""),t+="]");const h=this.getPolyBBox(Object.assign({coorPt:r,label:l},c));return h&&(t+="],",t+=`area:${((h.x2-h.x1)*(h.y2-h.y1)).toString()},`,t+=`bbox:[${h.x1.toString()},${h.y1.toString()},${(h.x2-h.x1).toString()},${(h.y2-h.y1).toString()}],`,t+="iscrowd:0,",t+=`id:${i.toString()},`,t+=`image_id:${(s+1).toString()},`,t+=`category_id:${null==e?void 0:e.indexOf(l)}}`),t},"")),n),""),n+="]",n+=",",n}getPolyBBox({coorPt:t}){if(t.length>0){const e={x1:1e7,x2:-1e8,y1:1e7,y2:-1e8};for(const[n,{x:i,y:a}]of t.entries())i(t+='{supercategory:"type",',t+=`id:${n.toString()},`,(t+=`name:"${e}"`)+"},"),"")),e+="]",e}getJsonContent(t){let e="{";return e+=t.reduce((t,{polygons:e,file_size:n,img_path:i},a)=>{const o=this.getFileName(i),s=n>0?n.toString():"";return(t+=this.generateImageString(e,o,s))+"},"},""),e+="}",e}generateImageString(t,e,n){let i=`'${e}':{`;return i+='fileref:"",',i+=`size:"${n}",`,i+=`filename:"${e}",`,i+='base64_img_data:"",',i+="file_attributes:{},",i+=`regions:{${this.generateRegion(t)}}`,i}generateRegion(t){if(t.length>0)return t.reduce((e,{coorPt:n,label:i,region:a,subLabel:o},s)=>{let r="[",l="[";if(n.forEach(({x:t,y:e},i)=>{r+=t.toString(),l+=e.toString(),i===n.length-1?(r+="]",l+="]"):(r+=",",l+=",")},""),e+=s.toString()+":{",e+="shape_attributes:{name:polygon,",e+=`all_points_x:${r},`,e+=`all_points_y:${l}},`,e+=`region_attributes:{${i.trim()}:"${a.trim()}"}`,e+="}",0===o.length);else{e+=",";for(const[t,{label:n,region:i}]of o.entries())e+=`"${n.trim()}":"${i.trim()}"`,e+="},"}return s!==t.length-1&&(e+=","),e},"")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();var B=n("x2Se");let j=(()=>{class t{transform(t){return t?window.navigator.platform.startsWith("Mac")?t.split("/").slice(-1)[0]:t.split("\\").slice(-1)[0]:""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=u.Gb({name:"fileNameSlice",type:t,pure:!0}),t})();var E=n("sYmb");function z(t,e){if(1&t&&(u.Kb(0),u.Ib(1,"div",4),u.Mb(2,"label",6),u.oc(3),u.Wb(4,"fileNameSlice"),u.Lb(),u.Jb()),2&t){const t=u.Vb();u.xb(1),u.ac("ngClass",t._onChange.hasAnnotation?"indicator":"no-indicator"),u.xb(2),u.pc(u.Xb(4,2,t._onChange.thumbnailName))}}function T(t,e){1&t&&u.Ib(0,"label",6)}function D(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"label"),u.oc(2),u.Lb(),u.Jb()),2&t){const t=u.Vb(3);u.xb(2),u.rc("",t._onChange.currentThumbnailIndex||0," / ",t._totalUuid,"")}}function N(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",8),u.Mb(2,"img",9),u.Tb("click",function(){return u.hc(t),u.Vb().$implicit.onClick()}),u.Wb(3,"translate"),u.Lb(),u.Lb(),u.Mb(4,"div",10),u.mc(5,D,3,2,"ng-container",11),u.Lb(),u.Jb()}if(2&t){const t=u.Vb(),e=t.$implicit,n=t.index,i=u.Vb();u.xb(2),u.ac("src",e.imgPath,u.jc)("alt",e.alt)("title",u.Xb(3,5,e.hoverLabel)),u.yb("data-index",n+e.alt),u.xb(3),u.ac("ngIf",i._onChange&&i._onChange.totalNumThumbnail)}}function R(t,e){if(1&t){const t=u.Nb();u.Mb(0,"div",8),u.Mb(1,"img",9),u.Tb("click",function(){return u.hc(t),u.Vb().$implicit.onClick()}),u.Wb(2,"translate"),u.Lb(),u.Lb()}if(2&t){const t=u.Vb(),e=t.$implicit,n=t.index;u.xb(1),u.ac("src",e.imgPath,u.jc)("alt",e.alt)("title",u.Xb(2,4,e.hoverLabel)),u.yb("data-index",n+e.alt)}}function F(t,e){if(1&t&&(u.Kb(0),u.mc(1,N,6,7,"ng-container",2),u.mc(2,R,3,6,"ng-template",null,7,u.nc),u.Jb()),2&t){const t=e.index,n=u.fc(3);u.xb(1),u.ac("ngIf",0===t)("ngIfElse",n)}}function X(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"div",8),u.Mb(2,"img",9),u.Tb("click",function(){return e.$implicit.onClick()}),u.Wb(3,"translate"),u.Lb(),u.Lb(),u.Jb()),2&t){const t=e.$implicit,n=e.index;u.xb(2),u.ac("src",t.imgPath,u.jc)("alt",t.alt)("title",u.Xb(3,4,t.hoverLabel)),u.yb("data-index",n+t.alt)}}let W=(()=>{class t{constructor(){this._totalUuid=0,this._tabStatus=[],this._onClick=new u.n,this.isTabStillOpen=!0,this.bindImagePath=()=>{this.jsonSchema={logosCenter:[{imgPath:"../../../assets/icons/previous.svg",hoverLabel:"labellingInfo.previous",alt:"Previous",onClick:()=>this.emitParentEvent({thumbnailAction:-1})},{imgPath:"../../../assets/icons/next.svg",hoverLabel:"labellingInfo.next",alt:"Next",onClick:()=>this.emitParentEvent({thumbnailAction:1})}],logosEnd:[{imgPath:"../../../assets/icons/undo.svg",hoverLabel:"labellingInfo.undo",alt:"Undo",onClick:()=>null},{imgPath:"../../../assets/icons/redo.svg",hoverLabel:"labellingInfo.redo",alt:"Redo",onClick:()=>null}]}},this.emitParentEvent=({url:t,thumbnailAction:e})=>{this._onClick.emit({url:t,thumbnailAction:e})}}ngOnInit(){this.bindImagePath()}ngOnChanges(t){if(t._onChange){const{totalNumThumbnail:e}=t._onChange.currentValue;this._onChange.totalNumThumbnail=e,this.bindImagePath()}if(t._tabStatus){this.isTabStillOpen=!1;for(const{closed:t}of this._tabStatus)if(!t){this.isTabStillOpen=!0;break}}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-info"]],inputs:{_totalUuid:"_totalUuid",_onChange:"_onChange",_tabStatus:"_tabStatus"},outputs:{_onClick:"_onClick"},features:[u.vb],decls:9,vars:6,consts:[[1,"header-container"],[1,"container-flex-start"],[4,"ngIf","ngIfElse"],["defaultName",""],[3,"ngClass"],[4,"ngFor","ngForOf"],[1,"imageTitle"],["renderOtherIcons",""],[1,"utility-icon-container"],[1,"utility-icon-light",3,"src","alt","title","click"],[1,"totalThumbnail"],[4,"ngIf"]],template:function(t,e){if(1&t&&(u.Mb(0,"div",0),u.Mb(1,"div",1),u.mc(2,z,5,4,"ng-container",2),u.mc(3,T,1,0,"ng-template",null,3,u.nc),u.Lb(),u.Mb(5,"div",4),u.mc(6,F,4,2,"ng-container",5),u.Lb(),u.Mb(7,"div",4),u.mc(8,X,4,6,"ng-container",5),u.Lb(),u.Lb()),2&t){const t=u.fc(4);u.xb(2),u.ac("ngIf",e._onChange.thumbnailName)("ngIfElse",t),u.xb(3),u.ac("ngClass",e.isTabStillOpen?"container-flex-center":"container-flex-center-adjust"),u.xb(1),u.ac("ngForOf",e.jsonSchema.logosCenter),u.xb(1),u.ac("ngClass",e.isTabStillOpen?"container-flex-end":"container-flex-end-adjust"),u.xb(1),u.ac("ngForOf",e.jsonSchema.logosEnd)}},directives:[i.k,i.i,i.j],pipes:[j,E.c],styles:[".header-container[_ngcontent-%COMP%]{min-width:100vw;max-width:100vw;min-height:4vh;max-height:4vh;background:#525353;border-bottom:.0625vw solid hsla(0,0%,100%,.25);display:flex;justify-content:space-between;z-index:1000;position:absolute}.container-flex-start[_ngcontent-%COMP%]{margin-left:3vw}.container-flex-center[_ngcontent-%COMP%], .container-flex-start[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:inherit;max-height:inherit}.container-flex-center[_ngcontent-%COMP%]{margin-left:8vw}.container-flex-end[_ngcontent-%COMP%]{display:flex;margin-right:19vw}.container-flex-center-adjust[_ngcontent-%COMP%]{display:flex;margin-left:2vw;align-items:center;min-height:inherit;max-height:inherit}.container-flex-end-adjust[_ngcontent-%COMP%]{display:flex;margin-right:3vw}.logo-container[_ngcontent-%COMP%]{min-width:2.2vw;max-width:2.2vw}.logo[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:2.2vh;max-height:2.2vh;padding:.3vw;position:fixed;cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active, .utility-icon-light[_ngcontent-%COMP%]:focus{background:#a9a9a9}.position-absolute[_ngcontent-%COMP%]{position:absolute}.utility-icon-container[_ngcontent-%COMP%]{display:flex;min-height:3.5vh;max-height:3.5vh;min-width:2vw;max-width:2vw}.totalThumbnail[_ngcontent-%COMP%]{font-size:1.7vh;padding:.4vw 1vw 0;display:inline-block;color:#fff;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.img-container[_ngcontent-%COMP%]:hover .img-description[_ngcontent-%COMP%]{visibility:visible;opacity:1}.imageTitle[_ngcontent-%COMP%]{font-size:1.7vh;color:#fff;align-items:center;margin-left:1vw;max-width:20vw;min-width:20vw;position:absolute;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.indicator[_ngcontent-%COMP%]{background-color:#75fe7c}.indicator[_ngcontent-%COMP%], .no-indicator[_ngcontent-%COMP%]{height:1vh;width:.5vw;border-radius:50%;position:aboslute}.no-indicator[_ngcontent-%COMP%]{background-color:#ffba54}.horizontal-line[_ngcontent-%COMP%]{padding:1vh 0;margin:0 1vw;border:.01rem solid #707070}"],changeDetection:0}),t})();var U=n("oSzE"),$=n("DlmY");function Y(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new $.a;++er))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var h=-1,d=!0,u=2&n?new V:void 0;for(o.set(t,e),o.set(e,t);++h{class t{constructor(t,e){this._imgLabelState=t,this._annotateService=e,this._currentUrl="",this._tabStatus=[],this._navigate=new u.n,this._modalNoLabel=new u.n,this.labelList=[],this.updateLabelList=()=>{this.labelList=this._tabStatus[1].label_list?this._tabStatus[1].label_list:[]},this.resetSelectedAnnotate=()=>{this._annotateService.setState()},this.bindImagePath=()=>{this.jsonSchema={logos:[{imgPath:"../../../assets/icons/separator.svg",hoverLabel:"",alt:"",nonClickable:!0,toggleable:!1,onClick:()=>null},{imgPath:"../../../assets/icons/pointer.svg",hoverLabel:"leftSideBar.pointer",alt:"Pointer",toggleable:!0,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!1,drag:!0,scroll:!0})}},"/imglabel/bndbox"===this._currentUrl?{imgPath:"../../../assets/icons/rec_bounding_box.svg",hoverLabel:"leftSideBar.rectangularBB",alt:"RectangularBB",toggleable:!0,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!0,drag:!1,scroll:!1})}}:{imgPath:"../../../assets/icons/polygon.svg",hoverLabel:"leftSideBar.polygon",alt:"Polygon",toggleable:!0,onClick:()=>{0!==this.labelList.length?(this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!0,drag:!1,scroll:!1})):this.showAlertNoLabel()}},{imgPath:"../../../assets/icons/eraser.svg",hoverLabel:"leftSideBar.eraser",alt:"Eraser",toggleable:!1,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!1,drag:!1,fitCenter:!1,scroll:!1,clear:!0}),this._imgLabelState.setState(null)}},{imgPath:"../../../assets/icons/fit_center.svg",hoverLabel:"leftSideBar.fitCenter",alt:"Fit Center",toggleable:!1,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!1,drag:!1,fitCenter:!0,scroll:!1}),this._imgLabelState.setState(null)}},{imgPath:"../../../assets/icons/save.svg",hoverLabel:"leftSideBar.save",alt:"Save",toggleable:!1,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!1,drag:!1,fitCenter:!1,scroll:!1,clear:!1,save:!0,keyInfo:!1})}},{imgPath:"../../../assets/icons/info.svg",hoverLabel:"leftSideBar.info",alt:"KeyPoint",toggleable:!1,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!1,drag:!1,fitCenter:!1,scroll:!1,clear:!1,save:!1,keyInfo:!0})}}]}},this.checkStateEqual=(t,e)=>!ut(t,e),this.getIndex=t=>{this.iconIndex=t},this.conditionalIconTheme=t=>t?"plain-icon":"utility-icon-light",this.conditionalActiveIcon=t=>t===this.iconIndex?{background:"rgb(59 59 59)"}:null}ngOnInit(){this.updateLabelList(),this.bindImagePath()}ngOnChanges(t){if(this.bindImagePath(),t._tabStatus&&this.checkStateEqual(t._tabStatus.currentValue,t._tabStatus.previousValue)){const{currentValue:e}=t._tabStatus;this._tabStatus=[...e],this.updateLabelList()}}showAlertNoLabel(){alert("No label exist yet. Please add new label.")}}return t.\u0275fac=function(e){return new(e||t)(u.Hb(M),u.Hb(S))},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-left-sidebar"]],inputs:{_onChange:"_onChange",_currentUrl:"_currentUrl",_tabStatus:"_tabStatus"},outputs:{_navigate:"_navigate",_modalNoLabel:"_modalNoLabel"},features:[u.vb],decls:2,vars:1,consts:[[1,"utility-left-sidebar-container"],[4,"ngFor","ngForOf"],[1,"utility-icon-container"],[4,"ngIf"],[3,"ngClass","ngStyle","src","alt","title","click"]],template:function(t,e){1&t&&(u.Mb(0,"div",0),u.mc(1,gt,3,1,"ng-container",1),u.Lb()),2&t&&(u.xb(1),u.ac("ngForOf",e.jsonSchema.logos))},directives:[i.j,i.k,i.i,i.l],pipes:[E.c],styles:[".utility-left-sidebar-container[_ngcontent-%COMP%]{position:absolute;top:4.5vh;min-width:2.14vw;max-width:2.14vw;min-height:95.4vh;max-height:95.4vh;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);z-index:1000}.utility-icon-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh;align-items:baseline}.utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute;cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active, .utility-icon-light[_ngcontent-%COMP%]:focus{background:#a9a9a9}.plain-icon[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute;cursor:auto}"],changeDetection:0}),t})();var mt=n("XIp8");class pt{constructor(){}stringifyObject(t){try{return JSON.stringify(t)}catch(e){return console.log("StringifyObject(content) ----\x3e ",e.name+": ",e.message),""}}deepCloneObject(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DeepCloneObject(content) ----\x3e ",e.name+": ",e.message),null}}deepCloneVariable(t){try{const e=t?JSON.parse(JSON.stringify({item:t})):"",{item:n}=e;return n}catch(e){return console.log("DeepCloneVariable(variable) ----\x3e ",e.name+": ",e.message),""}}generateUniquesID(){try{let t="";const e=new Date;return t+=e.getDate().toString(),t+=(e.getMonth()+1).toString(),t+=e.getFullYear().toString(),t+=e.getHours().toString(),t+=e.getMinutes().toString(),t+=e.getSeconds().toString(),t+=e.getMilliseconds().toString(),parseInt(t,10)}catch(t){return console.log("GenerateUniquesID() ----\x3e ",t.name+": ",t.message),-1}}matchStringHead(t,e){try{return e.substr(0,t.length)===t}catch(n){return console.log("MatchStringHead(StrToMatch:string, oristr:string) ----\x3e ",n.name+": ",n.message),!1}}getFilename(t){try{const e=this.deepCloneVariable(t).split("\\").join("/").split("/");return e[e.length-1]}catch(e){return console.log("GetFilename(strs) ----\x3e ",e.name+": ",e.message),""}}GetFoldername(t){try{const e=JSON.parse(JSON.stringify({st:t})).st.split("\\").join("/").split("/");return e.pop(),e.join("/")}catch(e){return console.log("GetFoldername(strs) ----\x3e ",e.name+": ",e.message),""}}RemoveHTMLElement(t){var e;try{const n=document.getElementById(t);null!=n&&(null===(e=n.parentNode)||void 0===e||e.removeChild(n))}catch(n){console.log("RemoveHTMLElement(ids) ----\x3e ",n.name+": ",n.message)}}}let _t=(()=>{class t{constructor(){this.currentArr=[],this.undoArr=[],this.redoArr=[],this.maxStageSize=51,this.allowUndo=!1,this.allowRedo=!1,this.utility=new pt,this.removeLastArray=t=>t.splice(-1,1)[0]}getCurrentArray(){return{undoArr:this.undoArr,redoArr:this.redoArr,curr:this.currentArr}}appendStages(t){t&&(this.redoArr=[],this.allowRedo=!1,0===this.currentArr.length?this.currentArr.push(this.utility.deepCloneVariable(t)):(this.undoArr.length===this.maxStageSize&&this.undoArr.splice(0,1),this.undoArr.push(this.removeLastArray(this.currentArr)),this.currentArr.push(this.utility.deepCloneVariable(t)),this.allowUndo=!0))}clearAllStages(){this.currentArr=[],this.undoArr=[],this.redoArr=[],this.allowUndo=!1,this.allowRedo=!1}undo(){if(this.allowRedo=!0,this.undoArr.length>0){this.redoArr.push(this.removeLastArray(this.currentArr));const t=this.removeLastArray(this.undoArr);return this.currentArr.push(t),this.allowUndo=0!==this.undoArr.length,t}return null}redo(){let t=null;return 0!==this.redoArr.length&&(this.undoArr.push(this.removeLastArray(this.currentArr)),t=this.removeLastArray(this.redoArr),this.currentArr.push(t),this.allowRedo=0!==this.redoArr.length),this.allowUndo=this.undoArr.length>0,t}clearRedundantStages(){var t,e;(null===(t=this.currentArr[0])||void 0===t?void 0:t.meta)&&"polygons"in this.currentArr[0].meta||this.undoArr.length>0&&(!this.isStateChange((null===(e=this.undoArr[this.undoArr.length-1])||void 0===e?void 0:e.meta).bnd_box)||(this.currentArr.pop(),this.currentArr.push(this.removeLastArray(this.undoArr))))}isAllowRedo(){return this.allowRedo}isAllowUndo(){return this.allowUndo}isMethodChange(t){var e;return(null===(e=this.currentArr[0])||void 0===e?void 0:e.method)!==t}replaceStages(t){t&&(this.currentArr[0]=this.utility.deepCloneVariable(t))}isStateChange(t){return!!t&&!!(t&&this.isAnnotationChange(t)||this.isLabelChange(t))}isLabelChange(t){var e,n,i,a;if((null===(e=this.currentArr[0])||void 0===e?void 0:e.meta)&&"polygons"in(null===(n=this.currentArr[0])||void 0===n?void 0:n.meta)){const e=t,n=(null===(i=this.currentArr[0])||void 0===i?void 0:i.meta).polygons;if(e.length!==n.length)return!0;for(const[t,{label:i}]of n.entries());}else{const e=t,n=(null===(a=this.currentArr[0])||void 0===a?void 0:a.meta).bnd_box;if(e.length!==n.length)return!0;for(const[t,{label:i}]of n.entries())if(e[t].label!==i)return!0}return!1}isAnnotationChange(t){var e,n,i,a;if((null===(e=this.currentArr[0])||void 0===e?void 0:e.meta)&&"polygons"in(null===(n=this.currentArr[0])||void 0===n?void 0:n.meta)){if(this.currentArr.length<1)return!0;{const e=t,n=(null===(i=this.currentArr[0])||void 0===i?void 0:i.meta).polygons;return e.length!==n.length||!!n.some(({coorPt:t},n)=>e.some(({coorPt:e},i)=>t[n].x!==e[i].x||t[n].y!==e[i].y))||null}}if(this.currentArr.length<1)return!0;{const e=t,n=(null===(a=this.currentArr[0])||void 0===a?void 0:a.meta).bnd_box;if(e.length!==n.length)return!0;for(const[t,{x1:i,x2:a,y1:o,y2:s,label:r}]of e.entries())if(Math.ceil(i)!==Math.ceil(n[t].x1)||Math.ceil(a)!==Math.ceil(n[t].x2)||Math.ceil(o)!==Math.ceil(n[t].y1)||Math.ceil(s)!==Math.ceil(n[t].y2)||r!==n[t].label)return!0}return!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})(),vt=(()=>{class t{constructor(t){this.el=t,this.srcAttr=null,this.canLazyLoad=()=>window&&"IntersectionObserver"in window,this.lazyLoadImage=()=>{new IntersectionObserver(t=>{t.forEach(({isIntersecting:t})=>{t?this.loadImage():this.unloadImage()})}).observe(this.el.nativeElement)},this.loadImage=()=>{this.srcAttr=this.src},this.unloadImage=()=>{this.srcAttr=""}}ngAfterViewInit(){this.canLazyLoad()?this.lazyLoadImage():this.loadImage()}}return t.\u0275fac=function(e){return new(e||t)(u.Hb(u.l))},t.\u0275dir=u.Cb({type:t,selectors:[["img","imgLazyLoad",""]],hostVars:1,hostBindings:function(t,e){2&t&&u.yb("src",e.srcAttr,u.jc)},inputs:{src:"src"}}),t})();var yt=n("3Pt+");const xt=["thumbnailList"],wt=function(t){return{"img-selected":t}};function St(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",12),u.Tb("click",function(){u.hc(t);const n=e.$implicit,i=e.index;return u.Vb(4).onClick(n,i)}),u.Mb(2,"div",13),u.Ib(3,"img",14),u.Lb(),u.Mb(4,"div",15),u.Mb(5,"label",16),u.oc(6),u.Wb(7,"fileNameSlice"),u.Lb(),u.Lb(),u.Mb(8,"div",17),u.Mb(9,"img",18),u.Tb("click",function(){u.hc(t);const n=e.$implicit;return u.Vb(4).renameImage(n)}),u.Wb(10,"translate"),u.Lb(),u.Lb(),u.Mb(11,"div"),u.Ib(12,"div",19),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=e.$implicit,n=e.index,i=u.Vb(4);u.xb(1),u.ac("ngClass",u.dc(9,wt,n===i._onChange.currentThumbnailIndex-1)),u.xb(2),u.ac("src",t.img_thumbnail,u.jc),u.xb(3),u.pc(u.Xb(7,5,t.img_path)),u.xb(3),u.ac("title",u.Xb(10,7,"renameModal.renameImg")),u.xb(3),u.ac("ngClass",(null==t.bnd_box?null:t.bnd_box.length)>0||(null==t.polygons?null:t.polygons.length)>0?"indicator":"no-indicator")}}function Ct(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",5),u.Mb(2,"label",6),u.oc(3),u.Wb(4,"translate"),u.Lb(),u.Mb(5,"div",7),u.Mb(6,"span",8),u.Mb(7,"div",9),u.Tb("click",function(){u.hc(t);const e=u.Vb().$implicit;return u.Vb(2).onClose(e)}),u.oc(8,"\u2716"),u.Lb(),u.Lb(),u.Lb(),u.Mb(9,"div",10,11),u.Tb("scroll",function(){return u.hc(t),u.Vb(3).mouseScroll()}),u.mc(11,St,13,11,"ng-container",2),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=u.Vb(),e=t.$implicit,n=t.index,i=u.Vb(2);u.xb(1),u.ac("ngClass",i.checkCloseToggle(e)),u.yb("data-index",n),u.xb(2),u.sc("",u.Xb(4,6,e.name)," (",i._thumbnailList.length,"/",i._totalUuid,")"),u.xb(8),u.ac("ngForOf",i._thumbnailList)}}function Mt(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"span",31),u.Tb("click",function(){u.hc(t);const e=u.Vb().$implicit;return u.Vb(5).onDeleteLabel(e)}),u.oc(2,"-"),u.Lb(),u.Jb()}if(2&t){const t=u.Vb(6);u.xb(1),u.ac("ngClass",t.clickAbilityToggle?"pointer":null)}}function kt(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",26),u.Mb(2,"label",27),u.Mb(3,"div",28),u.Tb("click",function(){u.hc(t);const n=e.$implicit,i=u.Vb(5);return i.clickAbilityToggle?i.onClickLabel(n):null}),u.oc(4),u.Lb(),u.Lb(),u.Mb(5,"label",29),u.mc(6,Mt,3,1,"ng-container",30),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=e.$implicit,n=u.Vb(5);u.xb(1),u.ac("ngClass",t===n.selectedLabel?"label-active":null),u.xb(2),u.ac("ngClass",n.clickAbilityToggle?"pointer":null),u.xb(1),u.qc(" ",t," "),u.xb(2),u.ac("ngIf",t===n.selectedLabel)}}function Pt(t,e){1&t&&(u.Mb(0,"label",32),u.oc(1),u.Wb(2,"translate"),u.Lb()),2&t&&(u.xb(1),u.qc(" ",u.Xb(2,1,"labellingProject.labelNotExist")," "))}function Ot(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",5),u.Mb(2,"label",6),u.oc(3),u.Wb(4,"translate"),u.Lb(),u.Mb(5,"div",7),u.Mb(6,"span",8),u.Mb(7,"div",9),u.Tb("click",function(){u.hc(t);const e=u.Vb(2).$implicit;return u.Vb(2).onClose(e)}),u.oc(8,"\u2716"),u.Lb(),u.Lb(),u.Lb(),u.Mb(9,"div",21),u.Mb(10,"input",22),u.Tb("ngModelChange",function(e){return u.hc(t),u.Vb(4).inputLabel=e})("ngModelChange",function(e){return u.hc(t),u.Vb(4).inputLabelChange(e)})("keydown.enter",function(e){return u.hc(t),u.Vb(4).validateInputLabel(e)}),u.Wb(11,"translate"),u.Lb(),u.Lb(),u.Mb(12,"div",23),u.Mb(13,"div",24),u.mc(14,kt,7,4,"ng-container",2),u.mc(15,Pt,3,3,"label",25),u.Lb(),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=u.Vb(2),e=t.$implicit,n=t.index,i=u.Vb(2);u.xb(1),u.ac("ngClass",i.checkCloseToggle(e)),u.yb("data-index",n),u.xb(2),u.pc(u.Xb(4,8,e.name)),u.xb(7),u.ac("ngClass",i.invalidInput?"input-invalid":null)("ngModel",i.inputLabel)("placeholder",u.Xb(11,10,"labellingProject.enterLabel")),u.xb(4),u.ac("ngForOf",i.labelList),u.xb(1),u.ac("ngIf",0===i.labelList.length)}}function Lt(t,e){if(1&t){const t=u.Nb();u.Mb(0,"div",38),u.Tb("click",function(){return u.hc(t),u.Vb(9).onDeleteAnnotation()}),u.oc(1," - "),u.Lb()}if(2&t){const t=u.Vb(9);u.ac("ngClass",t.clickAbilityToggle?"pointer":null)}}function It(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"label",36),u.Tb("click",function(){u.hc(t);const n=e.index,i=e.$implicit,a=u.Vb(8);return a.clickAbilityToggle?a.onClickAnnotation(n,i):null}),u.Mb(2,"div",19),u.oc(3),u.Lb(),u.mc(4,Lt,2,1,"div",37),u.Lb(),u.Jb()}if(2&t){const t=e.$implicit,n=e.index,i=u.Vb(8);u.xb(1),u.ac("ngClass",n===i.selectedIndexAnnotation?"annotation-active":null),u.yb("data-index",n),u.xb(1),u.ac("ngClass",i.clickAbilityToggle?"pointer":null),u.xb(1),u.rc(" ",t.label," : ",t.id," "),u.xb(1),u.ac("ngIf",n===i.selectedIndexAnnotation)}}function At(t,e){if(1&t&&(u.Kb(0),u.mc(1,It,5,6,"ng-container",2),u.Jb()),2&t){const t=u.Vb().$implicit;u.xb(1),u.ac("ngForOf",t.bnd_box)}}function Bt(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"label",36),u.Tb("click",function(){u.hc(t);const n=e.index,i=e.$implicit,a=u.Vb(8);return a.clickAbilityToggle?a.onClickAnnotation(n,i):null}),u.Mb(2,"div",19),u.oc(3),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=e.$implicit,n=e.index,i=u.Vb(8);u.xb(1),u.ac("ngClass",n===i.selectedIndexAnnotation?"annotation-active":null),u.yb("data-index",n),u.xb(1),u.ac("ngClass",i.clickAbilityToggle?"pointer":null),u.xb(1),u.rc(" ",t.label," : ",t.id," ")}}function jt(t,e){if(1&t&&u.mc(0,Bt,4,5,"ng-container",2),2&t){const t=u.Vb().$implicit;u.ac("ngForOf",t.polygons)}}function Et(t,e){if(1&t&&(u.Kb(0),u.mc(1,At,2,1,"ng-container",3),u.mc(2,jt,1,1,"ng-template",null,35,u.nc),u.Jb()),2&t){const t=e.$implicit,n=u.fc(3);u.xb(1),u.ac("ngIf",t.bnd_box)("ngIfElse",n)}}function zt(t,e){if(1&t&&(u.Kb(0),u.mc(1,Et,4,2,"ng-container",2),u.Jb()),2&t){const t=u.Vb(3).$implicit;u.xb(1),u.ac("ngForOf",t.annotation)}}function Tt(t,e){if(1&t){const t=u.Nb();u.Mb(0,"div",5),u.Mb(1,"label",6),u.oc(2),u.Wb(3,"translate"),u.Lb(),u.Mb(4,"div",7),u.Mb(5,"span",8),u.Mb(6,"div",9),u.Tb("click",function(){u.hc(t);const e=u.Vb(2).$implicit;return u.Vb(2).onClose(e)}),u.oc(7,"\u2716"),u.Lb(),u.Lb(),u.Lb(),u.Mb(8,"div",33),u.Mb(9,"div",24),u.Mb(10,"div",34),u.mc(11,zt,2,1,"ng-container",30),u.Lb(),u.Lb(),u.Lb(),u.Lb()}if(2&t){const t=u.Vb(2),e=t.$implicit,n=t.index,i=u.Vb(2);u.ac("ngClass",i.checkCloseToggle(e)),u.yb("data-index",n),u.xb(2),u.pc(u.Xb(3,4,e.name)),u.xb(9),u.ac("ngIf",null==e?null:e.annotation)}}function Dt(t,e){if(1&t&&(u.mc(0,Ot,16,12,"ng-container",3),u.mc(1,Tt,12,6,"ng-template",null,20,u.nc)),2&t){const t=u.fc(2),e=u.Vb().index;u.ac("ngIf",1===e)("ngIfElse",t)}}function Nt(t,e){if(1&t&&(u.Kb(0),u.mc(1,Ct,12,8,"ng-container",3),u.mc(2,Dt,3,2,"ng-template",null,4,u.nc),u.Jb()),2&t){const t=e.index,n=u.fc(3);u.xb(1),u.ac("ngIf",0===t)("ngIfElse",n)}}function Rt(t,e){if(1&t&&(u.Mb(0,"div",1),u.mc(1,Nt,4,2,"ng-container",2),u.Lb()),2&t){const t=u.Vb();u.xb(1),u.ac("ngForOf",t._tabStatus)}}let Ft=(()=>{class t{constructor(t,e,n,i){this._annotateService=t,this._imgLblState=e,this._languageService=n,this._undoRedoService=i,this._totalUuid=0,this._thumbnailList=[],this._tabStatus=[],this._onClose=new u.n,this._onClickThumbnail=new u.n,this._onClickLabel=new u.n,this._onEnterLabel=new u.n,this._onChangeAnnotationLabel=new u.n,this._onDeleteAnnotation=new u.n,this._loadMoreThumbnails=new u.n,this._onRenameImage=new u.n,this.action=-1,this.displayInputLabel=!1,this.inputLabel="",this.selectedIndexAnnotation=-1,this.selectedLabel="",this.unsubscribe$=new l.a,this.clickAbilityToggle=!1,this.invalidInput=!1,this.labelList=[],this.isTabStillOpen=!0,this.tempMax=0,this.max=0,this.updateLabelList=()=>{this.labelList=this._tabStatus[1].label_list?this._tabStatus[1].label_list:[]},this.onClose=t=>{this._onClose.emit({name:t.name,closed:!0})},this.onClick=(t,e)=>{this._onClickThumbnail.emit(Object.assign(Object.assign({},t),{thumbnailIndex:e})),this.selectedIndexAnnotation=-1,this.selectedLabel=""},this.onDisplayInputModal=()=>{this.displayInputLabel=!this.displayInputLabel,this.inputLabel=""},this.validateInputLabel=({target:t})=>{const{value:e}=t,n=e.trim();if(n)if(n.match(/^[a-zA-Z0-9-]*$/))if(this._tabStatus.some(({label_list:t})=>t&&t.length&&t.some(t=>t===n)))this.invalidInput=!0,console.error("Invalid existing label input");else{this.invalidInput=!1;const t=this._tabStatus.map(({label_list:t})=>t||[]).filter(t=>t.length>0)[0];this._onEnterLabel.emit({action:1,label_list:t?[...t,e]:[e]}),this.displayInputLabel=!1,this.inputLabel=""}else this.invalidInput=!0,console.error("Invalid input value")},this.onDeleteLabel=t=>{let e=!1;if(this._thumbnailList.forEach(n=>{n.bnd_box&&n.bnd_box.forEach(n=>{n.label===t&&(e=!0)}),n.polygons&&n.polygons.forEach(n=>{n.label===t&&(e=!0)})}),e)this._languageService._translate.get("labelExist").subscribe(t=>{alert(t)});else{const[{label_list:e}]=this._tabStatus.filter(t=>t.label_list);this._onClickLabel.emit({selectedLabel:t,label_list:e&&e.length>0?e:[],action:0})}},this.onClickLabel=t=>{this.selectedLabel=t,this._onChangeAnnotationLabel.emit({label:t,index:this.selectedIndexAnnotation}),this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"})},this.onClickAnnotation=(t,{label:e})=>{this.selectedLabel=e,this._annotateService.setState({annotation:t})},this.onDeleteAnnotation=()=>{this.selectedIndexAnnotation>-1&&(this._onDeleteAnnotation.emit(this.selectedIndexAnnotation),this._selectMetadata.bnd_box.splice(this.selectedIndexAnnotation,1)&&this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}))},this.checkCloseToggle=t=>{let e="";return"labellingProject.label"===t.name&&this._tabStatus[2].closed||"labellingProject.project"===t.name&&this._tabStatus[1].closed&&this._tabStatus[2].closed||"labellingProject.annotation"===t.name||(e="flex-content"),t.closed&&(e+=" closed"),e},this.checkStateEqual=(t,e)=>!ut(t,e)}ngOnInit(){this.updateLabelList(),this._imgLblState.action$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(({draw:t})=>this.clickAbilityToggle=t),this._thumbnailList.length>0&&this._annotateService.labelStaging$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(({annotation:t})=>{var e;this.selectedIndexAnnotation=t;const[{annotation:n}]=this._tabStatus.filter(t=>t.annotation),i=null==n?void 0:n.map(({bnd_box:e,polygons:n})=>e?e.find((e,n)=>n===t):n?n.find((e,n)=>n===t):void 0)[0];this.selectedLabel=null!==(e=null==i?void 0:i.label)&&void 0!==e?e:""})}inputLabelChange(t){var e;this.labelList=this._tabStatus[1].label_list?null===(e=this._tabStatus[1].label_list)||void 0===e?void 0:e.filter(e=>e.includes(t)):[]}ngOnChanges(t){if(t._thumbnailList){const{currentValue:e}=t._thumbnailList;this._thumbnailList=Object.assign([],this._thumbnailList,[...e])}if(t._tabStatus&&this.checkStateEqual(t._tabStatus.currentValue,t._tabStatus.previousValue)){const{currentValue:e}=t._tabStatus;this._tabStatus=[...e],this.updateLabelList(),this.isTabStillOpen=!1;for(const{closed:t}of this._tabStatus)if(!t){this.isTabStillOpen=!0;break}}}openAllTab(){this._tabStatus.forEach(t=>{t.closed=!1})}mouseScroll(){const t=this.thumbnailList.nativeElement.scrollTop+this.thumbnailList.nativeElement.clientHeight;this.max=this.thumbnailList.nativeElement.scrollHeight,t+1500>=this.max&&this.tempMax!==this.max&&(this.tempMax=this.max,this._loadMoreThumbnails.emit())}renameImage(t){this._onRenameImage.emit(t)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}}return t.\u0275fac=function(e){return new(e||t)(u.Hb(S),u.Hb(M),u.Hb(P.a),u.Hb(_t))},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-project"]],viewQuery:function(t,e){if(1&t&&u.tc(xt,!0),2&t){let t;u.ec(t=u.Ub())&&(e.thumbnailList=t.first)}},hostBindings:function(t,e){1&t&&u.Tb("scroll",function(t){return e.mouseScroll(t)})},inputs:{_onChange:"_onChange",_totalUuid:"_totalUuid",_selectMetadata:"_selectMetadata",_thumbnailList:"_thumbnailList",_tabStatus:"_tabStatus"},outputs:{_onClose:"_onClose",_onClickThumbnail:"_onClickThumbnail",_onClickLabel:"_onClickLabel",_onEnterLabel:"_onEnterLabel",_onChangeAnnotationLabel:"_onChangeAnnotationLabel",_onDeleteAnnotation:"_onDeleteAnnotation",_loadMoreThumbnails:"_loadMoreThumbnails",_onRenameImage:"_onRenameImage"},features:[u.vb],decls:1,vars:1,consts:[["class","tab-container",4,"ngIf"],[1,"tab-container"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["nonThumbnailTab",""],[1,"utility-right-project-container","tab","flex-fill-remaining",3,"ngClass"],[1,"tab-name"],[1,"flex-tab-icons"],[1,"tab-close-thumbnailless"],[1,"div-close",3,"click"],["id","thumbnailList",1,"utility-inner-container","tab-height","scroll",3,"scroll"],["thumbnailList",""],[1,"img-container",3,"ngClass","click"],[1,"img-skeleton"],["imgLazyLoad","",1,"img",3,"src"],[1,"img-name"],[1,"img-path"],[1,"thumbnail-actions"],["src","../../../assets/icons/last_modify.svg","alt","edit","height","35%","width","35%",1,"rename-img",3,"title","click"],[3,"ngClass"],["annotationTab",""],[1,"div-input"],["type","text",1,"input",3,"ngClass","ngModel","placeholder","ngModelChange","keydown.enter"],["id","inner-container",1,"utility-inner-container","tab-height","scroll"],[1,"flex-item"],["class","not-exist",4,"ngIf"],[1,"flex-center-width",3,"ngClass"],[1,"label"],[3,"ngClass","click"],[1,"action"],[4,"ngIf"],[1,"delete-label",3,"ngClass","click"],[1,"not-exist"],["id","inner-container",1,"utility-inner-container","scroll","tab-smaller-height"],[1,"flex-center-width"],["polygon",""],[1,"label",3,"ngClass","click"],["class","delete-annotation",3,"ngClass","click",4,"ngIf"],[1,"delete-annotation",3,"ngClass","click"]],template:function(t,e){1&t&&u.mc(0,Rt,2,1,"div",0),2&t&&u.ac("ngIf",e.isTabStillOpen)},directives:[i.k,i.j,i.i,vt,yt.a,yt.f,yt.i],pipes:[E.c,j],styles:['.tab-container[_ngcontent-%COMP%]{display:flex;flex-flow:column;height:100%;right:0;position:fixed;z-index:1000;min-width:18.5vw;max-width:18.5vw}.utility-right-project-container[_ngcontent-%COMP%]{height:100%;min-width:16.3vw;max-width:16.3vw;background:#383535;border:.0325vw solid hsla(0,0%,100%,.25);border-top:none;z-index:1000;align-items:stretch}.utility-right-project-container[_ngcontent-%COMP%]:after{position:absolute;content:"";top:0;min-width:8.5vw;max-width:8.5vw;min-height:4vh;max-height:4vh;background:#383535;z-index:-1;font-size:1.5vh;line-height:3vh;color:#fff;padding:.5vh 0 0 2vw}.tab[_ngcontent-%COMP%]{position:sticky;overflow:hidden}.tab[_ngcontent-%COMP%]:before{position:absolute;content:"";top:4vh;min-width:100vw;max-width:100vw;min-height:93vh;max-height:93vh;background:#383535;z-index:-1}.flex-fixed[_ngcontent-%COMP%]{flex:0 1 25vh}.flex-fill-remaining[_ngcontent-%COMP%]{flex:1 1 auto}.flex-content[_ngcontent-%COMP%]{display:flex;flex-flow:column;height:33%;min-height:10%;flex-shrink:0;flex-grow:0;resize:vertical}.tab-name[_ngcontent-%COMP%]{font-size:1.7vh;padding:.5vw 2vw 0 1vw;display:inline-block;color:#fff;position:absolute}.tab-close-thumbnail[_ngcontent-%COMP%]{margin-left:3vw;justify-content:center}.tab-close-thumbnail[_ngcontent-%COMP%], .tab-close-thumbnailless[_ngcontent-%COMP%]{float:right;vertical-align:middle;min-height:4vh;max-height:4vh;color:#696969;font-size:1.8vh;line-height:4vh;text-align:center;display:inline-grid;padding-bottom:1vh}.tab-close-thumbnailless[_ngcontent-%COMP%]{flex:1 0 60%;justify-content:right}.div-close[_ngcontent-%COMP%]{margin-right:.5vw;min-width:1.6vw;max-width:1.6vw;min-height:4vh;max-height:4vh;color:#fff;cursor:pointer;text-align:center;float:right}.div-close[_ngcontent-%COMP%]:active{background:grey}.utility-inner-container[_ngcontent-%COMP%]{padding:2.5vh 0 0 .2vw;scroll-behavior:smooth;overflow:hidden auto;z-index:100;min-width:15.5vw;max-width:15.5vw}.tab-height[_ngcontent-%COMP%]{height:85%}.tab-smaller-height[_ngcontent-%COMP%]{height:60%}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px;background-color:#000}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:.5vw}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.img-container[_ngcontent-%COMP%], .utility-icon-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh}.img-container[_ngcontent-%COMP%]{font-size:1.5vh;color:#fff;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;cursor:pointer;margin:0 .3vw;padding:.1vh .4vw}.img-container[_ngcontent-%COMP%]:hover{background-color:#444;border-radius:2px}.img-selected[_ngcontent-%COMP%]{background:#555}.rename-img[_ngcontent-%COMP%]{border-radius:50%;padding:.2vh}.rename-img[_ngcontent-%COMP%]:hover{background:#555}.img[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;display:block}.img[_ngcontent-%COMP%], .img-skeleton[_ngcontent-%COMP%]{max-height:4.3vh;min-height:4.3vh;max-width:3vw}.img-skeleton[_ngcontent-%COMP%]{min-width:3vw;border:.005vh dotted #525353}.img-name[_ngcontent-%COMP%]{margin-left:.5vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.closed[_ngcontent-%COMP%]{display:none}.utility-icon-dark[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute}.flex-item[_ngcontent-%COMP%]{align-items:center;flex-direction:column;font-size:1.5vh;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flex-center-width[_ngcontent-%COMP%], .flex-item[_ngcontent-%COMP%]{display:flex;justify-content:center}.flex-center-width[_ngcontent-%COMP%]{width:90%;flex-wrap:wrap}.label[_ngcontent-%COMP%]{flex:1 1 80%;display:flex;justify-content:flex-start;margin:.25vh 0}.pointer[_ngcontent-%COMP%]{cursor:pointer}.annotation-active[_ngcontent-%COMP%], .label-active[_ngcontent-%COMP%]{border:.15vw solid #ff0}.utility-info-btn[_ngcontent-%COMP%]{font-size:1vw;min-width:0;max-width:0;min-height:2.5vh;max-height:2.5vh;line-height:0;right:21vh;position:absolute;background:#383535;border:none;color:#fff}.flex-tab-icons[_ngcontent-%COMP%]{display:flex;width:100%}.extra-icons[_ngcontent-%COMP%]{cursor:pointer}.extra-icons[_ngcontent-%COMP%]:active{background:grey}.tab-extra-icons[_ngcontent-%COMP%]{float:right;vertical-align:middle;font-size:1.7vh;line-height:4vh;text-align:center;color:#fff;flex:1 0 15%;justify-content:flex-start}.tab-text[_ngcontent-%COMP%]{font-size:1.7vh;min-width:6vw;max-width:6vw}.inner-content[_ngcontent-%COMP%]{max-height:25vh;min-height:25vh;min-width:3vw;max-width:3vw}.div-input[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;margin:.5vh .9vw}.input[_ngcontent-%COMP%]{border-radius:8vw;border:none;outline:none;padding:.3vw 0 .3vw 1vw;min-height:1.5vh;max-height:1.5vh;min-width:13vw;max-width:13vw;font-size:1.3vh;background:#525353;color:#fff}.input-invalid[_ngcontent-%COMP%]{border:.2vw solid red}.img-path[_ngcontent-%COMP%]{margin-top:4vh}.indicator[_ngcontent-%COMP%]{background-color:#75fe7c}.indicator[_ngcontent-%COMP%], .no-indicator[_ngcontent-%COMP%]{height:1vh;width:.5vw;border-radius:50%;position:relative}.no-indicator[_ngcontent-%COMP%]{background-color:#ffba54}.not-exist[_ngcontent-%COMP%]{font-size:1.5vh;color:#999}.delete-annotation[_ngcontent-%COMP%], .delete-label[_ngcontent-%COMP%]{position:absolute;right:2vw}.open-all-tabs[_ngcontent-%COMP%]{cursor:pointer;padding:.2vh .2vw;border-radius:.7vw}.open-all-tabs[_ngcontent-%COMP%]:hover{background:#636363}.open-all-tabs[_ngcontent-%COMP%]:active, .open-all-tabs[_ngcontent-%COMP%]:focus{background:#737474}.tab-skeleton[_ngcontent-%COMP%]{position:absolute;height:100vh;width:16.5vw;background:#525353;border-left:.0625vw solid hsla(0,0%,100%,.25);text-align:center;color:#cac8c8;font-size:2vh}.choose-tab[_ngcontent-%COMP%]{margin-top:42vh}.thumbnail-actions[_ngcontent-%COMP%]{text-align:end;padding-right:1vw}']}),t})();function Xt(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"div",3),u.Mb(2,"label"),u.Mb(3,"img",4),u.Tb("click",function(){return e.$implicit.onClick()}),u.Wb(4,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Jb()),2&t){const t=e.$implicit,n=e.index,i=u.Vb();u.xb(3),u.lc(t.style),u.ac("ngClass",i.conditionalIconTheme())("src",t.imgPath,u.jc)("alt",t.alt)("title",u.Xb(4,7,t.hoverLabel)),u.yb("data-index",n)}}let Wt=(()=>{class t{constructor(){this._onClick=new u.n,this._onExport=new u.n,this._onReload=new u.n,this.bindImagePath=()=>{this.jsonSchema={logos:[{imgPath:"../../../assets/icons/folder.svg",hoverLabel:"rightSideBar.folderOrFiles",alt:"Folder",onClick:()=>{this._onClick.emit({name:"labellingProject.project",closed:!1})}},{imgPath:"../../../assets/icons/tag.svg",hoverLabel:"rightSideBar.label",alt:"Label",onClick:()=>{this._onClick.emit({name:"labellingProject.label",closed:!1})}},{imgPath:"../../../assets/icons/bounding_box.svg",hoverLabel:"rightSideBar.annotation",alt:"Annotation",onClick:()=>{this._onClick.emit({name:"labellingProject.annotation",closed:!1})}},{imgPath:"../../../assets/icons/statistic.svg",hoverLabel:"rightSideBar.statistic",alt:"Statistic",onClick:()=>{}},{imgPath:"../../../assets/icons/export.svg",hoverLabel:"rightSideBar.export",alt:"Export",style:"padding: 1.5vh 0.5vw;",onClick:()=>{this._onExport.emit()}},{imgPath:"../../../assets/icons/reload.svg",hoverLabel:"rightSideBar.reload",alt:"Reload",style:"padding: 1.5vh 0.5vw;",onClick:()=>{this._onReload.emit()}}]}},this.conditionalIconTheme=()=>"utility-icon-light"}ngOnInit(){this.bindImagePath()}ngOnChanges(t){this.bindImagePath()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-right-sidebar"]],inputs:{_onChange:"_onChange"},outputs:{_onClick:"_onClick",_onExport:"_onExport",_onReload:"_onReload"},features:[u.vb],decls:3,vars:1,consts:[[1,"utility-right-sidebar-container"],[1,"utility-inner-container"],[4,"ngFor","ngForOf"],[1,"utility-icon-container"],[3,"ngClass","src","alt","title","click"]],template:function(t,e){1&t&&(u.Mb(0,"div",0),u.Mb(1,"div",1),u.mc(2,Xt,5,9,"ng-container",2),u.Lb(),u.Lb()),2&t&&(u.xb(2),u.ac("ngForOf",e.jsonSchema.logos))},directives:[i.j,i.i],pipes:[E.c],styles:[".utility-right-sidebar-container[_ngcontent-%COMP%]{position:absolute;top:4.5vh;min-width:2.2vw;max-width:2.2vw;min-height:95.5vh;max-height:95.5vh;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);z-index:1000}.utility-inner-container[_ngcontent-%COMP%]{min-width:2.2vw;max-width:2.2vw;position:absolute}.utility-icon-container[_ngcontent-%COMP%], .utility-inner-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh}.utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute;cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active, .utility-icon-light[_ngcontent-%COMP%]:focus{background:#a9a9a9}.input-none[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),t})();function Ut(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"div",4),u.oc(2),u.Wb(3,"translate"),u.Lb(),u.Jb()),2&t){const t=u.Vb(2);u.xb(2),u.rc("",u.Xb(3,2,"footer.image"),": ",t.thumbnailType,"")}}function $t(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",2),u.Mb(2,"div",3),u.oc(3),u.Wb(4,"translate"),u.Lb(),u.Mb(5,"div",4),u.oc(6),u.Wb(7,"translate"),u.Lb(),u.mc(8,Ut,4,4,"ng-container",1),u.Mb(9,"div",4),u.oc(10),u.Lb(),u.Mb(11,"div",5),u.Wb(12,"translate"),u.Mb(13,"label",6),u.Tb("click",function(){u.hc(t);const e=u.Vb();return e.copyMessage(e._thumbnailInfo.img_path)}),u.oc(14),u.Lb(),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=u.Vb();u.xb(3),u.rc(" ",u.Xb(4,9,"footer.projectName"),": ",t._thumbnailInfo.project_name," "),u.xb(3),u.rc("",u.Xb(7,11,"footer.size"),": ",t.thumbnailSize,""),u.xb(2),u.ac("ngIf",t.thumbnailType),u.xb(2),u.rc("",t._thumbnailInfo.img_ori_w," x ",t._thumbnailInfo.img_ori_h,""),u.xb(1),u.ac("title",u.Xb(12,13,"footer.copyToClipboard")),u.xb(3),u.pc(t._thumbnailInfo.img_path)}}let Yt=(()=>{class t{constructor(){this._imgSrc="",this.thumbnailSize="",this.thumbnailType="",this.formatBytes=(t,e=2)=>{if(0===t)return"0 Bytes";const n=e<0?0:e,i=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,i)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}}ngOnInit(){}copyMessage(t){const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}ngOnChanges(t){if(t._thumbnailInfo&&t._imgSrc){const{currentValue:e}=t._thumbnailInfo,{currentValue:n}=t._imgSrc;this._thumbnailInfo=Object.assign(Object.assign({},this._thumbnailInfo),e),this.thumbnailSize=this.formatBytes(n.length);const i=n.match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(i&&i.length){const t=i[1].split("/")[1];this.thumbnailType=t}}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-footer"]],inputs:{_thumbnailInfo:"_thumbnailInfo",_imgSrc:"_imgSrc"},features:[u.vb],decls:3,vars:3,consts:[[1,"footer-container"],[4,"ngIf"],[1,"footer-label-container"],[1,"footer-label","footer-project-name"],[1,"footer-label"],[1,"footer-image-path",3,"title"],[1,"footer-path-label",3,"click"]],template:function(t,e){1&t&&(u.Mb(0,"div",0),u.mc(1,$t,15,15,"ng-container",1),u.Wb(2,"json"),u.Lb()),2&t&&(u.xb(1),u.ac("ngIf","{}"!=u.Xb(2,1,e._thumbnailInfo)))},directives:[i.k],pipes:[i.e,E.c],styles:[".footer-container[_ngcontent-%COMP%]{position:absolute;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);min-height:2.3vh;max-height:2.3vh;min-width:100vw;max-width:100vw;bottom:0;padding-left:2.5vw}.footer-label-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:baseline;width:80%}.footer-label[_ngcontent-%COMP%]{font-size:1.6vh;color:#fff;outline:none;border-right:.05vw solid #fff;padding:0 1vw;text-align:left}.footer-project-name[_ngcontent-%COMP%]{max-width:20vw}.footer-image-path[_ngcontent-%COMP%], .footer-project-name[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.footer-image-path[_ngcontent-%COMP%]{display:flex;font-size:1.6vh;color:#fff;outline:none;border-right:.05vw solid #fff;padding:0 1vw}.border-right[_ngcontent-%COMP%]{border-right:1rem #fff}.utility-icon-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh;align-items:baseline}.utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:1.5vh;max-height:1.5vh;padding:0;position:absolute;cursor:context-menu}.footer-path-label[_ngcontent-%COMP%]{cursor:pointer;padding:0 .2vw;border-radius:.5vw}.footer-path-label[_ngcontent-%COMP%]:hover{background:#636363}.footer-path-label[_ngcontent-%COMP%]:active, .footer-path-label[_ngcontent-%COMP%]:focus{background:#737474}"],changeDetection:0}),t})();var Vt=n("44N4"),Zt=n("OObL"),Ht=n("TJKd");function Kt(t,e){if(1&t&&(u.Mb(0,"span"),u.oc(1),u.Lb()),2&t){const t=u.Vb(2);u.xb(1),u.qc("Zipping ",t._processingNum," file")}}function Jt(t,e){1&t&&(u.Mb(0,"span"),u.oc(1,"Done"),u.Lb())}function Gt(t,e){1&t&&u.Ib(0,"div",5)}function qt(t,e){1&t&&(u.Mb(0,"div",6),u.oc(1,"\u2714"),u.Lb())}function Qt(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"div",1),u.Mb(2,"div",2),u.mc(3,Kt,2,1,"span",0),u.mc(4,Jt,2,0,"span",0),u.Lb(),u.mc(5,Gt,1,0,"div",3),u.mc(6,qt,2,0,"div",4),u.Lb(),u.Jb()),2&t){const t=u.Vb();u.xb(3),u.ac("ngIf",t._processingNum>0),u.xb(1),u.ac("ngIf",0===t._processingNum),u.xb(1),u.ac("ngIf",t._processingNum>0),u.xb(1),u.ac("ngIf",0===t._processingNum)}}let te=(()=>{class t{constructor(){this._processingNum=0,this.doneProcess=!1}ngOnInit(){}delay(t){return new Promise(e=>setTimeout(e,t))}ngOnChanges(t){return Object(a.a)(this,void 0,void 0,function*(){t._processingNum&&(console.log(t._processingNum),1===t._processingNum.previousValue&&0===t._processingNum.currentValue&&(this.doneProcess=!0,yield this.delay(1e3),this.doneProcess=!1))})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=u.Bb({type:t,selectors:[["toastr"]],inputs:{_processingNum:"_processingNum"},features:[u.vb],decls:1,vars:1,consts:[[4,"ngIf"],[1,"toastr"],[1,"text"],["class","loader",4,"ngIf"],["class","done",4,"ngIf"],[1,"loader"],[1,"done"]],template:function(t,e){1&t&&u.mc(0,Qt,7,4,"ng-container",0),2&t&&u.ac("ngIf",e._processingNum>0||e.doneProcess)},directives:[i.k],styles:[".toastr[_ngcontent-%COMP%]{position:absolute;z-index:10000;background:#262a2e;border-radius:1vh;color:#fff;bottom:5vh;right:5vw;padding:2vh 2vw;display:flex;justify-content:center}.text[_ngcontent-%COMP%]{margin:auto 1vw auto auto;font-size:2vh}.loader[_ngcontent-%COMP%]{border-radius:50%;border:.5vh solid #f3f3f3;border-top-color:#de1c44;width:2vh;height:2vh;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.done[_ngcontent-%COMP%]{color:#92c91b;font-size:2vh}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}"]}),t})();var ee=n("CfRg"),ne=function(t){return Object(ee.a)(t,4)};let ie=(()=>{class t{constructor(){this.globalXY={x:0,y:0},this.panXY={x:0,y:0},this.currentClickedBox={box:-1,pos:"o"},this.lineOffset=3,this.anchrSize=2.5,this.currentDrawing={x1:0,x2:0,y1:0,y2:0},this.currentSelectedBndBox=-1,this.util=new pt}getDiffXY({offsetX:t,offsetY:e}){try{const n={diffX:0,diffY:0};return n.diffX=this.globalXY.x+(t-this.panXY.x),n.diffY=this.globalXY.y+(e-this.panXY.y),n}catch(n){return console.log("ObjectDetection getDiffXY(offsetX: number,offsetY: number): { diffX: number; diffY: number }",n.name+": ",n.message),{diffX:-1,diffY:-1}}}setCurrentX1Y1(t,e){try{null!==t&&null!==e&&void 0!==t&&void 0!==e&&(this.currentDrawing.x1=t,this.currentDrawing.y1=e)}catch(n){console.log("ObjectDetection setCurrentX1Y1(MouseX:number, MouseY:number):void",n.name+": ",n.message)}}setCurrentX2Y2(t,e){try{null!==t&&null!==e&&void 0!==t&&void 0!==e&&(this.currentDrawing.x2=t,this.currentDrawing.y2=e)}catch(n){console.log("ObjectDetection setCurrentX2Y2(MouseX:number, MouseY:number):void",n.name+": ",n.message)}}moveAllBbox(t,e,n,i){try{for(const i of t){const t=i.x2-i.x1,a=i.y2-i.y1;i.x1=ne(e+i.distancetoImg.x),i.y1=ne(n+i.distancetoImg.y),i.x2=ne(i.x1+t),i.y2=ne(i.y1+a)}i&&i(!0)}catch(a){}}calScaleTofitScreen(t,e,n,i){try{const a={factor:-1,newX:-1,newY:-1};return a.factor=Math.min(n/t,i/e),a.factor=a.factor-.05*a.factor,a.newX=n/2-t/2*a.factor,a.newY=i/2-e/2*a.factor,a}catch(a){return{factor:-1,newX:-1,newY:-1}}}deleteSingleBox(t,e,n){try{t.splice(e,1),this.currentSelectedBndBox=-1,this.currentClickedBox={box:-1,pos:"o"},n(!0)}catch(i){}}keyboardMoveBox(t,e,{img_w:n,img_h:i,img_x:a,img_y:o},s){try{switch(t){case"up":this.moveBoxWithinPointPath(a,o,n,i,0,-3,e)&&(e.y1-=3,e.y2-=3);break;case"down":this.moveBoxWithinPointPath(a,o,n,i,0,3,e)&&(e.y1+=3,e.y2+=3);break;case"left":this.moveBoxWithinPointPath(a,o,n,i,-3,0,e)&&(e.x1-=3,e.x2-=3);break;case"right":this.moveBoxWithinPointPath(a,o,n,i,3,0,e)&&(e.x1+=3,e.x2+=3)}s(!0)}catch(r){}}moveBoxWithinPointPath(t,e,n,i,a,o,s){try{return!(s.x1+at+n||s.y1+oe+i)}catch(r){return console.log("ObjectDetection isWithinPointPath(imgx:number, imgy:number, imgw:number, imgh:number, addx:number, addy:number, box:Boundingbox):Boolean",r.name+": ",r.message),!1}}mouseMoveBox(t,e,n){try{if(this.moveBoxWithinPointPath(n.img_x,n.img_y,n.img_w,n.img_h,t-this.currentDrawing.x1,e-this.currentDrawing.y1,n.bnd_box[this.currentSelectedBndBox])){this.setCurrentX2Y2(t,e);const i=this.currentDrawing.x2-this.currentDrawing.x1,a=this.currentDrawing.y2-this.currentDrawing.y1;this.setCurrentX1Y1(this.currentDrawing.x2,this.currentDrawing.y2),"i"!==this.currentClickedBox.pos&&"tl"!==this.currentClickedBox.pos&&"l"!==this.currentClickedBox.pos&&"bl"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].x1+=i),"i"!==this.currentClickedBox.pos&&"tl"!==this.currentClickedBox.pos&&"t"!==this.currentClickedBox.pos&&"tr"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].y1+=a),"i"!==this.currentClickedBox.pos&&"tr"!==this.currentClickedBox.pos&&"r"!==this.currentClickedBox.pos&&"br"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].x2+=i),"i"!==this.currentClickedBox.pos&&"bl"!==this.currentClickedBox.pos&&"b"!==this.currentClickedBox.pos&&"br"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].y2+=a)}}catch(i){console.log("ObjectDetection mouseMoveBox(MouseX:number, MouseY:number, CurrMeta:Metadata):void",i.name+": ",i.message)}}getCurrentSelectedBox(){try{return this.currentSelectedBndBox}catch(t){return-1}}setCurrentSelectedbBox(t){try{this.currentSelectedBndBox=t}catch(e){console.log("ObjectDetection setCurrentSelectedbBox(newNUM:number):void",e.name+": ",e.message)}}mouseUpDrawEnable(t,e,n){try{const i={selBox:-1,isNew:!1};if(-1===this.currentClickedBox.box&&null!==this.tmpbox)t.bnd_box.push(this.tmpbox),this.currentSelectedBndBox=t.bnd_box.length-1,t.bnd_box[this.currentSelectedBndBox].label=e.length>0?e[0].name:"",i.isNew=!0,i.selBox=ne(this.currentSelectedBndBox);else if(this.currentClickedBox.box>-1&&this.tmpbox){if(t.bnd_box[this.currentSelectedBndBox].x1>t.bnd_box[this.currentSelectedBndBox].x2){const e=ne(t.bnd_box[this.currentSelectedBndBox].x1);t.bnd_box[this.currentSelectedBndBox].x1=ne(t.bnd_box[this.currentSelectedBndBox].x2),t.bnd_box[this.currentSelectedBndBox].x2=e}if(t.bnd_box[this.currentSelectedBndBox].y1>t.bnd_box[this.currentSelectedBndBox].y2){const e=ne(t.bnd_box[this.currentSelectedBndBox].y1);t.bnd_box[this.currentSelectedBndBox].y1=ne(t.bnd_box[this.currentSelectedBndBox].y2),t.bnd_box[this.currentSelectedBndBox].y2=e}}return this.currentClickedBox={box:-1,pos:"o"},this.setCurrentX1Y1(0,0),this.setCurrentX2Y2(0,0),this.tmpbox=null,n(!0),i}catch(i){return console.log("ObjectDetection MouseUpDrawEnable(CurrMeta: Metadata): number",i.name+": ",i.message),{selBox:-1,isNew:!1}}}panRectangle(t,e,n,i){try{for(const i of t){const t=i.x2-i.x1,a=i.y2-i.y1;i.x1=e+i.distancetoImg.x,i.y1=n+i.distancetoImg.y,i.x2=i.x1+t,i.y2=i.y1+a}i(!0)}catch(a){console.log("ObjectDetection panRectangle(bbox:Boundingbox[], img_X:number, img_Y:number)",a.name+": ",a.message)}}scaleAllBoxes(t,e,n,i,a){try{for(const a of e){const e=a.distancetoImg.x*t+n,o=a.distancetoImg.y*t+i,s=e+(a.x2-a.x1)*t,r=o+(a.y2-a.y1)*t;a.x1=ne(e),a.y1=ne(o),a.x2=ne(s),a.y2=ne(r);const l=a.y1-i;a.distancetoImg.x=ne(a.x1-n),a.distancetoImg.y=ne(l)}a&&a(!0)}catch(o){console.log("ObjectDetection scaleAllBoxes(scalefactor: number,boxes:Boundingbox[],imgX:number,imgY:number)",o.name+": ",o.message)}}mouseMoveDrawEnable(t,e,n){try{-1===this.currentClickedBox.box?this.setCurrentX2Y2(t,e):this.mouseMoveBox(t,e,n)}catch(i){console.log("ObjectDetection MouseMoveDrawEnable(MouseX: number,MouseY: number,SelectedMeta: Metadata): void",i.name+": ",i.message)}}mouseDownDrawEnable(t,e,n){try{return this.getCurrentClickBox(t,e,n),this.setCurrentX1Y1(t,e),this.setCurrentX2Y2(t,e),this.currentSelectedBndBox=-1!==this.currentClickedBox.box?this.currentClickedBox.box:-1,this.currentClickedBox.box}catch(i){return console.log("ObjectDetection MouseDownDrawEnable(MouseX:number,MouseY:number,BBox:Boundingbox[]):number",i.name+": ",i.message),-1}}setPanXY(t,e){try{return!(!t||!e||(this.panXY.x=t,this.panXY.y=e,0))}catch(n){return console.log("ObjectDetection setPanXY(newX: number, newY: number):boolean",n.name+": ",n.message),!1}}setGlobalXY(t,e){try{return!(!t||!e||(this.globalXY.x=t,this.globalXY.y=e,0))}catch(n){return console.log("ObjectDetection SetGlobalXY(newX: number, newY: number):boolean",n.name+": ",n.message),!1}}changeLabel(t,e){t&&e&&(t.label=e)}mouseClickWithinPointPath({img_x:t,img_y:e,img_w:n,img_h:i},{offsetX:a,offsetY:o}){try{return a>t&&ae&&o0)for(const[i,a]of e.entries())i===this.currentClickedBox.box||i===this.currentSelectedBndBox?(a.color="rgba(0,255,0,1.0)",a.lineWidth=2,this.drawEachBoxOn(t,a,n,!0)):(a.color="rgba(255,255,0,0.8)",a.lineWidth=1,this.drawEachBoxOn(t,a,n,!1));if(-1===this.currentClickedBox.box&&-1===this.currentSelectedBndBox){for(const r of e)r.color="rgba(255,255,0,0.8)",this.drawEachBoxOn(t,r,n,!1);const{x1:i,x2:a,y1:o,y2:s}=this.currentDrawing;this.tmpbox=this.generateNewBox(i,a,o,s),this.tmpbox&&this.drawEachBoxOn(t,this.tmpbox,n,!0)}}catch(i){console.log("redraw(boundbox) ----\x3e ",i.name+": ",i.message)}}drawEachBoxOn(t,e,n,i){try{if(n){const a=e.x1+(e.x2-e.x1)/2,o=e.y1+(e.y2-e.y1)/2;n.strokeStyle="white",n.fillStyle="black",n.font="bold 12px Arial",""==e.label?(n.strokeText("",e.x1+10,e.y1+15),n.fillText("",e.x1+10,e.y1+15)):t.find(t=>t.name===e.label)?(n.strokeText(e.label,e.x1+10,e.y1+15),n.fillText(e.label,e.x1+10,e.y1+15)):(n.strokeText("Text",e.x1+10,e.y1+15),n.fillText("Text",e.x1+10,e.y1+15)),n.strokeStyle=e.color,n.beginPath(),n.rect(e.x1,e.y1,e.x2-e.x1,e.y2-e.y1),n.lineWidth=e.lineWidth,n.stroke(),n.fillStyle=e.color,i&&(n.beginPath(),n.fillRect(e.x1-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x1-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x1-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize))}}catch(a){console.log("ObjectDetection drawEachBoxOn(box:Boundingbox, context:CanvasRenderingContext2D, isSelected:boolean):void",a.name+": ",a.message)}}generateNewBox(t,e,n,i){try{const a=te?t:e,r=n>i?n:i;return s-a>this.lineOffset&&r-o>this.lineOffset?{x1:a,y1:o,x2:s,y2:r,lineWidth:2,color:"rgba(0,255,0,1.0)",distancetoImg:{x:0,y:0},label:"",id:this.util.generateUniquesID()}:null}catch(a){return console.log("ObjectDetection GenerateNewBox(x1:number,x2:number,y1:number,y2:number):Boundingbox",a.name+": ",a.message),null}}getBBoxDistfromImg(t,e,n){try{for(const{x1:i,y1:a,distancetoImg:o}of t){const t=a-n;o.x=ne(i-e),o.y=ne(t)}}catch(i){console.log("ObjectDetection GetBBoxDistfromImg(bbox:Boundingbox[],imgX:number,imgY:number)",i.name+": ",i.message)}}getCurrentClickBox(t,e,n){try{return this.currentClickedBox=this.mouseClickOnBoxes(t,e,n),this.currentClickedBox}catch(i){return console.log("ObjectDetection getCurrentClickBox(MouseX:number, MouseY:number, box:Boundingbox[]):{box:number,pos:string}",i.name+": ",i.message),{box:-1,pos:"o"}}}mouseClickOnBoxes(t,e,n){try{for(let i=0;i{class t{constructor(){this.MEMO=null,this.utility=new pt}copy(t){this.MEMO=this.utility.deepCloneVariable(t)}paste(){return this.MEMO?"coorPt"in this.MEMO?this.polygonPaste():this.boundingBoxPaste():null}isAvailable(){return!!this.MEMO}clear(){this.MEMO=null}polygonPaste(){const t=this.utility.deepCloneObject(this.MEMO);let{coorPt:e,id:n}=t;for(const i of e)i.x+=8,i.y+=8,i.distancetoImg.x=0,i.distancetoImg.y=0;return n=this.utility.generateUniquesID(),t}boundingBoxPaste(){const t=this.utility.deepCloneObject(this.MEMO),e=t.x2-t.x1,n=t.y2-t.y1;return t.x1+=8,t.y1+=8,t.x2=t.x1+e,t.y2=t.y1+n,t.id=this.utility.generateUniquesID(),t.distancetoImg.x=0,t.distancetoImg.y=0,t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();const oe={scale:1,factor:.05,max_scale:4};let se=(()=>{class t{constructor(){this.zoomSubject=new x.a(oe),this.zoom$=this.zoomSubject.asObservable(),this.setState=t=>{this.zoomSubject.next(t?Object.assign(Object.assign({},oe),t):oe)}}resetZoomScale(){this.zoomSubject.next(oe)}calculateZoomScale(t,e,n){let{scale:i}=e;const{factor:a,max_scale:o}=e;let s=t.wheelDelta;void 0===s&&(s=t.detail),s=Math.max(-1,Math.min(1,s));const{scrollLeft:r,scrollTop:l}=n,c=(t.pageX+r)/i,h=(t.pageY+l)/i;return i+=s*a*i,i=Math.max(1,Math.min(o,i)),Object.assign(Object.assign({},{x:c*i-t.pageX,y:h*i-t.pageY}),{scale:i})}validateZoomScale({canvas:{style:{transform:t}}},e){return t!==`scale(${e}, ${e})`}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();const re={move:!1,pointer:!1,grab:!1,grabbing:!1,crosshair:!1,"zoom-in":!1,"zoom-out":!1,"n-resize":!1,"w-resize":!1,"ne-resize":!1,"nw-resize":!1,"se-resize":!1,"sw-resize":!1};let le=(()=>{class t{constructor(){this.mouseCursorSubject=new x.a(re),this.mouseCursor$=this.mouseCursorSubject.asObservable(),this.setState=t=>{this.mouseCursorSubject.next(t?Object.assign(Object.assign({},re),t):re)}}changeCursor(t,e){if(e){const{wheelDelta:t,detail:n}=e;void 0!==t?150===t?this.setState({"zoom-in":!0}):-150===t&&this.setState({"zoom-out":!0}):3===n?this.setState({"zoom-in":!0}):-3===n&&this.setState({"zoom-out":!0})}else for(const[n,i]of Object.entries(t))if(!0===i)return n}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();const ce=["canvasdrawing"],he=["floatdiv"],de=["lbltypetxt"],ue=["availablelbl"];function be(t,e){if(1&t){const t=u.Nb();u.Mb(0,"li",12),u.Tb("click",function(){u.hc(t);const n=e.$implicit;return u.Vb().labelNameClicked(n.name)}),u.Mb(1,"span",13),u.oc(2),u.Lb(),u.Mb(3,"span",14),u.oc(4),u.Lb(),u.Lb()}if(2&t){const t=e.$implicit;u.xb(2),u.pc(t.name),u.xb(2),u.pc(t.count)}}function ge(t,e){1&t&&(u.Mb(0,"li",15),u.Mb(1,"div",16),u.oc(2),u.Wb(3,"translate"),u.Lb(),u.Mb(4,"div",16),u.oc(5),u.Wb(6,"translate"),u.Lb(),u.Lb()),2&t&&(u.xb(2),u.pc(u.Xb(3,2,"searchLabel.labelNotExist")),u.xb(3),u.pc(u.Xb(6,4,"searchLabel.enterToAdd")))}const fe=function(){return{standalone:!0}},me=function(t){return{cursor:t}};let pe=(()=>{class t{constructor(t,e,n,i,a,o,s,r){this._ref=t,this._boundingBoxCanvas=e,this._imgLblStateService=n,this._undoRedoService=i,this._copyPasteService=a,this._annotateSelectState=o,this._zoomService=s,this._mouseCursorService=r,this.image=new Image,this.mousedown=!1,this.unsubscribe$=new l.a,this.labelSearch="",this.labelList=[],this.allLabelList=[],this.showDropdownLabelBox=!1,this.invalidInput=!1,this.closeEnough=5,this._imgSrc="",this._tabStatus=[],this._onChangeMetadata=new u.n,this._onChangeAnnotationLabel=new u.n,this._onEnterLabel=new u.n,this.validateInputLabel=({target:t})=>{const{value:e}=t,n=e.trim();n&&(this._tabStatus.some(({label_list:t})=>t&&t.length&&t.some(t=>t===n))?(this.invalidInput=!0,console.error("Invalid existing label input")):(this.invalidInput=!1,this.showDropdownLabelBox=!1,this._onChangeAnnotationLabel.emit({label:e,index:this.annotateState.annotation}),this._selectMetadata.bnd_box[this.annotateState.annotation].label=e,this._undoRedoService.isStateChange(this._selectMetadata.bnd_box)&&this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"}),this.labelSearch=""))}}ngOnInit(){this.getLabelList(),this._imgLblStateService.action$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>{var{clear:e,fitCenter:n}=t,i=Object(a.b)(t,["clear","fitCenter"]);(e||n||i.drag||i.draw||i.save||i.keyInfo)&&(this.showDropdownLabelBox=!1,this._ref.detectChanges()),this.boundingBoxState=Object.assign(Object.assign({},i),{clear:e,fitCenter:n}),n&&this.imgFitToCenter(),e&&(this._selectMetadata.bnd_box=[],this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"}),this.redrawImage(this._selectMetadata),this.emitMetadata())}),this._annotateSelectState.labelStaging$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>{this.annotateState=t,this._boundingBoxCanvas.setCurrentSelectedbBox(t.annotation),this._selectMetadata&&this.redrawImage(this._selectMetadata)}),this._zoomService.zoom$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>this.zoom=t),this._mouseCursorService.mouseCursor$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>this.mouseCursor=t)}ngOnChanges(t){var e,n,i;if((null===(e=t._selectMetadata)||void 0===e?void 0:e.previousValue)&&(null===(n=t._selectMetadata)||void 0===n?void 0:n.currentValue)&&this.redrawImage(this._selectMetadata),(null===(i=t._imgSrc)||void 0===i?void 0:i.currentValue)&&(this.initializeCanvas(),this._undoRedoService.clearAllStages(),this.loadImage(t._imgSrc.currentValue),this._boundingBoxCanvas.setCurrentSelectedbBox(-1)),t._tabStatus){let t=!0;for(const{closed:e}of this._tabStatus)if(!e){t=!1;break}this.canvas&&(!0===t?(this.initializeCanvas("96%"),this.imgFitToCenter()):this.redrawImage(this._selectMetadata))}}initializeCanvas(t="80%"){this.canvas.nativeElement.style.width=t,this.canvas.nativeElement.style.height="90%",this.canvas.nativeElement.width=this.canvas.nativeElement.offsetWidth,this.canvas.nativeElement.height=this.canvas.nativeElement.offsetHeight,this.canvasContext=this.canvas.nativeElement.getContext("2d")}emitMetadata(){this._onChangeMetadata.emit(this._selectMetadata)}annotateSelectChange(t){this._annotateSelectState.setState(t)}resetZoom(){this._zoomService.resetZoomScale()}imgFitToCenter(){try{const t=this._boundingBoxCanvas.calScaleTofitScreen(this._selectMetadata.img_w,this._selectMetadata.img_h,this.canvas.nativeElement.offsetWidth,this.canvas.nativeElement.offsetHeight);this._selectMetadata.img_w*=t.factor,this._selectMetadata.img_h*=t.factor,this._boundingBoxCanvas.scaleAllBoxes(t.factor,this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y),this._selectMetadata.img_x=t.newX,this._selectMetadata.img_y=t.newY,this._boundingBoxCanvas.setGlobalXY(t.newX,t.newY),this._boundingBoxCanvas.moveAllBbox(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y),this.redrawImage(this._selectMetadata),this.resetZoom(),this.canvasContext.canvas.style.transformOrigin="0 0",this.canvasContext.canvas.style.transform="scale(1, 1)"}catch(t){console.log(t)}}keyStrokeEvent({ctrlKey:t,shiftKey:e,key:n}){try{const{isActiveModal:i}=this.boundingBoxState;if(!this.mousedown&&!i&&!this.showDropdownLabelBox&&this._selectMetadata)if(!t||"c"!==n&&"C"!==n)if(!t||"v"!==n&&"V"!==n){if(t&&e&&("z"===n||"Z"===n)){if(this._undoRedoService.isAllowRedo()){const t=this._undoRedoService.redo();this._selectMetadata=Object(mt.a)(null==t?void 0:t.meta),this.redrawImage(this._selectMetadata),this.getBBoxDistanceFromImage(),this.emitMetadata()}}else if(!t||"z"!==n&&"Z"!==n)if(!i&&this.annotateState.annotation>-1&&("Delete"===n||"Backspace"===n))this._boundingBoxCanvas.deleteSingleBox(this._selectMetadata.bnd_box,this.annotateState.annotation,t=>{t&&(this.annotateSelectChange({annotation:-1,isDlbClick:!1}),this.redrawImage(this._selectMetadata),this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata())});else{const t="ArrowLeft"===n?"left":"ArrowRight"===n?"right":"ArrowUp"===n?"up":"ArrowDown"===n&&"down";t&&this.keyMoveBox(t)}else if(this._undoRedoService.isAllowUndo()){const t=this._undoRedoService.undo();this._selectMetadata=Object(mt.a)(null==t?void 0:t.meta),this.redrawImage(this._selectMetadata),this.getBBoxDistanceFromImage(),this.emitMetadata()}}else{if(this._copyPasteService.isAvailable()){this._copyPasteService.copy(this._selectMetadata.bnd_box[this.annotateState.annotation]);const t=this._copyPasteService.paste();t&&this._selectMetadata.bnd_box.push(t),this.annotateSelectChange({annotation:this._selectMetadata.bnd_box.length-1,isDlbClick:!1}),this.getBBoxDistanceFromImage(),this.redrawImage(this._selectMetadata)}this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata()}else this.annotateState.annotation>-1&&this._copyPasteService.copy(this._selectMetadata.bnd_box[this.annotateState.annotation])}catch(i){console.log(i)}}toggleEvent(t){try{this.annotateState.annotation>-1&&(this._undoRedoService.clearRedundantStages(),this.annotateSelectChange({annotation:this.annotateState.annotation,isDlbClick:!0}))}catch(e){console.log(e)}}mouseScroll(t){try{if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)){const{scale:e,x:n,y:i}=this._zoomService.calculateZoomScale(t,this.zoom,this.canvas.nativeElement);this.boundingBoxState.scroll&&(this._mouseCursorService.changeCursor(this.mouseCursor,t),this._zoomService.validateZoomScale(this.canvasContext,e)&&(this.canvasContext.canvas.style.transformOrigin=`${t.offsetX}px ${t.offsetY}px`,this.canvasContext.canvas.style.transform=`scale(${e}, ${e})`,this._zoomService.setState({scale:e}))),this.canvasContext.canvas.scrollTop=i,this.canvasContext.canvas.scrollLeft=n,this._copyPasteService.isAvailable()&&this._copyPasteService.clear()}}catch(e){console.log(e)}}mouseDown(t){try{if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)){if(this.mousedown=!0,this.boundingBoxState.drag&&(this.changeMouseCursorState({grabbing:!0}),this._boundingBoxCanvas.setPanXY(t.offsetX,t.offsetY)),this.boundingBoxState.draw){const e=this._boundingBoxCanvas.mouseDownDrawEnable(t.offsetX,t.offsetY,this._selectMetadata.bnd_box);this.annotateSelectChange({annotation:e,isDlbClick:!1}),this.redrawImage(this._selectMetadata)}}else this.mousedown=!1}catch(e){console.log(e)}}mouseUp(t){try{this.boundingBoxState.draw&&this.mousedown&&this.finishDrawBoundingBox(t),this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)&&(this.boundingBoxState.drag&&this.mousedown&&this._boundingBoxCanvas.setGlobalXY(this._selectMetadata.img_x,this._selectMetadata.img_y),this.mousedown=!1)}catch(e){console.log(e)}}mouseMove(t){try{if(this._selectMetadata)if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)&&!this.showDropdownLabelBox){if(this.boundingBoxState.drag&&this.mousedown){const e=this._boundingBoxCanvas.getDiffXY(t);this._selectMetadata.img_x=e.diffX,this._selectMetadata.img_y=e.diffY,this._boundingBoxCanvas.panRectangle(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y,t=>{if(t){const t=Object(mt.a)(this._selectMetadata);this._undoRedoService.isMethodChange("pan")?this._undoRedoService.appendStages({meta:t,method:"pan"}):this._undoRedoService.replaceStages({meta:t,method:"pan"})}}),this.redrawImage(this._selectMetadata)}else this.boundingBoxState.drag&&!this.mousedown&&this.changeMouseCursorState({grab:!0});if(this.boundingBoxState.draw&&this.mousedown&&(this._boundingBoxCanvas.mouseMoveDrawEnable(t.offsetX,t.offsetY,this._selectMetadata),this.redrawImage(this._selectMetadata)),this.boundingBoxState.draw&&!this.mousedown){const{box:e,pos:n}=this._boundingBoxCanvas.getCurrentClickBox(t.offsetX,t.offsetY,this._selectMetadata.bnd_box);this.changeMouseCursorState(-1!==e?"tl"===n?{"nw-resize":!0}:"tr"===n?{"ne-resize":!0}:"bl"===n?{"sw-resize":!0}:"br"===n?{"se-resize":!0}:"l"===n||"r"===n?{"w-resize":!0}:"t"===n||"b"===n?{"n-resize":!0}:{move:!0}:{crosshair:!0})}}else this.changeMouseCursorState()}catch(e){console.log(e)}}finishDrawBoundingBox(t){this.getLabelList(),this.sortingLabelList(this.labelList,this._tabStatus[2].annotation&&this._tabStatus[2].annotation[0].bnd_box?this._tabStatus[2].annotation[0].bnd_box:[]);const e=this._boundingBoxCanvas.mouseUpDrawEnable(this._selectMetadata,this.labelList,t=>{t&&(this._undoRedoService.isStateChange(this._selectMetadata.bnd_box)&&this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.getBBoxDistanceFromImage(),this.emitMetadata())});if(e.isNew||"mouseout"===t.type){let e=t.offsetY*(100/document.documentElement.clientHeight)+8.5,n=t.offsetX*(100/document.documentElement.clientWidth)+2.5;e<9&&(e=9),e>76&&(e=76),n<2.5&&(n=2.5),n>66&&(n=66),this.floatdiv.nativeElement.style.top=e.toString()+"vh",this.floatdiv.nativeElement.style.left=n.toString()+"vw",this.showDropdownLabelBox=!0,this.labelSearch="",this.invalidInput=!1,setTimeout(()=>{this.lbltypetxt.nativeElement.focus()},100)}else this.showDropdownLabelBox=!1;e.isNew&&this.annotateSelectChange({annotation:e.selBox,isDlbClick:!1})}changeMouseCursorState(t){this._mouseCursorService.setState(t)}mouseOut(t){var e,n;try{this.boundingBoxState.draw&&this.mousedown&&this.finishDrawBoundingBox(t),"canvasstyle"!==t.target.className&&!t.target.className.includes("unclosedOut")||(null===(e=t.relatedTarget)||void 0===e?void 0:e.className.includes("unclosedOut"))||(null===(n=t.relatedTarget)||void 0===n?void 0:n.className.includes("canvasstyle"))||0!==this._selectMetadata.bnd_box.filter(t=>""===t.label).length&&(this.showDropdownLabelBox=!1,this._selectMetadata.bnd_box=this._selectMetadata.bnd_box.filter(t=>""!==t.label),this._onChangeMetadata.emit(this._selectMetadata),this.redrawImage(this._selectMetadata),alert("Some bounding boxes will be deleted because they were not labelled.")),this.boundingBoxState.drag&&this.mousedown&&(this._boundingBoxCanvas.setGlobalXY(this._selectMetadata.img_x,this._selectMetadata.img_y),this.redrawImage(this._selectMetadata)),this.mousedown=!1}catch(i){console.log(i)}}loadImage(t){try{this.showDropdownLabelBox=!1,this.image.src=t,this.image.onload=()=>{this._selectMetadata.img_w=this._selectMetadata.img_w<1?this._selectMetadata.img_ori_w:this._selectMetadata.img_w,this._selectMetadata.img_h=this._selectMetadata.img_h<1?this._selectMetadata.img_ori_h:this._selectMetadata.img_h,this._boundingBoxCanvas.setGlobalXY(this._selectMetadata.img_x,this._selectMetadata.img_y),this.imgFitToCenter(),this.emitMetadata(),this.changeMouseCursorState(),this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"})}}catch(e){console.log(e)}}keyMoveBox(t){try{const e=this._selectMetadata.bnd_box[this.annotateState.annotation];e&&this._boundingBoxCanvas.keyboardMoveBox(t,e,this._selectMetadata,t=>{t&&(this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.getBBoxDistanceFromImage(),this.redrawImage(this._selectMetadata),this.emitMetadata())})}catch(e){console.log(e)}}redrawImage({img_x:t,img_y:e,img_w:n,img_h:i}){var a;this.clearCanvas(),this.canvasContext.drawImage(this.image,t,e,n,i),0!==(null===(a=this._tabStatus[2].annotation)||void 0===a?void 0:a.length)&&(this.getLabelList(),this.sortingLabelList(this.labelList,this._tabStatus[2].annotation&&this._tabStatus[2].annotation[0].bnd_box?this._tabStatus[2].annotation[0].bnd_box:[])),this._boundingBoxCanvas.drawAllBoxOn(this.labelList,this._selectMetadata.bnd_box,this.canvasContext)}clearCanvas(){this.canvasContext.clearRect(0,0,this.canvas.nativeElement.width,this.canvas.nativeElement.height)}getBBoxDistanceFromImage(){this._boundingBoxCanvas.getBBoxDistfromImg(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y)}getLabelList(){this.labelList=[],this.allLabelList=[],(this._tabStatus[1].label_list?this._tabStatus[1].label_list:[]).forEach(t=>{this.labelList.push({name:t,count:0}),this.allLabelList.push({name:t,count:0})})}labelTypeTextChange(t){this.labelList=this.allLabelList.filter(e=>e.name.includes(t))}labelNameClicked(t){this.showDropdownLabelBox=!1,this._onChangeAnnotationLabel.emit({label:t,index:this.annotateState.annotation}),this._selectMetadata.bnd_box[this.annotateState.annotation].label=t,this._undoRedoService.isStateChange(this._selectMetadata.bnd_box)&&this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"})}sortingLabelList(t,e){t.forEach(({name:t},n)=>{this.labelList[n].count=e.filter(({label:e})=>e===t).length,this.allLabelList[n].count=e.filter(({label:e})=>e===t).length}),this.labelList.sort((t,e)=>t.countt.count{class t{constructor(){this.globalXY={x:-1,y:-1},this.panXY={x:0,y:0},this.clickPoint={polygonIndex:-1,pointIndex:-1},this.clipPath=null,this.radius=3.5,this.distanceOffset=8,this.polygonAreaIndex=-1,this.selectedPolygonIndex=-1,this.util=new pt,this.isNewPoly=!1,this.labelList=[]}mouseDownDraw(t,e,n,i,a,o,s,r){this.labelList=r;const{offsetX:l,offsetY:c}=t;this.polygonAreaIndex=this.findPolygonArea(t,e),this.clickPoint=this.findClickPoint(l,c,e);const h=this.isNewPolygon();return h&&o?this.setPanXY(t):!this.returnTempPoly()&&this.polygonAreaIndex<0&&this.clickPoint.pointIndex<0?(this.setPolygonLineWidth(e,-1),this.selectedPolygonIndex=-1,this.pushTempPoint(t,e),this.setNewPolygon(!0)):h?(this.pushTempPoint(t,e),this.drawNewPolygon(e,i,a,n,!1),this.drawfromPreviousPoint(t,a)):(this.selectedPolygonIndex=this.findPolygonArea(t,e)>-1?this.findPolygonArea(t,e):this.findClickPoint(l,c,e).polygonIndex,this.setPolygonLineWidth(e,this.selectedPolygonIndex),this.setNewPolygon(!1)),this.selectedPolygonIndex}mouseMoveDraw(t,e,n,i,a,o,s,r){const l=this.findPolygonArea(a,t),c=this.isNewPolygon(),{pointIndex:h,polygonIndex:d}=this.clickPoint;if(c&&s&&o){const{diffX:e,diffY:n}=this.getDiffXY(a);t.img_x=e,t.img_y=n,this.panPolygons(t,!0),r("pan")}else c?(this.drawNewPolygon(t,e,n,i,!1),this.drawfromPreviousPoint(a,n)):s&&-1===h&&this.selectedPolygonIndex>-1?(this.mouseMovePolygon(a,t,n,this.selectedPolygonIndex,e,i),this.resetClipPath(t),r("pan")):s&&h>-1&&d>-1&&(this.setPolygonCoordinate(a,t,this.clickPoint),r("draw"));return l>-1}setPanXY({offsetX:t,offsetY:e}){try{this.panXY={x:t,y:e}}catch(n){console.log("setPanXY",n)}}getPanXY(){return this.panXY}getDiffXY({offsetX:t,offsetY:e}){try{const n={diffX:0,diffY:0},{x:i,y:a}=this.getGlobalXY();return n.diffX=i+(t-this.panXY.x),n.diffY=a+(e-this.panXY.y),n}catch(n){return console.log(n),{diffX:-1,diffY:-1}}}setSelectedPolygon(t,e){this.selectedPolygonIndex=t,e&&this.setPolygonLineWidth(e,this.selectedPolygonIndex)}getSelectedPolygonIndex(){return this.selectedPolygonIndex}mouseClickWithinPointPath({img_x:t,img_y:e,img_w:n,img_h:i},{offsetX:a,offsetY:o}){return a>t&&ae&&o1?(this.tmpPolygon.coorPt.pop(),!1):(this.resetDrawing(t,n,e,i),!0)}catch(o){return console.log("removeLastPoint",o),!1}}calculatePointDistance(t,e,n,i){try{const a=t-n,o=e-i;return Math.sqrt(a*a+o*o)}catch(a){return void console.log("calculatePointDistance",a)}}generateNewTempPolygon(t){try{const e=this.util.generateUniquesID(),n=(t+1).toString();this.tmpPolygon={coorPt:[],label:this.labelList.length>0?this.labelList[0].name:"",id:e,lineWidth:2,color:"rgba(0,255,0,1.0)",region:n,subLabel:[]}}catch(e){console.log("generateNewTempPolygon",e)}}getClickPoint(){return this.clickPoint}resetClickPoint(){this.clickPoint={pointIndex:-1,polygonIndex:-1}}resetDrawing(t,e,n,i){try{this.tmpPolygon=null,this.setNewPolygon(!1),this.redraw(t,e,n,i,-1)}catch(a){console.log("resetDrawing",a)}}setNewPolygon(t){this.isNewPoly=t}redraw(t,e,n,{width:i,height:a},o){try{const{img_w:s,img_h:r,img_x:l,img_y:c}=t;n.restore(),n.clearRect(0,0,i,a),n.save(),n.beginPath(),n.rect(l,c,s,r),n.clip(),n.beginPath(),n.drawImage(e,l,c,s,r),this.drawAllPolygon(t,n,o)}catch(s){console.log("redraw",s)}}drawAllPolygon(t,e,n){try{this.validatePolygonMetadata(t.polygons)&&(this.drawAllPolygonLine(t,e),this.drawAllPolygonsDots(t,e,n,this.radius),this.plotAllFloatLabel(t,e))}catch(i){console.log("drawAllPolygon",i)}}validatePolygonMetadata(t){return t.length>0}drawAllPolygonLine({polygons:t},e){try{for(const[n,{lineWidth:i,color:a,coorPt:o}]of t.entries()){e.lineWidth=i,e.strokeStyle=a||"white",e.fillStyle=a||"white",e.beginPath(),e.moveTo(o[0].x,o[0].y);for(const[t]of o.entries())t+1{const{x:i,y:a}=n[0];e.strokeStyle="white",e.fillStyle="black",e.font="bold 12px Arial",e.strokeText(t,i+10,a+15),e.fillText(t,i+10,a+15)})}catch(n){console.log("plotAllFloatLabel",n)}}setGlobalXY({offsetX:t,offsetY:e}){try{this.globalXY={x:t,y:e}}catch(n){console.log("setGlobalXY",n)}}getGlobalXY(){return this.globalXY}mouseMovePolygon({offsetX:t,offsetY:e},n,i,a,o,s){try{const{x:r,y:l}=this.getGlobalXY(),c=t-r,h=e-l;if(this.withinPointPath(n,a,{offsetX:c,offsetY:h})){this.setGlobalXY({offsetX:t,offsetY:e});for(const[t]of n.polygons[a].coorPt.entries())n.polygons[a].coorPt[t].x+=c,n.polygons[a].coorPt[t].y+=h;this.redraw(n,o,i,s,a)}}catch(r){console.log("mouseMovePolygon",r)}}keyboardMovePolygon(t,e,n,i,a,o,s){try{if(n>-1){const r=-3;switch(e){case"up":if(this.withinPointPath(t,n,{offsetX:0,offsetY:r}))for(const[e]of t.polygons[n].coorPt.entries())t.polygons[n].coorPt[e].y+=r;break;case"down":if(this.withinPointPath(t,n,{offsetX:0,offsetY:r}))for(const[e]of t.polygons[n].coorPt.entries())t.polygons[n].coorPt[e].y-=r;break;case"left":if(this.withinPointPath(t,n,{offsetX:r,offsetY:0}))for(const[e]of t.polygons[n].coorPt.entries())t.polygons[n].coorPt[e].x+=r;break;case"right":if(this.withinPointPath(t,n,{offsetX:r,offsetY:0}))for(const[e]of t.polygons[n].coorPt.entries())t.polygons[n].coorPt[e].x-=r}this.redraw(t,i,a,o,n),s(!0)}return!0}catch(r){return console.log("keyboardMovePolygon",r),!0}}withinPointPath({polygons:t,img_x:e,img_y:n,img_w:i,img_h:a},o,{offsetX:s,offsetY:r}){try{for(const[l]of t[o].coorPt.entries())return!(t[o].coorPt[l].x+se+i||t[o].coorPt[l].y+rn+a)}catch(l){return!1}}validateXYDistance(t){try{for(const[e]of t.polygons.entries())for(const[n]of t.polygons[e].coorPt.entries()){const i=t.polygons[e].coorPt[n].y-t.img_y;t.polygons[e].coorPt[n].distancetoImg.x=t.polygons[e].coorPt[n].x-t.img_x,t.polygons[e].coorPt[n].distancetoImg.y=i}}catch(e){console.log("validateXYDistance",e)}}setPolygonLineWidth(t,e){try{t.polygons=t.polygons.map((t,n)=>Object.assign(Object.assign({},t),{lineWidth:t.lineWidth=n===e?2:1,color:t.color=n===e?"rgba(0,255,0,1.0)":"rgba(255,255,0,0.8)"}))}catch(n){console.log("setPolygonLineWidth",n)}}drawNewPolygon(t,e,n,i,a){var o;try{if(this.redraw(t,e,n,i,-1),null===(o=this.tmpPolygon)||void 0===o?void 0:o.coorPt){for(const[t,{x:e,y:i}]of this.tmpPolygon.coorPt.entries())n.strokeStyle="green",n.fillStyle="green",n.beginPath(),n.arc(e,i,this.radius,0,2*Math.PI),n.fill(),n.closePath(),n.stroke();n.beginPath(),n.lineWidth=this.tmpPolygon.lineWidth,n.strokeStyle=this.tmpPolygon.color,n.fillStyle=this.tmpPolygon.color,n.moveTo(this.tmpPolygon.coorPt[0].x,this.tmpPolygon.coorPt[0].y);for(const[t]of this.tmpPolygon.coorPt.entries())t+1-1&&a>-1&&(n.polygons[i].coorPt[a].x=t,n.polygons[i].coorPt[a].y=e)}catch(o){console.log("setPolygonCoordinate",o)}}insidePolygonArea(t,{offsetX:e,offsetY:n}){try{let i=!1;for(let a=0,o=t.length-1;an!=t[o].y>n&&e<(t[o].x-t[a].x)*(n-t[a].y)/(t[o].y-t[a].y)+t[a].x&&(i=!i);return i}catch(i){return console.log("insidePolygonArea",i),!1}}calPolygonArea({coorPt:t}){try{let e=0,n=t.length-1;for(let i=0;i{class t{constructor(t,e,n,i,a,o,s){this._segCanvasService=t,this._imgLblStateService=e,this._undoRedoService=n,this._copyPasteService=i,this._annotateSelectState=a,this._zoomService=o,this._mouseCursorService=s,this.image=new Image,this.isMouseWithinPoint=!1,this.altKey=!1,this.ctrlKey=!1,this.unsubscribe$=new l.a,this.mousedown=!1,this.showDropdownLabelBox=!1,this.labelSearch="",this.labelList=[],this.allLabelList=[],this._imgSrc="",this._tabStatus=[],this._onChangeMetadata=new u.n,this._onChangeAnnotationLabel=new u.n}ngOnInit(){this.getLabelList(),this._imgLblStateService.action$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>{var{clear:e,fitCenter:n}=t,i=Object(a.b)(t,["clear","fitCenter"]);this.segState=Object.assign(Object.assign({},i),{clear:e,fitCenter:n}),n&&this.imgFitToCenter(),e&&(this._selectMetadata.polygons=[],this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"}),this.redrawImage(this._selectMetadata),this.emitMetadata())}),this._annotateSelectState.labelStaging$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>{this.annotateState=t,this._selectMetadata&&(this._segCanvasService.setSelectedPolygon(t.annotation,this._selectMetadata),this.redrawImage(this._selectMetadata))}),this._zoomService.zoom$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>this.zoom=t),this._mouseCursorService.mouseCursor$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>this.mouseCursor=t)}ngOnChanges(t){var e,n,i;(null===(e=t._selectMetadata)||void 0===e?void 0:e.previousValue)&&(null===(n=t._selectMetadata)||void 0===n?void 0:n.currentValue)&&this.redrawImage(this._selectMetadata),(null===(i=t._imgSrc)||void 0===i?void 0:i.currentValue)&&(this.initializeCanvas(),this._undoRedoService.clearAllStages(),this._segCanvasService.setSelectedPolygon(-1),this.loadImage(t._imgSrc.currentValue))}initializeCanvas(){this.canvas.nativeElement.style.width="80%",this.canvas.nativeElement.style.height="90%",this.canvas.nativeElement.width=this.canvas.nativeElement.offsetWidth,this.canvas.nativeElement.height=this.canvas.nativeElement.offsetHeight,this.canvasContext=this.canvas.nativeElement.getContext("2d")}loadImage(t){this.image.src=t,this.image.onload=()=>{const{img_x:t,img_y:e}=this._selectMetadata;this._selectMetadata.img_w=this._selectMetadata.img_w<1?this._selectMetadata.img_ori_w:this._selectMetadata.img_w,this._selectMetadata.img_h=this._selectMetadata.img_h<1?this._selectMetadata.img_ori_h:this._selectMetadata.img_h,this._segCanvasService.setGlobalXY({offsetX:t,offsetY:e}),this.imgFitToCenter(),this.emitMetadata(),this.changeMouseCursorState()}}emitMetadata(){this._onChangeMetadata.emit(this._selectMetadata)}annotateStateChange(t){t&&this._annotateSelectState.setState(t)}resetZoom(){this._zoomService.resetZoomScale()}imgFitToCenter(){try{const t=this._segCanvasService.calScaleToFitScreen(this._selectMetadata,this.canvas.nativeElement);this._selectMetadata.img_w*=t.factor,this._selectMetadata.img_h*=t.factor,this._selectMetadata.img_x=t.newX,this._selectMetadata.img_y=t.newY,this._segCanvasService.scalePolygons(this._selectMetadata,t),this._segCanvasService.setGlobalXY({offsetX:t.newX,offsetY:t.newY}),this._segCanvasService.panPolygons(this._selectMetadata,!1,t=>{if(t){const t=Object(mt.a)(this._selectMetadata);this._undoRedoService.isMethodChange("zoom")?this._undoRedoService.appendStages({meta:t,method:"zoom"}):this._undoRedoService.replaceStages({meta:t,method:"zoom"})}}),this.redrawImage(this._selectMetadata),this.resetZoom(),this.canvasContext.canvas.style.transformOrigin="0 0",this.canvasContext.canvas.style.transform="scale(1, 1)"}catch(t){console.log("imgFitToCenter",t)}}redrawImage({img_x:t,img_y:e,img_w:n,img_h:i}){var a,o;if(this.clearcanvas(),this.canvasContext.drawImage(this.image,t,e,n,i),0!==(null===(a=this._tabStatus[2].annotation)||void 0===a?void 0:a.length)){this.getLabelList();const t=this._tabStatus[2].annotation&&null!==(o=this._tabStatus[2].annotation[0].polygons)&&void 0!==o?o:[];this.sortingLabelList(this.labelList,t)}this._segCanvasService.drawAllPolygon(this._selectMetadata,this.canvasContext,this.annotateState.annotation)}clearcanvas(){const{width:t,height:e}=this.canvas.nativeElement;this.canvasContext.clearRect(0,0,t,e)}mouseScroll(t){try{if(this.isMouseWithinPoint=this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t),this.isMouseWithinPoint){const{scale:e,x:n,y:i}=this._zoomService.calculateZoomScale(t,this.zoom,this.canvas.nativeElement);this.segState.scroll&&(this._mouseCursorService.changeCursor(this.mouseCursor,t),this._zoomService.validateZoomScale(this.canvasContext,e)&&(this.canvasContext.canvas.style.transformOrigin=`${t.offsetX}px ${t.offsetY}px`,this.canvasContext.canvas.style.transform=`scale(${e}, ${e})`,this._zoomService.setState({scale:e}))),this.canvasContext.canvas.scrollTop=i,this.canvasContext.canvas.scrollLeft=n,this._copyPasteService.isAvailable()&&this._copyPasteService.clear()}}catch(e){console.log("mouseScroll",e)}}validateEndDrawPolygon({isActiveModal:t,draw:e},n,i){return!t&&e&&n&&"none"!==i.canvas.style.pointerEvents}canvasDblClickEvent(t){this.validateEndDrawPolygon(this.segState,this.isMouseWithinPoint,this.canvasContext)&&(this._segCanvasService.isNewPolygon()&&(this._segCanvasService.drawNewPolygon(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement,!0),this.positioningLabelListPopup(this._selectMetadata.polygons),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata()),this.annotateState.annotation>-1&&this.annotateStateChange({annotation:this.annotateState.annotation,isDlbClick:!0}))}canvasKeyDownEvent({ctrlKey:t,shiftKey:e,key:n}){try{if(this.validateEndDrawPolygon(this.segState,this.isMouseWithinPoint,this.canvasContext)){if(this._segCanvasService.isNewPolygon())switch(n){case"Enter":this._segCanvasService.drawNewPolygon(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement,!0),this.positioningLabelListPopup(this._selectMetadata.polygons),this.annotateStateChange({annotation:this._selectMetadata.polygons.length-1}),this._segCanvasService.validateXYDistance(this._selectMetadata),this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.redrawImage(this._selectMetadata),this.emitMetadata();break;case"Escape":this._segCanvasService.resetDrawing(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement)}else switch(n){case"Delete":case"Backspace":this._segCanvasService.deleteSinglePolygon(this._selectMetadata,this.annotateState.annotation,t=>{t&&(this.annotateStateChange(),this.redrawImage(this._selectMetadata),this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata())})}const t="ArrowLeft"===n?"left":"ArrowRight"===n?"right":"ArrowUp"===n?"up":"ArrowDown"===n&&"down";t&&this.keyMoveBox(t)}if(!t||"c"!==n&&"C"!==n)if(!t||"v"!==n&&"V"!==n){if(t&&e&&("z"===n||"Z"===n)){if(this._undoRedoService.isAllowRedo()){const t=this._undoRedoService.redo();this._selectMetadata=Object(mt.a)(null==t?void 0:t.meta),this.redrawImage(this._selectMetadata),this.emitMetadata()}}else if(t&&("z"===n||"Z"===n)&&this._undoRedoService.isAllowUndo()){const t=this._undoRedoService.undo();this._selectMetadata=Object(mt.a)(null==t?void 0:t.meta),this.redrawImage(this._selectMetadata),this.emitMetadata()}}else this._copyPasteService.isAvailable()&&(this._selectMetadata.polygons.push(this._copyPasteService.paste()),this.annotateStateChange({annotation:this._selectMetadata.polygons.length-1}),this._segCanvasService.validateXYDistance(this._selectMetadata)),this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata();else this.annotateState.annotation>-1&&this._copyPasteService.copy(this._selectMetadata.polygons[this.annotateState.annotation])}catch(i){console.log("canvasKeyDownEvent",i)}}keyMoveBox(t){try{this._selectMetadata.polygons[this.annotateState.annotation]&&this._segCanvasService.keyboardMovePolygon(this._selectMetadata,t,this.annotateState.annotation,this.image,this.canvasContext,this.canvas.nativeElement,t=>{t&&(this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata())})}catch(e){console.log("keyMoveBox",e)}}mouseDown(t){var e;try{if(this.isMouseWithinPoint=this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t),this.isMouseWithinPoint)if(this.mousedown=!0,this.segState.drag&&(this.changeMouseCursorState({grabbing:!0}),this._segCanvasService.setPanXY(t),this.initializeCanvas(),this.redrawImage(this._selectMetadata)),this.segState.draw){this.getLabelList();const n=this._tabStatus[2].annotation&&null!==(e=this._tabStatus[2].annotation[0].polygons)&&void 0!==e?e:[];this.sortingLabelList(this.labelList,n),this.showDropdownLabelBox=!1;const i=this._segCanvasService.mouseDownDraw(t,this._selectMetadata,this.canvas.nativeElement,this.image,this.canvasContext,this.ctrlKey,this.altKey,this.labelList);if(i>-1)this._segCanvasService.setGlobalXY(t);else{const{img_x:t,img_y:e}=this._selectMetadata;this._segCanvasService.setGlobalXY({offsetX:t,offsetY:e})}this.annotateStateChange({annotation:i}),this.redrawImage(this._selectMetadata),this.mouseMoveDrawCanvas(t)}else this.segState.draw&&!this.mousedown&&this.redrawImage(this._selectMetadata);else this.mousedown=!1}catch(n){console.log("mouseDown",n)}}mouseUp(t){try{this.isMouseWithinPoint=this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t);const e=this._segCanvasService.isNewPolygon();if(this._selectMetadata&&this.isMouseWithinPoint)if(this.mousedown){const{img_x:t,img_y:n}=this._selectMetadata;this.segState.drag&&this._segCanvasService.setGlobalXY({offsetX:t,offsetY:n}),this.segState.draw&&!e&&this.annotateState.annotation>-1&&this._undoRedoService.isStateChange(this._selectMetadata.polygons)&&(this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this._segCanvasService.setGlobalXY({offsetX:t,offsetY:n}),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata())}else{const{pointIndex:t,polygonIndex:e}=this._segCanvasService.getClickPoint();this.segState.draw&&e>-1&&t>-1?this._undoRedoService.isStateChange(this._selectMetadata.polygons)&&(this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this._segCanvasService.resetClickPoint(),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata()):this.segState.draw&&(this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata())}this.mousedown=!1}catch(e){console.log("mouseUp",e)}}mouseMove(t){try{if(this.isMouseWithinPoint=this._selectMetadata&&this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t),this.isMouseWithinPoint){if(this.segState.drag&&this.mousedown){const{diffX:e,diffY:n}=this._segCanvasService.getDiffXY(t);this._selectMetadata.img_x=e,this._selectMetadata.img_y=n,this._segCanvasService.panPolygons(this._selectMetadata,!1,t=>{if(t){const t=Object(mt.a)(this._selectMetadata);this._undoRedoService.isMethodChange("pan")?this._undoRedoService.appendStages({meta:t,method:"pan"}):this._undoRedoService.replaceStages({meta:t,method:"pan"})}}),this.redrawImage(this._selectMetadata)}else this.segState.drag&&!this.mousedown&&this.changeMouseCursorState({grab:!0});if(this.segState.draw){const e=this.mouseMoveDrawCanvas(t);this.changeMouseCursorState(e?{move:!0}:{crosshair:!0})}}else this.changeMouseCursorState(),this.mousedown=!1}catch(e){console.log("mouseMove",e)}}mouseMoveDrawCanvas(t){return this._segCanvasService.mouseMoveDraw(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement,t,this.ctrlKey,this.mousedown,t=>{this.redrawImage(this._selectMetadata)})}changeMouseCursorState(t){this._mouseCursorService.setState(t)}mouseOut(t){var e,n;try{this.segState.drag&&this.isMouseWithinPoint&&this.mousedown&&(this._segCanvasService.setGlobalXY(t),this.redrawImage(this._selectMetadata)),"canvasstyle"!==t.target.className&&!t.target.className.includes("unclosedOut")||(null===(e=t.relatedTarget)||void 0===e?void 0:e.className.includes("unclosedOut"))||(null===(n=t.relatedTarget)||void 0===n?void 0:n.className.includes("canvasstyle"))||(this.showDropdownLabelBox=!1,0!==this._selectMetadata.polygons.filter(t=>!t.label).length&&(this._selectMetadata.polygons=this._selectMetadata.polygons.filter(t=>""!==t.label),this._onChangeMetadata.emit(this._selectMetadata),this.redrawImage(this._selectMetadata),alert("Some bounding boxes will be deleted because they were not labelled."))),this.isMouseWithinPoint=!1}catch(i){console.log("mouseOut",i)}}currentCursor(){return this._mouseCursorService.changeCursor(this.mouseCursor)}positioningLabelListPopup(t){let e=t[this._selectMetadata.polygons.length-1].coorPt[this._selectMetadata.polygons[this._selectMetadata.polygons.length-1].coorPt.length-1].y*(100/document.documentElement.clientHeight)+8.5,n=t[this._selectMetadata.polygons.length-1].coorPt[this._selectMetadata.polygons[this._selectMetadata.polygons.length-1].coorPt.length-1].x*(100/document.documentElement.clientWidth)+2.5;e<9&&(e=9),e>76&&(e=76),n<2.5&&(n=2.5),n>66&&(n=66),this.floatdiv.nativeElement.style.top=e.toString()+"vh",this.floatdiv.nativeElement.style.left=n.toString()+"vw",this.showDropdownLabelBox=!0,this.labelSearch="",setTimeout(()=>{this.lbltypetxt.nativeElement.focus()},100)}getLabelList(){var t;this.labelList=[],this.allLabelList=[],(null!==(t=this._tabStatus[1].label_list)&&void 0!==t?t:[]).forEach(t=>{const e={name:t,count:0};this.labelList.push(e),this.allLabelList.push(e)})}sortingLabelList(t,e){t.forEach(({name:t},n)=>{this.labelList[n].count=e.filter(({label:e})=>e===t).length,this.allLabelList[n].count=e.filter(({label:e})=>e===t).length}),this.labelList.sort((t,e)=>t.countt.counte.name.includes(t))}ngOnDestroy(){this._annotateSelectState.setState(),this.unsubscribe$.next(),this.unsubscribe$.complete()}}return t.\u0275fac=function(e){return new(e||t)(u.Hb(_e),u.Hb(M),u.Hb(_t),u.Hb(ae),u.Hb(S),u.Hb(se),u.Hb(le))},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-segmentation"]],viewQuery:function(t,e){if(1&t&&(u.tc(ve,!0),u.tc(ye,!0),u.tc(xe,!0),u.tc(we,!0)),2&t){let t;u.ec(t=u.Ub())&&(e.canvas=t.first),u.ec(t=u.Ub())&&(e.floatdiv=t.first),u.ec(t=u.Ub())&&(e.lbltypetxt=t.first),u.ec(t=u.Ub())&&(e.availablelbl=t.first)}},hostBindings:function(t,e){1&t&&u.Tb("wheel",function(t){return e.mouseScroll(t)})("DOMMouseScroll",function(t){return e.mouseScroll(t)})("dblclick",function(t){return e.canvasDblClickEvent(t)})("keydown",function(t){return e.canvasKeyDownEvent(t)},!1,u.gc)("mousedown",function(t){return e.mouseDown(t)})("mouseup",function(t){return e.mouseUp(t)})("mousemove",function(t){return e.mouseMove(t)})("mouseout",function(t){return e.mouseOut(t)})},inputs:{_selectMetadata:"_selectMetadata",_imgSrc:"_imgSrc",_tabStatus:"_tabStatus"},outputs:{_onChangeMetadata:"_onChangeMetadata",_onChangeAnnotationLabel:"_onChangeAnnotationLabel"},features:[u.vb],decls:13,vars:9,consts:[[1,"floatdiv","unclosedOut",3,"hidden"],["floatdiv",""],["autocomplete","off","spellcheck","false",1,"unclosedOut"],["type","text",1,"lbltypetxt","unclosedOut",3,"ngModel","ngModelOptions","ngModelChange"],["lbltypetxt",""],[1,"availablelbl","unclosedOut"],["availablelbl",""],[1,"lblList","unclosedOut"],["class","lblElement unclosedOut",3,"click",4,"ngFor","ngForOf"],["class","unclosedOut notExist",4,"ngIf"],[1,"canvasstyle",3,"ngStyle"],["canvasdrawing",""],[1,"lblElement","unclosedOut",3,"click"],[1,"lblName","unclosedOut"],[1,"lblCount","unclosedOut"],[1,"unclosedOut","notExist"],[1,"unclosedOut"]],template:function(t,e){1&t&&(u.Mb(0,"div"),u.Mb(1,"div",0,1),u.Mb(3,"form",2),u.Mb(4,"input",3,4),u.Tb("ngModelChange",function(t){return e.labelSearch=t})("ngModelChange",function(t){return e.labelTypeTextChange(t)}),u.Lb(),u.Lb(),u.Mb(6,"div",5,6),u.Mb(8,"ul",7),u.mc(9,Se,5,2,"li",8),u.mc(10,Ce,7,6,"li",9),u.Lb(),u.Lb(),u.Lb(),u.Ib(11,"canvas",10,11),u.Lb()),2&t&&(u.xb(1),u.ac("hidden",!e.showDropdownLabelBox),u.xb(3),u.ac("ngModel",e.labelSearch)("ngModelOptions",u.cc(6,Me)),u.xb(5),u.ac("ngForOf",e.labelList),u.xb(1),u.ac("ngIf",0===e.labelList.length),u.xb(1),u.ac("ngStyle",u.dc(7,ke,e.currentCursor())))},directives:[yt.n,yt.g,yt.h,yt.a,yt.f,yt.i,i.j,i.k,i.l],pipes:[E.c],styles:[".canvasstyle[_ngcontent-%COMP%]{position:fixed;left:2.2vw;right:auto;top:8vh;overflow:scroll;scrollbar-width:none;margin:0;padding:0;outline:none;border:none}.floatdiv[_ngcontent-%COMP%]{position:absolute;z-index:10000}.availablelbl[_ngcontent-%COMP%]{background-color:#000;width:11vw;height:15vh;color:snow;font-size:2vh;font-weight:700;outline:none;border-radius:.2vh;border:.2vw solid grey;border-top:.1vh dotted snow;overflow:auto;scrollbar-width:none}.availablelbl[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.lblList[_ngcontent-%COMP%]{padding:0 .2vw}.lblElement[_ngcontent-%COMP%]{list-style-type:none;margin:.3vh 0;padding:0;justify-content:space-between;display:flex}.lblElement[_ngcontent-%COMP%]:hover{background-color:#111}.lblName[_ngcontent-%COMP%]{margin-left:.2vw;overflow:hidden;text-overflow:ellipsis}.lblCount[_ngcontent-%COMP%]{background-color:#222;margin-right:.2vw;padding:.1vh .2vw;border-radius:.2vw}.notExist[_ngcontent-%COMP%]{color:#999;font-size:1.5vh}.lbltypetxt[_ngcontent-%COMP%]{width:11vw;height:4vh;color:snow;font-size:2vh;background-color:#000;outline:none;border-radius:.2vh;border:.2vw solid grey;border-bottom:none;padding:0;text-indent:.4vw}.invalidInput[_ngcontent-%COMP%]{border:.2vw solid red}.validInput[_ngcontent-%COMP%]{border:.2vw solid grey}"],changeDetection:0}),t})();const Oe=["subLabelSelect"],Le=["renameInput"];function Ie(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"image-labelling-object-detection",57),u.Tb("_onChangeMetadata",function(e){return u.hc(t),u.Vb().onChangeMetadata(e)})("_onChangeAnnotationLabel",function(e){return u.hc(t),u.Vb().onChangeAnnotationLabel(e)})("_onEnterLabel",function(e){return u.hc(t),u.Vb().onProcessLabel(e)}),u.Lb(),u.Jb()}if(2&t){const t=u.Vb();u.xb(1),u.ac("_selectMetadata",t.selectedMetaData)("_imgSrc",t.imgSrc)("_tabStatus",t.tabStatus)}}function Ae(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"image-labelling-segmentation",58),u.Tb("_onChangeMetadata",function(e){return u.hc(t),u.Vb().onChangeMetadata(e)})("_onChangeAnnotationLabel",function(e){return u.hc(t),u.Vb().onChangeAnnotationLabel(e)}),u.Lb(),u.Jb()}if(2&t){const t=u.Vb();u.xb(1),u.ac("_selectMetadata",t.selectedMetaData)("_imgSrc",t.imgSrc)("_tabStatus",t.tabStatus)}}function Be(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",59),u.Mb(2,"label",60),u.Mb(3,"input",61),u.Tb("change",function(){return u.hc(t),u.Vb().onSwitchSaveType()}),u.Lb(),u.Ib(4,"span",62),u.Mb(5,"p"),u.oc(6),u.Wb(7,"translate"),u.Lb(),u.Lb(),u.Ib(8,"span",63),u.Mb(9,"label",60),u.Mb(10,"input",61),u.Tb("change",function(){return u.hc(t),u.Vb().onSwitchSaveType()}),u.Lb(),u.Ib(11,"span",62),u.Mb(12,"p"),u.oc(13),u.Wb(14,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Mb(15,"div",64),u.Tb("click",function(){return u.hc(t),u.Vb().showAdvSettings()}),u.oc(16),u.Wb(17,"translate"),u.Lb(),u.Mb(18,"button",65),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("pascalVoc")}),u.oc(19,"Pascal VOC"),u.Lb(),u.Ib(20,"br"),u.Mb(21,"button",65),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("yolo")}),u.oc(22,"YOLO"),u.Lb(),u.Ib(23,"br"),u.Mb(24,"button",65),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("ocr")}),u.oc(25,"Text OCR"),u.Lb(),u.Ib(26,"br"),u.Mb(27,"button",65),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("label")}),u.oc(28,"Label"),u.Lb(),u.Ib(29,"br"),u.Jb()}if(2&t){const t=u.Vb();u.xb(3),u.ac("checked",t.saveType.saveCurrentImage),u.xb(3),u.pc(u.Xb(7,5,"singleSave")),u.xb(4),u.ac("checked",t.saveType.saveBulk),u.xb(3),u.pc(u.Xb(14,7,"bulkSave")),u.xb(3),u.pc(u.Xb(17,9,"advModal.title"))}}function je(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"button",65),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("coco")}),u.oc(2,"COCO"),u.Lb(),u.Ib(3,"br"),u.Mb(4,"button",65),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("json")}),u.oc(5,"JSON"),u.Lb(),u.Ib(6,"br"),u.Mb(7,"button",65),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("label")}),u.oc(8,"Label"),u.Lb(),u.Ib(9,"br"),u.Jb()}}function Ee(t,e){1&t&&(u.Mb(0,"p",66),u.oc(1),u.Wb(2,"translate"),u.Lb()),2&t&&(u.xb(1),u.qc(" ",u.Xb(2,1,"advModal.instructionText")," "))}function ze(t,e){if(1&t&&(u.Mb(0,"div",67),u.Mb(1,"label",68),u.Mb(2,"input",61),u.Tb("change",function(){const t=e.$implicit;return t.isChoosen=!t.isChoosen}),u.Lb(),u.Ib(3,"span",62),u.Lb(),u.Mb(4,"label",69),u.oc(5),u.Lb(),u.Lb()),2&t){const t=e.$implicit;u.xb(2),u.ac("checked",t.isChoosen),u.xb(3),u.pc(t.label)}}function Te(t,e){1&t&&(u.Mb(0,"div"),u.oc(1),u.Wb(2,"translate"),u.Lb()),2&t&&(u.xb(1),u.qc(" ",u.Xb(2,1,"advModal.noLabel")," "))}function De(t,e){if(1&t){const t=u.Nb();u.Mb(0,"button",70),u.Tb("click",function(){return u.hc(t),u.Vb().saveAdvSettings()}),u.oc(1),u.Wb(2,"translate"),u.Lb()}2&t&&(u.xb(1),u.qc(" ",u.Xb(2,1,"advModal.btnSave")," "))}function Ne(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"option",71),u.oc(2),u.Lb(),u.Jb()),2&t){const t=e.$implicit,n=u.Vb(2);u.xb(1),u.ac("value",t)("selected",t===n.currentAnnotationLabel),u.xb(1),u.qc(" ",t," ")}}function Re(t,e){if(1&t&&(u.Kb(0),u.mc(1,Ne,3,3,"ng-container",23),u.Jb()),2&t){const t=e.$implicit;u.xb(1),u.ac("ngForOf",t.label_list)}}function Fe(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"option",71),u.oc(2),u.Lb(),u.Jb()),2&t){const t=e.$implicit,n=u.Vb().$implicit;u.xb(1),u.ac("value",t)("selected",n.label_list[0].label),u.xb(1),u.qc(" ",t," ")}}function Xe(t,e){if(1&t&&(u.Kb(0),u.mc(1,Fe,3,3,"ng-container",23),u.Jb()),2&t){const t=e.$implicit;u.xb(1),u.ac("ngForOf",t.label_list)}}function We(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"div",72),u.oc(2),u.Lb(),u.Jb()),2&t){const t=u.Vb();u.xb(2),u.qc(" ",t.subLabelValidateMsg," ")}}function Ue(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",73),u.Mb(2,"label",74),u.oc(3),u.Wb(4,"translate"),u.Lb(),u.Mb(5,"label",75),u.oc(6),u.Wb(7,"translate"),u.Lb(),u.Ib(8,"span",76),u.Mb(9,"button",77),u.Tb("click",function(){u.hc(t);const n=e.index,i=u.Vb(2).index;return u.Vb(3).onRemoveSubLabel(i,n)}),u.oc(10," X "),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=e.$implicit;u.xb(3),u.rc("",u.Xb(4,4,"labellingArea.label"),": ",t.label,""),u.xb(3),u.rc("",u.Xb(7,6,"labellingArea.regionInfo"),": ",t.region,"")}}function $e(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"h2",19),u.oc(2),u.Wb(3,"translate"),u.Lb(),u.mc(4,Ue,11,8,"ng-container",23),u.Jb()),2&t){const t=u.Vb().$implicit;u.xb(2),u.pc(u.Xb(3,2,"labellingArea.addedSubLabel")),u.xb(2),u.ac("ngForOf",t.subLabel)}}function Ye(t,e){if(1&t&&(u.Kb(0),u.mc(1,$e,5,4,"ng-container",5),u.Jb()),2&t){const t=e.$implicit,n=e.index,i=u.Vb(3);u.xb(1),u.ac("ngIf",(null==t||null==t.subLabel?null:t.subLabel.length)>0&&n===i.currentAnnotationIndex)}}function Ve(t,e){if(1&t&&(u.Kb(0),u.mc(1,Ye,2,1,"ng-container",23),u.Jb()),2&t){const t=e.$implicit;u.xb(1),u.ac("ngForOf",null==t?null:t.bnd_box)}}function Ze(t,e){if(1&t&&(u.Kb(0),u.mc(1,Ve,2,1,"ng-container",23),u.Jb()),2&t){const t=e.$implicit;u.xb(1),u.ac("ngForOf",t.annotation)}}function He(t,e){if(1&t&&(u.Mb(0,"tr"),u.Ib(1,"td",78),u.Wb(2,"translate"),u.Ib(3,"td",78),u.Wb(4,"translate"),u.Lb()),2&t){const t=e.$implicit;u.xb(1),u.bc("innerHTML",u.Xb(2,2,t.shortcutKey),u.ic),u.xb(2),u.bc("innerHTML",u.Xb(4,4,t.functionality),u.ic)}}function Ke(t,e){if(1&t&&(u.Mb(0,"p",49),u.oc(1),u.Wb(2,"translate"),u.Ib(3,"br"),u.oc(4),u.Lb()),2&t){const t=u.Vb();u.xb(1),u.qc(" ",u.Xb(2,2,"location"),""),u.xb(3),u.qc("",t.modalSpanLocationPath," ")}}function Je(t,e){1&t&&(u.Mb(0,"label",72),u.oc(1),u.Wb(2,"translate"),u.Lb()),2&t&&(u.xb(1),u.pc(u.Xb(2,1,"renameModal.nameExist")))}function Ge(t,e){1&t&&(u.Mb(0,"label",72),u.oc(1),u.Wb(2,"translate"),u.Lb()),2&t&&(u.xb(1),u.pc(u.Xb(2,1,"renameModal.nameEmpty")))}const qe=[{path:"",component:(()=>{class t{constructor(t,e,n,i,u,b,g,f,m,p,_){this._router=t,this._imgLblApiService=e,this._modalService=n,this._dataSetService=i,this._annotateService=u,this._imgLblActionService=b,this._imgLblLayoutService=g,this._imgLblModeService=f,this._languageService=m,this._spinnerService=p,this._exportSaveFormatService=_,this.currentUrl="",this.selectedProjectName="",this.imgSrc="",this.loading=!1,this.thumbnailList=[],this.unsubscribe$=new l.a,this.subject$=new l.a,this.tabStatus=[{name:"labellingProject.project",closed:!1},{name:"labellingProject.label",closed:!1,label_list:[]},{name:"labellingProject.annotation",closed:!1,annotation:[]}],this.mainLabelRegionVal="",this.subLabelRegionVal="",this.subLabelValidateMsg="",this.currentAnnotationLabel="",this.currentAnnotationIndex=-1,this.currentImageDisplayIndex=-1,this.isLoading=!1,this.showLoading=!1,this.processingNum=0,this.unsupportedImageList=[],this.spanClass="",this.modalSpanMessage="",this.modalSpanLocationPath="",this.sliceNum=0,this.labelList=[],this.isOverlayOn=!1,this.blockLoadThumbnails=!1,this.totalUuid=0,this.labelChoosen=[],this.tempLabelChoosen=[],this.warningMessage="",this.imgPathSplit=[],this.newImageName="",this.selectedUuid="",this.renameImageErrorCode=0,this.modalExportOptions="modal-export-options",this.modalExportProject="modal-export-project",this.modalShortcutKeyInfo="modal-shortcut-key-info",this.modalUnsupportedImage="modal-unsupported-image",this.modalExportWarning="modalExportWarning",this.modalRenameImage="modal-rename-image",this.exportModalBodyStyle={minHeight:"15vh",maxHeight:"15vh",minWidth:"19.5vw",maxWidth:"19.5vw",margin:"15vw 71vh",overflow:"none"},this.saveModalBodyStyle={maxHeight:"80vh",minWidth:"28vw",maxWidth:"28vw",margin:"10vh 28vw",overflow:"none"},this.advModalBodyStyle={maxHeight:"80vh",minWidth:"18vw",maxWidth:"18vw",margin:"10vh 28vw",overflow:"none"},this.infoModalBodyStyle={maxHeight:"80vh",minWidth:"40vw",maxWidth:"40vw",margin:"20vh 23vw",padding:"0vh 0vw 3vh 0vw",overflow:"none"},this.exportProjectBodyStyle={minHeight:"10vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.exportWarningBodyStyle={minHeight:"10vh",maxHeight:"20vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.unsupportedImageBodyStyle={minHeight:"18vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.renameImageBodyStyle={minHeight:"18vh",maxHeight:"30vh",minWidth:"20vw",maxWidth:"20vw",margin:"15vw 71vh",overflow:"none"},this.saveType={saveCurrentImage:!0,saveBulk:!1},this.projectList={projects:[],isUploading:!1,isFetching:!1},this.startProject=t=>{this.isLoading=!0,this.selectedProjectName=t;const e=this._dataSetService.checkProjectStatus(t),n=this._dataSetService.updateProjectLoadStatus(t),i=this._dataSetService.checkExistProjectStatus(t),a=this._dataSetService.getThumbnailList;this.subjectSubscription=this.subject$.pipe(Object(o.a)(()=>Object(c.a)([e])),Object(s.a)(([{message:t,content:e}])=>{this.totalUuid=e[0].total_uuid,this.projectList={isUploading:this.projectList.isUploading,isFetching:this.projectList.isFetching,projects:this.projectList.projects.map(t=>t.project_name===e[0].project_name?Object.assign(Object.assign({},e[0]),{created_date:t.created_date}):t)};const{is_loaded:n}=e[0];return 1===t&&!n}),Object(o.a)(([{message:t}])=>t?Object(c.a)([n,i]):[]),Object(o.a)(([{},{message:e,uuid_list:n,label_list:r}])=>2===e?(this.labelList=[...r],this.tabStatus[1].label_list=this.labelList,n.length>0?n.map(e=>a(t,e)):[]):Object(h.a)(500).pipe(Object(o.a)(()=>i),Object(s.a)(({message:t})=>2===t),Object(o.a)(({uuid_list:e,label_list:n})=>(console.log(e.length),this.tabStatus[1].label_list=n,e.length>0?e.slice(this.sliceNum,this.sliceNum+=20).map(e=>a(t,e)):[])))),Object(o.a)(t=>t)).subscribe(t=>{this.thumbnailList=[...this.thumbnailList,t],this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{totalNumThumbnail:this.thumbnailList.length})},t=>{},()=>{this.isLoading=!1,this._annotateService.labelStaging$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(({annotation:t,isDlbClick:e})=>{e?(this.currentAnnotationIndex=t,this.tabStatus.forEach(({annotation:e})=>null==e?void 0:e.forEach(({bnd_box:e,polygons:n})=>{const i=null!=e?e:n;if(i){const{label:e,region:n}=i[t];this.currentAnnotationLabel=e,this.mainLabelRegionVal=n||""}else console.log("missing prop bnd_box OR polygons")})),this._imgLblActionService.setState({isActiveModal:!0,draw:!1,drag:!1,scroll:!1}),this.onDisplayModal()):(this.currentAnnotationLabel="",this.currentAnnotationIndex=t)}),this._imgLblActionService.action$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(({clear:t,save:e,keyInfo:n})=>{t&&(this.thumbnailList[0].bnd_box&&(this.thumbnailList[this.currentImageDisplayIndex].bnd_box=[]),this.thumbnailList[0].polygons&&(this.thumbnailList[this.currentImageDisplayIndex].polygons=[]),this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{hasAnnotation:!1})),e&&(this.labelChoosen=this.tabStatus[1].label_list?this.tabStatus[1].label_list.map(t=>({label:t,isChoosen:!0})):[],this.onDisplayModal("modal-save")),n&&this.onDisplayShortcutKeyInfo()}),this.navigateByAction({thumbnailAction:1}),this._spinnerService.hideSpinner()}),this.subject$.next()},this.loadThumbnails=()=>{if(!this.blockLoadThumbnails&&this.sliceNumObject(h.a)(500).pipe(Object(o.a)(()=>t),Object(s.a)(({message:t})=>2===t),Object(o.a)(({uuid_list:t})=>t.length>0?t.slice(this.sliceNum,this.sliceNum+=10).map(t=>e(this.selectedProjectName,t)):[]))),Object(o.a)(t=>t)).subscribe(t=>{this.thumbnailList=[...this.thumbnailList,t],this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{totalNumThumbnail:this.thumbnailList.length})},t=>{},()=>{this.blockLoadThumbnails=!1,this._spinnerService.hideSpinner()}),this.subject$.next()}},this.onCheckBboxMetadata=()=>{console.log("this",this.tabStatus),this.tabStatus.forEach(({annotation:t})=>{t&&(null==t||t.forEach(t=>{var e;console.log("MAT",t.bnd_box),null===(e=t.bnd_box)||void 0===e||e.forEach((t,e)=>{if(t.x1>t.x2){const e=t.x1;t.x1=t.x2,t.x2=e}if(t.y1>t.y2){const e=t.y1;t.y1=t.y2,t.y2=e}})}))})},this.updateProjectProgress=()=>{const t=this.selectedProjectName;this.onCheckBboxMetadata(),this._imgLblLayoutService.updateProjectProgress(this.tabStatus,t)},this.onChangeMetadata=t=>{this.tabStatus=this.tabStatus.map(e=>e.annotation?Object.assign(Object.assign({},e),{annotation:[t]}):e),this.thumbnailList=this.thumbnailList.map((e,n)=>this.currentImageDisplayIndex===n?t:e);const e=t.bnd_box?t.bnd_box.length>0:t.polygons.length>0;this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{hasAnnotation:e}),this.updateProjectProgress()},this.onToggleTab=({name:t,closed:e})=>{!this.tabStatus.some(n=>n.name.toLowerCase()===t.toLowerCase()&&n.closed===e)&&(this.tabStatus=this.tabStatus.map(n=>n.name.toLowerCase()===t.toLowerCase()?Object.assign(Object.assign({},n),{closed:e}):Object.assign({},n)))},this.onExport=()=>{this.modalSpanMessage="",this.modalSpanLocationPath="",this._modalService.open(this.modalExportOptions)},this.exportProject=t=>{"cfgdata"===t&&this.processingNum++;const e=this.selectedProjectName,n=this._imgLblApiService.exportProject(e,t),i=this._imgLblApiService.exportProjectStatus(),a=({message:t})=>1===t?Object(h.a)(500).pipe(Object(o.a)(()=>i),Object(s.a)(({export_status:t})=>(this.isOverlayOn=1===t,this.isLoading=1===t,0===t||2===t||3===t))):Object(d.a)(t=>(console.error(t),t));this.subjectSubscription=this.subject$.pipe(Object(s.a)(),Object(o.a)(()=>n),Object(o.a)(t=>a(t))).subscribe(({export_status:n,project_config_path:i})=>{"cfgdata"===t&&this.processingNum--,2===n?this._languageService._translate.get("exportSuccess").subscribe(t=>{this.toggleExportProjectModalMessage(!0),this.modalSpanMessage=e+t,this.modalSpanLocationPath=i,this.processIsSuccess(!0)}):this._languageService._translate.get("exportFailed").subscribe(t=>{this.toggleExportProjectModalMessage(!0),this.modalSpanMessage=t+e,this.processIsSuccess(!1)})},t=>{},()=>{this.closeExportProjectModal()}),this.subject$.next()},this.toggleExportProjectModalMessage=t=>{this._modalService.open(this.modalExportProject)},this.processIsSuccess=t=>{this.spanClass=t?"validation-success":"validation-error"},this.onReload=()=>{const t=this.selectedProjectName,e=this._imgLblApiService.reloadProject(t),n=this._imgLblApiService.reloadProjectStatus(t),i=this._dataSetService.getThumbnailList,a=[],r=({message:e})=>5!==e&&1===e?Object(h.a)(500).pipe(Object(o.a)(()=>n),Object(s.a)(({file_system_status:t,unsupported_image_list:e})=>(this.unsupportedImageList=e,3===t||0===t)),Object(o.a)(e=>{this.isLoading=!0;let n=[];this.thumbnailList.forEach(t=>{n.push(t.uuid)}),e.uuid_add_list.forEach(t=>{n.push(t),this.totalUuid++}),e.uuid_delete_list.forEach(t=>{n=n.filter(e=>e!==t),this.totalUuid--}),this.sliceNum=0;const a=3===e.file_system_status&&n.length>0?n.slice(this.sliceNum,this.sliceNum+=20).map(e=>i(t,e)):[];return this.thumbnailList=[],a}),Object(o.a)(t=>t)):Object(d.a)(t=>(console.error(t),this.isLoading=!1,t));this.subjectSubscription=this.subject$.pipe(Object(s.a)(),Object(o.a)(()=>e),Object(o.a)(t=>r(t))).subscribe(t=>{this.isLoading=!0,a.push(t)},t=>{},()=>{this.thumbnailList=a,this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{totalNumThumbnail:this.thumbnailList.length}),this.currentImageDisplayIndex=-1,this.navigateByAction({thumbnailAction:1}),this.isLoading=!1,this.unsupportedImageList.length>0&&this._dataSetService.downloadUnsupportedImageList(t,this.unsupportedImageList).then(t=>{t&&this._modalService.open(this.modalUnsupportedImage)})}),this.subject$.next()},this.navigateByUrl=({url:t})=>{t?this._router.navigate([t]):console.error("No url received from child component")},this.keyDownEvent=({key:t,repeat:e})=>{this._imgLblActionService.action$.pipe(Object(s.a)()).subscribe(({draw:n})=>{if(!n&&!e)switch(t){case"ArrowLeft":this.navigateByAction({thumbnailAction:-1});break;case"ArrowRight":this.navigateByAction({thumbnailAction:1});break;case"Escape":this.onCloseModal()}})},this.navigateByAction=({thumbnailAction:t})=>{if(t){const e=this._imgLblLayoutService.calculateIndex(t,this.currentImageDisplayIndex,this.thumbnailList.length);if(e!==this.currentImageDisplayIndex){this.currentImageDisplayIndex=e;const t=this.thumbnailList.find((t,n)=>n===e),n=this.thumbnailList.findIndex((t,n)=>n===e);n+3===this.thumbnailList.length&&this.loadThumbnails(),t&&-1!==n&&!this.showLoading&&this.displayImage(Object.assign(Object.assign({},t),{thumbnailIndex:n}))}}},this.displayImage=(t,e=this.selectedProjectName)=>{var n,{thumbnailIndex:i}=t,o=Object(a.b)(t,["thumbnailIndex"]);(null===(n=this.selectedMetaData)||void 0===n?void 0:n.uuid)!==o.uuid&&(this.showLoading=!0,this._imgLblApiService.getBase64Thumbnail(e,o.uuid).pipe(Object(s.a)()).subscribe(({message:t,img_src:e})=>{if(1===t){this.selectedMetaData=o,this.imgSrc=e,this.currentImageDisplayIndex=i;const t=o.bnd_box?o.bnd_box.length>0:o.polygons&&o.polygons.length>0||!1;this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{currentThumbnailIndex:i+1,thumbnailName:o.img_path,hasAnnotation:t})}},t=>console.error(t),()=>this.showLoading=!1))},this.onProcessLabel=({selectedLabel:t,label_list:e,action:n})=>{const i=t&&!n?e.filter(e=>e!==t):e;this._imgLblApiService.updateLabelList(this.selectedProjectName,i.length>0?i:[]).pipe(Object(s.a)()).subscribe(({message:t})=>{1===t?this.tabStatus=this._imgLblLayoutService.displayLabelList(this.tabStatus,i):console.error("Error while updating label")}),this.updateProjectProgress()},this.onChangeAnnotationLabel=t=>{t.index=this.currentAnnotationIndex,this.selectedMetaData&&this.selectedMetaData.polygons&&(this.selectedMetaData.polygons[t.index].label=t.label),this.tabStatus=this._imgLblLayoutService.changeAnnotationLabel(this.tabStatus,t),this.updateStateToRenderChild(),this.updateProjectProgress()},this.onDeleteAnnotation=t=>{this.tabStatus=this._imgLblLayoutService.deleteAnnotation(this.tabStatus,t),this.updateStateToRenderChild(),this.updateProjectProgress()},this.onDisplayModal=(t="modal-image-labelling")=>{this.subLabelRegionVal="",this.subLabelValidateMsg="",this._modalService.open(t)},this.onCloseModal=(t="modal-image-labelling")=>{this._imgLblActionService.setState({isActiveModal:!1,draw:!0,scroll:!0}),this._modalService.close(t)},this.onChangeInput=(t,e)=>{const{value:n}=t.target;"main"===e?this.mainLabelRegionVal=n:this.subLabelRegionVal=n},this.onSubmitLabel=()=>{const{value:t}=this._subLabelSelect.nativeElement;if(!t.trim())return;let e=!1,n=!1;this.tabStatus.forEach(({annotation:i})=>null==i?void 0:i.forEach(({bnd_box:i,polygons:a})=>{const o=null!=i?i:a;if(o){const{subLabel:i}=o[this.currentAnnotationIndex];e=!!(i&&(null==i?void 0:i.length)>0),e&&(null==i||i.some(({label:e})=>n=e===t))}else console.log("missing prop bnd_box OR polygons")})),n?this.subLabelValidateMsg="Invalid of duplicate label: "+t:(this.tabStatus=this._imgLblLayoutService.submitLabel(this.tabStatus,t,this.currentAnnotationIndex,{mainLabelRegion:this.mainLabelRegionVal,subLabelRegion:this.subLabelRegionVal}),this.subLabelValidateMsg="",this.updateStateToRenderChild(),this.updateProjectProgress()),this.subLabelRegionVal=""},this.onRemoveSubLabel=(t,e)=>{this.tabStatus=this._imgLblLayoutService.removeSubLabel(this.tabStatus,{selectedAnnoIndex:t,selectedSubLabelIndex:e}),this.updateStateToRenderChild(),this.updateProjectProgress()},this.updateStateToRenderChild=()=>{this.tabStatus.forEach(({annotation:t})=>{t&&(this.thumbnailList=this.thumbnailList.map(e=>{var n;return null!==(n=t.find(({uuid:t})=>e.uuid===t))&&void 0!==n?n:e}),this.selectedMetaData=t[0])})},this.resetProjectStatus=(t=this.selectedProjectName)=>{t.trim()&&this._dataSetService.manualCloseProject(t).pipe(Object(r.a)(this.unsubscribe$)).subscribe(({})=>{this._router.navigate(["/"])})},this.onSwitchSaveType=()=>{this.saveType={saveCurrentImage:!this.saveType.saveCurrentImage,saveBulk:!this.saveType.saveBulk}},this.onClickDownload=t=>Object(a.a)(this,void 0,void 0,function*(){const e=this.labelChoosen.filter(t=>!0===t.isChoosen).map(t=>t.label),n=this.labelChoosen.map(t=>t.label);this.saveType.saveBulk&&this.processingNum++;const i=yield this._exportSaveFormatService.exportSaveFormat(Object.assign(Object.assign(Object.assign(Object.assign({},this.saveType),{saveFormat:t,metadata:this.selectedMetaData,index:this.currentAnnotationIndex,projectName:this.selectedProjectName,fullLabelList:n}),(this.saveType.saveBulk||"ocr"===t||"json"===t||"coco"===t)&&{projectFullMetadata:this.thumbnailList}),"json"!==t&&{labelList:e}));0===i.message&&(this.warningMessage=i.msg,this._modalService.open(this.modalExportWarning)),this.saveType.saveBulk&&this.processingNum--}),this._languageService.initializeLanguage("image-labelling",["image-labelling-en","image-labelling-cn","image-labelling-ms"])}ngOnInit(){this.currentUrl=this._router.url;const{projectName:t}=this._imgLblLayoutService.getRouteState(history);this.selectedProjectName=t,this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{totalNumThumbnail:this.thumbnailList.length}),this.startProject(this.selectedProjectName)}closeExportProjectModal(){this._modalService.close(this.modalExportOptions)}onWindowClose(t){this.resetProjectStatus(),t.preventDefault()}onChangeLabel(t){this.onChangeAnnotationLabel({index:this.currentAnnotationIndex,label:t})}onDisplayShortcutKeyInfo(){this._modalService.open(this.modalShortcutKeyInfo)}onLoadMoreThumbnails(){this.loadThumbnails()}onRenameImage(t){this.imgPathSplit=t.img_path.split("\\");const e=this.imgPathSplit.pop();this.newImageName=e?e.split(".")[0]:"",this.imageExt=e?"."+e.split(".").pop():"",this.selectedUuid=t.uuid,this.renameImageErrorCode=0,this._modalService.open(this.modalRenameImage),this._renameInput.nativeElement.focus()}onChangeImageName(t){this.newImageName=t.target.value}onSubmitRenameImage(){""!==this.newImageName?this._imgLblApiService.renameImage(this.selectedUuid,this.newImageName+this.imageExt,this.selectedProjectName).subscribe(t=>{if(1===t.message){const t=this.thumbnailList.findIndex(t=>t.uuid===this.selectedUuid);this.thumbnailList[t].img_path=this.imgPathSplit.join("\\")+"\\"+this.newImageName+this.imageExt,this.newImageName="",this._modalService.close(this.modalRenameImage)}else 1===t.error_code&&(this.renameImageErrorCode=t.error_code)}):this.renameImageErrorCode=2}showAdvSettings(){this.tempLabelChoosen=this.labelChoosen.map(t=>Object.assign({},t)),this.onDisplayModal("modal-adv")}saveAdvSettings(){this.labelChoosen=this.tempLabelChoosen.map(t=>Object.assign({},t)),this.onCloseModal("modal-adv")}keyStrokeEvent({key:t}){if("F2"===t&&this.selectedMetaData){const t=this.selectedMetaData;this.imgPathSplit=t.img_path.split("\\");const e=this.imgPathSplit.pop();this.newImageName=e?e.split(".")[0]:"",this.imageExt=e?"."+e.split(".").pop():"",this.selectedUuid=t.uuid,this.renameImageErrorCode=0,this._modalService.open(this.modalRenameImage),this._renameInput.nativeElement.focus()}}shortcutKeyInfo(){return[{no:1,shortcutKey:"info.shortcut.1.key",functionality:"info.shortcut.1.functionality"},{no:2,shortcutKey:"info.shortcut.2.key",functionality:"info.shortcut.2.functionality"},{no:3,shortcutKey:"info.shortcut.3.key",functionality:"info.shortcut.3.functionality"},{no:4,shortcutKey:"info.shortcut.4.key",functionality:"info.shortcut.4.functionality"},{no:5,shortcutKey:"info.shortcut.5.key",functionality:"info.shortcut.5.functionality"},{no:6,shortcutKey:"info.shortcut.6.key",functionality:"info.shortcut.6.functionality"}]}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this._imgLblModeService.setState(null),this._imgLblActionService.setState(null),this.resetProjectStatus()}}return t.\u0275fac=function(e){return new(e||t)(u.Hb(b.a),u.Hb(_),u.Hb(v.a),u.Hb(y.a),u.Hb(S),u.Hb(M),u.Hb(k),u.Hb(p.a),u.Hb(P.a),u.Hb(O.a),u.Hb(A))},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-layout"]],viewQuery:function(t,e){if(1&t&&(u.tc(Oe,!0),u.tc(Le,!0)),2&t){let t;u.ec(t=u.Ub())&&(e._subLabelSelect=t.first),u.ec(t=u.Ub())&&(e._renameInput=t.first)}},hostBindings:function(t,e){1&t&&u.Tb("keydown",function(t){return e.keyStrokeEvent(t)},!1,u.gc)("beforeunload",function(t){return e.onWindowClose(t)},!1,u.gc)},decls:132,vars:142,consts:[[1,"layout-container"],[3,"_onChange"],[3,"_totalUuid","_onChange","_tabStatus","_onClick"],[1,"content-container"],[3,"_onChange","_currentUrl","_tabStatus"],[4,"ngIf"],[3,"_onChange","_selectMetadata","_totalUuid","_thumbnailList","_tabStatus","_onClose","_onClickThumbnail","_onClickLabel","_onEnterLabel","_onChangeAnnotationLabel","_onDeleteAnnotation","_loadMoreThumbnails","_onRenameImage"],[3,"_onChange","_onClick","_onExport","_onReload"],[3,"_thumbnailInfo","_imgSrc"],["id","modal-save",3,"id","modalBodyStyle","scrollable"],[1,"save-format-list"],[1,"save-format-content"],["id","modal-adv",3,"id","modalBodyStyle","modalTitle","scrollable","zIndex"],[1,"modal-adv-container"],["class","modal-adv-instruction",4,"ngIf"],["class","margin-bottom",4,"ngFor","ngForOf"],["class","button-style modal-adv-btn",3,"click",4,"ngIf"],["id","modal-image-labelling",3,"id","scrollable","showHeader"],[1,"modal-button","close-button","float-right",3,"click"],[1,"font-title"],[1,"main-label-container"],[1,"font-label"],[1,"static-select",3,"change"],[4,"ngFor","ngForOf"],["type","text",1,"static-input",3,"value","placeholder","change"],[1,"hr-line"],[1,"sub-label-container"],[1,"static-select"],["subLabelSelect",""],[1,"modal-button",3,"click"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"export-content-container"],[1,"modal-button-container"],[1,"button-style","confg-btn",3,"click"],[1,"button-style","confgdata-btn",3,"click"],[1,"with-data"],[1,"help-icon-container"],["src","../../assets/icons/help.svg",1,"help-icon"],[1,"tooltiptext"],[3,"id","modalBodyStyle","scrollable"],[1,"shortcut-key-info-header"],[1,"table-box"],["cellpadding","20"],[1,"modal-content-container"],[1,"modal-message-container"],["class","message",4,"ngIf"],[3,"ngClass"],[1,"error-msg",3,"innerHTML"],[3,"id","modalBodyStyle","modalTitle","scrollable","zIndex"],[1,"message"],["type","text",1,"static-input",3,"value","placeholder","change","keydown.enter"],["renameInput",""],["class","validate-msg",4,"ngIf"],[1,"button-style","renameimg-btn",3,"click"],[3,"_modalUnsupportedImage","_unsupportedImageBodyStyle","_unsupportedImageList"],[3,"_loading"],[3,"_processingNum"],[3,"_selectMetadata","_imgSrc","_tabStatus","_onChangeMetadata","_onChangeAnnotationLabel","_onEnterLabel"],[3,"_selectMetadata","_imgSrc","_tabStatus","_onChangeMetadata","_onChangeAnnotationLabel"],[1,"switch-container"],[1,"switch"],["type","checkbox",1,"checkBox",3,"checked","change"],[1,"slider","round"],[1,"space-verticle"],[1,"adv-settings",3,"click"],[1,"save-format-btn",3,"click"],[1,"modal-adv-instruction"],[1,"margin-bottom"],[1,"switch-2","no-margin-left"],[1,"modal-adv-label"],[1,"button-style","modal-adv-btn",3,"click"],[3,"value","selected"],[1,"validate-msg"],[1,"sub-label-flex-container","sub-label-padding"],[1,"font-label","flex-first"],[1,"font-label","flex-second"],[1,"flex-third"],[1,"modal-butto","flex-fourth",3,"click"],[3,"innerHTML"]],template:function(t,e){1&t&&(u.Mb(0,"div",0),u.Mb(1,"div"),u.Ib(2,"page-header",1),u.Mb(3,"image-labelling-info",2),u.Tb("_onClick",function(t){return e.navigateByAction(t)}),u.Lb(),u.Lb(),u.Mb(4,"div",3),u.Ib(5,"image-labelling-left-sidebar",4),u.mc(6,Ie,2,3,"ng-container",5),u.mc(7,Ae,2,3,"ng-container",5),u.Mb(8,"image-labelling-project",6),u.Tb("_onClose",function(t){return e.onToggleTab(t)})("_onClickThumbnail",function(t){return e.displayImage(t)})("_onClickLabel",function(t){return e.onProcessLabel(t)})("_onEnterLabel",function(t){return e.onProcessLabel(t)})("_onChangeAnnotationLabel",function(t){return e.onChangeAnnotationLabel(t)})("_onDeleteAnnotation",function(t){return e.onDeleteAnnotation(t)})("_loadMoreThumbnails",function(){return e.onLoadMoreThumbnails()})("_onRenameImage",function(t){return e.onRenameImage(t)}),u.Lb(),u.Mb(9,"image-labelling-right-sidebar",7),u.Tb("_onClick",function(t){return e.onToggleTab(t)})("_onExport",function(){return e.onExport()})("_onReload",function(){return e.onReload()}),u.Lb(),u.Lb(),u.Ib(10,"image-labelling-footer",8),u.Lb(),u.Mb(11,"modal",9),u.Mb(12,"div",10),u.Mb(13,"div",11),u.mc(14,Be,30,11,"ng-container",5),u.mc(15,je,10,0,"ng-container",5),u.Lb(),u.Lb(),u.Lb(),u.Mb(16,"modal",12),u.Wb(17,"translate"),u.Mb(18,"div",13),u.mc(19,Ee,3,3,"p",14),u.mc(20,ze,6,2,"div",15),u.mc(21,Te,3,3,"div",5),u.mc(22,De,3,3,"button",16),u.Lb(),u.Lb(),u.Mb(23,"modal",17),u.Mb(24,"button",18),u.Tb("click",function(){return e.onCloseModal()}),u.oc(25,"\u2716"),u.Lb(),u.Mb(26,"div"),u.Mb(27,"h2",19),u.oc(28),u.Wb(29,"translate"),u.Lb(),u.Mb(30,"div",20),u.Mb(31,"label",21),u.oc(32),u.Wb(33,"translate"),u.Lb(),u.Mb(34,"select",22),u.Tb("change",function(t){return e.onChangeLabel(t.target.value)}),u.mc(35,Re,2,1,"ng-container",23),u.Lb(),u.Mb(36,"label",21),u.oc(37),u.Wb(38,"translate"),u.Lb(),u.Mb(39,"input",24),u.Tb("change",function(t){return e.onChangeInput(t,"main")}),u.Wb(40,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Ib(41,"hr",25),u.Mb(42,"div"),u.Mb(43,"h2",19),u.oc(44),u.Wb(45,"translate"),u.Lb(),u.Mb(46,"div",26),u.Mb(47,"label",21),u.oc(48),u.Wb(49,"translate"),u.Lb(),u.Mb(50,"select",27,28),u.mc(52,Xe,2,1,"ng-container",23),u.Lb(),u.Mb(53,"label",21),u.oc(54),u.Wb(55,"translate"),u.Lb(),u.Mb(56,"input",24),u.Tb("change",function(t){return e.onChangeInput(t,"sub")}),u.Wb(57,"translate"),u.Lb(),u.Mb(58,"button",29),u.Tb("click",function(){return e.onSubmitLabel()}),u.oc(59),u.Wb(60,"translate"),u.Lb(),u.Lb(),u.mc(61,We,3,1,"ng-container",5),u.Lb(),u.Ib(62,"hr",25),u.mc(63,Ze,2,1,"ng-container",23),u.Lb(),u.Mb(64,"modal",30),u.Wb(65,"translate"),u.Mb(66,"div",31),u.Mb(67,"div",32),u.Mb(68,"button",33),u.Tb("click",function(){return e.exportProject("cfg")}),u.oc(69),u.Wb(70,"translate"),u.Lb(),u.Mb(71,"button",34),u.Tb("click",function(){return e.exportProject("cfgdata")}),u.oc(72),u.Wb(73,"translate"),u.Ib(74,"br"),u.Mb(75,"span",35),u.oc(76),u.Wb(77,"translate"),u.Lb(),u.Lb(),u.Mb(78,"div",36),u.Ib(79,"img",37),u.Mb(80,"span",38),u.Mb(81,"p"),u.oc(82),u.Wb(83,"translate"),u.Lb(),u.Mb(84,"p"),u.oc(85),u.Wb(86,"translate"),u.Lb(),u.Mb(87,"p"),u.oc(88),u.Wb(89,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Lb(),u.Lb(),u.Lb(),u.Mb(90,"modal",39),u.Mb(91,"div",40),u.oc(92),u.Wb(93,"translate"),u.Lb(),u.Mb(94,"div",41),u.Mb(95,"table",42),u.mc(96,He,5,6,"tr",23),u.Lb(),u.Lb(),u.Lb(),u.Mb(97,"modal",30),u.Wb(98,"translate"),u.Ib(99,"br"),u.Mb(100,"div",43),u.Mb(101,"div",44),u.mc(102,Ke,5,4,"p",45),u.Lb(),u.Mb(103,"div",46),u.Ib(104,"p",47),u.Lb(),u.Lb(),u.Lb(),u.Mb(105,"modal",48),u.Wb(106,"translate"),u.Ib(107,"br"),u.Mb(108,"div",43),u.Mb(109,"div",44),u.Mb(110,"p",49),u.oc(111),u.Wb(112,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Lb(),u.Mb(113,"modal",30),u.Wb(114,"translate"),u.Mb(115,"div",43),u.Mb(116,"label",21),u.oc(117),u.Wb(118,"translate"),u.Lb(),u.Mb(119,"input",50,51),u.Tb("change",function(t){return e.onChangeImageName(t)})("keydown.enter",function(t){return e.onChangeImageName(t),e.onSubmitRenameImage()}),u.Wb(121,"translate"),u.Lb(),u.Ib(122,"br"),u.Ib(123,"br"),u.mc(124,Je,3,3,"label",52),u.mc(125,Ge,3,3,"label",52),u.Mb(126,"button",53),u.Tb("click",function(){return e.onSubmitRenameImage()}),u.oc(127),u.Wb(128,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Ib(129,"unsupported-image-modal",54),u.Ib(130,"spinner",55),u.Ib(131,"toastr",56)),2&t&&(u.xb(2),u.ac("_onChange",e.onChangeSchema),u.xb(1),u.ac("_totalUuid",e.totalUuid)("_onChange",e.onChangeSchema)("_tabStatus",e.tabStatus),u.xb(2),u.ac("_onChange",e.onChangeSchema)("_currentUrl",e.currentUrl)("_tabStatus",e.tabStatus),u.xb(1),u.ac("ngIf",e._router.url.includes("imglabel/bndbox")),u.xb(1),u.ac("ngIf",e._router.url.includes("imglabel/seg")),u.xb(1),u.ac("_onChange",e.onChangeSchema)("_selectMetadata",e.selectedMetaData)("_totalUuid",e.totalUuid)("_thumbnailList",e.thumbnailList)("_tabStatus",e.tabStatus),u.xb(1),u.ac("_onChange",e.onChangeSchema),u.xb(1),u.ac("_thumbnailInfo",e.selectedMetaData)("_imgSrc",e.imgSrc),u.xb(1),u.ac("id","modal-save")("modalBodyStyle",e.saveModalBodyStyle)("scrollable",!0),u.xb(3),u.ac("ngIf",null==e.selectedMetaData?null:e.selectedMetaData.bnd_box),u.xb(1),u.ac("ngIf",null==e.selectedMetaData?null:e.selectedMetaData.polygons),u.xb(1),u.ac("id","modal-adv")("modalBodyStyle",e.advModalBodyStyle)("modalTitle",u.Xb(17,92,"advModal.title"))("scrollable",!0)("zIndex",2),u.xb(3),u.ac("ngIf",0!==e.tempLabelChoosen.length),u.xb(1),u.ac("ngForOf",e.tempLabelChoosen),u.xb(1),u.ac("ngIf",0===e.tempLabelChoosen.length),u.xb(1),u.ac("ngIf",0!==e.tempLabelChoosen.length),u.xb(1),u.ac("id","modal-image-labelling")("scrollable",!0)("showHeader",!1),u.xb(5),u.pc(u.Xb(29,94,"labellingArea.mainLabel")),u.xb(4),u.qc("",u.Xb(33,96,"labellingArea.label"),": "),u.xb(3),u.ac("ngForOf",e.tabStatus),u.xb(2),u.qc("",u.Xb(38,98,"labellingArea.regionInfo"),": "),u.xb(2),u.ac("value",e.mainLabelRegionVal)("placeholder",u.Xb(40,100,"labellingArea.mainRegionInfo")),u.xb(5),u.pc(u.Xb(45,102,"labellingArea.subLabel")),u.xb(4),u.qc("",u.Xb(49,104,"labellingArea.label"),": "),u.xb(4),u.ac("ngForOf",e.tabStatus),u.xb(2),u.qc("",u.Xb(55,106,"labellingArea.regionInfo"),": "),u.xb(2),u.ac("value",e.subLabelRegionVal)("placeholder",u.Xb(57,108,"labellingArea.subRegionInfo")),u.xb(3),u.qc(" ",u.Xb(60,110,"labellingArea.add")," "),u.xb(2),u.ac("ngIf",e.subLabelValidateMsg),u.xb(2),u.ac("ngForOf",e.tabStatus),u.xb(1),u.ac("id",e.modalExportOptions)("modalBodyStyle",e.exportModalBodyStyle)("modalTitle",u.Xb(65,112,"exportModal.exportOptions"))("scrollable",!1),u.xb(5),u.qc(" ",u.Xb(70,114,"exportModal.configFile")," "),u.xb(3),u.qc(" ",u.Xb(73,116,"exportModal.zipFile")," "),u.xb(4),u.pc(u.Xb(77,118,"exportModal.withData")),u.xb(6),u.qc("",u.Xb(83,120,"configFileInfoTitle"),":"),u.xb(3),u.pc(u.Xb(86,122,"configFileInfoDest1")),u.xb(3),u.pc(u.Xb(89,124,"configFileInfoDest2")),u.xb(2),u.ac("id",e.modalShortcutKeyInfo)("modalBodyStyle",e.infoModalBodyStyle)("scrollable",!0),u.xb(2),u.pc(u.Xb(93,126,"info.header")),u.xb(4),u.ac("ngForOf",e.shortcutKeyInfo()),u.xb(1),u.ac("id",e.modalExportProject)("modalBodyStyle",e.exportProjectBodyStyle)("modalTitle",u.Xb(98,128,"exportTitle"))("scrollable",!1),u.xb(5),u.ac("ngIf",e.modalSpanLocationPath.trim()),u.xb(1),u.ac("ngClass",e.spanClass),u.xb(1),u.ac("innerHTML",e.modalSpanMessage,u.ic),u.xb(1),u.ac("id",e.modalExportWarning)("modalBodyStyle",e.exportWarningBodyStyle)("modalTitle",u.Xb(106,130,"exportTitle"))("scrollable",!1)("zIndex",2),u.xb(6),u.pc(u.Xb(112,132,e.warningMessage)),u.xb(2),u.ac("id",e.modalRenameImage)("modalBodyStyle",e.renameImageBodyStyle)("modalTitle",u.Xb(114,134,"renameModal.renameImg"))("scrollable",!1),u.xb(4),u.qc("",u.Xb(118,136,"renameModal.imageName"),": "),u.xb(2),u.ac("value",e.newImageName)("placeholder",u.Xb(121,138,"renameModal.typeNewName")),u.xb(5),u.ac("ngIf",1===e.renameImageErrorCode),u.xb(1),u.ac("ngIf",2===e.renameImageErrorCode),u.xb(2),u.qc(" ",u.Xb(128,140,"renameModal.submit")," "),u.xb(2),u.ac("_modalUnsupportedImage",e.modalUnsupportedImage)("_unsupportedImageBodyStyle",e.unsupportedImageBodyStyle)("_unsupportedImageList",e.unsupportedImageList),u.xb(1),u.ac("_loading",e.isLoading),u.xb(1),u.ac("_processingNum",e.processingNum))},directives:[B.a,W,ft,i.k,Ft,Wt,Yt,Vt.a,i.j,i.i,Zt.a,Ht.a,te,pe,Pe,yt.j,yt.m],pipes:[E.c],styles:['.layout-container[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.content-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;min-width:97.8vw;max-width:97.8vw}.modal-button[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw;background:#262a2e;color:azure}.close-button[_ngcontent-%COMP%]{border:none;cursor:pointer}.float-right[_ngcontent-%COMP%]{float:right}.font-title[_ngcontent-%COMP%]{font-size:1.7vw}.font-label[_ngcontent-%COMP%]{line-height:4vh;font-size:1vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.main-label-container[_ngcontent-%COMP%]{min-width:35vw;max-width:35vw}.main-label-container[_ngcontent-%COMP%], .sub-label-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.sub-label-container[_ngcontent-%COMP%]{min-width:40vw;max-width:40vw}.sub-label-flex-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1 1 100%;min-width:0}.static-select[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;min-width:10vw;max-width:10vw;line-height:3vh;font-size:.9vw;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:5vh;margin:0;-moz-text-align-last:center;text-align-last:center;background:#262a2e;color:#fff;box-shadow:inset -.5vw 6.25vw 1vw 0 rgba(0,0,0,.2),inset -.5vw -.5vw 1vw 0 hsla(0,0%,100%,.4)}.static-select[_ngcontent-%COMP%]:hover{box-shadow:inset -.375vw -.375vw .625vw 0 rgba(0,0,0,.2),inset .375vw .375vw .625vw 0 hsla(0,0%,100%,.5)}.static-select[_ngcontent-%COMP%]:active{box-shadow:inset .375vw .375vw .625vw 0 rgba(0,0,0,.2),inset -.375vw -.375vw .625vw 0 hsla(0,0%,100%,.5)}.static-input[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;min-width:10vw;max-width:10vw;line-height:3vh;font-size:.9vw;border-radius:2vw;border:none;outline:none;background-color:#363636;color:#fff;padding:0 1vw}.hr-line[_ngcontent-%COMP%]{margin:5vh 0}.sub-label-padding[_ngcontent-%COMP%]{padding:0 0 2vh}.validate-msg[_ngcontent-%COMP%]{color:red;padding:5vh 0 0;font-size:1vw}.flex-first[_ngcontent-%COMP%]{flex:1 1 35%}.flex-second[_ngcontent-%COMP%]{flex:1 1 55%}.flex-third[_ngcontent-%COMP%]{flex:0 0 5%}.flex-fourth[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw;background:#262a2e;color:azure;flex:0 0 5%}.modal[_ngcontent-%COMP%]{z-index:1000;padding-top:10vh;top:0;width:100%;height:100%;overflow:auto;background-color:transparent;scrollbar-width:none;position:fixed;background:rgba(0,0,0,.8)}.modal-content[_ngcontent-%COMP%]{background-color:#525353;padding:1vw;max-width:20vw;min-width:20vw;border-radius:1vw;margin:15vh auto auto}.modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.modal-content-header[_ngcontent-%COMP%]{text-align:center;color:#fff;font-size:3vh}.modal-button-container[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:1vw 1vw 1vw 2vw}.modal-button-cancel[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.export-content-container[_ngcontent-%COMP%]{margin-left:.5vw}.button-style[_ngcontent-%COMP%]{border-radius:1vh;border:none;outline:none;color:#fff;cursor:pointer}.confg-btn[_ngcontent-%COMP%]{margin-right:.7vw}.confg-btn[_ngcontent-%COMP%], .confgdata-btn[_ngcontent-%COMP%]{padding:1vh .5vw;background-color:#2d8ceb;font-size:2vh;min-width:7.5vw}.cancel-btn[_ngcontent-%COMP%], .with-data[_ngcontent-%COMP%]{font-size:1.5vh}.cancel-btn[_ngcontent-%COMP%]{padding:1vh 1vw;background-color:#444}.error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.help-icon[_ngcontent-%COMP%]{height:3vh}.help-icon-container[_ngcontent-%COMP%]{padding-right:1vw;padding-left:.4vw}.help-icon-container[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:15vw;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:65%;margin-left:-60px;text-align:justify;text-justify:inter-word}.help-icon-container[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible}.message[_ngcontent-%COMP%]{font-size:1vw;overflow-wrap:break-word}.modal-message-container[_ngcontent-%COMP%]{padding-right:3.5vw}.break[_ngcontent-%COMP%]{overflow-wrap:break-word}.save-format-list[_ngcontent-%COMP%]{left:0;top:0;width:100%;height:100%;overflow:auto}.save-format-content[_ngcontent-%COMP%]{margin:auto;padding:10px}.switch-container[_ngcontent-%COMP%]{font-size:small;align-content:center;text-align:center}.switch[_ngcontent-%COMP%]{position:relative;display:inline-block;width:4em;height:1.8em;margin-left:auto;margin-right:auto}.switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.switch[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background:#000;background-size:100% 100%;background-position:50%}.switch[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{transform:translateX(2.2em)}.switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.8s}.switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:1.6em;width:1.6em;left:.14em;bottom:.15em;background-color:snow;transition:.8s}.switch[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]{border-radius:1.2em}.switch[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]:before{border-radius:50%}.switch[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-top:8px;margin-top:.5em;outline:none}.switch-2[_ngcontent-%COMP%]{position:relative;display:inline-block;width:2.5em;height:1.2em;margin-left:auto;margin-right:auto}.switch-2[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.switch-2[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background:#000;background-size:100% 100%;background-position:50%}.switch-2[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{transform:translateX(1.5em)}.switch-2[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.5s}.switch-2[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:1.2em;width:1.2em;left:.14em;background-color:snow;transition:.5s}.switch-2[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]{border-radius:1.2em}.switch-2[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]:before{border-radius:50%}.switch-2[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-top:8px;margin-top:.5em;outline:none}.no-margin-left[_ngcontent-%COMP%]{margin-left:0}.space-verticle[_ngcontent-%COMP%]{background-color:transparent;outline:none;border:none;margin-left:1.5em;margin-right:1.5em}.save-format-btn[_ngcontent-%COMP%]{width:90%;height:6em;margin-top:2%;margin-bottom:2%;margin-left:4.5%;background:#000;background-size:100% 100%;background-position:50%;font-size:medium;outline:none;border:none;color:snow;overflow:hidden;border-radius:5px}.save-format-btn[_ngcontent-%COMP%]:hover{text-shadow:0 0 30px #888;box-shadow:5px 5px 10px #888,-5px -5px 10px #888;cursor:pointer}.save-format-btn[_ngcontent-%COMP%]:active:hover{border:3px dashed green}.adv-settings[_ngcontent-%COMP%]{padding:1vh;margin:1vh 1.5vw;color:#ccc;font-size:.6vw;cursor:pointer;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;background:#30353a;border-radius:.5vh;float:right}.adv-settings[_ngcontent-%COMP%]:hover{background:#373d42}.modal-adv-container[_ngcontent-%COMP%]{margin:1vh 1vw}.modal-adv-instruction[_ngcontent-%COMP%]{color:#fff;opacity:.5}.modal-adv-label[_ngcontent-%COMP%]{font-size:1.5vh;margin-left:2vw;white-space:nowrap;width:9vw;overflow:hidden;text-overflow:ellipsis;display:inline-block}.modal-adv-btn[_ngcontent-%COMP%]{float:right;padding:.5vh 1vw;background-color:#2d8ceb;font-size:1.5vh;min-width:3vw}.shortcut-key-info-header[_ngcontent-%COMP%]{font-size:1.2vw;color:#fff;text-align:center;margin-bottom:2vh}.table-box[_ngcontent-%COMP%]{width:100%;height:90%;overflow-y:auto}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%], td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{border-collapse:collapse;text-align:center;color:#fff}th[_ngcontent-%COMP%]{top:0;background:#262a2e;color:#fff;border-top:none!important}tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){color:#bebebe}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{width:60px;text-align:center;background:#262a2e}.validation-error[_ngcontent-%COMP%]{margin:1px;color:red}.validation-success[_ngcontent-%COMP%]{margin:1px;color:green}.label[_ngcontent-%COMP%]{color:#fff;font-size:2vh;margin-right:1vw}.label-file[_ngcontent-%COMP%]{padding-top:.5vh}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:.5vh}.renameimg-btn[_ngcontent-%COMP%]{padding:1vh .5vw;background-color:#2d8ceb;margin-top:.7vw;margin-right:.7vw;font-size:2vh;min-width:7.5vw;float:right}']}),t})()}];let Qe=(()=>{class t{}return t.\u0275mod=u.Fb({type:t}),t.\u0275inj=u.Eb({factory:function(e){return new(e||t)},imports:[[b.d.forChild(qe)]]}),t})();var tn=n("KZX/");let en=(()=>{class t{}return t.\u0275mod=u.Fb({type:t}),t.\u0275inj=u.Eb({factory:function(e){return new(e||t)},imports:[[i.b,tn.a,E.b]]}),t})();var nn=n("RKnZ"),an=n("O+1G");let on=(()=>{class t{}return t.\u0275mod=u.Fb({type:t}),t.\u0275inj=u.Eb({factory:function(e){return new(e||t)},imports:[[i.b,tn.a,E.b,Qe,nn.a,b.d,an.a,en]]}),t})()},xOOu:function(t,e,n){t.exports=function t(e,n,i){function a(s,r){if(!n[s]){if(!e[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};e[s][0].call(c.exports,function(t){return a(e[s][1][t]||t)},c,c.exports,t,e,n,i)}return n[s].exports}for(var o=!1,s=0;s>4,r=1>6:64,l=2>2)+o.charAt(s)+o.charAt(r)+o.charAt(l));return c.join("")},n.decode=function(t){var e,n,i,s,r,l,c=0,h=0,d="data:";if(t.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var u,b=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&b--,t.charAt(t.length-2)===o.charAt(64)&&b--,b%1!=0)throw new Error("Invalid base64 input, bad content length.");for(u=a.uint8array?new Uint8Array(0|b):new Array(0|b);c>4,n=(15&s)<<4|(r=o.indexOf(t.charAt(c++)))>>2,i=(3&r)<<6|(l=o.indexOf(t.charAt(c++))),u[h++]=e,64!==r&&(u[h++]=n),64!==l&&(u[h++]=i);return u}},{"./support":30,"./utils":32}],2:[function(t,e,n){"use strict";var i=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/DataLengthProbe"),s=t("./stream/Crc32Probe");function r(t,e,n,i,a){this.compressedSize=t,this.uncompressedSize=e,this.crc32=n,this.compression=i,this.compressedContent=a}o=t("./stream/DataLengthProbe"),r.prototype={getContentWorker:function(){var t=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},r.createWorkerFrom=function(t,e,n){return t.pipe(new s).pipe(new o("uncompressedSize")).pipe(e.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=r},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,n){"use strict";var i=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,n){"use strict";var i=t("./utils"),a=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,n,i){var o=a,s=0+n;t^=-1;for(var r=0;r>>8^o[255&(t^e[r])];return-1^t}(0|e,t,t.length):function(t,e,n,i){var o=a,s=0+n;t^=-1;for(var r=0;r>>8^o[255&(t^e.charCodeAt(r))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,e,n){"use strict";var i;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,a=t("pako"),o=t("./utils"),s=t("./stream/GenericWorker"),r=i?"uint8array":"array";function l(t,e){s.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}n.magic="\b\0",o.inherits(l,s),l.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(r,t.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},n.compressWorker=function(t){return new l("Deflate",t)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,n){"use strict";function i(t,e){var n,i="";for(n=0;n>>=8;return i}function a(t,e,n,a,s,h){var d,u,b=t.file,g=t.compression,f=h!==r.utf8encode,m=o.transformTo("string",h(b.name)),p=o.transformTo("string",r.utf8encode(b.name)),_=b.comment,v=o.transformTo("string",h(_)),y=o.transformTo("string",r.utf8encode(_)),x=p.length!==b.name.length,w=y.length!==_.length,S="",C="",M="",k=b.dir,P=b.date,O={crc32:0,compressedSize:0,uncompressedSize:0};e&&!n||(O.crc32=t.crc32,O.compressedSize=t.compressedSize,O.uncompressedSize=t.uncompressedSize);var L=0;e&&(L|=8),f||!x&&!w||(L|=2048);var I=0,A=0;k&&(I|=16),"UNIX"===s?(A=798,I|=function(t,e){var n=t;return t||(n=e?16893:33204),(65535&n)<<16}(b.unixPermissions,k)):(A=20,I|=function(t){return 63&(t||0)}(b.dosPermissions)),d=P.getUTCHours(),d<<=6,d|=P.getUTCMinutes(),d<<=5,d|=P.getUTCSeconds()/2,u=P.getUTCFullYear()-1980,u<<=4,u|=P.getUTCMonth()+1,u<<=5,u|=P.getUTCDate(),x&&(C=i(1,1)+i(l(m),4)+p,S+="up"+i(C.length,2)+C),w&&(M=i(1,1)+i(l(v),4)+y,S+="uc"+i(M.length,2)+M);var B="";return B+="\n\0",B+=i(L,2),B+=g.magic,B+=i(d,2),B+=i(u,2),B+=i(O.crc32,4),B+=i(O.compressedSize,4),B+=i(O.uncompressedSize,4),B+=i(m.length,2),B+=i(S.length,2),{fileRecord:c.LOCAL_FILE_HEADER+B+m+S,dirRecord:c.CENTRAL_FILE_HEADER+i(A,2)+B+i(v.length,2)+"\0\0\0\0"+i(I,4)+i(a,4)+m+S+v}}var o=t("../utils"),s=t("../stream/GenericWorker"),r=t("../utf8"),l=t("../crc32"),c=t("../signature");function h(t,e,n,i){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=n,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(h,s),h.prototype.push=function(t){var e=t.meta.percent||0,n=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:n?(e+100*(n-i-1))/n:100}}))},h.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var n=a(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,n=a(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),e)this.push({data:function(t){return c.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)n=(n<<8)+this.byteAt(e);return this.index+=t,n},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=a},{"../utils":32}],19:[function(t,e,n){"use strict";var i=t("./Uint8ArrayReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,n){"use strict";var i=t("./DataReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},a.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},a.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},a.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,e,n){"use strict";var i=t("./ArrayReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,n){"use strict";var i=t("../utils"),a=t("../support"),o=t("./ArrayReader"),s=t("./StringReader"),r=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||a.uint8array?"nodebuffer"===e?new r(t):a.uint8array?new l(i.transformTo("uint8array",t)):new o(i.transformTo("array",t)):new s(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,n){"use strict";n.LOCAL_FILE_HEADER="PK\x03\x04",n.CENTRAL_FILE_HEADER="PK\x01\x02",n.CENTRAL_DIRECTORY_END="PK\x05\x06",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,e,n){"use strict";var i=t("./GenericWorker"),a=t("../utils");function o(t){i.call(this,"ConvertWorker to "+t),this.destType=t}a.inherits(o,i),o.prototype.processChunk=function(t){this.push({data:a.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,n){"use strict";var i=t("./GenericWorker"),a=t("../crc32");function o(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,i),o.prototype.processChunk=function(t){this.streamInfo.crc32=a(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./GenericWorker");function o(t){a.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(o,a),o.prototype.processChunk=function(t){t&&(this.streamInfo[this.propName]=(this.streamInfo[this.propName]||0)+t.data.length),a.prototype.processChunk.call(this,t)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./GenericWorker");function o(t){a.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}i.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,n){"use strict";function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var n=0;n "+t:t}},e.exports=i},{}],29:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),s=t("../base64"),r=t("../support"),l=t("../external"),c=null;if(r.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function h(t,e,n){var s=e;switch(e){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=e,this._mimeType=n,i.checkSupport(s),this._worker=t.pipe(new a(s)),t.lock()}catch(t){this._worker=new o("error"),this._worker.error(t)}}h.prototype={accumulate:function(t){return function(t,e){return new l.Promise(function(n,a){var o=[],r=t._internalType,l=t._outputType,c=t._mimeType;t.on("data",function(t,n){o.push(t),e&&e(n)}).on("error",function(t){o=[],a(t)}).on("end",function(){try{var t=function(t,e,n){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),n);case"base64":return s.encode(e);default:return i.transformTo(t,e)}}(l,function(t,e){var n,i=0,a=null,o=0;for(n=0;n>>6:(n<65536?e[s++]=224|n>>>12:(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63),e[s++]=128|n>>>6&63),e[s++]=128|63&n);return e}(t)},n.utf8decode=function(t){return a.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,n,a,o,s=t.length,l=new Array(2*s);for(e=n=0;e>10&1023,l[n++]=56320|1023&a)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),i.applyFromCharCode(l)}(t=i.transformTo(a.uint8array?"uint8array":"array",t))},i.inherits(c,s),c.prototype.processChunk=function(t){var e=i.transformTo(a.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var s=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+r[t[n]]>e?n:e}(e),l=e;s!==e.length&&(a.uint8array?(l=e.subarray(0,s),this.leftOver=e.subarray(s,e.length)):(l=e.slice(0,s),this.leftOver=e.slice(s,e.length))),this.push({data:n.utf8decode(l),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,i.inherits(h,s),h.prototype.processChunk=function(t){this.push({data:n.utf8encode(t.data),meta:t.meta})},n.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var i=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),s=t("set-immediate-shim"),r=t("./external");function l(t){return t}function c(t,e){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,n,i,a=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(n<65536?e[s++]=224|n>>>12:(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63),e[s++]=128|n>>>6&63),e[s++]=128|63&n);return e},n.buf2binstring=function(t){return l(t,t.length)},n.binstring2buf=function(t){for(var e=new i.Buf8(t.length),n=0,a=e.length;n>10&1023,c[i++]=56320|1023&a)}return l(c,i)},n.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+s[t[n]]>e?n:e}},{"./common":41}],43:[function(t,e,n){"use strict";e.exports=function(t,e,n,i){for(var a=65535&t|0,o=t>>>16&65535|0,s=0;0!==n;){for(n-=s=2e3>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e,n,a){var o=i,s=a+n;t^=-1;for(var r=a;r>>8^o[255&(t^e[r])];return-1^t}},{}],46:[function(t,e,n){"use strict";var i,a=t("../utils/common"),o=t("./trees"),s=t("./adler32"),r=t("./crc32"),l=t("./messages"),c=-2,h=258,d=262,u=113;function b(t,e){return t.msg=l[e],e}function g(t){return(t<<1)-(4t.avail_out&&(n=t.avail_out),0!==n&&(a.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function p(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,m(t.strm)}function _(t,e){t.pending_buf[t.pending++]=e}function v(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function y(t,e){var n,i,a=t.max_chain_length,o=t.strstart,s=t.prev_length,r=t.nice_match,l=t.strstart>t.w_size-d?t.strstart-(t.w_size-d):0,c=t.window,u=t.w_mask,b=t.prev,g=t.strstart+h,f=c[o+s-1],m=c[o+s];t.prev_length>=t.good_match&&(a>>=2),r>t.lookahead&&(r=t.lookahead);do{if(c[(n=e)+s]===m&&c[n+s-1]===f&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&ol&&0!=--a);return s<=t.lookahead?s:t.lookahead}function x(t){var e,n,i,o,l,c,h,u,b,g,f=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-d)){for(a.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=n=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--n;);for(e=n=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--n;);o+=f}if(0===t.strm.avail_in)break;if(h=t.window,u=t.strstart+t.lookahead,g=void 0,(b=o)<(g=(c=t.strm).avail_in)&&(g=b),n=0===g?0:(c.avail_in-=g,a.arraySet(h,c.input,c.next_in,g,u),1===c.state.wrap?c.adler=s(c.adler,h,g,u):2===c.state.wrap&&(c.adler=r(c.adler,h,g,u)),c.next_in+=g,c.total_in+=g,g),t.lookahead+=n,t.lookahead+t.insert>=3)for(t.ins_h=t.window[l=t.strstart-t.insert],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(i=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3&&t.match_length<=t.prev_length){for(a=t.strstart+t.lookahead-3,i=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=a&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(x(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+n;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,p(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-d&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&p(t,!1),1)}),new C(4,4,8,4,w),new C(4,5,16,8,w),new C(4,6,32,32,w),new C(4,4,16,16,S),new C(8,16,32,32,S),new C(8,16,128,128,S),new C(8,32,128,256,S),new C(32,128,258,1024,S),new C(32,258,258,4096,S)],n.deflateInit=function(t,e){return O(t,e,8,15,8,0)},n.deflateInit2=O,n.deflateReset=P,n.deflateResetKeep=k,n.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},n.deflate=function(t,e){var n,a,s,l;if(!t||!t.state||5>8&255),_(a,a.gzhead.time>>16&255),_(a,a.gzhead.time>>24&255),_(a,9===a.level?2:2<=a.strategy||a.level<2?4:0),_(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(_(a,255&a.gzhead.extra.length),_(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=r(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69):(_(a,0),_(a,0),_(a,0),_(a,0),_(a,0),_(a,9===a.level?2:2<=a.strategy||a.level<2?4:0),_(a,3),a.status=u);else{var d=8+(a.w_bits-8<<4)<<8;d|=(2<=a.strategy||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(d|=32),d+=31-d%31,a.status=u,v(a,d),0!==a.strstart&&(v(a,t.adler>>>16),v(a,65535&t.adler)),t.adler=1}if(69===a.status)if(a.gzhead.extra){for(s=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>s&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),m(t),s=a.pending,a.pending!==a.pending_buf_size));)_(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>s&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=73)}else a.status=73;if(73===a.status)if(a.gzhead.name){s=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>s&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),m(t),s=a.pending,a.pending===a.pending_buf_size)){l=1;break}l=a.gzindexs&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),0===l&&(a.gzindex=0,a.status=91)}else a.status=91;if(91===a.status)if(a.gzhead.comment){s=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>s&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),m(t),s=a.pending,a.pending===a.pending_buf_size)){l=1;break}l=a.gzindexs&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),0===l&&(a.status=103)}else a.status=103;if(103===a.status&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&m(t),a.pending+2<=a.pending_buf_size&&(_(a,255&t.adler),_(a,t.adler>>8&255),t.adler=0,a.status=u)):a.status=u),0!==a.pending){if(m(t),0===t.avail_out)return a.last_flush=-1,0}else if(0===t.avail_in&&g(e)<=g(n)&&4!==e)return b(t,-5);if(666===a.status&&0!==t.avail_in)return b(t,-5);if(0!==t.avail_in||0!==a.lookahead||0!==e&&666!==a.status){var y=2===a.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(x(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}(a,e):3===a.strategy?function(t,e){for(var n,i,a,s,r=t.window;;){if(t.lookahead<=h){if(x(t),t.lookahead<=h&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(n=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}(a,e):i[a.level].func(a,e);if(3!==y&&4!==y||(a.status=666),1===y||3===y)return 0===t.avail_out&&(a.last_flush=-1),0;if(2===y&&(1===e?o._tr_align(a):5!==e&&(o._tr_stored_block(a,0,0,!1),3===e&&(f(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),m(t),0===t.avail_out))return a.last_flush=-1,0}return 4!==e?0:a.wrap<=0?1:(2===a.wrap?(_(a,255&t.adler),_(a,t.adler>>8&255),_(a,t.adler>>16&255),_(a,t.adler>>24&255),_(a,255&t.total_in),_(a,t.total_in>>8&255),_(a,t.total_in>>16&255),_(a,t.total_in>>24&255)):(v(a,t.adler>>>16),v(a,65535&t.adler)),m(t),0=n.w_size&&(0===r&&(f(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new a.Buf8(n.w_size),a.arraySet(u,e,b-n.w_size,n.w_size,0),e=u,b=n.w_size),l=t.avail_in,h=t.next_in,d=t.input,t.avail_in=b,t.next_in=0,t.input=e,x(n);n.lookahead>=3;){for(i=n.strstart,o=n.lookahead-2;n.ins_h=(n.ins_h<>>=y=v>>>24,g-=y,0==(y=v>>>16&255))k[o++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=f[(65535&v)+(b&(1<>>=y,g-=y),g<15&&(b+=M[i++]<>>=y=v>>>24,g-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=m[(65535&v)+(b&(1<>>=y,g-=y,(y=o-s)>3,b&=(1<<(g-=x<<3))-1,t.next_in=i,t.next_out=o,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(t){var e;return t&&t.state?(t.total_in=t.total_out=(e=t.state).total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):l}function u(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,d(t)):l}function b(t,e){var n,i;return t&&t.state?(i=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=s.wsize?(i.arraySet(s.window,e,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(a<(o=s.wsize-s.wnext)&&(o=a),i.arraySet(s.window,e,n-a,o,s.wnext),(a-=o)?(i.arraySet(s.window,e,n-a,a,0),s.wnext=a,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,n.check=o(n.check,T,2,0),p=m=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",n.mode=30;break}if(p-=4,A=8+(15&(m>>>=4)),0===n.wbits)n.wbits=A;else if(A>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(T[0]=255&m,T[1]=m>>>8&255,n.check=o(n.check,T,2,0)),p=m=0,n.mode=3;case 3:for(;p<32;){if(0===g)break t;g--,m+=h[u++]<>>8&255,T[2]=m>>>16&255,T[3]=m>>>24&255,n.check=o(n.check,T,4,0)),p=m=0,n.mode=4;case 4:for(;p<16;){if(0===g)break t;g--,m+=h[u++]<>8),512&n.flags&&(T[0]=255&m,T[1]=m>>>8&255,n.check=o(n.check,T,2,0)),p=m=0,n.mode=5;case 5:if(1024&n.flags){for(;p<16;){if(0===g)break t;g--,m+=h[u++]<>>8&255,n.check=o(n.check,T,2,0)),p=m=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(g<(w=n.length)&&(w=g),w&&(n.head&&(A=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,h,u,w,A)),512&n.flags&&(n.check=o(n.check,h,w,u)),g-=w,u+=w,n.length-=w),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===g)break t;for(w=0;A=h[u+w++],n.head&&A&&n.length<65536&&(n.head.name+=String.fromCharCode(A)),A&&w>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;p<32;){if(0===g)break t;g--,m+=h[u++]<>>=7&p,p-=7&p,n.mode=27;break}for(;p<3;){if(0===g)break t;g--,m+=h[u++]<>>=1)){case 0:n.mode=14;break;case 1:if(_(n),n.mode=20,6!==e)break;m>>>=2,p-=2;break t;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}m>>>=2,p-=2;break;case 14:for(m>>>=7&p,p-=7&p;p<32;){if(0===g)break t;g--,m+=h[u++]<>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,p=m=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(w=n.length){if(g>>=5)),p-=5,n.ncode=4+(15&(m>>>=5)),m>>>=4,p-=4,286>>=3,p-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B=r(0,n.lens,0,19,n.lencode,0,n.work,j={bits:n.lenbits}),n.lenbits=j.bits,B){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,P=65535&z,!((M=z>>>24)<=p);){if(0===g)break t;g--,m+=h[u++]<>>=M,p-=M,n.lens[n.have++]=P;else{if(16===P){for(E=M+2;p>>=M,p-=M,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}A=n.lens[n.have-1],w=3+(3&m),m>>>=2,p-=2}else if(17===P){for(E=M+3;p>>=M)),m>>>=3,p-=3}else{for(E=M+7;p>>=M)),m>>>=7,p-=7}if(n.have+w>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;w--;)n.lens[n.have++]=A}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,B=r(1,n.lens,0,n.nlen,n.lencode,0,n.work,j={bits:n.lenbits}),n.lenbits=j.bits,B){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,B=r(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,j={bits:n.distbits}),n.distbits=j.bits,B){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(6<=g&&258<=f){t.next_out=b,t.avail_out=f,t.next_in=u,t.avail_in=g,n.hold=m,n.bits=p,s(t,x),b=t.next_out,d=t.output,f=t.avail_out,u=t.next_in,h=t.input,g=t.avail_in,m=n.hold,p=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;k=(z=n.lencode[m&(1<>>16&255,P=65535&z,!((M=z>>>24)<=p);){if(0===g)break t;g--,m+=h[u++]<>O)])>>>16&255,P=65535&z,!(O+(M=z>>>24)<=p);){if(0===g)break t;g--,m+=h[u++]<>>=O,p-=O,n.back+=O}if(m>>>=M,p-=M,n.back+=M,n.length=P,0===k){n.mode=26;break}if(32&k){n.back=-1,n.mode=12;break}if(64&k){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&k,n.mode=22;case 22:if(n.extra){for(E=n.extra;p>>=n.extra,p-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;k=(z=n.distcode[m&(1<>>16&255,P=65535&z,!((M=z>>>24)<=p);){if(0===g)break t;g--,m+=h[u++]<>O)])>>>16&255,P=65535&z,!(O+(M=z>>>24)<=p);){if(0===g)break t;g--,m+=h[u++]<>>=O,p-=O,n.back+=O}if(m>>>=M,p-=M,n.back+=M,64&k){t.msg="invalid distance code",n.mode=30;break}n.offset=P,n.extra=15&k,n.mode=24;case 24:if(n.extra){for(E=n.extra;p>>=n.extra,p-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===f)break t;if(n.offset>(w=x-f)){if((w=n.offset-w)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}S=w>n.wnext?n.wsize-(w-=n.wnext):n.wnext-w,w>n.length&&(w=n.length),C=n.window}else C=d,S=b-n.offset,w=n.length;for(f_?(y=D[N+d[C]],j[E+d[C]]):(y=96,0),b=1<>L)+(g-=b)]=v<<24|y<<16|x|0,0!==g;);for(b=1<>=1;if(0!==b?(B&=b-1,B+=b):B=0,C++,0==--z[S]){if(S===k)break;S=e[n+d[C]]}if(P>>7)]}function x(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function w(t,e,n){t.bi_valid>16-n?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<>>=1,n<<=1,0<--e;);return n>>>1}function M(t,e,n){var i,a,o=new Array(16),s=0;for(i=1;i<=15;i++)o[i]=s=s+n[i-1]<<1;for(a=0;a<=e;a++){var r=t[2*a+1];0!==r&&(t[2*a]=C(o[r]++,r))}}function k(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function P(t){8>1;1<=n;n--)L(t,o,n);for(a=l;n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],L(t,o,1),i=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=i,o[2*a]=o[2*n]+o[2*i],t.depth[a]=(t.depth[n]>=t.depth[i]?t.depth[n]:t.depth[i])+1,o[2*n+1]=o[2*i+1]=a,t.heap[1]=a++,L(t,o,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,i,a,o,s,r,l=e.dyn_tree,c=e.max_code,h=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,b=e.stat_desc.extra_base,g=e.stat_desc.max_length,f=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(l[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<573;n++)g<(o=l[2*l[2*(i=t.heap[n])+1]+1]+1)&&(o=g,f++),l[2*i+1]=o,c>=7;i<30;i++)for(p[i]=a<<7,t=0;t<1<>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),A(t,t.l_desc),A(t,t.d_desc),s=function(t){var e;for(B(t,t.dyn_ltree,t.l_desc.max_code),B(t,t.dyn_dtree,t.d_desc.max_code),A(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),(o=t.static_len+3+7>>>3)<=(a=t.opt_len+3+7>>>3)&&(a=o)):a=o=n+5,n+4<=a&&-1!==e?z(t,e,n,i):4===t.strategy||o===a?(w(t,2+(i?1:0),3),I(t,c,h)):(w(t,4+(i?1:0),3),function(t,e,n,i){var a;for(w(t,e-257,5),w(t,n-1,5),w(t,i-4,4),a=0;a>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(u[n]+256+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},n._tr_align=function(t){w(t,2,3),S(t,256,c),function(t){16===t.bi_valid?(x(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){"use strict";e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}}]); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/2-es2015.8c5209b5d9403bcb122b.js b/classifai-core/src/main/resources/webroot/2-es2015.8c5209b5d9403bcb122b.js deleted file mode 100644 index 269718526..000000000 --- a/classifai-core/src/main/resources/webroot/2-es2015.8c5209b5d9403bcb122b.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{i5u5:function(t,e,n){"use strict";n.r(e),n.d(e,"ImageLabellingLayoutModule",function(){return tn});var i=n("ofXK"),a=n("mrSG"),o=n("5+tZ"),s=n("SxV6"),r=n("1G5W"),l=n("XNiG"),c=n("cp0P"),h=n("l5mm"),d=n("z6cu"),u=n("fXoL"),b=n("tyNb"),g=n("/uUt"),f=n("cxbk"),m=n("tk/3"),p=n("14na");let _=(()=>{class t{constructor(t,e,n){this.http=t,this.mode=e,this.router=n,this.hostPort=f.a.baseURL,this.imageLabellingMode=null,this.getBase64Thumbnail=(t,e)=>this.http.get(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/uuid/${e}/imgsrc`),this.updateLabelList=(t,e)=>this.http.put(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/newlabels`,{label_list:e}),this.updateProjectProgress=(t,e,n)=>this.http.put(`${this.hostPort}${this.imageLabellingMode}/projects/${t}/uuid/${e}/update`,Object.assign({},n)),this.exportProject=(t,e)=>this.http.put(`${this.hostPort}v2/${this.imageLabellingMode}/projects/${t}/export/${e}`,{newprojectid:t}),this.reloadProject=t=>this.http.put(`${this.hostPort}v2/${this.imageLabellingMode}/projects/${t}/reload`,{newprojectid:t}),this.reloadProjectStatus=t=>this.http.get(`${this.hostPort}v2/${this.imageLabellingMode}/projects/${t}/reloadstatus`),this.mode.imgLabelMode$.pipe(Object(g.a)()).subscribe(t=>t?this.imageLabellingMode=t:this.router.navigate(["/"]))}checkIfBboxMetaType(t){return Array.isArray(t)?void 0!==t[0].bnd_box:void 0!==t.bnd_box}exportProjectStatus(){return this.http.get(`${this.hostPort}v2/${this.imageLabellingMode}/projects/exportstatus`)}}return t.\u0275fac=function(e){return new(e||t)(u.Qb(m.b),u.Qb(p.a),u.Qb(b.a))},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();var v=n("1F7/"),y=n("LY9J"),x=n("2Vo4");const w={annotation:-1,isDlbClick:!1};let S=(()=>{class t{constructor(){this.labelStateSubject=new x.a(w),this.labelStaging$=this.labelStateSubject.asObservable(),this.setState=t=>{this.labelStateSubject.next(t?Object.assign(Object.assign({},w),t):w)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();const C={scroll:!1,drag:!1,draw:!1,fitCenter:!1,clear:!1,isActiveModal:!1,save:!1,keyInfo:!1};let M=(()=>{class t{constructor(){this.actionSubject=new x.a(C),this.action$=this.actionSubject.asObservable(),this.setState=t=>{this.actionSubject.next(t?Object.assign(Object.assign({},C),t):C)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})(),k=(()=>{class t{constructor(t){this._imgLblApiService=t,this.getRouteState=t=>{const{state:e}=t;return Object.assign({},e)},this.displayLabelList=(t,e)=>t.map(t=>t.label_list?Object.assign(Object.assign({},t),{label_list:e}):t),this.calculateIndex=(t,e,n)=>{let i=e;return 1===t?i>=n-1?n-1:i+=1:i<=0?0:e-=1},this.checkAnnotationMetadataProp=({bnd_box:t,polygons:e})=>null!=t?t:e,this.changeAnnotationLabel=(t,{label:e,index:n})=>t.map(t=>t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(t=>{var{bnd_box:i,polygons:o}=t,s=Object(a.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},s),{bnd_box:null==i?void 0:i.map((t,i)=>i===n?Object.assign(Object.assign({},t),{label:e}):t),polygons:null==o?void 0:o.map((t,i)=>i===n?Object.assign(Object.assign({},t),{label:e}):t)})})}):t),this.deleteAnnotation=(t,e)=>t.map(t=>t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(t=>{var{bnd_box:n,polygons:i}=t,o=Object(a.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},o),{bnd_box:null==n?void 0:n.filter((t,n)=>n!==e),polygons:null==i?void 0:i.filter((t,n)=>n!==e)})})}):t),this.submitLabel=(t,e,n,{mainLabelRegion:i,subLabelRegion:o})=>t.map(t=>t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(t=>{var{bnd_box:s,polygons:r}=t,l=Object(a.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},l),{bnd_box:null==s?void 0:s.map((t,a)=>a===n?Object.assign(Object.assign({},t),{region:i,subLabel:t.subLabel&&t.subLabel.length>0?[...t.subLabel,{label:e,region:o}]:[{label:e,region:o}]}):t),polygons:null==r?void 0:r.map((t,a)=>a===n?Object.assign(Object.assign({},t),{region:i,subLabel:t.subLabel&&t.subLabel.length>0?[...t.subLabel,{label:e,region:o}]:[{label:e,region:o}]}):t)})})}):t),this.removeSubLabel=(t,{selectedAnnoIndex:e,selectedSubLabelIndex:n})=>t.map(t=>t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(t=>{var{bnd_box:i,polygons:o}=t,s=Object(a.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},s),{bnd_box:null==i?void 0:i.map((t,i)=>{var a;return i===e?Object.assign(Object.assign({},t),{subLabel:null===(a=t.subLabel)||void 0===a?void 0:a.filter((t,e)=>e!==n)}):t}),polygons:null==o?void 0:o.map((t,i)=>{var a;return i===e?Object.assign(Object.assign({},t),{subLabel:null===(a=t.subLabel)||void 0===a?void 0:a.filter((t,e)=>e!==n)}):t})})})}):t),this.setLocalStorageProjectProgress=(t,e)=>{localStorage.setItem(`${t}_${this._imgLblApiService.imageLabellingMode}`,JSON.stringify({cache:e}))},this.getLocalStorageProjectProgress=t=>{const e=localStorage.getItem(`${t}_${this._imgLblApiService.imageLabellingMode}`);return e?JSON.parse(e):null},this.updateProjectProgress=(t,e)=>{t.forEach(({annotation:t})=>{t&&(this.setLocalStorageProjectProgress(e,t),null==t||t.forEach(t=>{this._imgLblApiService.updateProjectProgress(e,t.uuid,t).pipe(Object(s.a)()).subscribe(({})=>{})}))})}}}return t.\u0275fac=function(e){return new(e||t)(u.Qb(_))},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();var P=n("I7yr"),O=n("F7l1"),L=n("Iab2"),I=n("xOOu");let A=(()=>{class t{exportSaveFormat({saveCurrentImage:t,saveFormat:e,metadata:n,projectName:i,labelList:o,projectFullMetadata:s}){return Object(a.a)(this,void 0,void 0,function*(){switch(e){case"pascalVoc":if(!n)return alert("There are no metadata.");if(!(null==n?void 0:n.bnd_box))return alert("There are no bounding box.");if(!o)return alert("There are no label list.");if(t){const t=this.calBoxCoorOriginalImages(n),e=this.getFileName(n.img_path),{img_path:i,img_depth:a,img_ori_w:s,img_ori_h:r}=n,l=this.generatePascalVocFormat({img_path:i,img_depth:a,img_ori_w:s,img_ori_h:r,bnd_box:t},o),c=e.split(".");this.saveFile({content:l,filename:c[0]+".xml",type:"text/xml;charset=utf-8"})}else{if(!s)return alert("There are no image list.");const t=[];if(s.forEach(e=>{const n=(e.bnd_box?e.bnd_box.map(t=>t.label):[]).some(t=>o.indexOf(t)>=0);if(e.bnd_box&&e.bnd_box.length>0&&n){const n=this.calBoxCoorOriginalImages(e),i=this.getFileName(e.img_path),{img_path:a,img_depth:s,img_ori_w:r,img_ori_h:l}=e,c=this.generatePascalVocFormat({img_path:a,img_depth:s,img_ori_w:r,img_ori_h:l,bnd_box:n},o),h=i.split(".");t.push({filename:h[0]+".xml",content:c})}}),!t)return alert("There are no labelling progress.");yield this.saveAsZip(t,"pascal_voc",i)}break;case"yolo":if(!n)return alert("There are no metadata.");if(!(null==n?void 0:n.bnd_box))return alert("There are no bounding box.");if(!o)return alert("There are no label list.");if(t){const t=this.calBoxCoorOriginalImages(n),e=this.getFileName(n.img_path),{img_ori_w:i,img_ori_h:a}=n,s=this.generateYoloFormat(Object.assign({},{img_ori_w:i,img_ori_h:a,bnd_box:t}),o),r=e.split(".");this.saveFile({content:s,filename:r[0]+".txt",type:"text/plain;charset=utf-8"})}else{if(!s)return alert("There are no image list.");const t=[];if(s.forEach(e=>{const n=(e.bnd_box?e.bnd_box.map(t=>t.label):[]).some(t=>o.indexOf(t)>=0);if(e.bnd_box&&e.bnd_box.length>0&&n){const n=this.calBoxCoorOriginalImages(e),i=this.getFileName(e.img_path),{img_ori_w:a,img_ori_h:s}=e,r=this.generateYoloFormat(Object.assign({},{img_ori_w:a,img_ori_h:s,bnd_box:n}),o),l=i.split(".");t.push({filename:l[0]+".txt",content:r})}}),!t)return alert("There are no labelling progress.");yield this.saveAsZip(t,e,i)}break;case"ocr":if(!n)return alert("There are no metadata.");if(!(null==n?void 0:n.bnd_box))return alert("There are no bounding box.");if(!s)return alert("There are no image list.");if(!o)return alert("There are no image list.");let a="";if(s.forEach((t,e)=>{0===e&&(a+="filename,x1,y1,x2,y2,label\n");const n=this.calBoxCoorOriginalImages(t),i=this.getFileName(t.img_path),s=this.generateOCRFormat({bnd_box:n},i,o);a+=""+s}),!a)return alert("There are no labelling progress.");this.saveFile({content:a,filename:i+"_text_ocr_labels.csv",type:"text/csv;charset=utf-8"});break;case"label":if(!o)return alert("There are no label list.");const r=i+"_label.txt",l=this.generateLabelFormat(o);this.saveFile({content:l,filename:r,type:"text/plain;charset=utf-8"});break;case"coco":if(!s)return alert("There are no image list.");const c=this.calPolyCoorOriginalImages(s),h=this.getCocoContent(c,o),d=this.getCocoFileName(i);this.saveFile({content:h,filename:d,type:"text/json;charset=utf-8"});break;case"json":if(!n)return alert("There are no metadata.");if(!(null==n?void 0:n.polygons))return alert("There are no polygon.");if(!s)return alert("There are no image list.");const u=this.calPolyCoorOriginalImages(s),b=this.getJsonContent(u),g=this.getJsonFileName(i);this.saveFile({content:b,filename:g,type:"text/json;charset=utf-8"})}})}calBoxCoorOriginalImages({bnd_box:t,img_w:e,img_h:n,img_ori_w:i,img_ori_h:o}){const s=i/e,r=o/n;return t.map(t=>{const e=Object(a.b)(t,["subLabel","region"]),n=t.distancetoImg.x*s,i=n+(t.x2-t.x1)*s,o=t.distancetoImg.y*r,l=o+(t.y2-t.y1)*r;return Object.assign(Object.assign({},e),{x1:n,x2:i,y1:o,y2:l})})}calPolyCoorOriginalImages(t){return t.map(t=>{var{img_ori_w:e,img_ori_h:n,img_w:i,img_h:o,polygons:s}=t,r=Object(a.b)(t,["img_ori_w","img_ori_h","img_w","img_h","polygons"]);const l=e/i,c=n/o,h=s.filter(({coorPt:t})=>t.map(({distancetoImg:t})=>({distancetoImg:t,x:t.x*l,y:t.y*c})));return Object.assign(Object.assign({},r),{img_ori_w:e,img_ori_h:n,img_w:i,img_h:o,polygons:h})})}generatePascalVocFormat({bnd_box:t,img_path:e,img_depth:n,img_ori_w:i,img_ori_h:a},o){let s="\n";const r=this.getItemName("file",e),l=this.getItemName("folder",e),c=this.createNode("folder");s+="\t"+c[0]+l+c[1];const h=this.createNode("filename");s+="\t"+h[0]+r+h[1];const d=this.createNode("path");s+="\t"+d[0]+e.split("\\").join("/")+d[1];const u=this.createNode("source"),b=this.createNode("database");s+="\t"+u[0]+"\n",s+="\t\t"+b[0]+"unknown"+b[1],s+="\t"+u[1];const g=this.createNode("size");s+="\t"+g[0]+"\n";const f=this.createNode("width"),m=this.createNode("height"),p=this.createNode("depth");s+="\t\t"+f[0]+i.toString()+f[1],s+="\t\t"+m[0]+a.toString()+m[1],s+="\t\t"+p[0]+(null==n?void 0:n.toString())+p[1],s+="\t"+g[1];const _=this.createNode("segmented");s+="\t"+_[0]+"0"+_[1];const v=this.createNode("object");for(const[y,{label:x,x1:w,x2:S,y1:C,y2:M}]of t.entries())if(-1!==o.indexOf(x)){s+="\t"+v[0]+"\n";const t=this.createNode("name"),e=this.createNode("pose"),n=this.createNode("truncated"),i=this.createNode("difficult"),a=this.createNode("bndbox"),o=this.createNode("xmin"),r=this.createNode("ymin"),l=this.createNode("xmax"),c=this.createNode("ymax");s+="\t\t"+t[0]+x+t[1],s+="\t\t"+e[0]+"Unspecified"+e[1],s+="\t\t"+n[0]+"0"+n[1],s+="\t\t"+i[0]+"0"+i[1],s+="\t\t"+a[0]+"\n",s+="\t\t\t"+o[0]+Math.floor(w).toString()+o[1],s+="\t\t\t"+r[0]+Math.floor(C).toString()+r[1],s+="\t\t\t"+l[0]+Math.floor(S).toString()+l[1],s+="\t\t\t"+c[0]+Math.floor(M).toString()+c[1],s+="\t\t"+a[1],s+="\t"+v[1]}return s+="",s}generateYoloFormat({bnd_box:t,img_ori_w:e,img_ori_h:n},i){return t.reduce((a,{x1:o,x2:s,y1:r,y2:l,label:c},h)=>{if(-1===i.indexOf(c))return a;const d=(o+s)/2,u=(r+l)/2,b=s-o,g=l-r;return a+=i.indexOf(c).toString()+" ",a+=`${(d/e).toString()} ${(u/n).toString()} `,a+=`${(b/e).toString()} ${(g/n).toString()} `,h!==t.length&&(a+="\n"),a},"")}generateOCRFormat({bnd_box:t},e,n){return t.reduce((t,{x1:i,x2:a,y1:o,y2:s,label:r})=>-1===n.indexOf(r)?(t+=`${e},${i.toString()},${o.toString()}`,t+=`,${a.toString()},${s.toString()},${r.toString()}\n`):t,"")}getItemName(t,e){const n=e.split("\\").join("/").split("/");return"folder"===t?(n.pop(),n.join("/")):n[n.length-1]}createNode(t){return["<"+t+">","\n"]}generateLabelFormat(t){return t.reduce((t,e,n)=>n!==(t+=e).length?t+"\n":t,"")}saveFile({content:t,filename:e,type:n}){const i=new Blob([t],{type:n});L.saveAs(i,e)}saveAsZip(t,e,n){return Object(a.a)(this,void 0,void 0,function*(){const i=new I;for(const[e,{content:n,filename:o}]of t.entries())i.file(o,n);const a=yield i.generateAsync({type:"blob"});L.saveAs(a,`${n}_${e}_labels.zip`)})}getFileName(t){const e=t.split("\\").join("/").split("/");return e[e.length-1]}getCocoFileName(t){return t+"_segmentation_coco.json"}getJsonFileName(t){return t+"_segmentation_JSON.json"}getCocoContent(t,e){let n="{";return n+=this.generateCocoInfo(),n+=this.generateCocoImage(t),n+=this.generateCocoAnnotation(t,e),n+=this.generateCocoLicense(),n+=this.generateCocoCategory(e),n+="}",n=n.replace(/(}{)/gi,"},{"),n}generateCocoInfo(){const t=new Date;let e='"info":{';return e+=`year:"${t.getFullYear().toString()}",`,e+='version:"1.0",',e+='description:"VIA project exported to COCO format using classifai(https://classifai.ai/)",',e+='contributor:"",',e+='url:"https://classifai.ai/",',e+=`date_created:"${t.toUTCString()}"`,e+="},",e}generateCocoImage(t){let e="images:[";return e+=t.reduce((e,{img_ori_w:n,img_ori_h:i,img_path:a},o)=>(e+=`{id:${(o+1).toString()},`,e+=`width:${n.toString()},`,e+=`height:${i.toString()},`,e+=`file_name:"${this.getFileName(a)}",`,e+="license:0,",e+='date_captured:""}',o!==t.length&&(e+=","),e),""),e+="],",e}generateCocoAnnotation(t,e){let n="annotations:[",i=0;return n+=t.reduce((n,{polygons:o},s)=>(o.length>0&&(i+=1,n+=this.calPolyCoorOriginalImages(t).map(({polygons:t})=>t)[0].reduce((t,n,o)=>{var{coorPt:r,label:l}=n,c=Object(a.b)(n,["coorPt","label"]);t+="{segmentation:[",r.length>0&&(t+="[",t+=r.reduce((t,{x:e,y:n},i)=>(t+=e.toString()+",",t+=""+n.toString(),i!==r.length-1&&(t+=","),t),""),t+="]");const h=this.getPolyBBox(Object.assign({coorPt:r,label:l},c));return h&&(t+="],",t+=`area:${((h.x2-h.x1)*(h.y2-h.y1)).toString()},`,t+=`bbox:[${h.x1.toString()},${h.y1.toString()},${(h.x2-h.x1).toString()},${(h.y2-h.y1).toString()}],`,t+="iscrowd:0,",t+=`id:${i.toString()},`,t+=`image_id:${(s+1).toString()},`,t+=`category_id:${null==e?void 0:e.indexOf(l)}}`),t},"")),n),""),n+="]",n+=",",n}getPolyBBox({coorPt:t}){if(t.length>0){const e={x1:1e7,x2:-1e8,y1:1e7,y2:-1e8};for(const[n,{x:i,y:a}]of t.entries())i(t+='{supercategory:"type",',t+=`id:${n.toString()},`,(t+=`name:"${e}"`)+"},"),"")),e+="]",e}getJsonContent(t){let e="{";return e+=t.reduce((t,{polygons:e,file_size:n,img_path:i},a)=>{const o=this.getFileName(i),s=n>0?n.toString():"";return(t+=this.generateImageString(e,o,s))+"},"},""),e+="}",e}generateImageString(t,e,n){let i=`'${e}':{`;return i+='fileref:"",',i+=`size:"${n}",`,i+=`filename:"${e}",`,i+='base64_img_data:"",',i+="file_attributes:{},",i+=`regions:{${this.generateRegion(t)}}`,i}generateRegion(t){if(t.length>0)return t.reduce((e,{coorPt:n,label:i,region:a,subLabel:o},s)=>{let r="[",l="[";if(n.forEach(({x:t,y:e},i)=>{r+=t.toString(),l+=e.toString(),i===n.length-1?(r+="]",l+="]"):(r+=",",l+=",")},""),e+=s.toString()+":{",e+="shape_attributes:{name:polygon,",e+=`all_points_x:${r},`,e+=`all_points_y:${l}},`,e+=`region_attributes:{${i.trim()}:"${a.trim()}"}`,e+="}",0===o.length);else{e+=",";for(const[t,{label:n,region:i}]of o.entries())e+=`"${n.trim()}":"${i.trim()}"`,e+="},"}return s!==t.length-1&&(e+=","),e},"")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();var j=n("x2Se");let B=(()=>{class t{transform(t){return t?window.navigator.platform.startsWith("Mac")?t.split("/").slice(-1)[0]:t.split("\\").slice(-1)[0]:""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=u.Gb({name:"fileNameSlice",type:t,pure:!0}),t})();var E=n("sYmb");function z(t,e){if(1&t&&(u.Kb(0),u.Ib(1,"div",4),u.Mb(2,"label",6),u.oc(3),u.Wb(4,"fileNameSlice"),u.Lb(),u.Jb()),2&t){const t=u.Vb();u.xb(1),u.ac("ngClass",t._onChange.hasAnnotation?"indicator":"no-indicator"),u.xb(2),u.pc(u.Xb(4,2,t._onChange.thumbnailName))}}function T(t,e){1&t&&u.Ib(0,"label",6)}function D(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"label"),u.oc(2),u.Lb(),u.Jb()),2&t){const t=u.Vb(3);u.xb(2),u.rc("",t._onChange.currentThumbnailIndex||0," / ",t._totalUuid,"")}}function N(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",8),u.Mb(2,"img",9),u.Tb("click",function(){return u.hc(t),u.Vb().$implicit.onClick()}),u.Wb(3,"translate"),u.Lb(),u.Lb(),u.Mb(4,"div",10),u.mc(5,D,3,2,"ng-container",11),u.Lb(),u.Jb()}if(2&t){const t=u.Vb(),e=t.$implicit,n=t.index,i=u.Vb();u.xb(2),u.ac("src",e.imgPath,u.jc)("alt",e.alt)("title",u.Xb(3,5,e.hoverLabel)),u.yb("data-index",n+e.alt),u.xb(3),u.ac("ngIf",i._onChange&&i._onChange.totalNumThumbnail)}}function R(t,e){if(1&t){const t=u.Nb();u.Mb(0,"div",8),u.Mb(1,"img",9),u.Tb("click",function(){return u.hc(t),u.Vb().$implicit.onClick()}),u.Wb(2,"translate"),u.Lb(),u.Lb()}if(2&t){const t=u.Vb(),e=t.$implicit,n=t.index;u.xb(1),u.ac("src",e.imgPath,u.jc)("alt",e.alt)("title",u.Xb(2,4,e.hoverLabel)),u.yb("data-index",n+e.alt)}}function F(t,e){if(1&t&&(u.Kb(0),u.mc(1,N,6,7,"ng-container",2),u.mc(2,R,3,6,"ng-template",null,7,u.nc),u.Jb()),2&t){const t=e.index,n=u.fc(3);u.xb(1),u.ac("ngIf",0===t)("ngIfElse",n)}}function X(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"div",8),u.Mb(2,"img",9),u.Tb("click",function(){return e.$implicit.onClick()}),u.Wb(3,"translate"),u.Lb(),u.Lb(),u.Jb()),2&t){const t=e.$implicit,n=e.index;u.xb(2),u.ac("src",t.imgPath,u.jc)("alt",t.alt)("title",u.Xb(3,4,t.hoverLabel)),u.yb("data-index",n+t.alt)}}let W=(()=>{class t{constructor(){this._totalUuid=0,this._tabStatus=[],this._onClick=new u.n,this.isTabStillOpen=!0,this.bindImagePath=()=>{this.jsonSchema={logosCenter:[{imgPath:"../../../assets/icons/previous.svg",hoverLabel:"labellingInfo.previous",alt:"Previous",onClick:()=>this.emitParentEvent({thumbnailAction:-1})},{imgPath:"../../../assets/icons/next.svg",hoverLabel:"labellingInfo.next",alt:"Next",onClick:()=>this.emitParentEvent({thumbnailAction:1})}],logosEnd:[{imgPath:"../../../assets/icons/undo.svg",hoverLabel:"labellingInfo.undo",alt:"Undo",onClick:()=>null},{imgPath:"../../../assets/icons/redo.svg",hoverLabel:"labellingInfo.redo",alt:"Redo",onClick:()=>null}]}},this.emitParentEvent=({url:t,thumbnailAction:e})=>{this._onClick.emit({url:t,thumbnailAction:e})}}ngOnInit(){this.bindImagePath()}ngOnChanges(t){if(t._onChange){const{totalNumThumbnail:e}=t._onChange.currentValue;this._onChange.totalNumThumbnail=e,this.bindImagePath()}if(t._tabStatus){this.isTabStillOpen=!1;for(const{closed:t}of this._tabStatus)if(!t){this.isTabStillOpen=!0;break}}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-info"]],inputs:{_totalUuid:"_totalUuid",_onChange:"_onChange",_tabStatus:"_tabStatus"},outputs:{_onClick:"_onClick"},features:[u.vb],decls:9,vars:6,consts:[[1,"header-container"],[1,"container-flex-start"],[4,"ngIf","ngIfElse"],["defaultName",""],[3,"ngClass"],[4,"ngFor","ngForOf"],[1,"imageTitle"],["renderOtherIcons",""],[1,"utility-icon-container"],[1,"utility-icon-light",3,"src","alt","title","click"],[1,"totalThumbnail"],[4,"ngIf"]],template:function(t,e){if(1&t&&(u.Mb(0,"div",0),u.Mb(1,"div",1),u.mc(2,z,5,4,"ng-container",2),u.mc(3,T,1,0,"ng-template",null,3,u.nc),u.Lb(),u.Mb(5,"div",4),u.mc(6,F,4,2,"ng-container",5),u.Lb(),u.Mb(7,"div",4),u.mc(8,X,4,6,"ng-container",5),u.Lb(),u.Lb()),2&t){const t=u.fc(4);u.xb(2),u.ac("ngIf",e._onChange.thumbnailName)("ngIfElse",t),u.xb(3),u.ac("ngClass",e.isTabStillOpen?"container-flex-center":"container-flex-center-adjust"),u.xb(1),u.ac("ngForOf",e.jsonSchema.logosCenter),u.xb(1),u.ac("ngClass",e.isTabStillOpen?"container-flex-end":"container-flex-end-adjust"),u.xb(1),u.ac("ngForOf",e.jsonSchema.logosEnd)}},directives:[i.k,i.i,i.j],pipes:[B,E.c],styles:[".header-container[_ngcontent-%COMP%]{min-width:100vw;max-width:100vw;min-height:4vh;max-height:4vh;background:#525353;border-bottom:.0625vw solid hsla(0,0%,100%,.25);display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;z-index:1000;position:absolute}.container-flex-start[_ngcontent-%COMP%]{margin-left:3vw}.container-flex-center[_ngcontent-%COMP%], .container-flex-start[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:inherit;max-height:inherit}.container-flex-center[_ngcontent-%COMP%]{margin-left:8vw}.container-flex-end[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;margin-right:19vw}.container-flex-center-adjust[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;margin-left:2vw;-webkit-align-items:center;align-items:center;min-height:inherit;max-height:inherit}.container-flex-end-adjust[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;margin-right:3vw}.logo-container[_ngcontent-%COMP%]{min-width:2.2vw;max-width:2.2vw}.logo[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:2.2vh;max-height:2.2vh;padding:.3vw;position:fixed;cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active, .utility-icon-light[_ngcontent-%COMP%]:focus{background:#a9a9a9}.position-absolute[_ngcontent-%COMP%]{position:absolute}.utility-icon-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;min-height:3.5vh;max-height:3.5vh;min-width:2vw;max-width:2vw}.totalThumbnail[_ngcontent-%COMP%]{font-size:1.7vh;padding:.4vw 1vw 0;display:inline-block;color:#fff;width:-webkit-fit-content;width:fit-content}.img-container[_ngcontent-%COMP%]:hover .img-description[_ngcontent-%COMP%]{visibility:visible;opacity:1}.imageTitle[_ngcontent-%COMP%]{font-size:1.7vh;color:#fff;-webkit-align-items:center;align-items:center;margin-left:1vw;max-width:20vw;min-width:20vw;position:absolute;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.indicator[_ngcontent-%COMP%]{background-color:#75fe7c}.indicator[_ngcontent-%COMP%], .no-indicator[_ngcontent-%COMP%]{height:1vh;width:.5vw;border-radius:50%;position:aboslute}.no-indicator[_ngcontent-%COMP%]{background-color:#ffba54}.horizontal-line[_ngcontent-%COMP%]{padding:1vh 0;margin:0 1vw;border:.01rem solid #707070}"],changeDetection:0}),t})();var U=n("oSzE"),$=n("DlmY");function Y(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new $.a;++er))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var h=-1,d=!0,u=2&n?new V:void 0;for(o.set(t,e),o.set(e,t);++h{class t{constructor(t,e){this._imgLabelState=t,this._annotateService=e,this._currentUrl="",this._tabStatus=[],this._navigate=new u.n,this._modalNoLabel=new u.n,this.labelList=[],this.updateLabelList=()=>{this.labelList=this._tabStatus[1].label_list?this._tabStatus[1].label_list:[]},this.resetSelectedAnnotate=()=>{this._annotateService.setState()},this.bindImagePath=()=>{this.jsonSchema={logos:[{imgPath:"../../../assets/icons/separator.svg",hoverLabel:"",alt:"",nonClickable:!0,toggleable:!1,onClick:()=>null},{imgPath:"../../../assets/icons/pointer.svg",hoverLabel:"leftSideBar.pointer",alt:"Pointer",toggleable:!0,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!1,drag:!0,scroll:!0})}},"/imglabel/bndbox"===this._currentUrl?{imgPath:"../../../assets/icons/rec_bounding_box.svg",hoverLabel:"leftSideBar.rectangularBB",alt:"RectangularBB",toggleable:!0,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!0,drag:!1,scroll:!1})}}:{imgPath:"../../../assets/icons/polygon.svg",hoverLabel:"leftSideBar.polygon",alt:"Polygon",toggleable:!0,onClick:()=>{0!==this.labelList.length?(this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!0,drag:!1,scroll:!1})):this.showAlertNoLabel()}},{imgPath:"../../../assets/icons/eraser.svg",hoverLabel:"leftSideBar.eraser",alt:"Eraser",toggleable:!1,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!1,drag:!1,fitCenter:!1,scroll:!1,clear:!0}),this._imgLabelState.setState(null)}},{imgPath:"../../../assets/icons/fit_center.svg",hoverLabel:"leftSideBar.fitCenter",alt:"Fit Center",toggleable:!1,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!1,drag:!1,fitCenter:!0,scroll:!1}),this._imgLabelState.setState(null)}},{imgPath:"../../../assets/icons/save.svg",hoverLabel:"leftSideBar.save",alt:"Save",toggleable:!1,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!1,drag:!1,fitCenter:!1,scroll:!1,clear:!1,save:!0,keyInfo:!1})}},{imgPath:"../../../assets/icons/info.svg",hoverLabel:"leftSideBar.info",alt:"KeyPoint",toggleable:!1,onClick:()=>{this.resetSelectedAnnotate(),this._imgLabelState.setState({draw:!1,drag:!1,fitCenter:!1,scroll:!1,clear:!1,save:!1,keyInfo:!0})}}]}},this.checkStateEqual=(t,e)=>!ut(t,e),this.getIndex=t=>{this.iconIndex=t},this.conditionalIconTheme=t=>t?"plain-icon":"utility-icon-light",this.conditionalActiveIcon=t=>t===this.iconIndex?{background:"rgb(59 59 59)"}:null}ngOnInit(){this.updateLabelList(),this.bindImagePath()}ngOnChanges(t){if(this.bindImagePath(),t._tabStatus&&this.checkStateEqual(t._tabStatus.currentValue,t._tabStatus.previousValue)){const{currentValue:e}=t._tabStatus;this._tabStatus=[...e],this.updateLabelList()}}showAlertNoLabel(){alert("No label exist yet. Please add new label.")}}return t.\u0275fac=function(e){return new(e||t)(u.Hb(M),u.Hb(S))},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-left-sidebar"]],inputs:{_onChange:"_onChange",_currentUrl:"_currentUrl",_tabStatus:"_tabStatus"},outputs:{_navigate:"_navigate",_modalNoLabel:"_modalNoLabel"},features:[u.vb],decls:2,vars:1,consts:[[1,"utility-left-sidebar-container"],[4,"ngFor","ngForOf"],[1,"utility-icon-container"],[4,"ngIf"],[3,"ngClass","ngStyle","src","alt","title","click"]],template:function(t,e){1&t&&(u.Mb(0,"div",0),u.mc(1,gt,3,1,"ng-container",1),u.Lb()),2&t&&(u.xb(1),u.ac("ngForOf",e.jsonSchema.logos))},directives:[i.j,i.k,i.i,i.l],pipes:[E.c],styles:[".utility-left-sidebar-container[_ngcontent-%COMP%]{position:absolute;top:4.5vh;min-width:2.14vw;max-width:2.14vw;min-height:95.4vh;max-height:95.4vh;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);z-index:1000}.utility-icon-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh;-webkit-align-items:baseline;align-items:baseline}.utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute;cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active, .utility-icon-light[_ngcontent-%COMP%]:focus{background:#a9a9a9}.plain-icon[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute;cursor:auto}"],changeDetection:0}),t})();var mt=n("XIp8");class pt{constructor(){}stringifyObject(t){try{return JSON.stringify(t)}catch(e){return console.log("StringifyObject(content) ----\x3e ",e.name+": ",e.message),""}}deepCloneObject(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return console.log("DeepCloneObject(content) ----\x3e ",e.name+": ",e.message),null}}deepCloneVariable(t){try{const e=t?JSON.parse(JSON.stringify({item:t})):"",{item:n}=e;return n}catch(e){return console.log("DeepCloneVariable(variable) ----\x3e ",e.name+": ",e.message),""}}generateUniquesID(){try{let t="";const e=new Date;return t+=e.getDate().toString(),t+=(e.getMonth()+1).toString(),t+=e.getFullYear().toString(),t+=e.getHours().toString(),t+=e.getMinutes().toString(),t+=e.getSeconds().toString(),t+=e.getMilliseconds().toString(),parseInt(t,10)}catch(t){return console.log("GenerateUniquesID() ----\x3e ",t.name+": ",t.message),-1}}matchStringHead(t,e){try{return e.substr(0,t.length)===t}catch(n){return console.log("MatchStringHead(StrToMatch:string, oristr:string) ----\x3e ",n.name+": ",n.message),!1}}getFilename(t){try{const e=this.deepCloneVariable(t).split("\\").join("/").split("/");return e[e.length-1]}catch(e){return console.log("GetFilename(strs) ----\x3e ",e.name+": ",e.message),""}}GetFoldername(t){try{const e=JSON.parse(JSON.stringify({st:t})).st.split("\\").join("/").split("/");return e.pop(),e.join("/")}catch(e){return console.log("GetFoldername(strs) ----\x3e ",e.name+": ",e.message),""}}RemoveHTMLElement(t){var e;try{const n=document.getElementById(t);null!=n&&(null===(e=n.parentNode)||void 0===e||e.removeChild(n))}catch(n){console.log("RemoveHTMLElement(ids) ----\x3e ",n.name+": ",n.message)}}}let _t=(()=>{class t{constructor(){this.currentArr=[],this.undoArr=[],this.redoArr=[],this.maxStageSize=51,this.allowUndo=!1,this.allowRedo=!1,this.utility=new pt,this.removeLastArray=t=>t.splice(-1,1)[0]}getCurrentArray(){return{undoArr:this.undoArr,redoArr:this.redoArr,curr:this.currentArr}}appendStages(t){t&&(this.redoArr=[],this.allowRedo=!1,0===this.currentArr.length?this.currentArr.push(this.utility.deepCloneVariable(t)):(this.undoArr.length===this.maxStageSize&&this.undoArr.splice(0,1),this.undoArr.push(this.removeLastArray(this.currentArr)),this.currentArr.push(this.utility.deepCloneVariable(t)),this.allowUndo=!0))}clearAllStages(){this.currentArr=[],this.undoArr=[],this.redoArr=[],this.allowUndo=!1,this.allowRedo=!1}undo(){if(this.allowRedo=!0,this.undoArr.length>0){this.redoArr.push(this.removeLastArray(this.currentArr));const t=this.removeLastArray(this.undoArr);return this.currentArr.push(t),this.allowUndo=0!==this.undoArr.length,t}return null}redo(){let t=null;return 0!==this.redoArr.length&&(this.undoArr.push(this.removeLastArray(this.currentArr)),t=this.removeLastArray(this.redoArr),this.currentArr.push(t),this.allowRedo=0!==this.redoArr.length),this.allowUndo=this.undoArr.length>0,t}clearRedundantStages(){var t,e;(null===(t=this.currentArr[0])||void 0===t?void 0:t.meta)&&"polygons"in this.currentArr[0].meta||this.undoArr.length>0&&(!this.isStateChange((null===(e=this.undoArr[this.undoArr.length-1])||void 0===e?void 0:e.meta).bnd_box)||(this.currentArr.pop(),this.currentArr.push(this.removeLastArray(this.undoArr))))}isAllowRedo(){return this.allowRedo}isAllowUndo(){return this.allowUndo}isMethodChange(t){var e;return(null===(e=this.currentArr[0])||void 0===e?void 0:e.method)!==t}replaceStages(t){t&&(this.currentArr[0]=this.utility.deepCloneVariable(t))}isStateChange(t){return!!t&&!!(t&&this.isAnnotationChange(t)||this.isLabelChange(t))}isLabelChange(t){var e,n,i,a;if((null===(e=this.currentArr[0])||void 0===e?void 0:e.meta)&&"polygons"in(null===(n=this.currentArr[0])||void 0===n?void 0:n.meta)){const e=t,n=(null===(i=this.currentArr[0])||void 0===i?void 0:i.meta).polygons;if(e.length!==n.length)return!0;for(const[t,{label:i}]of n.entries());}else{const e=t,n=(null===(a=this.currentArr[0])||void 0===a?void 0:a.meta).bnd_box;if(e.length!==n.length)return!0;for(const[t,{label:i}]of n.entries())if(e[t].label!==i)return!0}return!1}isAnnotationChange(t){var e,n,i,a;if((null===(e=this.currentArr[0])||void 0===e?void 0:e.meta)&&"polygons"in(null===(n=this.currentArr[0])||void 0===n?void 0:n.meta)){if(this.currentArr.length<1)return!0;{const e=t,n=(null===(i=this.currentArr[0])||void 0===i?void 0:i.meta).polygons;return e.length!==n.length||!!n.some(({coorPt:t},n)=>e.some(({coorPt:e},i)=>t[n].x!==e[i].x||t[n].y!==e[i].y))||null}}if(this.currentArr.length<1)return!0;{const e=t,n=(null===(a=this.currentArr[0])||void 0===a?void 0:a.meta).bnd_box;if(e.length!==n.length)return!0;for(const[t,{x1:i,x2:a,y1:o,y2:s,label:r}]of e.entries())if(Math.ceil(i)!==Math.ceil(n[t].x1)||Math.ceil(a)!==Math.ceil(n[t].x2)||Math.ceil(o)!==Math.ceil(n[t].y1)||Math.ceil(s)!==Math.ceil(n[t].y2)||r!==n[t].label)return!0}return!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})(),vt=(()=>{class t{constructor(t){this.el=t,this.srcAttr=null,this.canLazyLoad=()=>window&&"IntersectionObserver"in window,this.lazyLoadImage=()=>{new IntersectionObserver(t=>{t.forEach(({isIntersecting:t})=>{t?this.loadImage():this.unloadImage()})}).observe(this.el.nativeElement)},this.loadImage=()=>{this.srcAttr=this.src},this.unloadImage=()=>{this.srcAttr=""}}ngAfterViewInit(){this.canLazyLoad()?this.lazyLoadImage():this.loadImage()}}return t.\u0275fac=function(e){return new(e||t)(u.Hb(u.l))},t.\u0275dir=u.Cb({type:t,selectors:[["img","imgLazyLoad",""]],hostVars:1,hostBindings:function(t,e){2&t&&u.yb("src",e.srcAttr,u.jc)},inputs:{src:"src"}}),t})();var yt=n("3Pt+");const xt=["thumbnailList"];function wt(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",12),u.Tb("click",function(){u.hc(t);const n=e.$implicit,i=e.index;return u.Vb(4).onClick(n,i)}),u.Mb(2,"div",13),u.Ib(3,"img",14),u.Lb(),u.Mb(4,"div",15),u.Mb(5,"label",16),u.oc(6),u.Wb(7,"fileNameSlice"),u.Lb(),u.Lb(),u.Mb(8,"div"),u.Ib(9,"div",17),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=e.$implicit;u.xb(3),u.ac("src",t.img_thumbnail,u.jc),u.xb(3),u.pc(u.Xb(7,3,t.img_path)),u.xb(3),u.ac("ngClass",(null==t.bnd_box?null:t.bnd_box.length)>0||(null==t.polygons?null:t.polygons.length)>0?"indicator":"no-indicator")}}function St(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",5),u.Mb(2,"label",6),u.oc(3),u.Wb(4,"translate"),u.Lb(),u.Mb(5,"div",7),u.Mb(6,"span",8),u.Mb(7,"div",9),u.Tb("click",function(){u.hc(t);const e=u.Vb().$implicit;return u.Vb(2).onClose(e)}),u.oc(8,"\u2716"),u.Lb(),u.Lb(),u.Lb(),u.Mb(9,"div",10,11),u.Tb("scroll",function(){return u.hc(t),u.Vb(3).mouseScroll()}),u.mc(11,wt,10,5,"ng-container",2),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=u.Vb(),e=t.$implicit,n=t.index,i=u.Vb(2);u.xb(1),u.ac("ngClass",i.checkCloseToggle(e)),u.yb("data-index",n),u.xb(2),u.sc("",u.Xb(4,6,e.name)," (",i._thumbnailList.length,"/",i._totalUuid,")"),u.xb(8),u.ac("ngForOf",i._thumbnailList)}}function Ct(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"span",29),u.Tb("click",function(){u.hc(t);const e=u.Vb().$implicit;return u.Vb(5).onDeleteLabel(e)}),u.oc(2,"-"),u.Lb(),u.Jb()}if(2&t){const t=u.Vb(6);u.xb(1),u.ac("ngClass",t.clickAbilityToggle?"pointer":null)}}function Mt(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",24),u.Mb(2,"label",25),u.Mb(3,"div",26),u.Tb("click",function(){u.hc(t);const n=e.$implicit,i=u.Vb(5);return i.clickAbilityToggle?i.onClickLabel(n):null}),u.oc(4),u.Lb(),u.Lb(),u.Mb(5,"label",27),u.mc(6,Ct,3,1,"ng-container",28),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=e.$implicit,n=u.Vb(5);u.xb(1),u.ac("ngClass",t===n.selectedLabel?"label-active":null),u.xb(2),u.ac("ngClass",n.clickAbilityToggle?"pointer":null),u.xb(1),u.qc(" ",t," "),u.xb(2),u.ac("ngIf",t===n.selectedLabel)}}function kt(t,e){1&t&&(u.Mb(0,"label",30),u.oc(1),u.Wb(2,"translate"),u.Lb()),2&t&&(u.xb(1),u.qc(" ",u.Xb(2,1,"labellingProject.labelNotExist")," "))}function Pt(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",5),u.Mb(2,"label",6),u.oc(3),u.Wb(4,"translate"),u.Lb(),u.Mb(5,"div",7),u.Mb(6,"span",8),u.Mb(7,"div",9),u.Tb("click",function(){u.hc(t);const e=u.Vb(2).$implicit;return u.Vb(2).onClose(e)}),u.oc(8,"\u2716"),u.Lb(),u.Lb(),u.Lb(),u.Mb(9,"div",19),u.Mb(10,"input",20),u.Tb("ngModelChange",function(e){return u.hc(t),u.Vb(4).inputLabel=e})("ngModelChange",function(e){return u.hc(t),u.Vb(4).inputLabelChange(e)})("keydown.enter",function(e){return u.hc(t),u.Vb(4).validateInputLabel(e)}),u.Wb(11,"translate"),u.Lb(),u.Lb(),u.Mb(12,"div",21),u.Mb(13,"div",22),u.mc(14,Mt,7,4,"ng-container",2),u.mc(15,kt,3,3,"label",23),u.Lb(),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=u.Vb(2),e=t.$implicit,n=t.index,i=u.Vb(2);u.xb(1),u.ac("ngClass",i.checkCloseToggle(e)),u.yb("data-index",n),u.xb(2),u.pc(u.Xb(4,8,e.name)),u.xb(7),u.ac("ngClass",i.invalidInput?"input-invalid":null)("ngModel",i.inputLabel)("placeholder",u.Xb(11,10,"labellingProject.enterLabel")),u.xb(4),u.ac("ngForOf",i.labelList),u.xb(1),u.ac("ngIf",0===i.labelList.length)}}function Ot(t,e){if(1&t){const t=u.Nb();u.Mb(0,"div",36),u.Tb("click",function(){return u.hc(t),u.Vb(9).onDeleteAnnotation()}),u.oc(1," - "),u.Lb()}if(2&t){const t=u.Vb(9);u.ac("ngClass",t.clickAbilityToggle?"pointer":null)}}function Lt(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"label",34),u.Tb("click",function(){u.hc(t);const n=e.index,i=e.$implicit,a=u.Vb(8);return a.clickAbilityToggle?a.onClickAnnotation(n,i):null}),u.Mb(2,"div",17),u.oc(3),u.Lb(),u.mc(4,Ot,2,1,"div",35),u.Lb(),u.Jb()}if(2&t){const t=e.$implicit,n=e.index,i=u.Vb(8);u.xb(1),u.ac("ngClass",n===i.selectedIndexAnnotation?"annotation-active":null),u.yb("data-index",n),u.xb(1),u.ac("ngClass",i.clickAbilityToggle?"pointer":null),u.xb(1),u.rc(" ",t.label," : ",t.id," "),u.xb(1),u.ac("ngIf",n===i.selectedIndexAnnotation)}}function It(t,e){if(1&t&&(u.Kb(0),u.mc(1,Lt,5,6,"ng-container",2),u.Jb()),2&t){const t=u.Vb().$implicit;u.xb(1),u.ac("ngForOf",t.bnd_box)}}function At(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"label",34),u.Tb("click",function(){u.hc(t);const n=e.index,i=e.$implicit,a=u.Vb(8);return a.clickAbilityToggle?a.onClickAnnotation(n,i):null}),u.Mb(2,"div",17),u.oc(3),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=e.$implicit,n=e.index,i=u.Vb(8);u.xb(1),u.ac("ngClass",n===i.selectedIndexAnnotation?"annotation-active":null),u.yb("data-index",n),u.xb(1),u.ac("ngClass",i.clickAbilityToggle?"pointer":null),u.xb(1),u.rc(" ",t.label," : ",t.id," ")}}function jt(t,e){if(1&t&&u.mc(0,At,4,5,"ng-container",2),2&t){const t=u.Vb().$implicit;u.ac("ngForOf",t.polygons)}}function Bt(t,e){if(1&t&&(u.Kb(0),u.mc(1,It,2,1,"ng-container",3),u.mc(2,jt,1,1,"ng-template",null,33,u.nc),u.Jb()),2&t){const t=e.$implicit,n=u.fc(3);u.xb(1),u.ac("ngIf",t.bnd_box)("ngIfElse",n)}}function Et(t,e){if(1&t&&(u.Kb(0),u.mc(1,Bt,4,2,"ng-container",2),u.Jb()),2&t){const t=u.Vb(3).$implicit;u.xb(1),u.ac("ngForOf",t.annotation)}}function zt(t,e){if(1&t){const t=u.Nb();u.Mb(0,"div",5),u.Mb(1,"label",6),u.oc(2),u.Wb(3,"translate"),u.Lb(),u.Mb(4,"div",7),u.Mb(5,"span",8),u.Mb(6,"div",9),u.Tb("click",function(){u.hc(t);const e=u.Vb(2).$implicit;return u.Vb(2).onClose(e)}),u.oc(7,"\u2716"),u.Lb(),u.Lb(),u.Lb(),u.Mb(8,"div",31),u.Mb(9,"div",22),u.Mb(10,"div",32),u.mc(11,Et,2,1,"ng-container",28),u.Lb(),u.Lb(),u.Lb(),u.Lb()}if(2&t){const t=u.Vb(2),e=t.$implicit,n=t.index,i=u.Vb(2);u.ac("ngClass",i.checkCloseToggle(e)),u.yb("data-index",n),u.xb(2),u.pc(u.Xb(3,4,e.name)),u.xb(9),u.ac("ngIf",null==e?null:e.annotation)}}function Tt(t,e){if(1&t&&(u.mc(0,Pt,16,12,"ng-container",3),u.mc(1,zt,12,6,"ng-template",null,18,u.nc)),2&t){const t=u.fc(2),e=u.Vb().index;u.ac("ngIf",1===e)("ngIfElse",t)}}function Dt(t,e){if(1&t&&(u.Kb(0),u.mc(1,St,12,8,"ng-container",3),u.mc(2,Tt,3,2,"ng-template",null,4,u.nc),u.Jb()),2&t){const t=e.index,n=u.fc(3);u.xb(1),u.ac("ngIf",0===t)("ngIfElse",n)}}function Nt(t,e){if(1&t&&(u.Mb(0,"div",1),u.mc(1,Dt,4,2,"ng-container",2),u.Lb()),2&t){const t=u.Vb();u.xb(1),u.ac("ngForOf",t._tabStatus)}}let Rt=(()=>{class t{constructor(t,e,n,i){this._annotateService=t,this._imgLblState=e,this._languageService=n,this._undoRedoService=i,this._totalUuid=0,this._thumbnailList=[],this._tabStatus=[],this._onClose=new u.n,this._onClickThumbnail=new u.n,this._onClickLabel=new u.n,this._onEnterLabel=new u.n,this._onChangeAnnotationLabel=new u.n,this._onDeleteAnnotation=new u.n,this._loadMoreThumbnails=new u.n,this.action=-1,this.displayInputLabel=!1,this.inputLabel="",this.selectedIndexAnnotation=-1,this.selectedLabel="",this.unsubscribe$=new l.a,this.clickAbilityToggle=!1,this.invalidInput=!1,this.labelList=[],this.isTabStillOpen=!0,this.tempMax=0,this.max=0,this.updateLabelList=()=>{this.labelList=this._tabStatus[1].label_list?this._tabStatus[1].label_list:[]},this.onClose=t=>{this._onClose.emit({name:t.name,closed:!0})},this.onClick=(t,e)=>{this._onClickThumbnail.emit(Object.assign(Object.assign({},t),{thumbnailIndex:e})),this.selectedIndexAnnotation=-1,this.selectedLabel=""},this.onDisplayInputModal=()=>{this.displayInputLabel=!this.displayInputLabel,this.inputLabel=""},this.validateInputLabel=({target:t})=>{const{value:e}=t,n=e.trim();if(n)if(n.match(/^[a-zA-Z0-9-]*$/))if(this._tabStatus.some(({label_list:t})=>t&&t.length&&t.some(t=>t===n)))this.invalidInput=!0,console.error("Invalid existing label input");else{this.invalidInput=!1;const t=this._tabStatus.map(({label_list:t})=>t||[]).filter(t=>t.length>0)[0];this._onEnterLabel.emit({action:1,label_list:t?[...t,e]:[e]}),this.displayInputLabel=!1,this.inputLabel=""}else this.invalidInput=!0,console.error("Invalid input value")},this.onDeleteLabel=t=>{let e=!1;if(this._thumbnailList.forEach(n=>{n.bnd_box&&n.bnd_box.forEach(n=>{n.label===t&&(e=!0)}),n.polygons&&n.polygons.forEach(n=>{n.label===t&&(e=!0)})}),e)this._languageService._translate.get("labelExist").subscribe(t=>{alert(t)});else{const[{label_list:e}]=this._tabStatus.filter(t=>t.label_list);this._onClickLabel.emit({selectedLabel:t,label_list:e&&e.length>0?e:[],action:0})}},this.onClickLabel=t=>{this.selectedLabel=t,this._onChangeAnnotationLabel.emit({label:t,index:this.selectedIndexAnnotation}),this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"})},this.onClickAnnotation=(t,{label:e})=>{this.selectedLabel=e,this._annotateService.setState({annotation:t})},this.onDeleteAnnotation=()=>{this.selectedIndexAnnotation>-1&&(this._onDeleteAnnotation.emit(this.selectedIndexAnnotation),this._selectMetadata.bnd_box.splice(this.selectedIndexAnnotation,1)&&this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}))},this.checkCloseToggle=t=>{let e="";return"labellingProject.label"===t.name&&this._tabStatus[2].closed||"labellingProject.project"===t.name&&this._tabStatus[1].closed&&this._tabStatus[2].closed||"labellingProject.annotation"===t.name||(e="flex-content"),t.closed&&(e+=" closed"),e},this.checkStateEqual=(t,e)=>!ut(t,e)}ngOnInit(){this.updateLabelList(),this._imgLblState.action$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(({draw:t})=>this.clickAbilityToggle=t),this._thumbnailList.length>0&&this._annotateService.labelStaging$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(({annotation:t})=>{var e;this.selectedIndexAnnotation=t;const[{annotation:n}]=this._tabStatus.filter(t=>t.annotation),i=null==n?void 0:n.map(({bnd_box:e,polygons:n})=>e?e.find((e,n)=>n===t):n?n.find((e,n)=>n===t):void 0)[0];this.selectedLabel=null!==(e=null==i?void 0:i.label)&&void 0!==e?e:""})}inputLabelChange(t){var e;this.labelList=this._tabStatus[1].label_list?null===(e=this._tabStatus[1].label_list)||void 0===e?void 0:e.filter(e=>e.includes(t)):[]}ngOnChanges(t){if(t._thumbnailList){const{currentValue:e}=t._thumbnailList;this._thumbnailList=Object.assign([],this._thumbnailList,[...e])}if(t._tabStatus&&this.checkStateEqual(t._tabStatus.currentValue,t._tabStatus.previousValue)){const{currentValue:e}=t._tabStatus;this._tabStatus=[...e],this.updateLabelList(),this.isTabStillOpen=!1;for(const{closed:t}of this._tabStatus)if(!t){this.isTabStillOpen=!0;break}}}openAllTab(){this._tabStatus.forEach(t=>{t.closed=!1})}mouseScroll(){const t=this.thumbnailList.nativeElement.scrollTop+this.thumbnailList.nativeElement.clientHeight;this.max=this.thumbnailList.nativeElement.scrollHeight,t+1500>=this.max&&this.tempMax!==this.max&&(this.tempMax=this.max,this._loadMoreThumbnails.emit())}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}}return t.\u0275fac=function(e){return new(e||t)(u.Hb(S),u.Hb(M),u.Hb(P.a),u.Hb(_t))},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-project"]],viewQuery:function(t,e){if(1&t&&u.tc(xt,!0),2&t){let t;u.ec(t=u.Ub())&&(e.thumbnailList=t.first)}},hostBindings:function(t,e){1&t&&u.Tb("scroll",function(t){return e.mouseScroll(t)})},inputs:{_totalUuid:"_totalUuid",_selectMetadata:"_selectMetadata",_thumbnailList:"_thumbnailList",_tabStatus:"_tabStatus"},outputs:{_onClose:"_onClose",_onClickThumbnail:"_onClickThumbnail",_onClickLabel:"_onClickLabel",_onEnterLabel:"_onEnterLabel",_onChangeAnnotationLabel:"_onChangeAnnotationLabel",_onDeleteAnnotation:"_onDeleteAnnotation",_loadMoreThumbnails:"_loadMoreThumbnails"},features:[u.vb],decls:1,vars:1,consts:[["class","tab-container",4,"ngIf"],[1,"tab-container"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["nonThumbnailTab",""],[1,"utility-right-project-container","tab","flex-fill-remaining",3,"ngClass"],[1,"tab-name"],[1,"flex-tab-icons"],[1,"tab-close-thumbnailless"],[1,"div-close",3,"click"],["id","thumbnailList",1,"utility-inner-container","tab-height","scroll",3,"scroll"],["thumbnailList",""],[1,"img-container",3,"click"],[1,"img-skeleton"],["imgLazyLoad","",1,"img",3,"src"],[1,"img-name"],[1,"img-path"],[3,"ngClass"],["annotationTab",""],[1,"div-input"],["type","text",1,"input",3,"ngClass","ngModel","placeholder","ngModelChange","keydown.enter"],["id","inner-container",1,"utility-inner-container","tab-height","scroll"],[1,"flex-item"],["class","not-exist",4,"ngIf"],[1,"flex-center-width",3,"ngClass"],[1,"label"],[3,"ngClass","click"],[1,"action"],[4,"ngIf"],[1,"delete-label",3,"ngClass","click"],[1,"not-exist"],["id","inner-container",1,"utility-inner-container","scroll","tab-smaller-height"],[1,"flex-center-width"],["polygon",""],[1,"label",3,"ngClass","click"],["class","delete-annotation",3,"ngClass","click",4,"ngIf"],[1,"delete-annotation",3,"ngClass","click"]],template:function(t,e){1&t&&u.mc(0,Nt,2,1,"div",0),2&t&&u.ac("ngIf",e.isTabStillOpen)},directives:[i.k,i.j,i.i,vt,yt.a,yt.f,yt.i],pipes:[E.c,B],styles:['.tab-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-flow:column;flex-flow:column;height:100%;right:0;position:fixed;z-index:1000;min-width:18.5vw;max-width:18.5vw}.utility-right-project-container[_ngcontent-%COMP%]{height:100%;min-width:16.3vw;max-width:16.3vw;background:#383535;border:.0325vw solid hsla(0,0%,100%,.25);border-top:none;z-index:1000;-webkit-align-items:stretch;align-items:stretch}.utility-right-project-container[_ngcontent-%COMP%]:after{position:absolute;content:"";top:0;min-width:8.5vw;max-width:8.5vw;min-height:4vh;max-height:4vh;background:#383535;z-index:-1;font-size:1.5vh;line-height:3vh;color:#fff;padding:.5vh 0 0 2vw}.tab[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;overflow:hidden}.tab[_ngcontent-%COMP%]:before{position:absolute;content:"";top:4vh;min-width:100vw;max-width:100vw;min-height:93vh;max-height:93vh;background:#383535;z-index:-1}.flex-fixed[_ngcontent-%COMP%]{-webkit-flex:0 1 25vh;flex:0 1 25vh}.flex-fill-remaining[_ngcontent-%COMP%]{-webkit-flex:1 1 auto;flex:1 1 auto}.flex-content[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-flow:column;flex-flow:column;height:33%;min-height:10%;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-grow:0;flex-grow:0;resize:vertical}.tab-name[_ngcontent-%COMP%]{font-size:1.7vh;padding:.5vw 2vw 0 1vw;display:inline-block;color:#fff;position:absolute}.tab-close-thumbnail[_ngcontent-%COMP%]{margin-left:3vw;-webkit-justify-content:center;justify-content:center}.tab-close-thumbnail[_ngcontent-%COMP%], .tab-close-thumbnailless[_ngcontent-%COMP%]{float:right;vertical-align:middle;min-height:4vh;max-height:4vh;color:#696969;font-size:1.8vh;line-height:4vh;text-align:center;display:inline-grid;padding-bottom:1vh}.tab-close-thumbnailless[_ngcontent-%COMP%]{-webkit-flex:1 0 60%;flex:1 0 60%;-webkit-justify-content:right;justify-content:right}.div-close[_ngcontent-%COMP%]{margin-right:.5vw;min-width:1.6vw;max-width:1.6vw;min-height:4vh;max-height:4vh;color:#fff;cursor:pointer;text-align:center;float:right}.div-close[_ngcontent-%COMP%]:active{background:grey}.utility-inner-container[_ngcontent-%COMP%]{padding:2.5vh 0 0 .2vw;scroll-behavior:smooth;overflow:hidden auto;z-index:100;min-width:15.5vw;max-width:15.5vw}.tab-height[_ngcontent-%COMP%]{height:85%}.tab-smaller-height[_ngcontent-%COMP%]{height:60%}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px;background-color:#000}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:.5vw}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.img-container[_ngcontent-%COMP%], .utility-icon-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh}.img-container[_ngcontent-%COMP%]{font-size:1.5vh;color:#fff;display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-items:center;align-items:center;cursor:pointer;margin:0 .3vw;padding:.1vh .4vw}.img-container[_ngcontent-%COMP%]:hover{background-color:#444;border-radius:2px}.img[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;display:block}.img[_ngcontent-%COMP%], .img-skeleton[_ngcontent-%COMP%]{max-height:4.3vh;min-height:4.3vh;max-width:3vw}.img-skeleton[_ngcontent-%COMP%]{min-width:3vw;border:.005vh dotted #525353}.img-name[_ngcontent-%COMP%]{margin-left:.5vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.closed[_ngcontent-%COMP%]{display:none}.utility-icon-dark[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute}.flex-item[_ngcontent-%COMP%]{-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;font-size:1.5vh;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flex-center-width[_ngcontent-%COMP%], .flex-item[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.flex-center-width[_ngcontent-%COMP%]{width:90%;-webkit-flex-wrap:wrap;flex-wrap:wrap}.label[_ngcontent-%COMP%]{-webkit-flex:1 1 80%;flex:1 1 80%;display:-webkit-flex;display:flex;-webkit-justify-content:flex-start;justify-content:flex-start;margin:.25vh 0}.pointer[_ngcontent-%COMP%]{cursor:pointer}.annotation-active[_ngcontent-%COMP%], .label-active[_ngcontent-%COMP%]{border:.15vw solid #ff0}.utility-info-btn[_ngcontent-%COMP%]{font-size:1vw;min-width:0;max-width:0;min-height:2.5vh;max-height:2.5vh;line-height:0;right:21vh;position:absolute;background:#383535;border:none;color:#fff}.flex-tab-icons[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;width:100%}.extra-icons[_ngcontent-%COMP%]{cursor:pointer}.extra-icons[_ngcontent-%COMP%]:active{background:grey}.tab-extra-icons[_ngcontent-%COMP%]{float:right;vertical-align:middle;font-size:1.7vh;line-height:4vh;text-align:center;color:#fff;-webkit-flex:1 0 15%;flex:1 0 15%;-webkit-justify-content:flex-start;justify-content:flex-start}.tab-text[_ngcontent-%COMP%]{font-size:1.7vh;min-width:6vw;max-width:6vw}.inner-content[_ngcontent-%COMP%]{max-height:25vh;min-height:25vh;min-width:3vw;max-width:3vw}.div-input[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:flex-start;justify-content:flex-start;margin:.5vh .9vw}.input[_ngcontent-%COMP%]{border-radius:8vw;border:none;outline:none;padding:.3vw 0 .3vw 1vw;min-height:1.5vh;max-height:1.5vh;min-width:13vw;max-width:13vw;font-size:1.3vh;background:#525353;color:#fff}.input-invalid[_ngcontent-%COMP%]{border:.2vw solid red}.img-path[_ngcontent-%COMP%]{margin-top:4vh}.indicator[_ngcontent-%COMP%]{background-color:#75fe7c}.indicator[_ngcontent-%COMP%], .no-indicator[_ngcontent-%COMP%]{height:1vh;width:.5vw;border-radius:50%;position:relative}.no-indicator[_ngcontent-%COMP%]{background-color:#ffba54}.not-exist[_ngcontent-%COMP%]{font-size:1.5vh;color:#999}.delete-annotation[_ngcontent-%COMP%], .delete-label[_ngcontent-%COMP%]{position:absolute;right:2vw}.open-all-tabs[_ngcontent-%COMP%]{cursor:pointer;padding:.2vh .2vw;border-radius:.7vw}.open-all-tabs[_ngcontent-%COMP%]:hover{background:#636363}.open-all-tabs[_ngcontent-%COMP%]:active, .open-all-tabs[_ngcontent-%COMP%]:focus{background:#737474}.tab-skeleton[_ngcontent-%COMP%]{position:absolute;height:100vh;width:16.5vw;background:#525353;border-left:.0625vw solid hsla(0,0%,100%,.25);text-align:center;color:#cac8c8;font-size:2vh}.choose-tab[_ngcontent-%COMP%]{margin-top:42vh}']}),t})();function Ft(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"div",3),u.Mb(2,"label"),u.Mb(3,"img",4),u.Tb("click",function(){return e.$implicit.onClick()}),u.Wb(4,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Jb()),2&t){const t=e.$implicit,n=e.index,i=u.Vb();u.xb(3),u.lc(t.style),u.ac("ngClass",i.conditionalIconTheme())("src",t.imgPath,u.jc)("alt",t.alt)("title",u.Xb(4,7,t.hoverLabel)),u.yb("data-index",n)}}let Xt=(()=>{class t{constructor(){this._onClick=new u.n,this._onExport=new u.n,this._onReload=new u.n,this.bindImagePath=()=>{this.jsonSchema={logos:[{imgPath:"../../../assets/icons/folder.svg",hoverLabel:"rightSideBar.folderOrFiles",alt:"Folder",onClick:()=>{this._onClick.emit({name:"labellingProject.project",closed:!1})}},{imgPath:"../../../assets/icons/tag.svg",hoverLabel:"rightSideBar.label",alt:"Label",onClick:()=>{this._onClick.emit({name:"labellingProject.label",closed:!1})}},{imgPath:"../../../assets/icons/bounding_box.svg",hoverLabel:"rightSideBar.annotation",alt:"Annotation",onClick:()=>{this._onClick.emit({name:"labellingProject.annotation",closed:!1})}},{imgPath:"../../../assets/icons/statistic.svg",hoverLabel:"rightSideBar.statistic",alt:"Statistic",onClick:()=>{}},{imgPath:"../../../assets/icons/export.svg",hoverLabel:"rightSideBar.export",alt:"Export",style:"padding: 1.5vh 0.5vw;",onClick:()=>{this._onExport.emit()}},{imgPath:"../../../assets/icons/reload.svg",hoverLabel:"rightSideBar.reload",alt:"Reload",style:"padding: 1.5vh 0.5vw;",onClick:()=>{this._onReload.emit()}}]}},this.conditionalIconTheme=()=>"utility-icon-light"}ngOnInit(){this.bindImagePath()}ngOnChanges(t){this.bindImagePath()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-right-sidebar"]],inputs:{_onChange:"_onChange"},outputs:{_onClick:"_onClick",_onExport:"_onExport",_onReload:"_onReload"},features:[u.vb],decls:3,vars:1,consts:[[1,"utility-right-sidebar-container"],[1,"utility-inner-container"],[4,"ngFor","ngForOf"],[1,"utility-icon-container"],[3,"ngClass","src","alt","title","click"]],template:function(t,e){1&t&&(u.Mb(0,"div",0),u.Mb(1,"div",1),u.mc(2,Ft,5,9,"ng-container",2),u.Lb(),u.Lb()),2&t&&(u.xb(2),u.ac("ngForOf",e.jsonSchema.logos))},directives:[i.j,i.i],pipes:[E.c],styles:[".utility-right-sidebar-container[_ngcontent-%COMP%]{position:absolute;top:4.5vh;min-width:2.2vw;max-width:2.2vw;min-height:95.5vh;max-height:95.5vh;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);z-index:1000}.utility-inner-container[_ngcontent-%COMP%]{min-width:2.2vw;max-width:2.2vw;position:absolute}.utility-icon-container[_ngcontent-%COMP%], .utility-inner-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh}.utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute;cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active, .utility-icon-light[_ngcontent-%COMP%]:focus{background:#a9a9a9}.input-none[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),t})();function Wt(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"div",4),u.oc(2),u.Wb(3,"translate"),u.Lb(),u.Jb()),2&t){const t=u.Vb(2);u.xb(2),u.rc("",u.Xb(3,2,"footer.image"),": ",t.thumbnailType,"")}}function Ut(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",2),u.Mb(2,"div",3),u.oc(3),u.Wb(4,"translate"),u.Lb(),u.Mb(5,"div",4),u.oc(6),u.Wb(7,"translate"),u.Lb(),u.mc(8,Wt,4,4,"ng-container",1),u.Mb(9,"div",4),u.oc(10),u.Lb(),u.Mb(11,"div",5),u.Wb(12,"translate"),u.Mb(13,"label",6),u.Tb("click",function(){u.hc(t);const e=u.Vb();return e.copyMessage(e._thumbnailInfo.img_path)}),u.oc(14),u.Lb(),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=u.Vb();u.xb(3),u.rc(" ",u.Xb(4,9,"footer.projectName"),": ",t._thumbnailInfo.project_name," "),u.xb(3),u.rc("",u.Xb(7,11,"footer.size"),": ",t.thumbnailSize,""),u.xb(2),u.ac("ngIf",t.thumbnailType),u.xb(2),u.rc("",t._thumbnailInfo.img_ori_w," x ",t._thumbnailInfo.img_ori_h,""),u.xb(1),u.ac("title",u.Xb(12,13,"footer.copyToClipboard")),u.xb(3),u.pc(t._thumbnailInfo.img_path)}}let $t=(()=>{class t{constructor(){this._imgSrc="",this.thumbnailSize="",this.thumbnailType="",this.formatBytes=(t,e=2)=>{if(0===t)return"0 Bytes";const n=e<0?0:e,i=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,i)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}}ngOnInit(){}copyMessage(t){const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}ngOnChanges(t){if(t._thumbnailInfo&&t._imgSrc){const{currentValue:e}=t._thumbnailInfo,{currentValue:n}=t._imgSrc;this._thumbnailInfo=Object.assign(Object.assign({},this._thumbnailInfo),e),this.thumbnailSize=this.formatBytes(n.length);const i=n.match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(i&&i.length){const t=i[1].split("/")[1];this.thumbnailType=t}}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-footer"]],inputs:{_thumbnailInfo:"_thumbnailInfo",_imgSrc:"_imgSrc"},features:[u.vb],decls:3,vars:3,consts:[[1,"footer-container"],[4,"ngIf"],[1,"footer-label-container"],[1,"footer-label","footer-project-name"],[1,"footer-label"],[1,"footer-image-path",3,"title"],[1,"footer-path-label",3,"click"]],template:function(t,e){1&t&&(u.Mb(0,"div",0),u.mc(1,Ut,15,15,"ng-container",1),u.Wb(2,"json"),u.Lb()),2&t&&(u.xb(1),u.ac("ngIf","{}"!=u.Xb(2,1,e._thumbnailInfo)))},directives:[i.k],pipes:[i.e,E.c],styles:[".footer-container[_ngcontent-%COMP%]{position:absolute;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);min-height:2.3vh;max-height:2.3vh;min-width:100vw;max-width:100vw;bottom:0;padding-left:2.5vw}.footer-label-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-items:baseline;align-items:baseline;width:80%}.footer-label[_ngcontent-%COMP%]{font-size:1.6vh;color:#fff;outline:none;border-right:.05vw solid #fff;padding:0 1vw;text-align:left}.footer-project-name[_ngcontent-%COMP%]{max-width:20vw}.footer-image-path[_ngcontent-%COMP%], .footer-project-name[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.footer-image-path[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;font-size:1.6vh;color:#fff;outline:none;border-right:.05vw solid #fff;padding:0 1vw}.border-right[_ngcontent-%COMP%]{border-right:1rem #fff}.utility-icon-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh;-webkit-align-items:baseline;align-items:baseline}.utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:1.5vh;max-height:1.5vh;padding:0;position:absolute;cursor:context-menu}.footer-path-label[_ngcontent-%COMP%]{cursor:pointer;padding:0 .2vw;border-radius:.5vw}.footer-path-label[_ngcontent-%COMP%]:hover{background:#636363}.footer-path-label[_ngcontent-%COMP%]:active, .footer-path-label[_ngcontent-%COMP%]:focus{background:#737474}"],changeDetection:0}),t})();var Yt=n("44N4"),Vt=n("OObL"),Zt=n("TJKd");function Ht(t,e){if(1&t&&(u.Mb(0,"span"),u.oc(1),u.Lb()),2&t){const t=u.Vb(2);u.xb(1),u.qc("Zipping ",t._processingNum," file")}}function Kt(t,e){1&t&&(u.Mb(0,"span"),u.oc(1,"Done"),u.Lb())}function Jt(t,e){1&t&&u.Ib(0,"div",5)}function Gt(t,e){1&t&&(u.Mb(0,"div",6),u.oc(1,"\u2714"),u.Lb())}function qt(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"div",1),u.Mb(2,"div",2),u.mc(3,Ht,2,1,"span",0),u.mc(4,Kt,2,0,"span",0),u.Lb(),u.mc(5,Jt,1,0,"div",3),u.mc(6,Gt,2,0,"div",4),u.Lb(),u.Jb()),2&t){const t=u.Vb();u.xb(3),u.ac("ngIf",t._processingNum>0),u.xb(1),u.ac("ngIf",0===t._processingNum),u.xb(1),u.ac("ngIf",t._processingNum>0),u.xb(1),u.ac("ngIf",0===t._processingNum)}}let Qt=(()=>{class t{constructor(){this._processingNum=0,this.doneProcess=!1}ngOnInit(){}delay(t){return new Promise(e=>setTimeout(e,t))}ngOnChanges(t){return Object(a.a)(this,void 0,void 0,function*(){t._processingNum&&(console.log(t._processingNum),1===t._processingNum.previousValue&&0===t._processingNum.currentValue&&(this.doneProcess=!0,yield this.delay(1e3),this.doneProcess=!1))})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=u.Bb({type:t,selectors:[["toastr"]],inputs:{_processingNum:"_processingNum"},features:[u.vb],decls:1,vars:1,consts:[[4,"ngIf"],[1,"toastr"],[1,"text"],["class","loader",4,"ngIf"],["class","done",4,"ngIf"],[1,"loader"],[1,"done"]],template:function(t,e){1&t&&u.mc(0,qt,7,4,"ng-container",0),2&t&&u.ac("ngIf",e._processingNum>0||e.doneProcess)},directives:[i.k],styles:[".toastr[_ngcontent-%COMP%]{position:absolute;z-index:10000;background:#262a2e;border-radius:1vh;color:#fff;bottom:5vh;right:5vw;padding:2vh 2vw;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.text[_ngcontent-%COMP%]{margin:auto 1vw auto auto;font-size:2vh}.loader[_ngcontent-%COMP%]{border-radius:50%;border:.5vh solid #f3f3f3;border-top-color:#de1c44;width:2vh;height:2vh;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.done[_ngcontent-%COMP%]{color:#92c91b;font-size:2vh}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}"]}),t})();var te=n("CfRg"),ee=function(t){return Object(te.a)(t,4)};let ne=(()=>{class t{constructor(){this.globalXY={x:0,y:0},this.panXY={x:0,y:0},this.currentClickedBox={box:-1,pos:"o"},this.lineOffset=3,this.anchrSize=2.5,this.currentDrawing={x1:0,x2:0,y1:0,y2:0},this.currentSelectedBndBox=-1,this.util=new pt}getDiffXY({offsetX:t,offsetY:e}){try{const n={diffX:0,diffY:0};return n.diffX=this.globalXY.x+(t-this.panXY.x),n.diffY=this.globalXY.y+(e-this.panXY.y),n}catch(n){return console.log("ObjectDetection getDiffXY(offsetX: number,offsetY: number): { diffX: number; diffY: number }",n.name+": ",n.message),{diffX:-1,diffY:-1}}}setCurrentX1Y1(t,e){try{null!==t&&null!==e&&void 0!==t&&void 0!==e&&(this.currentDrawing.x1=t,this.currentDrawing.y1=e)}catch(n){console.log("ObjectDetection setCurrentX1Y1(MouseX:number, MouseY:number):void",n.name+": ",n.message)}}setCurrentX2Y2(t,e){try{null!==t&&null!==e&&void 0!==t&&void 0!==e&&(this.currentDrawing.x2=t,this.currentDrawing.y2=e)}catch(n){console.log("ObjectDetection setCurrentX2Y2(MouseX:number, MouseY:number):void",n.name+": ",n.message)}}moveAllBbox(t,e,n,i){try{for(const i of t){const t=i.x2-i.x1,a=i.y2-i.y1;i.x1=ee(e+i.distancetoImg.x),i.y1=ee(n+i.distancetoImg.y),i.x2=ee(i.x1+t),i.y2=ee(i.y1+a)}i&&i(!0)}catch(a){}}calScaleTofitScreen(t,e,n,i){try{const a={factor:-1,newX:-1,newY:-1};return a.factor=Math.min(n/t,i/e),a.factor=a.factor-.05*a.factor,a.newX=n/2-t/2*a.factor,a.newY=i/2-e/2*a.factor,a}catch(a){return{factor:-1,newX:-1,newY:-1}}}deleteSingleBox(t,e,n){try{t.splice(e,1),this.currentSelectedBndBox=-1,this.currentClickedBox={box:-1,pos:"o"},n(!0)}catch(i){}}keyboardMoveBox(t,e,{img_w:n,img_h:i,img_x:a,img_y:o},s){try{switch(t){case"up":this.moveBoxWithinPointPath(a,o,n,i,0,-3,e)&&(e.y1-=3,e.y2-=3);break;case"down":this.moveBoxWithinPointPath(a,o,n,i,0,3,e)&&(e.y1+=3,e.y2+=3);break;case"left":this.moveBoxWithinPointPath(a,o,n,i,-3,0,e)&&(e.x1-=3,e.x2-=3);break;case"right":this.moveBoxWithinPointPath(a,o,n,i,3,0,e)&&(e.x1+=3,e.x2+=3)}s(!0)}catch(r){}}moveBoxWithinPointPath(t,e,n,i,a,o,s){try{return!(s.x1+at+n||s.y1+oe+i)}catch(r){return console.log("ObjectDetection isWithinPointPath(imgx:number, imgy:number, imgw:number, imgh:number, addx:number, addy:number, box:Boundingbox):Boolean",r.name+": ",r.message),!1}}mouseMoveBox(t,e,n){try{if(this.moveBoxWithinPointPath(n.img_x,n.img_y,n.img_w,n.img_h,t-this.currentDrawing.x1,e-this.currentDrawing.y1,n.bnd_box[this.currentSelectedBndBox])){this.setCurrentX2Y2(t,e);const i=this.currentDrawing.x2-this.currentDrawing.x1,a=this.currentDrawing.y2-this.currentDrawing.y1;this.setCurrentX1Y1(this.currentDrawing.x2,this.currentDrawing.y2),"i"!==this.currentClickedBox.pos&&"tl"!==this.currentClickedBox.pos&&"l"!==this.currentClickedBox.pos&&"bl"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].x1+=i),"i"!==this.currentClickedBox.pos&&"tl"!==this.currentClickedBox.pos&&"t"!==this.currentClickedBox.pos&&"tr"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].y1+=a),"i"!==this.currentClickedBox.pos&&"tr"!==this.currentClickedBox.pos&&"r"!==this.currentClickedBox.pos&&"br"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].x2+=i),"i"!==this.currentClickedBox.pos&&"bl"!==this.currentClickedBox.pos&&"b"!==this.currentClickedBox.pos&&"br"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].y2+=a)}}catch(i){console.log("ObjectDetection mouseMoveBox(MouseX:number, MouseY:number, CurrMeta:Metadata):void",i.name+": ",i.message)}}getCurrentSelectedBox(){try{return this.currentSelectedBndBox}catch(t){return-1}}setCurrentSelectedbBox(t){try{this.currentSelectedBndBox=t}catch(e){console.log("ObjectDetection setCurrentSelectedbBox(newNUM:number):void",e.name+": ",e.message)}}mouseUpDrawEnable(t,e,n){try{const i={selBox:-1,isNew:!1};if(-1===this.currentClickedBox.box&&null!==this.tmpbox)t.bnd_box.push(this.tmpbox),this.currentSelectedBndBox=t.bnd_box.length-1,t.bnd_box[this.currentSelectedBndBox].label=e.length>0?e[0].name:"",i.isNew=!0,i.selBox=ee(this.currentSelectedBndBox);else if(this.currentClickedBox.box>-1&&this.tmpbox){if(t.bnd_box[this.currentSelectedBndBox].x1>t.bnd_box[this.currentSelectedBndBox].x2){const e=ee(t.bnd_box[this.currentSelectedBndBox].x1);t.bnd_box[this.currentSelectedBndBox].x1=ee(t.bnd_box[this.currentSelectedBndBox].x2),t.bnd_box[this.currentSelectedBndBox].x2=e}if(t.bnd_box[this.currentSelectedBndBox].y1>t.bnd_box[this.currentSelectedBndBox].y2){const e=ee(t.bnd_box[this.currentSelectedBndBox].y1);t.bnd_box[this.currentSelectedBndBox].y1=ee(t.bnd_box[this.currentSelectedBndBox].y2),t.bnd_box[this.currentSelectedBndBox].y2=e}}return this.currentClickedBox={box:-1,pos:"o"},this.setCurrentX1Y1(0,0),this.setCurrentX2Y2(0,0),this.tmpbox=null,n(!0),i}catch(i){return console.log("ObjectDetection MouseUpDrawEnable(CurrMeta: Metadata): number",i.name+": ",i.message),{selBox:-1,isNew:!1}}}panRectangle(t,e,n,i){try{for(const i of t){const t=i.x2-i.x1,a=i.y2-i.y1;i.x1=e+i.distancetoImg.x,i.y1=n+i.distancetoImg.y,i.x2=i.x1+t,i.y2=i.y1+a}i(!0)}catch(a){console.log("ObjectDetection panRectangle(bbox:Boundingbox[], img_X:number, img_Y:number)",a.name+": ",a.message)}}scaleAllBoxes(t,e,n,i,a){try{for(const a of e){const e=a.distancetoImg.x*t+n,o=a.distancetoImg.y*t+i,s=e+(a.x2-a.x1)*t,r=o+(a.y2-a.y1)*t;a.x1=ee(e),a.y1=ee(o),a.x2=ee(s),a.y2=ee(r);const l=a.y1-i;a.distancetoImg.x=ee(a.x1-n),a.distancetoImg.y=ee(l)}a&&a(!0)}catch(o){console.log("ObjectDetection scaleAllBoxes(scalefactor: number,boxes:Boundingbox[],imgX:number,imgY:number)",o.name+": ",o.message)}}mouseMoveDrawEnable(t,e,n){try{-1===this.currentClickedBox.box?this.setCurrentX2Y2(t,e):this.mouseMoveBox(t,e,n)}catch(i){console.log("ObjectDetection MouseMoveDrawEnable(MouseX: number,MouseY: number,SelectedMeta: Metadata): void",i.name+": ",i.message)}}mouseDownDrawEnable(t,e,n){try{return this.getCurrentClickBox(t,e,n),this.setCurrentX1Y1(t,e),this.setCurrentX2Y2(t,e),this.currentSelectedBndBox=-1!==this.currentClickedBox.box?this.currentClickedBox.box:-1,this.currentClickedBox.box}catch(i){return console.log("ObjectDetection MouseDownDrawEnable(MouseX:number,MouseY:number,BBox:Boundingbox[]):number",i.name+": ",i.message),-1}}setPanXY(t,e){try{return!(!t||!e||(this.panXY.x=t,this.panXY.y=e,0))}catch(n){return console.log("ObjectDetection setPanXY(newX: number, newY: number):boolean",n.name+": ",n.message),!1}}setGlobalXY(t,e){try{return!(!t||!e||(this.globalXY.x=t,this.globalXY.y=e,0))}catch(n){return console.log("ObjectDetection SetGlobalXY(newX: number, newY: number):boolean",n.name+": ",n.message),!1}}changeLabel(t,e){t&&e&&(t.label=e)}mouseClickWithinPointPath({img_x:t,img_y:e,img_w:n,img_h:i},{offsetX:a,offsetY:o}){try{return a>t&&ae&&o0)for(const[i,a]of e.entries())i===this.currentClickedBox.box||i===this.currentSelectedBndBox?(a.color="rgba(0,255,0,1.0)",a.lineWidth=2,this.drawEachBoxOn(t,a,n,!0)):(a.color="rgba(255,255,0,0.8)",a.lineWidth=1,this.drawEachBoxOn(t,a,n,!1));if(-1===this.currentClickedBox.box&&-1===this.currentSelectedBndBox){for(const r of e)r.color="rgba(255,255,0,0.8)",this.drawEachBoxOn(t,r,n,!1);const{x1:i,x2:a,y1:o,y2:s}=this.currentDrawing;this.tmpbox=this.generateNewBox(i,a,o,s),this.tmpbox&&this.drawEachBoxOn(t,this.tmpbox,n,!0)}}catch(i){console.log("redraw(boundbox) ----\x3e ",i.name+": ",i.message)}}drawEachBoxOn(t,e,n,i){try{if(n){const a=e.x1+(e.x2-e.x1)/2,o=e.y1+(e.y2-e.y1)/2;n.strokeStyle="white",n.fillStyle="black",n.font="bold 12px Arial",""==e.label?(n.strokeText("",e.x1+10,e.y1+15),n.fillText("",e.x1+10,e.y1+15)):t.find(t=>t.name===e.label)?(n.strokeText(e.label,e.x1+10,e.y1+15),n.fillText(e.label,e.x1+10,e.y1+15)):(n.strokeText("Text",e.x1+10,e.y1+15),n.fillText("Text",e.x1+10,e.y1+15)),n.strokeStyle=e.color,n.beginPath(),n.rect(e.x1,e.y1,e.x2-e.x1,e.y2-e.y1),n.lineWidth=e.lineWidth,n.stroke(),n.fillStyle=e.color,i&&(n.beginPath(),n.fillRect(e.x1-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x1-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x1-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize))}}catch(a){console.log("ObjectDetection drawEachBoxOn(box:Boundingbox, context:CanvasRenderingContext2D, isSelected:boolean):void",a.name+": ",a.message)}}generateNewBox(t,e,n,i){try{const a=te?t:e,r=n>i?n:i;return s-a>this.lineOffset&&r-o>this.lineOffset?{x1:a,y1:o,x2:s,y2:r,lineWidth:2,color:"rgba(0,255,0,1.0)",distancetoImg:{x:0,y:0},label:"",id:this.util.generateUniquesID()}:null}catch(a){return console.log("ObjectDetection GenerateNewBox(x1:number,x2:number,y1:number,y2:number):Boundingbox",a.name+": ",a.message),null}}getBBoxDistfromImg(t,e,n){try{for(const{x1:i,y1:a,distancetoImg:o}of t){const t=a-n;o.x=ee(i-e),o.y=ee(t)}}catch(i){console.log("ObjectDetection GetBBoxDistfromImg(bbox:Boundingbox[],imgX:number,imgY:number)",i.name+": ",i.message)}}getCurrentClickBox(t,e,n){try{return this.currentClickedBox=this.mouseClickOnBoxes(t,e,n),this.currentClickedBox}catch(i){return console.log("ObjectDetection getCurrentClickBox(MouseX:number, MouseY:number, box:Boundingbox[]):{box:number,pos:string}",i.name+": ",i.message),{box:-1,pos:"o"}}}mouseClickOnBoxes(t,e,n){try{for(let i=0;i{class t{constructor(){this.MEMO=null,this.utility=new pt}copy(t){this.MEMO=this.utility.deepCloneVariable(t)}paste(){return this.MEMO?"coorPt"in this.MEMO?this.polygonPaste():this.boundingBoxPaste():null}isAvailable(){return!!this.MEMO}clear(){this.MEMO=null}polygonPaste(){const t=this.utility.deepCloneObject(this.MEMO);let{coorPt:e,id:n}=t;for(const i of e)i.x+=8,i.y+=8,i.distancetoImg.x=0,i.distancetoImg.y=0;return n=this.utility.generateUniquesID(),t}boundingBoxPaste(){const t=this.utility.deepCloneObject(this.MEMO),e=t.x2-t.x1,n=t.y2-t.y1;return t.x1+=8,t.y1+=8,t.x2=t.x1+e,t.y2=t.y1+n,t.id=this.utility.generateUniquesID(),t.distancetoImg.x=0,t.distancetoImg.y=0,t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();const ae={scale:1,factor:.05,max_scale:4};let oe=(()=>{class t{constructor(){this.zoomSubject=new x.a(ae),this.zoom$=this.zoomSubject.asObservable(),this.setState=t=>{this.zoomSubject.next(t?Object.assign(Object.assign({},ae),t):ae)}}resetZoomScale(){this.zoomSubject.next(ae)}calculateZoomScale(t,e,n){let{scale:i}=e;const{factor:a,max_scale:o}=e;let s=t.wheelDelta;void 0===s&&(s=t.detail),s=Math.max(-1,Math.min(1,s));const{scrollLeft:r,scrollTop:l}=n,c=(t.pageX+r)/i,h=(t.pageY+l)/i;return i+=s*a*i,i=Math.max(1,Math.min(o,i)),Object.assign(Object.assign({},{x:c*i-t.pageX,y:h*i-t.pageY}),{scale:i})}validateZoomScale({canvas:{style:{transform:t}}},e){return t!==`scale(${e}, ${e})`}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();const se={move:!1,pointer:!1,grab:!1,grabbing:!1,crosshair:!1,"zoom-in":!1,"zoom-out":!1,"n-resize":!1,"w-resize":!1,"ne-resize":!1,"nw-resize":!1,"se-resize":!1,"sw-resize":!1};let re=(()=>{class t{constructor(){this.mouseCursorSubject=new x.a(se),this.mouseCursor$=this.mouseCursorSubject.asObservable(),this.setState=t=>{this.mouseCursorSubject.next(t?Object.assign(Object.assign({},se),t):se)}}changeCursor(t,e){if(e){const{wheelDelta:t,detail:n}=e;void 0!==t?150===t?this.setState({"zoom-in":!0}):-150===t&&this.setState({"zoom-out":!0}):3===n?this.setState({"zoom-in":!0}):-3===n&&this.setState({"zoom-out":!0})}else for(const[n,i]of Object.entries(t))if(!0===i)return n}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Db({token:t,factory:t.\u0275fac,providedIn:"any"}),t})();const le=["canvasdrawing"],ce=["floatdiv"],he=["lbltypetxt"],de=["availablelbl"];function ue(t,e){if(1&t){const t=u.Nb();u.Mb(0,"li",12),u.Tb("click",function(){u.hc(t);const n=e.$implicit;return u.Vb().labelNameClicked(n.name)}),u.Mb(1,"span",13),u.oc(2),u.Lb(),u.Mb(3,"span",14),u.oc(4),u.Lb(),u.Lb()}if(2&t){const t=e.$implicit;u.xb(2),u.pc(t.name),u.xb(2),u.pc(t.count)}}function be(t,e){1&t&&(u.Mb(0,"li",15),u.Mb(1,"div",16),u.oc(2),u.Wb(3,"translate"),u.Lb(),u.Mb(4,"div",16),u.oc(5),u.Wb(6,"translate"),u.Lb(),u.Lb()),2&t&&(u.xb(2),u.pc(u.Xb(3,2,"searchLabel.labelNotExist")),u.xb(3),u.pc(u.Xb(6,4,"searchLabel.enterToAdd")))}const ge=function(){return{standalone:!0}},fe=function(t){return{cursor:t}};let me=(()=>{class t{constructor(t,e,n,i,a,o,s,r){this._ref=t,this._boundingBoxCanvas=e,this._imgLblStateService=n,this._undoRedoService=i,this._copyPasteService=a,this._annotateSelectState=o,this._zoomService=s,this._mouseCursorService=r,this.image=new Image,this.mousedown=!1,this.unsubscribe$=new l.a,this.labelSearch="",this.labelList=[],this.allLabelList=[],this.showDropdownLabelBox=!1,this.invalidInput=!1,this.closeEnough=5,this._imgSrc="",this._tabStatus=[],this._onChangeMetadata=new u.n,this._onChangeAnnotationLabel=new u.n,this._onEnterLabel=new u.n,this.validateInputLabel=({target:t})=>{const{value:e}=t,n=e.trim();n&&(this._tabStatus.some(({label_list:t})=>t&&t.length&&t.some(t=>t===n))?(this.invalidInput=!0,console.error("Invalid existing label input")):(this.invalidInput=!1,this.showDropdownLabelBox=!1,this._onChangeAnnotationLabel.emit({label:e,index:this.annotateState.annotation}),this._selectMetadata.bnd_box[this.annotateState.annotation].label=e,this._undoRedoService.isStateChange(this._selectMetadata.bnd_box)&&this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"}),this.labelSearch=""))}}ngOnInit(){this.getLabelList(),this._imgLblStateService.action$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>{var{clear:e,fitCenter:n}=t,i=Object(a.b)(t,["clear","fitCenter"]);(e||n||i.drag||i.draw||i.save||i.keyInfo)&&(this.showDropdownLabelBox=!1,this._ref.detectChanges()),this.boundingBoxState=Object.assign(Object.assign({},i),{clear:e,fitCenter:n}),n&&this.imgFitToCenter(),e&&(this._selectMetadata.bnd_box=[],this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"}),this.redrawImage(this._selectMetadata),this.emitMetadata())}),this._annotateSelectState.labelStaging$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>{this.annotateState=t,this._boundingBoxCanvas.setCurrentSelectedbBox(t.annotation),this._selectMetadata&&this.redrawImage(this._selectMetadata)}),this._zoomService.zoom$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>this.zoom=t),this._mouseCursorService.mouseCursor$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>this.mouseCursor=t)}ngOnChanges(t){var e,n,i;if((null===(e=t._selectMetadata)||void 0===e?void 0:e.previousValue)&&(null===(n=t._selectMetadata)||void 0===n?void 0:n.currentValue)&&this.redrawImage(this._selectMetadata),(null===(i=t._imgSrc)||void 0===i?void 0:i.currentValue)&&(this.initializeCanvas(),this._undoRedoService.clearAllStages(),this.loadImage(t._imgSrc.currentValue),this._boundingBoxCanvas.setCurrentSelectedbBox(-1)),t._tabStatus){let t=!0;for(const{closed:e}of this._tabStatus)if(!e){t=!1;break}this.canvas&&(!0===t?(this.initializeCanvas("96%"),this.imgFitToCenter()):this.redrawImage(this._selectMetadata))}}initializeCanvas(t="80%"){this.canvas.nativeElement.style.width=t,this.canvas.nativeElement.style.height="90%",this.canvas.nativeElement.width=this.canvas.nativeElement.offsetWidth,this.canvas.nativeElement.height=this.canvas.nativeElement.offsetHeight,this.canvasContext=this.canvas.nativeElement.getContext("2d")}emitMetadata(){this._onChangeMetadata.emit(this._selectMetadata)}annotateSelectChange(t){this._annotateSelectState.setState(t)}resetZoom(){this._zoomService.resetZoomScale()}imgFitToCenter(){try{const t=this._boundingBoxCanvas.calScaleTofitScreen(this._selectMetadata.img_w,this._selectMetadata.img_h,this.canvas.nativeElement.offsetWidth,this.canvas.nativeElement.offsetHeight);this._selectMetadata.img_w*=t.factor,this._selectMetadata.img_h*=t.factor,this._boundingBoxCanvas.scaleAllBoxes(t.factor,this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y),this._selectMetadata.img_x=t.newX,this._selectMetadata.img_y=t.newY,this._boundingBoxCanvas.setGlobalXY(t.newX,t.newY),this._boundingBoxCanvas.moveAllBbox(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y),this.redrawImage(this._selectMetadata),this.resetZoom(),this.canvasContext.canvas.style.transformOrigin="0 0",this.canvasContext.canvas.style.transform="scale(1, 1)"}catch(t){console.log(t)}}keyStrokeEvent({ctrlKey:t,shiftKey:e,key:n}){try{const{isActiveModal:i}=this.boundingBoxState;if(!this.mousedown&&!i&&!this.showDropdownLabelBox&&this._selectMetadata)if(!t||"c"!==n&&"C"!==n)if(!t||"v"!==n&&"V"!==n){if(t&&e&&("z"===n||"Z"===n)){if(this._undoRedoService.isAllowRedo()){const t=this._undoRedoService.redo();this._selectMetadata=Object(mt.a)(null==t?void 0:t.meta),this.redrawImage(this._selectMetadata),this.getBBoxDistanceFromImage(),this.emitMetadata()}}else if(!t||"z"!==n&&"Z"!==n)if(!i&&this.annotateState.annotation>-1&&("Delete"===n||"Backspace"===n))this._boundingBoxCanvas.deleteSingleBox(this._selectMetadata.bnd_box,this.annotateState.annotation,t=>{t&&(this.annotateSelectChange({annotation:-1,isDlbClick:!1}),this.redrawImage(this._selectMetadata),this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata())});else{const t="ArrowLeft"===n?"left":"ArrowRight"===n?"right":"ArrowUp"===n?"up":"ArrowDown"===n&&"down";t&&this.keyMoveBox(t)}else if(this._undoRedoService.isAllowUndo()){const t=this._undoRedoService.undo();this._selectMetadata=Object(mt.a)(null==t?void 0:t.meta),this.redrawImage(this._selectMetadata),this.getBBoxDistanceFromImage(),this.emitMetadata()}}else{if(this._copyPasteService.isAvailable()){this._copyPasteService.copy(this._selectMetadata.bnd_box[this.annotateState.annotation]);const t=this._copyPasteService.paste();t&&this._selectMetadata.bnd_box.push(t),this.annotateSelectChange({annotation:this._selectMetadata.bnd_box.length-1,isDlbClick:!1}),this.getBBoxDistanceFromImage(),this.redrawImage(this._selectMetadata)}this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata()}else this.annotateState.annotation>-1&&this._copyPasteService.copy(this._selectMetadata.bnd_box[this.annotateState.annotation])}catch(i){console.log(i)}}toggleEvent(t){try{this.annotateState.annotation>-1&&(this._undoRedoService.clearRedundantStages(),this.annotateSelectChange({annotation:this.annotateState.annotation,isDlbClick:!0}))}catch(e){console.log(e)}}mouseScroll(t){try{if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)){const{scale:e,x:n,y:i}=this._zoomService.calculateZoomScale(t,this.zoom,this.canvas.nativeElement);this.boundingBoxState.scroll&&(this._mouseCursorService.changeCursor(this.mouseCursor,t),this._zoomService.validateZoomScale(this.canvasContext,e)&&(this.canvasContext.canvas.style.transformOrigin=`${t.offsetX}px ${t.offsetY}px`,this.canvasContext.canvas.style.transform=`scale(${e}, ${e})`,this._zoomService.setState({scale:e}))),this.canvasContext.canvas.scrollTop=i,this.canvasContext.canvas.scrollLeft=n,this._copyPasteService.isAvailable()&&this._copyPasteService.clear()}}catch(e){console.log(e)}}mouseDown(t){try{if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)){if(this.mousedown=!0,this.boundingBoxState.drag&&(this.changeMouseCursorState({grabbing:!0}),this._boundingBoxCanvas.setPanXY(t.offsetX,t.offsetY)),this.boundingBoxState.draw){const e=this._boundingBoxCanvas.mouseDownDrawEnable(t.offsetX,t.offsetY,this._selectMetadata.bnd_box);this.annotateSelectChange({annotation:e,isDlbClick:!1}),this.redrawImage(this._selectMetadata)}}else this.mousedown=!1}catch(e){console.log(e)}}mouseUp(t){try{this.boundingBoxState.draw&&this.mousedown&&this.finishDrawBoundingBox(t),this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)&&(this.boundingBoxState.drag&&this.mousedown&&this._boundingBoxCanvas.setGlobalXY(this._selectMetadata.img_x,this._selectMetadata.img_y),this.mousedown=!1)}catch(e){console.log(e)}}mouseMove(t){try{if(this._selectMetadata)if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)&&!this.showDropdownLabelBox){if(this.boundingBoxState.drag&&this.mousedown){const e=this._boundingBoxCanvas.getDiffXY(t);this._selectMetadata.img_x=e.diffX,this._selectMetadata.img_y=e.diffY,this._boundingBoxCanvas.panRectangle(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y,t=>{if(t){const t=Object(mt.a)(this._selectMetadata);this._undoRedoService.isMethodChange("pan")?this._undoRedoService.appendStages({meta:t,method:"pan"}):this._undoRedoService.replaceStages({meta:t,method:"pan"})}}),this.redrawImage(this._selectMetadata)}else this.boundingBoxState.drag&&!this.mousedown&&this.changeMouseCursorState({grab:!0});if(this.boundingBoxState.draw&&this.mousedown&&(this._boundingBoxCanvas.mouseMoveDrawEnable(t.offsetX,t.offsetY,this._selectMetadata),this.redrawImage(this._selectMetadata)),this.boundingBoxState.draw&&!this.mousedown){const{box:e,pos:n}=this._boundingBoxCanvas.getCurrentClickBox(t.offsetX,t.offsetY,this._selectMetadata.bnd_box);this.changeMouseCursorState(-1!==e?"tl"===n?{"nw-resize":!0}:"tr"===n?{"ne-resize":!0}:"bl"===n?{"sw-resize":!0}:"br"===n?{"se-resize":!0}:"l"===n||"r"===n?{"w-resize":!0}:"t"===n||"b"===n?{"n-resize":!0}:{move:!0}:{crosshair:!0})}}else this.changeMouseCursorState()}catch(e){console.log(e)}}finishDrawBoundingBox(t){this.getLabelList(),this.sortingLabelList(this.labelList,this._tabStatus[2].annotation&&this._tabStatus[2].annotation[0].bnd_box?this._tabStatus[2].annotation[0].bnd_box:[]);const e=this._boundingBoxCanvas.mouseUpDrawEnable(this._selectMetadata,this.labelList,t=>{t&&(this._undoRedoService.isStateChange(this._selectMetadata.bnd_box)&&this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.getBBoxDistanceFromImage(),this.emitMetadata())});if(e.isNew||"mouseout"===t.type){let e=t.offsetY*(100/document.documentElement.clientHeight)+8.5,n=t.offsetX*(100/document.documentElement.clientWidth)+2.5;e<9&&(e=9),e>76&&(e=76),n<2.5&&(n=2.5),n>66&&(n=66),this.floatdiv.nativeElement.style.top=e.toString()+"vh",this.floatdiv.nativeElement.style.left=n.toString()+"vw",this.showDropdownLabelBox=!0,this.labelSearch="",this.invalidInput=!1,setTimeout(()=>{this.lbltypetxt.nativeElement.focus()},100)}else this.showDropdownLabelBox=!1;e.isNew&&this.annotateSelectChange({annotation:e.selBox,isDlbClick:!1})}changeMouseCursorState(t){this._mouseCursorService.setState(t)}mouseOut(t){var e,n;try{this.boundingBoxState.draw&&this.mousedown&&this.finishDrawBoundingBox(t),"canvasstyle"!==t.target.className&&!t.target.className.includes("unclosedOut")||(null===(e=t.relatedTarget)||void 0===e?void 0:e.className.includes("unclosedOut"))||(null===(n=t.relatedTarget)||void 0===n?void 0:n.className.includes("canvasstyle"))||0!==this._selectMetadata.bnd_box.filter(t=>""===t.label).length&&(this.showDropdownLabelBox=!1,this._selectMetadata.bnd_box=this._selectMetadata.bnd_box.filter(t=>""!==t.label),this._onChangeMetadata.emit(this._selectMetadata),this.redrawImage(this._selectMetadata),alert("Some bounding boxes will be deleted because they were not labelled.")),this.boundingBoxState.drag&&this.mousedown&&(this._boundingBoxCanvas.setGlobalXY(this._selectMetadata.img_x,this._selectMetadata.img_y),this.redrawImage(this._selectMetadata)),this.mousedown=!1}catch(i){console.log(i)}}loadImage(t){try{this.showDropdownLabelBox=!1,this.image.src=t,this.image.onload=()=>{this._selectMetadata.img_w=this._selectMetadata.img_w<1?this._selectMetadata.img_ori_w:this._selectMetadata.img_w,this._selectMetadata.img_h=this._selectMetadata.img_h<1?this._selectMetadata.img_ori_h:this._selectMetadata.img_h,this._boundingBoxCanvas.setGlobalXY(this._selectMetadata.img_x,this._selectMetadata.img_y),this.imgFitToCenter(),this.emitMetadata(),this.changeMouseCursorState(),this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"})}}catch(e){console.log(e)}}keyMoveBox(t){try{const e=this._selectMetadata.bnd_box[this.annotateState.annotation];e&&this._boundingBoxCanvas.keyboardMoveBox(t,e,this._selectMetadata,t=>{t&&(this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.getBBoxDistanceFromImage(),this.redrawImage(this._selectMetadata),this.emitMetadata())})}catch(e){console.log(e)}}redrawImage({img_x:t,img_y:e,img_w:n,img_h:i}){var a;this.clearCanvas(),this.canvasContext.drawImage(this.image,t,e,n,i),0!==(null===(a=this._tabStatus[2].annotation)||void 0===a?void 0:a.length)&&(this.getLabelList(),this.sortingLabelList(this.labelList,this._tabStatus[2].annotation&&this._tabStatus[2].annotation[0].bnd_box?this._tabStatus[2].annotation[0].bnd_box:[])),this._boundingBoxCanvas.drawAllBoxOn(this.labelList,this._selectMetadata.bnd_box,this.canvasContext)}clearCanvas(){this.canvasContext.clearRect(0,0,this.canvas.nativeElement.width,this.canvas.nativeElement.height)}getBBoxDistanceFromImage(){this._boundingBoxCanvas.getBBoxDistfromImg(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y)}getLabelList(){this.labelList=[],this.allLabelList=[],(this._tabStatus[1].label_list?this._tabStatus[1].label_list:[]).forEach(t=>{this.labelList.push({name:t,count:0}),this.allLabelList.push({name:t,count:0})})}labelTypeTextChange(t){this.labelList=this.allLabelList.filter(e=>e.name.includes(t))}labelNameClicked(t){this.showDropdownLabelBox=!1,this._onChangeAnnotationLabel.emit({label:t,index:this.annotateState.annotation}),this._selectMetadata.bnd_box[this.annotateState.annotation].label=t,this._undoRedoService.isStateChange(this._selectMetadata.bnd_box)&&this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"})}sortingLabelList(t,e){t.forEach(({name:t},n)=>{this.labelList[n].count=e.filter(({label:e})=>e===t).length,this.allLabelList[n].count=e.filter(({label:e})=>e===t).length}),this.labelList.sort((t,e)=>t.countt.count{class t{constructor(){this.globalXY={x:-1,y:-1},this.panXY={x:0,y:0},this.clickPoint={polygonIndex:-1,pointIndex:-1},this.clipPath=null,this.radius=3.5,this.distanceOffset=8,this.polygonAreaIndex=-1,this.selectedPolygonIndex=-1,this.util=new pt,this.isNewPoly=!1,this.labelList=[]}mouseDownDraw(t,e,n,i,a,o,s,r){this.labelList=r;const{offsetX:l,offsetY:c}=t;this.polygonAreaIndex=this.findPolygonArea(t,e),this.clickPoint=this.findClickPoint(l,c,e);const h=this.isNewPolygon();return h&&o?this.setPanXY(t):!this.returnTempPoly()&&this.polygonAreaIndex<0&&this.clickPoint.pointIndex<0?(this.setPolygonLineWidth(e,-1),this.selectedPolygonIndex=-1,this.pushTempPoint(t,e),this.setNewPolygon(!0)):h?(this.pushTempPoint(t,e),this.drawNewPolygon(e,i,a,n,!1),this.drawfromPreviousPoint(t,a)):(this.selectedPolygonIndex=this.findPolygonArea(t,e)>-1?this.findPolygonArea(t,e):this.findClickPoint(l,c,e).polygonIndex,this.setPolygonLineWidth(e,this.selectedPolygonIndex),this.setNewPolygon(!1)),this.selectedPolygonIndex}mouseMoveDraw(t,e,n,i,a,o,s,r){const l=this.findPolygonArea(a,t),c=this.isNewPolygon(),{pointIndex:h,polygonIndex:d}=this.clickPoint;if(c&&s&&o){const{diffX:e,diffY:n}=this.getDiffXY(a);t.img_x=e,t.img_y=n,this.panPolygons(t,!0),r("pan")}else c?(this.drawNewPolygon(t,e,n,i,!1),this.drawfromPreviousPoint(a,n)):s&&-1===h&&this.selectedPolygonIndex>-1?(this.mouseMovePolygon(a,t,n,this.selectedPolygonIndex,e,i),this.resetClipPath(t),r("pan")):s&&h>-1&&d>-1&&(this.setPolygonCoordinate(a,t,this.clickPoint),r("draw"));return l>-1}setPanXY({offsetX:t,offsetY:e}){try{this.panXY={x:t,y:e}}catch(n){console.log("setPanXY",n)}}getPanXY(){return this.panXY}getDiffXY({offsetX:t,offsetY:e}){try{const n={diffX:0,diffY:0},{x:i,y:a}=this.getGlobalXY();return n.diffX=i+(t-this.panXY.x),n.diffY=a+(e-this.panXY.y),n}catch(n){return console.log(n),{diffX:-1,diffY:-1}}}setSelectedPolygon(t,e){this.selectedPolygonIndex=t,e&&this.setPolygonLineWidth(e,this.selectedPolygonIndex)}getSelectedPolygonIndex(){return this.selectedPolygonIndex}mouseClickWithinPointPath({img_x:t,img_y:e,img_w:n,img_h:i},{offsetX:a,offsetY:o}){return a>t&&ae&&o1?(this.tmpPolygon.coorPt.pop(),!1):(this.resetDrawing(t,n,e,i),!0)}catch(o){return console.log("removeLastPoint",o),!1}}calculatePointDistance(t,e,n,i){try{const a=t-n,o=e-i;return Math.sqrt(a*a+o*o)}catch(a){return void console.log("calculatePointDistance",a)}}generateNewTempPolygon(t){try{const e=this.util.generateUniquesID(),n=(t+1).toString();this.tmpPolygon={coorPt:[],label:this.labelList.length>0?this.labelList[0].name:"",id:e,lineWidth:2,color:"rgba(0,255,0,1.0)",region:n,subLabel:[]}}catch(e){console.log("generateNewTempPolygon",e)}}getClickPoint(){return this.clickPoint}resetClickPoint(){this.clickPoint={pointIndex:-1,polygonIndex:-1}}resetDrawing(t,e,n,i){try{this.tmpPolygon=null,this.setNewPolygon(!1),this.redraw(t,e,n,i,-1)}catch(a){console.log("resetDrawing",a)}}setNewPolygon(t){this.isNewPoly=t}redraw(t,e,n,{width:i,height:a},o){try{const{img_w:s,img_h:r,img_x:l,img_y:c}=t;n.restore(),n.clearRect(0,0,i,a),n.save(),n.beginPath(),n.rect(l,c,s,r),n.clip(),n.beginPath(),n.drawImage(e,l,c,s,r),this.drawAllPolygon(t,n,o)}catch(s){console.log("redraw",s)}}drawAllPolygon(t,e,n){try{this.validatePolygonMetadata(t.polygons)&&(this.drawAllPolygonLine(t,e),this.drawAllPolygonsDots(t,e,n,this.radius),this.plotAllFloatLabel(t,e))}catch(i){console.log("drawAllPolygon",i)}}validatePolygonMetadata(t){return t.length>0}drawAllPolygonLine({polygons:t},e){try{for(const[n,{lineWidth:i,color:a,coorPt:o}]of t.entries()){e.lineWidth=i,e.strokeStyle=a||"white",e.fillStyle=a||"white",e.beginPath(),e.moveTo(o[0].x,o[0].y);for(const[t]of o.entries())t+1{const{x:i,y:a}=n[0];e.strokeStyle="white",e.fillStyle="black",e.font="bold 12px Arial",e.strokeText(t,i+10,a+15),e.fillText(t,i+10,a+15)})}catch(n){console.log("plotAllFloatLabel",n)}}setGlobalXY({offsetX:t,offsetY:e}){try{this.globalXY={x:t,y:e}}catch(n){console.log("setGlobalXY",n)}}getGlobalXY(){return this.globalXY}mouseMovePolygon({offsetX:t,offsetY:e},n,i,a,o,s){try{const{x:r,y:l}=this.getGlobalXY(),c=t-r,h=e-l;if(this.withinPointPath(n,a,{offsetX:c,offsetY:h})){this.setGlobalXY({offsetX:t,offsetY:e});for(const[t]of n.polygons[a].coorPt.entries())n.polygons[a].coorPt[t].x+=c,n.polygons[a].coorPt[t].y+=h;this.redraw(n,o,i,s,a)}}catch(r){console.log("mouseMovePolygon",r)}}keyboardMovePolygon(t,e,n,i,a,o,s){try{if(n>-1){const r=-3;switch(e){case"up":if(this.withinPointPath(t,n,{offsetX:0,offsetY:r}))for(const[e]of t.polygons[n].coorPt.entries())t.polygons[n].coorPt[e].y+=r;break;case"down":if(this.withinPointPath(t,n,{offsetX:0,offsetY:r}))for(const[e]of t.polygons[n].coorPt.entries())t.polygons[n].coorPt[e].y-=r;break;case"left":if(this.withinPointPath(t,n,{offsetX:r,offsetY:0}))for(const[e]of t.polygons[n].coorPt.entries())t.polygons[n].coorPt[e].x+=r;break;case"right":if(this.withinPointPath(t,n,{offsetX:r,offsetY:0}))for(const[e]of t.polygons[n].coorPt.entries())t.polygons[n].coorPt[e].x-=r}this.redraw(t,i,a,o,n),s(!0)}return!0}catch(r){return console.log("keyboardMovePolygon",r),!0}}withinPointPath({polygons:t,img_x:e,img_y:n,img_w:i,img_h:a},o,{offsetX:s,offsetY:r}){try{for(const[l]of t[o].coorPt.entries())return!(t[o].coorPt[l].x+se+i||t[o].coorPt[l].y+rn+a)}catch(l){return!1}}validateXYDistance(t){try{for(const[e]of t.polygons.entries())for(const[n]of t.polygons[e].coorPt.entries()){const i=t.polygons[e].coorPt[n].y-t.img_y;t.polygons[e].coorPt[n].distancetoImg.x=t.polygons[e].coorPt[n].x-t.img_x,t.polygons[e].coorPt[n].distancetoImg.y=i}}catch(e){console.log("validateXYDistance",e)}}setPolygonLineWidth(t,e){try{t.polygons=t.polygons.map((t,n)=>Object.assign(Object.assign({},t),{lineWidth:t.lineWidth=n===e?2:1,color:t.color=n===e?"rgba(0,255,0,1.0)":"rgba(255,255,0,0.8)"}))}catch(n){console.log("setPolygonLineWidth",n)}}drawNewPolygon(t,e,n,i,a){var o;try{if(this.redraw(t,e,n,i,-1),null===(o=this.tmpPolygon)||void 0===o?void 0:o.coorPt){for(const[t,{x:e,y:i}]of this.tmpPolygon.coorPt.entries())n.strokeStyle="green",n.fillStyle="green",n.beginPath(),n.arc(e,i,this.radius,0,2*Math.PI),n.fill(),n.closePath(),n.stroke();n.beginPath(),n.lineWidth=this.tmpPolygon.lineWidth,n.strokeStyle=this.tmpPolygon.color,n.fillStyle=this.tmpPolygon.color,n.moveTo(this.tmpPolygon.coorPt[0].x,this.tmpPolygon.coorPt[0].y);for(const[t]of this.tmpPolygon.coorPt.entries())t+1-1&&a>-1&&(n.polygons[i].coorPt[a].x=t,n.polygons[i].coorPt[a].y=e)}catch(o){console.log("setPolygonCoordinate",o)}}insidePolygonArea(t,{offsetX:e,offsetY:n}){try{let i=!1;for(let a=0,o=t.length-1;an!=t[o].y>n&&e<(t[o].x-t[a].x)*(n-t[a].y)/(t[o].y-t[a].y)+t[a].x&&(i=!i);return i}catch(i){return console.log("insidePolygonArea",i),!1}}calPolygonArea({coorPt:t}){try{let e=0,n=t.length-1;for(let i=0;i{class t{constructor(t,e,n,i,a,o,s){this._segCanvasService=t,this._imgLblStateService=e,this._undoRedoService=n,this._copyPasteService=i,this._annotateSelectState=a,this._zoomService=o,this._mouseCursorService=s,this.image=new Image,this.isMouseWithinPoint=!1,this.altKey=!1,this.ctrlKey=!1,this.unsubscribe$=new l.a,this.mousedown=!1,this.showDropdownLabelBox=!1,this.labelSearch="",this.labelList=[],this.allLabelList=[],this._imgSrc="",this._tabStatus=[],this._onChangeMetadata=new u.n,this._onChangeAnnotationLabel=new u.n}ngOnInit(){this.getLabelList(),this._imgLblStateService.action$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>{var{clear:e,fitCenter:n}=t,i=Object(a.b)(t,["clear","fitCenter"]);this.segState=Object.assign(Object.assign({},i),{clear:e,fitCenter:n}),n&&this.imgFitToCenter(),e&&(this._selectMetadata.polygons=[],this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"}),this.redrawImage(this._selectMetadata),this.emitMetadata())}),this._annotateSelectState.labelStaging$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>{this.annotateState=t,this._selectMetadata&&(this._segCanvasService.setSelectedPolygon(t.annotation,this._selectMetadata),this.redrawImage(this._selectMetadata))}),this._zoomService.zoom$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>this.zoom=t),this._mouseCursorService.mouseCursor$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(t=>this.mouseCursor=t)}ngOnChanges(t){var e,n,i;(null===(e=t._selectMetadata)||void 0===e?void 0:e.previousValue)&&(null===(n=t._selectMetadata)||void 0===n?void 0:n.currentValue)&&this.redrawImage(this._selectMetadata),(null===(i=t._imgSrc)||void 0===i?void 0:i.currentValue)&&(this.initializeCanvas(),this._undoRedoService.clearAllStages(),this._segCanvasService.setSelectedPolygon(-1),this.loadImage(t._imgSrc.currentValue))}initializeCanvas(){this.canvas.nativeElement.style.width="80%",this.canvas.nativeElement.style.height="90%",this.canvas.nativeElement.width=this.canvas.nativeElement.offsetWidth,this.canvas.nativeElement.height=this.canvas.nativeElement.offsetHeight,this.canvasContext=this.canvas.nativeElement.getContext("2d")}loadImage(t){this.image.src=t,this.image.onload=()=>{const{img_x:t,img_y:e}=this._selectMetadata;this._selectMetadata.img_w=this._selectMetadata.img_w<1?this._selectMetadata.img_ori_w:this._selectMetadata.img_w,this._selectMetadata.img_h=this._selectMetadata.img_h<1?this._selectMetadata.img_ori_h:this._selectMetadata.img_h,this._segCanvasService.setGlobalXY({offsetX:t,offsetY:e}),this.imgFitToCenter(),this.emitMetadata(),this.changeMouseCursorState()}}emitMetadata(){this._onChangeMetadata.emit(this._selectMetadata)}annotateStateChange(t){t&&this._annotateSelectState.setState(t)}resetZoom(){this._zoomService.resetZoomScale()}imgFitToCenter(){try{const t=this._segCanvasService.calScaleToFitScreen(this._selectMetadata,this.canvas.nativeElement);this._selectMetadata.img_w*=t.factor,this._selectMetadata.img_h*=t.factor,this._selectMetadata.img_x=t.newX,this._selectMetadata.img_y=t.newY,this._segCanvasService.scalePolygons(this._selectMetadata,t),this._segCanvasService.setGlobalXY({offsetX:t.newX,offsetY:t.newY}),this._segCanvasService.panPolygons(this._selectMetadata,!1,t=>{if(t){const t=Object(mt.a)(this._selectMetadata);this._undoRedoService.isMethodChange("zoom")?this._undoRedoService.appendStages({meta:t,method:"zoom"}):this._undoRedoService.replaceStages({meta:t,method:"zoom"})}}),this.redrawImage(this._selectMetadata),this.resetZoom(),this.canvasContext.canvas.style.transformOrigin="0 0",this.canvasContext.canvas.style.transform="scale(1, 1)"}catch(t){console.log("imgFitToCenter",t)}}redrawImage({img_x:t,img_y:e,img_w:n,img_h:i}){var a,o;if(this.clearcanvas(),this.canvasContext.drawImage(this.image,t,e,n,i),0!==(null===(a=this._tabStatus[2].annotation)||void 0===a?void 0:a.length)){this.getLabelList();const t=this._tabStatus[2].annotation&&null!==(o=this._tabStatus[2].annotation[0].polygons)&&void 0!==o?o:[];this.sortingLabelList(this.labelList,t)}this._segCanvasService.drawAllPolygon(this._selectMetadata,this.canvasContext,this.annotateState.annotation)}clearcanvas(){const{width:t,height:e}=this.canvas.nativeElement;this.canvasContext.clearRect(0,0,t,e)}mouseScroll(t){try{if(this.isMouseWithinPoint=this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t),this.isMouseWithinPoint){const{scale:e,x:n,y:i}=this._zoomService.calculateZoomScale(t,this.zoom,this.canvas.nativeElement);this.segState.scroll&&(this._mouseCursorService.changeCursor(this.mouseCursor,t),this._zoomService.validateZoomScale(this.canvasContext,e)&&(this.canvasContext.canvas.style.transformOrigin=`${t.offsetX}px ${t.offsetY}px`,this.canvasContext.canvas.style.transform=`scale(${e}, ${e})`,this._zoomService.setState({scale:e}))),this.canvasContext.canvas.scrollTop=i,this.canvasContext.canvas.scrollLeft=n,this._copyPasteService.isAvailable()&&this._copyPasteService.clear()}}catch(e){console.log("mouseScroll",e)}}validateEndDrawPolygon({isActiveModal:t,draw:e},n,i){return!t&&e&&n&&"none"!==i.canvas.style.pointerEvents}canvasDblClickEvent(t){this.validateEndDrawPolygon(this.segState,this.isMouseWithinPoint,this.canvasContext)&&(this._segCanvasService.isNewPolygon()&&(this._segCanvasService.drawNewPolygon(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement,!0),this.positioningLabelListPopup(this._selectMetadata.polygons),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata()),this.annotateState.annotation>-1&&this.annotateStateChange({annotation:this.annotateState.annotation,isDlbClick:!0}))}canvasKeyDownEvent({ctrlKey:t,shiftKey:e,key:n}){try{if(this.validateEndDrawPolygon(this.segState,this.isMouseWithinPoint,this.canvasContext)){if(this._segCanvasService.isNewPolygon())switch(n){case"Enter":this._segCanvasService.drawNewPolygon(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement,!0),this.positioningLabelListPopup(this._selectMetadata.polygons),this.annotateStateChange({annotation:this._selectMetadata.polygons.length-1}),this._segCanvasService.validateXYDistance(this._selectMetadata),this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.redrawImage(this._selectMetadata),this.emitMetadata();break;case"Escape":this._segCanvasService.resetDrawing(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement)}else switch(n){case"Delete":case"Backspace":this._segCanvasService.deleteSinglePolygon(this._selectMetadata,this.annotateState.annotation,t=>{t&&(this.annotateStateChange(),this.redrawImage(this._selectMetadata),this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata())})}const t="ArrowLeft"===n?"left":"ArrowRight"===n?"right":"ArrowUp"===n?"up":"ArrowDown"===n&&"down";t&&this.keyMoveBox(t)}if(!t||"c"!==n&&"C"!==n)if(!t||"v"!==n&&"V"!==n){if(t&&e&&("z"===n||"Z"===n)){if(this._undoRedoService.isAllowRedo()){const t=this._undoRedoService.redo();this._selectMetadata=Object(mt.a)(null==t?void 0:t.meta),this.redrawImage(this._selectMetadata),this.emitMetadata()}}else if(t&&("z"===n||"Z"===n)&&this._undoRedoService.isAllowUndo()){const t=this._undoRedoService.undo();this._selectMetadata=Object(mt.a)(null==t?void 0:t.meta),this.redrawImage(this._selectMetadata),this.emitMetadata()}}else this._copyPasteService.isAvailable()&&(this._selectMetadata.polygons.push(this._copyPasteService.paste()),this.annotateStateChange({annotation:this._selectMetadata.polygons.length-1}),this._segCanvasService.validateXYDistance(this._selectMetadata)),this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata();else this.annotateState.annotation>-1&&this._copyPasteService.copy(this._selectMetadata.polygons[this.annotateState.annotation])}catch(i){console.log("canvasKeyDownEvent",i)}}keyMoveBox(t){try{this._selectMetadata.polygons[this.annotateState.annotation]&&this._segCanvasService.keyboardMovePolygon(this._selectMetadata,t,this.annotateState.annotation,this.image,this.canvasContext,this.canvas.nativeElement,t=>{t&&(this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata())})}catch(e){console.log("keyMoveBox",e)}}mouseDown(t){var e;try{if(this.isMouseWithinPoint=this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t),this.isMouseWithinPoint)if(this.mousedown=!0,this.segState.drag&&(this.changeMouseCursorState({grabbing:!0}),this._segCanvasService.setPanXY(t),this.initializeCanvas(),this.redrawImage(this._selectMetadata)),this.segState.draw){this.getLabelList();const n=this._tabStatus[2].annotation&&null!==(e=this._tabStatus[2].annotation[0].polygons)&&void 0!==e?e:[];this.sortingLabelList(this.labelList,n),this.showDropdownLabelBox=!1;const i=this._segCanvasService.mouseDownDraw(t,this._selectMetadata,this.canvas.nativeElement,this.image,this.canvasContext,this.ctrlKey,this.altKey,this.labelList);if(i>-1)this._segCanvasService.setGlobalXY(t);else{const{img_x:t,img_y:e}=this._selectMetadata;this._segCanvasService.setGlobalXY({offsetX:t,offsetY:e})}this.annotateStateChange({annotation:i}),this.redrawImage(this._selectMetadata),this.mouseMoveDrawCanvas(t)}else this.segState.draw&&!this.mousedown&&this.redrawImage(this._selectMetadata);else this.mousedown=!1}catch(n){console.log("mouseDown",n)}}mouseUp(t){try{this.isMouseWithinPoint=this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t);const e=this._segCanvasService.isNewPolygon();if(this._selectMetadata&&this.isMouseWithinPoint)if(this.mousedown){const{img_x:t,img_y:n}=this._selectMetadata;this.segState.drag&&this._segCanvasService.setGlobalXY({offsetX:t,offsetY:n}),this.segState.draw&&!e&&this.annotateState.annotation>-1&&this._undoRedoService.isStateChange(this._selectMetadata.polygons)&&(this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this._segCanvasService.setGlobalXY({offsetX:t,offsetY:n}),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata())}else{const{pointIndex:t,polygonIndex:e}=this._segCanvasService.getClickPoint();this.segState.draw&&e>-1&&t>-1?this._undoRedoService.isStateChange(this._selectMetadata.polygons)&&(this._undoRedoService.appendStages({meta:Object(mt.a)(this._selectMetadata),method:"draw"}),this._segCanvasService.resetClickPoint(),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata()):this.segState.draw&&(this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata())}this.mousedown=!1}catch(e){console.log("mouseUp",e)}}mouseMove(t){try{if(this.isMouseWithinPoint=this._selectMetadata&&this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t),this.isMouseWithinPoint){if(this.segState.drag&&this.mousedown){const{diffX:e,diffY:n}=this._segCanvasService.getDiffXY(t);this._selectMetadata.img_x=e,this._selectMetadata.img_y=n,this._segCanvasService.panPolygons(this._selectMetadata,!1,t=>{if(t){const t=Object(mt.a)(this._selectMetadata);this._undoRedoService.isMethodChange("pan")?this._undoRedoService.appendStages({meta:t,method:"pan"}):this._undoRedoService.replaceStages({meta:t,method:"pan"})}}),this.redrawImage(this._selectMetadata)}else this.segState.drag&&!this.mousedown&&this.changeMouseCursorState({grab:!0});if(this.segState.draw){const e=this.mouseMoveDrawCanvas(t);this.changeMouseCursorState(e?{move:!0}:{crosshair:!0})}}else this.changeMouseCursorState(),this.mousedown=!1}catch(e){console.log("mouseMove",e)}}mouseMoveDrawCanvas(t){return this._segCanvasService.mouseMoveDraw(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement,t,this.ctrlKey,this.mousedown,t=>{this.redrawImage(this._selectMetadata)})}changeMouseCursorState(t){this._mouseCursorService.setState(t)}mouseOut(t){var e,n;try{this.segState.drag&&this.isMouseWithinPoint&&this.mousedown&&(this._segCanvasService.setGlobalXY(t),this.redrawImage(this._selectMetadata)),"canvasstyle"!==t.target.className&&!t.target.className.includes("unclosedOut")||(null===(e=t.relatedTarget)||void 0===e?void 0:e.className.includes("unclosedOut"))||(null===(n=t.relatedTarget)||void 0===n?void 0:n.className.includes("canvasstyle"))||(this.showDropdownLabelBox=!1,0!==this._selectMetadata.polygons.filter(t=>!t.label).length&&(this._selectMetadata.polygons=this._selectMetadata.polygons.filter(t=>""!==t.label),this._onChangeMetadata.emit(this._selectMetadata),this.redrawImage(this._selectMetadata),alert("Some bounding boxes will be deleted because they were not labelled."))),this.isMouseWithinPoint=!1}catch(i){console.log("mouseOut",i)}}currentCursor(){return this._mouseCursorService.changeCursor(this.mouseCursor)}positioningLabelListPopup(t){let e=t[this._selectMetadata.polygons.length-1].coorPt[this._selectMetadata.polygons[this._selectMetadata.polygons.length-1].coorPt.length-1].y*(100/document.documentElement.clientHeight)+8.5,n=t[this._selectMetadata.polygons.length-1].coorPt[this._selectMetadata.polygons[this._selectMetadata.polygons.length-1].coorPt.length-1].x*(100/document.documentElement.clientWidth)+2.5;e<9&&(e=9),e>76&&(e=76),n<2.5&&(n=2.5),n>66&&(n=66),this.floatdiv.nativeElement.style.top=e.toString()+"vh",this.floatdiv.nativeElement.style.left=n.toString()+"vw",this.showDropdownLabelBox=!0,this.labelSearch="",setTimeout(()=>{this.lbltypetxt.nativeElement.focus()},100)}getLabelList(){var t;this.labelList=[],this.allLabelList=[],(null!==(t=this._tabStatus[1].label_list)&&void 0!==t?t:[]).forEach(t=>{const e={name:t,count:0};this.labelList.push(e),this.allLabelList.push(e)})}sortingLabelList(t,e){t.forEach(({name:t},n)=>{this.labelList[n].count=e.filter(({label:e})=>e===t).length,this.allLabelList[n].count=e.filter(({label:e})=>e===t).length}),this.labelList.sort((t,e)=>t.countt.counte.name.includes(t))}ngOnDestroy(){this._annotateSelectState.setState(),this.unsubscribe$.next(),this.unsubscribe$.complete()}}return t.\u0275fac=function(e){return new(e||t)(u.Hb(pe),u.Hb(M),u.Hb(_t),u.Hb(ie),u.Hb(S),u.Hb(oe),u.Hb(re))},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-segmentation"]],viewQuery:function(t,e){if(1&t&&(u.tc(_e,!0),u.tc(ve,!0),u.tc(ye,!0),u.tc(xe,!0)),2&t){let t;u.ec(t=u.Ub())&&(e.canvas=t.first),u.ec(t=u.Ub())&&(e.floatdiv=t.first),u.ec(t=u.Ub())&&(e.lbltypetxt=t.first),u.ec(t=u.Ub())&&(e.availablelbl=t.first)}},hostBindings:function(t,e){1&t&&u.Tb("wheel",function(t){return e.mouseScroll(t)})("DOMMouseScroll",function(t){return e.mouseScroll(t)})("dblclick",function(t){return e.canvasDblClickEvent(t)})("keydown",function(t){return e.canvasKeyDownEvent(t)},!1,u.gc)("mousedown",function(t){return e.mouseDown(t)})("mouseup",function(t){return e.mouseUp(t)})("mousemove",function(t){return e.mouseMove(t)})("mouseout",function(t){return e.mouseOut(t)})},inputs:{_selectMetadata:"_selectMetadata",_imgSrc:"_imgSrc",_tabStatus:"_tabStatus"},outputs:{_onChangeMetadata:"_onChangeMetadata",_onChangeAnnotationLabel:"_onChangeAnnotationLabel"},features:[u.vb],decls:13,vars:9,consts:[[1,"floatdiv","unclosedOut",3,"hidden"],["floatdiv",""],["autocomplete","off","spellcheck","false",1,"unclosedOut"],["type","text",1,"lbltypetxt","unclosedOut",3,"ngModel","ngModelOptions","ngModelChange"],["lbltypetxt",""],[1,"availablelbl","unclosedOut"],["availablelbl",""],[1,"lblList","unclosedOut"],["class","lblElement unclosedOut",3,"click",4,"ngFor","ngForOf"],["class","unclosedOut notExist",4,"ngIf"],[1,"canvasstyle",3,"ngStyle"],["canvasdrawing",""],[1,"lblElement","unclosedOut",3,"click"],[1,"lblName","unclosedOut"],[1,"lblCount","unclosedOut"],[1,"unclosedOut","notExist"],[1,"unclosedOut"]],template:function(t,e){1&t&&(u.Mb(0,"div"),u.Mb(1,"div",0,1),u.Mb(3,"form",2),u.Mb(4,"input",3,4),u.Tb("ngModelChange",function(t){return e.labelSearch=t})("ngModelChange",function(t){return e.labelTypeTextChange(t)}),u.Lb(),u.Lb(),u.Mb(6,"div",5,6),u.Mb(8,"ul",7),u.mc(9,we,5,2,"li",8),u.mc(10,Se,7,6,"li",9),u.Lb(),u.Lb(),u.Lb(),u.Ib(11,"canvas",10,11),u.Lb()),2&t&&(u.xb(1),u.ac("hidden",!e.showDropdownLabelBox),u.xb(3),u.ac("ngModel",e.labelSearch)("ngModelOptions",u.cc(6,Ce)),u.xb(5),u.ac("ngForOf",e.labelList),u.xb(1),u.ac("ngIf",0===e.labelList.length),u.xb(1),u.ac("ngStyle",u.dc(7,Me,e.currentCursor())))},directives:[yt.n,yt.g,yt.h,yt.a,yt.f,yt.i,i.j,i.k,i.l],pipes:[E.c],styles:[".canvasstyle[_ngcontent-%COMP%]{position:fixed;left:2.2vw;right:auto;top:8vh;overflow:scroll;scrollbar-width:none;margin:0;padding:0;outline:none;border:none}.floatdiv[_ngcontent-%COMP%]{position:absolute;z-index:10000}.availablelbl[_ngcontent-%COMP%]{background-color:#000;width:11vw;height:15vh;color:snow;font-size:2vh;font-weight:700;outline:none;border-radius:.2vh;border:.2vw solid grey;border-top:.1vh dotted snow;overflow:auto;scrollbar-width:none}.availablelbl[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.lblList[_ngcontent-%COMP%]{padding:0 .2vw}.lblElement[_ngcontent-%COMP%]{list-style-type:none;margin:.3vh 0;padding:0;-webkit-justify-content:space-between;justify-content:space-between;display:-webkit-flex;display:flex}.lblElement[_ngcontent-%COMP%]:hover{background-color:#111}.lblName[_ngcontent-%COMP%]{margin-left:.2vw;overflow:hidden;text-overflow:ellipsis}.lblCount[_ngcontent-%COMP%]{background-color:#222;margin-right:.2vw;padding:.1vh .2vw;border-radius:.2vw}.notExist[_ngcontent-%COMP%]{color:#999;font-size:1.5vh}.lbltypetxt[_ngcontent-%COMP%]{width:11vw;height:4vh;color:snow;font-size:2vh;background-color:#000;outline:none;border-radius:.2vh;border:.2vw solid grey;border-bottom:none;padding:0;text-indent:.4vw}.invalidInput[_ngcontent-%COMP%]{border:.2vw solid red}.validInput[_ngcontent-%COMP%]{border:.2vw solid grey}"],changeDetection:0}),t})();const Pe=["subLabelSelect"];function Oe(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"image-labelling-object-detection",51),u.Tb("_onChangeMetadata",function(e){return u.hc(t),u.Vb().onChangeMetadata(e)})("_onChangeAnnotationLabel",function(e){return u.hc(t),u.Vb().onChangeAnnotationLabel(e)})("_onEnterLabel",function(e){return u.hc(t),u.Vb().onProcessLabel(e)}),u.Lb(),u.Jb()}if(2&t){const t=u.Vb();u.xb(1),u.ac("_selectMetadata",t.selectedMetaData)("_imgSrc",t.imgSrc)("_tabStatus",t.tabStatus)}}function Le(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"image-labelling-segmentation",52),u.Tb("_onChangeMetadata",function(e){return u.hc(t),u.Vb().onChangeMetadata(e)})("_onChangeAnnotationLabel",function(e){return u.hc(t),u.Vb().onChangeAnnotationLabel(e)}),u.Lb(),u.Jb()}if(2&t){const t=u.Vb();u.xb(1),u.ac("_selectMetadata",t.selectedMetaData)("_imgSrc",t.imgSrc)("_tabStatus",t.tabStatus)}}function Ie(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",53),u.Mb(2,"label",54),u.Mb(3,"input",55),u.Tb("change",function(){return u.hc(t),u.Vb().onSwitchSaveType()}),u.Lb(),u.Ib(4,"span",56),u.Mb(5,"p"),u.oc(6),u.Wb(7,"translate"),u.Lb(),u.Lb(),u.Ib(8,"span",57),u.Mb(9,"label",54),u.Mb(10,"input",55),u.Tb("change",function(){return u.hc(t),u.Vb().onSwitchSaveType()}),u.Lb(),u.Ib(11,"span",56),u.Mb(12,"p"),u.oc(13),u.Wb(14,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Mb(15,"div",58),u.Tb("click",function(){return u.hc(t),u.Vb().showAdvSettings()}),u.oc(16),u.Wb(17,"translate"),u.Lb(),u.Mb(18,"button",59),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("pascalVoc")}),u.oc(19,"Pascal VOC"),u.Lb(),u.Ib(20,"br"),u.Mb(21,"button",59),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("yolo")}),u.oc(22,"YOLO"),u.Lb(),u.Ib(23,"br"),u.Mb(24,"button",59),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("ocr")}),u.oc(25,"Text OCR"),u.Lb(),u.Ib(26,"br"),u.Mb(27,"button",59),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("label")}),u.oc(28,"Label"),u.Lb(),u.Ib(29,"br"),u.Jb()}if(2&t){const t=u.Vb();u.xb(3),u.ac("checked",t.saveType.saveCurrentImage),u.xb(3),u.pc(u.Xb(7,5,"singleSave")),u.xb(4),u.ac("checked",t.saveType.saveBulk),u.xb(3),u.pc(u.Xb(14,7,"bulkSave")),u.xb(3),u.pc(u.Xb(17,9,"advModal.title"))}}function Ae(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"button",59),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("coco")}),u.oc(2,"COCO"),u.Lb(),u.Ib(3,"br"),u.Mb(4,"button",59),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("json")}),u.oc(5,"JSON"),u.Lb(),u.Ib(6,"br"),u.Mb(7,"button",59),u.Tb("click",function(){return u.hc(t),u.Vb().onClickDownload("label")}),u.oc(8,"Label"),u.Lb(),u.Ib(9,"br"),u.Jb()}}function je(t,e){1&t&&(u.Mb(0,"p",60),u.oc(1),u.Wb(2,"translate"),u.Lb()),2&t&&(u.xb(1),u.qc(" ",u.Xb(2,1,"advModal.instructionText")," "))}function Be(t,e){if(1&t&&(u.Mb(0,"div",61),u.Mb(1,"label",62),u.Mb(2,"input",55),u.Tb("change",function(){const t=e.$implicit;return t.isChoosen=!t.isChoosen}),u.Lb(),u.Ib(3,"span",56),u.Lb(),u.Mb(4,"label",63),u.oc(5),u.Lb(),u.Lb()),2&t){const t=e.$implicit;u.xb(2),u.ac("checked",t.isChoosen),u.xb(3),u.pc(t.label)}}function Ee(t,e){1&t&&(u.Mb(0,"div"),u.oc(1),u.Wb(2,"translate"),u.Lb()),2&t&&(u.xb(1),u.qc(" ",u.Xb(2,1,"advModal.noLabel")," "))}function ze(t,e){if(1&t){const t=u.Nb();u.Mb(0,"button",64),u.Tb("click",function(){return u.hc(t),u.Vb().saveAdvSettings()}),u.oc(1),u.Wb(2,"translate"),u.Lb()}2&t&&(u.xb(1),u.qc(" ",u.Xb(2,1,"advModal.btnSave")," "))}function Te(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"option",65),u.oc(2),u.Lb(),u.Jb()),2&t){const t=e.$implicit,n=u.Vb(2);u.xb(1),u.ac("value",t)("selected",t===n.currentAnnotationLabel),u.xb(1),u.qc(" ",t," ")}}function De(t,e){if(1&t&&(u.Kb(0),u.mc(1,Te,3,3,"ng-container",23),u.Jb()),2&t){const t=e.$implicit;u.xb(1),u.ac("ngForOf",t.label_list)}}function Ne(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"option",65),u.oc(2),u.Lb(),u.Jb()),2&t){const t=e.$implicit,n=u.Vb().$implicit;u.xb(1),u.ac("value",t)("selected",n.label_list[0].label),u.xb(1),u.qc(" ",t," ")}}function Re(t,e){if(1&t&&(u.Kb(0),u.mc(1,Ne,3,3,"ng-container",23),u.Jb()),2&t){const t=e.$implicit;u.xb(1),u.ac("ngForOf",t.label_list)}}function Fe(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"div",66),u.oc(2),u.Lb(),u.Jb()),2&t){const t=u.Vb();u.xb(2),u.qc(" ",t.subLabelValidateMsg," ")}}function Xe(t,e){if(1&t){const t=u.Nb();u.Kb(0),u.Mb(1,"div",67),u.Mb(2,"label",68),u.oc(3),u.Wb(4,"translate"),u.Lb(),u.Mb(5,"label",69),u.oc(6),u.Wb(7,"translate"),u.Lb(),u.Ib(8,"span",70),u.Mb(9,"button",71),u.Tb("click",function(){u.hc(t);const n=e.index,i=u.Vb(2).index;return u.Vb(3).onRemoveSubLabel(i,n)}),u.oc(10," X "),u.Lb(),u.Lb(),u.Jb()}if(2&t){const t=e.$implicit;u.xb(3),u.rc("",u.Xb(4,4,"labellingArea.label"),": ",t.label,""),u.xb(3),u.rc("",u.Xb(7,6,"labellingArea.regionInfo"),": ",t.region,"")}}function We(t,e){if(1&t&&(u.Kb(0),u.Mb(1,"h2",19),u.oc(2),u.Wb(3,"translate"),u.Lb(),u.mc(4,Xe,11,8,"ng-container",23),u.Jb()),2&t){const t=u.Vb().$implicit;u.xb(2),u.pc(u.Xb(3,2,"labellingArea.addedSubLabel")),u.xb(2),u.ac("ngForOf",t.subLabel)}}function Ue(t,e){if(1&t&&(u.Kb(0),u.mc(1,We,5,4,"ng-container",5),u.Jb()),2&t){const t=e.$implicit,n=e.index,i=u.Vb(3);u.xb(1),u.ac("ngIf",(null==t||null==t.subLabel?null:t.subLabel.length)>0&&n===i.currentAnnotationIndex)}}function $e(t,e){if(1&t&&(u.Kb(0),u.mc(1,Ue,2,1,"ng-container",23),u.Jb()),2&t){const t=e.$implicit;u.xb(1),u.ac("ngForOf",null==t?null:t.bnd_box)}}function Ye(t,e){if(1&t&&(u.Kb(0),u.mc(1,$e,2,1,"ng-container",23),u.Jb()),2&t){const t=e.$implicit;u.xb(1),u.ac("ngForOf",t.annotation)}}function Ve(t,e){if(1&t&&(u.Mb(0,"tr"),u.Ib(1,"td",72),u.Wb(2,"translate"),u.Ib(3,"td",72),u.Wb(4,"translate"),u.Lb()),2&t){const t=e.$implicit;u.xb(1),u.bc("innerHTML",u.Xb(2,2,t.shortcutKey),u.ic),u.xb(2),u.bc("innerHTML",u.Xb(4,4,t.functionality),u.ic)}}function Ze(t,e){if(1&t&&(u.Mb(0,"p",73),u.oc(1),u.Wb(2,"translate"),u.Ib(3,"br"),u.oc(4),u.Lb()),2&t){const t=u.Vb();u.xb(1),u.qc(" ",u.Xb(2,2,"location"),""),u.xb(3),u.qc("",t.modalSpanLocationPath," ")}}const He=[{path:"",component:(()=>{class t{constructor(t,e,n,i,u,b,g,f,m,p,_){this._router=t,this._imgLblApiService=e,this._modalService=n,this._dataSetService=i,this._annotateService=u,this._imgLblActionService=b,this._imgLblLayoutService=g,this._imgLblModeService=f,this._languageService=m,this._spinnerService=p,this._exportSaveFormatService=_,this.currentUrl="",this.selectedProjectName="",this.imgSrc="",this.loading=!1,this.thumbnailList=[],this.unsubscribe$=new l.a,this.subject$=new l.a,this.tabStatus=[{name:"labellingProject.project",closed:!1},{name:"labellingProject.label",closed:!1,label_list:[]},{name:"labellingProject.annotation",closed:!1,annotation:[]}],this.mainLabelRegionVal="",this.subLabelRegionVal="",this.subLabelValidateMsg="",this.currentAnnotationLabel="",this.currentAnnotationIndex=-1,this.currentImageDisplayIndex=-1,this.isLoading=!1,this.showLoading=!1,this.processingNum=0,this.unsupportedImageList=[],this.spanClass="",this.modalSpanMessage="",this.modalSpanLocationPath="",this.sliceNum=0,this.labelList=[],this.isOverlayOn=!1,this.blockLoadThumbnails=!1,this.totalUuid=0,this.labelChoosen=[],this.tempLabelChoosen=[],this.modalExportOptions="modal-export-options",this.modalExportProject="modal-export-project",this.modalShortcutKeyInfo="modal-shortcut-key-info",this.modalUnsupportedImage="modal-unsupported-image",this.exportModalBodyStyle={minHeight:"15vh",maxHeight:"15vh",minWidth:"19.5vw",maxWidth:"19.5vw",margin:"15vw 71vh",overflow:"none"},this.saveModalBodyStyle={maxHeight:"80vh",minWidth:"28vw",maxWidth:"28vw",margin:"10vh 28vw",overflow:"none"},this.advModalBodyStyle={maxHeight:"80vh",minWidth:"18vw",maxWidth:"18vw",margin:"10vh 28vw",overflow:"none"},this.infoModalBodyStyle={maxHeight:"80vh",minWidth:"40vw",maxWidth:"40vw",margin:"20vh 23vw",padding:"0vh 0vw 3vh 0vw",overflow:"none"},this.exportProjectBodyStyle={minHeight:"10vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.unsupportedImageBodyStyle={minHeight:"18vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.saveType={saveCurrentImage:!0,saveBulk:!1},this.projectList={projects:[],isUploading:!1,isFetching:!1},this.startProject=t=>{this.isLoading=!0,this.selectedProjectName=t;const e=this._dataSetService.checkProjectStatus(t),n=this._dataSetService.updateProjectLoadStatus(t),i=this._dataSetService.checkExistProjectStatus(t),a=this._dataSetService.getThumbnailList;this.subjectSubscription=this.subject$.pipe(Object(o.a)(()=>Object(c.a)([e])),Object(s.a)(([{message:t,content:e}])=>{this.totalUuid=e[0].total_uuid,this.projectList={isUploading:this.projectList.isUploading,isFetching:this.projectList.isFetching,projects:this.projectList.projects.map(t=>t.project_name===e[0].project_name?Object.assign(Object.assign({},e[0]),{created_date:t.created_date}):t)};const{is_loaded:n}=e[0];return 1===t&&!n}),Object(o.a)(([{message:t}])=>t?Object(c.a)([n,i]):[]),Object(o.a)(([{},{message:e,uuid_list:n,label_list:r}])=>2===e?(this.labelList=[...r],this.tabStatus[1].label_list=this.labelList,n.length>0?n.map(e=>a(t,e)):[]):Object(h.a)(500).pipe(Object(o.a)(()=>i),Object(s.a)(({message:t})=>2===t),Object(o.a)(({uuid_list:e,label_list:n})=>(console.log(e.length),this.tabStatus[1].label_list=n,e.length>0?e.slice(this.sliceNum,this.sliceNum+=20).map(e=>a(t,e)):[])))),Object(o.a)(t=>t)).subscribe(t=>{this.thumbnailList=[...this.thumbnailList,t],this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{totalNumThumbnail:this.thumbnailList.length})},t=>{},()=>{this.isLoading=!1,this._annotateService.labelStaging$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(({annotation:t,isDlbClick:e})=>{e?(this.currentAnnotationIndex=t,this.tabStatus.forEach(({annotation:e})=>null==e?void 0:e.forEach(({bnd_box:e,polygons:n})=>{const i=null!=e?e:n;if(i){const{label:e,region:n}=i[t];this.currentAnnotationLabel=e,this.mainLabelRegionVal=n||""}else console.log("missing prop bnd_box OR polygons")})),this._imgLblActionService.setState({isActiveModal:!0,draw:!1,drag:!1,scroll:!1}),this.onDisplayModal()):(this.currentAnnotationLabel="",this.currentAnnotationIndex=t)}),this._imgLblActionService.action$.pipe(Object(r.a)(this.unsubscribe$)).subscribe(({clear:t,save:e,keyInfo:n})=>{t&&(this.thumbnailList[0].bnd_box&&(this.thumbnailList[this.currentImageDisplayIndex].bnd_box=[]),this.thumbnailList[0].polygons&&(this.thumbnailList[this.currentImageDisplayIndex].polygons=[]),this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{hasAnnotation:!1})),e&&(this.labelChoosen=this.tabStatus[1].label_list?this.tabStatus[1].label_list.map(t=>({label:t,isChoosen:!0})):[],this.onDisplayModal("modal-save")),n&&this.onDisplayShortcutKeyInfo()}),this.navigateByAction({thumbnailAction:1}),this._spinnerService.hideSpinner()}),this.subject$.next()},this.loadThumbnails=()=>{if(!this.blockLoadThumbnails&&this.sliceNumObject(h.a)(500).pipe(Object(o.a)(()=>t),Object(s.a)(({message:t})=>2===t),Object(o.a)(({uuid_list:t})=>t.length>0?t.slice(this.sliceNum,this.sliceNum+=10).map(t=>e(this.selectedProjectName,t)):[]))),Object(o.a)(t=>t)).subscribe(t=>{this.thumbnailList=[...this.thumbnailList,t],this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{totalNumThumbnail:this.thumbnailList.length})},t=>{},()=>{this.blockLoadThumbnails=!1,this._spinnerService.hideSpinner()}),this.subject$.next()}},this.updateProjectProgress=()=>{this._imgLblLayoutService.updateProjectProgress(this.tabStatus,this.selectedProjectName)},this.onChangeMetadata=t=>{this.tabStatus=this.tabStatus.map(e=>e.annotation?Object.assign(Object.assign({},e),{annotation:[t]}):e),this.thumbnailList=this.thumbnailList.map((e,n)=>this.currentImageDisplayIndex===n?t:e);const e=t.bnd_box?t.bnd_box.length>0:t.polygons.length>0;this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{hasAnnotation:e}),this.updateProjectProgress()},this.onToggleTab=({name:t,closed:e})=>{!this.tabStatus.some(n=>n.name.toLowerCase()===t.toLowerCase()&&n.closed===e)&&(this.tabStatus=this.tabStatus.map(n=>n.name.toLowerCase()===t.toLowerCase()?Object.assign(Object.assign({},n),{closed:e}):Object.assign({},n)))},this.onExport=()=>{this.modalSpanMessage="",this.modalSpanLocationPath="",this._modalService.open(this.modalExportOptions)},this.exportProject=t=>{"cfgdata"===t&&this.processingNum++;const e=this.selectedProjectName,n=this._imgLblApiService.exportProject(e,t),i=this._imgLblApiService.exportProjectStatus(),a=({message:t})=>1===t?Object(h.a)(500).pipe(Object(o.a)(()=>i),Object(s.a)(({export_status:t})=>(this.isOverlayOn=1===t,this.isLoading=1===t,0===t||2===t||3===t))):Object(d.a)(t=>(console.error(t),t));this.subjectSubscription=this.subject$.pipe(Object(s.a)(),Object(o.a)(()=>n),Object(o.a)(t=>a(t))).subscribe(({export_status:n,project_config_path:i})=>{"cfgdata"===t&&this.processingNum--,2===n?this._languageService._translate.get("exportSuccess").subscribe(t=>{this.toggleExportProjectModalMessage(!0),this.modalSpanMessage=e+t,this.modalSpanLocationPath=i,this.processIsSuccess(!0)}):this._languageService._translate.get("exportFailed").subscribe(t=>{this.toggleExportProjectModalMessage(!0),this.modalSpanMessage=t+e,this.processIsSuccess(!1)})},t=>{},()=>{this.closeExportProjectModal()}),this.subject$.next()},this.toggleExportProjectModalMessage=t=>{this._modalService.open(this.modalExportProject)},this.processIsSuccess=t=>{this.spanClass=t?"validation-success":"validation-error"},this.onReload=()=>{const t=this.selectedProjectName,e=this._imgLblApiService.reloadProject(t),n=this._imgLblApiService.reloadProjectStatus(t),i=this._dataSetService.getThumbnailList,a=[],r=({message:e})=>5!==e&&1===e?Object(h.a)(500).pipe(Object(o.a)(()=>n),Object(s.a)(({file_system_status:t,unsupported_image_list:e})=>(this.unsupportedImageList=e,3===t||0===t)),Object(o.a)(e=>{this.isLoading=!0;let n=[];this.thumbnailList.forEach(t=>{n.push(t.uuid)}),e.uuid_add_list.forEach(t=>{n.push(t),this.totalUuid++}),e.uuid_delete_list.forEach(t=>{n=n.filter(e=>e!==t),this.totalUuid--}),this.sliceNum=0;const a=3===e.file_system_status&&n.length>0?n.slice(this.sliceNum,this.sliceNum+=20).map(e=>i(t,e)):[];return this.thumbnailList=[],a}),Object(o.a)(t=>t)):Object(d.a)(t=>(console.error(t),this.isLoading=!1,t));this.subjectSubscription=this.subject$.pipe(Object(s.a)(),Object(o.a)(()=>e),Object(o.a)(t=>r(t))).subscribe(t=>{this.isLoading=!0,a.push(t)},t=>{},()=>{this.thumbnailList=a,this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{totalNumThumbnail:this.thumbnailList.length}),this.currentImageDisplayIndex=-1,this.navigateByAction({thumbnailAction:1}),this.isLoading=!1,this.unsupportedImageList.length>0&&this._dataSetService.downloadUnsupportedImageList(t,this.unsupportedImageList).then(t=>{t&&this._modalService.open(this.modalUnsupportedImage)})}),this.subject$.next()},this.navigateByUrl=({url:t})=>{t?this._router.navigate([t]):console.error("No url received from child component")},this.keyDownEvent=({key:t,repeat:e})=>{this._imgLblActionService.action$.pipe(Object(s.a)()).subscribe(({draw:n})=>{if(!n&&!e)switch(t){case"ArrowLeft":this.navigateByAction({thumbnailAction:-1});break;case"ArrowRight":this.navigateByAction({thumbnailAction:1});break;case"Escape":this.onCloseModal()}})},this.navigateByAction=({thumbnailAction:t})=>{if(t){const e=this._imgLblLayoutService.calculateIndex(t,this.currentImageDisplayIndex,this.thumbnailList.length);if(e!==this.currentImageDisplayIndex){this.currentImageDisplayIndex=e;const t=this.thumbnailList.find((t,n)=>n===e),n=this.thumbnailList.findIndex((t,n)=>n===e);n+3===this.thumbnailList.length&&this.loadThumbnails(),t&&-1!==n&&!this.showLoading&&this.displayImage(Object.assign(Object.assign({},t),{thumbnailIndex:n}))}}},this.displayImage=(t,e=this.selectedProjectName)=>{var n,{thumbnailIndex:i}=t,o=Object(a.b)(t,["thumbnailIndex"]);(null===(n=this.selectedMetaData)||void 0===n?void 0:n.uuid)!==o.uuid&&(this.showLoading=!0,this._imgLblApiService.getBase64Thumbnail(e,o.uuid).pipe(Object(s.a)()).subscribe(({message:t,img_src:e})=>{if(1===t){this.selectedMetaData=o,this.imgSrc=e,this.currentImageDisplayIndex=i;const t=o.bnd_box?o.bnd_box.length>0:o.polygons&&o.polygons.length>0||!1;this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{currentThumbnailIndex:i+1,thumbnailName:o.img_path,hasAnnotation:t})}},t=>console.error(t),()=>this.showLoading=!1))},this.onProcessLabel=({selectedLabel:t,label_list:e,action:n})=>{const i=t&&!n?e.filter(e=>e!==t):e;this._imgLblApiService.updateLabelList(this.selectedProjectName,i.length>0?i:[]).pipe(Object(s.a)()).subscribe(({message:t})=>{1===t?this.tabStatus=this._imgLblLayoutService.displayLabelList(this.tabStatus,i):console.error("Error while updating label")}),this.updateProjectProgress()},this.onChangeAnnotationLabel=t=>{t.index=this.currentAnnotationIndex,this.selectedMetaData&&this.selectedMetaData.polygons&&(this.selectedMetaData.polygons[t.index].label=t.label),this.tabStatus=this._imgLblLayoutService.changeAnnotationLabel(this.tabStatus,t),this.updateStateToRenderChild(),this.updateProjectProgress()},this.onDeleteAnnotation=t=>{this.tabStatus=this._imgLblLayoutService.deleteAnnotation(this.tabStatus,t),this.updateStateToRenderChild(),this.updateProjectProgress()},this.onDisplayModal=(t="modal-image-labelling")=>{this.subLabelRegionVal="",this.subLabelValidateMsg="",this._modalService.open(t)},this.onCloseModal=(t="modal-image-labelling")=>{this._imgLblActionService.setState({isActiveModal:!1,draw:!0,scroll:!0}),this._modalService.close(t)},this.onChangeInput=(t,e)=>{const{value:n}=t.target;"main"===e?this.mainLabelRegionVal=n:this.subLabelRegionVal=n},this.onSubmitLabel=()=>{const{value:t}=this._subLabelSelect.nativeElement;if(!t.trim())return;let e=!1,n=!1;this.tabStatus.forEach(({annotation:i})=>null==i?void 0:i.forEach(({bnd_box:i,polygons:a})=>{const o=null!=i?i:a;if(o){const{subLabel:i}=o[this.currentAnnotationIndex];e=!!(i&&(null==i?void 0:i.length)>0),e&&(null==i||i.some(({label:e})=>n=e===t))}else console.log("missing prop bnd_box OR polygons")})),n?this.subLabelValidateMsg="Invalid of duplicate label: "+t:(this.tabStatus=this._imgLblLayoutService.submitLabel(this.tabStatus,t,this.currentAnnotationIndex,{mainLabelRegion:this.mainLabelRegionVal,subLabelRegion:this.subLabelRegionVal}),this.subLabelValidateMsg="",this.updateStateToRenderChild(),this.updateProjectProgress()),this.subLabelRegionVal=""},this.onRemoveSubLabel=(t,e)=>{this.tabStatus=this._imgLblLayoutService.removeSubLabel(this.tabStatus,{selectedAnnoIndex:t,selectedSubLabelIndex:e}),this.updateStateToRenderChild(),this.updateProjectProgress()},this.updateStateToRenderChild=()=>{this.tabStatus.forEach(({annotation:t})=>{t&&(this.thumbnailList=this.thumbnailList.map(e=>{var n;return null!==(n=t.find(({uuid:t})=>e.uuid===t))&&void 0!==n?n:e}),this.selectedMetaData=t[0])})},this.resetProjectStatus=(t=this.selectedProjectName)=>{t.trim()&&this._dataSetService.manualCloseProject(t).pipe(Object(r.a)(this.unsubscribe$)).subscribe(({})=>{this._router.navigate(["/"])})},this.onSwitchSaveType=()=>{this.saveType={saveCurrentImage:!this.saveType.saveCurrentImage,saveBulk:!this.saveType.saveBulk}},this.onClickDownload=t=>Object(a.a)(this,void 0,void 0,function*(){const e=this.labelChoosen.filter(t=>!0===t.isChoosen).map(t=>t.label);this.saveType.saveBulk&&this.processingNum++,yield this._exportSaveFormatService.exportSaveFormat(Object.assign(Object.assign(Object.assign(Object.assign({},this.saveType),{saveFormat:t,metadata:this.selectedMetaData,index:this.currentAnnotationIndex,projectName:this.selectedProjectName}),(this.saveType.saveBulk||"ocr"===t||"json"===t||"coco"===t)&&{projectFullMetadata:this.thumbnailList}),"json"!==t&&{labelList:e})),this.saveType.saveBulk&&this.processingNum--}),this._languageService.initializeLanguage("image-labelling",["image-labelling-en","image-labelling-cn","image-labelling-ms"])}ngOnInit(){this.currentUrl=this._router.url;const{projectName:t}=this._imgLblLayoutService.getRouteState(history);this.selectedProjectName=t,this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{totalNumThumbnail:this.thumbnailList.length}),this.startProject(this.selectedProjectName)}closeExportProjectModal(){this._modalService.close(this.modalExportOptions)}onWindowClose(t){this.resetProjectStatus(),t.preventDefault()}onChangeLabel(t){this.onChangeAnnotationLabel({index:this.currentAnnotationIndex,label:t})}onDisplayShortcutKeyInfo(){this._modalService.open(this.modalShortcutKeyInfo)}onLoadMoreThumbnails(){this.loadThumbnails()}showAdvSettings(){this.tempLabelChoosen=this.labelChoosen.map(t=>Object.assign({},t)),this.onDisplayModal("modal-adv")}saveAdvSettings(){this.labelChoosen=this.tempLabelChoosen.map(t=>Object.assign({},t)),this.onCloseModal("modal-adv")}shortcutKeyInfo(){return[{no:1,shortcutKey:"info.shortcut.1.key",functionality:"info.shortcut.1.functionality"},{no:2,shortcutKey:"info.shortcut.2.key",functionality:"info.shortcut.2.functionality"},{no:3,shortcutKey:"info.shortcut.3.key",functionality:"info.shortcut.3.functionality"},{no:4,shortcutKey:"info.shortcut.4.key",functionality:"info.shortcut.4.functionality"},{no:5,shortcutKey:"info.shortcut.5.key",functionality:"info.shortcut.5.functionality"}]}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this._imgLblModeService.setState(null),this._imgLblActionService.setState(null),this.resetProjectStatus()}}return t.\u0275fac=function(e){return new(e||t)(u.Hb(b.a),u.Hb(_),u.Hb(v.a),u.Hb(y.a),u.Hb(S),u.Hb(M),u.Hb(k),u.Hb(p.a),u.Hb(P.a),u.Hb(O.a),u.Hb(A))},t.\u0275cmp=u.Bb({type:t,selectors:[["image-labelling-layout"]],viewQuery:function(t,e){if(1&t&&u.tc(Pe,!0),2&t){let t;u.ec(t=u.Ub())&&(e._subLabelSelect=t.first)}},hostBindings:function(t,e){1&t&&u.Tb("keydown",function(t){return e.keyDownEvent(t)},!1,u.gc)("beforeunload",function(t){return e.onWindowClose(t)},!1,u.gc)},decls:108,vars:113,consts:[[1,"layout-container"],[3,"_onChange"],[3,"_totalUuid","_onChange","_tabStatus","_onClick"],[1,"content-container"],[3,"_onChange","_currentUrl","_tabStatus"],[4,"ngIf"],[3,"_selectMetadata","_totalUuid","_thumbnailList","_tabStatus","_onClose","_onClickThumbnail","_onClickLabel","_onEnterLabel","_onChangeAnnotationLabel","_onDeleteAnnotation","_loadMoreThumbnails"],[3,"_onChange","_onClick","_onExport","_onReload"],[3,"_thumbnailInfo","_imgSrc"],["id","modal-save",3,"id","modalBodyStyle","scrollable"],[1,"save-format-list"],[1,"save-format-content"],["id","modal-adv",3,"id","modalBodyStyle","modalTitle","scrollable","zIndex"],[1,"modal-adv-container"],["class","modal-adv-instruction",4,"ngIf"],["class","margin-bottom",4,"ngFor","ngForOf"],["class","button-style modal-adv-btn",3,"click",4,"ngIf"],["id","modal-image-labelling",3,"id","scrollable","showHeader"],[1,"modal-button","close-button","float-right",3,"click"],[1,"font-title"],[1,"main-label-container"],[1,"font-label"],[1,"static-select",3,"change"],[4,"ngFor","ngForOf"],["type","text",1,"static-input",3,"value","placeholder","change"],[1,"hr-line"],[1,"sub-label-container"],[1,"static-select"],["subLabelSelect",""],[1,"modal-button",3,"click"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"export-content-container"],[1,"modal-button-container"],[1,"button-style","confg-btn",3,"click"],[1,"button-style","confgdata-btn",3,"click"],[1,"with-data"],[1,"help-icon-container"],["src","../../assets/icons/help.svg",1,"help-icon"],[1,"tooltiptext"],[3,"id","modalBodyStyle","scrollable"],[1,"shortcut-key-info-header"],[1,"table-box"],["cellpadding","20"],[1,"modal-content-container"],[1,"modal-message-container"],["class","message",4,"ngIf"],[3,"ngClass"],[1,"error-msg",3,"innerHTML"],[3,"_modalUnsupportedImage","_unsupportedImageBodyStyle","_unsupportedImageList"],[3,"_loading"],[3,"_processingNum"],[3,"_selectMetadata","_imgSrc","_tabStatus","_onChangeMetadata","_onChangeAnnotationLabel","_onEnterLabel"],[3,"_selectMetadata","_imgSrc","_tabStatus","_onChangeMetadata","_onChangeAnnotationLabel"],[1,"switch-container"],[1,"switch"],["type","checkbox",1,"checkBox",3,"checked","change"],[1,"slider","round"],[1,"space-verticle"],[1,"adv-settings",3,"click"],[1,"save-format-btn",3,"click"],[1,"modal-adv-instruction"],[1,"margin-bottom"],[1,"switch-2","no-margin-left"],[1,"modal-adv-label"],[1,"button-style","modal-adv-btn",3,"click"],[3,"value","selected"],[1,"validate-msg"],[1,"sub-label-flex-container","sub-label-padding"],[1,"font-label","flex-first"],[1,"font-label","flex-second"],[1,"flex-third"],[1,"modal-butto","flex-fourth",3,"click"],[3,"innerHTML"],[1,"message"]],template:function(t,e){1&t&&(u.Mb(0,"div",0),u.Mb(1,"div"),u.Ib(2,"page-header",1),u.Mb(3,"image-labelling-info",2),u.Tb("_onClick",function(t){return e.navigateByAction(t)}),u.Lb(),u.Lb(),u.Mb(4,"div",3),u.Ib(5,"image-labelling-left-sidebar",4),u.mc(6,Oe,2,3,"ng-container",5),u.mc(7,Le,2,3,"ng-container",5),u.Mb(8,"image-labelling-project",6),u.Tb("_onClose",function(t){return e.onToggleTab(t)})("_onClickThumbnail",function(t){return e.displayImage(t)})("_onClickLabel",function(t){return e.onProcessLabel(t)})("_onEnterLabel",function(t){return e.onProcessLabel(t)})("_onChangeAnnotationLabel",function(t){return e.onChangeAnnotationLabel(t)})("_onDeleteAnnotation",function(t){return e.onDeleteAnnotation(t)})("_loadMoreThumbnails",function(){return e.onLoadMoreThumbnails()}),u.Lb(),u.Mb(9,"image-labelling-right-sidebar",7),u.Tb("_onClick",function(t){return e.onToggleTab(t)})("_onExport",function(){return e.onExport()})("_onReload",function(){return e.onReload()}),u.Lb(),u.Lb(),u.Ib(10,"image-labelling-footer",8),u.Lb(),u.Mb(11,"modal",9),u.Mb(12,"div",10),u.Mb(13,"div",11),u.mc(14,Ie,30,11,"ng-container",5),u.mc(15,Ae,10,0,"ng-container",5),u.Lb(),u.Lb(),u.Lb(),u.Mb(16,"modal",12),u.Wb(17,"translate"),u.Mb(18,"div",13),u.mc(19,je,3,3,"p",14),u.mc(20,Be,6,2,"div",15),u.mc(21,Ee,3,3,"div",5),u.mc(22,ze,3,3,"button",16),u.Lb(),u.Lb(),u.Mb(23,"modal",17),u.Mb(24,"button",18),u.Tb("click",function(){return e.onCloseModal()}),u.oc(25,"\u2716"),u.Lb(),u.Mb(26,"div"),u.Mb(27,"h2",19),u.oc(28),u.Wb(29,"translate"),u.Lb(),u.Mb(30,"div",20),u.Mb(31,"label",21),u.oc(32),u.Wb(33,"translate"),u.Lb(),u.Mb(34,"select",22),u.Tb("change",function(t){return e.onChangeLabel(t.target.value)}),u.mc(35,De,2,1,"ng-container",23),u.Lb(),u.Mb(36,"label",21),u.oc(37),u.Wb(38,"translate"),u.Lb(),u.Mb(39,"input",24),u.Tb("change",function(t){return e.onChangeInput(t,"main")}),u.Wb(40,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Ib(41,"hr",25),u.Mb(42,"div"),u.Mb(43,"h2",19),u.oc(44),u.Wb(45,"translate"),u.Lb(),u.Mb(46,"div",26),u.Mb(47,"label",21),u.oc(48),u.Wb(49,"translate"),u.Lb(),u.Mb(50,"select",27,28),u.mc(52,Re,2,1,"ng-container",23),u.Lb(),u.Mb(53,"label",21),u.oc(54),u.Wb(55,"translate"),u.Lb(),u.Mb(56,"input",24),u.Tb("change",function(t){return e.onChangeInput(t,"sub")}),u.Wb(57,"translate"),u.Lb(),u.Mb(58,"button",29),u.Tb("click",function(){return e.onSubmitLabel()}),u.oc(59),u.Wb(60,"translate"),u.Lb(),u.Lb(),u.mc(61,Fe,3,1,"ng-container",5),u.Lb(),u.Ib(62,"hr",25),u.mc(63,Ye,2,1,"ng-container",23),u.Lb(),u.Mb(64,"modal",30),u.Wb(65,"translate"),u.Mb(66,"div",31),u.Mb(67,"div",32),u.Mb(68,"button",33),u.Tb("click",function(){return e.exportProject("cfg")}),u.oc(69),u.Wb(70,"translate"),u.Lb(),u.Mb(71,"button",34),u.Tb("click",function(){return e.exportProject("cfgdata")}),u.oc(72),u.Wb(73,"translate"),u.Ib(74,"br"),u.Mb(75,"span",35),u.oc(76),u.Wb(77,"translate"),u.Lb(),u.Lb(),u.Mb(78,"div",36),u.Ib(79,"img",37),u.Mb(80,"span",38),u.Mb(81,"p"),u.oc(82),u.Wb(83,"translate"),u.Lb(),u.Mb(84,"p"),u.oc(85),u.Wb(86,"translate"),u.Lb(),u.Mb(87,"p"),u.oc(88),u.Wb(89,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Lb(),u.Lb(),u.Lb(),u.Mb(90,"modal",39),u.Mb(91,"div",40),u.oc(92),u.Wb(93,"translate"),u.Lb(),u.Mb(94,"div",41),u.Mb(95,"table",42),u.mc(96,Ve,5,6,"tr",23),u.Lb(),u.Lb(),u.Lb(),u.Mb(97,"modal",30),u.Wb(98,"translate"),u.Ib(99,"br"),u.Mb(100,"div",43),u.Mb(101,"div",44),u.mc(102,Ze,5,4,"p",45),u.Lb(),u.Mb(103,"div",46),u.Ib(104,"p",47),u.Lb(),u.Lb(),u.Lb(),u.Ib(105,"unsupported-image-modal",48),u.Ib(106,"spinner",49),u.Ib(107,"toastr",50)),2&t&&(u.xb(2),u.ac("_onChange",e.onChangeSchema),u.xb(1),u.ac("_totalUuid",e.totalUuid)("_onChange",e.onChangeSchema)("_tabStatus",e.tabStatus),u.xb(2),u.ac("_onChange",e.onChangeSchema)("_currentUrl",e.currentUrl)("_tabStatus",e.tabStatus),u.xb(1),u.ac("ngIf",e._router.url.includes("imglabel/bndbox")),u.xb(1),u.ac("ngIf",e._router.url.includes("imglabel/seg")),u.xb(1),u.ac("_selectMetadata",e.selectedMetaData)("_totalUuid",e.totalUuid)("_thumbnailList",e.thumbnailList)("_tabStatus",e.tabStatus),u.xb(1),u.ac("_onChange",e.onChangeSchema),u.xb(1),u.ac("_thumbnailInfo",e.selectedMetaData)("_imgSrc",e.imgSrc),u.xb(1),u.ac("id","modal-save")("modalBodyStyle",e.saveModalBodyStyle)("scrollable",!0),u.xb(3),u.ac("ngIf",null==e.selectedMetaData?null:e.selectedMetaData.bnd_box),u.xb(1),u.ac("ngIf",null==e.selectedMetaData?null:e.selectedMetaData.polygons),u.xb(1),u.ac("id","modal-adv")("modalBodyStyle",e.advModalBodyStyle)("modalTitle",u.Xb(17,75,"advModal.title"))("scrollable",!0)("zIndex",2),u.xb(3),u.ac("ngIf",0!==e.tempLabelChoosen.length),u.xb(1),u.ac("ngForOf",e.tempLabelChoosen),u.xb(1),u.ac("ngIf",0===e.tempLabelChoosen.length),u.xb(1),u.ac("ngIf",0!==e.tempLabelChoosen.length),u.xb(1),u.ac("id","modal-image-labelling")("scrollable",!0)("showHeader",!1),u.xb(5),u.pc(u.Xb(29,77,"labellingArea.mainLabel")),u.xb(4),u.qc("",u.Xb(33,79,"labellingArea.label"),": "),u.xb(3),u.ac("ngForOf",e.tabStatus),u.xb(2),u.qc("",u.Xb(38,81,"labellingArea.regionInfo"),": "),u.xb(2),u.ac("value",e.mainLabelRegionVal)("placeholder",u.Xb(40,83,"labellingArea.mainRegionInfo")),u.xb(5),u.pc(u.Xb(45,85,"labellingArea.subLabel")),u.xb(4),u.qc("",u.Xb(49,87,"labellingArea.label"),": "),u.xb(4),u.ac("ngForOf",e.tabStatus),u.xb(2),u.qc("",u.Xb(55,89,"labellingArea.regionInfo"),": "),u.xb(2),u.ac("value",e.subLabelRegionVal)("placeholder",u.Xb(57,91,"labellingArea.subRegionInfo")),u.xb(3),u.pc(u.Xb(60,93,"labellingArea.add")),u.xb(2),u.ac("ngIf",e.subLabelValidateMsg),u.xb(2),u.ac("ngForOf",e.tabStatus),u.xb(1),u.ac("id",e.modalExportOptions)("modalBodyStyle",e.exportModalBodyStyle)("modalTitle",u.Xb(65,95,"exportModal.exportOptions"))("scrollable",!1),u.xb(5),u.qc(" ",u.Xb(70,97,"exportModal.configFile")," "),u.xb(3),u.qc(" ",u.Xb(73,99,"exportModal.zipFile")," "),u.xb(4),u.pc(u.Xb(77,101,"exportModal.withData")),u.xb(6),u.qc("",u.Xb(83,103,"configFileInfoTitle"),":"),u.xb(3),u.pc(u.Xb(86,105,"configFileInfoDest1")),u.xb(3),u.pc(u.Xb(89,107,"configFileInfoDest2")),u.xb(2),u.ac("id",e.modalShortcutKeyInfo)("modalBodyStyle",e.infoModalBodyStyle)("scrollable",!0),u.xb(2),u.pc(u.Xb(93,109,"info.header")),u.xb(4),u.ac("ngForOf",e.shortcutKeyInfo()),u.xb(1),u.ac("id",e.modalExportProject)("modalBodyStyle",e.exportProjectBodyStyle)("modalTitle",u.Xb(98,111,"exportTitle"))("scrollable",!1),u.xb(5),u.ac("ngIf",e.modalSpanLocationPath.trim()),u.xb(1),u.ac("ngClass",e.spanClass),u.xb(1),u.ac("innerHTML",e.modalSpanMessage,u.ic),u.xb(1),u.ac("_modalUnsupportedImage",e.modalUnsupportedImage)("_unsupportedImageBodyStyle",e.unsupportedImageBodyStyle)("_unsupportedImageList",e.unsupportedImageList),u.xb(1),u.ac("_loading",e.isLoading),u.xb(1),u.ac("_processingNum",e.processingNum))},directives:[j.a,W,ft,i.k,Rt,Xt,$t,Yt.a,i.j,i.i,Vt.a,Zt.a,Qt,me,ke,yt.j,yt.m],pipes:[E.c],styles:['.layout-container[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.content-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;min-width:97.8vw;max-width:97.8vw}.modal-button[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw;background:#262a2e;color:azure}.close-button[_ngcontent-%COMP%]{border:none;cursor:pointer}.float-right[_ngcontent-%COMP%]{float:right}.font-title[_ngcontent-%COMP%]{font-size:1.7vw}.font-label[_ngcontent-%COMP%]{line-height:4vh;font-size:1vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.main-label-container[_ngcontent-%COMP%]{min-width:35vw;max-width:35vw}.main-label-container[_ngcontent-%COMP%], .sub-label-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;align-items:center}.sub-label-container[_ngcontent-%COMP%]{min-width:40vw;max-width:40vw}.sub-label-flex-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-flex:1 1 100%;flex:1 1 100%;min-width:0}.static-select[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;min-width:10vw;max-width:10vw;line-height:3vh;font-size:.9vw;-webkit-appearance:none;appearance:none;border-radius:5vh;margin:0;text-align-last:center;background:#262a2e;color:#fff;box-shadow:inset -.5vw 6.25vw 1vw 0 rgba(0,0,0,.2),inset -.5vw -.5vw 1vw 0 hsla(0,0%,100%,.4)}.static-select[_ngcontent-%COMP%]:hover{box-shadow:inset -.375vw -.375vw .625vw 0 rgba(0,0,0,.2),inset .375vw .375vw .625vw 0 hsla(0,0%,100%,.5)}.static-select[_ngcontent-%COMP%]:active{box-shadow:inset .375vw .375vw .625vw 0 rgba(0,0,0,.2),inset -.375vw -.375vw .625vw 0 hsla(0,0%,100%,.5)}.static-input[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;min-width:10vw;max-width:10vw;line-height:3vh;font-size:.9vw;border-radius:2vw;border:none;outline:none;background-color:#363636;color:#fff;padding:0 1vw}.hr-line[_ngcontent-%COMP%]{margin:5vh 0}.sub-label-padding[_ngcontent-%COMP%]{padding:0 0 2vh}.validate-msg[_ngcontent-%COMP%]{color:red;padding:5vh 0 0;font-size:1vw}.flex-first[_ngcontent-%COMP%]{-webkit-flex:1 1 35%;flex:1 1 35%}.flex-second[_ngcontent-%COMP%]{-webkit-flex:1 1 55%;flex:1 1 55%}.flex-fourth[_ngcontent-%COMP%], .flex-third[_ngcontent-%COMP%]{-webkit-flex:0 0 5%;flex:0 0 5%}.flex-fourth[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw;background:#262a2e;color:azure}.modal[_ngcontent-%COMP%]{z-index:1000;padding-top:10vh;top:0;width:100%;height:100%;overflow:auto;background-color:transparent;scrollbar-width:none;position:fixed;background:rgba(0,0,0,.8)}.modal-content[_ngcontent-%COMP%]{background-color:#525353;padding:1vw;max-width:20vw;min-width:20vw;border-radius:1vw;margin:15vh auto auto}.modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.modal-content-header[_ngcontent-%COMP%]{text-align:center;color:#fff;font-size:3vh}.modal-button-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;padding:1vw 1vw 1vw 2vw}.modal-button-cancel[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:flex-end;justify-content:flex-end}.export-content-container[_ngcontent-%COMP%]{margin-left:.5vw}.button-style[_ngcontent-%COMP%]{border-radius:1vh;border:none;outline:none;color:#fff;cursor:pointer}.confg-btn[_ngcontent-%COMP%]{margin-right:.7vw}.confg-btn[_ngcontent-%COMP%], .confgdata-btn[_ngcontent-%COMP%]{padding:1vh .5vw;background-color:#2d8ceb;font-size:2vh;min-width:7.5vw}.cancel-btn[_ngcontent-%COMP%], .with-data[_ngcontent-%COMP%]{font-size:1.5vh}.cancel-btn[_ngcontent-%COMP%]{padding:1vh 1vw;background-color:#444}.error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.help-icon[_ngcontent-%COMP%]{height:3vh}.help-icon-container[_ngcontent-%COMP%]{padding-right:1vw;padding-left:.4vw}.help-icon-container[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:15vw;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:65%;margin-left:-60px;text-align:justify;text-justify:inter-word}.help-icon-container[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible}.message[_ngcontent-%COMP%]{font-size:1vw;overflow-wrap:break-word}.modal-message-container[_ngcontent-%COMP%]{padding-right:3.5vw}.break[_ngcontent-%COMP%]{overflow-wrap:break-word}.save-format-list[_ngcontent-%COMP%]{left:0;top:0;width:100%;height:100%;overflow:auto}.save-format-content[_ngcontent-%COMP%]{margin:auto;padding:10px}.switch-container[_ngcontent-%COMP%]{font-size:small;-webkit-align-content:center;align-content:center;text-align:center}.switch[_ngcontent-%COMP%]{position:relative;display:inline-block;width:4em;height:1.8em;margin-left:auto;margin-right:auto}.switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.switch[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background:#000;background-size:100% 100%;background-position:50%}.switch[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{-webkit-transform:translateX(2.2em);transform:translateX(2.2em)}.switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.8s}.switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:1.6em;width:1.6em;left:.14em;bottom:.15em;background-color:snow;transition:.8s}.switch[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]{border-radius:1.2em}.switch[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]:before{border-radius:50%}.switch[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-top:8px;margin-top:.5em;outline:none}.switch-2[_ngcontent-%COMP%]{position:relative;display:inline-block;width:2.5em;height:1.2em;margin-left:auto;margin-right:auto}.switch-2[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.switch-2[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background:#000;background-size:100% 100%;background-position:50%}.switch-2[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{-webkit-transform:translateX(1.5em);transform:translateX(1.5em)}.switch-2[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.5s}.switch-2[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:1.2em;width:1.2em;left:.14em;background-color:snow;transition:.5s}.switch-2[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]{border-radius:1.2em}.switch-2[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]:before{border-radius:50%}.switch-2[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-top:8px;margin-top:.5em;outline:none}.no-margin-left[_ngcontent-%COMP%]{margin-left:0}.space-verticle[_ngcontent-%COMP%]{background-color:transparent;outline:none;border:none;margin-left:1.5em;margin-right:1.5em}.save-format-btn[_ngcontent-%COMP%]{width:90%;height:6em;margin-top:2%;margin-bottom:2%;margin-left:4.5%;background:#000;background-size:100% 100%;background-position:50%;font-size:medium;outline:none;border:none;color:snow;overflow:hidden;border-radius:5px}.save-format-btn[_ngcontent-%COMP%]:hover{text-shadow:0 0 30px #888;box-shadow:5px 5px 10px #888,-5px -5px 10px #888;cursor:pointer}.save-format-btn[_ngcontent-%COMP%]:active:hover{border:3px dashed green}.adv-settings[_ngcontent-%COMP%]{padding:1vh;margin:1vh 1.5vw;color:#ccc;font-size:.6vw;cursor:pointer;width:-webkit-fit-content;width:fit-content;background:#30353a;border-radius:.5vh;float:right}.adv-settings[_ngcontent-%COMP%]:hover{background:#373d42}.modal-adv-container[_ngcontent-%COMP%]{margin:1vh 1vw}.modal-adv-instruction[_ngcontent-%COMP%]{color:#fff;opacity:.5}.modal-adv-label[_ngcontent-%COMP%]{font-size:1.5vh;margin-left:2vw;white-space:nowrap;width:9vw;overflow:hidden;text-overflow:ellipsis;display:inline-block}.modal-adv-btn[_ngcontent-%COMP%]{float:right;padding:.5vh 1vw;background-color:#2d8ceb;font-size:1.5vh;min-width:3vw}.shortcut-key-info-header[_ngcontent-%COMP%]{font-size:1.2vw;color:#fff;text-align:center;margin-bottom:2vh}.table-box[_ngcontent-%COMP%]{width:100%;height:90%;overflow-y:auto}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%], td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{border-collapse:collapse;text-align:center;color:#fff}th[_ngcontent-%COMP%]{top:0;background:#262a2e;color:#fff;border-top:none!important}tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){color:#bebebe}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{width:60px;text-align:center;background:#262a2e}.validation-error[_ngcontent-%COMP%]{margin:1px;color:red}.validation-success[_ngcontent-%COMP%]{margin:1px;color:green}.label[_ngcontent-%COMP%]{color:#fff;font-size:2vh;margin-right:1vw}.label-file[_ngcontent-%COMP%]{padding-top:.5vh}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:.5vh}']}),t})()}];let Ke=(()=>{class t{}return t.\u0275mod=u.Fb({type:t}),t.\u0275inj=u.Eb({factory:function(e){return new(e||t)},imports:[[b.d.forChild(He)]]}),t})();var Je=n("KZX/");let Ge=(()=>{class t{}return t.\u0275mod=u.Fb({type:t}),t.\u0275inj=u.Eb({factory:function(e){return new(e||t)},imports:[[i.b,Je.a,E.b]]}),t})();var qe=n("RKnZ"),Qe=n("O+1G");let tn=(()=>{class t{}return t.\u0275mod=u.Fb({type:t}),t.\u0275inj=u.Eb({factory:function(e){return new(e||t)},imports:[[i.b,Je.a,E.b,Ke,qe.a,b.d,Qe.a,Ge]]}),t})()},xOOu:function(t,e,n){t.exports=function t(e,n,i){function a(s,r){if(!n[s]){if(!e[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};e[s][0].call(c.exports,function(t){return a(e[s][1][t]||t)},c,c.exports,t,e,n,i)}return n[s].exports}for(var o=!1,s=0;s>4,r=1>6:64,l=2>2)+o.charAt(s)+o.charAt(r)+o.charAt(l));return c.join("")},n.decode=function(t){var e,n,i,s,r,l,c=0,h=0,d="data:";if(t.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var u,b=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&b--,t.charAt(t.length-2)===o.charAt(64)&&b--,b%1!=0)throw new Error("Invalid base64 input, bad content length.");for(u=a.uint8array?new Uint8Array(0|b):new Array(0|b);c>4,n=(15&s)<<4|(r=o.indexOf(t.charAt(c++)))>>2,i=(3&r)<<6|(l=o.indexOf(t.charAt(c++))),u[h++]=e,64!==r&&(u[h++]=n),64!==l&&(u[h++]=i);return u}},{"./support":30,"./utils":32}],2:[function(t,e,n){"use strict";var i=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/DataLengthProbe"),s=t("./stream/Crc32Probe");function r(t,e,n,i,a){this.compressedSize=t,this.uncompressedSize=e,this.crc32=n,this.compression=i,this.compressedContent=a}o=t("./stream/DataLengthProbe"),r.prototype={getContentWorker:function(){var t=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},r.createWorkerFrom=function(t,e,n){return t.pipe(new s).pipe(new o("uncompressedSize")).pipe(e.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=r},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,n){"use strict";var i=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,n){"use strict";var i=t("./utils"),a=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,n,i){var o=a,s=0+n;t^=-1;for(var r=0;r>>8^o[255&(t^e[r])];return-1^t}(0|e,t,t.length):function(t,e,n,i){var o=a,s=0+n;t^=-1;for(var r=0;r>>8^o[255&(t^e.charCodeAt(r))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,e,n){"use strict";var i;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,a=t("pako"),o=t("./utils"),s=t("./stream/GenericWorker"),r=i?"uint8array":"array";function l(t,e){s.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}n.magic="\b\0",o.inherits(l,s),l.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(r,t.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},n.compressWorker=function(t){return new l("Deflate",t)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,n){"use strict";function i(t,e){var n,i="";for(n=0;n>>=8;return i}function a(t,e,n,a,s,h){var d,u,b=t.file,g=t.compression,f=h!==r.utf8encode,m=o.transformTo("string",h(b.name)),p=o.transformTo("string",r.utf8encode(b.name)),_=b.comment,v=o.transformTo("string",h(_)),y=o.transformTo("string",r.utf8encode(_)),x=p.length!==b.name.length,w=y.length!==_.length,S="",C="",M="",k=b.dir,P=b.date,O={crc32:0,compressedSize:0,uncompressedSize:0};e&&!n||(O.crc32=t.crc32,O.compressedSize=t.compressedSize,O.uncompressedSize=t.uncompressedSize);var L=0;e&&(L|=8),f||!x&&!w||(L|=2048);var I=0,A=0;k&&(I|=16),"UNIX"===s?(A=798,I|=function(t,e){var n=t;return t||(n=e?16893:33204),(65535&n)<<16}(b.unixPermissions,k)):(A=20,I|=function(t){return 63&(t||0)}(b.dosPermissions)),d=P.getUTCHours(),d<<=6,d|=P.getUTCMinutes(),d<<=5,d|=P.getUTCSeconds()/2,u=P.getUTCFullYear()-1980,u<<=4,u|=P.getUTCMonth()+1,u<<=5,u|=P.getUTCDate(),x&&(C=i(1,1)+i(l(m),4)+p,S+="up"+i(C.length,2)+C),w&&(M=i(1,1)+i(l(v),4)+y,S+="uc"+i(M.length,2)+M);var j="";return j+="\n\0",j+=i(L,2),j+=g.magic,j+=i(d,2),j+=i(u,2),j+=i(O.crc32,4),j+=i(O.compressedSize,4),j+=i(O.uncompressedSize,4),j+=i(m.length,2),j+=i(S.length,2),{fileRecord:c.LOCAL_FILE_HEADER+j+m+S,dirRecord:c.CENTRAL_FILE_HEADER+i(A,2)+j+i(v.length,2)+"\0\0\0\0"+i(I,4)+i(a,4)+m+S+v}}var o=t("../utils"),s=t("../stream/GenericWorker"),r=t("../utf8"),l=t("../crc32"),c=t("../signature");function h(t,e,n,i){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=n,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(h,s),h.prototype.push=function(t){var e=t.meta.percent||0,n=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:n?(e+100*(n-i-1))/n:100}}))},h.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var n=a(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,n=a(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),e)this.push({data:function(t){return c.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)n=(n<<8)+this.byteAt(e);return this.index+=t,n},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=a},{"../utils":32}],19:[function(t,e,n){"use strict";var i=t("./Uint8ArrayReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,n){"use strict";var i=t("./DataReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},a.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},a.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},a.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,e,n){"use strict";var i=t("./ArrayReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,n){"use strict";var i=t("../utils"),a=t("../support"),o=t("./ArrayReader"),s=t("./StringReader"),r=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||a.uint8array?"nodebuffer"===e?new r(t):a.uint8array?new l(i.transformTo("uint8array",t)):new o(i.transformTo("array",t)):new s(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,n){"use strict";n.LOCAL_FILE_HEADER="PK\x03\x04",n.CENTRAL_FILE_HEADER="PK\x01\x02",n.CENTRAL_DIRECTORY_END="PK\x05\x06",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,e,n){"use strict";var i=t("./GenericWorker"),a=t("../utils");function o(t){i.call(this,"ConvertWorker to "+t),this.destType=t}a.inherits(o,i),o.prototype.processChunk=function(t){this.push({data:a.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,n){"use strict";var i=t("./GenericWorker"),a=t("../crc32");function o(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,i),o.prototype.processChunk=function(t){this.streamInfo.crc32=a(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./GenericWorker");function o(t){a.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(o,a),o.prototype.processChunk=function(t){t&&(this.streamInfo[this.propName]=(this.streamInfo[this.propName]||0)+t.data.length),a.prototype.processChunk.call(this,t)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./GenericWorker");function o(t){a.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}i.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,n){"use strict";function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var n=0;n "+t:t}},e.exports=i},{}],29:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),s=t("../base64"),r=t("../support"),l=t("../external"),c=null;if(r.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function h(t,e,n){var s=e;switch(e){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=e,this._mimeType=n,i.checkSupport(s),this._worker=t.pipe(new a(s)),t.lock()}catch(t){this._worker=new o("error"),this._worker.error(t)}}h.prototype={accumulate:function(t){return function(t,e){return new l.Promise(function(n,a){var o=[],r=t._internalType,l=t._outputType,c=t._mimeType;t.on("data",function(t,n){o.push(t),e&&e(n)}).on("error",function(t){o=[],a(t)}).on("end",function(){try{var t=function(t,e,n){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),n);case"base64":return s.encode(e);default:return i.transformTo(t,e)}}(l,function(t,e){var n,i=0,a=null,o=0;for(n=0;n>>6:(n<65536?e[s++]=224|n>>>12:(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63),e[s++]=128|n>>>6&63),e[s++]=128|63&n);return e}(t)},n.utf8decode=function(t){return a.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,n,a,o,s=t.length,l=new Array(2*s);for(e=n=0;e>10&1023,l[n++]=56320|1023&a)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),i.applyFromCharCode(l)}(t=i.transformTo(a.uint8array?"uint8array":"array",t))},i.inherits(c,s),c.prototype.processChunk=function(t){var e=i.transformTo(a.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var s=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+r[t[n]]>e?n:e}(e),l=e;s!==e.length&&(a.uint8array?(l=e.subarray(0,s),this.leftOver=e.subarray(s,e.length)):(l=e.slice(0,s),this.leftOver=e.slice(s,e.length))),this.push({data:n.utf8decode(l),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,i.inherits(h,s),h.prototype.processChunk=function(t){this.push({data:n.utf8encode(t.data),meta:t.meta})},n.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var i=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),s=t("set-immediate-shim"),r=t("./external");function l(t){return t}function c(t,e){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,n,i,a=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(n<65536?e[s++]=224|n>>>12:(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63),e[s++]=128|n>>>6&63),e[s++]=128|63&n);return e},n.buf2binstring=function(t){return l(t,t.length)},n.binstring2buf=function(t){for(var e=new i.Buf8(t.length),n=0,a=e.length;n>10&1023,c[i++]=56320|1023&a)}return l(c,i)},n.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+s[t[n]]>e?n:e}},{"./common":41}],43:[function(t,e,n){"use strict";e.exports=function(t,e,n,i){for(var a=65535&t|0,o=t>>>16&65535|0,s=0;0!==n;){for(n-=s=2e3>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e,n,a){var o=i,s=a+n;t^=-1;for(var r=a;r>>8^o[255&(t^e[r])];return-1^t}},{}],46:[function(t,e,n){"use strict";var i,a=t("../utils/common"),o=t("./trees"),s=t("./adler32"),r=t("./crc32"),l=t("./messages"),c=-2,h=258,d=262,u=113;function b(t,e){return t.msg=l[e],e}function g(t){return(t<<1)-(4t.avail_out&&(n=t.avail_out),0!==n&&(a.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function p(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,m(t.strm)}function _(t,e){t.pending_buf[t.pending++]=e}function v(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function y(t,e){var n,i,a=t.max_chain_length,o=t.strstart,s=t.prev_length,r=t.nice_match,l=t.strstart>t.w_size-d?t.strstart-(t.w_size-d):0,c=t.window,u=t.w_mask,b=t.prev,g=t.strstart+h,f=c[o+s-1],m=c[o+s];t.prev_length>=t.good_match&&(a>>=2),r>t.lookahead&&(r=t.lookahead);do{if(c[(n=e)+s]===m&&c[n+s-1]===f&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&ol&&0!=--a);return s<=t.lookahead?s:t.lookahead}function x(t){var e,n,i,o,l,c,h,u,b,g,f=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-d)){for(a.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=n=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--n;);for(e=n=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--n;);o+=f}if(0===t.strm.avail_in)break;if(h=t.window,u=t.strstart+t.lookahead,g=void 0,(b=o)<(g=(c=t.strm).avail_in)&&(g=b),n=0===g?0:(c.avail_in-=g,a.arraySet(h,c.input,c.next_in,g,u),1===c.state.wrap?c.adler=s(c.adler,h,g,u):2===c.state.wrap&&(c.adler=r(c.adler,h,g,u)),c.next_in+=g,c.total_in+=g,g),t.lookahead+=n,t.lookahead+t.insert>=3)for(t.ins_h=t.window[l=t.strstart-t.insert],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(i=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3&&t.match_length<=t.prev_length){for(a=t.strstart+t.lookahead-3,i=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=a&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(x(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+n;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,p(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-d&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&p(t,!1),1)}),new C(4,4,8,4,w),new C(4,5,16,8,w),new C(4,6,32,32,w),new C(4,4,16,16,S),new C(8,16,32,32,S),new C(8,16,128,128,S),new C(8,32,128,256,S),new C(32,128,258,1024,S),new C(32,258,258,4096,S)],n.deflateInit=function(t,e){return O(t,e,8,15,8,0)},n.deflateInit2=O,n.deflateReset=P,n.deflateResetKeep=k,n.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},n.deflate=function(t,e){var n,a,s,l;if(!t||!t.state||5>8&255),_(a,a.gzhead.time>>16&255),_(a,a.gzhead.time>>24&255),_(a,9===a.level?2:2<=a.strategy||a.level<2?4:0),_(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(_(a,255&a.gzhead.extra.length),_(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=r(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69):(_(a,0),_(a,0),_(a,0),_(a,0),_(a,0),_(a,9===a.level?2:2<=a.strategy||a.level<2?4:0),_(a,3),a.status=u);else{var d=8+(a.w_bits-8<<4)<<8;d|=(2<=a.strategy||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(d|=32),d+=31-d%31,a.status=u,v(a,d),0!==a.strstart&&(v(a,t.adler>>>16),v(a,65535&t.adler)),t.adler=1}if(69===a.status)if(a.gzhead.extra){for(s=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>s&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),m(t),s=a.pending,a.pending!==a.pending_buf_size));)_(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>s&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=73)}else a.status=73;if(73===a.status)if(a.gzhead.name){s=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>s&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),m(t),s=a.pending,a.pending===a.pending_buf_size)){l=1;break}l=a.gzindexs&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),0===l&&(a.gzindex=0,a.status=91)}else a.status=91;if(91===a.status)if(a.gzhead.comment){s=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>s&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),m(t),s=a.pending,a.pending===a.pending_buf_size)){l=1;break}l=a.gzindexs&&(t.adler=r(t.adler,a.pending_buf,a.pending-s,s)),0===l&&(a.status=103)}else a.status=103;if(103===a.status&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&m(t),a.pending+2<=a.pending_buf_size&&(_(a,255&t.adler),_(a,t.adler>>8&255),t.adler=0,a.status=u)):a.status=u),0!==a.pending){if(m(t),0===t.avail_out)return a.last_flush=-1,0}else if(0===t.avail_in&&g(e)<=g(n)&&4!==e)return b(t,-5);if(666===a.status&&0!==t.avail_in)return b(t,-5);if(0!==t.avail_in||0!==a.lookahead||0!==e&&666!==a.status){var y=2===a.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(x(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}(a,e):3===a.strategy?function(t,e){for(var n,i,a,s,r=t.window;;){if(t.lookahead<=h){if(x(t),t.lookahead<=h&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(n=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(p(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(p(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(p(t,!1),0===t.strm.avail_out)?1:2}(a,e):i[a.level].func(a,e);if(3!==y&&4!==y||(a.status=666),1===y||3===y)return 0===t.avail_out&&(a.last_flush=-1),0;if(2===y&&(1===e?o._tr_align(a):5!==e&&(o._tr_stored_block(a,0,0,!1),3===e&&(f(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),m(t),0===t.avail_out))return a.last_flush=-1,0}return 4!==e?0:a.wrap<=0?1:(2===a.wrap?(_(a,255&t.adler),_(a,t.adler>>8&255),_(a,t.adler>>16&255),_(a,t.adler>>24&255),_(a,255&t.total_in),_(a,t.total_in>>8&255),_(a,t.total_in>>16&255),_(a,t.total_in>>24&255)):(v(a,t.adler>>>16),v(a,65535&t.adler)),m(t),0=n.w_size&&(0===r&&(f(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new a.Buf8(n.w_size),a.arraySet(u,e,b-n.w_size,n.w_size,0),e=u,b=n.w_size),l=t.avail_in,h=t.next_in,d=t.input,t.avail_in=b,t.next_in=0,t.input=e,x(n);n.lookahead>=3;){for(i=n.strstart,o=n.lookahead-2;n.ins_h=(n.ins_h<>>=y=v>>>24,g-=y,0==(y=v>>>16&255))k[o++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=f[(65535&v)+(b&(1<>>=y,g-=y),g<15&&(b+=M[i++]<>>=y=v>>>24,g-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=m[(65535&v)+(b&(1<>>=y,g-=y,(y=o-s)>3,b&=(1<<(g-=x<<3))-1,t.next_in=i,t.next_out=o,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(t){var e;return t&&t.state?(t.total_in=t.total_out=(e=t.state).total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):l}function u(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,d(t)):l}function b(t,e){var n,i;return t&&t.state?(i=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=s.wsize?(i.arraySet(s.window,e,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(a<(o=s.wsize-s.wnext)&&(o=a),i.arraySet(s.window,e,n-a,o,s.wnext),(a-=o)?(i.arraySet(s.window,e,n-a,a,0),s.wnext=a,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,n.check=o(n.check,T,2,0),p=m=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",n.mode=30;break}if(p-=4,A=8+(15&(m>>>=4)),0===n.wbits)n.wbits=A;else if(A>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(T[0]=255&m,T[1]=m>>>8&255,n.check=o(n.check,T,2,0)),p=m=0,n.mode=3;case 3:for(;p<32;){if(0===g)break t;g--,m+=h[u++]<>>8&255,T[2]=m>>>16&255,T[3]=m>>>24&255,n.check=o(n.check,T,4,0)),p=m=0,n.mode=4;case 4:for(;p<16;){if(0===g)break t;g--,m+=h[u++]<>8),512&n.flags&&(T[0]=255&m,T[1]=m>>>8&255,n.check=o(n.check,T,2,0)),p=m=0,n.mode=5;case 5:if(1024&n.flags){for(;p<16;){if(0===g)break t;g--,m+=h[u++]<>>8&255,n.check=o(n.check,T,2,0)),p=m=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(g<(w=n.length)&&(w=g),w&&(n.head&&(A=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,h,u,w,A)),512&n.flags&&(n.check=o(n.check,h,w,u)),g-=w,u+=w,n.length-=w),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===g)break t;for(w=0;A=h[u+w++],n.head&&A&&n.length<65536&&(n.head.name+=String.fromCharCode(A)),A&&w>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;p<32;){if(0===g)break t;g--,m+=h[u++]<>>=7&p,p-=7&p,n.mode=27;break}for(;p<3;){if(0===g)break t;g--,m+=h[u++]<>>=1)){case 0:n.mode=14;break;case 1:if(_(n),n.mode=20,6!==e)break;m>>>=2,p-=2;break t;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}m>>>=2,p-=2;break;case 14:for(m>>>=7&p,p-=7&p;p<32;){if(0===g)break t;g--,m+=h[u++]<>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,p=m=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(w=n.length){if(g>>=5)),p-=5,n.ncode=4+(15&(m>>>=5)),m>>>=4,p-=4,286>>=3,p-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,j=r(0,n.lens,0,19,n.lencode,0,n.work,B={bits:n.lenbits}),n.lenbits=B.bits,j){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,P=65535&z,!((M=z>>>24)<=p);){if(0===g)break t;g--,m+=h[u++]<>>=M,p-=M,n.lens[n.have++]=P;else{if(16===P){for(E=M+2;p>>=M,p-=M,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}A=n.lens[n.have-1],w=3+(3&m),m>>>=2,p-=2}else if(17===P){for(E=M+3;p>>=M)),m>>>=3,p-=3}else{for(E=M+7;p>>=M)),m>>>=7,p-=7}if(n.have+w>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;w--;)n.lens[n.have++]=A}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,j=r(1,n.lens,0,n.nlen,n.lencode,0,n.work,B={bits:n.lenbits}),n.lenbits=B.bits,j){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,j=r(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B={bits:n.distbits}),n.distbits=B.bits,j){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(6<=g&&258<=f){t.next_out=b,t.avail_out=f,t.next_in=u,t.avail_in=g,n.hold=m,n.bits=p,s(t,x),b=t.next_out,d=t.output,f=t.avail_out,u=t.next_in,h=t.input,g=t.avail_in,m=n.hold,p=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;k=(z=n.lencode[m&(1<>>16&255,P=65535&z,!((M=z>>>24)<=p);){if(0===g)break t;g--,m+=h[u++]<>O)])>>>16&255,P=65535&z,!(O+(M=z>>>24)<=p);){if(0===g)break t;g--,m+=h[u++]<>>=O,p-=O,n.back+=O}if(m>>>=M,p-=M,n.back+=M,n.length=P,0===k){n.mode=26;break}if(32&k){n.back=-1,n.mode=12;break}if(64&k){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&k,n.mode=22;case 22:if(n.extra){for(E=n.extra;p>>=n.extra,p-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;k=(z=n.distcode[m&(1<>>16&255,P=65535&z,!((M=z>>>24)<=p);){if(0===g)break t;g--,m+=h[u++]<>O)])>>>16&255,P=65535&z,!(O+(M=z>>>24)<=p);){if(0===g)break t;g--,m+=h[u++]<>>=O,p-=O,n.back+=O}if(m>>>=M,p-=M,n.back+=M,64&k){t.msg="invalid distance code",n.mode=30;break}n.offset=P,n.extra=15&k,n.mode=24;case 24:if(n.extra){for(E=n.extra;p>>=n.extra,p-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===f)break t;if(n.offset>(w=x-f)){if((w=n.offset-w)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}S=w>n.wnext?n.wsize-(w-=n.wnext):n.wnext-w,w>n.length&&(w=n.length),C=n.window}else C=d,S=b-n.offset,w=n.length;for(f_?(y=D[N+d[C]],B[E+d[C]]):(y=96,0),b=1<>L)+(g-=b)]=v<<24|y<<16|x|0,0!==g;);for(b=1<>=1;if(0!==b?(j&=b-1,j+=b):j=0,C++,0==--z[S]){if(S===k)break;S=e[n+d[C]]}if(P>>7)]}function x(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function w(t,e,n){t.bi_valid>16-n?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<>>=1,n<<=1,0<--e;);return n>>>1}function M(t,e,n){var i,a,o=new Array(16),s=0;for(i=1;i<=15;i++)o[i]=s=s+n[i-1]<<1;for(a=0;a<=e;a++){var r=t[2*a+1];0!==r&&(t[2*a]=C(o[r]++,r))}}function k(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function P(t){8>1;1<=n;n--)L(t,o,n);for(a=l;n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],L(t,o,1),i=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=i,o[2*a]=o[2*n]+o[2*i],t.depth[a]=(t.depth[n]>=t.depth[i]?t.depth[n]:t.depth[i])+1,o[2*n+1]=o[2*i+1]=a,t.heap[1]=a++,L(t,o,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,i,a,o,s,r,l=e.dyn_tree,c=e.max_code,h=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,b=e.stat_desc.extra_base,g=e.stat_desc.max_length,f=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(l[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<573;n++)g<(o=l[2*l[2*(i=t.heap[n])+1]+1]+1)&&(o=g,f++),l[2*i+1]=o,c>=7;i<30;i++)for(p[i]=a<<7,t=0;t<1<>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),A(t,t.l_desc),A(t,t.d_desc),s=function(t){var e;for(j(t,t.dyn_ltree,t.l_desc.max_code),j(t,t.dyn_dtree,t.d_desc.max_code),A(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),(o=t.static_len+3+7>>>3)<=(a=t.opt_len+3+7>>>3)&&(a=o)):a=o=n+5,n+4<=a&&-1!==e?z(t,e,n,i):4===t.strategy||o===a?(w(t,2+(i?1:0),3),I(t,c,h)):(w(t,4+(i?1:0),3),function(t,e,n,i){var a;for(w(t,e-257,5),w(t,n-1,5),w(t,i-4,4),a=0;a>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(u[n]+256+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},n._tr_align=function(t){w(t,2,3),S(t,256,c),function(t){16===t.bi_valid?(x(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){"use strict";e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}}]); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/2-es5.8b9382eeae4dc011fe42.js b/classifai-core/src/main/resources/webroot/2-es5.8b9382eeae4dc011fe42.js new file mode 100644 index 000000000..707d9e6ad --- /dev/null +++ b/classifai-core/src/main/resources/webroot/2-es5.8b9382eeae4dc011fe42.js @@ -0,0 +1 @@ +!function(){function t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],i=!0,a=!1,o=void 0;try{for(var r,s=t[Symbol.iterator]();!(i=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);i=!0);}catch(l){a=!0,o=l}finally{try{i||null==s.return||s.return()}finally{if(a)throw o}}return n}(t,e)||a(t,e)||function(){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 e(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw r}}}}function n(t){if(null==t)throw new TypeError("Cannot destructure undefined")}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||a(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 a(t,e){if(t){if("string"==typeof t)return o(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)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=n-1?n-1:i+=1:i<=0?0:e-=1},this.checkAnnotationMetadataProp=function(t){var e=t.bnd_box,n=t.polygons;return null!=e?e:n},this.changeAnnotationLabel=function(t,e){var n=e.label,i=e.index;return t.map(function(t){return t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(function(t){var e=t.bnd_box,a=t.polygons,o=Object(m.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},o),{bnd_box:null==e?void 0:e.map(function(t,e){return e===i?Object.assign(Object.assign({},t),{label:n}):t}),polygons:null==a?void 0:a.map(function(t,e){return e===i?Object.assign(Object.assign({},t),{label:n}):t})})})}):t})},this.deleteAnnotation=function(t,e){return t.map(function(t){return t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(function(t){var n=t.bnd_box,i=t.polygons,a=Object(m.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},a),{bnd_box:null==n?void 0:n.filter(function(t,n){return n!==e}),polygons:null==i?void 0:i.filter(function(t,n){return n!==e})})})}):t})},this.submitLabel=function(t,e,n,a){var o=a.mainLabelRegion,r=a.subLabelRegion;return t.map(function(t){return t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(function(t){var a=t.bnd_box,s=t.polygons,l=Object(m.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},l),{bnd_box:null==a?void 0:a.map(function(t,a){return a===n?Object.assign(Object.assign({},t),{region:o,subLabel:t.subLabel&&t.subLabel.length>0?[].concat(i(t.subLabel),[{label:e,region:r}]):[{label:e,region:r}]}):t}),polygons:null==s?void 0:s.map(function(t,a){return a===n?Object.assign(Object.assign({},t),{region:o,subLabel:t.subLabel&&t.subLabel.length>0?[].concat(i(t.subLabel),[{label:e,region:r}]):[{label:e,region:r}]}):t})})})}):t})},this.removeSubLabel=function(t,e){var n=e.selectedAnnoIndex,i=e.selectedSubLabelIndex;return t.map(function(t){return t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(function(t){var e=t.bnd_box,a=t.polygons,o=Object(m.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},o),{bnd_box:null==e?void 0:e.map(function(t,e){var a;return e===n?Object.assign(Object.assign({},t),{subLabel:null===(a=t.subLabel)||void 0===a?void 0:a.filter(function(t,e){return e!==i})}):t}),polygons:null==a?void 0:a.map(function(t,e){var a;return e===n?Object.assign(Object.assign({},t),{subLabel:null===(a=t.subLabel)||void 0===a?void 0:a.filter(function(t,e){return e!==i})}):t})})})}):t})},this.setLocalStorageProjectProgress=function(t,e){localStorage.setItem("".concat(t,"_").concat(a._imgLblApiService.imageLabellingMode),JSON.stringify({cache:e}))},this.getLocalStorageProjectProgress=function(t){var e=localStorage.getItem("".concat(t,"_").concat(a._imgLblApiService.imageLabellingMode));return e?JSON.parse(e):null},this.updateProjectProgress=function(t,e){t.forEach(function(t){var i=t.annotation;i&&(a.setLocalStorageProjectProgress(e,i),null==i||i.forEach(function(t){a._imgLblApiService.updateProjectProgress(e,t.uuid,t).pipe(Object(p.a)()).subscribe(function(t){n(t)})}))})}}).\u0275fac=function(t){return new(t||h)(k.Qb(I))},h.\u0275prov=k.Db({token:h,factory:h.\u0275fac,providedIn:"any"}),h),R=s("I7yr"),F=s("F7l1"),X=s("Iab2"),W=s("xOOu"),U=((f=function(){function n(){r(this,n)}return l(n,[{key:"exportSaveFormat",value:function(t){var e=t.saveCurrentImage,n=t.saveFormat,i=t.metadata,a=t.projectName,o=t.fullLabelList,r=t.labelList,s=t.projectFullMetadata;return Object(m.a)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var l,c,u,h,d,f,b,g,m,v,p,_,y,x,w,S,k,C,M,P,O,L,I,A,j,B,E,z,T=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=n,t.next="pascalVoc"===t.t0?3:"yolo"===t.t0?30:"ocr"===t.t0?57:"label"===t.t0?67:"coco"===t.t0?71:"json"===t.t0?75:83;break;case 3:if(i){t.next=5;break}return t.abrupt("return",{message:0,msg:"warning.noMetadata"});case 5:if(null==i?void 0:i.bnd_box){t.next=7;break}return t.abrupt("return",{message:0,msg:"warning.noBoundingBox"});case 7:if(r){t.next=9;break}return t.abrupt("return",{message:0,msg:"warning.noLabelList"});case 9:if(!e){t.next=12;break}return l=this.calBoxCoorOriginalImages(i),c=this.getFileName(i.img_path),u=i.img_path,h=i.img_depth,d=i.img_ori_w,f=i.img_ori_h,b=this.generatePascalVocFormat({img_path:u,img_depth:h,img_ori_w:d,img_ori_h:f,bnd_box:l},r),g=c.split("."),t.abrupt("return",(this.saveFile({content:b,filename:g[0]+".xml",type:"text/xml;charset=utf-8"}),{message:1,msg:"success"}));case 12:if(s){t.next=14;break}return t.abrupt("return",{message:0,msg:"warning.noImageList"});case 14:if(m=[],v=!0,s.forEach(function(t){var e=(t.bnd_box?t.bnd_box.map(function(t){return t.label}):[]).some(function(t){return r.indexOf(t)>=0});if(t.bnd_box&&t.bnd_box.length>0&&e){v=!1;var n=T.calBoxCoorOriginalImages(t),i=T.getFileName(t.img_path),a=t.img_path,o=t.img_depth,s=t.img_ori_w,l=t.img_ori_h,c=T.generatePascalVocFormat({img_path:a,img_depth:o,img_ori_w:s,img_ori_h:l,bnd_box:n},r),u=i.split(".");m.push({filename:u[0]+".xml",content:c})}}),!v){t.next=21;break}t.t1={message:0,msg:"warning.noLabelSelected"},t.next=29;break;case 21:if(!m){t.next=27;break}return t.next=24,this.saveAsZip(m,"pascal_voc",a);case 24:t.t2={message:1,msg:"success"},t.next=28;break;case 27:t.t2={message:0,msg:"warning.noProgress"};case 28:t.t1=t.t2;case 29:return t.abrupt("return",t.t1);case 30:if(i){t.next=32;break}return t.abrupt("return",{message:0,msg:"warning.noMetadata"});case 32:if(null==i?void 0:i.bnd_box){t.next=34;break}return t.abrupt("return",{message:0,msg:"warning.noBoundingBox"});case 34:if(r){t.next=36;break}return t.abrupt("return",{message:0,msg:"warning.noLabelList"});case 36:if(!e){t.next=39;break}return p=this.calBoxCoorOriginalImages(i),_=this.getFileName(i.img_path),y=i.img_ori_w,x=i.img_ori_h,w=this.generateYoloFormat(Object.assign({},{img_ori_w:y,img_ori_h:x,bnd_box:p}),r),S=_.split("."),t.abrupt("return",(this.saveFile({content:w,filename:S[0]+".txt",type:"text/plain;charset=utf-8"}),{message:1,msg:"success"}));case 39:if(s){t.next=41;break}return t.abrupt("return",{message:0,msg:"warning.noImageList"});case 41:if(k=[],C=!0,s.forEach(function(t){var e=(t.bnd_box?t.bnd_box.map(function(t){return t.label}):[]).some(function(t){return r.indexOf(t)>=0});if(t.bnd_box&&t.bnd_box.length>0&&e){C=!1;var n=T.calBoxCoorOriginalImages(t),i=T.getFileName(t.img_path),a=t.img_ori_w,o=t.img_ori_h,s=T.generateYoloFormat(Object.assign({},{img_ori_w:a,img_ori_h:o,bnd_box:n}),r),l=i.split(".");k.push({filename:l[0]+".txt",content:s})}}),!C){t.next=48;break}t.t3={message:0,msg:"warning.noLabelSelected"},t.next=56;break;case 48:if(!k){t.next=54;break}return t.next=51,this.saveAsZip(k,n,a);case 51:t.t4={message:1,msg:"success"},t.next=55;break;case 54:t.t4={message:0,msg:"warning.noProgress"};case 55:t.t3=t.t4;case 56:return t.abrupt("return",t.t3);case 57:if(i){t.next=59;break}return t.abrupt("return",{message:0,msg:"warning.noMetadata"});case 59:if(null==i?void 0:i.bnd_box){t.next=61;break}return t.abrupt("return",{message:0,msg:"warning.noBoundingBox"});case 61:if(s){t.next=63;break}return t.abrupt("return",{message:0,msg:"warning.noImageList"});case 63:if(o){t.next=65;break}return t.abrupt("return",{message:0,msg:"warning.noImageList"});case 65:return M="",P=0,t.abrupt("return",(s.forEach(function(t,e){0===e&&(M+="filename,x1,y1,x2,y2,label\n");var n=T.calBoxCoorOriginalImages(t),i=T.getFileName(t.img_path),a=T.generateOCRFormat({bnd_box:n},i,o);""===a&&P++,M+=""+a}),M&&P!==s.length?(this.saveFile({content:M,filename:a+"_text_ocr_labels.csv",type:"text/csv;charset=utf-8"}),{message:1,msg:"success"}):{message:0,msg:"warning.noProgress"}));case 67:if(r){t.next=69;break}return t.abrupt("return",{message:0,msg:"warning.noLabelList"});case 69:return O=a+"_label.txt",L=this.generateLabelFormat(r),t.abrupt("return",""===L?{message:0,msg:"warning.noLabelSelected"}:(this.saveFile({content:L,filename:O,type:"text/plain;charset=utf-8"}),{message:1,msg:"success"}));case 71:if(s){t.next=73;break}return t.abrupt("return",{message:0,msg:"warning.noImageList"});case 73:return I=this.calPolyCoorOriginalImages(s),A=this.getCocoContent(I,r),j=this.getCocoFileName(a),t.abrupt("return",(this.saveFile({content:A,filename:j,type:"text/json;charset=utf-8"}),{message:1,msg:"success"}));case 75:if(i){t.next=77;break}return t.abrupt("return",{message:0,msg:"warning.noMetadata"});case 77:if(null==i?void 0:i.polygons){t.next=79;break}return t.abrupt("return",{message:0,msg:"warning.noPolygon"});case 79:if(s){t.next=81;break}return t.abrupt("return",{message:0,msg:"warning.noImageList"});case 81:return B=this.calPolyCoorOriginalImages(s),E=this.getJsonContent(B),z=this.getJsonFileName(a),t.abrupt("return",(this.saveFile({content:E,filename:z,type:"text/json;charset=utf-8"}),{message:1,msg:"success"}));case 83:case"end":return t.stop()}},t,this)}))}},{key:"calBoxCoorOriginalImages",value:function(t){var e=t.bnd_box,n=t.img_w,i=t.img_h,a=t.img_ori_w,o=t.img_ori_h,r=a/n,s=o/i;return e.map(function(t){var e=Object(m.b)(t,["subLabel","region"]),n=t.distancetoImg.x*r,i=n+(t.x2-t.x1)*r,a=t.distancetoImg.y*s,o=a+(t.y2-t.y1)*s;return Object.assign(Object.assign({},e),{x1:n,x2:i,y1:a,y2:o})})}},{key:"calPolyCoorOriginalImages",value:function(t){return t.map(function(t){var e=t.img_ori_w,n=t.img_ori_h,i=t.img_w,a=t.img_h,o=t.polygons,r=Object(m.b)(t,["img_ori_w","img_ori_h","img_w","img_h","polygons"]),s=e/i,l=n/a,c=o.filter(function(t){return t.coorPt.map(function(t){var e=t.distancetoImg;return{distancetoImg:e,x:e.x*s,y:e.y*l}})});return Object.assign(Object.assign({},r),{img_ori_w:e,img_ori_h:n,img_w:i,img_h:a,polygons:c})})}},{key:"generatePascalVocFormat",value:function(n,i){var a=n.bnd_box,o=n.img_path,r=n.img_depth,s=n.img_ori_w,l=n.img_ori_h,c="\n",u=this.getItemName("file",o),h=this.getItemName("folder",o),d=this.createNode("folder");c+="\t"+d[0]+h+d[1];var f=this.createNode("filename");c+="\t"+f[0]+u+f[1];var b=this.createNode("path");c+="\t"+b[0]+o.split("\\").join("/")+b[1];var g=this.createNode("source"),m=this.createNode("database");c+="\t"+g[0]+"\n",c+="\t\t"+m[0]+"unknown"+m[1],c+="\t"+g[1];var v=this.createNode("size");c+="\t"+v[0]+"\n";var p=this.createNode("width"),_=this.createNode("height"),y=this.createNode("depth");c+="\t\t"+p[0]+s.toString()+p[1],c+="\t\t"+_[0]+l.toString()+_[1],c+="\t\t"+y[0]+(null==r?void 0:r.toString())+y[1],c+="\t"+v[1];var x=this.createNode("segmented");c+="\t"+x[0]+"0"+x[1];var w,S=this.createNode("object"),k=e(a.entries());try{for(k.s();!(w=k.n()).done;){var C=t(w.value,2),M=(C[0],C[1]),P=M.label,O=M.x1,L=M.x2,I=M.y1,A=M.y2;if(-1!==i.indexOf(P)){c+="\t"+S[0]+"\n";var j=this.createNode("name"),B=this.createNode("pose"),E=this.createNode("truncated"),z=this.createNode("difficult"),T=this.createNode("bndbox"),D=this.createNode("xmin"),N=this.createNode("ymin"),R=this.createNode("xmax"),F=this.createNode("ymax");c+="\t\t"+j[0]+P+j[1],c+="\t\t"+B[0]+"Unspecified"+B[1],c+="\t\t"+E[0]+"0"+E[1],c+="\t\t"+z[0]+"0"+z[1],c+="\t\t"+T[0]+"\n",c+="\t\t\t"+D[0]+Math.floor(O).toString()+D[1],c+="\t\t\t"+N[0]+Math.floor(I).toString()+N[1],c+="\t\t\t"+R[0]+Math.floor(L).toString()+R[1],c+="\t\t\t"+F[0]+Math.floor(A).toString()+F[1],c+="\t\t"+T[1],c+="\t"+S[1]}}}catch(X){k.e(X)}finally{k.f()}return c+=""}},{key:"generateYoloFormat",value:function(t,e){var n=t.bnd_box,i=t.img_ori_w,a=t.img_ori_h;return n.reduce(function(t,o,r){var s=o.x1,l=o.x2,c=o.y1,u=o.y2,h=o.label;if(-1===e.indexOf(h))return t;var d=(s+l)/2,f=(c+u)/2,b=l-s,g=u-c;return t+=e.indexOf(h).toString()+" ",t+="".concat((d/i).toString()," ").concat((f/a).toString()," "),t+="".concat((b/i).toString()," ").concat((g/a).toString()," "),r!==n.length&&(t+="\n"),t},"")}},{key:"generateOCRFormat",value:function(t,e,n){return t.bnd_box.reduce(function(t,i){var a=i.x1,o=i.x2,r=i.y1,s=i.y2,l=i.label;return-1===n.indexOf(l)?(t+="".concat(e,",").concat(a.toString(),",").concat(r.toString()),t+=",".concat(o.toString(),",").concat(s.toString(),",").concat(l.toString(),"\n")):t},"")}},{key:"getItemName",value:function(t,e){var n=e.split("\\").join("/").split("/");return"folder"===t?(n.pop(),n.join("/")):n[n.length-1]}},{key:"createNode",value:function(t){return["<"+t+">","\n"]}},{key:"generateLabelFormat",value:function(t){return t.reduce(function(t,e,n){return n!==(t+=e).length?t+"\n":t},"")}},{key:"saveFile",value:function(t){var e=t.content,n=t.filename,i=t.type,a=new Blob([e],{type:i});X.saveAs(a,n)}},{key:"saveAsZip",value:function(n,i,a){return Object(m.a)(this,void 0,void 0,regeneratorRuntime.mark(function o(){var r,s,l,c,u,h,d,f;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:r=new W,s=e(n.entries());try{for(s.s();!(l=s.n()).done;)(c=t(l.value,2))[0],u=c[1],h=u.content,d=u.filename,r.file(d,h)}catch(b){s.e(b)}finally{s.f()}return o.next=5,r.generateAsync({type:"blob"});case 5:f=o.sent,X.saveAs(f,"".concat(a,"_").concat(i,"_labels.zip"));case 7:case"end":return o.stop()}},o)}))}},{key:"getFileName",value:function(t){var e=t.split("\\").join("/").split("/");return e[e.length-1]}},{key:"getCocoFileName",value:function(t){return t+"_segmentation_coco.json"}},{key:"getJsonFileName",value:function(t){return t+"_segmentation_JSON.json"}},{key:"getCocoContent",value:function(t,e){var n="{";return n+=this.generateCocoInfo(),n+=this.generateCocoImage(t),n+=this.generateCocoAnnotation(t,e),n+=this.generateCocoLicense(),n+=this.generateCocoCategory(e),n=(n+="}").replace(/(}{)/gi,"},{")}},{key:"generateCocoInfo",value:function(){var t=new Date,e='"info":{';return e+='year:"'.concat(t.getFullYear().toString(),'",'),e+='version:"1.0",',e+='description:"VIA project exported to COCO format using classifai(https://classifai.ai/)",',e+='contributor:"",',e+='url:"https://classifai.ai/",',e+='date_created:"'.concat(t.toUTCString(),'"'),e+="},"}},{key:"generateCocoImage",value:function(t){var e=this,n="images:[";return n+=t.reduce(function(n,i,a){var o=i.img_ori_w,r=i.img_ori_h,s=i.img_path;return n+="{id:".concat((a+1).toString(),","),n+="width:".concat(o.toString(),","),n+="height:".concat(r.toString(),","),n+='file_name:"'.concat(e.getFileName(s),'",'),n+="license:0,",n+='date_captured:""}',a!==t.length&&(n+=","),n},""),n+="],"}},{key:"generateCocoAnnotation",value:function(t,e){var n=this,i="annotations:[",a=0;return i+=t.reduce(function(i,o,r){return o.polygons.length>0&&(a+=1,i+=n.calPolyCoorOriginalImages(t).map(function(t){return t.polygons})[0].reduce(function(t,i,o){var s=i.coorPt,l=i.label,c=Object(m.b)(i,["coorPt","label"]);t+="{segmentation:[",s.length>0&&(t+="[",t+=s.reduce(function(t,e,n){var i=e.x,a=e.y;return t+=i.toString()+",",t+=""+a.toString(),n!==s.length-1&&(t+=","),t},""),t+="]");var u=n.getPolyBBox(Object.assign({coorPt:s,label:l},c));return u&&(t+="],",t+="area:".concat(((u.x2-u.x1)*(u.y2-u.y1)).toString(),","),t+="bbox:[".concat(u.x1.toString(),",").concat(u.y1.toString(),",").concat((u.x2-u.x1).toString(),",").concat((u.y2-u.y1).toString(),"],"),t+="iscrowd:0,",t+="id:".concat(a.toString(),","),t+="image_id:".concat((r+1).toString(),","),t+="category_id:".concat(null==e?void 0:e.indexOf(l),"}")),t},"")),i},""),i+="]",i+=","}},{key:"getPolyBBox",value:function(n){var i=n.coorPt;if(i.length>0){var a,o={x1:1e7,x2:-1e8,y1:1e7,y2:-1e8},r=e(i.entries());try{for(r.s();!(a=r.n()).done;){var s=t(a.value,2),l=(s[0],s[1]),c=l.x,u=l.y;c0?o.toString():"";return(t+=e.generateImageString(a,s,l))+"},"},""),n+="}"}},{key:"generateImageString",value:function(t,e,n){var i="'".concat(e,"':{");return i+='fileref:"",',i+='size:"'.concat(n,'",'),i+='filename:"'.concat(e,'",'),i+='base64_img_data:"",',i+="file_attributes:{},",i+="regions:{".concat(this.generateRegion(t),"}")}},{key:"generateRegion",value:function(n){if(n.length>0)return n.reduce(function(i,a,o){var r=a.coorPt,s=a.label,l=a.region,c=a.subLabel,u="[",h="[";if(r.forEach(function(t,e){var n=t.x,i=t.y;u+=n.toString(),h+=i.toString(),e===r.length-1?(u+="]",h+="]"):(u+=",",h+=",")},""),i+=o.toString()+":{",i+="shape_attributes:{name:polygon,",i+="all_points_x:".concat(u,","),i+="all_points_y:".concat(h,"},"),i+="region_attributes:{".concat(s.trim(),':"').concat(l.trim(),'"}'),i+="}",0===c.length);else{i+=",";var d,f=e(c.entries());try{for(f.s();!(d=f.n()).done;){var b=t(d.value,2),g=(b[0],b[1]),m=g.label,v=g.region;i+='"'.concat(m.trim(),'":"').concat(v.trim(),'"'),i+="},"}}catch(p){f.e(p)}finally{f.f()}}return o!==n.length-1&&(i+=","),i},"")}}]),n}()).\u0275fac=function(t){return new(t||f)},f.\u0275prov=k.Db({token:f,factory:f.\u0275fac,providedIn:"any"}),f),Y=s("x2Se"),V=((b=function(){function t(){r(this,t)}return l(t,[{key:"transform",value:function(t){return t?window.navigator.platform.startsWith("Mac")?t.split("/").slice(-1)[0]:t.split("\\").slice(-1)[0]:""}}]),t}()).\u0275fac=function(t){return new(t||b)},b.\u0275pipe=k.Gb({name:"fileNameSlice",type:b,pure:!0}),b),Z=s("sYmb");function H(t,e){if(1&t&&(k.Kb(0),k.Ib(1,"div",4),k.Mb(2,"label",6),k.oc(3),k.Wb(4,"fileNameSlice"),k.Lb(),k.Jb()),2&t){var n=k.Vb();k.xb(1),k.ac("ngClass",n._onChange.hasAnnotation?"indicator":"no-indicator"),k.xb(2),k.pc(k.Xb(4,2,n._onChange.thumbnailName))}}function $(t,e){1&t&&k.Ib(0,"label",6)}function K(t,e){if(1&t&&(k.Kb(0),k.Mb(1,"label"),k.oc(2),k.Lb(),k.Jb()),2&t){var n=k.Vb(3);k.xb(2),k.rc("",n._onChange.currentThumbnailIndex||0," / ",n._totalUuid,"")}}function J(t,e){if(1&t){var n=k.Nb();k.Kb(0),k.Mb(1,"div",8),k.Mb(2,"img",9),k.Tb("click",function(){return k.hc(n),k.Vb().$implicit.onClick()}),k.Wb(3,"translate"),k.Lb(),k.Lb(),k.Mb(4,"div",10),k.mc(5,K,3,2,"ng-container",11),k.Lb(),k.Jb()}if(2&t){var i=k.Vb(),a=i.$implicit,o=i.index,r=k.Vb();k.xb(2),k.ac("src",a.imgPath,k.jc)("alt",a.alt)("title",k.Xb(3,5,a.hoverLabel)),k.yb("data-index",o+a.alt),k.xb(3),k.ac("ngIf",r._onChange&&r._onChange.totalNumThumbnail)}}function G(t,e){if(1&t){var n=k.Nb();k.Mb(0,"div",8),k.Mb(1,"img",9),k.Tb("click",function(){return k.hc(n),k.Vb().$implicit.onClick()}),k.Wb(2,"translate"),k.Lb(),k.Lb()}if(2&t){var i=k.Vb(),a=i.$implicit,o=i.index;k.xb(1),k.ac("src",a.imgPath,k.jc)("alt",a.alt)("title",k.Xb(2,4,a.hoverLabel)),k.yb("data-index",o+a.alt)}}function q(t,e){if(1&t&&(k.Kb(0),k.mc(1,J,6,7,"ng-container",2),k.mc(2,G,3,6,"ng-template",null,7,k.nc),k.Jb()),2&t){var n=e.index,i=k.fc(3);k.xb(1),k.ac("ngIf",0===n)("ngIfElse",i)}}function Q(t,e){if(1&t&&(k.Kb(0),k.Mb(1,"div",8),k.Mb(2,"img",9),k.Tb("click",function(){return e.$implicit.onClick()}),k.Wb(3,"translate"),k.Lb(),k.Lb(),k.Jb()),2&t){var n=e.$implicit,i=e.index;k.xb(2),k.ac("src",n.imgPath,k.jc)("alt",n.alt)("title",k.Xb(3,4,n.hoverLabel)),k.yb("data-index",i+n.alt)}}var tt,et=((tt=function(){function t(){var e=this;r(this,t),this._totalUuid=0,this._tabStatus=[],this._onClick=new k.n,this.isTabStillOpen=!0,this.bindImagePath=function(){e.jsonSchema={logosCenter:[{imgPath:"../../../assets/icons/previous.svg",hoverLabel:"labellingInfo.previous",alt:"Previous",onClick:function(){return e.emitParentEvent({thumbnailAction:-1})}},{imgPath:"../../../assets/icons/next.svg",hoverLabel:"labellingInfo.next",alt:"Next",onClick:function(){return e.emitParentEvent({thumbnailAction:1})}}],logosEnd:[{imgPath:"../../../assets/icons/undo.svg",hoverLabel:"labellingInfo.undo",alt:"Undo",onClick:function(){return null}},{imgPath:"../../../assets/icons/redo.svg",hoverLabel:"labellingInfo.redo",alt:"Redo",onClick:function(){return null}}]}},this.emitParentEvent=function(t){var n=t.url,i=t.thumbnailAction;e._onClick.emit({url:n,thumbnailAction:i})}}return l(t,[{key:"ngOnInit",value:function(){this.bindImagePath()}},{key:"ngOnChanges",value:function(t){if(t._onChange){var n=t._onChange.currentValue.totalNumThumbnail;this._onChange.totalNumThumbnail=n,this.bindImagePath()}if(t._tabStatus){this.isTabStillOpen=!1;var i,a=e(this._tabStatus);try{for(a.s();!(i=a.n()).done;)if(!i.value.closed){this.isTabStillOpen=!0;break}}catch(o){a.e(o)}finally{a.f()}}}}]),t}()).\u0275fac=function(t){return new(t||tt)},tt.\u0275cmp=k.Bb({type:tt,selectors:[["image-labelling-info"]],inputs:{_totalUuid:"_totalUuid",_onChange:"_onChange",_tabStatus:"_tabStatus"},outputs:{_onClick:"_onClick"},features:[k.vb],decls:9,vars:6,consts:[[1,"header-container"],[1,"container-flex-start"],[4,"ngIf","ngIfElse"],["defaultName",""],[3,"ngClass"],[4,"ngFor","ngForOf"],[1,"imageTitle"],["renderOtherIcons",""],[1,"utility-icon-container"],[1,"utility-icon-light",3,"src","alt","title","click"],[1,"totalThumbnail"],[4,"ngIf"]],template:function(t,e){if(1&t&&(k.Mb(0,"div",0),k.Mb(1,"div",1),k.mc(2,H,5,4,"ng-container",2),k.mc(3,$,1,0,"ng-template",null,3,k.nc),k.Lb(),k.Mb(5,"div",4),k.mc(6,q,4,2,"ng-container",5),k.Lb(),k.Mb(7,"div",4),k.mc(8,Q,4,6,"ng-container",5),k.Lb(),k.Lb()),2&t){var n=k.fc(4);k.xb(2),k.ac("ngIf",e._onChange.thumbnailName)("ngIfElse",n),k.xb(3),k.ac("ngClass",e.isTabStillOpen?"container-flex-center":"container-flex-center-adjust"),k.xb(1),k.ac("ngForOf",e.jsonSchema.logosCenter),k.xb(1),k.ac("ngClass",e.isTabStillOpen?"container-flex-end":"container-flex-end-adjust"),k.xb(1),k.ac("ngForOf",e.jsonSchema.logosEnd)}},directives:[g.k,g.i,g.j],pipes:[V,Z.c],styles:[".header-container[_ngcontent-%COMP%]{min-width:100vw;max-width:100vw;min-height:4vh;max-height:4vh;background:#525353;border-bottom:.0625vw solid hsla(0,0%,100%,.25);display:flex;justify-content:space-between;z-index:1000;position:absolute}.container-flex-start[_ngcontent-%COMP%]{margin-left:3vw}.container-flex-center[_ngcontent-%COMP%], .container-flex-start[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:inherit;max-height:inherit}.container-flex-center[_ngcontent-%COMP%]{margin-left:8vw}.container-flex-end[_ngcontent-%COMP%]{display:flex;margin-right:19vw}.container-flex-center-adjust[_ngcontent-%COMP%]{display:flex;margin-left:2vw;align-items:center;min-height:inherit;max-height:inherit}.container-flex-end-adjust[_ngcontent-%COMP%]{display:flex;margin-right:3vw}.logo-container[_ngcontent-%COMP%]{min-width:2.2vw;max-width:2.2vw}.logo[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:2.2vh;max-height:2.2vh;padding:.3vw;position:fixed;cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active, .utility-icon-light[_ngcontent-%COMP%]:focus{background:#a9a9a9}.position-absolute[_ngcontent-%COMP%]{position:absolute}.utility-icon-container[_ngcontent-%COMP%]{display:flex;min-height:3.5vh;max-height:3.5vh;min-width:2vw;max-width:2vw}.totalThumbnail[_ngcontent-%COMP%]{font-size:1.7vh;padding:.4vw 1vw 0;display:inline-block;color:#fff;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.img-container[_ngcontent-%COMP%]:hover .img-description[_ngcontent-%COMP%]{visibility:visible;opacity:1}.imageTitle[_ngcontent-%COMP%]{font-size:1.7vh;color:#fff;align-items:center;margin-left:1vw;max-width:20vw;min-width:20vw;position:absolute;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.indicator[_ngcontent-%COMP%]{background-color:#75fe7c}.indicator[_ngcontent-%COMP%], .no-indicator[_ngcontent-%COMP%]{height:1vh;width:.5vw;border-radius:50%;position:aboslute}.no-indicator[_ngcontent-%COMP%]{background-color:#ffba54}.horizontal-line[_ngcontent-%COMP%]{padding:1vh 0;margin:0 1vw;border:.01rem solid #707070}"],changeDetection:0}),tt),nt=s("oSzE"),it=s("DlmY");function at(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new it.a;++es))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var u=-1,h=!0,d=2&n?new ot:void 0;for(o.set(t,e),o.set(e,t);++u0){this.redoArr.push(this.removeLastArray(this.currentArr));var t=this.removeLastArray(this.undoArr);return this.currentArr.push(t),this.allowUndo=0!==this.undoArr.length,t}return null}},{key:"redo",value:function(){var t=null;return 0!==this.redoArr.length&&(this.undoArr.push(this.removeLastArray(this.currentArr)),t=this.removeLastArray(this.redoArr),this.currentArr.push(t),this.allowRedo=0!==this.redoArr.length),this.allowUndo=this.undoArr.length>0,t}},{key:"clearRedundantStages",value:function(){var t,e;(null===(t=this.currentArr[0])||void 0===t?void 0:t.meta)&&"polygons"in this.currentArr[0].meta||this.undoArr.length>0&&(!this.isStateChange((null===(e=this.undoArr[this.undoArr.length-1])||void 0===e?void 0:e.meta).bnd_box)||(this.currentArr.pop(),this.currentArr.push(this.removeLastArray(this.undoArr))))}},{key:"isAllowRedo",value:function(){return this.allowRedo}},{key:"isAllowUndo",value:function(){return this.allowUndo}},{key:"isMethodChange",value:function(t){var e;return(null===(e=this.currentArr[0])||void 0===e?void 0:e.method)!==t}},{key:"replaceStages",value:function(t){t&&(this.currentArr[0]=this.utility.deepCloneVariable(t))}},{key:"isStateChange",value:function(t){return!!t&&!!(t&&this.isAnnotationChange(t)||this.isLabelChange(t))}},{key:"isLabelChange",value:function(n){var i,a,o,r;if((null===(i=this.currentArr[0])||void 0===i?void 0:i.meta)&&"polygons"in(null===(a=this.currentArr[0])||void 0===a?void 0:a.meta)){var s=n,l=(null===(o=this.currentArr[0])||void 0===o?void 0:o.meta).polygons;if(s.length!==l.length)return!0;var c,u=e(l.entries());try{for(u.s();!(c=u.n()).done;){var h=t(c.value,2);h[0],h[1].label}}catch(_){u.e(_)}finally{u.f()}}else{var d=n,f=(null===(r=this.currentArr[0])||void 0===r?void 0:r.meta).bnd_box;if(d.length!==f.length)return!0;var b,g=e(f.entries());try{for(g.s();!(b=g.n()).done;){var m=t(b.value,2),v=m[0],p=m[1].label;if(d[v].label!==p)return!0}}catch(_){g.e(_)}finally{g.f()}}return!1}},{key:"isAnnotationChange",value:function(n){var i,a,o,r;if((null===(i=this.currentArr[0])||void 0===i?void 0:i.meta)&&"polygons"in(null===(a=this.currentArr[0])||void 0===a?void 0:a.meta)){if(this.currentArr.length<1)return!0;var s=n,l=(null===(o=this.currentArr[0])||void 0===o?void 0:o.meta).polygons;return s.length!==l.length||!!l.some(function(t,e){var n=t.coorPt;return s.some(function(t,i){var a=t.coorPt;return n[e].x!==a[i].x||n[e].y!==a[i].y})})||null}if(this.currentArr.length<1)return!0;var c=n,u=(null===(r=this.currentArr[0])||void 0===r?void 0:r.meta).bnd_box;if(c.length!==u.length)return!0;var h,d=e(c.entries());try{for(d.s();!(h=d.n()).done;){var f=t(h.value,2),b=f[0],g=f[1],m=g.x1,v=g.x2,p=g.y1,_=g.y2,y=g.label;if(Math.ceil(m)!==Math.ceil(u[b].x1)||Math.ceil(v)!==Math.ceil(u[b].x2)||Math.ceil(p)!==Math.ceil(u[b].y1)||Math.ceil(_)!==Math.ceil(u[b].y2)||y!==u[b].label)return!0}}catch(x){d.e(x)}finally{d.f()}return!1}}]),n}()).\u0275fac=function(t){return new(t||It)},It.\u0275prov=k.Db({token:It,factory:It.\u0275fac,providedIn:"any"}),It),zt=((Lt=function(){function t(e){var n=this;r(this,t),this.el=e,this.srcAttr=null,this.canLazyLoad=function(){return window&&"IntersectionObserver"in window},this.lazyLoadImage=function(){new IntersectionObserver(function(t){t.forEach(function(t){t.isIntersecting?n.loadImage():n.unloadImage()})}).observe(n.el.nativeElement)},this.loadImage=function(){n.srcAttr=n.src},this.unloadImage=function(){n.srcAttr=""}}return l(t,[{key:"ngAfterViewInit",value:function(){this.canLazyLoad()?this.lazyLoadImage():this.loadImage()}}]),t}()).\u0275fac=function(t){return new(t||Lt)(k.Hb(k.l))},Lt.\u0275dir=k.Cb({type:Lt,selectors:[["img","imgLazyLoad",""]],hostVars:1,hostBindings:function(t,e){2&t&&k.yb("src",e.srcAttr,k.jc)},inputs:{src:"src"}}),Lt),Tt=s("3Pt+"),Dt=["thumbnailList"],Nt=function(t){return{"img-selected":t}};function Rt(t,e){if(1&t){var n=k.Nb();k.Kb(0),k.Mb(1,"div",12),k.Tb("click",function(){k.hc(n);var t=e.$implicit,i=e.index;return k.Vb(4).onClick(t,i)}),k.Mb(2,"div",13),k.Ib(3,"img",14),k.Lb(),k.Mb(4,"div",15),k.Mb(5,"label",16),k.oc(6),k.Wb(7,"fileNameSlice"),k.Lb(),k.Lb(),k.Mb(8,"div",17),k.Mb(9,"img",18),k.Tb("click",function(){k.hc(n);var t=e.$implicit;return k.Vb(4).renameImage(t)}),k.Wb(10,"translate"),k.Lb(),k.Lb(),k.Mb(11,"div"),k.Ib(12,"div",19),k.Lb(),k.Lb(),k.Jb()}if(2&t){var i=e.$implicit,a=e.index,o=k.Vb(4);k.xb(1),k.ac("ngClass",k.dc(9,Nt,a===o._onChange.currentThumbnailIndex-1)),k.xb(2),k.ac("src",i.img_thumbnail,k.jc),k.xb(3),k.pc(k.Xb(7,5,i.img_path)),k.xb(3),k.ac("title",k.Xb(10,7,"renameModal.renameImg")),k.xb(3),k.ac("ngClass",(null==i.bnd_box?null:i.bnd_box.length)>0||(null==i.polygons?null:i.polygons.length)>0?"indicator":"no-indicator")}}function Ft(t,e){if(1&t){var n=k.Nb();k.Kb(0),k.Mb(1,"div",5),k.Mb(2,"label",6),k.oc(3),k.Wb(4,"translate"),k.Lb(),k.Mb(5,"div",7),k.Mb(6,"span",8),k.Mb(7,"div",9),k.Tb("click",function(){k.hc(n);var t=k.Vb().$implicit;return k.Vb(2).onClose(t)}),k.oc(8,"\u2716"),k.Lb(),k.Lb(),k.Lb(),k.Mb(9,"div",10,11),k.Tb("scroll",function(){return k.hc(n),k.Vb(3).mouseScroll()}),k.mc(11,Rt,13,11,"ng-container",2),k.Lb(),k.Lb(),k.Jb()}if(2&t){var i=k.Vb(),a=i.$implicit,o=i.index,r=k.Vb(2);k.xb(1),k.ac("ngClass",r.checkCloseToggle(a)),k.yb("data-index",o),k.xb(2),k.sc("",k.Xb(4,6,a.name)," (",r._thumbnailList.length,"/",r._totalUuid,")"),k.xb(8),k.ac("ngForOf",r._thumbnailList)}}function Xt(t,e){if(1&t){var n=k.Nb();k.Kb(0),k.Mb(1,"span",31),k.Tb("click",function(){k.hc(n);var t=k.Vb().$implicit;return k.Vb(5).onDeleteLabel(t)}),k.oc(2,"-"),k.Lb(),k.Jb()}if(2&t){var i=k.Vb(6);k.xb(1),k.ac("ngClass",i.clickAbilityToggle?"pointer":null)}}function Wt(t,e){if(1&t){var n=k.Nb();k.Kb(0),k.Mb(1,"div",26),k.Mb(2,"label",27),k.Mb(3,"div",28),k.Tb("click",function(){k.hc(n);var t=e.$implicit,i=k.Vb(5);return i.clickAbilityToggle?i.onClickLabel(t):null}),k.oc(4),k.Lb(),k.Lb(),k.Mb(5,"label",29),k.mc(6,Xt,3,1,"ng-container",30),k.Lb(),k.Lb(),k.Jb()}if(2&t){var i=e.$implicit,a=k.Vb(5);k.xb(1),k.ac("ngClass",i===a.selectedLabel?"label-active":null),k.xb(2),k.ac("ngClass",a.clickAbilityToggle?"pointer":null),k.xb(1),k.qc(" ",i," "),k.xb(2),k.ac("ngIf",i===a.selectedLabel)}}function Ut(t,e){1&t&&(k.Mb(0,"label",32),k.oc(1),k.Wb(2,"translate"),k.Lb()),2&t&&(k.xb(1),k.qc(" ",k.Xb(2,1,"labellingProject.labelNotExist")," "))}function Yt(t,e){if(1&t){var n=k.Nb();k.Kb(0),k.Mb(1,"div",5),k.Mb(2,"label",6),k.oc(3),k.Wb(4,"translate"),k.Lb(),k.Mb(5,"div",7),k.Mb(6,"span",8),k.Mb(7,"div",9),k.Tb("click",function(){k.hc(n);var t=k.Vb(2).$implicit;return k.Vb(2).onClose(t)}),k.oc(8,"\u2716"),k.Lb(),k.Lb(),k.Lb(),k.Mb(9,"div",21),k.Mb(10,"input",22),k.Tb("ngModelChange",function(t){return k.hc(n),k.Vb(4).inputLabel=t})("ngModelChange",function(t){return k.hc(n),k.Vb(4).inputLabelChange(t)})("keydown.enter",function(t){return k.hc(n),k.Vb(4).validateInputLabel(t)}),k.Wb(11,"translate"),k.Lb(),k.Lb(),k.Mb(12,"div",23),k.Mb(13,"div",24),k.mc(14,Wt,7,4,"ng-container",2),k.mc(15,Ut,3,3,"label",25),k.Lb(),k.Lb(),k.Lb(),k.Jb()}if(2&t){var i=k.Vb(2),a=i.$implicit,o=i.index,r=k.Vb(2);k.xb(1),k.ac("ngClass",r.checkCloseToggle(a)),k.yb("data-index",o),k.xb(2),k.pc(k.Xb(4,8,a.name)),k.xb(7),k.ac("ngClass",r.invalidInput?"input-invalid":null)("ngModel",r.inputLabel)("placeholder",k.Xb(11,10,"labellingProject.enterLabel")),k.xb(4),k.ac("ngForOf",r.labelList),k.xb(1),k.ac("ngIf",0===r.labelList.length)}}function Vt(t,e){if(1&t){var n=k.Nb();k.Mb(0,"div",38),k.Tb("click",function(){return k.hc(n),k.Vb(9).onDeleteAnnotation()}),k.oc(1," - "),k.Lb()}if(2&t){var i=k.Vb(9);k.ac("ngClass",i.clickAbilityToggle?"pointer":null)}}function Zt(t,e){if(1&t){var n=k.Nb();k.Kb(0),k.Mb(1,"label",36),k.Tb("click",function(){k.hc(n);var t=e.index,i=e.$implicit,a=k.Vb(8);return a.clickAbilityToggle?a.onClickAnnotation(t,i):null}),k.Mb(2,"div",19),k.oc(3),k.Lb(),k.mc(4,Vt,2,1,"div",37),k.Lb(),k.Jb()}if(2&t){var i=e.$implicit,a=e.index,o=k.Vb(8);k.xb(1),k.ac("ngClass",a===o.selectedIndexAnnotation?"annotation-active":null),k.yb("data-index",a),k.xb(1),k.ac("ngClass",o.clickAbilityToggle?"pointer":null),k.xb(1),k.rc(" ",i.label," : ",i.id," "),k.xb(1),k.ac("ngIf",a===o.selectedIndexAnnotation)}}function Ht(t,e){if(1&t&&(k.Kb(0),k.mc(1,Zt,5,6,"ng-container",2),k.Jb()),2&t){var n=k.Vb().$implicit;k.xb(1),k.ac("ngForOf",n.bnd_box)}}function $t(t,e){if(1&t){var n=k.Nb();k.Kb(0),k.Mb(1,"label",36),k.Tb("click",function(){k.hc(n);var t=e.index,i=e.$implicit,a=k.Vb(8);return a.clickAbilityToggle?a.onClickAnnotation(t,i):null}),k.Mb(2,"div",19),k.oc(3),k.Lb(),k.Lb(),k.Jb()}if(2&t){var i=e.$implicit,a=e.index,o=k.Vb(8);k.xb(1),k.ac("ngClass",a===o.selectedIndexAnnotation?"annotation-active":null),k.yb("data-index",a),k.xb(1),k.ac("ngClass",o.clickAbilityToggle?"pointer":null),k.xb(1),k.rc(" ",i.label," : ",i.id," ")}}function Kt(t,e){if(1&t&&k.mc(0,$t,4,5,"ng-container",2),2&t){var n=k.Vb().$implicit;k.ac("ngForOf",n.polygons)}}function Jt(t,e){if(1&t&&(k.Kb(0),k.mc(1,Ht,2,1,"ng-container",3),k.mc(2,Kt,1,1,"ng-template",null,35,k.nc),k.Jb()),2&t){var n=e.$implicit,i=k.fc(3);k.xb(1),k.ac("ngIf",n.bnd_box)("ngIfElse",i)}}function Gt(t,e){if(1&t&&(k.Kb(0),k.mc(1,Jt,4,2,"ng-container",2),k.Jb()),2&t){var n=k.Vb(3).$implicit;k.xb(1),k.ac("ngForOf",n.annotation)}}function qt(t,e){if(1&t){var n=k.Nb();k.Mb(0,"div",5),k.Mb(1,"label",6),k.oc(2),k.Wb(3,"translate"),k.Lb(),k.Mb(4,"div",7),k.Mb(5,"span",8),k.Mb(6,"div",9),k.Tb("click",function(){k.hc(n);var t=k.Vb(2).$implicit;return k.Vb(2).onClose(t)}),k.oc(7,"\u2716"),k.Lb(),k.Lb(),k.Lb(),k.Mb(8,"div",33),k.Mb(9,"div",24),k.Mb(10,"div",34),k.mc(11,Gt,2,1,"ng-container",30),k.Lb(),k.Lb(),k.Lb(),k.Lb()}if(2&t){var i=k.Vb(2),a=i.$implicit,o=i.index,r=k.Vb(2);k.ac("ngClass",r.checkCloseToggle(a)),k.yb("data-index",o),k.xb(2),k.pc(k.Xb(3,4,a.name)),k.xb(9),k.ac("ngIf",null==a?null:a.annotation)}}function Qt(t,e){if(1&t&&(k.mc(0,Yt,16,12,"ng-container",3),k.mc(1,qt,12,6,"ng-template",null,20,k.nc)),2&t){var n=k.fc(2),i=k.Vb().index;k.ac("ngIf",1===i)("ngIfElse",n)}}function te(t,e){if(1&t&&(k.Kb(0),k.mc(1,Ft,12,8,"ng-container",3),k.mc(2,Qt,3,2,"ng-template",null,4,k.nc),k.Jb()),2&t){var n=e.index,i=k.fc(3);k.xb(1),k.ac("ngIf",0===n)("ngIfElse",i)}}function ee(t,e){if(1&t&&(k.Mb(0,"div",1),k.mc(1,te,4,2,"ng-container",2),k.Lb()),2&t){var n=k.Vb();k.xb(1),k.ac("ngForOf",n._tabStatus)}}var ne,ie=((ne=function(){function n(e,a,o,s){var l=this;r(this,n),this._annotateService=e,this._imgLblState=a,this._languageService=o,this._undoRedoService=s,this._totalUuid=0,this._thumbnailList=[],this._tabStatus=[],this._onClose=new k.n,this._onClickThumbnail=new k.n,this._onClickLabel=new k.n,this._onEnterLabel=new k.n,this._onChangeAnnotationLabel=new k.n,this._onDeleteAnnotation=new k.n,this._loadMoreThumbnails=new k.n,this._onRenameImage=new k.n,this.action=-1,this.displayInputLabel=!1,this.inputLabel="",this.selectedIndexAnnotation=-1,this.selectedLabel="",this.unsubscribe$=new y.a,this.clickAbilityToggle=!1,this.invalidInput=!1,this.labelList=[],this.isTabStillOpen=!0,this.tempMax=0,this.max=0,this.updateLabelList=function(){l.labelList=l._tabStatus[1].label_list?l._tabStatus[1].label_list:[]},this.onClose=function(t){l._onClose.emit({name:t.name,closed:!0})},this.onClick=function(t,e){l._onClickThumbnail.emit(Object.assign(Object.assign({},t),{thumbnailIndex:e})),l.selectedIndexAnnotation=-1,l.selectedLabel=""},this.onDisplayInputModal=function(){l.displayInputLabel=!l.displayInputLabel,l.inputLabel=""},this.validateInputLabel=function(t){var e=t.target.value,n=e.trim();if(n)if(n.match(/^[a-zA-Z0-9-]*$/))if(l._tabStatus.some(function(t){var e=t.label_list;return e&&e.length&&e.some(function(t){return t===n})}))l.invalidInput=!0,console.error("Invalid existing label input");else{l.invalidInput=!1;var a=l._tabStatus.map(function(t){return t.label_list||[]}).filter(function(t){return t.length>0})[0];l._onEnterLabel.emit({action:1,label_list:a?[].concat(i(a),[e]):[e]}),l.displayInputLabel=!1,l.inputLabel=""}else l.invalidInput=!0,console.error("Invalid input value")},this.onDeleteLabel=function(e){var n=!1;if(l._thumbnailList.forEach(function(t){t.bnd_box&&t.bnd_box.forEach(function(t){t.label===e&&(n=!0)}),t.polygons&&t.polygons.forEach(function(t){t.label===e&&(n=!0)})}),n)l._languageService._translate.get("labelExist").subscribe(function(t){alert(t)});else{var i=t(l._tabStatus.filter(function(t){return t.label_list}),1)[0].label_list;l._onClickLabel.emit({selectedLabel:e,label_list:i&&i.length>0?i:[],action:0})}},this.onClickLabel=function(t){l.selectedLabel=t,l._onChangeAnnotationLabel.emit({label:t,index:l.selectedIndexAnnotation}),l._undoRedoService.appendStages({meta:l._selectMetadata,method:"draw"})},this.onClickAnnotation=function(t,e){var n=e.label;l.selectedLabel=n,l._annotateService.setState({annotation:t})},this.onDeleteAnnotation=function(){l.selectedIndexAnnotation>-1&&(l._onDeleteAnnotation.emit(l.selectedIndexAnnotation),l._selectMetadata.bnd_box.splice(l.selectedIndexAnnotation,1)&&l._undoRedoService.appendStages({meta:Object(jt.a)(l._selectMetadata),method:"draw"}))},this.checkCloseToggle=function(t){var e="";return"labellingProject.label"===t.name&&l._tabStatus[2].closed||"labellingProject.project"===t.name&&l._tabStatus[1].closed&&l._tabStatus[2].closed||"labellingProject.annotation"===t.name||(e="flex-content"),t.closed&&(e+=" closed"),e},this.checkStateEqual=function(t,e){return!Ct(t,e)}}return l(n,[{key:"ngOnInit",value:function(){var e=this;this.updateLabelList(),this._imgLblState.action$.pipe(Object(_.a)(this.unsubscribe$)).subscribe(function(t){var n=t.draw;return e.clickAbilityToggle=n}),this._thumbnailList.length>0&&this._annotateService.labelStaging$.pipe(Object(_.a)(this.unsubscribe$)).subscribe(function(n){var i,a=n.annotation;e.selectedIndexAnnotation=a;var o=t(e._tabStatus.filter(function(t){return t.annotation}),1)[0].annotation,r=null==o?void 0:o.map(function(t){var e=t.bnd_box,n=t.polygons;return e?e.find(function(t,e){return e===a}):n?n.find(function(t,e){return e===a}):void 0})[0];e.selectedLabel=null!==(i=null==r?void 0:r.label)&&void 0!==i?i:""})}},{key:"inputLabelChange",value:function(t){var e;this.labelList=this._tabStatus[1].label_list?null===(e=this._tabStatus[1].label_list)||void 0===e?void 0:e.filter(function(e){return e.includes(t)}):[]}},{key:"ngOnChanges",value:function(t){if(t._thumbnailList){var n=t._thumbnailList.currentValue;this._thumbnailList=Object.assign([],this._thumbnailList,i(n))}if(t._tabStatus&&this.checkStateEqual(t._tabStatus.currentValue,t._tabStatus.previousValue)){var a=t._tabStatus.currentValue;this._tabStatus=i(a),this.updateLabelList(),this.isTabStillOpen=!1;var o,r=e(this._tabStatus);try{for(r.s();!(o=r.n()).done;)if(!o.value.closed){this.isTabStillOpen=!0;break}}catch(s){r.e(s)}finally{r.f()}}}},{key:"openAllTab",value:function(){this._tabStatus.forEach(function(t){t.closed=!1})}},{key:"mouseScroll",value:function(){var t=this.thumbnailList.nativeElement.scrollTop+this.thumbnailList.nativeElement.clientHeight;this.max=this.thumbnailList.nativeElement.scrollHeight,t+1500>=this.max&&this.tempMax!==this.max&&(this.tempMax=this.max,this._loadMoreThumbnails.emit())}},{key:"renameImage",value:function(t){this._onRenameImage.emit(t)}},{key:"ngOnDestroy",value:function(){this.unsubscribe$.next(),this.unsubscribe$.complete()}}]),n}()).\u0275fac=function(t){return new(t||ne)(k.Hb(z),k.Hb(D),k.Hb(R.a),k.Hb(Et))},ne.\u0275cmp=k.Bb({type:ne,selectors:[["image-labelling-project"]],viewQuery:function(t,e){var n;1&t&&k.tc(Dt,!0),2&t&&k.ec(n=k.Ub())&&(e.thumbnailList=n.first)},hostBindings:function(t,e){1&t&&k.Tb("scroll",function(t){return e.mouseScroll(t)})},inputs:{_onChange:"_onChange",_totalUuid:"_totalUuid",_selectMetadata:"_selectMetadata",_thumbnailList:"_thumbnailList",_tabStatus:"_tabStatus"},outputs:{_onClose:"_onClose",_onClickThumbnail:"_onClickThumbnail",_onClickLabel:"_onClickLabel",_onEnterLabel:"_onEnterLabel",_onChangeAnnotationLabel:"_onChangeAnnotationLabel",_onDeleteAnnotation:"_onDeleteAnnotation",_loadMoreThumbnails:"_loadMoreThumbnails",_onRenameImage:"_onRenameImage"},features:[k.vb],decls:1,vars:1,consts:[["class","tab-container",4,"ngIf"],[1,"tab-container"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["nonThumbnailTab",""],[1,"utility-right-project-container","tab","flex-fill-remaining",3,"ngClass"],[1,"tab-name"],[1,"flex-tab-icons"],[1,"tab-close-thumbnailless"],[1,"div-close",3,"click"],["id","thumbnailList",1,"utility-inner-container","tab-height","scroll",3,"scroll"],["thumbnailList",""],[1,"img-container",3,"ngClass","click"],[1,"img-skeleton"],["imgLazyLoad","",1,"img",3,"src"],[1,"img-name"],[1,"img-path"],[1,"thumbnail-actions"],["src","../../../assets/icons/last_modify.svg","alt","edit","height","35%","width","35%",1,"rename-img",3,"title","click"],[3,"ngClass"],["annotationTab",""],[1,"div-input"],["type","text",1,"input",3,"ngClass","ngModel","placeholder","ngModelChange","keydown.enter"],["id","inner-container",1,"utility-inner-container","tab-height","scroll"],[1,"flex-item"],["class","not-exist",4,"ngIf"],[1,"flex-center-width",3,"ngClass"],[1,"label"],[3,"ngClass","click"],[1,"action"],[4,"ngIf"],[1,"delete-label",3,"ngClass","click"],[1,"not-exist"],["id","inner-container",1,"utility-inner-container","scroll","tab-smaller-height"],[1,"flex-center-width"],["polygon",""],[1,"label",3,"ngClass","click"],["class","delete-annotation",3,"ngClass","click",4,"ngIf"],[1,"delete-annotation",3,"ngClass","click"]],template:function(t,e){1&t&&k.mc(0,ee,2,1,"div",0),2&t&&k.ac("ngIf",e.isTabStillOpen)},directives:[g.k,g.j,g.i,zt,Tt.a,Tt.f,Tt.i],pipes:[Z.c,V],styles:['.tab-container[_ngcontent-%COMP%]{display:flex;flex-flow:column;height:100%;right:0;position:fixed;z-index:1000;min-width:18.5vw;max-width:18.5vw}.utility-right-project-container[_ngcontent-%COMP%]{height:100%;min-width:16.3vw;max-width:16.3vw;background:#383535;border:.0325vw solid hsla(0,0%,100%,.25);border-top:none;z-index:1000;align-items:stretch}.utility-right-project-container[_ngcontent-%COMP%]:after{position:absolute;content:"";top:0;min-width:8.5vw;max-width:8.5vw;min-height:4vh;max-height:4vh;background:#383535;z-index:-1;font-size:1.5vh;line-height:3vh;color:#fff;padding:.5vh 0 0 2vw}.tab[_ngcontent-%COMP%]{position:sticky;overflow:hidden}.tab[_ngcontent-%COMP%]:before{position:absolute;content:"";top:4vh;min-width:100vw;max-width:100vw;min-height:93vh;max-height:93vh;background:#383535;z-index:-1}.flex-fixed[_ngcontent-%COMP%]{flex:0 1 25vh}.flex-fill-remaining[_ngcontent-%COMP%]{flex:1 1 auto}.flex-content[_ngcontent-%COMP%]{display:flex;flex-flow:column;height:33%;min-height:10%;flex-shrink:0;flex-grow:0;resize:vertical}.tab-name[_ngcontent-%COMP%]{font-size:1.7vh;padding:.5vw 2vw 0 1vw;display:inline-block;color:#fff;position:absolute}.tab-close-thumbnail[_ngcontent-%COMP%]{margin-left:3vw;justify-content:center}.tab-close-thumbnail[_ngcontent-%COMP%], .tab-close-thumbnailless[_ngcontent-%COMP%]{float:right;vertical-align:middle;min-height:4vh;max-height:4vh;color:#696969;font-size:1.8vh;line-height:4vh;text-align:center;display:inline-grid;padding-bottom:1vh}.tab-close-thumbnailless[_ngcontent-%COMP%]{flex:1 0 60%;justify-content:right}.div-close[_ngcontent-%COMP%]{margin-right:.5vw;min-width:1.6vw;max-width:1.6vw;min-height:4vh;max-height:4vh;color:#fff;cursor:pointer;text-align:center;float:right}.div-close[_ngcontent-%COMP%]:active{background:grey}.utility-inner-container[_ngcontent-%COMP%]{padding:2.5vh 0 0 .2vw;scroll-behavior:smooth;overflow:hidden auto;z-index:100;min-width:15.5vw;max-width:15.5vw}.tab-height[_ngcontent-%COMP%]{height:85%}.tab-smaller-height[_ngcontent-%COMP%]{height:60%}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px;background-color:#000}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:.5vw}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.img-container[_ngcontent-%COMP%], .utility-icon-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh}.img-container[_ngcontent-%COMP%]{font-size:1.5vh;color:#fff;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;cursor:pointer;margin:0 .3vw;padding:.1vh .4vw}.img-container[_ngcontent-%COMP%]:hover{background-color:#444;border-radius:2px}.img-selected[_ngcontent-%COMP%]{background:#555}.rename-img[_ngcontent-%COMP%]{border-radius:50%;padding:.2vh}.rename-img[_ngcontent-%COMP%]:hover{background:#555}.img[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;display:block}.img[_ngcontent-%COMP%], .img-skeleton[_ngcontent-%COMP%]{max-height:4.3vh;min-height:4.3vh;max-width:3vw}.img-skeleton[_ngcontent-%COMP%]{min-width:3vw;border:.005vh dotted #525353}.img-name[_ngcontent-%COMP%]{margin-left:.5vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.closed[_ngcontent-%COMP%]{display:none}.utility-icon-dark[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute}.flex-item[_ngcontent-%COMP%]{align-items:center;flex-direction:column;font-size:1.5vh;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flex-center-width[_ngcontent-%COMP%], .flex-item[_ngcontent-%COMP%]{display:flex;justify-content:center}.flex-center-width[_ngcontent-%COMP%]{width:90%;flex-wrap:wrap}.label[_ngcontent-%COMP%]{flex:1 1 80%;display:flex;justify-content:flex-start;margin:.25vh 0}.pointer[_ngcontent-%COMP%]{cursor:pointer}.annotation-active[_ngcontent-%COMP%], .label-active[_ngcontent-%COMP%]{border:.15vw solid #ff0}.utility-info-btn[_ngcontent-%COMP%]{font-size:1vw;min-width:0;max-width:0;min-height:2.5vh;max-height:2.5vh;line-height:0;right:21vh;position:absolute;background:#383535;border:none;color:#fff}.flex-tab-icons[_ngcontent-%COMP%]{display:flex;width:100%}.extra-icons[_ngcontent-%COMP%]{cursor:pointer}.extra-icons[_ngcontent-%COMP%]:active{background:grey}.tab-extra-icons[_ngcontent-%COMP%]{float:right;vertical-align:middle;font-size:1.7vh;line-height:4vh;text-align:center;color:#fff;flex:1 0 15%;justify-content:flex-start}.tab-text[_ngcontent-%COMP%]{font-size:1.7vh;min-width:6vw;max-width:6vw}.inner-content[_ngcontent-%COMP%]{max-height:25vh;min-height:25vh;min-width:3vw;max-width:3vw}.div-input[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;margin:.5vh .9vw}.input[_ngcontent-%COMP%]{border-radius:8vw;border:none;outline:none;padding:.3vw 0 .3vw 1vw;min-height:1.5vh;max-height:1.5vh;min-width:13vw;max-width:13vw;font-size:1.3vh;background:#525353;color:#fff}.input-invalid[_ngcontent-%COMP%]{border:.2vw solid red}.img-path[_ngcontent-%COMP%]{margin-top:4vh}.indicator[_ngcontent-%COMP%]{background-color:#75fe7c}.indicator[_ngcontent-%COMP%], .no-indicator[_ngcontent-%COMP%]{height:1vh;width:.5vw;border-radius:50%;position:relative}.no-indicator[_ngcontent-%COMP%]{background-color:#ffba54}.not-exist[_ngcontent-%COMP%]{font-size:1.5vh;color:#999}.delete-annotation[_ngcontent-%COMP%], .delete-label[_ngcontent-%COMP%]{position:absolute;right:2vw}.open-all-tabs[_ngcontent-%COMP%]{cursor:pointer;padding:.2vh .2vw;border-radius:.7vw}.open-all-tabs[_ngcontent-%COMP%]:hover{background:#636363}.open-all-tabs[_ngcontent-%COMP%]:active, .open-all-tabs[_ngcontent-%COMP%]:focus{background:#737474}.tab-skeleton[_ngcontent-%COMP%]{position:absolute;height:100vh;width:16.5vw;background:#525353;border-left:.0625vw solid hsla(0,0%,100%,.25);text-align:center;color:#cac8c8;font-size:2vh}.choose-tab[_ngcontent-%COMP%]{margin-top:42vh}.thumbnail-actions[_ngcontent-%COMP%]{text-align:end;padding-right:1vw}']}),ne);function ae(t,e){if(1&t&&(k.Kb(0),k.Mb(1,"div",3),k.Mb(2,"label"),k.Mb(3,"img",4),k.Tb("click",function(){return e.$implicit.onClick()}),k.Wb(4,"translate"),k.Lb(),k.Lb(),k.Lb(),k.Jb()),2&t){var n=e.$implicit,i=e.index,a=k.Vb();k.xb(3),k.lc(n.style),k.ac("ngClass",a.conditionalIconTheme())("src",n.imgPath,k.jc)("alt",n.alt)("title",k.Xb(4,7,n.hoverLabel)),k.yb("data-index",i)}}var oe,re=((oe=function(){function t(){var e=this;r(this,t),this._onClick=new k.n,this._onExport=new k.n,this._onReload=new k.n,this.bindImagePath=function(){e.jsonSchema={logos:[{imgPath:"../../../assets/icons/folder.svg",hoverLabel:"rightSideBar.folderOrFiles",alt:"Folder",onClick:function(){e._onClick.emit({name:"labellingProject.project",closed:!1})}},{imgPath:"../../../assets/icons/tag.svg",hoverLabel:"rightSideBar.label",alt:"Label",onClick:function(){e._onClick.emit({name:"labellingProject.label",closed:!1})}},{imgPath:"../../../assets/icons/bounding_box.svg",hoverLabel:"rightSideBar.annotation",alt:"Annotation",onClick:function(){e._onClick.emit({name:"labellingProject.annotation",closed:!1})}},{imgPath:"../../../assets/icons/statistic.svg",hoverLabel:"rightSideBar.statistic",alt:"Statistic",onClick:function(){}},{imgPath:"../../../assets/icons/export.svg",hoverLabel:"rightSideBar.export",alt:"Export",style:"padding: 1.5vh 0.5vw;",onClick:function(){e._onExport.emit()}},{imgPath:"../../../assets/icons/reload.svg",hoverLabel:"rightSideBar.reload",alt:"Reload",style:"padding: 1.5vh 0.5vw;",onClick:function(){e._onReload.emit()}}]}},this.conditionalIconTheme=function(){return"utility-icon-light"}}return l(t,[{key:"ngOnInit",value:function(){this.bindImagePath()}},{key:"ngOnChanges",value:function(t){this.bindImagePath()}}]),t}()).\u0275fac=function(t){return new(t||oe)},oe.\u0275cmp=k.Bb({type:oe,selectors:[["image-labelling-right-sidebar"]],inputs:{_onChange:"_onChange"},outputs:{_onClick:"_onClick",_onExport:"_onExport",_onReload:"_onReload"},features:[k.vb],decls:3,vars:1,consts:[[1,"utility-right-sidebar-container"],[1,"utility-inner-container"],[4,"ngFor","ngForOf"],[1,"utility-icon-container"],[3,"ngClass","src","alt","title","click"]],template:function(t,e){1&t&&(k.Mb(0,"div",0),k.Mb(1,"div",1),k.mc(2,ae,5,9,"ng-container",2),k.Lb(),k.Lb()),2&t&&(k.xb(2),k.ac("ngForOf",e.jsonSchema.logos))},directives:[g.j,g.i],pipes:[Z.c],styles:[".utility-right-sidebar-container[_ngcontent-%COMP%]{position:absolute;top:4.5vh;min-width:2.2vw;max-width:2.2vw;min-height:95.5vh;max-height:95.5vh;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);z-index:1000}.utility-inner-container[_ngcontent-%COMP%]{min-width:2.2vw;max-width:2.2vw;position:absolute}.utility-icon-container[_ngcontent-%COMP%], .utility-inner-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh}.utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute;cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active, .utility-icon-light[_ngcontent-%COMP%]:focus{background:#a9a9a9}.input-none[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),oe);function se(t,e){if(1&t&&(k.Kb(0),k.Mb(1,"div",4),k.oc(2),k.Wb(3,"translate"),k.Lb(),k.Jb()),2&t){var n=k.Vb(2);k.xb(2),k.rc("",k.Xb(3,2,"footer.image"),": ",n.thumbnailType,"")}}function le(t,e){if(1&t){var n=k.Nb();k.Kb(0),k.Mb(1,"div",2),k.Mb(2,"div",3),k.oc(3),k.Wb(4,"translate"),k.Lb(),k.Mb(5,"div",4),k.oc(6),k.Wb(7,"translate"),k.Lb(),k.mc(8,se,4,4,"ng-container",1),k.Mb(9,"div",4),k.oc(10),k.Lb(),k.Mb(11,"div",5),k.Wb(12,"translate"),k.Mb(13,"label",6),k.Tb("click",function(){k.hc(n);var t=k.Vb();return t.copyMessage(t._thumbnailInfo.img_path)}),k.oc(14),k.Lb(),k.Lb(),k.Lb(),k.Jb()}if(2&t){var i=k.Vb();k.xb(3),k.rc(" ",k.Xb(4,9,"footer.projectName"),": ",i._thumbnailInfo.project_name," "),k.xb(3),k.rc("",k.Xb(7,11,"footer.size"),": ",i.thumbnailSize,""),k.xb(2),k.ac("ngIf",i.thumbnailType),k.xb(2),k.rc("",i._thumbnailInfo.img_ori_w," x ",i._thumbnailInfo.img_ori_h,""),k.xb(1),k.ac("title",k.Xb(12,13,"footer.copyToClipboard")),k.xb(3),k.pc(i._thumbnailInfo.img_path)}}var ce,ue=((ce=function(){function t(){r(this,t),this._imgSrc="",this.thumbnailSize="",this.thumbnailType="",this.formatBytes=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===t)return"0 Bytes";var n=e<0?0:e,i=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,i)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}}return l(t,[{key:"ngOnInit",value:function(){}},{key:"copyMessage",value:function(t){var e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}},{key:"ngOnChanges",value:function(t){if(t._thumbnailInfo&&t._imgSrc){var e=t._thumbnailInfo.currentValue,n=t._imgSrc.currentValue;this._thumbnailInfo=Object.assign(Object.assign({},this._thumbnailInfo),e),this.thumbnailSize=this.formatBytes(n.length);var i=n.match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(i&&i.length){var a=i[1].split("/")[1];this.thumbnailType=a}}}}]),t}()).\u0275fac=function(t){return new(t||ce)},ce.\u0275cmp=k.Bb({type:ce,selectors:[["image-labelling-footer"]],inputs:{_thumbnailInfo:"_thumbnailInfo",_imgSrc:"_imgSrc"},features:[k.vb],decls:3,vars:3,consts:[[1,"footer-container"],[4,"ngIf"],[1,"footer-label-container"],[1,"footer-label","footer-project-name"],[1,"footer-label"],[1,"footer-image-path",3,"title"],[1,"footer-path-label",3,"click"]],template:function(t,e){1&t&&(k.Mb(0,"div",0),k.mc(1,le,15,15,"ng-container",1),k.Wb(2,"json"),k.Lb()),2&t&&(k.xb(1),k.ac("ngIf","{}"!=k.Xb(2,1,e._thumbnailInfo)))},directives:[g.k],pipes:[g.e,Z.c],styles:[".footer-container[_ngcontent-%COMP%]{position:absolute;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);min-height:2.3vh;max-height:2.3vh;min-width:100vw;max-width:100vw;bottom:0;padding-left:2.5vw}.footer-label-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:baseline;width:80%}.footer-label[_ngcontent-%COMP%]{font-size:1.6vh;color:#fff;outline:none;border-right:.05vw solid #fff;padding:0 1vw;text-align:left}.footer-project-name[_ngcontent-%COMP%]{max-width:20vw}.footer-image-path[_ngcontent-%COMP%], .footer-project-name[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.footer-image-path[_ngcontent-%COMP%]{display:flex;font-size:1.6vh;color:#fff;outline:none;border-right:.05vw solid #fff;padding:0 1vw}.border-right[_ngcontent-%COMP%]{border-right:1rem #fff}.utility-icon-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh;align-items:baseline}.utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:1.5vh;max-height:1.5vh;padding:0;position:absolute;cursor:context-menu}.footer-path-label[_ngcontent-%COMP%]{cursor:pointer;padding:0 .2vw;border-radius:.5vw}.footer-path-label[_ngcontent-%COMP%]:hover{background:#636363}.footer-path-label[_ngcontent-%COMP%]:active, .footer-path-label[_ngcontent-%COMP%]:focus{background:#737474}"],changeDetection:0}),ce),he=s("44N4"),de=s("OObL"),fe=s("TJKd");function be(t,e){if(1&t&&(k.Mb(0,"span"),k.oc(1),k.Lb()),2&t){var n=k.Vb(2);k.xb(1),k.qc("Zipping ",n._processingNum," file")}}function ge(t,e){1&t&&(k.Mb(0,"span"),k.oc(1,"Done"),k.Lb())}function me(t,e){1&t&&k.Ib(0,"div",5)}function ve(t,e){1&t&&(k.Mb(0,"div",6),k.oc(1,"\u2714"),k.Lb())}function pe(t,e){if(1&t&&(k.Kb(0),k.Mb(1,"div",1),k.Mb(2,"div",2),k.mc(3,be,2,1,"span",0),k.mc(4,ge,2,0,"span",0),k.Lb(),k.mc(5,me,1,0,"div",3),k.mc(6,ve,2,0,"div",4),k.Lb(),k.Jb()),2&t){var n=k.Vb();k.xb(3),k.ac("ngIf",n._processingNum>0),k.xb(1),k.ac("ngIf",0===n._processingNum),k.xb(1),k.ac("ngIf",n._processingNum>0),k.xb(1),k.ac("ngIf",0===n._processingNum)}}var _e,ye,xe,we,Se,ke=((_e=function(){function t(){r(this,t),this._processingNum=0,this.doneProcess=!1}return l(t,[{key:"ngOnInit",value:function(){}},{key:"delay",value:function(t){return new Promise(function(e){return setTimeout(e,t)})}},{key:"ngOnChanges",value:function(t){return Object(m.a)(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t._processingNum,!e.t0){e.next=9;break}if(console.log(t._processingNum),e.t1=1===t._processingNum.previousValue&&0===t._processingNum.currentValue,!e.t1){e.next=9;break}return this.doneProcess=!0,e.next=8,this.delay(1e3);case 8:this.doneProcess=!1;case 9:case"end":return e.stop()}},e,this)}))}}]),t}()).\u0275fac=function(t){return new(t||_e)},_e.\u0275cmp=k.Bb({type:_e,selectors:[["toastr"]],inputs:{_processingNum:"_processingNum"},features:[k.vb],decls:1,vars:1,consts:[[4,"ngIf"],[1,"toastr"],[1,"text"],["class","loader",4,"ngIf"],["class","done",4,"ngIf"],[1,"loader"],[1,"done"]],template:function(t,e){1&t&&k.mc(0,pe,7,4,"ng-container",0),2&t&&k.ac("ngIf",e._processingNum>0||e.doneProcess)},directives:[g.k],styles:[".toastr[_ngcontent-%COMP%]{position:absolute;z-index:10000;background:#262a2e;border-radius:1vh;color:#fff;bottom:5vh;right:5vw;padding:2vh 2vw;display:flex;justify-content:center}.text[_ngcontent-%COMP%]{margin:auto 1vw auto auto;font-size:2vh}.loader[_ngcontent-%COMP%]{border-radius:50%;border:.5vh solid #f3f3f3;border-top-color:#de1c44;width:2vh;height:2vh;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.done[_ngcontent-%COMP%]{color:#92c91b;font-size:2vh}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}"]}),_e),Ce=s("CfRg"),Me=function(t){return Object(Ce.a)(t,4)},Pe=((xe=function(){function n(){r(this,n),this.globalXY={x:0,y:0},this.panXY={x:0,y:0},this.currentClickedBox={box:-1,pos:"o"},this.lineOffset=3,this.anchrSize=2.5,this.currentDrawing={x1:0,x2:0,y1:0,y2:0},this.currentSelectedBndBox=-1,this.util=new Bt}return l(n,[{key:"getDiffXY",value:function(t){var e=t.offsetX,n=t.offsetY;try{var i={diffX:0,diffY:0};return i.diffX=this.globalXY.x+(e-this.panXY.x),i.diffY=this.globalXY.y+(n-this.panXY.y),i}catch(a){return console.log("ObjectDetection getDiffXY(offsetX: number,offsetY: number): { diffX: number; diffY: number }",a.name+": ",a.message),{diffX:-1,diffY:-1}}}},{key:"setCurrentX1Y1",value:function(t,e){try{null!==t&&null!==e&&void 0!==t&&void 0!==e&&(this.currentDrawing.x1=t,this.currentDrawing.y1=e)}catch(n){console.log("ObjectDetection setCurrentX1Y1(MouseX:number, MouseY:number):void",n.name+": ",n.message)}}},{key:"setCurrentX2Y2",value:function(t,e){try{null!==t&&null!==e&&void 0!==t&&void 0!==e&&(this.currentDrawing.x2=t,this.currentDrawing.y2=e)}catch(n){console.log("ObjectDetection setCurrentX2Y2(MouseX:number, MouseY:number):void",n.name+": ",n.message)}}},{key:"moveAllBbox",value:function(t,n,i,a){try{var o,r=e(t);try{for(r.s();!(o=r.n()).done;){var s=o.value,l=s.x2-s.x1,c=s.y2-s.y1;s.x1=Me(n+s.distancetoImg.x),s.y1=Me(i+s.distancetoImg.y),s.x2=Me(s.x1+l),s.y2=Me(s.y1+c)}}catch(u){r.e(u)}finally{r.f()}a&&a(!0)}catch(u){}}},{key:"calScaleTofitScreen",value:function(t,e,n,i){try{var a={factor:-1,newX:-1,newY:-1};return a.factor=Math.min(n/t,i/e),a.factor=a.factor-.05*a.factor,a.newX=n/2-t/2*a.factor,a.newY=i/2-e/2*a.factor,a}catch(o){return{factor:-1,newX:-1,newY:-1}}}},{key:"deleteSingleBox",value:function(t,e,n){try{t.splice(e,1),this.currentSelectedBndBox=-1,this.currentClickedBox={box:-1,pos:"o"},n(!0)}catch(i){}}},{key:"keyboardMoveBox",value:function(t,e,n,i){var a=n.img_w,o=n.img_h,r=n.img_x,s=n.img_y;try{switch(t){case"up":this.moveBoxWithinPointPath(r,s,a,o,0,-3,e)&&(e.y1-=3,e.y2-=3);break;case"down":this.moveBoxWithinPointPath(r,s,a,o,0,3,e)&&(e.y1+=3,e.y2+=3);break;case"left":this.moveBoxWithinPointPath(r,s,a,o,-3,0,e)&&(e.x1-=3,e.x2-=3);break;case"right":this.moveBoxWithinPointPath(r,s,a,o,3,0,e)&&(e.x1+=3,e.x2+=3)}i(!0)}catch(l){}}},{key:"moveBoxWithinPointPath",value:function(t,e,n,i,a,o,r){try{return!(r.x1+at+n||r.y1+oe+i)}catch(s){return console.log("ObjectDetection isWithinPointPath(imgx:number, imgy:number, imgw:number, imgh:number, addx:number, addy:number, box:Boundingbox):Boolean",s.name+": ",s.message),!1}}},{key:"mouseMoveBox",value:function(t,e,n){try{if(this.moveBoxWithinPointPath(n.img_x,n.img_y,n.img_w,n.img_h,t-this.currentDrawing.x1,e-this.currentDrawing.y1,n.bnd_box[this.currentSelectedBndBox])){this.setCurrentX2Y2(t,e);var i=this.currentDrawing.x2-this.currentDrawing.x1,a=this.currentDrawing.y2-this.currentDrawing.y1;this.setCurrentX1Y1(this.currentDrawing.x2,this.currentDrawing.y2),"i"!==this.currentClickedBox.pos&&"tl"!==this.currentClickedBox.pos&&"l"!==this.currentClickedBox.pos&&"bl"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].x1+=i),"i"!==this.currentClickedBox.pos&&"tl"!==this.currentClickedBox.pos&&"t"!==this.currentClickedBox.pos&&"tr"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].y1+=a),"i"!==this.currentClickedBox.pos&&"tr"!==this.currentClickedBox.pos&&"r"!==this.currentClickedBox.pos&&"br"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].x2+=i),"i"!==this.currentClickedBox.pos&&"bl"!==this.currentClickedBox.pos&&"b"!==this.currentClickedBox.pos&&"br"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].y2+=a)}}catch(o){console.log("ObjectDetection mouseMoveBox(MouseX:number, MouseY:number, CurrMeta:Metadata):void",o.name+": ",o.message)}}},{key:"getCurrentSelectedBox",value:function(){try{return this.currentSelectedBndBox}catch(t){return-1}}},{key:"setCurrentSelectedbBox",value:function(t){try{this.currentSelectedBndBox=t}catch(e){console.log("ObjectDetection setCurrentSelectedbBox(newNUM:number):void",e.name+": ",e.message)}}},{key:"mouseUpDrawEnable",value:function(t,e,n){try{var i={selBox:-1,isNew:!1};if(-1===this.currentClickedBox.box&&null!==this.tmpbox)t.bnd_box.push(this.tmpbox),this.currentSelectedBndBox=t.bnd_box.length-1,t.bnd_box[this.currentSelectedBndBox].label=e.length>0?e[0].name:"",i.isNew=!0,i.selBox=Me(this.currentSelectedBndBox);else if(this.currentClickedBox.box>-1&&this.tmpbox){if(t.bnd_box[this.currentSelectedBndBox].x1>t.bnd_box[this.currentSelectedBndBox].x2){var a=Me(t.bnd_box[this.currentSelectedBndBox].x1);t.bnd_box[this.currentSelectedBndBox].x1=Me(t.bnd_box[this.currentSelectedBndBox].x2),t.bnd_box[this.currentSelectedBndBox].x2=a}if(t.bnd_box[this.currentSelectedBndBox].y1>t.bnd_box[this.currentSelectedBndBox].y2){var o=Me(t.bnd_box[this.currentSelectedBndBox].y1);t.bnd_box[this.currentSelectedBndBox].y1=Me(t.bnd_box[this.currentSelectedBndBox].y2),t.bnd_box[this.currentSelectedBndBox].y2=o}}return this.currentClickedBox={box:-1,pos:"o"},this.setCurrentX1Y1(0,0),this.setCurrentX2Y2(0,0),this.tmpbox=null,n(!0),i}catch(r){return console.log("ObjectDetection MouseUpDrawEnable(CurrMeta: Metadata): number",r.name+": ",r.message),{selBox:-1,isNew:!1}}}},{key:"panRectangle",value:function(t,n,i,a){try{var o,r=e(t);try{for(r.s();!(o=r.n()).done;){var s=o.value,l=s.x2-s.x1,c=s.y2-s.y1;s.x1=n+s.distancetoImg.x,s.y1=i+s.distancetoImg.y,s.x2=s.x1+l,s.y2=s.y1+c}}catch(u){r.e(u)}finally{r.f()}a(!0)}catch(u){console.log("ObjectDetection panRectangle(bbox:Boundingbox[], img_X:number, img_Y:number)",u.name+": ",u.message)}}},{key:"scaleAllBoxes",value:function(t,n,i,a,o){try{var r,s=e(n);try{for(s.s();!(r=s.n()).done;){var l=r.value,c=l.distancetoImg.x*t+i,u=l.distancetoImg.y*t+a,h=c+(l.x2-l.x1)*t,d=u+(l.y2-l.y1)*t;l.x1=Me(c),l.y1=Me(u),l.x2=Me(h),l.y2=Me(d);var f=l.y1-a;l.distancetoImg.x=Me(l.x1-i),l.distancetoImg.y=Me(f)}}catch(b){s.e(b)}finally{s.f()}o&&o(!0)}catch(b){console.log("ObjectDetection scaleAllBoxes(scalefactor: number,boxes:Boundingbox[],imgX:number,imgY:number)",b.name+": ",b.message)}}},{key:"mouseMoveDrawEnable",value:function(t,e,n){try{-1===this.currentClickedBox.box?this.setCurrentX2Y2(t,e):this.mouseMoveBox(t,e,n)}catch(i){console.log("ObjectDetection MouseMoveDrawEnable(MouseX: number,MouseY: number,SelectedMeta: Metadata): void",i.name+": ",i.message)}}},{key:"mouseDownDrawEnable",value:function(t,e,n){try{return this.getCurrentClickBox(t,e,n),this.setCurrentX1Y1(t,e),this.setCurrentX2Y2(t,e),this.currentSelectedBndBox=-1!==this.currentClickedBox.box?this.currentClickedBox.box:-1,this.currentClickedBox.box}catch(i){return console.log("ObjectDetection MouseDownDrawEnable(MouseX:number,MouseY:number,BBox:Boundingbox[]):number",i.name+": ",i.message),-1}}},{key:"setPanXY",value:function(t,e){try{return!(!t||!e||(this.panXY.x=t,this.panXY.y=e,0))}catch(n){return console.log("ObjectDetection setPanXY(newX: number, newY: number):boolean",n.name+": ",n.message),!1}}},{key:"setGlobalXY",value:function(t,e){try{return!(!t||!e||(this.globalXY.x=t,this.globalXY.y=e,0))}catch(n){return console.log("ObjectDetection SetGlobalXY(newX: number, newY: number):boolean",n.name+": ",n.message),!1}}},{key:"changeLabel",value:function(t,e){t&&e&&(t.label=e)}},{key:"mouseClickWithinPointPath",value:function(t,e){var n=t.img_x,i=t.img_y,a=t.img_w,o=t.img_h,r=e.offsetX,s=e.offsetY;try{return r>n&&ri&&s0){var o,r=e(i.entries());try{for(r.s();!(o=r.n()).done;){var s=t(o.value,2),l=s[0],c=s[1];l===this.currentClickedBox.box||l===this.currentSelectedBndBox?(c.color="rgba(0,255,0,1.0)",c.lineWidth=2,this.drawEachBoxOn(n,c,a,!0)):(c.color="rgba(255,255,0,0.8)",c.lineWidth=1,this.drawEachBoxOn(n,c,a,!1))}}catch(p){r.e(p)}finally{r.f()}}if(-1===this.currentClickedBox.box&&-1===this.currentSelectedBndBox){var u,h=e(i);try{for(h.s();!(u=h.n()).done;){var d=u.value;d.color="rgba(255,255,0,0.8)",this.drawEachBoxOn(n,d,a,!1)}}catch(p){h.e(p)}finally{h.f()}var f=this.currentDrawing,b=f.x1,g=f.x2,m=f.y1,v=f.y2;this.tmpbox=this.generateNewBox(b,g,m,v),this.tmpbox&&this.drawEachBoxOn(n,this.tmpbox,a,!0)}}catch(p){console.log("redraw(boundbox) ----\x3e ",p.name+": ",p.message)}}},{key:"drawEachBoxOn",value:function(t,e,n,i){try{if(n){var a=e.x1+(e.x2-e.x1)/2,o=e.y1+(e.y2-e.y1)/2;n.strokeStyle="white",n.fillStyle="black",n.font="bold 12px Arial",""==e.label?(n.strokeText("",e.x1+10,e.y1+15),n.fillText("",e.x1+10,e.y1+15)):t.find(function(t){return t.name===e.label})?(n.strokeText(e.label,e.x1+10,e.y1+15),n.fillText(e.label,e.x1+10,e.y1+15)):(n.strokeText("Text",e.x1+10,e.y1+15),n.fillText("Text",e.x1+10,e.y1+15)),n.strokeStyle=e.color,n.beginPath(),n.rect(e.x1,e.y1,e.x2-e.x1,e.y2-e.y1),n.lineWidth=e.lineWidth,n.stroke(),n.fillStyle=e.color,i&&(n.beginPath(),n.fillRect(e.x1-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x1-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x1-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize))}}catch(r){console.log("ObjectDetection drawEachBoxOn(box:Boundingbox, context:CanvasRenderingContext2D, isSelected:boolean):void",r.name+": ",r.message)}}},{key:"generateNewBox",value:function(t,e,n,i){try{var a=te?t:e,s=n>i?n:i;return r-a>this.lineOffset&&s-o>this.lineOffset?{x1:a,y1:o,x2:r,y2:s,lineWidth:2,color:"rgba(0,255,0,1.0)",distancetoImg:{x:0,y:0},label:"",id:this.util.generateUniquesID()}:null}catch(l){return console.log("ObjectDetection GenerateNewBox(x1:number,x2:number,y1:number,y2:number):Boundingbox",l.name+": ",l.message),null}}},{key:"getBBoxDistfromImg",value:function(t,n,i){try{var a,o=e(t);try{for(o.s();!(a=o.n()).done;){var r=a.value,s=r.x1,l=r.y1,c=r.distancetoImg,u=l-i;c.x=Me(s-n),c.y=Me(u)}}catch(h){o.e(h)}finally{o.f()}}catch(h){console.log("ObjectDetection GetBBoxDistfromImg(bbox:Boundingbox[],imgX:number,imgY:number)",h.name+": ",h.message)}}},{key:"getCurrentClickBox",value:function(t,e,n){try{return this.currentClickedBox=this.mouseClickOnBoxes(t,e,n),this.currentClickedBox}catch(i){return console.log("ObjectDetection getCurrentClickBox(MouseX:number, MouseY:number, box:Boundingbox[]):{box:number,pos:string}",i.name+": ",i.message),{box:-1,pos:"o"}}}},{key:"mouseClickOnBoxes",value:function(t,e,n){try{for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:"80%";this.canvas.nativeElement.style.width=t,this.canvas.nativeElement.style.height="90%",this.canvas.nativeElement.width=this.canvas.nativeElement.offsetWidth,this.canvas.nativeElement.height=this.canvas.nativeElement.offsetHeight,this.canvasContext=this.canvas.nativeElement.getContext("2d")}},{key:"emitMetadata",value:function(){this._onChangeMetadata.emit(this._selectMetadata)}},{key:"annotateSelectChange",value:function(t){this._annotateSelectState.setState(t)}},{key:"resetZoom",value:function(){this._zoomService.resetZoomScale()}},{key:"imgFitToCenter",value:function(){try{var t=this._boundingBoxCanvas.calScaleTofitScreen(this._selectMetadata.img_w,this._selectMetadata.img_h,this.canvas.nativeElement.offsetWidth,this.canvas.nativeElement.offsetHeight);this._selectMetadata.img_w*=t.factor,this._selectMetadata.img_h*=t.factor,this._boundingBoxCanvas.scaleAllBoxes(t.factor,this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y),this._selectMetadata.img_x=t.newX,this._selectMetadata.img_y=t.newY,this._boundingBoxCanvas.setGlobalXY(t.newX,t.newY),this._boundingBoxCanvas.moveAllBbox(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y),this.redrawImage(this._selectMetadata),this.resetZoom(),this.canvasContext.canvas.style.transformOrigin="0 0",this.canvasContext.canvas.style.transform="scale(1, 1)"}catch(e){console.log(e)}}},{key:"keyStrokeEvent",value:function(t){var e=this,n=t.ctrlKey,i=t.shiftKey,a=t.key;try{var o=this.boundingBoxState.isActiveModal;if(!this.mousedown&&!o&&!this.showDropdownLabelBox&&this._selectMetadata)if(!n||"c"!==a&&"C"!==a)if(!n||"v"!==a&&"V"!==a){if(n&&i&&("z"===a||"Z"===a)){if(this._undoRedoService.isAllowRedo()){var r=this._undoRedoService.redo();this._selectMetadata=Object(jt.a)(null==r?void 0:r.meta),this.redrawImage(this._selectMetadata),this.getBBoxDistanceFromImage(),this.emitMetadata()}}else if(!n||"z"!==a&&"Z"!==a)if(!o&&this.annotateState.annotation>-1&&("Delete"===a||"Backspace"===a))this._boundingBoxCanvas.deleteSingleBox(this._selectMetadata.bnd_box,this.annotateState.annotation,function(t){t&&(e.annotateSelectChange({annotation:-1,isDlbClick:!1}),e.redrawImage(e._selectMetadata),e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"}),e.emitMetadata())});else{var s="ArrowLeft"===a?"left":"ArrowRight"===a?"right":"ArrowUp"===a?"up":"ArrowDown"===a&&"down";s&&this.keyMoveBox(s)}else if(this._undoRedoService.isAllowUndo()){var l=this._undoRedoService.undo();this._selectMetadata=Object(jt.a)(null==l?void 0:l.meta),this.redrawImage(this._selectMetadata),this.getBBoxDistanceFromImage(),this.emitMetadata()}}else{if(this._copyPasteService.isAvailable()){this._copyPasteService.copy(this._selectMetadata.bnd_box[this.annotateState.annotation]);var c=this._copyPasteService.paste();c&&this._selectMetadata.bnd_box.push(c),this.annotateSelectChange({annotation:this._selectMetadata.bnd_box.length-1,isDlbClick:!1}),this.getBBoxDistanceFromImage(),this.redrawImage(this._selectMetadata)}this._undoRedoService.appendStages({meta:Object(jt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata()}else this.annotateState.annotation>-1&&this._copyPasteService.copy(this._selectMetadata.bnd_box[this.annotateState.annotation])}catch(u){console.log(u)}}},{key:"toggleEvent",value:function(t){try{this.annotateState.annotation>-1&&(this._undoRedoService.clearRedundantStages(),this.annotateSelectChange({annotation:this.annotateState.annotation,isDlbClick:!0}))}catch(e){console.log(e)}}},{key:"mouseScroll",value:function(t){try{if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)){var e=this._zoomService.calculateZoomScale(t,this.zoom,this.canvas.nativeElement),n=e.scale,i=e.x,a=e.y;this.boundingBoxState.scroll&&(this._mouseCursorService.changeCursor(this.mouseCursor,t),this._zoomService.validateZoomScale(this.canvasContext,n)&&(this.canvasContext.canvas.style.transformOrigin="".concat(t.offsetX,"px ").concat(t.offsetY,"px"),this.canvasContext.canvas.style.transform="scale(".concat(n,", ").concat(n,")"),this._zoomService.setState({scale:n}))),this.canvasContext.canvas.scrollTop=a,this.canvasContext.canvas.scrollLeft=i,this._copyPasteService.isAvailable()&&this._copyPasteService.clear()}}catch(o){console.log(o)}}},{key:"mouseDown",value:function(t){try{if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)){if(this.mousedown=!0,this.boundingBoxState.drag&&(this.changeMouseCursorState({grabbing:!0}),this._boundingBoxCanvas.setPanXY(t.offsetX,t.offsetY)),this.boundingBoxState.draw){var e=this._boundingBoxCanvas.mouseDownDrawEnable(t.offsetX,t.offsetY,this._selectMetadata.bnd_box);this.annotateSelectChange({annotation:e,isDlbClick:!1}),this.redrawImage(this._selectMetadata)}}else this.mousedown=!1}catch(n){console.log(n)}}},{key:"mouseUp",value:function(t){try{this.boundingBoxState.draw&&this.mousedown&&this.finishDrawBoundingBox(t),this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)&&(this.boundingBoxState.drag&&this.mousedown&&this._boundingBoxCanvas.setGlobalXY(this._selectMetadata.img_x,this._selectMetadata.img_y),this.mousedown=!1)}catch(e){console.log(e)}}},{key:"mouseMove",value:function(t){var e=this;try{if(this._selectMetadata)if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)&&!this.showDropdownLabelBox){if(this.boundingBoxState.drag&&this.mousedown){var n=this._boundingBoxCanvas.getDiffXY(t);this._selectMetadata.img_x=n.diffX,this._selectMetadata.img_y=n.diffY,this._boundingBoxCanvas.panRectangle(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y,function(t){if(t){var n=Object(jt.a)(e._selectMetadata);e._undoRedoService.isMethodChange("pan")?e._undoRedoService.appendStages({meta:n,method:"pan"}):e._undoRedoService.replaceStages({meta:n,method:"pan"})}}),this.redrawImage(this._selectMetadata)}else this.boundingBoxState.drag&&!this.mousedown&&this.changeMouseCursorState({grab:!0});if(this.boundingBoxState.draw&&this.mousedown&&(this._boundingBoxCanvas.mouseMoveDrawEnable(t.offsetX,t.offsetY,this._selectMetadata),this.redrawImage(this._selectMetadata)),this.boundingBoxState.draw&&!this.mousedown){var i=this._boundingBoxCanvas.getCurrentClickBox(t.offsetX,t.offsetY,this._selectMetadata.bnd_box),a=i.box,o=i.pos;this.changeMouseCursorState(-1!==a?"tl"===o?{"nw-resize":!0}:"tr"===o?{"ne-resize":!0}:"bl"===o?{"sw-resize":!0}:"br"===o?{"se-resize":!0}:"l"===o||"r"===o?{"w-resize":!0}:"t"===o||"b"===o?{"n-resize":!0}:{move:!0}:{crosshair:!0})}}else this.changeMouseCursorState()}catch(r){console.log(r)}}},{key:"finishDrawBoundingBox",value:function(t){var e=this;this.getLabelList(),this.sortingLabelList(this.labelList,this._tabStatus[2].annotation&&this._tabStatus[2].annotation[0].bnd_box?this._tabStatus[2].annotation[0].bnd_box:[]);var n=this._boundingBoxCanvas.mouseUpDrawEnable(this._selectMetadata,this.labelList,function(t){t&&(e._undoRedoService.isStateChange(e._selectMetadata.bnd_box)&&e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"}),e.getBBoxDistanceFromImage(),e.emitMetadata())});if(n.isNew||"mouseout"===t.type){var i=t.offsetY*(100/document.documentElement.clientHeight)+8.5,a=t.offsetX*(100/document.documentElement.clientWidth)+2.5;i<9&&(i=9),i>76&&(i=76),a<2.5&&(a=2.5),a>66&&(a=66),this.floatdiv.nativeElement.style.top=i.toString()+"vh",this.floatdiv.nativeElement.style.left=a.toString()+"vw",this.showDropdownLabelBox=!0,this.labelSearch="",this.invalidInput=!1,setTimeout(function(){e.lbltypetxt.nativeElement.focus()},100)}else this.showDropdownLabelBox=!1;n.isNew&&this.annotateSelectChange({annotation:n.selBox,isDlbClick:!1})}},{key:"changeMouseCursorState",value:function(t){this._mouseCursorService.setState(t)}},{key:"mouseOut",value:function(t){var e,n;try{this.boundingBoxState.draw&&this.mousedown&&this.finishDrawBoundingBox(t),"canvasstyle"!==t.target.className&&!t.target.className.includes("unclosedOut")||(null===(e=t.relatedTarget)||void 0===e?void 0:e.className.includes("unclosedOut"))||(null===(n=t.relatedTarget)||void 0===n?void 0:n.className.includes("canvasstyle"))||0!==this._selectMetadata.bnd_box.filter(function(t){return""===t.label}).length&&(this.showDropdownLabelBox=!1,this._selectMetadata.bnd_box=this._selectMetadata.bnd_box.filter(function(t){return""!==t.label}),this._onChangeMetadata.emit(this._selectMetadata),this.redrawImage(this._selectMetadata),alert("Some bounding boxes will be deleted because they were not labelled.")),this.boundingBoxState.drag&&this.mousedown&&(this._boundingBoxCanvas.setGlobalXY(this._selectMetadata.img_x,this._selectMetadata.img_y),this.redrawImage(this._selectMetadata)),this.mousedown=!1}catch(i){console.log(i)}}},{key:"loadImage",value:function(t){var e=this;try{this.showDropdownLabelBox=!1,this.image.src=t,this.image.onload=function(){e._selectMetadata.img_w=e._selectMetadata.img_w<1?e._selectMetadata.img_ori_w:e._selectMetadata.img_w,e._selectMetadata.img_h=e._selectMetadata.img_h<1?e._selectMetadata.img_ori_h:e._selectMetadata.img_h,e._boundingBoxCanvas.setGlobalXY(e._selectMetadata.img_x,e._selectMetadata.img_y),e.imgFitToCenter(),e.emitMetadata(),e.changeMouseCursorState(),e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"})}}catch(n){console.log(n)}}},{key:"keyMoveBox",value:function(t){var e=this;try{var n=this._selectMetadata.bnd_box[this.annotateState.annotation];n&&this._boundingBoxCanvas.keyboardMoveBox(t,n,this._selectMetadata,function(t){t&&(e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"}),e.getBBoxDistanceFromImage(),e.redrawImage(e._selectMetadata),e.emitMetadata())})}catch(i){console.log(i)}}},{key:"redrawImage",value:function(t){var e,n=t.img_x,i=t.img_y,a=t.img_w,o=t.img_h;this.clearCanvas(),this.canvasContext.drawImage(this.image,n,i,a,o),0!==(null===(e=this._tabStatus[2].annotation)||void 0===e?void 0:e.length)&&(this.getLabelList(),this.sortingLabelList(this.labelList,this._tabStatus[2].annotation&&this._tabStatus[2].annotation[0].bnd_box?this._tabStatus[2].annotation[0].bnd_box:[])),this._boundingBoxCanvas.drawAllBoxOn(this.labelList,this._selectMetadata.bnd_box,this.canvasContext)}},{key:"clearCanvas",value:function(){this.canvasContext.clearRect(0,0,this.canvas.nativeElement.width,this.canvas.nativeElement.height)}},{key:"getBBoxDistanceFromImage",value:function(){this._boundingBoxCanvas.getBBoxDistfromImg(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y)}},{key:"getLabelList",value:function(){var t=this;this.labelList=[],this.allLabelList=[],(this._tabStatus[1].label_list?this._tabStatus[1].label_list:[]).forEach(function(e){t.labelList.push({name:e,count:0}),t.allLabelList.push({name:e,count:0})})}},{key:"labelTypeTextChange",value:function(t){this.labelList=this.allLabelList.filter(function(e){return e.name.includes(t)})}},{key:"labelNameClicked",value:function(t){this.showDropdownLabelBox=!1,this._onChangeAnnotationLabel.emit({label:t,index:this.annotateState.annotation}),this._selectMetadata.bnd_box[this.annotateState.annotation].label=t,this._undoRedoService.isStateChange(this._selectMetadata.bnd_box)&&this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"})}},{key:"sortingLabelList",value:function(t,e){var n=this;t.forEach(function(t,i){var a=t.name;n.labelList[i].count=e.filter(function(t){return t.label===a}).length,n.allLabelList[i].count=e.filter(function(t){return t.label===a}).length}),this.labelList.sort(function(t,e){return t.count-1?this.findPolygonArea(t,e):this.findClickPoint(l,c,e).polygonIndex,this.setPolygonLineWidth(e,this.selectedPolygonIndex),this.setNewPolygon(!1)),this.selectedPolygonIndex}},{key:"mouseMoveDraw",value:function(t,e,n,i,a,o,r,s){var l=this.findPolygonArea(a,t),c=this.isNewPolygon(),u=this.clickPoint,h=u.pointIndex,d=u.polygonIndex;if(c&&r&&o){var f=this.getDiffXY(a),b=f.diffX,g=f.diffY;t.img_x=b,t.img_y=g,this.panPolygons(t,!0),s("pan")}else c?(this.drawNewPolygon(t,e,n,i,!1),this.drawfromPreviousPoint(a,n)):r&&-1===h&&this.selectedPolygonIndex>-1?(this.mouseMovePolygon(a,t,n,this.selectedPolygonIndex,e,i),this.resetClipPath(t),s("pan")):r&&h>-1&&d>-1&&(this.setPolygonCoordinate(a,t,this.clickPoint),s("draw"));return l>-1}},{key:"setPanXY",value:function(t){var e=t.offsetX,n=t.offsetY;try{this.panXY={x:e,y:n}}catch(i){console.log("setPanXY",i)}}},{key:"getPanXY",value:function(){return this.panXY}},{key:"getDiffXY",value:function(t){var e=t.offsetX,n=t.offsetY;try{var i={diffX:0,diffY:0},a=this.getGlobalXY(),o=a.x,r=a.y;return i.diffX=o+(e-this.panXY.x),i.diffY=r+(n-this.panXY.y),i}catch(s){return console.log(s),{diffX:-1,diffY:-1}}}},{key:"setSelectedPolygon",value:function(t,e){this.selectedPolygonIndex=t,e&&this.setPolygonLineWidth(e,this.selectedPolygonIndex)}},{key:"getSelectedPolygonIndex",value:function(){return this.selectedPolygonIndex}},{key:"mouseClickWithinPointPath",value:function(t,e){var n=t.img_x,i=t.img_y,a=t.img_w,o=t.img_h,r=e.offsetX,s=e.offsetY;return r>n&&ri&&s1?(this.tmpPolygon.coorPt.pop(),!1):(this.resetDrawing(t,n,e,i),!0)}catch(o){return console.log("removeLastPoint",o),!1}}},{key:"calculatePointDistance",value:function(t,e,n,i){try{var a=t-n,o=e-i;return Math.sqrt(a*a+o*o)}catch(r){return void console.log("calculatePointDistance",r)}}},{key:"generateNewTempPolygon",value:function(t){try{var e=this.util.generateUniquesID(),n=(t+1).toString();this.tmpPolygon={coorPt:[],label:this.labelList.length>0?this.labelList[0].name:"",id:e,lineWidth:2,color:"rgba(0,255,0,1.0)",region:n,subLabel:[]}}catch(i){console.log("generateNewTempPolygon",i)}}},{key:"getClickPoint",value:function(){return this.clickPoint}},{key:"resetClickPoint",value:function(){this.clickPoint={pointIndex:-1,polygonIndex:-1}}},{key:"resetDrawing",value:function(t,e,n,i){try{this.tmpPolygon=null,this.setNewPolygon(!1),this.redraw(t,e,n,i,-1)}catch(a){console.log("resetDrawing",a)}}},{key:"setNewPolygon",value:function(t){this.isNewPoly=t}},{key:"redraw",value:function(t,e,n,i,a){var o=i.width,r=i.height;try{var s=t.img_w,l=t.img_h,c=t.img_x,u=t.img_y;n.restore(),n.clearRect(0,0,o,r),n.save(),n.beginPath(),n.rect(c,u,s,l),n.clip(),n.beginPath(),n.drawImage(e,c,u,s,l),this.drawAllPolygon(t,n,a)}catch(h){console.log("redraw",h)}}},{key:"drawAllPolygon",value:function(t,e,n){try{this.validatePolygonMetadata(t.polygons)&&(this.drawAllPolygonLine(t,e),this.drawAllPolygonsDots(t,e,n,this.radius),this.plotAllFloatLabel(t,e))}catch(i){console.log("drawAllPolygon",i)}}},{key:"validatePolygonMetadata",value:function(t){return t.length>0}},{key:"drawAllPolygonLine",value:function(n,i){var a=n.polygons;try{var o,r=e(a.entries());try{for(r.s();!(o=r.n()).done;){var s=t(o.value,2),l=(s[0],s[1]),c=l.lineWidth,u=l.color,h=l.coorPt;i.lineWidth=c,i.strokeStyle=u||"white",i.fillStyle=u||"white",i.beginPath(),i.moveTo(h[0].x,h[0].y);var d,f=e(h.entries());try{for(f.s();!(d=f.n()).done;){var b=t(d.value,1)[0];b+1-1){var c=-3;switch(i){case"up":if(this.withinPointPath(n,a,{offsetX:0,offsetY:c})){var u,h=e(n.polygons[a].coorPt.entries());try{for(h.s();!(u=h.n()).done;){var d=t(u.value,1)[0];n.polygons[a].coorPt[d].y+=c}}catch(w){h.e(w)}finally{h.f()}}break;case"down":if(this.withinPointPath(n,a,{offsetX:0,offsetY:c})){var f,b=e(n.polygons[a].coorPt.entries());try{for(b.s();!(f=b.n()).done;){var g=t(f.value,1)[0];n.polygons[a].coorPt[g].y-=c}}catch(w){b.e(w)}finally{b.f()}}break;case"left":if(this.withinPointPath(n,a,{offsetX:c,offsetY:0})){var m,v=e(n.polygons[a].coorPt.entries());try{for(v.s();!(m=v.n()).done;){var p=t(m.value,1)[0];n.polygons[a].coorPt[p].x+=c}}catch(w){v.e(w)}finally{v.f()}}break;case"right":if(this.withinPointPath(n,a,{offsetX:c,offsetY:0})){var _,y=e(n.polygons[a].coorPt.entries());try{for(y.s();!(_=y.n()).done;){var x=t(_.value,1)[0];n.polygons[a].coorPt[x].x-=c}}catch(w){y.e(w)}finally{y.f()}}}this.redraw(n,o,r,s,a),l(!0)}return!0}catch(w){return console.log("keyboardMovePolygon",w),!0}}},{key:"withinPointPath",value:function(n,i,a){var o=n.polygons,r=n.img_x,s=n.img_y,l=n.img_w,c=n.img_h,u=a.offsetX,h=a.offsetY;try{var d,f=e(o[i].coorPt.entries());try{for(f.s();!(d=f.n()).done;){var b=t(d.value,1)[0];return!(o[i].coorPt[b].x+ur+l||o[i].coorPt[b].y+hs+c)}}catch(g){f.e(g)}finally{f.f()}}catch(g){return!1}}},{key:"validateXYDistance",value:function(n){try{var i,a=e(n.polygons.entries());try{for(a.s();!(i=a.n()).done;){var o,r=t(i.value,1)[0],s=e(n.polygons[r].coorPt.entries());try{for(s.s();!(o=s.n()).done;){var l=t(o.value,1)[0],c=n.polygons[r].coorPt[l].y-n.img_y;n.polygons[r].coorPt[l].distancetoImg.x=n.polygons[r].coorPt[l].x-n.img_x,n.polygons[r].coorPt[l].distancetoImg.y=c}}catch(u){s.e(u)}finally{s.f()}}}catch(u){a.e(u)}finally{a.f()}}catch(u){console.log("validateXYDistance",u)}}},{key:"setPolygonLineWidth",value:function(t,e){try{t.polygons=t.polygons.map(function(t,n){return Object.assign(Object.assign({},t),{lineWidth:t.lineWidth=n===e?2:1,color:t.color=n===e?"rgba(0,255,0,1.0)":"rgba(255,255,0,0.8)"})})}catch(n){console.log("setPolygonLineWidth",n)}}},{key:"drawNewPolygon",value:function(n,i,a,o,r){var s;try{if(this.redraw(n,i,a,o,-1),null===(s=this.tmpPolygon)||void 0===s?void 0:s.coorPt){var l,c=e(this.tmpPolygon.coorPt.entries());try{for(c.s();!(l=c.n()).done;){var u=t(l.value,2),h=(u[0],u[1]),d=h.x,f=h.y;a.strokeStyle="green",a.fillStyle="green",a.beginPath(),a.arc(d,f,this.radius,0,2*Math.PI),a.fill(),a.closePath(),a.stroke()}}catch(p){c.e(p)}finally{c.f()}a.beginPath(),a.lineWidth=this.tmpPolygon.lineWidth,a.strokeStyle=this.tmpPolygon.color,a.fillStyle=this.tmpPolygon.color,a.moveTo(this.tmpPolygon.coorPt[0].x,this.tmpPolygon.coorPt[0].y);var b,g=e(this.tmpPolygon.coorPt.entries());try{for(g.s();!(b=g.n()).done;){var m=t(b.value,1)[0];m+1-1&&r>-1&&(e.polygons[o].coorPt[r].x=i,e.polygons[o].coorPt[r].y=a)}catch(s){console.log("setPolygonCoordinate",s)}}},{key:"insidePolygonArea",value:function(t,e){var n=e.offsetX,i=e.offsetY;try{for(var a=!1,o=0,r=t.length-1;oi!=t[r].y>i&&n<(t[r].x-t[o].x)*(i-t[o].y)/(t[r].y-t[o].y)+t[o].x&&(a=!a);return a}catch(s){return console.log("insidePolygonArea",s),!1}}},{key:"calPolygonArea",value:function(t){var e=t.coorPt;try{for(var n=0,i=e.length-1,a=0;a-1&&this.annotateStateChange({annotation:this.annotateState.annotation,isDlbClick:!0}))}},{key:"canvasKeyDownEvent",value:function(t){var e=this,n=t.ctrlKey,i=t.shiftKey,a=t.key;try{if(this.validateEndDrawPolygon(this.segState,this.isMouseWithinPoint,this.canvasContext)){if(this._segCanvasService.isNewPolygon())switch(a){case"Enter":this._segCanvasService.drawNewPolygon(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement,!0),this.positioningLabelListPopup(this._selectMetadata.polygons),this.annotateStateChange({annotation:this._selectMetadata.polygons.length-1}),this._segCanvasService.validateXYDistance(this._selectMetadata),this._undoRedoService.appendStages({meta:Object(jt.a)(this._selectMetadata),method:"draw"}),this.redrawImage(this._selectMetadata),this.emitMetadata();break;case"Escape":this._segCanvasService.resetDrawing(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement)}else switch(a){case"Delete":case"Backspace":this._segCanvasService.deleteSinglePolygon(this._selectMetadata,this.annotateState.annotation,function(t){t&&(e.annotateStateChange(),e.redrawImage(e._selectMetadata),e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"}),e.emitMetadata())})}var o="ArrowLeft"===a?"left":"ArrowRight"===a?"right":"ArrowUp"===a?"up":"ArrowDown"===a&&"down";o&&this.keyMoveBox(o)}if(!n||"c"!==a&&"C"!==a)if(!n||"v"!==a&&"V"!==a){if(n&&i&&("z"===a||"Z"===a)){if(this._undoRedoService.isAllowRedo()){var r=this._undoRedoService.redo();this._selectMetadata=Object(jt.a)(null==r?void 0:r.meta),this.redrawImage(this._selectMetadata),this.emitMetadata()}}else if(n&&("z"===a||"Z"===a)&&this._undoRedoService.isAllowUndo()){var s=this._undoRedoService.undo();this._selectMetadata=Object(jt.a)(null==s?void 0:s.meta),this.redrawImage(this._selectMetadata),this.emitMetadata()}}else this._copyPasteService.isAvailable()&&(this._selectMetadata.polygons.push(this._copyPasteService.paste()),this.annotateStateChange({annotation:this._selectMetadata.polygons.length-1}),this._segCanvasService.validateXYDistance(this._selectMetadata)),this._undoRedoService.appendStages({meta:Object(jt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata();else this.annotateState.annotation>-1&&this._copyPasteService.copy(this._selectMetadata.polygons[this.annotateState.annotation])}catch(l){console.log("canvasKeyDownEvent",l)}}},{key:"keyMoveBox",value:function(t){var e=this;try{this._selectMetadata.polygons[this.annotateState.annotation]&&this._segCanvasService.keyboardMovePolygon(this._selectMetadata,t,this.annotateState.annotation,this.image,this.canvasContext,this.canvas.nativeElement,function(t){t&&(e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"}),e._segCanvasService.validateXYDistance(e._selectMetadata),e.redrawImage(e._selectMetadata),e.emitMetadata())})}catch(n){console.log("keyMoveBox",n)}}},{key:"mouseDown",value:function(t){var e;try{if(this.isMouseWithinPoint=this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t),this.isMouseWithinPoint)if(this.mousedown=!0,this.segState.drag&&(this.changeMouseCursorState({grabbing:!0}),this._segCanvasService.setPanXY(t),this.initializeCanvas(),this.redrawImage(this._selectMetadata)),this.segState.draw){this.getLabelList();var n=this._tabStatus[2].annotation&&null!==(e=this._tabStatus[2].annotation[0].polygons)&&void 0!==e?e:[];this.sortingLabelList(this.labelList,n),this.showDropdownLabelBox=!1;var i=this._segCanvasService.mouseDownDraw(t,this._selectMetadata,this.canvas.nativeElement,this.image,this.canvasContext,this.ctrlKey,this.altKey,this.labelList);if(i>-1)this._segCanvasService.setGlobalXY(t);else{var a=this._selectMetadata,o=a.img_x,r=a.img_y;this._segCanvasService.setGlobalXY({offsetX:o,offsetY:r})}this.annotateStateChange({annotation:i}),this.redrawImage(this._selectMetadata),this.mouseMoveDrawCanvas(t)}else this.segState.draw&&!this.mousedown&&this.redrawImage(this._selectMetadata);else this.mousedown=!1}catch(s){console.log("mouseDown",s)}}},{key:"mouseUp",value:function(t){try{this.isMouseWithinPoint=this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t);var e=this._segCanvasService.isNewPolygon();if(this._selectMetadata&&this.isMouseWithinPoint)if(this.mousedown){var n=this._selectMetadata,i=n.img_x,a=n.img_y;this.segState.drag&&this._segCanvasService.setGlobalXY({offsetX:i,offsetY:a}),this.segState.draw&&!e&&this.annotateState.annotation>-1&&this._undoRedoService.isStateChange(this._selectMetadata.polygons)&&(this._undoRedoService.appendStages({meta:Object(jt.a)(this._selectMetadata),method:"draw"}),this._segCanvasService.setGlobalXY({offsetX:i,offsetY:a}),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata())}else{var o=this._segCanvasService.getClickPoint(),r=o.pointIndex,s=o.polygonIndex;this.segState.draw&&s>-1&&r>-1?this._undoRedoService.isStateChange(this._selectMetadata.polygons)&&(this._undoRedoService.appendStages({meta:Object(jt.a)(this._selectMetadata),method:"draw"}),this._segCanvasService.resetClickPoint(),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata()):this.segState.draw&&(this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata())}this.mousedown=!1}catch(l){console.log("mouseUp",l)}}},{key:"mouseMove",value:function(t){var e=this;try{if(this.isMouseWithinPoint=this._selectMetadata&&this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t),this.isMouseWithinPoint){if(this.segState.drag&&this.mousedown){var n=this._segCanvasService.getDiffXY(t),i=n.diffX,a=n.diffY;this._selectMetadata.img_x=i,this._selectMetadata.img_y=a,this._segCanvasService.panPolygons(this._selectMetadata,!1,function(t){if(t){var n=Object(jt.a)(e._selectMetadata);e._undoRedoService.isMethodChange("pan")?e._undoRedoService.appendStages({meta:n,method:"pan"}):e._undoRedoService.replaceStages({meta:n,method:"pan"})}}),this.redrawImage(this._selectMetadata)}else this.segState.drag&&!this.mousedown&&this.changeMouseCursorState({grab:!0});if(this.segState.draw){var o=this.mouseMoveDrawCanvas(t);this.changeMouseCursorState(o?{move:!0}:{crosshair:!0})}}else this.changeMouseCursorState(),this.mousedown=!1}catch(r){console.log("mouseMove",r)}}},{key:"mouseMoveDrawCanvas",value:function(t){var e=this;return this._segCanvasService.mouseMoveDraw(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement,t,this.ctrlKey,this.mousedown,function(t){e.redrawImage(e._selectMetadata)})}},{key:"changeMouseCursorState",value:function(t){this._mouseCursorService.setState(t)}},{key:"mouseOut",value:function(t){var e,n;try{this.segState.drag&&this.isMouseWithinPoint&&this.mousedown&&(this._segCanvasService.setGlobalXY(t),this.redrawImage(this._selectMetadata)),"canvasstyle"!==t.target.className&&!t.target.className.includes("unclosedOut")||(null===(e=t.relatedTarget)||void 0===e?void 0:e.className.includes("unclosedOut"))||(null===(n=t.relatedTarget)||void 0===n?void 0:n.className.includes("canvasstyle"))||(this.showDropdownLabelBox=!1,0!==this._selectMetadata.polygons.filter(function(t){return!t.label}).length&&(this._selectMetadata.polygons=this._selectMetadata.polygons.filter(function(t){return""!==t.label}),this._onChangeMetadata.emit(this._selectMetadata),this.redrawImage(this._selectMetadata),alert("Some bounding boxes will be deleted because they were not labelled."))),this.isMouseWithinPoint=!1}catch(i){console.log("mouseOut",i)}}},{key:"currentCursor",value:function(){return this._mouseCursorService.changeCursor(this.mouseCursor)}},{key:"positioningLabelListPopup",value:function(t){var e=this,n=t[this._selectMetadata.polygons.length-1].coorPt[this._selectMetadata.polygons[this._selectMetadata.polygons.length-1].coorPt.length-1].y*(100/document.documentElement.clientHeight)+8.5,i=t[this._selectMetadata.polygons.length-1].coorPt[this._selectMetadata.polygons[this._selectMetadata.polygons.length-1].coorPt.length-1].x*(100/document.documentElement.clientWidth)+2.5;n<9&&(n=9),n>76&&(n=76),i<2.5&&(i=2.5),i>66&&(i=66),this.floatdiv.nativeElement.style.top=n.toString()+"vh",this.floatdiv.nativeElement.style.left=i.toString()+"vw",this.showDropdownLabelBox=!0,this.labelSearch="",setTimeout(function(){e.lbltypetxt.nativeElement.focus()},100)}},{key:"getLabelList",value:function(){var t,e=this;this.labelList=[],this.allLabelList=[],(null!==(t=this._tabStatus[1].label_list)&&void 0!==t?t:[]).forEach(function(t){var n={name:t,count:0};e.labelList.push(n),e.allLabelList.push(n)})}},{key:"sortingLabelList",value:function(t,e){var n=this;t.forEach(function(t,i){var a=t.name;n.labelList[i].count=e.filter(function(t){return t.label===a}).length,n.allLabelList[i].count=e.filter(function(t){return t.label===a}).length}),this.labelList.sort(function(t,e){return t.count0&&i===a.currentAnnotationIndex)}}function yn(t,e){if(1&t&&(k.Kb(0),k.mc(1,_n,2,1,"ng-container",23),k.Jb()),2&t){var n=e.$implicit;k.xb(1),k.ac("ngForOf",null==n?null:n.bnd_box)}}function xn(t,e){if(1&t&&(k.Kb(0),k.mc(1,yn,2,1,"ng-container",23),k.Jb()),2&t){var n=e.$implicit;k.xb(1),k.ac("ngForOf",n.annotation)}}function wn(t,e){if(1&t&&(k.Mb(0,"tr"),k.Ib(1,"td",78),k.Wb(2,"translate"),k.Ib(3,"td",78),k.Wb(4,"translate"),k.Lb()),2&t){var n=e.$implicit;k.xb(1),k.bc("innerHTML",k.Xb(2,2,n.shortcutKey),k.ic),k.xb(2),k.bc("innerHTML",k.Xb(4,4,n.functionality),k.ic)}}function Sn(t,e){if(1&t&&(k.Mb(0,"p",49),k.oc(1),k.Wb(2,"translate"),k.Ib(3,"br"),k.oc(4),k.Lb()),2&t){var n=k.Vb();k.xb(1),k.qc(" ",k.Xb(2,2,"location"),""),k.xb(3),k.qc("",n.modalSpanLocationPath," ")}}function kn(t,e){1&t&&(k.Mb(0,"label",72),k.oc(1),k.Wb(2,"translate"),k.Lb()),2&t&&(k.xb(1),k.pc(k.Xb(2,1,"renameModal.nameExist")))}function Cn(t,e){1&t&&(k.Mb(0,"label",72),k.oc(1),k.Wb(2,"translate"),k.Lb()),2&t&&(k.xb(1),k.pc(k.Xb(2,1,"renameModal.nameEmpty")))}var Mn,Pn,On,Ln,In=[{path:"",component:(Mn=function(){function e(a,o,s,l,c,u,h,d,f,b,g){var k=this;r(this,e),this._router=a,this._imgLblApiService=o,this._modalService=s,this._dataSetService=l,this._annotateService=c,this._imgLblActionService=u,this._imgLblLayoutService=h,this._imgLblModeService=d,this._languageService=f,this._spinnerService=b,this._exportSaveFormatService=g,this.currentUrl="",this.selectedProjectName="",this.imgSrc="",this.loading=!1,this.thumbnailList=[],this.unsubscribe$=new y.a,this.subject$=new y.a,this.tabStatus=[{name:"labellingProject.project",closed:!1},{name:"labellingProject.label",closed:!1,label_list:[]},{name:"labellingProject.annotation",closed:!1,annotation:[]}],this.mainLabelRegionVal="",this.subLabelRegionVal="",this.subLabelValidateMsg="",this.currentAnnotationLabel="",this.currentAnnotationIndex=-1,this.currentImageDisplayIndex=-1,this.isLoading=!1,this.showLoading=!1,this.processingNum=0,this.unsupportedImageList=[],this.spanClass="",this.modalSpanMessage="",this.modalSpanLocationPath="",this.sliceNum=0,this.labelList=[],this.isOverlayOn=!1,this.blockLoadThumbnails=!1,this.totalUuid=0,this.labelChoosen=[],this.tempLabelChoosen=[],this.warningMessage="",this.imgPathSplit=[],this.newImageName="",this.selectedUuid="",this.renameImageErrorCode=0,this.modalExportOptions="modal-export-options",this.modalExportProject="modal-export-project",this.modalShortcutKeyInfo="modal-shortcut-key-info",this.modalUnsupportedImage="modal-unsupported-image",this.modalExportWarning="modalExportWarning",this.modalRenameImage="modal-rename-image",this.exportModalBodyStyle={minHeight:"15vh",maxHeight:"15vh",minWidth:"19.5vw",maxWidth:"19.5vw",margin:"15vw 71vh",overflow:"none"},this.saveModalBodyStyle={maxHeight:"80vh",minWidth:"28vw",maxWidth:"28vw",margin:"10vh 28vw",overflow:"none"},this.advModalBodyStyle={maxHeight:"80vh",minWidth:"18vw",maxWidth:"18vw",margin:"10vh 28vw",overflow:"none"},this.infoModalBodyStyle={maxHeight:"80vh",minWidth:"40vw",maxWidth:"40vw",margin:"20vh 23vw",padding:"0vh 0vw 3vh 0vw",overflow:"none"},this.exportProjectBodyStyle={minHeight:"10vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.exportWarningBodyStyle={minHeight:"10vh",maxHeight:"20vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.unsupportedImageBodyStyle={minHeight:"18vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.renameImageBodyStyle={minHeight:"18vh",maxHeight:"30vh",minWidth:"20vw",maxWidth:"20vw",margin:"15vw 71vh",overflow:"none"},this.saveType={saveCurrentImage:!0,saveBulk:!1},this.projectList={projects:[],isUploading:!1,isFetching:!1},this.startProject=function(e){k.isLoading=!0,k.selectedProjectName=e;var a=k._dataSetService.checkProjectStatus(e),o=k._dataSetService.updateProjectLoadStatus(e),r=k._dataSetService.checkExistProjectStatus(e),s=k._dataSetService.getThumbnailList;k.subjectSubscription=k.subject$.pipe(Object(v.a)(function(){return Object(x.a)([a])}),Object(p.a)(function(e){var n=t(e,1)[0],i=n.message,a=n.content;k.totalUuid=a[0].total_uuid,k.projectList={isUploading:k.projectList.isUploading,isFetching:k.projectList.isFetching,projects:k.projectList.projects.map(function(t){return t.project_name===a[0].project_name?Object.assign(Object.assign({},a[0]),{created_date:t.created_date}):t})};var o=a[0].is_loaded;return 1===i&&!o}),Object(v.a)(function(e){return t(e,1)[0].message?Object(x.a)([o,r]):[]}),Object(v.a)(function(a){var o=t(a,2);n(o[0]);var l=o[1],c=l.message,u=l.uuid_list,h=l.label_list;return 2===c?(k.labelList=i(h),k.tabStatus[1].label_list=k.labelList,u.length>0?u.map(function(t){return s(e,t)}):[]):Object(w.a)(500).pipe(Object(v.a)(function(){return r}),Object(p.a)(function(t){return 2===t.message}),Object(v.a)(function(t){var n=t.uuid_list,i=t.label_list;return console.log(n.length),k.tabStatus[1].label_list=i,n.length>0?n.slice(k.sliceNum,k.sliceNum+=20).map(function(t){return s(e,t)}):[]}))}),Object(v.a)(function(t){return t})).subscribe(function(t){k.thumbnailList=[].concat(i(k.thumbnailList),[t]),k.onChangeSchema=Object.assign(Object.assign({},k.onChangeSchema),{totalNumThumbnail:k.thumbnailList.length})},function(t){},function(){k.isLoading=!1,k._annotateService.labelStaging$.pipe(Object(_.a)(k.unsubscribe$)).subscribe(function(t){var e=t.annotation;t.isDlbClick?(k.currentAnnotationIndex=e,k.tabStatus.forEach(function(t){var n=t.annotation;return null==n?void 0:n.forEach(function(t){var n=t.bnd_box,i=t.polygons,a=null!=n?n:i;if(a){var o=a[e],r=o.label,s=o.region;k.currentAnnotationLabel=r,k.mainLabelRegionVal=s||""}else console.log("missing prop bnd_box OR polygons")})}),k._imgLblActionService.setState({isActiveModal:!0,draw:!1,drag:!1,scroll:!1}),k.onDisplayModal()):(k.currentAnnotationLabel="",k.currentAnnotationIndex=e)}),k._imgLblActionService.action$.pipe(Object(_.a)(k.unsubscribe$)).subscribe(function(t){var e=t.clear,n=t.save,i=t.keyInfo;e&&(k.thumbnailList[0].bnd_box&&(k.thumbnailList[k.currentImageDisplayIndex].bnd_box=[]),k.thumbnailList[0].polygons&&(k.thumbnailList[k.currentImageDisplayIndex].polygons=[]),k.onChangeSchema=Object.assign(Object.assign({},k.onChangeSchema),{hasAnnotation:!1})),n&&(k.labelChoosen=k.tabStatus[1].label_list?k.tabStatus[1].label_list.map(function(t){return{label:t,isChoosen:!0}}):[],k.onDisplayModal("modal-save")),i&&k.onDisplayShortcutKeyInfo()}),k.navigateByAction({thumbnailAction:1}),k._spinnerService.hideSpinner()}),k.subject$.next()},this.loadThumbnails=function(){if(!k.blockLoadThumbnails&&k.sliceNum0?n.slice(k.sliceNum,k.sliceNum+=10).map(function(t){return e(k.selectedProjectName,t)}):[]}))}),Object(v.a)(function(t){return t})).subscribe(function(t){k.thumbnailList=[].concat(i(k.thumbnailList),[t]),k.onChangeSchema=Object.assign(Object.assign({},k.onChangeSchema),{totalNumThumbnail:k.thumbnailList.length})},function(t){},function(){k.blockLoadThumbnails=!1,k._spinnerService.hideSpinner()}),k.subject$.next()}},this.onCheckBboxMetadata=function(){console.log("this",k.tabStatus),k.tabStatus.forEach(function(t){var e=t.annotation;e&&(null==e||e.forEach(function(t){var e;console.log("MAT",t.bnd_box),null===(e=t.bnd_box)||void 0===e||e.forEach(function(t,e){if(t.x1>t.x2){var n=t.x1;t.x1=t.x2,t.x2=n}if(t.y1>t.y2){var i=t.y1;t.y1=t.y2,t.y2=i}})}))})},this.updateProjectProgress=function(){var t=k.selectedProjectName;k.onCheckBboxMetadata(),k._imgLblLayoutService.updateProjectProgress(k.tabStatus,t)},this.onChangeMetadata=function(t){k.tabStatus=k.tabStatus.map(function(e){return e.annotation?Object.assign(Object.assign({},e),{annotation:[t]}):e}),k.thumbnailList=k.thumbnailList.map(function(e,n){return k.currentImageDisplayIndex===n?t:e});var e=t.bnd_box?t.bnd_box.length>0:t.polygons.length>0;k.onChangeSchema=Object.assign(Object.assign({},k.onChangeSchema),{hasAnnotation:e}),k.updateProjectProgress()},this.onToggleTab=function(t){var e=t.name,n=t.closed;!k.tabStatus.some(function(t){return t.name.toLowerCase()===e.toLowerCase()&&t.closed===n})&&(k.tabStatus=k.tabStatus.map(function(t){return t.name.toLowerCase()===e.toLowerCase()?Object.assign(Object.assign({},t),{closed:n}):Object.assign({},t)}))},this.onExport=function(){k.modalSpanMessage="",k.modalSpanLocationPath="",k._modalService.open(k.modalExportOptions)},this.exportProject=function(t){"cfgdata"===t&&k.processingNum++;var e=k.selectedProjectName,n=k._imgLblApiService.exportProject(e,t),i=k._imgLblApiService.exportProjectStatus();k.subjectSubscription=k.subject$.pipe(Object(p.a)(),Object(v.a)(function(){return n}),Object(v.a)(function(t){return 1===t.message?Object(w.a)(500).pipe(Object(v.a)(function(){return i}),Object(p.a)(function(t){var e=t.export_status;return k.isOverlayOn=1===e,k.isLoading=1===e,0===e||2===e||3===e})):Object(S.a)(function(t){return console.error(t),t})})).subscribe(function(n){var i=n.export_status,a=n.project_config_path;"cfgdata"===t&&k.processingNum--,2===i?k._languageService._translate.get("exportSuccess").subscribe(function(t){k.toggleExportProjectModalMessage(!0),k.modalSpanMessage=e+t,k.modalSpanLocationPath=a,k.processIsSuccess(!0)}):k._languageService._translate.get("exportFailed").subscribe(function(t){k.toggleExportProjectModalMessage(!0),k.modalSpanMessage=t+e,k.processIsSuccess(!1)})},function(t){},function(){k.closeExportProjectModal()}),k.subject$.next()},this.toggleExportProjectModalMessage=function(t){k._modalService.open(k.modalExportProject)},this.processIsSuccess=function(t){k.spanClass=t?"validation-success":"validation-error"},this.onReload=function(){var t=k.selectedProjectName,e=k._imgLblApiService.reloadProject(t),n=k._imgLblApiService.reloadProjectStatus(t),i=k._dataSetService.getThumbnailList,a=[];k.subjectSubscription=k.subject$.pipe(Object(p.a)(),Object(v.a)(function(){return e}),Object(v.a)(function(e){return 5!==(a=e.message)&&1===a?Object(w.a)(500).pipe(Object(v.a)(function(){return n}),Object(p.a)(function(t){var e=t.file_system_status,n=t.unsupported_image_list;return k.unsupportedImageList=n,3===e||0===e}),Object(v.a)(function(e){k.isLoading=!0;var n=[];k.thumbnailList.forEach(function(t){n.push(t.uuid)}),e.uuid_add_list.forEach(function(t){n.push(t),k.totalUuid++}),e.uuid_delete_list.forEach(function(t){n=n.filter(function(e){return e!==t}),k.totalUuid--}),k.sliceNum=0;var a=3===e.file_system_status&&n.length>0?n.slice(k.sliceNum,k.sliceNum+=20).map(function(e){return i(t,e)}):[];return k.thumbnailList=[],a}),Object(v.a)(function(t){return t})):Object(S.a)(function(t){return console.error(t),k.isLoading=!1,t});var a})).subscribe(function(t){k.isLoading=!0,a.push(t)},function(t){},function(){k.thumbnailList=a,k.onChangeSchema=Object.assign(Object.assign({},k.onChangeSchema),{totalNumThumbnail:k.thumbnailList.length}),k.currentImageDisplayIndex=-1,k.navigateByAction({thumbnailAction:1}),k.isLoading=!1,k.unsupportedImageList.length>0&&k._dataSetService.downloadUnsupportedImageList(t,k.unsupportedImageList).then(function(t){t&&k._modalService.open(k.modalUnsupportedImage)})}),k.subject$.next()},this.navigateByUrl=function(t){var e=t.url;e?k._router.navigate([e]):console.error("No url received from child component")},this.keyDownEvent=function(t){var e=t.key,n=t.repeat;k._imgLblActionService.action$.pipe(Object(p.a)()).subscribe(function(t){if(!t.draw&&!n)switch(e){case"ArrowLeft":k.navigateByAction({thumbnailAction:-1});break;case"ArrowRight":k.navigateByAction({thumbnailAction:1});break;case"Escape":k.onCloseModal()}})},this.navigateByAction=function(t){var e=t.thumbnailAction;if(e){var n=k._imgLblLayoutService.calculateIndex(e,k.currentImageDisplayIndex,k.thumbnailList.length);if(n!==k.currentImageDisplayIndex){k.currentImageDisplayIndex=n;var i=k.thumbnailList.find(function(t,e){return e===n}),a=k.thumbnailList.findIndex(function(t,e){return e===n});a+3===k.thumbnailList.length&&k.loadThumbnails(),i&&-1!==a&&!k.showLoading&&k.displayImage(Object.assign(Object.assign({},i),{thumbnailIndex:a}))}}},this.displayImage=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k.selectedProjectName,i=t.thumbnailIndex,a=Object(m.b)(t,["thumbnailIndex"]);(null===(e=k.selectedMetaData)||void 0===e?void 0:e.uuid)!==a.uuid&&(k.showLoading=!0,k._imgLblApiService.getBase64Thumbnail(n,a.uuid).pipe(Object(p.a)()).subscribe(function(t){var e=t.message,n=t.img_src;if(1===e){k.selectedMetaData=a,k.imgSrc=n,k.currentImageDisplayIndex=i;var o=a.bnd_box?a.bnd_box.length>0:a.polygons&&a.polygons.length>0||!1;k.onChangeSchema=Object.assign(Object.assign({},k.onChangeSchema),{currentThumbnailIndex:i+1,thumbnailName:a.img_path,hasAnnotation:o})}},function(t){return console.error(t)},function(){return k.showLoading=!1}))},this.onProcessLabel=function(t){var e=t.selectedLabel,n=t.label_list,i=t.action,a=e&&!i?n.filter(function(t){return t!==e}):n;k._imgLblApiService.updateLabelList(k.selectedProjectName,a.length>0?a:[]).pipe(Object(p.a)()).subscribe(function(t){1===t.message?k.tabStatus=k._imgLblLayoutService.displayLabelList(k.tabStatus,a):console.error("Error while updating label")}),k.updateProjectProgress()},this.onChangeAnnotationLabel=function(t){t.index=k.currentAnnotationIndex,k.selectedMetaData&&k.selectedMetaData.polygons&&(k.selectedMetaData.polygons[t.index].label=t.label),k.tabStatus=k._imgLblLayoutService.changeAnnotationLabel(k.tabStatus,t),k.updateStateToRenderChild(),k.updateProjectProgress()},this.onDeleteAnnotation=function(t){k.tabStatus=k._imgLblLayoutService.deleteAnnotation(k.tabStatus,t),k.updateStateToRenderChild(),k.updateProjectProgress()},this.onDisplayModal=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"modal-image-labelling";k.subLabelRegionVal="",k.subLabelValidateMsg="",k._modalService.open(t)},this.onCloseModal=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"modal-image-labelling";k._imgLblActionService.setState({isActiveModal:!1,draw:!0,scroll:!0}),k._modalService.close(t)},this.onChangeInput=function(t,e){var n=t.target.value;"main"===e?k.mainLabelRegionVal=n:k.subLabelRegionVal=n},this.onSubmitLabel=function(){var t=k._subLabelSelect.nativeElement.value;if(t.trim()){var e=!1;k.tabStatus.forEach(function(n){var i=n.annotation;return null==i?void 0:i.forEach(function(n){var i=n.bnd_box,a=n.polygons,o=null!=i?i:a;if(o){var r=o[k.currentAnnotationIndex].subLabel;r&&(null==r?void 0:r.length)>0&&(null==r||r.some(function(n){var i=n.label;return e=i===t}))}else console.log("missing prop bnd_box OR polygons")})}),e?k.subLabelValidateMsg="Invalid of duplicate label: "+t:(k.tabStatus=k._imgLblLayoutService.submitLabel(k.tabStatus,t,k.currentAnnotationIndex,{mainLabelRegion:k.mainLabelRegionVal,subLabelRegion:k.subLabelRegionVal}),k.subLabelValidateMsg="",k.updateStateToRenderChild(),k.updateProjectProgress()),k.subLabelRegionVal=""}},this.onRemoveSubLabel=function(t,e){k.tabStatus=k._imgLblLayoutService.removeSubLabel(k.tabStatus,{selectedAnnoIndex:t,selectedSubLabelIndex:e}),k.updateStateToRenderChild(),k.updateProjectProgress()},this.updateStateToRenderChild=function(){k.tabStatus.forEach(function(t){var e=t.annotation;e&&(k.thumbnailList=k.thumbnailList.map(function(t){var n;return null!==(n=e.find(function(e){var n=e.uuid;return t.uuid===n}))&&void 0!==n?n:t}),k.selectedMetaData=e[0])})},this.resetProjectStatus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k.selectedProjectName;t.trim()&&k._dataSetService.manualCloseProject(t).pipe(Object(_.a)(k.unsubscribe$)).subscribe(function(t){n(t),k._router.navigate(["/"])})},this.onSwitchSaveType=function(){k.saveType={saveCurrentImage:!k.saveType.saveCurrentImage,saveBulk:!k.saveType.saveBulk}},this.onClickDownload=function(t){return Object(m.a)(k,void 0,void 0,regeneratorRuntime.mark(function e(){var n,i,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.labelChoosen.filter(function(t){return!0===t.isChoosen}).map(function(t){return t.label}),i=this.labelChoosen.map(function(t){return t.label}),this.saveType.saveBulk&&this.processingNum++,e.next=4,this._exportSaveFormatService.exportSaveFormat(Object.assign(Object.assign(Object.assign(Object.assign({},this.saveType),{saveFormat:t,metadata:this.selectedMetaData,index:this.currentAnnotationIndex,projectName:this.selectedProjectName,fullLabelList:i}),(this.saveType.saveBulk||"ocr"===t||"json"===t||"coco"===t)&&{projectFullMetadata:this.thumbnailList}),"json"!==t&&{labelList:n}));case 4:0===(a=e.sent).message&&(this.warningMessage=a.msg,this._modalService.open(this.modalExportWarning)),this.saveType.saveBulk&&this.processingNum--;case 6:case"end":return e.stop()}},e,this)}))},this._languageService.initializeLanguage("image-labelling",["image-labelling-en","image-labelling-cn","image-labelling-ms"])}return l(e,[{key:"ngOnInit",value:function(){this.currentUrl=this._router.url;var t=this._imgLblLayoutService.getRouteState(history).projectName;this.selectedProjectName=t,this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{totalNumThumbnail:this.thumbnailList.length}),this.startProject(this.selectedProjectName)}},{key:"closeExportProjectModal",value:function(){this._modalService.close(this.modalExportOptions)}},{key:"onWindowClose",value:function(t){this.resetProjectStatus(),t.preventDefault()}},{key:"onChangeLabel",value:function(t){this.onChangeAnnotationLabel({index:this.currentAnnotationIndex,label:t})}},{key:"onDisplayShortcutKeyInfo",value:function(){this._modalService.open(this.modalShortcutKeyInfo)}},{key:"onLoadMoreThumbnails",value:function(){this.loadThumbnails()}},{key:"onRenameImage",value:function(t){this.imgPathSplit=t.img_path.split("\\");var e=this.imgPathSplit.pop();this.newImageName=e?e.split(".")[0]:"",this.imageExt=e?"."+e.split(".").pop():"",this.selectedUuid=t.uuid,this.renameImageErrorCode=0,this._modalService.open(this.modalRenameImage),this._renameInput.nativeElement.focus()}},{key:"onChangeImageName",value:function(t){this.newImageName=t.target.value}},{key:"onSubmitRenameImage",value:function(){var t=this;""!==this.newImageName?this._imgLblApiService.renameImage(this.selectedUuid,this.newImageName+this.imageExt,this.selectedProjectName).subscribe(function(e){if(1===e.message){var n=t.thumbnailList.findIndex(function(e){return e.uuid===t.selectedUuid});t.thumbnailList[n].img_path=t.imgPathSplit.join("\\")+"\\"+t.newImageName+t.imageExt,t.newImageName="",t._modalService.close(t.modalRenameImage)}else 1===e.error_code&&(t.renameImageErrorCode=e.error_code)}):this.renameImageErrorCode=2}},{key:"showAdvSettings",value:function(){this.tempLabelChoosen=this.labelChoosen.map(function(t){return Object.assign({},t)}),this.onDisplayModal("modal-adv")}},{key:"saveAdvSettings",value:function(){this.labelChoosen=this.tempLabelChoosen.map(function(t){return Object.assign({},t)}),this.onCloseModal("modal-adv")}},{key:"keyStrokeEvent",value:function(t){if("F2"===t.key&&this.selectedMetaData){var e=this.selectedMetaData;this.imgPathSplit=e.img_path.split("\\");var n=this.imgPathSplit.pop();this.newImageName=n?n.split(".")[0]:"",this.imageExt=n?"."+n.split(".").pop():"",this.selectedUuid=e.uuid,this.renameImageErrorCode=0,this._modalService.open(this.modalRenameImage),this._renameInput.nativeElement.focus()}}},{key:"shortcutKeyInfo",value:function(){return[{no:1,shortcutKey:"info.shortcut.1.key",functionality:"info.shortcut.1.functionality"},{no:2,shortcutKey:"info.shortcut.2.key",functionality:"info.shortcut.2.functionality"},{no:3,shortcutKey:"info.shortcut.3.key",functionality:"info.shortcut.3.functionality"},{no:4,shortcutKey:"info.shortcut.4.key",functionality:"info.shortcut.4.functionality"},{no:5,shortcutKey:"info.shortcut.5.key",functionality:"info.shortcut.5.functionality"},{no:6,shortcutKey:"info.shortcut.6.key",functionality:"info.shortcut.6.functionality"}]}},{key:"ngOnDestroy",value:function(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this._imgLblModeService.setState(null),this._imgLblActionService.setState(null),this.resetProjectStatus()}}]),e}(),Mn.\u0275fac=function(t){return new(t||Mn)(k.Hb(C.a),k.Hb(I),k.Hb(A.a),k.Hb(j.a),k.Hb(z),k.Hb(D),k.Hb(N),k.Hb(L.a),k.Hb(R.a),k.Hb(F.a),k.Hb(U))},Mn.\u0275cmp=k.Bb({type:Mn,selectors:[["image-labelling-layout"]],viewQuery:function(t,e){var n;1&t&&(k.tc(en,!0),k.tc(nn,!0)),2&t&&(k.ec(n=k.Ub())&&(e._subLabelSelect=n.first),k.ec(n=k.Ub())&&(e._renameInput=n.first))},hostBindings:function(t,e){1&t&&k.Tb("keydown",function(t){return e.keyStrokeEvent(t)},!1,k.gc)("beforeunload",function(t){return e.onWindowClose(t)},!1,k.gc)},decls:132,vars:142,consts:[[1,"layout-container"],[3,"_onChange"],[3,"_totalUuid","_onChange","_tabStatus","_onClick"],[1,"content-container"],[3,"_onChange","_currentUrl","_tabStatus"],[4,"ngIf"],[3,"_onChange","_selectMetadata","_totalUuid","_thumbnailList","_tabStatus","_onClose","_onClickThumbnail","_onClickLabel","_onEnterLabel","_onChangeAnnotationLabel","_onDeleteAnnotation","_loadMoreThumbnails","_onRenameImage"],[3,"_onChange","_onClick","_onExport","_onReload"],[3,"_thumbnailInfo","_imgSrc"],["id","modal-save",3,"id","modalBodyStyle","scrollable"],[1,"save-format-list"],[1,"save-format-content"],["id","modal-adv",3,"id","modalBodyStyle","modalTitle","scrollable","zIndex"],[1,"modal-adv-container"],["class","modal-adv-instruction",4,"ngIf"],["class","margin-bottom",4,"ngFor","ngForOf"],["class","button-style modal-adv-btn",3,"click",4,"ngIf"],["id","modal-image-labelling",3,"id","scrollable","showHeader"],[1,"modal-button","close-button","float-right",3,"click"],[1,"font-title"],[1,"main-label-container"],[1,"font-label"],[1,"static-select",3,"change"],[4,"ngFor","ngForOf"],["type","text",1,"static-input",3,"value","placeholder","change"],[1,"hr-line"],[1,"sub-label-container"],[1,"static-select"],["subLabelSelect",""],[1,"modal-button",3,"click"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"export-content-container"],[1,"modal-button-container"],[1,"button-style","confg-btn",3,"click"],[1,"button-style","confgdata-btn",3,"click"],[1,"with-data"],[1,"help-icon-container"],["src","../../assets/icons/help.svg",1,"help-icon"],[1,"tooltiptext"],[3,"id","modalBodyStyle","scrollable"],[1,"shortcut-key-info-header"],[1,"table-box"],["cellpadding","20"],[1,"modal-content-container"],[1,"modal-message-container"],["class","message",4,"ngIf"],[3,"ngClass"],[1,"error-msg",3,"innerHTML"],[3,"id","modalBodyStyle","modalTitle","scrollable","zIndex"],[1,"message"],["type","text",1,"static-input",3,"value","placeholder","change","keydown.enter"],["renameInput",""],["class","validate-msg",4,"ngIf"],[1,"button-style","renameimg-btn",3,"click"],[3,"_modalUnsupportedImage","_unsupportedImageBodyStyle","_unsupportedImageList"],[3,"_loading"],[3,"_processingNum"],[3,"_selectMetadata","_imgSrc","_tabStatus","_onChangeMetadata","_onChangeAnnotationLabel","_onEnterLabel"],[3,"_selectMetadata","_imgSrc","_tabStatus","_onChangeMetadata","_onChangeAnnotationLabel"],[1,"switch-container"],[1,"switch"],["type","checkbox",1,"checkBox",3,"checked","change"],[1,"slider","round"],[1,"space-verticle"],[1,"adv-settings",3,"click"],[1,"save-format-btn",3,"click"],[1,"modal-adv-instruction"],[1,"margin-bottom"],[1,"switch-2","no-margin-left"],[1,"modal-adv-label"],[1,"button-style","modal-adv-btn",3,"click"],[3,"value","selected"],[1,"validate-msg"],[1,"sub-label-flex-container","sub-label-padding"],[1,"font-label","flex-first"],[1,"font-label","flex-second"],[1,"flex-third"],[1,"modal-butto","flex-fourth",3,"click"],[3,"innerHTML"]],template:function(t,e){1&t&&(k.Mb(0,"div",0),k.Mb(1,"div"),k.Ib(2,"page-header",1),k.Mb(3,"image-labelling-info",2),k.Tb("_onClick",function(t){return e.navigateByAction(t)}),k.Lb(),k.Lb(),k.Mb(4,"div",3),k.Ib(5,"image-labelling-left-sidebar",4),k.mc(6,an,2,3,"ng-container",5),k.mc(7,on,2,3,"ng-container",5),k.Mb(8,"image-labelling-project",6),k.Tb("_onClose",function(t){return e.onToggleTab(t)})("_onClickThumbnail",function(t){return e.displayImage(t)})("_onClickLabel",function(t){return e.onProcessLabel(t)})("_onEnterLabel",function(t){return e.onProcessLabel(t)})("_onChangeAnnotationLabel",function(t){return e.onChangeAnnotationLabel(t)})("_onDeleteAnnotation",function(t){return e.onDeleteAnnotation(t)})("_loadMoreThumbnails",function(){return e.onLoadMoreThumbnails()})("_onRenameImage",function(t){return e.onRenameImage(t)}),k.Lb(),k.Mb(9,"image-labelling-right-sidebar",7),k.Tb("_onClick",function(t){return e.onToggleTab(t)})("_onExport",function(){return e.onExport()})("_onReload",function(){return e.onReload()}),k.Lb(),k.Lb(),k.Ib(10,"image-labelling-footer",8),k.Lb(),k.Mb(11,"modal",9),k.Mb(12,"div",10),k.Mb(13,"div",11),k.mc(14,rn,30,11,"ng-container",5),k.mc(15,sn,10,0,"ng-container",5),k.Lb(),k.Lb(),k.Lb(),k.Mb(16,"modal",12),k.Wb(17,"translate"),k.Mb(18,"div",13),k.mc(19,ln,3,3,"p",14),k.mc(20,cn,6,2,"div",15),k.mc(21,un,3,3,"div",5),k.mc(22,hn,3,3,"button",16),k.Lb(),k.Lb(),k.Mb(23,"modal",17),k.Mb(24,"button",18),k.Tb("click",function(){return e.onCloseModal()}),k.oc(25,"\u2716"),k.Lb(),k.Mb(26,"div"),k.Mb(27,"h2",19),k.oc(28),k.Wb(29,"translate"),k.Lb(),k.Mb(30,"div",20),k.Mb(31,"label",21),k.oc(32),k.Wb(33,"translate"),k.Lb(),k.Mb(34,"select",22),k.Tb("change",function(t){return e.onChangeLabel(t.target.value)}),k.mc(35,fn,2,1,"ng-container",23),k.Lb(),k.Mb(36,"label",21),k.oc(37),k.Wb(38,"translate"),k.Lb(),k.Mb(39,"input",24),k.Tb("change",function(t){return e.onChangeInput(t,"main")}),k.Wb(40,"translate"),k.Lb(),k.Lb(),k.Lb(),k.Ib(41,"hr",25),k.Mb(42,"div"),k.Mb(43,"h2",19),k.oc(44),k.Wb(45,"translate"),k.Lb(),k.Mb(46,"div",26),k.Mb(47,"label",21),k.oc(48),k.Wb(49,"translate"),k.Lb(),k.Mb(50,"select",27,28),k.mc(52,gn,2,1,"ng-container",23),k.Lb(),k.Mb(53,"label",21),k.oc(54),k.Wb(55,"translate"),k.Lb(),k.Mb(56,"input",24),k.Tb("change",function(t){return e.onChangeInput(t,"sub")}),k.Wb(57,"translate"),k.Lb(),k.Mb(58,"button",29),k.Tb("click",function(){return e.onSubmitLabel()}),k.oc(59),k.Wb(60,"translate"),k.Lb(),k.Lb(),k.mc(61,mn,3,1,"ng-container",5),k.Lb(),k.Ib(62,"hr",25),k.mc(63,xn,2,1,"ng-container",23),k.Lb(),k.Mb(64,"modal",30),k.Wb(65,"translate"),k.Mb(66,"div",31),k.Mb(67,"div",32),k.Mb(68,"button",33),k.Tb("click",function(){return e.exportProject("cfg")}),k.oc(69),k.Wb(70,"translate"),k.Lb(),k.Mb(71,"button",34),k.Tb("click",function(){return e.exportProject("cfgdata")}),k.oc(72),k.Wb(73,"translate"),k.Ib(74,"br"),k.Mb(75,"span",35),k.oc(76),k.Wb(77,"translate"),k.Lb(),k.Lb(),k.Mb(78,"div",36),k.Ib(79,"img",37),k.Mb(80,"span",38),k.Mb(81,"p"),k.oc(82),k.Wb(83,"translate"),k.Lb(),k.Mb(84,"p"),k.oc(85),k.Wb(86,"translate"),k.Lb(),k.Mb(87,"p"),k.oc(88),k.Wb(89,"translate"),k.Lb(),k.Lb(),k.Lb(),k.Lb(),k.Lb(),k.Lb(),k.Mb(90,"modal",39),k.Mb(91,"div",40),k.oc(92),k.Wb(93,"translate"),k.Lb(),k.Mb(94,"div",41),k.Mb(95,"table",42),k.mc(96,wn,5,6,"tr",23),k.Lb(),k.Lb(),k.Lb(),k.Mb(97,"modal",30),k.Wb(98,"translate"),k.Ib(99,"br"),k.Mb(100,"div",43),k.Mb(101,"div",44),k.mc(102,Sn,5,4,"p",45),k.Lb(),k.Mb(103,"div",46),k.Ib(104,"p",47),k.Lb(),k.Lb(),k.Lb(),k.Mb(105,"modal",48),k.Wb(106,"translate"),k.Ib(107,"br"),k.Mb(108,"div",43),k.Mb(109,"div",44),k.Mb(110,"p",49),k.oc(111),k.Wb(112,"translate"),k.Lb(),k.Lb(),k.Lb(),k.Lb(),k.Mb(113,"modal",30),k.Wb(114,"translate"),k.Mb(115,"div",43),k.Mb(116,"label",21),k.oc(117),k.Wb(118,"translate"),k.Lb(),k.Mb(119,"input",50,51),k.Tb("change",function(t){return e.onChangeImageName(t)})("keydown.enter",function(t){return e.onChangeImageName(t),e.onSubmitRenameImage()}),k.Wb(121,"translate"),k.Lb(),k.Ib(122,"br"),k.Ib(123,"br"),k.mc(124,kn,3,3,"label",52),k.mc(125,Cn,3,3,"label",52),k.Mb(126,"button",53),k.Tb("click",function(){return e.onSubmitRenameImage()}),k.oc(127),k.Wb(128,"translate"),k.Lb(),k.Lb(),k.Lb(),k.Ib(129,"unsupported-image-modal",54),k.Ib(130,"spinner",55),k.Ib(131,"toastr",56)),2&t&&(k.xb(2),k.ac("_onChange",e.onChangeSchema),k.xb(1),k.ac("_totalUuid",e.totalUuid)("_onChange",e.onChangeSchema)("_tabStatus",e.tabStatus),k.xb(2),k.ac("_onChange",e.onChangeSchema)("_currentUrl",e.currentUrl)("_tabStatus",e.tabStatus),k.xb(1),k.ac("ngIf",e._router.url.includes("imglabel/bndbox")),k.xb(1),k.ac("ngIf",e._router.url.includes("imglabel/seg")),k.xb(1),k.ac("_onChange",e.onChangeSchema)("_selectMetadata",e.selectedMetaData)("_totalUuid",e.totalUuid)("_thumbnailList",e.thumbnailList)("_tabStatus",e.tabStatus),k.xb(1),k.ac("_onChange",e.onChangeSchema),k.xb(1),k.ac("_thumbnailInfo",e.selectedMetaData)("_imgSrc",e.imgSrc),k.xb(1),k.ac("id","modal-save")("modalBodyStyle",e.saveModalBodyStyle)("scrollable",!0),k.xb(3),k.ac("ngIf",null==e.selectedMetaData?null:e.selectedMetaData.bnd_box),k.xb(1),k.ac("ngIf",null==e.selectedMetaData?null:e.selectedMetaData.polygons),k.xb(1),k.ac("id","modal-adv")("modalBodyStyle",e.advModalBodyStyle)("modalTitle",k.Xb(17,92,"advModal.title"))("scrollable",!0)("zIndex",2),k.xb(3),k.ac("ngIf",0!==e.tempLabelChoosen.length),k.xb(1),k.ac("ngForOf",e.tempLabelChoosen),k.xb(1),k.ac("ngIf",0===e.tempLabelChoosen.length),k.xb(1),k.ac("ngIf",0!==e.tempLabelChoosen.length),k.xb(1),k.ac("id","modal-image-labelling")("scrollable",!0)("showHeader",!1),k.xb(5),k.pc(k.Xb(29,94,"labellingArea.mainLabel")),k.xb(4),k.qc("",k.Xb(33,96,"labellingArea.label"),": "),k.xb(3),k.ac("ngForOf",e.tabStatus),k.xb(2),k.qc("",k.Xb(38,98,"labellingArea.regionInfo"),": "),k.xb(2),k.ac("value",e.mainLabelRegionVal)("placeholder",k.Xb(40,100,"labellingArea.mainRegionInfo")),k.xb(5),k.pc(k.Xb(45,102,"labellingArea.subLabel")),k.xb(4),k.qc("",k.Xb(49,104,"labellingArea.label"),": "),k.xb(4),k.ac("ngForOf",e.tabStatus),k.xb(2),k.qc("",k.Xb(55,106,"labellingArea.regionInfo"),": "),k.xb(2),k.ac("value",e.subLabelRegionVal)("placeholder",k.Xb(57,108,"labellingArea.subRegionInfo")),k.xb(3),k.qc(" ",k.Xb(60,110,"labellingArea.add")," "),k.xb(2),k.ac("ngIf",e.subLabelValidateMsg),k.xb(2),k.ac("ngForOf",e.tabStatus),k.xb(1),k.ac("id",e.modalExportOptions)("modalBodyStyle",e.exportModalBodyStyle)("modalTitle",k.Xb(65,112,"exportModal.exportOptions"))("scrollable",!1),k.xb(5),k.qc(" ",k.Xb(70,114,"exportModal.configFile")," "),k.xb(3),k.qc(" ",k.Xb(73,116,"exportModal.zipFile")," "),k.xb(4),k.pc(k.Xb(77,118,"exportModal.withData")),k.xb(6),k.qc("",k.Xb(83,120,"configFileInfoTitle"),":"),k.xb(3),k.pc(k.Xb(86,122,"configFileInfoDest1")),k.xb(3),k.pc(k.Xb(89,124,"configFileInfoDest2")),k.xb(2),k.ac("id",e.modalShortcutKeyInfo)("modalBodyStyle",e.infoModalBodyStyle)("scrollable",!0),k.xb(2),k.pc(k.Xb(93,126,"info.header")),k.xb(4),k.ac("ngForOf",e.shortcutKeyInfo()),k.xb(1),k.ac("id",e.modalExportProject)("modalBodyStyle",e.exportProjectBodyStyle)("modalTitle",k.Xb(98,128,"exportTitle"))("scrollable",!1),k.xb(5),k.ac("ngIf",e.modalSpanLocationPath.trim()),k.xb(1),k.ac("ngClass",e.spanClass),k.xb(1),k.ac("innerHTML",e.modalSpanMessage,k.ic),k.xb(1),k.ac("id",e.modalExportWarning)("modalBodyStyle",e.exportWarningBodyStyle)("modalTitle",k.Xb(106,130,"exportTitle"))("scrollable",!1)("zIndex",2),k.xb(6),k.pc(k.Xb(112,132,e.warningMessage)),k.xb(2),k.ac("id",e.modalRenameImage)("modalBodyStyle",e.renameImageBodyStyle)("modalTitle",k.Xb(114,134,"renameModal.renameImg"))("scrollable",!1),k.xb(4),k.qc("",k.Xb(118,136,"renameModal.imageName"),": "),k.xb(2),k.ac("value",e.newImageName)("placeholder",k.Xb(121,138,"renameModal.typeNewName")),k.xb(5),k.ac("ngIf",1===e.renameImageErrorCode),k.xb(1),k.ac("ngIf",2===e.renameImageErrorCode),k.xb(2),k.qc(" ",k.Xb(128,140,"renameModal.submit")," "),k.xb(2),k.ac("_modalUnsupportedImage",e.modalUnsupportedImage)("_unsupportedImageBodyStyle",e.unsupportedImageBodyStyle)("_unsupportedImageList",e.unsupportedImageList),k.xb(1),k.ac("_loading",e.isLoading),k.xb(1),k.ac("_processingNum",e.processingNum))},directives:[Y.a,et,At,g.k,ie,re,ue,he.a,g.j,g.i,de.a,fe.a,ke,Ue,tn,Tt.j,Tt.m],pipes:[Z.c],styles:['.layout-container[_ngcontent-%COMP%]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.content-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;min-width:97.8vw;max-width:97.8vw}.modal-button[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw;background:#262a2e;color:azure}.close-button[_ngcontent-%COMP%]{border:none;cursor:pointer}.float-right[_ngcontent-%COMP%]{float:right}.font-title[_ngcontent-%COMP%]{font-size:1.7vw}.font-label[_ngcontent-%COMP%]{line-height:4vh;font-size:1vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.main-label-container[_ngcontent-%COMP%]{min-width:35vw;max-width:35vw}.main-label-container[_ngcontent-%COMP%], .sub-label-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.sub-label-container[_ngcontent-%COMP%]{min-width:40vw;max-width:40vw}.sub-label-flex-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1 1 100%;min-width:0}.static-select[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;min-width:10vw;max-width:10vw;line-height:3vh;font-size:.9vw;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:5vh;margin:0;-moz-text-align-last:center;text-align-last:center;background:#262a2e;color:#fff;box-shadow:inset -.5vw 6.25vw 1vw 0 rgba(0,0,0,.2),inset -.5vw -.5vw 1vw 0 hsla(0,0%,100%,.4)}.static-select[_ngcontent-%COMP%]:hover{box-shadow:inset -.375vw -.375vw .625vw 0 rgba(0,0,0,.2),inset .375vw .375vw .625vw 0 hsla(0,0%,100%,.5)}.static-select[_ngcontent-%COMP%]:active{box-shadow:inset .375vw .375vw .625vw 0 rgba(0,0,0,.2),inset -.375vw -.375vw .625vw 0 hsla(0,0%,100%,.5)}.static-input[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;min-width:10vw;max-width:10vw;line-height:3vh;font-size:.9vw;border-radius:2vw;border:none;outline:none;background-color:#363636;color:#fff;padding:0 1vw}.hr-line[_ngcontent-%COMP%]{margin:5vh 0}.sub-label-padding[_ngcontent-%COMP%]{padding:0 0 2vh}.validate-msg[_ngcontent-%COMP%]{color:red;padding:5vh 0 0;font-size:1vw}.flex-first[_ngcontent-%COMP%]{flex:1 1 35%}.flex-second[_ngcontent-%COMP%]{flex:1 1 55%}.flex-third[_ngcontent-%COMP%]{flex:0 0 5%}.flex-fourth[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw;background:#262a2e;color:azure;flex:0 0 5%}.modal[_ngcontent-%COMP%]{z-index:1000;padding-top:10vh;top:0;width:100%;height:100%;overflow:auto;background-color:transparent;scrollbar-width:none;position:fixed;background:rgba(0,0,0,.8)}.modal-content[_ngcontent-%COMP%]{background-color:#525353;padding:1vw;max-width:20vw;min-width:20vw;border-radius:1vw;margin:15vh auto auto}.modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.modal-content-header[_ngcontent-%COMP%]{text-align:center;color:#fff;font-size:3vh}.modal-button-container[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:1vw 1vw 1vw 2vw}.modal-button-cancel[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.export-content-container[_ngcontent-%COMP%]{margin-left:.5vw}.button-style[_ngcontent-%COMP%]{border-radius:1vh;border:none;outline:none;color:#fff;cursor:pointer}.confg-btn[_ngcontent-%COMP%]{margin-right:.7vw}.confg-btn[_ngcontent-%COMP%], .confgdata-btn[_ngcontent-%COMP%]{padding:1vh .5vw;background-color:#2d8ceb;font-size:2vh;min-width:7.5vw}.cancel-btn[_ngcontent-%COMP%], .with-data[_ngcontent-%COMP%]{font-size:1.5vh}.cancel-btn[_ngcontent-%COMP%]{padding:1vh 1vw;background-color:#444}.error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.help-icon[_ngcontent-%COMP%]{height:3vh}.help-icon-container[_ngcontent-%COMP%]{padding-right:1vw;padding-left:.4vw}.help-icon-container[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:15vw;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:65%;margin-left:-60px;text-align:justify;text-justify:inter-word}.help-icon-container[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible}.message[_ngcontent-%COMP%]{font-size:1vw;overflow-wrap:break-word}.modal-message-container[_ngcontent-%COMP%]{padding-right:3.5vw}.break[_ngcontent-%COMP%]{overflow-wrap:break-word}.save-format-list[_ngcontent-%COMP%]{left:0;top:0;width:100%;height:100%;overflow:auto}.save-format-content[_ngcontent-%COMP%]{margin:auto;padding:10px}.switch-container[_ngcontent-%COMP%]{font-size:small;align-content:center;text-align:center}.switch[_ngcontent-%COMP%]{position:relative;display:inline-block;width:4em;height:1.8em;margin-left:auto;margin-right:auto}.switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.switch[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background:#000;background-size:100% 100%;background-position:50%}.switch[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{transform:translateX(2.2em)}.switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.8s}.switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:1.6em;width:1.6em;left:.14em;bottom:.15em;background-color:snow;transition:.8s}.switch[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]{border-radius:1.2em}.switch[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]:before{border-radius:50%}.switch[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-top:8px;margin-top:.5em;outline:none}.switch-2[_ngcontent-%COMP%]{position:relative;display:inline-block;width:2.5em;height:1.2em;margin-left:auto;margin-right:auto}.switch-2[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.switch-2[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background:#000;background-size:100% 100%;background-position:50%}.switch-2[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{transform:translateX(1.5em)}.switch-2[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.5s}.switch-2[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:1.2em;width:1.2em;left:.14em;background-color:snow;transition:.5s}.switch-2[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]{border-radius:1.2em}.switch-2[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]:before{border-radius:50%}.switch-2[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-top:8px;margin-top:.5em;outline:none}.no-margin-left[_ngcontent-%COMP%]{margin-left:0}.space-verticle[_ngcontent-%COMP%]{background-color:transparent;outline:none;border:none;margin-left:1.5em;margin-right:1.5em}.save-format-btn[_ngcontent-%COMP%]{width:90%;height:6em;margin-top:2%;margin-bottom:2%;margin-left:4.5%;background:#000;background-size:100% 100%;background-position:50%;font-size:medium;outline:none;border:none;color:snow;overflow:hidden;border-radius:5px}.save-format-btn[_ngcontent-%COMP%]:hover{text-shadow:0 0 30px #888;box-shadow:5px 5px 10px #888,-5px -5px 10px #888;cursor:pointer}.save-format-btn[_ngcontent-%COMP%]:active:hover{border:3px dashed green}.adv-settings[_ngcontent-%COMP%]{padding:1vh;margin:1vh 1.5vw;color:#ccc;font-size:.6vw;cursor:pointer;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;background:#30353a;border-radius:.5vh;float:right}.adv-settings[_ngcontent-%COMP%]:hover{background:#373d42}.modal-adv-container[_ngcontent-%COMP%]{margin:1vh 1vw}.modal-adv-instruction[_ngcontent-%COMP%]{color:#fff;opacity:.5}.modal-adv-label[_ngcontent-%COMP%]{font-size:1.5vh;margin-left:2vw;white-space:nowrap;width:9vw;overflow:hidden;text-overflow:ellipsis;display:inline-block}.modal-adv-btn[_ngcontent-%COMP%]{float:right;padding:.5vh 1vw;background-color:#2d8ceb;font-size:1.5vh;min-width:3vw}.shortcut-key-info-header[_ngcontent-%COMP%]{font-size:1.2vw;color:#fff;text-align:center;margin-bottom:2vh}.table-box[_ngcontent-%COMP%]{width:100%;height:90%;overflow-y:auto}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%], td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{border-collapse:collapse;text-align:center;color:#fff}th[_ngcontent-%COMP%]{top:0;background:#262a2e;color:#fff;border-top:none!important}tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){color:#bebebe}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{width:60px;text-align:center;background:#262a2e}.validation-error[_ngcontent-%COMP%]{margin:1px;color:red}.validation-success[_ngcontent-%COMP%]{margin:1px;color:green}.label[_ngcontent-%COMP%]{color:#fff;font-size:2vh;margin-right:1vw}.label-file[_ngcontent-%COMP%]{padding-top:.5vh}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:.5vh}.renameimg-btn[_ngcontent-%COMP%]{padding:1vh .5vw;background-color:#2d8ceb;margin-top:.7vw;margin-right:.7vw;font-size:2vh;min-width:7.5vw;float:right}']}),Mn)}],An=((Pn=function t(){r(this,t)}).\u0275mod=k.Fb({type:Pn}),Pn.\u0275inj=k.Eb({factory:function(t){return new(t||Pn)},imports:[[C.d.forChild(In)]]}),Pn),jn=s("KZX/"),Bn=((On=function t(){r(this,t)}).\u0275mod=k.Fb({type:On}),On.\u0275inj=k.Eb({factory:function(t){return new(t||On)},imports:[[g.b,jn.a,Z.b]]}),On),En=s("RKnZ"),zn=s("O+1G"),Tn=((Ln=function t(){r(this,t)}).\u0275mod=k.Fb({type:Ln}),Ln.\u0275inj=k.Eb({factory:function(t){return new(t||Ln)},imports:[[g.b,jn.a,Z.b,An,En.a,C.d,zn.a,Bn]]}),Ln)},xOOu:function(t,e,n){t.exports=function t(e,n,i){function a(r,s){if(!n[r]){if(!e[r]){if(o)return o(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[r]={exports:{}};e[r][0].call(c.exports,function(t){return a(e[r][1][t]||t)},c,c.exports,t,e,n,i)}return n[r].exports}for(var o=!1,r=0;r>4,s=1>6:64,l=2>2)+o.charAt(r)+o.charAt(s)+o.charAt(l));return c.join("")},n.decode=function(t){var e,n,i,r,s,l,c=0,u=0,h="data:";if(t.substr(0,h.length)===h)throw new Error("Invalid base64 input, it looks like a data url.");var d,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&f--,t.charAt(t.length-2)===o.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=a.uint8array?new Uint8Array(0|f):new Array(0|f);c>4,n=(15&r)<<4|(s=o.indexOf(t.charAt(c++)))>>2,i=(3&s)<<6|(l=o.indexOf(t.charAt(c++))),d[u++]=e,64!==s&&(d[u++]=n),64!==l&&(d[u++]=i);return d}},{"./support":30,"./utils":32}],2:[function(t,e,n){"use strict";var i=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/DataLengthProbe"),r=t("./stream/Crc32Probe");function s(t,e,n,i,a){this.compressedSize=t,this.uncompressedSize=e,this.crc32=n,this.compression=i,this.compressedContent=a}o=t("./stream/DataLengthProbe"),s.prototype={getContentWorker:function(){var t=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(t,e,n){return t.pipe(new r).pipe(new o("uncompressedSize")).pipe(e.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,n){"use strict";var i=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,n){"use strict";var i=t("./utils"),a=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,n,i){var o=a,r=0+n;t^=-1;for(var s=0;s>>8^o[255&(t^e[s])];return-1^t}(0|e,t,t.length):function(t,e,n,i){var o=a,r=0+n;t^=-1;for(var s=0;s>>8^o[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,e,n){"use strict";var i;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,a=t("pako"),o=t("./utils"),r=t("./stream/GenericWorker"),s=i?"uint8array":"array";function l(t,e){r.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}n.magic="\b\0",o.inherits(l,r),l.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,t.data),!1)},l.prototype.flush=function(){r.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},n.compressWorker=function(t){return new l("Deflate",t)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,n){"use strict";function i(t,e){var n,i="";for(n=0;n>>=8;return i}function a(t,e,n,a,r,u){var h,d,f=t.file,b=t.compression,g=u!==s.utf8encode,m=o.transformTo("string",u(f.name)),v=o.transformTo("string",s.utf8encode(f.name)),p=f.comment,_=o.transformTo("string",u(p)),y=o.transformTo("string",s.utf8encode(p)),x=v.length!==f.name.length,w=y.length!==p.length,S="",k="",C="",M=f.dir,P=f.date,O={crc32:0,compressedSize:0,uncompressedSize:0};e&&!n||(O.crc32=t.crc32,O.compressedSize=t.compressedSize,O.uncompressedSize=t.uncompressedSize);var L=0;e&&(L|=8),g||!x&&!w||(L|=2048);var I=0,A=0;M&&(I|=16),"UNIX"===r?(A=798,I|=function(t,e){var n=t;return t||(n=e?16893:33204),(65535&n)<<16}(f.unixPermissions,M)):(A=20,I|=function(t){return 63&(t||0)}(f.dosPermissions)),h=P.getUTCHours(),h<<=6,h|=P.getUTCMinutes(),h<<=5,h|=P.getUTCSeconds()/2,d=P.getUTCFullYear()-1980,d<<=4,d|=P.getUTCMonth()+1,d<<=5,d|=P.getUTCDate(),x&&(k=i(1,1)+i(l(m),4)+v,S+="up"+i(k.length,2)+k),w&&(C=i(1,1)+i(l(_),4)+y,S+="uc"+i(C.length,2)+C);var j="";return j+="\n\0",j+=i(L,2),j+=b.magic,j+=i(h,2),j+=i(d,2),j+=i(O.crc32,4),j+=i(O.compressedSize,4),j+=i(O.uncompressedSize,4),j+=i(m.length,2),j+=i(S.length,2),{fileRecord:c.LOCAL_FILE_HEADER+j+m+S,dirRecord:c.CENTRAL_FILE_HEADER+i(A,2)+j+i(_.length,2)+"\0\0\0\0"+i(I,4)+i(a,4)+m+S+_}}var o=t("../utils"),r=t("../stream/GenericWorker"),s=t("../utf8"),l=t("../crc32"),c=t("../signature");function u(t,e,n,i){r.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=n,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,r),u.prototype.push=function(t){var e=t.meta.percent||0,n=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,r.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:n?(e+100*(n-i-1))/n:100}}))},u.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var n=a(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,n=a(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),e)this.push({data:function(t){return c.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)n=(n<<8)+this.byteAt(e);return this.index+=t,n},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=a},{"../utils":32}],19:[function(t,e,n){"use strict";var i=t("./Uint8ArrayReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,n){"use strict";var i=t("./DataReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},a.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},a.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},a.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,e,n){"use strict";var i=t("./ArrayReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,n){"use strict";var i=t("../utils"),a=t("../support"),o=t("./ArrayReader"),r=t("./StringReader"),s=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||a.uint8array?"nodebuffer"===e?new s(t):a.uint8array?new l(i.transformTo("uint8array",t)):new o(i.transformTo("array",t)):new r(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,n){"use strict";n.LOCAL_FILE_HEADER="PK\x03\x04",n.CENTRAL_FILE_HEADER="PK\x01\x02",n.CENTRAL_DIRECTORY_END="PK\x05\x06",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,e,n){"use strict";var i=t("./GenericWorker"),a=t("../utils");function o(t){i.call(this,"ConvertWorker to "+t),this.destType=t}a.inherits(o,i),o.prototype.processChunk=function(t){this.push({data:a.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,n){"use strict";var i=t("./GenericWorker"),a=t("../crc32");function o(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,i),o.prototype.processChunk=function(t){this.streamInfo.crc32=a(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./GenericWorker");function o(t){a.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(o,a),o.prototype.processChunk=function(t){t&&(this.streamInfo[this.propName]=(this.streamInfo[this.propName]||0)+t.data.length),a.prototype.processChunk.call(this,t)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./GenericWorker");function o(t){a.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}i.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,n){"use strict";function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var n=0;n "+t:t}},e.exports=i},{}],29:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),r=t("../base64"),s=t("../support"),l=t("../external"),c=null;if(s.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function u(t,e,n){var r=e;switch(e){case"blob":case"arraybuffer":r="uint8array";break;case"base64":r="string"}try{this._internalType=r,this._outputType=e,this._mimeType=n,i.checkSupport(r),this._worker=t.pipe(new a(r)),t.lock()}catch(t){this._worker=new o("error"),this._worker.error(t)}}u.prototype={accumulate:function(t){return function(t,e){return new l.Promise(function(n,a){var o=[],s=t._internalType,l=t._outputType,c=t._mimeType;t.on("data",function(t,n){o.push(t),e&&e(n)}).on("error",function(t){o=[],a(t)}).on("end",function(){try{var t=function(t,e,n){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),n);case"base64":return r.encode(e);default:return i.transformTo(t,e)}}(l,function(t,e){var n,i=0,a=null,o=0;for(n=0;n>>6:(n<65536?e[r++]=224|n>>>12:(e[r++]=240|n>>>18,e[r++]=128|n>>>12&63),e[r++]=128|n>>>6&63),e[r++]=128|63&n);return e}(t)},n.utf8decode=function(t){return a.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,n,a,o,r=t.length,l=new Array(2*r);for(e=n=0;e>10&1023,l[n++]=56320|1023&a)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),i.applyFromCharCode(l)}(t=i.transformTo(a.uint8array?"uint8array":"array",t))},i.inherits(c,r),c.prototype.processChunk=function(t){var e=i.transformTo(a.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var r=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+s[t[n]]>e?n:e}(e),l=e;r!==e.length&&(a.uint8array?(l=e.subarray(0,r),this.leftOver=e.subarray(r,e.length)):(l=e.slice(0,r),this.leftOver=e.slice(r,e.length))),this.push({data:n.utf8decode(l),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,i.inherits(u,r),u.prototype.processChunk=function(t){this.push({data:n.utf8encode(t.data),meta:t.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var i=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),r=t("set-immediate-shim"),s=t("./external");function l(t){return t}function c(t,e){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,n,i,a=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(n<65536?e[r++]=224|n>>>12:(e[r++]=240|n>>>18,e[r++]=128|n>>>12&63),e[r++]=128|n>>>6&63),e[r++]=128|63&n);return e},n.buf2binstring=function(t){return l(t,t.length)},n.binstring2buf=function(t){for(var e=new i.Buf8(t.length),n=0,a=e.length;n>10&1023,c[i++]=56320|1023&a)}return l(c,i)},n.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+r[t[n]]>e?n:e}},{"./common":41}],43:[function(t,e,n){"use strict";e.exports=function(t,e,n,i){for(var a=65535&t|0,o=t>>>16&65535|0,r=0;0!==n;){for(n-=r=2e3>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e,n,a){var o=i,r=a+n;t^=-1;for(var s=a;s>>8^o[255&(t^e[s])];return-1^t}},{}],46:[function(t,e,n){"use strict";var i,a=t("../utils/common"),o=t("./trees"),r=t("./adler32"),s=t("./crc32"),l=t("./messages"),c=-2,u=258,h=262,d=113;function f(t,e){return t.msg=l[e],e}function b(t){return(t<<1)-(4t.avail_out&&(n=t.avail_out),0!==n&&(a.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function v(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,m(t.strm)}function p(t,e){t.pending_buf[t.pending++]=e}function _(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function y(t,e){var n,i,a=t.max_chain_length,o=t.strstart,r=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-h?t.strstart-(t.w_size-h):0,c=t.window,d=t.w_mask,f=t.prev,b=t.strstart+u,g=c[o+r-1],m=c[o+r];t.prev_length>=t.good_match&&(a>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(n=e)+r]===m&&c[n+r-1]===g&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&ol&&0!=--a);return r<=t.lookahead?r:t.lookahead}function x(t){var e,n,i,o,l,c,u,d,f,b,g=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=g+(g-h)){for(a.arraySet(t.window,t.window,g,g,0),t.match_start-=g,t.strstart-=g,t.block_start-=g,e=n=t.hash_size;i=t.head[--e],t.head[e]=g<=i?i-g:0,--n;);for(e=n=g;i=t.prev[--e],t.prev[e]=g<=i?i-g:0,--n;);o+=g}if(0===t.strm.avail_in)break;if(u=t.window,d=t.strstart+t.lookahead,b=void 0,(f=o)<(b=(c=t.strm).avail_in)&&(b=f),n=0===b?0:(c.avail_in-=b,a.arraySet(u,c.input,c.next_in,b,d),1===c.state.wrap?c.adler=r(c.adler,u,b,d):2===c.state.wrap&&(c.adler=s(c.adler,u,b,d)),c.next_in+=b,c.total_in+=b,b),t.lookahead+=n,t.lookahead+t.insert>=3)for(t.ins_h=t.window[l=t.strstart-t.insert],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(i=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3&&t.match_length<=t.prev_length){for(a=t.strstart+t.lookahead-3,i=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=a&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(x(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+n;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,v(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-h&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&v(t,!1),1)}),new k(4,4,8,4,w),new k(4,5,16,8,w),new k(4,6,32,32,w),new k(4,4,16,16,S),new k(8,16,32,32,S),new k(8,16,128,128,S),new k(8,32,128,256,S),new k(32,128,258,1024,S),new k(32,258,258,4096,S)],n.deflateInit=function(t,e){return O(t,e,8,15,8,0)},n.deflateInit2=O,n.deflateReset=P,n.deflateResetKeep=M,n.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},n.deflate=function(t,e){var n,a,r,l;if(!t||!t.state||5>8&255),p(a,a.gzhead.time>>16&255),p(a,a.gzhead.time>>24&255),p(a,9===a.level?2:2<=a.strategy||a.level<2?4:0),p(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(p(a,255&a.gzhead.extra.length),p(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=s(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69):(p(a,0),p(a,0),p(a,0),p(a,0),p(a,0),p(a,9===a.level?2:2<=a.strategy||a.level<2?4:0),p(a,3),a.status=d);else{var h=8+(a.w_bits-8<<4)<<8;h|=(2<=a.strategy||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(h|=32),h+=31-h%31,a.status=d,_(a,h),0!==a.strstart&&(_(a,t.adler>>>16),_(a,65535&t.adler)),t.adler=1}if(69===a.status)if(a.gzhead.extra){for(r=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>r&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),m(t),r=a.pending,a.pending!==a.pending_buf_size));)p(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>r&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=73)}else a.status=73;if(73===a.status)if(a.gzhead.name){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),m(t),r=a.pending,a.pending===a.pending_buf_size)){l=1;break}l=a.gzindexr&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),0===l&&(a.gzindex=0,a.status=91)}else a.status=91;if(91===a.status)if(a.gzhead.comment){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),m(t),r=a.pending,a.pending===a.pending_buf_size)){l=1;break}l=a.gzindexr&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),0===l&&(a.status=103)}else a.status=103;if(103===a.status&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&m(t),a.pending+2<=a.pending_buf_size&&(p(a,255&t.adler),p(a,t.adler>>8&255),t.adler=0,a.status=d)):a.status=d),0!==a.pending){if(m(t),0===t.avail_out)return a.last_flush=-1,0}else if(0===t.avail_in&&b(e)<=b(n)&&4!==e)return f(t,-5);if(666===a.status&&0!==t.avail_in)return f(t,-5);if(0!==t.avail_in||0!==a.lookahead||0!==e&&666!==a.status){var y=2===a.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(x(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(a,e):3===a.strategy?function(t,e){for(var n,i,a,r,s=t.window;;){if(t.lookahead<=u){if(x(t),t.lookahead<=u&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(n=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(a,e):i[a.level].func(a,e);if(3!==y&&4!==y||(a.status=666),1===y||3===y)return 0===t.avail_out&&(a.last_flush=-1),0;if(2===y&&(1===e?o._tr_align(a):5!==e&&(o._tr_stored_block(a,0,0,!1),3===e&&(g(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),m(t),0===t.avail_out))return a.last_flush=-1,0}return 4!==e?0:a.wrap<=0?1:(2===a.wrap?(p(a,255&t.adler),p(a,t.adler>>8&255),p(a,t.adler>>16&255),p(a,t.adler>>24&255),p(a,255&t.total_in),p(a,t.total_in>>8&255),p(a,t.total_in>>16&255),p(a,t.total_in>>24&255)):(_(a,t.adler>>>16),_(a,65535&t.adler)),m(t),0=n.w_size&&(0===s&&(g(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new a.Buf8(n.w_size),a.arraySet(d,e,f-n.w_size,n.w_size,0),e=d,f=n.w_size),l=t.avail_in,u=t.next_in,h=t.input,t.avail_in=f,t.next_in=0,t.input=e,x(n);n.lookahead>=3;){for(i=n.strstart,o=n.lookahead-2;n.ins_h=(n.ins_h<>>=y=_>>>24,b-=y,0==(y=_>>>16&255))M[o++]=65535&_;else{if(!(16&y)){if(0==(64&y)){_=g[(65535&_)+(f&(1<>>=y,b-=y),b<15&&(f+=C[i++]<>>=y=_>>>24,b-=y,!(16&(y=_>>>16&255))){if(0==(64&y)){_=m[(65535&_)+(f&(1<>>=y,b-=y,(y=o-r)>3,f&=(1<<(b-=x<<3))-1,t.next_in=i,t.next_out=o,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(t){var e;return t&&t.state?(t.total_in=t.total_out=(e=t.state).total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):l}function d(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,h(t)):l}function f(t,e){var n,i;return t&&t.state?(i=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=r.wsize?(i.arraySet(r.window,e,n-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(a<(o=r.wsize-r.wnext)&&(o=a),i.arraySet(r.window,e,n-a,o,r.wnext),(a-=o)?(i.arraySet(r.window,e,n-a,a,0),r.wnext=a,r.whave=r.wsize):(r.wnext+=o,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,n.check=o(n.check,T,2,0),v=m=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",n.mode=30;break}if(v-=4,A=8+(15&(m>>>=4)),0===n.wbits)n.wbits=A;else if(A>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(T[0]=255&m,T[1]=m>>>8&255,n.check=o(n.check,T,2,0)),v=m=0,n.mode=3;case 3:for(;v<32;){if(0===b)break t;b--,m+=u[d++]<>>8&255,T[2]=m>>>16&255,T[3]=m>>>24&255,n.check=o(n.check,T,4,0)),v=m=0,n.mode=4;case 4:for(;v<16;){if(0===b)break t;b--,m+=u[d++]<>8),512&n.flags&&(T[0]=255&m,T[1]=m>>>8&255,n.check=o(n.check,T,2,0)),v=m=0,n.mode=5;case 5:if(1024&n.flags){for(;v<16;){if(0===b)break t;b--,m+=u[d++]<>>8&255,n.check=o(n.check,T,2,0)),v=m=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(b<(w=n.length)&&(w=b),w&&(n.head&&(A=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,u,d,w,A)),512&n.flags&&(n.check=o(n.check,u,w,d)),b-=w,d+=w,n.length-=w),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===b)break t;for(w=0;A=u[d+w++],n.head&&A&&n.length<65536&&(n.head.name+=String.fromCharCode(A)),A&&w>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;v<32;){if(0===b)break t;b--,m+=u[d++]<>>=7&v,v-=7&v,n.mode=27;break}for(;v<3;){if(0===b)break t;b--,m+=u[d++]<>>=1)){case 0:n.mode=14;break;case 1:if(p(n),n.mode=20,6!==e)break;m>>>=2,v-=2;break t;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===b)break t;b--,m+=u[d++]<>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,v=m=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(w=n.length){if(b>>=5)),v-=5,n.ncode=4+(15&(m>>>=5)),m>>>=4,v-=4,286>>=3,v-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,j=s(0,n.lens,0,19,n.lencode,0,n.work,B={bits:n.lenbits}),n.lenbits=B.bits,j){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,P=65535&z,!((C=z>>>24)<=v);){if(0===b)break t;b--,m+=u[d++]<>>=C,v-=C,n.lens[n.have++]=P;else{if(16===P){for(E=C+2;v>>=C,v-=C,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}A=n.lens[n.have-1],w=3+(3&m),m>>>=2,v-=2}else if(17===P){for(E=C+3;v>>=C)),m>>>=3,v-=3}else{for(E=C+7;v>>=C)),m>>>=7,v-=7}if(n.have+w>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;w--;)n.lens[n.have++]=A}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,j=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,B={bits:n.lenbits}),n.lenbits=B.bits,j){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,j=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B={bits:n.distbits}),n.distbits=B.bits,j){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(6<=b&&258<=g){t.next_out=f,t.avail_out=g,t.next_in=d,t.avail_in=b,n.hold=m,n.bits=v,r(t,x),f=t.next_out,h=t.output,g=t.avail_out,d=t.next_in,u=t.input,b=t.avail_in,m=n.hold,v=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;M=(z=n.lencode[m&(1<>>16&255,P=65535&z,!((C=z>>>24)<=v);){if(0===b)break t;b--,m+=u[d++]<>O)])>>>16&255,P=65535&z,!(O+(C=z>>>24)<=v);){if(0===b)break t;b--,m+=u[d++]<>>=O,v-=O,n.back+=O}if(m>>>=C,v-=C,n.back+=C,n.length=P,0===M){n.mode=26;break}if(32&M){n.back=-1,n.mode=12;break}if(64&M){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&M,n.mode=22;case 22:if(n.extra){for(E=n.extra;v>>=n.extra,v-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;M=(z=n.distcode[m&(1<>>16&255,P=65535&z,!((C=z>>>24)<=v);){if(0===b)break t;b--,m+=u[d++]<>O)])>>>16&255,P=65535&z,!(O+(C=z>>>24)<=v);){if(0===b)break t;b--,m+=u[d++]<>>=O,v-=O,n.back+=O}if(m>>>=C,v-=C,n.back+=C,64&M){t.msg="invalid distance code",n.mode=30;break}n.offset=P,n.extra=15&M,n.mode=24;case 24:if(n.extra){for(E=n.extra;v>>=n.extra,v-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===g)break t;if(n.offset>(w=x-g)){if((w=n.offset-w)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}S=w>n.wnext?n.wsize-(w-=n.wnext):n.wnext-w,w>n.length&&(w=n.length),k=n.window}else k=h,S=f-n.offset,w=n.length;for(gp?(y=D[N+h[k]],B[E+h[k]]):(y=96,0),f=1<>L)+(b-=f)]=_<<24|y<<16|x|0,0!==b;);for(f=1<>=1;if(0!==f?(j&=f-1,j+=f):j=0,k++,0==--z[S]){if(S===M)break;S=e[n+h[k]]}if(P>>7)]}function x(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function w(t,e,n){t.bi_valid>16-n?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<>>=1,n<<=1,0<--e;);return n>>>1}function C(t,e,n){var i,a,o=new Array(16),r=0;for(i=1;i<=15;i++)o[i]=r=r+n[i-1]<<1;for(a=0;a<=e;a++){var s=t[2*a+1];0!==s&&(t[2*a]=k(o[s]++,s))}}function M(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function P(t){8>1;1<=n;n--)L(t,o,n);for(a=l;n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],L(t,o,1),i=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=i,o[2*a]=o[2*n]+o[2*i],t.depth[a]=(t.depth[n]>=t.depth[i]?t.depth[n]:t.depth[i])+1,o[2*n+1]=o[2*i+1]=a,t.heap[1]=a++,L(t,o,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,i,a,o,r,s,l=e.dyn_tree,c=e.max_code,u=e.stat_desc.static_tree,h=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,b=e.stat_desc.max_length,g=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(l[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<573;n++)b<(o=l[2*l[2*(i=t.heap[n])+1]+1]+1)&&(o=b,g++),l[2*i+1]=o,c>=7;i<30;i++)for(v[i]=a<<7,t=0;t<1<>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),A(t,t.l_desc),A(t,t.d_desc),r=function(t){var e;for(j(t,t.dyn_ltree,t.l_desc.max_code),j(t,t.dyn_dtree,t.d_desc.max_code),A(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),(o=t.static_len+3+7>>>3)<=(a=t.opt_len+3+7>>>3)&&(a=o)):a=o=n+5,n+4<=a&&-1!==e?z(t,e,n,i):4===t.strategy||o===a?(w(t,2+(i?1:0),3),I(t,c,u)):(w(t,4+(i?1:0),3),function(t,e,n,i){var a;for(w(t,e-257,5),w(t,n-1,5),w(t,i-4,4),a=0;a>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(d[n]+256+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},n._tr_align=function(t){w(t,2,3),S(t,256,c),function(t){16===t.bi_valid?(x(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){"use strict";e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}}])}(); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/2-es5.8c5209b5d9403bcb122b.js b/classifai-core/src/main/resources/webroot/2-es5.8c5209b5d9403bcb122b.js deleted file mode 100644 index c1f300c8c..000000000 --- a/classifai-core/src/main/resources/webroot/2-es5.8c5209b5d9403bcb122b.js +++ /dev/null @@ -1 +0,0 @@ -!function(){function t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],i=!0,a=!1,o=void 0;try{for(var r,s=t[Symbol.iterator]();!(i=(r=s.next()).done)&&(n.push(r.value),!e||n.length!==e);i=!0);}catch(l){a=!0,o=l}finally{try{i||null==s.return||s.return()}finally{if(a)throw o}}return n}(t,e)||a(t,e)||function(){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 e(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw r}}}}function n(t){if(null==t)throw new TypeError("Cannot destructure undefined")}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||a(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 a(t,e){if(t){if("string"==typeof t)return o(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)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=n-1?n-1:i+=1:i<=0?0:e-=1},this.checkAnnotationMetadataProp=function(t){var e=t.bnd_box,n=t.polygons;return null!=e?e:n},this.changeAnnotationLabel=function(t,e){var n=e.label,i=e.index;return t.map(function(t){return t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(function(t){var e=t.bnd_box,a=t.polygons,o=Object(m.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},o),{bnd_box:null==e?void 0:e.map(function(t,e){return e===i?Object.assign(Object.assign({},t),{label:n}):t}),polygons:null==a?void 0:a.map(function(t,e){return e===i?Object.assign(Object.assign({},t),{label:n}):t})})})}):t})},this.deleteAnnotation=function(t,e){return t.map(function(t){return t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(function(t){var n=t.bnd_box,i=t.polygons,a=Object(m.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},a),{bnd_box:null==n?void 0:n.filter(function(t,n){return n!==e}),polygons:null==i?void 0:i.filter(function(t,n){return n!==e})})})}):t})},this.submitLabel=function(t,e,n,a){var o=a.mainLabelRegion,r=a.subLabelRegion;return t.map(function(t){return t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(function(t){var a=t.bnd_box,s=t.polygons,l=Object(m.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},l),{bnd_box:null==a?void 0:a.map(function(t,a){return a===n?Object.assign(Object.assign({},t),{region:o,subLabel:t.subLabel&&t.subLabel.length>0?[].concat(i(t.subLabel),[{label:e,region:r}]):[{label:e,region:r}]}):t}),polygons:null==s?void 0:s.map(function(t,a){return a===n?Object.assign(Object.assign({},t),{region:o,subLabel:t.subLabel&&t.subLabel.length>0?[].concat(i(t.subLabel),[{label:e,region:r}]):[{label:e,region:r}]}):t})})})}):t})},this.removeSubLabel=function(t,e){var n=e.selectedAnnoIndex,i=e.selectedSubLabelIndex;return t.map(function(t){return t.annotation?Object.assign(Object.assign({},t),{annotation:t.annotation.map(function(t){var e=t.bnd_box,a=t.polygons,o=Object(m.b)(t,["bnd_box","polygons"]);return Object.assign(Object.assign({},o),{bnd_box:null==e?void 0:e.map(function(t,e){var a;return e===n?Object.assign(Object.assign({},t),{subLabel:null===(a=t.subLabel)||void 0===a?void 0:a.filter(function(t,e){return e!==i})}):t}),polygons:null==a?void 0:a.map(function(t,e){var a;return e===n?Object.assign(Object.assign({},t),{subLabel:null===(a=t.subLabel)||void 0===a?void 0:a.filter(function(t,e){return e!==i})}):t})})})}):t})},this.setLocalStorageProjectProgress=function(t,e){localStorage.setItem("".concat(t,"_").concat(a._imgLblApiService.imageLabellingMode),JSON.stringify({cache:e}))},this.getLocalStorageProjectProgress=function(t){var e=localStorage.getItem("".concat(t,"_").concat(a._imgLblApiService.imageLabellingMode));return e?JSON.parse(e):null},this.updateProjectProgress=function(t,e){t.forEach(function(t){var i=t.annotation;i&&(a.setLocalStorageProjectProgress(e,i),null==i||i.forEach(function(t){a._imgLblApiService.updateProjectProgress(e,t.uuid,t).pipe(Object(p.a)()).subscribe(function(t){n(t)})}))})}}).\u0275fac=function(t){return new(t||h)(S.Qb(I))},h.\u0275prov=S.Db({token:h,factory:h.\u0275fac,providedIn:"any"}),h),R=s("I7yr"),F=s("F7l1"),X=s("Iab2"),W=s("xOOu"),U=((f=function(){function n(){r(this,n)}return l(n,[{key:"exportSaveFormat",value:function(t){var e=t.saveCurrentImage,n=t.saveFormat,i=t.metadata,a=t.projectName,o=t.labelList,r=t.projectFullMetadata;return Object(m.a)(this,void 0,void 0,regeneratorRuntime.mark(function t(){var s,l,c,u,h,d,f,b,g,m,v,p,_,y,x,w,k,S,C,M,O,P,L,I,A,j=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=n,t.next="pascalVoc"===t.t0?3:"yolo"===t.t0?22:"ocr"===t.t0?41:"label"===t.t0?54:"coco"===t.t0?59:"json"===t.t0?64:72;break;case 3:if(i){t.next=5;break}return t.abrupt("return",alert("There are no metadata."));case 5:if(null==i?void 0:i.bnd_box){t.next=7;break}return t.abrupt("return",alert("There are no bounding box."));case 7:if(o){t.next=9;break}return t.abrupt("return",alert("There are no label list."));case 9:if(!e){t.next=14;break}s=this.calBoxCoorOriginalImages(i),l=this.getFileName(i.img_path),c=i.img_path,u=i.img_depth,h=i.img_ori_w,d=i.img_ori_h,f=this.generatePascalVocFormat({img_path:c,img_depth:u,img_ori_w:h,img_ori_h:d,bnd_box:s},o),b=l.split("."),this.saveFile({content:f,filename:b[0]+".xml",type:"text/xml;charset=utf-8"}),t.next=21;break;case 14:if(r){t.next=16;break}return t.abrupt("return",alert("There are no image list."));case 16:if(g=[],r.forEach(function(t){var e=(t.bnd_box?t.bnd_box.map(function(t){return t.label}):[]).some(function(t){return o.indexOf(t)>=0});if(t.bnd_box&&t.bnd_box.length>0&&e){var n=j.calBoxCoorOriginalImages(t),i=j.getFileName(t.img_path),a=t.img_path,r=t.img_depth,s=t.img_ori_w,l=t.img_ori_h,c=j.generatePascalVocFormat({img_path:a,img_depth:r,img_ori_w:s,img_ori_h:l,bnd_box:n},o),u=i.split(".");g.push({filename:u[0]+".xml",content:c})}}),g){t.next=19;break}return t.abrupt("return",alert("There are no labelling progress."));case 19:return t.next=21,this.saveAsZip(g,"pascal_voc",a);case 21:return t.abrupt("break",72);case 22:if(i){t.next=24;break}return t.abrupt("return",alert("There are no metadata."));case 24:if(null==i?void 0:i.bnd_box){t.next=26;break}return t.abrupt("return",alert("There are no bounding box."));case 26:if(o){t.next=28;break}return t.abrupt("return",alert("There are no label list."));case 28:if(!e){t.next=33;break}m=this.calBoxCoorOriginalImages(i),v=this.getFileName(i.img_path),p=i.img_ori_w,_=i.img_ori_h,y=this.generateYoloFormat(Object.assign({},{img_ori_w:p,img_ori_h:_,bnd_box:m}),o),x=v.split("."),this.saveFile({content:y,filename:x[0]+".txt",type:"text/plain;charset=utf-8"}),t.next=40;break;case 33:if(r){t.next=35;break}return t.abrupt("return",alert("There are no image list."));case 35:if(w=[],r.forEach(function(t){var e=(t.bnd_box?t.bnd_box.map(function(t){return t.label}):[]).some(function(t){return o.indexOf(t)>=0});if(t.bnd_box&&t.bnd_box.length>0&&e){var n=j.calBoxCoorOriginalImages(t),i=j.getFileName(t.img_path),a=t.img_ori_w,r=t.img_ori_h,s=j.generateYoloFormat(Object.assign({},{img_ori_w:a,img_ori_h:r,bnd_box:n}),o),l=i.split(".");w.push({filename:l[0]+".txt",content:s})}}),w){t.next=38;break}return t.abrupt("return",alert("There are no labelling progress."));case 38:return t.next=40,this.saveAsZip(w,n,a);case 40:return t.abrupt("break",72);case 41:if(i){t.next=43;break}return t.abrupt("return",alert("There are no metadata."));case 43:if(null==i?void 0:i.bnd_box){t.next=45;break}return t.abrupt("return",alert("There are no bounding box."));case 45:if(r){t.next=47;break}return t.abrupt("return",alert("There are no image list."));case 47:if(o){t.next=49;break}return t.abrupt("return",alert("There are no image list."));case 49:if(k="",r.forEach(function(t,e){0===e&&(k+="filename,x1,y1,x2,y2,label\n");var n=j.calBoxCoorOriginalImages(t),i=j.getFileName(t.img_path),a=j.generateOCRFormat({bnd_box:n},i,o);k+=""+a}),k){t.next=52;break}return t.abrupt("return",alert("There are no labelling progress."));case 52:return this.saveFile({content:k,filename:a+"_text_ocr_labels.csv",type:"text/csv;charset=utf-8"}),t.abrupt("break",72);case 54:if(o){t.next=56;break}return t.abrupt("return",alert("There are no label list."));case 56:return S=a+"_label.txt",C=this.generateLabelFormat(o),this.saveFile({content:C,filename:S,type:"text/plain;charset=utf-8"}),t.abrupt("break",72);case 59:if(r){t.next=61;break}return t.abrupt("return",alert("There are no image list."));case 61:return M=this.calPolyCoorOriginalImages(r),O=this.getCocoContent(M,o),P=this.getCocoFileName(a),this.saveFile({content:O,filename:P,type:"text/json;charset=utf-8"}),t.abrupt("break",72);case 64:if(i){t.next=66;break}return t.abrupt("return",alert("There are no metadata."));case 66:if(null==i?void 0:i.polygons){t.next=68;break}return t.abrupt("return",alert("There are no polygon."));case 68:if(r){t.next=70;break}return t.abrupt("return",alert("There are no image list."));case 70:L=this.calPolyCoorOriginalImages(r),I=this.getJsonContent(L),A=this.getJsonFileName(a),this.saveFile({content:I,filename:A,type:"text/json;charset=utf-8"});case 72:case"end":return t.stop()}},t,this)}))}},{key:"calBoxCoorOriginalImages",value:function(t){var e=t.bnd_box,n=t.img_w,i=t.img_h,a=t.img_ori_w,o=t.img_ori_h,r=a/n,s=o/i;return e.map(function(t){var e=Object(m.b)(t,["subLabel","region"]),n=t.distancetoImg.x*r,i=n+(t.x2-t.x1)*r,a=t.distancetoImg.y*s,o=a+(t.y2-t.y1)*s;return Object.assign(Object.assign({},e),{x1:n,x2:i,y1:a,y2:o})})}},{key:"calPolyCoorOriginalImages",value:function(t){return t.map(function(t){var e=t.img_ori_w,n=t.img_ori_h,i=t.img_w,a=t.img_h,o=t.polygons,r=Object(m.b)(t,["img_ori_w","img_ori_h","img_w","img_h","polygons"]),s=e/i,l=n/a,c=o.filter(function(t){return t.coorPt.map(function(t){var e=t.distancetoImg;return{distancetoImg:e,x:e.x*s,y:e.y*l}})});return Object.assign(Object.assign({},r),{img_ori_w:e,img_ori_h:n,img_w:i,img_h:a,polygons:c})})}},{key:"generatePascalVocFormat",value:function(n,i){var a=n.bnd_box,o=n.img_path,r=n.img_depth,s=n.img_ori_w,l=n.img_ori_h,c="\n",u=this.getItemName("file",o),h=this.getItemName("folder",o),d=this.createNode("folder");c+="\t"+d[0]+h+d[1];var f=this.createNode("filename");c+="\t"+f[0]+u+f[1];var b=this.createNode("path");c+="\t"+b[0]+o.split("\\").join("/")+b[1];var g=this.createNode("source"),m=this.createNode("database");c+="\t"+g[0]+"\n",c+="\t\t"+m[0]+"unknown"+m[1],c+="\t"+g[1];var v=this.createNode("size");c+="\t"+v[0]+"\n";var p=this.createNode("width"),_=this.createNode("height"),y=this.createNode("depth");c+="\t\t"+p[0]+s.toString()+p[1],c+="\t\t"+_[0]+l.toString()+_[1],c+="\t\t"+y[0]+(null==r?void 0:r.toString())+y[1],c+="\t"+v[1];var x=this.createNode("segmented");c+="\t"+x[0]+"0"+x[1];var w,k=this.createNode("object"),S=e(a.entries());try{for(S.s();!(w=S.n()).done;){var C=t(w.value,2),M=(C[0],C[1]),O=M.label,P=M.x1,L=M.x2,I=M.y1,A=M.y2;if(-1!==i.indexOf(O)){c+="\t"+k[0]+"\n";var j=this.createNode("name"),B=this.createNode("pose"),z=this.createNode("truncated"),E=this.createNode("difficult"),T=this.createNode("bndbox"),D=this.createNode("xmin"),N=this.createNode("ymin"),R=this.createNode("xmax"),F=this.createNode("ymax");c+="\t\t"+j[0]+O+j[1],c+="\t\t"+B[0]+"Unspecified"+B[1],c+="\t\t"+z[0]+"0"+z[1],c+="\t\t"+E[0]+"0"+E[1],c+="\t\t"+T[0]+"\n",c+="\t\t\t"+D[0]+Math.floor(P).toString()+D[1],c+="\t\t\t"+N[0]+Math.floor(I).toString()+N[1],c+="\t\t\t"+R[0]+Math.floor(L).toString()+R[1],c+="\t\t\t"+F[0]+Math.floor(A).toString()+F[1],c+="\t\t"+T[1],c+="\t"+k[1]}}}catch(X){S.e(X)}finally{S.f()}return c+=""}},{key:"generateYoloFormat",value:function(t,e){var n=t.bnd_box,i=t.img_ori_w,a=t.img_ori_h;return n.reduce(function(t,o,r){var s=o.x1,l=o.x2,c=o.y1,u=o.y2,h=o.label;if(-1===e.indexOf(h))return t;var d=(s+l)/2,f=(c+u)/2,b=l-s,g=u-c;return t+=e.indexOf(h).toString()+" ",t+="".concat((d/i).toString()," ").concat((f/a).toString()," "),t+="".concat((b/i).toString()," ").concat((g/a).toString()," "),r!==n.length&&(t+="\n"),t},"")}},{key:"generateOCRFormat",value:function(t,e,n){return t.bnd_box.reduce(function(t,i){var a=i.x1,o=i.x2,r=i.y1,s=i.y2,l=i.label;return-1===n.indexOf(l)?(t+="".concat(e,",").concat(a.toString(),",").concat(r.toString()),t+=",".concat(o.toString(),",").concat(s.toString(),",").concat(l.toString(),"\n")):t},"")}},{key:"getItemName",value:function(t,e){var n=e.split("\\").join("/").split("/");return"folder"===t?(n.pop(),n.join("/")):n[n.length-1]}},{key:"createNode",value:function(t){return["<"+t+">","\n"]}},{key:"generateLabelFormat",value:function(t){return t.reduce(function(t,e,n){return n!==(t+=e).length?t+"\n":t},"")}},{key:"saveFile",value:function(t){var e=t.content,n=t.filename,i=t.type,a=new Blob([e],{type:i});X.saveAs(a,n)}},{key:"saveAsZip",value:function(n,i,a){return Object(m.a)(this,void 0,void 0,regeneratorRuntime.mark(function o(){var r,s,l,c,u,h,d,f;return regeneratorRuntime.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:r=new W,s=e(n.entries());try{for(s.s();!(l=s.n()).done;)(c=t(l.value,2))[0],u=c[1],h=u.content,d=u.filename,r.file(d,h)}catch(b){s.e(b)}finally{s.f()}return o.next=5,r.generateAsync({type:"blob"});case 5:f=o.sent,X.saveAs(f,"".concat(a,"_").concat(i,"_labels.zip"));case 7:case"end":return o.stop()}},o)}))}},{key:"getFileName",value:function(t){var e=t.split("\\").join("/").split("/");return e[e.length-1]}},{key:"getCocoFileName",value:function(t){return t+"_segmentation_coco.json"}},{key:"getJsonFileName",value:function(t){return t+"_segmentation_JSON.json"}},{key:"getCocoContent",value:function(t,e){var n="{";return n+=this.generateCocoInfo(),n+=this.generateCocoImage(t),n+=this.generateCocoAnnotation(t,e),n+=this.generateCocoLicense(),n+=this.generateCocoCategory(e),n=(n+="}").replace(/(}{)/gi,"},{")}},{key:"generateCocoInfo",value:function(){var t=new Date,e='"info":{';return e+='year:"'.concat(t.getFullYear().toString(),'",'),e+='version:"1.0",',e+='description:"VIA project exported to COCO format using classifai(https://classifai.ai/)",',e+='contributor:"",',e+='url:"https://classifai.ai/",',e+='date_created:"'.concat(t.toUTCString(),'"'),e+="},"}},{key:"generateCocoImage",value:function(t){var e=this,n="images:[";return n+=t.reduce(function(n,i,a){var o=i.img_ori_w,r=i.img_ori_h,s=i.img_path;return n+="{id:".concat((a+1).toString(),","),n+="width:".concat(o.toString(),","),n+="height:".concat(r.toString(),","),n+='file_name:"'.concat(e.getFileName(s),'",'),n+="license:0,",n+='date_captured:""}',a!==t.length&&(n+=","),n},""),n+="],"}},{key:"generateCocoAnnotation",value:function(t,e){var n=this,i="annotations:[",a=0;return i+=t.reduce(function(i,o,r){return o.polygons.length>0&&(a+=1,i+=n.calPolyCoorOriginalImages(t).map(function(t){return t.polygons})[0].reduce(function(t,i,o){var s=i.coorPt,l=i.label,c=Object(m.b)(i,["coorPt","label"]);t+="{segmentation:[",s.length>0&&(t+="[",t+=s.reduce(function(t,e,n){var i=e.x,a=e.y;return t+=i.toString()+",",t+=""+a.toString(),n!==s.length-1&&(t+=","),t},""),t+="]");var u=n.getPolyBBox(Object.assign({coorPt:s,label:l},c));return u&&(t+="],",t+="area:".concat(((u.x2-u.x1)*(u.y2-u.y1)).toString(),","),t+="bbox:[".concat(u.x1.toString(),",").concat(u.y1.toString(),",").concat((u.x2-u.x1).toString(),",").concat((u.y2-u.y1).toString(),"],"),t+="iscrowd:0,",t+="id:".concat(a.toString(),","),t+="image_id:".concat((r+1).toString(),","),t+="category_id:".concat(null==e?void 0:e.indexOf(l),"}")),t},"")),i},""),i+="]",i+=","}},{key:"getPolyBBox",value:function(n){var i=n.coorPt;if(i.length>0){var a,o={x1:1e7,x2:-1e8,y1:1e7,y2:-1e8},r=e(i.entries());try{for(r.s();!(a=r.n()).done;){var s=t(a.value,2),l=(s[0],s[1]),c=l.x,u=l.y;c0?o.toString():"";return(t+=e.generateImageString(a,s,l))+"},"},""),n+="}"}},{key:"generateImageString",value:function(t,e,n){var i="'".concat(e,"':{");return i+='fileref:"",',i+='size:"'.concat(n,'",'),i+='filename:"'.concat(e,'",'),i+='base64_img_data:"",',i+="file_attributes:{},",i+="regions:{".concat(this.generateRegion(t),"}")}},{key:"generateRegion",value:function(n){if(n.length>0)return n.reduce(function(i,a,o){var r=a.coorPt,s=a.label,l=a.region,c=a.subLabel,u="[",h="[";if(r.forEach(function(t,e){var n=t.x,i=t.y;u+=n.toString(),h+=i.toString(),e===r.length-1?(u+="]",h+="]"):(u+=",",h+=",")},""),i+=o.toString()+":{",i+="shape_attributes:{name:polygon,",i+="all_points_x:".concat(u,","),i+="all_points_y:".concat(h,"},"),i+="region_attributes:{".concat(s.trim(),':"').concat(l.trim(),'"}'),i+="}",0===c.length);else{i+=",";var d,f=e(c.entries());try{for(f.s();!(d=f.n()).done;){var b=t(d.value,2),g=(b[0],b[1]),m=g.label,v=g.region;i+='"'.concat(m.trim(),'":"').concat(v.trim(),'"'),i+="},"}}catch(p){f.e(p)}finally{f.f()}}return o!==n.length-1&&(i+=","),i},"")}}]),n}()).\u0275fac=function(t){return new(t||f)},f.\u0275prov=S.Db({token:f,factory:f.\u0275fac,providedIn:"any"}),f),Y=s("x2Se"),V=((b=function(){function t(){r(this,t)}return l(t,[{key:"transform",value:function(t){return t?window.navigator.platform.startsWith("Mac")?t.split("/").slice(-1)[0]:t.split("\\").slice(-1)[0]:""}}]),t}()).\u0275fac=function(t){return new(t||b)},b.\u0275pipe=S.Gb({name:"fileNameSlice",type:b,pure:!0}),b),Z=s("sYmb");function $(t,e){if(1&t&&(S.Kb(0),S.Ib(1,"div",4),S.Mb(2,"label",6),S.oc(3),S.Wb(4,"fileNameSlice"),S.Lb(),S.Jb()),2&t){var n=S.Vb();S.xb(1),S.ac("ngClass",n._onChange.hasAnnotation?"indicator":"no-indicator"),S.xb(2),S.pc(S.Xb(4,2,n._onChange.thumbnailName))}}function H(t,e){1&t&&S.Ib(0,"label",6)}function K(t,e){if(1&t&&(S.Kb(0),S.Mb(1,"label"),S.oc(2),S.Lb(),S.Jb()),2&t){var n=S.Vb(3);S.xb(2),S.rc("",n._onChange.currentThumbnailIndex||0," / ",n._totalUuid,"")}}function J(t,e){if(1&t){var n=S.Nb();S.Kb(0),S.Mb(1,"div",8),S.Mb(2,"img",9),S.Tb("click",function(){return S.hc(n),S.Vb().$implicit.onClick()}),S.Wb(3,"translate"),S.Lb(),S.Lb(),S.Mb(4,"div",10),S.mc(5,K,3,2,"ng-container",11),S.Lb(),S.Jb()}if(2&t){var i=S.Vb(),a=i.$implicit,o=i.index,r=S.Vb();S.xb(2),S.ac("src",a.imgPath,S.jc)("alt",a.alt)("title",S.Xb(3,5,a.hoverLabel)),S.yb("data-index",o+a.alt),S.xb(3),S.ac("ngIf",r._onChange&&r._onChange.totalNumThumbnail)}}function G(t,e){if(1&t){var n=S.Nb();S.Mb(0,"div",8),S.Mb(1,"img",9),S.Tb("click",function(){return S.hc(n),S.Vb().$implicit.onClick()}),S.Wb(2,"translate"),S.Lb(),S.Lb()}if(2&t){var i=S.Vb(),a=i.$implicit,o=i.index;S.xb(1),S.ac("src",a.imgPath,S.jc)("alt",a.alt)("title",S.Xb(2,4,a.hoverLabel)),S.yb("data-index",o+a.alt)}}function q(t,e){if(1&t&&(S.Kb(0),S.mc(1,J,6,7,"ng-container",2),S.mc(2,G,3,6,"ng-template",null,7,S.nc),S.Jb()),2&t){var n=e.index,i=S.fc(3);S.xb(1),S.ac("ngIf",0===n)("ngIfElse",i)}}function Q(t,e){if(1&t&&(S.Kb(0),S.Mb(1,"div",8),S.Mb(2,"img",9),S.Tb("click",function(){return e.$implicit.onClick()}),S.Wb(3,"translate"),S.Lb(),S.Lb(),S.Jb()),2&t){var n=e.$implicit,i=e.index;S.xb(2),S.ac("src",n.imgPath,S.jc)("alt",n.alt)("title",S.Xb(3,4,n.hoverLabel)),S.yb("data-index",i+n.alt)}}var tt,et=((tt=function(){function t(){var e=this;r(this,t),this._totalUuid=0,this._tabStatus=[],this._onClick=new S.n,this.isTabStillOpen=!0,this.bindImagePath=function(){e.jsonSchema={logosCenter:[{imgPath:"../../../assets/icons/previous.svg",hoverLabel:"labellingInfo.previous",alt:"Previous",onClick:function(){return e.emitParentEvent({thumbnailAction:-1})}},{imgPath:"../../../assets/icons/next.svg",hoverLabel:"labellingInfo.next",alt:"Next",onClick:function(){return e.emitParentEvent({thumbnailAction:1})}}],logosEnd:[{imgPath:"../../../assets/icons/undo.svg",hoverLabel:"labellingInfo.undo",alt:"Undo",onClick:function(){return null}},{imgPath:"../../../assets/icons/redo.svg",hoverLabel:"labellingInfo.redo",alt:"Redo",onClick:function(){return null}}]}},this.emitParentEvent=function(t){var n=t.url,i=t.thumbnailAction;e._onClick.emit({url:n,thumbnailAction:i})}}return l(t,[{key:"ngOnInit",value:function(){this.bindImagePath()}},{key:"ngOnChanges",value:function(t){if(t._onChange){var n=t._onChange.currentValue.totalNumThumbnail;this._onChange.totalNumThumbnail=n,this.bindImagePath()}if(t._tabStatus){this.isTabStillOpen=!1;var i,a=e(this._tabStatus);try{for(a.s();!(i=a.n()).done;)if(!i.value.closed){this.isTabStillOpen=!0;break}}catch(o){a.e(o)}finally{a.f()}}}}]),t}()).\u0275fac=function(t){return new(t||tt)},tt.\u0275cmp=S.Bb({type:tt,selectors:[["image-labelling-info"]],inputs:{_totalUuid:"_totalUuid",_onChange:"_onChange",_tabStatus:"_tabStatus"},outputs:{_onClick:"_onClick"},features:[S.vb],decls:9,vars:6,consts:[[1,"header-container"],[1,"container-flex-start"],[4,"ngIf","ngIfElse"],["defaultName",""],[3,"ngClass"],[4,"ngFor","ngForOf"],[1,"imageTitle"],["renderOtherIcons",""],[1,"utility-icon-container"],[1,"utility-icon-light",3,"src","alt","title","click"],[1,"totalThumbnail"],[4,"ngIf"]],template:function(t,e){if(1&t&&(S.Mb(0,"div",0),S.Mb(1,"div",1),S.mc(2,$,5,4,"ng-container",2),S.mc(3,H,1,0,"ng-template",null,3,S.nc),S.Lb(),S.Mb(5,"div",4),S.mc(6,q,4,2,"ng-container",5),S.Lb(),S.Mb(7,"div",4),S.mc(8,Q,4,6,"ng-container",5),S.Lb(),S.Lb()),2&t){var n=S.fc(4);S.xb(2),S.ac("ngIf",e._onChange.thumbnailName)("ngIfElse",n),S.xb(3),S.ac("ngClass",e.isTabStillOpen?"container-flex-center":"container-flex-center-adjust"),S.xb(1),S.ac("ngForOf",e.jsonSchema.logosCenter),S.xb(1),S.ac("ngClass",e.isTabStillOpen?"container-flex-end":"container-flex-end-adjust"),S.xb(1),S.ac("ngForOf",e.jsonSchema.logosEnd)}},directives:[g.k,g.i,g.j],pipes:[V,Z.c],styles:[".header-container[_ngcontent-%COMP%]{min-width:100vw;max-width:100vw;min-height:4vh;max-height:4vh;background:#525353;border-bottom:.0625vw solid hsla(0,0%,100%,.25);display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;z-index:1000;position:absolute}.container-flex-start[_ngcontent-%COMP%]{margin-left:3vw}.container-flex-center[_ngcontent-%COMP%], .container-flex-start[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;min-height:inherit;max-height:inherit}.container-flex-center[_ngcontent-%COMP%]{margin-left:8vw}.container-flex-end[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;margin-right:19vw}.container-flex-center-adjust[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;margin-left:2vw;-webkit-align-items:center;align-items:center;min-height:inherit;max-height:inherit}.container-flex-end-adjust[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;margin-right:3vw}.logo-container[_ngcontent-%COMP%]{min-width:2.2vw;max-width:2.2vw}.logo[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:2.2vh;max-height:2.2vh;padding:.3vw;position:fixed;cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active, .utility-icon-light[_ngcontent-%COMP%]:focus{background:#a9a9a9}.position-absolute[_ngcontent-%COMP%]{position:absolute}.utility-icon-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;min-height:3.5vh;max-height:3.5vh;min-width:2vw;max-width:2vw}.totalThumbnail[_ngcontent-%COMP%]{font-size:1.7vh;padding:.4vw 1vw 0;display:inline-block;color:#fff;width:-webkit-fit-content;width:fit-content}.img-container[_ngcontent-%COMP%]:hover .img-description[_ngcontent-%COMP%]{visibility:visible;opacity:1}.imageTitle[_ngcontent-%COMP%]{font-size:1.7vh;color:#fff;-webkit-align-items:center;align-items:center;margin-left:1vw;max-width:20vw;min-width:20vw;position:absolute;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.indicator[_ngcontent-%COMP%]{background-color:#75fe7c}.indicator[_ngcontent-%COMP%], .no-indicator[_ngcontent-%COMP%]{height:1vh;width:.5vw;border-radius:50%;position:aboslute}.no-indicator[_ngcontent-%COMP%]{background-color:#ffba54}.horizontal-line[_ngcontent-%COMP%]{padding:1vh 0;margin:0 1vw;border:.01rem solid #707070}"],changeDetection:0}),tt),nt=s("oSzE"),it=s("DlmY");function at(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new it.a;++es))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var u=-1,h=!0,d=2&n?new ot:void 0;for(o.set(t,e),o.set(e,t);++u0){this.redoArr.push(this.removeLastArray(this.currentArr));var t=this.removeLastArray(this.undoArr);return this.currentArr.push(t),this.allowUndo=0!==this.undoArr.length,t}return null}},{key:"redo",value:function(){var t=null;return 0!==this.redoArr.length&&(this.undoArr.push(this.removeLastArray(this.currentArr)),t=this.removeLastArray(this.redoArr),this.currentArr.push(t),this.allowRedo=0!==this.redoArr.length),this.allowUndo=this.undoArr.length>0,t}},{key:"clearRedundantStages",value:function(){var t,e;(null===(t=this.currentArr[0])||void 0===t?void 0:t.meta)&&"polygons"in this.currentArr[0].meta||this.undoArr.length>0&&(!this.isStateChange((null===(e=this.undoArr[this.undoArr.length-1])||void 0===e?void 0:e.meta).bnd_box)||(this.currentArr.pop(),this.currentArr.push(this.removeLastArray(this.undoArr))))}},{key:"isAllowRedo",value:function(){return this.allowRedo}},{key:"isAllowUndo",value:function(){return this.allowUndo}},{key:"isMethodChange",value:function(t){var e;return(null===(e=this.currentArr[0])||void 0===e?void 0:e.method)!==t}},{key:"replaceStages",value:function(t){t&&(this.currentArr[0]=this.utility.deepCloneVariable(t))}},{key:"isStateChange",value:function(t){return!!t&&!!(t&&this.isAnnotationChange(t)||this.isLabelChange(t))}},{key:"isLabelChange",value:function(n){var i,a,o,r;if((null===(i=this.currentArr[0])||void 0===i?void 0:i.meta)&&"polygons"in(null===(a=this.currentArr[0])||void 0===a?void 0:a.meta)){var s=n,l=(null===(o=this.currentArr[0])||void 0===o?void 0:o.meta).polygons;if(s.length!==l.length)return!0;var c,u=e(l.entries());try{for(u.s();!(c=u.n()).done;){var h=t(c.value,2);h[0],h[1].label}}catch(_){u.e(_)}finally{u.f()}}else{var d=n,f=(null===(r=this.currentArr[0])||void 0===r?void 0:r.meta).bnd_box;if(d.length!==f.length)return!0;var b,g=e(f.entries());try{for(g.s();!(b=g.n()).done;){var m=t(b.value,2),v=m[0],p=m[1].label;if(d[v].label!==p)return!0}}catch(_){g.e(_)}finally{g.f()}}return!1}},{key:"isAnnotationChange",value:function(n){var i,a,o,r;if((null===(i=this.currentArr[0])||void 0===i?void 0:i.meta)&&"polygons"in(null===(a=this.currentArr[0])||void 0===a?void 0:a.meta)){if(this.currentArr.length<1)return!0;var s=n,l=(null===(o=this.currentArr[0])||void 0===o?void 0:o.meta).polygons;return s.length!==l.length||!!l.some(function(t,e){var n=t.coorPt;return s.some(function(t,i){var a=t.coorPt;return n[e].x!==a[i].x||n[e].y!==a[i].y})})||null}if(this.currentArr.length<1)return!0;var c=n,u=(null===(r=this.currentArr[0])||void 0===r?void 0:r.meta).bnd_box;if(c.length!==u.length)return!0;var h,d=e(c.entries());try{for(d.s();!(h=d.n()).done;){var f=t(h.value,2),b=f[0],g=f[1],m=g.x1,v=g.x2,p=g.y1,_=g.y2,y=g.label;if(Math.ceil(m)!==Math.ceil(u[b].x1)||Math.ceil(v)!==Math.ceil(u[b].x2)||Math.ceil(p)!==Math.ceil(u[b].y1)||Math.ceil(_)!==Math.ceil(u[b].y2)||y!==u[b].label)return!0}}catch(x){d.e(x)}finally{d.f()}return!1}}]),n}()).\u0275fac=function(t){return new(t||It)},It.\u0275prov=S.Db({token:It,factory:It.\u0275fac,providedIn:"any"}),It),Et=((Lt=function(){function t(e){var n=this;r(this,t),this.el=e,this.srcAttr=null,this.canLazyLoad=function(){return window&&"IntersectionObserver"in window},this.lazyLoadImage=function(){new IntersectionObserver(function(t){t.forEach(function(t){t.isIntersecting?n.loadImage():n.unloadImage()})}).observe(n.el.nativeElement)},this.loadImage=function(){n.srcAttr=n.src},this.unloadImage=function(){n.srcAttr=""}}return l(t,[{key:"ngAfterViewInit",value:function(){this.canLazyLoad()?this.lazyLoadImage():this.loadImage()}}]),t}()).\u0275fac=function(t){return new(t||Lt)(S.Hb(S.l))},Lt.\u0275dir=S.Cb({type:Lt,selectors:[["img","imgLazyLoad",""]],hostVars:1,hostBindings:function(t,e){2&t&&S.yb("src",e.srcAttr,S.jc)},inputs:{src:"src"}}),Lt),Tt=s("3Pt+"),Dt=["thumbnailList"];function Nt(t,e){if(1&t){var n=S.Nb();S.Kb(0),S.Mb(1,"div",12),S.Tb("click",function(){S.hc(n);var t=e.$implicit,i=e.index;return S.Vb(4).onClick(t,i)}),S.Mb(2,"div",13),S.Ib(3,"img",14),S.Lb(),S.Mb(4,"div",15),S.Mb(5,"label",16),S.oc(6),S.Wb(7,"fileNameSlice"),S.Lb(),S.Lb(),S.Mb(8,"div"),S.Ib(9,"div",17),S.Lb(),S.Lb(),S.Jb()}if(2&t){var i=e.$implicit;S.xb(3),S.ac("src",i.img_thumbnail,S.jc),S.xb(3),S.pc(S.Xb(7,3,i.img_path)),S.xb(3),S.ac("ngClass",(null==i.bnd_box?null:i.bnd_box.length)>0||(null==i.polygons?null:i.polygons.length)>0?"indicator":"no-indicator")}}function Rt(t,e){if(1&t){var n=S.Nb();S.Kb(0),S.Mb(1,"div",5),S.Mb(2,"label",6),S.oc(3),S.Wb(4,"translate"),S.Lb(),S.Mb(5,"div",7),S.Mb(6,"span",8),S.Mb(7,"div",9),S.Tb("click",function(){S.hc(n);var t=S.Vb().$implicit;return S.Vb(2).onClose(t)}),S.oc(8,"\u2716"),S.Lb(),S.Lb(),S.Lb(),S.Mb(9,"div",10,11),S.Tb("scroll",function(){return S.hc(n),S.Vb(3).mouseScroll()}),S.mc(11,Nt,10,5,"ng-container",2),S.Lb(),S.Lb(),S.Jb()}if(2&t){var i=S.Vb(),a=i.$implicit,o=i.index,r=S.Vb(2);S.xb(1),S.ac("ngClass",r.checkCloseToggle(a)),S.yb("data-index",o),S.xb(2),S.sc("",S.Xb(4,6,a.name)," (",r._thumbnailList.length,"/",r._totalUuid,")"),S.xb(8),S.ac("ngForOf",r._thumbnailList)}}function Ft(t,e){if(1&t){var n=S.Nb();S.Kb(0),S.Mb(1,"span",29),S.Tb("click",function(){S.hc(n);var t=S.Vb().$implicit;return S.Vb(5).onDeleteLabel(t)}),S.oc(2,"-"),S.Lb(),S.Jb()}if(2&t){var i=S.Vb(6);S.xb(1),S.ac("ngClass",i.clickAbilityToggle?"pointer":null)}}function Xt(t,e){if(1&t){var n=S.Nb();S.Kb(0),S.Mb(1,"div",24),S.Mb(2,"label",25),S.Mb(3,"div",26),S.Tb("click",function(){S.hc(n);var t=e.$implicit,i=S.Vb(5);return i.clickAbilityToggle?i.onClickLabel(t):null}),S.oc(4),S.Lb(),S.Lb(),S.Mb(5,"label",27),S.mc(6,Ft,3,1,"ng-container",28),S.Lb(),S.Lb(),S.Jb()}if(2&t){var i=e.$implicit,a=S.Vb(5);S.xb(1),S.ac("ngClass",i===a.selectedLabel?"label-active":null),S.xb(2),S.ac("ngClass",a.clickAbilityToggle?"pointer":null),S.xb(1),S.qc(" ",i," "),S.xb(2),S.ac("ngIf",i===a.selectedLabel)}}function Wt(t,e){1&t&&(S.Mb(0,"label",30),S.oc(1),S.Wb(2,"translate"),S.Lb()),2&t&&(S.xb(1),S.qc(" ",S.Xb(2,1,"labellingProject.labelNotExist")," "))}function Ut(t,e){if(1&t){var n=S.Nb();S.Kb(0),S.Mb(1,"div",5),S.Mb(2,"label",6),S.oc(3),S.Wb(4,"translate"),S.Lb(),S.Mb(5,"div",7),S.Mb(6,"span",8),S.Mb(7,"div",9),S.Tb("click",function(){S.hc(n);var t=S.Vb(2).$implicit;return S.Vb(2).onClose(t)}),S.oc(8,"\u2716"),S.Lb(),S.Lb(),S.Lb(),S.Mb(9,"div",19),S.Mb(10,"input",20),S.Tb("ngModelChange",function(t){return S.hc(n),S.Vb(4).inputLabel=t})("ngModelChange",function(t){return S.hc(n),S.Vb(4).inputLabelChange(t)})("keydown.enter",function(t){return S.hc(n),S.Vb(4).validateInputLabel(t)}),S.Wb(11,"translate"),S.Lb(),S.Lb(),S.Mb(12,"div",21),S.Mb(13,"div",22),S.mc(14,Xt,7,4,"ng-container",2),S.mc(15,Wt,3,3,"label",23),S.Lb(),S.Lb(),S.Lb(),S.Jb()}if(2&t){var i=S.Vb(2),a=i.$implicit,o=i.index,r=S.Vb(2);S.xb(1),S.ac("ngClass",r.checkCloseToggle(a)),S.yb("data-index",o),S.xb(2),S.pc(S.Xb(4,8,a.name)),S.xb(7),S.ac("ngClass",r.invalidInput?"input-invalid":null)("ngModel",r.inputLabel)("placeholder",S.Xb(11,10,"labellingProject.enterLabel")),S.xb(4),S.ac("ngForOf",r.labelList),S.xb(1),S.ac("ngIf",0===r.labelList.length)}}function Yt(t,e){if(1&t){var n=S.Nb();S.Mb(0,"div",36),S.Tb("click",function(){return S.hc(n),S.Vb(9).onDeleteAnnotation()}),S.oc(1," - "),S.Lb()}if(2&t){var i=S.Vb(9);S.ac("ngClass",i.clickAbilityToggle?"pointer":null)}}function Vt(t,e){if(1&t){var n=S.Nb();S.Kb(0),S.Mb(1,"label",34),S.Tb("click",function(){S.hc(n);var t=e.index,i=e.$implicit,a=S.Vb(8);return a.clickAbilityToggle?a.onClickAnnotation(t,i):null}),S.Mb(2,"div",17),S.oc(3),S.Lb(),S.mc(4,Yt,2,1,"div",35),S.Lb(),S.Jb()}if(2&t){var i=e.$implicit,a=e.index,o=S.Vb(8);S.xb(1),S.ac("ngClass",a===o.selectedIndexAnnotation?"annotation-active":null),S.yb("data-index",a),S.xb(1),S.ac("ngClass",o.clickAbilityToggle?"pointer":null),S.xb(1),S.rc(" ",i.label," : ",i.id," "),S.xb(1),S.ac("ngIf",a===o.selectedIndexAnnotation)}}function Zt(t,e){if(1&t&&(S.Kb(0),S.mc(1,Vt,5,6,"ng-container",2),S.Jb()),2&t){var n=S.Vb().$implicit;S.xb(1),S.ac("ngForOf",n.bnd_box)}}function $t(t,e){if(1&t){var n=S.Nb();S.Kb(0),S.Mb(1,"label",34),S.Tb("click",function(){S.hc(n);var t=e.index,i=e.$implicit,a=S.Vb(8);return a.clickAbilityToggle?a.onClickAnnotation(t,i):null}),S.Mb(2,"div",17),S.oc(3),S.Lb(),S.Lb(),S.Jb()}if(2&t){var i=e.$implicit,a=e.index,o=S.Vb(8);S.xb(1),S.ac("ngClass",a===o.selectedIndexAnnotation?"annotation-active":null),S.yb("data-index",a),S.xb(1),S.ac("ngClass",o.clickAbilityToggle?"pointer":null),S.xb(1),S.rc(" ",i.label," : ",i.id," ")}}function Ht(t,e){if(1&t&&S.mc(0,$t,4,5,"ng-container",2),2&t){var n=S.Vb().$implicit;S.ac("ngForOf",n.polygons)}}function Kt(t,e){if(1&t&&(S.Kb(0),S.mc(1,Zt,2,1,"ng-container",3),S.mc(2,Ht,1,1,"ng-template",null,33,S.nc),S.Jb()),2&t){var n=e.$implicit,i=S.fc(3);S.xb(1),S.ac("ngIf",n.bnd_box)("ngIfElse",i)}}function Jt(t,e){if(1&t&&(S.Kb(0),S.mc(1,Kt,4,2,"ng-container",2),S.Jb()),2&t){var n=S.Vb(3).$implicit;S.xb(1),S.ac("ngForOf",n.annotation)}}function Gt(t,e){if(1&t){var n=S.Nb();S.Mb(0,"div",5),S.Mb(1,"label",6),S.oc(2),S.Wb(3,"translate"),S.Lb(),S.Mb(4,"div",7),S.Mb(5,"span",8),S.Mb(6,"div",9),S.Tb("click",function(){S.hc(n);var t=S.Vb(2).$implicit;return S.Vb(2).onClose(t)}),S.oc(7,"\u2716"),S.Lb(),S.Lb(),S.Lb(),S.Mb(8,"div",31),S.Mb(9,"div",22),S.Mb(10,"div",32),S.mc(11,Jt,2,1,"ng-container",28),S.Lb(),S.Lb(),S.Lb(),S.Lb()}if(2&t){var i=S.Vb(2),a=i.$implicit,o=i.index,r=S.Vb(2);S.ac("ngClass",r.checkCloseToggle(a)),S.yb("data-index",o),S.xb(2),S.pc(S.Xb(3,4,a.name)),S.xb(9),S.ac("ngIf",null==a?null:a.annotation)}}function qt(t,e){if(1&t&&(S.mc(0,Ut,16,12,"ng-container",3),S.mc(1,Gt,12,6,"ng-template",null,18,S.nc)),2&t){var n=S.fc(2),i=S.Vb().index;S.ac("ngIf",1===i)("ngIfElse",n)}}function Qt(t,e){if(1&t&&(S.Kb(0),S.mc(1,Rt,12,8,"ng-container",3),S.mc(2,qt,3,2,"ng-template",null,4,S.nc),S.Jb()),2&t){var n=e.index,i=S.fc(3);S.xb(1),S.ac("ngIf",0===n)("ngIfElse",i)}}function te(t,e){if(1&t&&(S.Mb(0,"div",1),S.mc(1,Qt,4,2,"ng-container",2),S.Lb()),2&t){var n=S.Vb();S.xb(1),S.ac("ngForOf",n._tabStatus)}}var ee,ne=((ee=function(){function n(e,a,o,s){var l=this;r(this,n),this._annotateService=e,this._imgLblState=a,this._languageService=o,this._undoRedoService=s,this._totalUuid=0,this._thumbnailList=[],this._tabStatus=[],this._onClose=new S.n,this._onClickThumbnail=new S.n,this._onClickLabel=new S.n,this._onEnterLabel=new S.n,this._onChangeAnnotationLabel=new S.n,this._onDeleteAnnotation=new S.n,this._loadMoreThumbnails=new S.n,this.action=-1,this.displayInputLabel=!1,this.inputLabel="",this.selectedIndexAnnotation=-1,this.selectedLabel="",this.unsubscribe$=new y.a,this.clickAbilityToggle=!1,this.invalidInput=!1,this.labelList=[],this.isTabStillOpen=!0,this.tempMax=0,this.max=0,this.updateLabelList=function(){l.labelList=l._tabStatus[1].label_list?l._tabStatus[1].label_list:[]},this.onClose=function(t){l._onClose.emit({name:t.name,closed:!0})},this.onClick=function(t,e){l._onClickThumbnail.emit(Object.assign(Object.assign({},t),{thumbnailIndex:e})),l.selectedIndexAnnotation=-1,l.selectedLabel=""},this.onDisplayInputModal=function(){l.displayInputLabel=!l.displayInputLabel,l.inputLabel=""},this.validateInputLabel=function(t){var e=t.target.value,n=e.trim();if(n)if(n.match(/^[a-zA-Z0-9-]*$/))if(l._tabStatus.some(function(t){var e=t.label_list;return e&&e.length&&e.some(function(t){return t===n})}))l.invalidInput=!0,console.error("Invalid existing label input");else{l.invalidInput=!1;var a=l._tabStatus.map(function(t){return t.label_list||[]}).filter(function(t){return t.length>0})[0];l._onEnterLabel.emit({action:1,label_list:a?[].concat(i(a),[e]):[e]}),l.displayInputLabel=!1,l.inputLabel=""}else l.invalidInput=!0,console.error("Invalid input value")},this.onDeleteLabel=function(e){var n=!1;if(l._thumbnailList.forEach(function(t){t.bnd_box&&t.bnd_box.forEach(function(t){t.label===e&&(n=!0)}),t.polygons&&t.polygons.forEach(function(t){t.label===e&&(n=!0)})}),n)l._languageService._translate.get("labelExist").subscribe(function(t){alert(t)});else{var i=t(l._tabStatus.filter(function(t){return t.label_list}),1)[0].label_list;l._onClickLabel.emit({selectedLabel:e,label_list:i&&i.length>0?i:[],action:0})}},this.onClickLabel=function(t){l.selectedLabel=t,l._onChangeAnnotationLabel.emit({label:t,index:l.selectedIndexAnnotation}),l._undoRedoService.appendStages({meta:l._selectMetadata,method:"draw"})},this.onClickAnnotation=function(t,e){var n=e.label;l.selectedLabel=n,l._annotateService.setState({annotation:t})},this.onDeleteAnnotation=function(){l.selectedIndexAnnotation>-1&&(l._onDeleteAnnotation.emit(l.selectedIndexAnnotation),l._selectMetadata.bnd_box.splice(l.selectedIndexAnnotation,1)&&l._undoRedoService.appendStages({meta:Object(jt.a)(l._selectMetadata),method:"draw"}))},this.checkCloseToggle=function(t){var e="";return"labellingProject.label"===t.name&&l._tabStatus[2].closed||"labellingProject.project"===t.name&&l._tabStatus[1].closed&&l._tabStatus[2].closed||"labellingProject.annotation"===t.name||(e="flex-content"),t.closed&&(e+=" closed"),e},this.checkStateEqual=function(t,e){return!Ct(t,e)}}return l(n,[{key:"ngOnInit",value:function(){var e=this;this.updateLabelList(),this._imgLblState.action$.pipe(Object(_.a)(this.unsubscribe$)).subscribe(function(t){var n=t.draw;return e.clickAbilityToggle=n}),this._thumbnailList.length>0&&this._annotateService.labelStaging$.pipe(Object(_.a)(this.unsubscribe$)).subscribe(function(n){var i,a=n.annotation;e.selectedIndexAnnotation=a;var o=t(e._tabStatus.filter(function(t){return t.annotation}),1)[0].annotation,r=null==o?void 0:o.map(function(t){var e=t.bnd_box,n=t.polygons;return e?e.find(function(t,e){return e===a}):n?n.find(function(t,e){return e===a}):void 0})[0];e.selectedLabel=null!==(i=null==r?void 0:r.label)&&void 0!==i?i:""})}},{key:"inputLabelChange",value:function(t){var e;this.labelList=this._tabStatus[1].label_list?null===(e=this._tabStatus[1].label_list)||void 0===e?void 0:e.filter(function(e){return e.includes(t)}):[]}},{key:"ngOnChanges",value:function(t){if(t._thumbnailList){var n=t._thumbnailList.currentValue;this._thumbnailList=Object.assign([],this._thumbnailList,i(n))}if(t._tabStatus&&this.checkStateEqual(t._tabStatus.currentValue,t._tabStatus.previousValue)){var a=t._tabStatus.currentValue;this._tabStatus=i(a),this.updateLabelList(),this.isTabStillOpen=!1;var o,r=e(this._tabStatus);try{for(r.s();!(o=r.n()).done;)if(!o.value.closed){this.isTabStillOpen=!0;break}}catch(s){r.e(s)}finally{r.f()}}}},{key:"openAllTab",value:function(){this._tabStatus.forEach(function(t){t.closed=!1})}},{key:"mouseScroll",value:function(){var t=this.thumbnailList.nativeElement.scrollTop+this.thumbnailList.nativeElement.clientHeight;this.max=this.thumbnailList.nativeElement.scrollHeight,t+1500>=this.max&&this.tempMax!==this.max&&(this.tempMax=this.max,this._loadMoreThumbnails.emit())}},{key:"ngOnDestroy",value:function(){this.unsubscribe$.next(),this.unsubscribe$.complete()}}]),n}()).\u0275fac=function(t){return new(t||ee)(S.Hb(E),S.Hb(D),S.Hb(R.a),S.Hb(zt))},ee.\u0275cmp=S.Bb({type:ee,selectors:[["image-labelling-project"]],viewQuery:function(t,e){var n;1&t&&S.tc(Dt,!0),2&t&&S.ec(n=S.Ub())&&(e.thumbnailList=n.first)},hostBindings:function(t,e){1&t&&S.Tb("scroll",function(t){return e.mouseScroll(t)})},inputs:{_totalUuid:"_totalUuid",_selectMetadata:"_selectMetadata",_thumbnailList:"_thumbnailList",_tabStatus:"_tabStatus"},outputs:{_onClose:"_onClose",_onClickThumbnail:"_onClickThumbnail",_onClickLabel:"_onClickLabel",_onEnterLabel:"_onEnterLabel",_onChangeAnnotationLabel:"_onChangeAnnotationLabel",_onDeleteAnnotation:"_onDeleteAnnotation",_loadMoreThumbnails:"_loadMoreThumbnails"},features:[S.vb],decls:1,vars:1,consts:[["class","tab-container",4,"ngIf"],[1,"tab-container"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["nonThumbnailTab",""],[1,"utility-right-project-container","tab","flex-fill-remaining",3,"ngClass"],[1,"tab-name"],[1,"flex-tab-icons"],[1,"tab-close-thumbnailless"],[1,"div-close",3,"click"],["id","thumbnailList",1,"utility-inner-container","tab-height","scroll",3,"scroll"],["thumbnailList",""],[1,"img-container",3,"click"],[1,"img-skeleton"],["imgLazyLoad","",1,"img",3,"src"],[1,"img-name"],[1,"img-path"],[3,"ngClass"],["annotationTab",""],[1,"div-input"],["type","text",1,"input",3,"ngClass","ngModel","placeholder","ngModelChange","keydown.enter"],["id","inner-container",1,"utility-inner-container","tab-height","scroll"],[1,"flex-item"],["class","not-exist",4,"ngIf"],[1,"flex-center-width",3,"ngClass"],[1,"label"],[3,"ngClass","click"],[1,"action"],[4,"ngIf"],[1,"delete-label",3,"ngClass","click"],[1,"not-exist"],["id","inner-container",1,"utility-inner-container","scroll","tab-smaller-height"],[1,"flex-center-width"],["polygon",""],[1,"label",3,"ngClass","click"],["class","delete-annotation",3,"ngClass","click",4,"ngIf"],[1,"delete-annotation",3,"ngClass","click"]],template:function(t,e){1&t&&S.mc(0,te,2,1,"div",0),2&t&&S.ac("ngIf",e.isTabStillOpen)},directives:[g.k,g.j,g.i,Et,Tt.a,Tt.f,Tt.i],pipes:[Z.c,V],styles:['.tab-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-flow:column;flex-flow:column;height:100%;right:0;position:fixed;z-index:1000;min-width:18.5vw;max-width:18.5vw}.utility-right-project-container[_ngcontent-%COMP%]{height:100%;min-width:16.3vw;max-width:16.3vw;background:#383535;border:.0325vw solid hsla(0,0%,100%,.25);border-top:none;z-index:1000;-webkit-align-items:stretch;align-items:stretch}.utility-right-project-container[_ngcontent-%COMP%]:after{position:absolute;content:"";top:0;min-width:8.5vw;max-width:8.5vw;min-height:4vh;max-height:4vh;background:#383535;z-index:-1;font-size:1.5vh;line-height:3vh;color:#fff;padding:.5vh 0 0 2vw}.tab[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;overflow:hidden}.tab[_ngcontent-%COMP%]:before{position:absolute;content:"";top:4vh;min-width:100vw;max-width:100vw;min-height:93vh;max-height:93vh;background:#383535;z-index:-1}.flex-fixed[_ngcontent-%COMP%]{-webkit-flex:0 1 25vh;flex:0 1 25vh}.flex-fill-remaining[_ngcontent-%COMP%]{-webkit-flex:1 1 auto;flex:1 1 auto}.flex-content[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-flow:column;flex-flow:column;height:33%;min-height:10%;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-grow:0;flex-grow:0;resize:vertical}.tab-name[_ngcontent-%COMP%]{font-size:1.7vh;padding:.5vw 2vw 0 1vw;display:inline-block;color:#fff;position:absolute}.tab-close-thumbnail[_ngcontent-%COMP%]{margin-left:3vw;-webkit-justify-content:center;justify-content:center}.tab-close-thumbnail[_ngcontent-%COMP%], .tab-close-thumbnailless[_ngcontent-%COMP%]{float:right;vertical-align:middle;min-height:4vh;max-height:4vh;color:#696969;font-size:1.8vh;line-height:4vh;text-align:center;display:inline-grid;padding-bottom:1vh}.tab-close-thumbnailless[_ngcontent-%COMP%]{-webkit-flex:1 0 60%;flex:1 0 60%;-webkit-justify-content:right;justify-content:right}.div-close[_ngcontent-%COMP%]{margin-right:.5vw;min-width:1.6vw;max-width:1.6vw;min-height:4vh;max-height:4vh;color:#fff;cursor:pointer;text-align:center;float:right}.div-close[_ngcontent-%COMP%]:active{background:grey}.utility-inner-container[_ngcontent-%COMP%]{padding:2.5vh 0 0 .2vw;scroll-behavior:smooth;overflow:hidden auto;z-index:100;min-width:15.5vw;max-width:15.5vw}.tab-height[_ngcontent-%COMP%]{height:85%}.tab-smaller-height[_ngcontent-%COMP%]{height:60%}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px;background-color:#000}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:.5vw}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.img-container[_ngcontent-%COMP%], .utility-icon-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh}.img-container[_ngcontent-%COMP%]{font-size:1.5vh;color:#fff;display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-items:center;align-items:center;cursor:pointer;margin:0 .3vw;padding:.1vh .4vw}.img-container[_ngcontent-%COMP%]:hover{background-color:#444;border-radius:2px}.img[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto;display:block}.img[_ngcontent-%COMP%], .img-skeleton[_ngcontent-%COMP%]{max-height:4.3vh;min-height:4.3vh;max-width:3vw}.img-skeleton[_ngcontent-%COMP%]{min-width:3vw;border:.005vh dotted #525353}.img-name[_ngcontent-%COMP%]{margin-left:.5vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.closed[_ngcontent-%COMP%]{display:none}.utility-icon-dark[_ngcontent-%COMP%], .utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute}.flex-item[_ngcontent-%COMP%]{-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;font-size:1.5vh;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flex-center-width[_ngcontent-%COMP%], .flex-item[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.flex-center-width[_ngcontent-%COMP%]{width:90%;-webkit-flex-wrap:wrap;flex-wrap:wrap}.label[_ngcontent-%COMP%]{-webkit-flex:1 1 80%;flex:1 1 80%;display:-webkit-flex;display:flex;-webkit-justify-content:flex-start;justify-content:flex-start;margin:.25vh 0}.pointer[_ngcontent-%COMP%]{cursor:pointer}.annotation-active[_ngcontent-%COMP%], .label-active[_ngcontent-%COMP%]{border:.15vw solid #ff0}.utility-info-btn[_ngcontent-%COMP%]{font-size:1vw;min-width:0;max-width:0;min-height:2.5vh;max-height:2.5vh;line-height:0;right:21vh;position:absolute;background:#383535;border:none;color:#fff}.flex-tab-icons[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;width:100%}.extra-icons[_ngcontent-%COMP%]{cursor:pointer}.extra-icons[_ngcontent-%COMP%]:active{background:grey}.tab-extra-icons[_ngcontent-%COMP%]{float:right;vertical-align:middle;font-size:1.7vh;line-height:4vh;text-align:center;color:#fff;-webkit-flex:1 0 15%;flex:1 0 15%;-webkit-justify-content:flex-start;justify-content:flex-start}.tab-text[_ngcontent-%COMP%]{font-size:1.7vh;min-width:6vw;max-width:6vw}.inner-content[_ngcontent-%COMP%]{max-height:25vh;min-height:25vh;min-width:3vw;max-width:3vw}.div-input[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:flex-start;justify-content:flex-start;margin:.5vh .9vw}.input[_ngcontent-%COMP%]{border-radius:8vw;border:none;outline:none;padding:.3vw 0 .3vw 1vw;min-height:1.5vh;max-height:1.5vh;min-width:13vw;max-width:13vw;font-size:1.3vh;background:#525353;color:#fff}.input-invalid[_ngcontent-%COMP%]{border:.2vw solid red}.img-path[_ngcontent-%COMP%]{margin-top:4vh}.indicator[_ngcontent-%COMP%]{background-color:#75fe7c}.indicator[_ngcontent-%COMP%], .no-indicator[_ngcontent-%COMP%]{height:1vh;width:.5vw;border-radius:50%;position:relative}.no-indicator[_ngcontent-%COMP%]{background-color:#ffba54}.not-exist[_ngcontent-%COMP%]{font-size:1.5vh;color:#999}.delete-annotation[_ngcontent-%COMP%], .delete-label[_ngcontent-%COMP%]{position:absolute;right:2vw}.open-all-tabs[_ngcontent-%COMP%]{cursor:pointer;padding:.2vh .2vw;border-radius:.7vw}.open-all-tabs[_ngcontent-%COMP%]:hover{background:#636363}.open-all-tabs[_ngcontent-%COMP%]:active, .open-all-tabs[_ngcontent-%COMP%]:focus{background:#737474}.tab-skeleton[_ngcontent-%COMP%]{position:absolute;height:100vh;width:16.5vw;background:#525353;border-left:.0625vw solid hsla(0,0%,100%,.25);text-align:center;color:#cac8c8;font-size:2vh}.choose-tab[_ngcontent-%COMP%]{margin-top:42vh}']}),ee);function ie(t,e){if(1&t&&(S.Kb(0),S.Mb(1,"div",3),S.Mb(2,"label"),S.Mb(3,"img",4),S.Tb("click",function(){return e.$implicit.onClick()}),S.Wb(4,"translate"),S.Lb(),S.Lb(),S.Lb(),S.Jb()),2&t){var n=e.$implicit,i=e.index,a=S.Vb();S.xb(3),S.lc(n.style),S.ac("ngClass",a.conditionalIconTheme())("src",n.imgPath,S.jc)("alt",n.alt)("title",S.Xb(4,7,n.hoverLabel)),S.yb("data-index",i)}}var ae,oe=((ae=function(){function t(){var e=this;r(this,t),this._onClick=new S.n,this._onExport=new S.n,this._onReload=new S.n,this.bindImagePath=function(){e.jsonSchema={logos:[{imgPath:"../../../assets/icons/folder.svg",hoverLabel:"rightSideBar.folderOrFiles",alt:"Folder",onClick:function(){e._onClick.emit({name:"labellingProject.project",closed:!1})}},{imgPath:"../../../assets/icons/tag.svg",hoverLabel:"rightSideBar.label",alt:"Label",onClick:function(){e._onClick.emit({name:"labellingProject.label",closed:!1})}},{imgPath:"../../../assets/icons/bounding_box.svg",hoverLabel:"rightSideBar.annotation",alt:"Annotation",onClick:function(){e._onClick.emit({name:"labellingProject.annotation",closed:!1})}},{imgPath:"../../../assets/icons/statistic.svg",hoverLabel:"rightSideBar.statistic",alt:"Statistic",onClick:function(){}},{imgPath:"../../../assets/icons/export.svg",hoverLabel:"rightSideBar.export",alt:"Export",style:"padding: 1.5vh 0.5vw;",onClick:function(){e._onExport.emit()}},{imgPath:"../../../assets/icons/reload.svg",hoverLabel:"rightSideBar.reload",alt:"Reload",style:"padding: 1.5vh 0.5vw;",onClick:function(){e._onReload.emit()}}]}},this.conditionalIconTheme=function(){return"utility-icon-light"}}return l(t,[{key:"ngOnInit",value:function(){this.bindImagePath()}},{key:"ngOnChanges",value:function(t){this.bindImagePath()}}]),t}()).\u0275fac=function(t){return new(t||ae)},ae.\u0275cmp=S.Bb({type:ae,selectors:[["image-labelling-right-sidebar"]],inputs:{_onChange:"_onChange"},outputs:{_onClick:"_onClick",_onExport:"_onExport",_onReload:"_onReload"},features:[S.vb],decls:3,vars:1,consts:[[1,"utility-right-sidebar-container"],[1,"utility-inner-container"],[4,"ngFor","ngForOf"],[1,"utility-icon-container"],[3,"ngClass","src","alt","title","click"]],template:function(t,e){1&t&&(S.Mb(0,"div",0),S.Mb(1,"div",1),S.mc(2,ie,5,9,"ng-container",2),S.Lb(),S.Lb()),2&t&&(S.xb(2),S.ac("ngForOf",e.jsonSchema.logos))},directives:[g.j,g.i],pipes:[Z.c],styles:[".utility-right-sidebar-container[_ngcontent-%COMP%]{position:absolute;top:4.5vh;min-width:2.2vw;max-width:2.2vw;min-height:95.5vh;max-height:95.5vh;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);z-index:1000}.utility-inner-container[_ngcontent-%COMP%]{min-width:2.2vw;max-width:2.2vw;position:absolute}.utility-icon-container[_ngcontent-%COMP%], .utility-inner-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh}.utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh;padding:.3vw;position:absolute;cursor:pointer}.utility-icon-light[_ngcontent-%COMP%]:active, .utility-icon-light[_ngcontent-%COMP%]:focus{background:#a9a9a9}.input-none[_ngcontent-%COMP%]{display:none}"],changeDetection:0}),ae);function re(t,e){if(1&t&&(S.Kb(0),S.Mb(1,"div",4),S.oc(2),S.Wb(3,"translate"),S.Lb(),S.Jb()),2&t){var n=S.Vb(2);S.xb(2),S.rc("",S.Xb(3,2,"footer.image"),": ",n.thumbnailType,"")}}function se(t,e){if(1&t){var n=S.Nb();S.Kb(0),S.Mb(1,"div",2),S.Mb(2,"div",3),S.oc(3),S.Wb(4,"translate"),S.Lb(),S.Mb(5,"div",4),S.oc(6),S.Wb(7,"translate"),S.Lb(),S.mc(8,re,4,4,"ng-container",1),S.Mb(9,"div",4),S.oc(10),S.Lb(),S.Mb(11,"div",5),S.Wb(12,"translate"),S.Mb(13,"label",6),S.Tb("click",function(){S.hc(n);var t=S.Vb();return t.copyMessage(t._thumbnailInfo.img_path)}),S.oc(14),S.Lb(),S.Lb(),S.Lb(),S.Jb()}if(2&t){var i=S.Vb();S.xb(3),S.rc(" ",S.Xb(4,9,"footer.projectName"),": ",i._thumbnailInfo.project_name," "),S.xb(3),S.rc("",S.Xb(7,11,"footer.size"),": ",i.thumbnailSize,""),S.xb(2),S.ac("ngIf",i.thumbnailType),S.xb(2),S.rc("",i._thumbnailInfo.img_ori_w," x ",i._thumbnailInfo.img_ori_h,""),S.xb(1),S.ac("title",S.Xb(12,13,"footer.copyToClipboard")),S.xb(3),S.pc(i._thumbnailInfo.img_path)}}var le,ce=((le=function(){function t(){r(this,t),this._imgSrc="",this.thumbnailSize="",this.thumbnailType="",this.formatBytes=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===t)return"0 Bytes";var n=e<0?0:e,i=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,i)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]}}return l(t,[{key:"ngOnInit",value:function(){}},{key:"copyMessage",value:function(t){var e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}},{key:"ngOnChanges",value:function(t){if(t._thumbnailInfo&&t._imgSrc){var e=t._thumbnailInfo.currentValue,n=t._imgSrc.currentValue;this._thumbnailInfo=Object.assign(Object.assign({},this._thumbnailInfo),e),this.thumbnailSize=this.formatBytes(n.length);var i=n.match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(i&&i.length){var a=i[1].split("/")[1];this.thumbnailType=a}}}}]),t}()).\u0275fac=function(t){return new(t||le)},le.\u0275cmp=S.Bb({type:le,selectors:[["image-labelling-footer"]],inputs:{_thumbnailInfo:"_thumbnailInfo",_imgSrc:"_imgSrc"},features:[S.vb],decls:3,vars:3,consts:[[1,"footer-container"],[4,"ngIf"],[1,"footer-label-container"],[1,"footer-label","footer-project-name"],[1,"footer-label"],[1,"footer-image-path",3,"title"],[1,"footer-path-label",3,"click"]],template:function(t,e){1&t&&(S.Mb(0,"div",0),S.mc(1,se,15,15,"ng-container",1),S.Wb(2,"json"),S.Lb()),2&t&&(S.xb(1),S.ac("ngIf","{}"!=S.Xb(2,1,e._thumbnailInfo)))},directives:[g.k],pipes:[g.e,Z.c],styles:[".footer-container[_ngcontent-%COMP%]{position:absolute;background:#525353;border:.0625vw solid hsla(0,0%,100%,.25);min-height:2.3vh;max-height:2.3vh;min-width:100vw;max-width:100vw;bottom:0;padding-left:2.5vw}.footer-label-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-items:baseline;align-items:baseline;width:80%}.footer-label[_ngcontent-%COMP%]{font-size:1.6vh;color:#fff;outline:none;border-right:.05vw solid #fff;padding:0 1vw;text-align:left}.footer-project-name[_ngcontent-%COMP%]{max-width:20vw}.footer-image-path[_ngcontent-%COMP%], .footer-project-name[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.footer-image-path[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;font-size:1.6vh;color:#fff;outline:none;border-right:.05vw solid #fff;padding:0 1vw}.border-right[_ngcontent-%COMP%]{border-right:1rem #fff}.utility-icon-container[_ngcontent-%COMP%]{min-height:5vh;max-height:5vh;-webkit-align-items:baseline;align-items:baseline}.utility-icon-light[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:1.5vh;max-height:1.5vh;padding:0;position:absolute;cursor:context-menu}.footer-path-label[_ngcontent-%COMP%]{cursor:pointer;padding:0 .2vw;border-radius:.5vw}.footer-path-label[_ngcontent-%COMP%]:hover{background:#636363}.footer-path-label[_ngcontent-%COMP%]:active, .footer-path-label[_ngcontent-%COMP%]:focus{background:#737474}"],changeDetection:0}),le),ue=s("44N4"),he=s("OObL"),de=s("TJKd");function fe(t,e){if(1&t&&(S.Mb(0,"span"),S.oc(1),S.Lb()),2&t){var n=S.Vb(2);S.xb(1),S.qc("Zipping ",n._processingNum," file")}}function be(t,e){1&t&&(S.Mb(0,"span"),S.oc(1,"Done"),S.Lb())}function ge(t,e){1&t&&S.Ib(0,"div",5)}function me(t,e){1&t&&(S.Mb(0,"div",6),S.oc(1,"\u2714"),S.Lb())}function ve(t,e){if(1&t&&(S.Kb(0),S.Mb(1,"div",1),S.Mb(2,"div",2),S.mc(3,fe,2,1,"span",0),S.mc(4,be,2,0,"span",0),S.Lb(),S.mc(5,ge,1,0,"div",3),S.mc(6,me,2,0,"div",4),S.Lb(),S.Jb()),2&t){var n=S.Vb();S.xb(3),S.ac("ngIf",n._processingNum>0),S.xb(1),S.ac("ngIf",0===n._processingNum),S.xb(1),S.ac("ngIf",n._processingNum>0),S.xb(1),S.ac("ngIf",0===n._processingNum)}}var pe,_e,ye,xe,we,ke=((pe=function(){function t(){r(this,t),this._processingNum=0,this.doneProcess=!1}return l(t,[{key:"ngOnInit",value:function(){}},{key:"delay",value:function(t){return new Promise(function(e){return setTimeout(e,t)})}},{key:"ngOnChanges",value:function(t){return Object(m.a)(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=t._processingNum,!e.t0){e.next=9;break}if(console.log(t._processingNum),e.t1=1===t._processingNum.previousValue&&0===t._processingNum.currentValue,!e.t1){e.next=9;break}return this.doneProcess=!0,e.next=8,this.delay(1e3);case 8:this.doneProcess=!1;case 9:case"end":return e.stop()}},e,this)}))}}]),t}()).\u0275fac=function(t){return new(t||pe)},pe.\u0275cmp=S.Bb({type:pe,selectors:[["toastr"]],inputs:{_processingNum:"_processingNum"},features:[S.vb],decls:1,vars:1,consts:[[4,"ngIf"],[1,"toastr"],[1,"text"],["class","loader",4,"ngIf"],["class","done",4,"ngIf"],[1,"loader"],[1,"done"]],template:function(t,e){1&t&&S.mc(0,ve,7,4,"ng-container",0),2&t&&S.ac("ngIf",e._processingNum>0||e.doneProcess)},directives:[g.k],styles:[".toastr[_ngcontent-%COMP%]{position:absolute;z-index:10000;background:#262a2e;border-radius:1vh;color:#fff;bottom:5vh;right:5vw;padding:2vh 2vw;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.text[_ngcontent-%COMP%]{margin:auto 1vw auto auto;font-size:2vh}.loader[_ngcontent-%COMP%]{border-radius:50%;border:.5vh solid #f3f3f3;border-top-color:#de1c44;width:2vh;height:2vh;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.done[_ngcontent-%COMP%]{color:#92c91b;font-size:2vh}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}"]}),pe),Se=s("CfRg"),Ce=function(t){return Object(Se.a)(t,4)},Me=((ye=function(){function n(){r(this,n),this.globalXY={x:0,y:0},this.panXY={x:0,y:0},this.currentClickedBox={box:-1,pos:"o"},this.lineOffset=3,this.anchrSize=2.5,this.currentDrawing={x1:0,x2:0,y1:0,y2:0},this.currentSelectedBndBox=-1,this.util=new Bt}return l(n,[{key:"getDiffXY",value:function(t){var e=t.offsetX,n=t.offsetY;try{var i={diffX:0,diffY:0};return i.diffX=this.globalXY.x+(e-this.panXY.x),i.diffY=this.globalXY.y+(n-this.panXY.y),i}catch(a){return console.log("ObjectDetection getDiffXY(offsetX: number,offsetY: number): { diffX: number; diffY: number }",a.name+": ",a.message),{diffX:-1,diffY:-1}}}},{key:"setCurrentX1Y1",value:function(t,e){try{null!==t&&null!==e&&void 0!==t&&void 0!==e&&(this.currentDrawing.x1=t,this.currentDrawing.y1=e)}catch(n){console.log("ObjectDetection setCurrentX1Y1(MouseX:number, MouseY:number):void",n.name+": ",n.message)}}},{key:"setCurrentX2Y2",value:function(t,e){try{null!==t&&null!==e&&void 0!==t&&void 0!==e&&(this.currentDrawing.x2=t,this.currentDrawing.y2=e)}catch(n){console.log("ObjectDetection setCurrentX2Y2(MouseX:number, MouseY:number):void",n.name+": ",n.message)}}},{key:"moveAllBbox",value:function(t,n,i,a){try{var o,r=e(t);try{for(r.s();!(o=r.n()).done;){var s=o.value,l=s.x2-s.x1,c=s.y2-s.y1;s.x1=Ce(n+s.distancetoImg.x),s.y1=Ce(i+s.distancetoImg.y),s.x2=Ce(s.x1+l),s.y2=Ce(s.y1+c)}}catch(u){r.e(u)}finally{r.f()}a&&a(!0)}catch(u){}}},{key:"calScaleTofitScreen",value:function(t,e,n,i){try{var a={factor:-1,newX:-1,newY:-1};return a.factor=Math.min(n/t,i/e),a.factor=a.factor-.05*a.factor,a.newX=n/2-t/2*a.factor,a.newY=i/2-e/2*a.factor,a}catch(o){return{factor:-1,newX:-1,newY:-1}}}},{key:"deleteSingleBox",value:function(t,e,n){try{t.splice(e,1),this.currentSelectedBndBox=-1,this.currentClickedBox={box:-1,pos:"o"},n(!0)}catch(i){}}},{key:"keyboardMoveBox",value:function(t,e,n,i){var a=n.img_w,o=n.img_h,r=n.img_x,s=n.img_y;try{switch(t){case"up":this.moveBoxWithinPointPath(r,s,a,o,0,-3,e)&&(e.y1-=3,e.y2-=3);break;case"down":this.moveBoxWithinPointPath(r,s,a,o,0,3,e)&&(e.y1+=3,e.y2+=3);break;case"left":this.moveBoxWithinPointPath(r,s,a,o,-3,0,e)&&(e.x1-=3,e.x2-=3);break;case"right":this.moveBoxWithinPointPath(r,s,a,o,3,0,e)&&(e.x1+=3,e.x2+=3)}i(!0)}catch(l){}}},{key:"moveBoxWithinPointPath",value:function(t,e,n,i,a,o,r){try{return!(r.x1+at+n||r.y1+oe+i)}catch(s){return console.log("ObjectDetection isWithinPointPath(imgx:number, imgy:number, imgw:number, imgh:number, addx:number, addy:number, box:Boundingbox):Boolean",s.name+": ",s.message),!1}}},{key:"mouseMoveBox",value:function(t,e,n){try{if(this.moveBoxWithinPointPath(n.img_x,n.img_y,n.img_w,n.img_h,t-this.currentDrawing.x1,e-this.currentDrawing.y1,n.bnd_box[this.currentSelectedBndBox])){this.setCurrentX2Y2(t,e);var i=this.currentDrawing.x2-this.currentDrawing.x1,a=this.currentDrawing.y2-this.currentDrawing.y1;this.setCurrentX1Y1(this.currentDrawing.x2,this.currentDrawing.y2),"i"!==this.currentClickedBox.pos&&"tl"!==this.currentClickedBox.pos&&"l"!==this.currentClickedBox.pos&&"bl"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].x1+=i),"i"!==this.currentClickedBox.pos&&"tl"!==this.currentClickedBox.pos&&"t"!==this.currentClickedBox.pos&&"tr"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].y1+=a),"i"!==this.currentClickedBox.pos&&"tr"!==this.currentClickedBox.pos&&"r"!==this.currentClickedBox.pos&&"br"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].x2+=i),"i"!==this.currentClickedBox.pos&&"bl"!==this.currentClickedBox.pos&&"b"!==this.currentClickedBox.pos&&"br"!==this.currentClickedBox.pos||(n.bnd_box[this.currentSelectedBndBox].y2+=a)}}catch(o){console.log("ObjectDetection mouseMoveBox(MouseX:number, MouseY:number, CurrMeta:Metadata):void",o.name+": ",o.message)}}},{key:"getCurrentSelectedBox",value:function(){try{return this.currentSelectedBndBox}catch(t){return-1}}},{key:"setCurrentSelectedbBox",value:function(t){try{this.currentSelectedBndBox=t}catch(e){console.log("ObjectDetection setCurrentSelectedbBox(newNUM:number):void",e.name+": ",e.message)}}},{key:"mouseUpDrawEnable",value:function(t,e,n){try{var i={selBox:-1,isNew:!1};if(-1===this.currentClickedBox.box&&null!==this.tmpbox)t.bnd_box.push(this.tmpbox),this.currentSelectedBndBox=t.bnd_box.length-1,t.bnd_box[this.currentSelectedBndBox].label=e.length>0?e[0].name:"",i.isNew=!0,i.selBox=Ce(this.currentSelectedBndBox);else if(this.currentClickedBox.box>-1&&this.tmpbox){if(t.bnd_box[this.currentSelectedBndBox].x1>t.bnd_box[this.currentSelectedBndBox].x2){var a=Ce(t.bnd_box[this.currentSelectedBndBox].x1);t.bnd_box[this.currentSelectedBndBox].x1=Ce(t.bnd_box[this.currentSelectedBndBox].x2),t.bnd_box[this.currentSelectedBndBox].x2=a}if(t.bnd_box[this.currentSelectedBndBox].y1>t.bnd_box[this.currentSelectedBndBox].y2){var o=Ce(t.bnd_box[this.currentSelectedBndBox].y1);t.bnd_box[this.currentSelectedBndBox].y1=Ce(t.bnd_box[this.currentSelectedBndBox].y2),t.bnd_box[this.currentSelectedBndBox].y2=o}}return this.currentClickedBox={box:-1,pos:"o"},this.setCurrentX1Y1(0,0),this.setCurrentX2Y2(0,0),this.tmpbox=null,n(!0),i}catch(r){return console.log("ObjectDetection MouseUpDrawEnable(CurrMeta: Metadata): number",r.name+": ",r.message),{selBox:-1,isNew:!1}}}},{key:"panRectangle",value:function(t,n,i,a){try{var o,r=e(t);try{for(r.s();!(o=r.n()).done;){var s=o.value,l=s.x2-s.x1,c=s.y2-s.y1;s.x1=n+s.distancetoImg.x,s.y1=i+s.distancetoImg.y,s.x2=s.x1+l,s.y2=s.y1+c}}catch(u){r.e(u)}finally{r.f()}a(!0)}catch(u){console.log("ObjectDetection panRectangle(bbox:Boundingbox[], img_X:number, img_Y:number)",u.name+": ",u.message)}}},{key:"scaleAllBoxes",value:function(t,n,i,a,o){try{var r,s=e(n);try{for(s.s();!(r=s.n()).done;){var l=r.value,c=l.distancetoImg.x*t+i,u=l.distancetoImg.y*t+a,h=c+(l.x2-l.x1)*t,d=u+(l.y2-l.y1)*t;l.x1=Ce(c),l.y1=Ce(u),l.x2=Ce(h),l.y2=Ce(d);var f=l.y1-a;l.distancetoImg.x=Ce(l.x1-i),l.distancetoImg.y=Ce(f)}}catch(b){s.e(b)}finally{s.f()}o&&o(!0)}catch(b){console.log("ObjectDetection scaleAllBoxes(scalefactor: number,boxes:Boundingbox[],imgX:number,imgY:number)",b.name+": ",b.message)}}},{key:"mouseMoveDrawEnable",value:function(t,e,n){try{-1===this.currentClickedBox.box?this.setCurrentX2Y2(t,e):this.mouseMoveBox(t,e,n)}catch(i){console.log("ObjectDetection MouseMoveDrawEnable(MouseX: number,MouseY: number,SelectedMeta: Metadata): void",i.name+": ",i.message)}}},{key:"mouseDownDrawEnable",value:function(t,e,n){try{return this.getCurrentClickBox(t,e,n),this.setCurrentX1Y1(t,e),this.setCurrentX2Y2(t,e),this.currentSelectedBndBox=-1!==this.currentClickedBox.box?this.currentClickedBox.box:-1,this.currentClickedBox.box}catch(i){return console.log("ObjectDetection MouseDownDrawEnable(MouseX:number,MouseY:number,BBox:Boundingbox[]):number",i.name+": ",i.message),-1}}},{key:"setPanXY",value:function(t,e){try{return!(!t||!e||(this.panXY.x=t,this.panXY.y=e,0))}catch(n){return console.log("ObjectDetection setPanXY(newX: number, newY: number):boolean",n.name+": ",n.message),!1}}},{key:"setGlobalXY",value:function(t,e){try{return!(!t||!e||(this.globalXY.x=t,this.globalXY.y=e,0))}catch(n){return console.log("ObjectDetection SetGlobalXY(newX: number, newY: number):boolean",n.name+": ",n.message),!1}}},{key:"changeLabel",value:function(t,e){t&&e&&(t.label=e)}},{key:"mouseClickWithinPointPath",value:function(t,e){var n=t.img_x,i=t.img_y,a=t.img_w,o=t.img_h,r=e.offsetX,s=e.offsetY;try{return r>n&&ri&&s0){var o,r=e(i.entries());try{for(r.s();!(o=r.n()).done;){var s=t(o.value,2),l=s[0],c=s[1];l===this.currentClickedBox.box||l===this.currentSelectedBndBox?(c.color="rgba(0,255,0,1.0)",c.lineWidth=2,this.drawEachBoxOn(n,c,a,!0)):(c.color="rgba(255,255,0,0.8)",c.lineWidth=1,this.drawEachBoxOn(n,c,a,!1))}}catch(p){r.e(p)}finally{r.f()}}if(-1===this.currentClickedBox.box&&-1===this.currentSelectedBndBox){var u,h=e(i);try{for(h.s();!(u=h.n()).done;){var d=u.value;d.color="rgba(255,255,0,0.8)",this.drawEachBoxOn(n,d,a,!1)}}catch(p){h.e(p)}finally{h.f()}var f=this.currentDrawing,b=f.x1,g=f.x2,m=f.y1,v=f.y2;this.tmpbox=this.generateNewBox(b,g,m,v),this.tmpbox&&this.drawEachBoxOn(n,this.tmpbox,a,!0)}}catch(p){console.log("redraw(boundbox) ----\x3e ",p.name+": ",p.message)}}},{key:"drawEachBoxOn",value:function(t,e,n,i){try{if(n){var a=e.x1+(e.x2-e.x1)/2,o=e.y1+(e.y2-e.y1)/2;n.strokeStyle="white",n.fillStyle="black",n.font="bold 12px Arial",""==e.label?(n.strokeText("",e.x1+10,e.y1+15),n.fillText("",e.x1+10,e.y1+15)):t.find(function(t){return t.name===e.label})?(n.strokeText(e.label,e.x1+10,e.y1+15),n.fillText(e.label,e.x1+10,e.y1+15)):(n.strokeText("Text",e.x1+10,e.y1+15),n.fillText("Text",e.x1+10,e.y1+15)),n.strokeStyle=e.color,n.beginPath(),n.rect(e.x1,e.y1,e.x2-e.x1,e.y2-e.y1),n.lineWidth=e.lineWidth,n.stroke(),n.fillStyle=e.color,i&&(n.beginPath(),n.fillRect(e.x1-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x1-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x1-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(a-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,e.y1-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,o-this.anchrSize,2*this.anchrSize,2*this.anchrSize),n.fillRect(e.x2-this.anchrSize,e.y2-this.anchrSize,2*this.anchrSize,2*this.anchrSize))}}catch(r){console.log("ObjectDetection drawEachBoxOn(box:Boundingbox, context:CanvasRenderingContext2D, isSelected:boolean):void",r.name+": ",r.message)}}},{key:"generateNewBox",value:function(t,e,n,i){try{var a=te?t:e,s=n>i?n:i;return r-a>this.lineOffset&&s-o>this.lineOffset?{x1:a,y1:o,x2:r,y2:s,lineWidth:2,color:"rgba(0,255,0,1.0)",distancetoImg:{x:0,y:0},label:"",id:this.util.generateUniquesID()}:null}catch(l){return console.log("ObjectDetection GenerateNewBox(x1:number,x2:number,y1:number,y2:number):Boundingbox",l.name+": ",l.message),null}}},{key:"getBBoxDistfromImg",value:function(t,n,i){try{var a,o=e(t);try{for(o.s();!(a=o.n()).done;){var r=a.value,s=r.x1,l=r.y1,c=r.distancetoImg,u=l-i;c.x=Ce(s-n),c.y=Ce(u)}}catch(h){o.e(h)}finally{o.f()}}catch(h){console.log("ObjectDetection GetBBoxDistfromImg(bbox:Boundingbox[],imgX:number,imgY:number)",h.name+": ",h.message)}}},{key:"getCurrentClickBox",value:function(t,e,n){try{return this.currentClickedBox=this.mouseClickOnBoxes(t,e,n),this.currentClickedBox}catch(i){return console.log("ObjectDetection getCurrentClickBox(MouseX:number, MouseY:number, box:Boundingbox[]):{box:number,pos:string}",i.name+": ",i.message),{box:-1,pos:"o"}}}},{key:"mouseClickOnBoxes",value:function(t,e,n){try{for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:"80%";this.canvas.nativeElement.style.width=t,this.canvas.nativeElement.style.height="90%",this.canvas.nativeElement.width=this.canvas.nativeElement.offsetWidth,this.canvas.nativeElement.height=this.canvas.nativeElement.offsetHeight,this.canvasContext=this.canvas.nativeElement.getContext("2d")}},{key:"emitMetadata",value:function(){this._onChangeMetadata.emit(this._selectMetadata)}},{key:"annotateSelectChange",value:function(t){this._annotateSelectState.setState(t)}},{key:"resetZoom",value:function(){this._zoomService.resetZoomScale()}},{key:"imgFitToCenter",value:function(){try{var t=this._boundingBoxCanvas.calScaleTofitScreen(this._selectMetadata.img_w,this._selectMetadata.img_h,this.canvas.nativeElement.offsetWidth,this.canvas.nativeElement.offsetHeight);this._selectMetadata.img_w*=t.factor,this._selectMetadata.img_h*=t.factor,this._boundingBoxCanvas.scaleAllBoxes(t.factor,this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y),this._selectMetadata.img_x=t.newX,this._selectMetadata.img_y=t.newY,this._boundingBoxCanvas.setGlobalXY(t.newX,t.newY),this._boundingBoxCanvas.moveAllBbox(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y),this.redrawImage(this._selectMetadata),this.resetZoom(),this.canvasContext.canvas.style.transformOrigin="0 0",this.canvasContext.canvas.style.transform="scale(1, 1)"}catch(e){console.log(e)}}},{key:"keyStrokeEvent",value:function(t){var e=this,n=t.ctrlKey,i=t.shiftKey,a=t.key;try{var o=this.boundingBoxState.isActiveModal;if(!this.mousedown&&!o&&!this.showDropdownLabelBox&&this._selectMetadata)if(!n||"c"!==a&&"C"!==a)if(!n||"v"!==a&&"V"!==a){if(n&&i&&("z"===a||"Z"===a)){if(this._undoRedoService.isAllowRedo()){var r=this._undoRedoService.redo();this._selectMetadata=Object(jt.a)(null==r?void 0:r.meta),this.redrawImage(this._selectMetadata),this.getBBoxDistanceFromImage(),this.emitMetadata()}}else if(!n||"z"!==a&&"Z"!==a)if(!o&&this.annotateState.annotation>-1&&("Delete"===a||"Backspace"===a))this._boundingBoxCanvas.deleteSingleBox(this._selectMetadata.bnd_box,this.annotateState.annotation,function(t){t&&(e.annotateSelectChange({annotation:-1,isDlbClick:!1}),e.redrawImage(e._selectMetadata),e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"}),e.emitMetadata())});else{var s="ArrowLeft"===a?"left":"ArrowRight"===a?"right":"ArrowUp"===a?"up":"ArrowDown"===a&&"down";s&&this.keyMoveBox(s)}else if(this._undoRedoService.isAllowUndo()){var l=this._undoRedoService.undo();this._selectMetadata=Object(jt.a)(null==l?void 0:l.meta),this.redrawImage(this._selectMetadata),this.getBBoxDistanceFromImage(),this.emitMetadata()}}else{if(this._copyPasteService.isAvailable()){this._copyPasteService.copy(this._selectMetadata.bnd_box[this.annotateState.annotation]);var c=this._copyPasteService.paste();c&&this._selectMetadata.bnd_box.push(c),this.annotateSelectChange({annotation:this._selectMetadata.bnd_box.length-1,isDlbClick:!1}),this.getBBoxDistanceFromImage(),this.redrawImage(this._selectMetadata)}this._undoRedoService.appendStages({meta:Object(jt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata()}else this.annotateState.annotation>-1&&this._copyPasteService.copy(this._selectMetadata.bnd_box[this.annotateState.annotation])}catch(u){console.log(u)}}},{key:"toggleEvent",value:function(t){try{this.annotateState.annotation>-1&&(this._undoRedoService.clearRedundantStages(),this.annotateSelectChange({annotation:this.annotateState.annotation,isDlbClick:!0}))}catch(e){console.log(e)}}},{key:"mouseScroll",value:function(t){try{if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)){var e=this._zoomService.calculateZoomScale(t,this.zoom,this.canvas.nativeElement),n=e.scale,i=e.x,a=e.y;this.boundingBoxState.scroll&&(this._mouseCursorService.changeCursor(this.mouseCursor,t),this._zoomService.validateZoomScale(this.canvasContext,n)&&(this.canvasContext.canvas.style.transformOrigin="".concat(t.offsetX,"px ").concat(t.offsetY,"px"),this.canvasContext.canvas.style.transform="scale(".concat(n,", ").concat(n,")"),this._zoomService.setState({scale:n}))),this.canvasContext.canvas.scrollTop=a,this.canvasContext.canvas.scrollLeft=i,this._copyPasteService.isAvailable()&&this._copyPasteService.clear()}}catch(o){console.log(o)}}},{key:"mouseDown",value:function(t){try{if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)){if(this.mousedown=!0,this.boundingBoxState.drag&&(this.changeMouseCursorState({grabbing:!0}),this._boundingBoxCanvas.setPanXY(t.offsetX,t.offsetY)),this.boundingBoxState.draw){var e=this._boundingBoxCanvas.mouseDownDrawEnable(t.offsetX,t.offsetY,this._selectMetadata.bnd_box);this.annotateSelectChange({annotation:e,isDlbClick:!1}),this.redrawImage(this._selectMetadata)}}else this.mousedown=!1}catch(n){console.log(n)}}},{key:"mouseUp",value:function(t){try{this.boundingBoxState.draw&&this.mousedown&&this.finishDrawBoundingBox(t),this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)&&(this.boundingBoxState.drag&&this.mousedown&&this._boundingBoxCanvas.setGlobalXY(this._selectMetadata.img_x,this._selectMetadata.img_y),this.mousedown=!1)}catch(e){console.log(e)}}},{key:"mouseMove",value:function(t){var e=this;try{if(this._selectMetadata)if(this._boundingBoxCanvas.mouseClickWithinPointPath(this._selectMetadata,t)&&!this.showDropdownLabelBox){if(this.boundingBoxState.drag&&this.mousedown){var n=this._boundingBoxCanvas.getDiffXY(t);this._selectMetadata.img_x=n.diffX,this._selectMetadata.img_y=n.diffY,this._boundingBoxCanvas.panRectangle(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y,function(t){if(t){var n=Object(jt.a)(e._selectMetadata);e._undoRedoService.isMethodChange("pan")?e._undoRedoService.appendStages({meta:n,method:"pan"}):e._undoRedoService.replaceStages({meta:n,method:"pan"})}}),this.redrawImage(this._selectMetadata)}else this.boundingBoxState.drag&&!this.mousedown&&this.changeMouseCursorState({grab:!0});if(this.boundingBoxState.draw&&this.mousedown&&(this._boundingBoxCanvas.mouseMoveDrawEnable(t.offsetX,t.offsetY,this._selectMetadata),this.redrawImage(this._selectMetadata)),this.boundingBoxState.draw&&!this.mousedown){var i=this._boundingBoxCanvas.getCurrentClickBox(t.offsetX,t.offsetY,this._selectMetadata.bnd_box),a=i.box,o=i.pos;this.changeMouseCursorState(-1!==a?"tl"===o?{"nw-resize":!0}:"tr"===o?{"ne-resize":!0}:"bl"===o?{"sw-resize":!0}:"br"===o?{"se-resize":!0}:"l"===o||"r"===o?{"w-resize":!0}:"t"===o||"b"===o?{"n-resize":!0}:{move:!0}:{crosshair:!0})}}else this.changeMouseCursorState()}catch(r){console.log(r)}}},{key:"finishDrawBoundingBox",value:function(t){var e=this;this.getLabelList(),this.sortingLabelList(this.labelList,this._tabStatus[2].annotation&&this._tabStatus[2].annotation[0].bnd_box?this._tabStatus[2].annotation[0].bnd_box:[]);var n=this._boundingBoxCanvas.mouseUpDrawEnable(this._selectMetadata,this.labelList,function(t){t&&(e._undoRedoService.isStateChange(e._selectMetadata.bnd_box)&&e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"}),e.getBBoxDistanceFromImage(),e.emitMetadata())});if(n.isNew||"mouseout"===t.type){var i=t.offsetY*(100/document.documentElement.clientHeight)+8.5,a=t.offsetX*(100/document.documentElement.clientWidth)+2.5;i<9&&(i=9),i>76&&(i=76),a<2.5&&(a=2.5),a>66&&(a=66),this.floatdiv.nativeElement.style.top=i.toString()+"vh",this.floatdiv.nativeElement.style.left=a.toString()+"vw",this.showDropdownLabelBox=!0,this.labelSearch="",this.invalidInput=!1,setTimeout(function(){e.lbltypetxt.nativeElement.focus()},100)}else this.showDropdownLabelBox=!1;n.isNew&&this.annotateSelectChange({annotation:n.selBox,isDlbClick:!1})}},{key:"changeMouseCursorState",value:function(t){this._mouseCursorService.setState(t)}},{key:"mouseOut",value:function(t){var e,n;try{this.boundingBoxState.draw&&this.mousedown&&this.finishDrawBoundingBox(t),"canvasstyle"!==t.target.className&&!t.target.className.includes("unclosedOut")||(null===(e=t.relatedTarget)||void 0===e?void 0:e.className.includes("unclosedOut"))||(null===(n=t.relatedTarget)||void 0===n?void 0:n.className.includes("canvasstyle"))||0!==this._selectMetadata.bnd_box.filter(function(t){return""===t.label}).length&&(this.showDropdownLabelBox=!1,this._selectMetadata.bnd_box=this._selectMetadata.bnd_box.filter(function(t){return""!==t.label}),this._onChangeMetadata.emit(this._selectMetadata),this.redrawImage(this._selectMetadata),alert("Some bounding boxes will be deleted because they were not labelled.")),this.boundingBoxState.drag&&this.mousedown&&(this._boundingBoxCanvas.setGlobalXY(this._selectMetadata.img_x,this._selectMetadata.img_y),this.redrawImage(this._selectMetadata)),this.mousedown=!1}catch(i){console.log(i)}}},{key:"loadImage",value:function(t){var e=this;try{this.showDropdownLabelBox=!1,this.image.src=t,this.image.onload=function(){e._selectMetadata.img_w=e._selectMetadata.img_w<1?e._selectMetadata.img_ori_w:e._selectMetadata.img_w,e._selectMetadata.img_h=e._selectMetadata.img_h<1?e._selectMetadata.img_ori_h:e._selectMetadata.img_h,e._boundingBoxCanvas.setGlobalXY(e._selectMetadata.img_x,e._selectMetadata.img_y),e.imgFitToCenter(),e.emitMetadata(),e.changeMouseCursorState(),e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"})}}catch(n){console.log(n)}}},{key:"keyMoveBox",value:function(t){var e=this;try{var n=this._selectMetadata.bnd_box[this.annotateState.annotation];n&&this._boundingBoxCanvas.keyboardMoveBox(t,n,this._selectMetadata,function(t){t&&(e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"}),e.getBBoxDistanceFromImage(),e.redrawImage(e._selectMetadata),e.emitMetadata())})}catch(i){console.log(i)}}},{key:"redrawImage",value:function(t){var e,n=t.img_x,i=t.img_y,a=t.img_w,o=t.img_h;this.clearCanvas(),this.canvasContext.drawImage(this.image,n,i,a,o),0!==(null===(e=this._tabStatus[2].annotation)||void 0===e?void 0:e.length)&&(this.getLabelList(),this.sortingLabelList(this.labelList,this._tabStatus[2].annotation&&this._tabStatus[2].annotation[0].bnd_box?this._tabStatus[2].annotation[0].bnd_box:[])),this._boundingBoxCanvas.drawAllBoxOn(this.labelList,this._selectMetadata.bnd_box,this.canvasContext)}},{key:"clearCanvas",value:function(){this.canvasContext.clearRect(0,0,this.canvas.nativeElement.width,this.canvas.nativeElement.height)}},{key:"getBBoxDistanceFromImage",value:function(){this._boundingBoxCanvas.getBBoxDistfromImg(this._selectMetadata.bnd_box,this._selectMetadata.img_x,this._selectMetadata.img_y)}},{key:"getLabelList",value:function(){var t=this;this.labelList=[],this.allLabelList=[],(this._tabStatus[1].label_list?this._tabStatus[1].label_list:[]).forEach(function(e){t.labelList.push({name:e,count:0}),t.allLabelList.push({name:e,count:0})})}},{key:"labelTypeTextChange",value:function(t){this.labelList=this.allLabelList.filter(function(e){return e.name.includes(t)})}},{key:"labelNameClicked",value:function(t){this.showDropdownLabelBox=!1,this._onChangeAnnotationLabel.emit({label:t,index:this.annotateState.annotation}),this._selectMetadata.bnd_box[this.annotateState.annotation].label=t,this._undoRedoService.isStateChange(this._selectMetadata.bnd_box)&&this._undoRedoService.appendStages({meta:this._selectMetadata,method:"draw"})}},{key:"sortingLabelList",value:function(t,e){var n=this;t.forEach(function(t,i){var a=t.name;n.labelList[i].count=e.filter(function(t){return t.label===a}).length,n.allLabelList[i].count=e.filter(function(t){return t.label===a}).length}),this.labelList.sort(function(t,e){return t.count-1?this.findPolygonArea(t,e):this.findClickPoint(l,c,e).polygonIndex,this.setPolygonLineWidth(e,this.selectedPolygonIndex),this.setNewPolygon(!1)),this.selectedPolygonIndex}},{key:"mouseMoveDraw",value:function(t,e,n,i,a,o,r,s){var l=this.findPolygonArea(a,t),c=this.isNewPolygon(),u=this.clickPoint,h=u.pointIndex,d=u.polygonIndex;if(c&&r&&o){var f=this.getDiffXY(a),b=f.diffX,g=f.diffY;t.img_x=b,t.img_y=g,this.panPolygons(t,!0),s("pan")}else c?(this.drawNewPolygon(t,e,n,i,!1),this.drawfromPreviousPoint(a,n)):r&&-1===h&&this.selectedPolygonIndex>-1?(this.mouseMovePolygon(a,t,n,this.selectedPolygonIndex,e,i),this.resetClipPath(t),s("pan")):r&&h>-1&&d>-1&&(this.setPolygonCoordinate(a,t,this.clickPoint),s("draw"));return l>-1}},{key:"setPanXY",value:function(t){var e=t.offsetX,n=t.offsetY;try{this.panXY={x:e,y:n}}catch(i){console.log("setPanXY",i)}}},{key:"getPanXY",value:function(){return this.panXY}},{key:"getDiffXY",value:function(t){var e=t.offsetX,n=t.offsetY;try{var i={diffX:0,diffY:0},a=this.getGlobalXY(),o=a.x,r=a.y;return i.diffX=o+(e-this.panXY.x),i.diffY=r+(n-this.panXY.y),i}catch(s){return console.log(s),{diffX:-1,diffY:-1}}}},{key:"setSelectedPolygon",value:function(t,e){this.selectedPolygonIndex=t,e&&this.setPolygonLineWidth(e,this.selectedPolygonIndex)}},{key:"getSelectedPolygonIndex",value:function(){return this.selectedPolygonIndex}},{key:"mouseClickWithinPointPath",value:function(t,e){var n=t.img_x,i=t.img_y,a=t.img_w,o=t.img_h,r=e.offsetX,s=e.offsetY;return r>n&&ri&&s1?(this.tmpPolygon.coorPt.pop(),!1):(this.resetDrawing(t,n,e,i),!0)}catch(o){return console.log("removeLastPoint",o),!1}}},{key:"calculatePointDistance",value:function(t,e,n,i){try{var a=t-n,o=e-i;return Math.sqrt(a*a+o*o)}catch(r){return void console.log("calculatePointDistance",r)}}},{key:"generateNewTempPolygon",value:function(t){try{var e=this.util.generateUniquesID(),n=(t+1).toString();this.tmpPolygon={coorPt:[],label:this.labelList.length>0?this.labelList[0].name:"",id:e,lineWidth:2,color:"rgba(0,255,0,1.0)",region:n,subLabel:[]}}catch(i){console.log("generateNewTempPolygon",i)}}},{key:"getClickPoint",value:function(){return this.clickPoint}},{key:"resetClickPoint",value:function(){this.clickPoint={pointIndex:-1,polygonIndex:-1}}},{key:"resetDrawing",value:function(t,e,n,i){try{this.tmpPolygon=null,this.setNewPolygon(!1),this.redraw(t,e,n,i,-1)}catch(a){console.log("resetDrawing",a)}}},{key:"setNewPolygon",value:function(t){this.isNewPoly=t}},{key:"redraw",value:function(t,e,n,i,a){var o=i.width,r=i.height;try{var s=t.img_w,l=t.img_h,c=t.img_x,u=t.img_y;n.restore(),n.clearRect(0,0,o,r),n.save(),n.beginPath(),n.rect(c,u,s,l),n.clip(),n.beginPath(),n.drawImage(e,c,u,s,l),this.drawAllPolygon(t,n,a)}catch(h){console.log("redraw",h)}}},{key:"drawAllPolygon",value:function(t,e,n){try{this.validatePolygonMetadata(t.polygons)&&(this.drawAllPolygonLine(t,e),this.drawAllPolygonsDots(t,e,n,this.radius),this.plotAllFloatLabel(t,e))}catch(i){console.log("drawAllPolygon",i)}}},{key:"validatePolygonMetadata",value:function(t){return t.length>0}},{key:"drawAllPolygonLine",value:function(n,i){var a=n.polygons;try{var o,r=e(a.entries());try{for(r.s();!(o=r.n()).done;){var s=t(o.value,2),l=(s[0],s[1]),c=l.lineWidth,u=l.color,h=l.coorPt;i.lineWidth=c,i.strokeStyle=u||"white",i.fillStyle=u||"white",i.beginPath(),i.moveTo(h[0].x,h[0].y);var d,f=e(h.entries());try{for(f.s();!(d=f.n()).done;){var b=t(d.value,1)[0];b+1-1){var c=-3;switch(i){case"up":if(this.withinPointPath(n,a,{offsetX:0,offsetY:c})){var u,h=e(n.polygons[a].coorPt.entries());try{for(h.s();!(u=h.n()).done;){var d=t(u.value,1)[0];n.polygons[a].coorPt[d].y+=c}}catch(w){h.e(w)}finally{h.f()}}break;case"down":if(this.withinPointPath(n,a,{offsetX:0,offsetY:c})){var f,b=e(n.polygons[a].coorPt.entries());try{for(b.s();!(f=b.n()).done;){var g=t(f.value,1)[0];n.polygons[a].coorPt[g].y-=c}}catch(w){b.e(w)}finally{b.f()}}break;case"left":if(this.withinPointPath(n,a,{offsetX:c,offsetY:0})){var m,v=e(n.polygons[a].coorPt.entries());try{for(v.s();!(m=v.n()).done;){var p=t(m.value,1)[0];n.polygons[a].coorPt[p].x+=c}}catch(w){v.e(w)}finally{v.f()}}break;case"right":if(this.withinPointPath(n,a,{offsetX:c,offsetY:0})){var _,y=e(n.polygons[a].coorPt.entries());try{for(y.s();!(_=y.n()).done;){var x=t(_.value,1)[0];n.polygons[a].coorPt[x].x-=c}}catch(w){y.e(w)}finally{y.f()}}}this.redraw(n,o,r,s,a),l(!0)}return!0}catch(w){return console.log("keyboardMovePolygon",w),!0}}},{key:"withinPointPath",value:function(n,i,a){var o=n.polygons,r=n.img_x,s=n.img_y,l=n.img_w,c=n.img_h,u=a.offsetX,h=a.offsetY;try{var d,f=e(o[i].coorPt.entries());try{for(f.s();!(d=f.n()).done;){var b=t(d.value,1)[0];return!(o[i].coorPt[b].x+ur+l||o[i].coorPt[b].y+hs+c)}}catch(g){f.e(g)}finally{f.f()}}catch(g){return!1}}},{key:"validateXYDistance",value:function(n){try{var i,a=e(n.polygons.entries());try{for(a.s();!(i=a.n()).done;){var o,r=t(i.value,1)[0],s=e(n.polygons[r].coorPt.entries());try{for(s.s();!(o=s.n()).done;){var l=t(o.value,1)[0],c=n.polygons[r].coorPt[l].y-n.img_y;n.polygons[r].coorPt[l].distancetoImg.x=n.polygons[r].coorPt[l].x-n.img_x,n.polygons[r].coorPt[l].distancetoImg.y=c}}catch(u){s.e(u)}finally{s.f()}}}catch(u){a.e(u)}finally{a.f()}}catch(u){console.log("validateXYDistance",u)}}},{key:"setPolygonLineWidth",value:function(t,e){try{t.polygons=t.polygons.map(function(t,n){return Object.assign(Object.assign({},t),{lineWidth:t.lineWidth=n===e?2:1,color:t.color=n===e?"rgba(0,255,0,1.0)":"rgba(255,255,0,0.8)"})})}catch(n){console.log("setPolygonLineWidth",n)}}},{key:"drawNewPolygon",value:function(n,i,a,o,r){var s;try{if(this.redraw(n,i,a,o,-1),null===(s=this.tmpPolygon)||void 0===s?void 0:s.coorPt){var l,c=e(this.tmpPolygon.coorPt.entries());try{for(c.s();!(l=c.n()).done;){var u=t(l.value,2),h=(u[0],u[1]),d=h.x,f=h.y;a.strokeStyle="green",a.fillStyle="green",a.beginPath(),a.arc(d,f,this.radius,0,2*Math.PI),a.fill(),a.closePath(),a.stroke()}}catch(p){c.e(p)}finally{c.f()}a.beginPath(),a.lineWidth=this.tmpPolygon.lineWidth,a.strokeStyle=this.tmpPolygon.color,a.fillStyle=this.tmpPolygon.color,a.moveTo(this.tmpPolygon.coorPt[0].x,this.tmpPolygon.coorPt[0].y);var b,g=e(this.tmpPolygon.coorPt.entries());try{for(g.s();!(b=g.n()).done;){var m=t(b.value,1)[0];m+1-1&&r>-1&&(e.polygons[o].coorPt[r].x=i,e.polygons[o].coorPt[r].y=a)}catch(s){console.log("setPolygonCoordinate",s)}}},{key:"insidePolygonArea",value:function(t,e){var n=e.offsetX,i=e.offsetY;try{for(var a=!1,o=0,r=t.length-1;oi!=t[r].y>i&&n<(t[r].x-t[o].x)*(i-t[o].y)/(t[r].y-t[o].y)+t[o].x&&(a=!a);return a}catch(s){return console.log("insidePolygonArea",s),!1}}},{key:"calPolygonArea",value:function(t){var e=t.coorPt;try{for(var n=0,i=e.length-1,a=0;a-1&&this.annotateStateChange({annotation:this.annotateState.annotation,isDlbClick:!0}))}},{key:"canvasKeyDownEvent",value:function(t){var e=this,n=t.ctrlKey,i=t.shiftKey,a=t.key;try{if(this.validateEndDrawPolygon(this.segState,this.isMouseWithinPoint,this.canvasContext)){if(this._segCanvasService.isNewPolygon())switch(a){case"Enter":this._segCanvasService.drawNewPolygon(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement,!0),this.positioningLabelListPopup(this._selectMetadata.polygons),this.annotateStateChange({annotation:this._selectMetadata.polygons.length-1}),this._segCanvasService.validateXYDistance(this._selectMetadata),this._undoRedoService.appendStages({meta:Object(jt.a)(this._selectMetadata),method:"draw"}),this.redrawImage(this._selectMetadata),this.emitMetadata();break;case"Escape":this._segCanvasService.resetDrawing(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement)}else switch(a){case"Delete":case"Backspace":this._segCanvasService.deleteSinglePolygon(this._selectMetadata,this.annotateState.annotation,function(t){t&&(e.annotateStateChange(),e.redrawImage(e._selectMetadata),e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"}),e.emitMetadata())})}var o="ArrowLeft"===a?"left":"ArrowRight"===a?"right":"ArrowUp"===a?"up":"ArrowDown"===a&&"down";o&&this.keyMoveBox(o)}if(!n||"c"!==a&&"C"!==a)if(!n||"v"!==a&&"V"!==a){if(n&&i&&("z"===a||"Z"===a)){if(this._undoRedoService.isAllowRedo()){var r=this._undoRedoService.redo();this._selectMetadata=Object(jt.a)(null==r?void 0:r.meta),this.redrawImage(this._selectMetadata),this.emitMetadata()}}else if(n&&("z"===a||"Z"===a)&&this._undoRedoService.isAllowUndo()){var s=this._undoRedoService.undo();this._selectMetadata=Object(jt.a)(null==s?void 0:s.meta),this.redrawImage(this._selectMetadata),this.emitMetadata()}}else this._copyPasteService.isAvailable()&&(this._selectMetadata.polygons.push(this._copyPasteService.paste()),this.annotateStateChange({annotation:this._selectMetadata.polygons.length-1}),this._segCanvasService.validateXYDistance(this._selectMetadata)),this._undoRedoService.appendStages({meta:Object(jt.a)(this._selectMetadata),method:"draw"}),this.emitMetadata();else this.annotateState.annotation>-1&&this._copyPasteService.copy(this._selectMetadata.polygons[this.annotateState.annotation])}catch(l){console.log("canvasKeyDownEvent",l)}}},{key:"keyMoveBox",value:function(t){var e=this;try{this._selectMetadata.polygons[this.annotateState.annotation]&&this._segCanvasService.keyboardMovePolygon(this._selectMetadata,t,this.annotateState.annotation,this.image,this.canvasContext,this.canvas.nativeElement,function(t){t&&(e._undoRedoService.appendStages({meta:Object(jt.a)(e._selectMetadata),method:"draw"}),e._segCanvasService.validateXYDistance(e._selectMetadata),e.redrawImage(e._selectMetadata),e.emitMetadata())})}catch(n){console.log("keyMoveBox",n)}}},{key:"mouseDown",value:function(t){var e;try{if(this.isMouseWithinPoint=this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t),this.isMouseWithinPoint)if(this.mousedown=!0,this.segState.drag&&(this.changeMouseCursorState({grabbing:!0}),this._segCanvasService.setPanXY(t),this.initializeCanvas(),this.redrawImage(this._selectMetadata)),this.segState.draw){this.getLabelList();var n=this._tabStatus[2].annotation&&null!==(e=this._tabStatus[2].annotation[0].polygons)&&void 0!==e?e:[];this.sortingLabelList(this.labelList,n),this.showDropdownLabelBox=!1;var i=this._segCanvasService.mouseDownDraw(t,this._selectMetadata,this.canvas.nativeElement,this.image,this.canvasContext,this.ctrlKey,this.altKey,this.labelList);if(i>-1)this._segCanvasService.setGlobalXY(t);else{var a=this._selectMetadata,o=a.img_x,r=a.img_y;this._segCanvasService.setGlobalXY({offsetX:o,offsetY:r})}this.annotateStateChange({annotation:i}),this.redrawImage(this._selectMetadata),this.mouseMoveDrawCanvas(t)}else this.segState.draw&&!this.mousedown&&this.redrawImage(this._selectMetadata);else this.mousedown=!1}catch(s){console.log("mouseDown",s)}}},{key:"mouseUp",value:function(t){try{this.isMouseWithinPoint=this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t);var e=this._segCanvasService.isNewPolygon();if(this._selectMetadata&&this.isMouseWithinPoint)if(this.mousedown){var n=this._selectMetadata,i=n.img_x,a=n.img_y;this.segState.drag&&this._segCanvasService.setGlobalXY({offsetX:i,offsetY:a}),this.segState.draw&&!e&&this.annotateState.annotation>-1&&this._undoRedoService.isStateChange(this._selectMetadata.polygons)&&(this._undoRedoService.appendStages({meta:Object(jt.a)(this._selectMetadata),method:"draw"}),this._segCanvasService.setGlobalXY({offsetX:i,offsetY:a}),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata())}else{var o=this._segCanvasService.getClickPoint(),r=o.pointIndex,s=o.polygonIndex;this.segState.draw&&s>-1&&r>-1?this._undoRedoService.isStateChange(this._selectMetadata.polygons)&&(this._undoRedoService.appendStages({meta:Object(jt.a)(this._selectMetadata),method:"draw"}),this._segCanvasService.resetClickPoint(),this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata()):this.segState.draw&&(this._segCanvasService.validateXYDistance(this._selectMetadata),this.redrawImage(this._selectMetadata),this.emitMetadata())}this.mousedown=!1}catch(l){console.log("mouseUp",l)}}},{key:"mouseMove",value:function(t){var e=this;try{if(this.isMouseWithinPoint=this._selectMetadata&&this._segCanvasService.mouseClickWithinPointPath(this._selectMetadata,t),this.isMouseWithinPoint){if(this.segState.drag&&this.mousedown){var n=this._segCanvasService.getDiffXY(t),i=n.diffX,a=n.diffY;this._selectMetadata.img_x=i,this._selectMetadata.img_y=a,this._segCanvasService.panPolygons(this._selectMetadata,!1,function(t){if(t){var n=Object(jt.a)(e._selectMetadata);e._undoRedoService.isMethodChange("pan")?e._undoRedoService.appendStages({meta:n,method:"pan"}):e._undoRedoService.replaceStages({meta:n,method:"pan"})}}),this.redrawImage(this._selectMetadata)}else this.segState.drag&&!this.mousedown&&this.changeMouseCursorState({grab:!0});if(this.segState.draw){var o=this.mouseMoveDrawCanvas(t);this.changeMouseCursorState(o?{move:!0}:{crosshair:!0})}}else this.changeMouseCursorState(),this.mousedown=!1}catch(r){console.log("mouseMove",r)}}},{key:"mouseMoveDrawCanvas",value:function(t){var e=this;return this._segCanvasService.mouseMoveDraw(this._selectMetadata,this.image,this.canvasContext,this.canvas.nativeElement,t,this.ctrlKey,this.mousedown,function(t){e.redrawImage(e._selectMetadata)})}},{key:"changeMouseCursorState",value:function(t){this._mouseCursorService.setState(t)}},{key:"mouseOut",value:function(t){var e,n;try{this.segState.drag&&this.isMouseWithinPoint&&this.mousedown&&(this._segCanvasService.setGlobalXY(t),this.redrawImage(this._selectMetadata)),"canvasstyle"!==t.target.className&&!t.target.className.includes("unclosedOut")||(null===(e=t.relatedTarget)||void 0===e?void 0:e.className.includes("unclosedOut"))||(null===(n=t.relatedTarget)||void 0===n?void 0:n.className.includes("canvasstyle"))||(this.showDropdownLabelBox=!1,0!==this._selectMetadata.polygons.filter(function(t){return!t.label}).length&&(this._selectMetadata.polygons=this._selectMetadata.polygons.filter(function(t){return""!==t.label}),this._onChangeMetadata.emit(this._selectMetadata),this.redrawImage(this._selectMetadata),alert("Some bounding boxes will be deleted because they were not labelled."))),this.isMouseWithinPoint=!1}catch(i){console.log("mouseOut",i)}}},{key:"currentCursor",value:function(){return this._mouseCursorService.changeCursor(this.mouseCursor)}},{key:"positioningLabelListPopup",value:function(t){var e=this,n=t[this._selectMetadata.polygons.length-1].coorPt[this._selectMetadata.polygons[this._selectMetadata.polygons.length-1].coorPt.length-1].y*(100/document.documentElement.clientHeight)+8.5,i=t[this._selectMetadata.polygons.length-1].coorPt[this._selectMetadata.polygons[this._selectMetadata.polygons.length-1].coorPt.length-1].x*(100/document.documentElement.clientWidth)+2.5;n<9&&(n=9),n>76&&(n=76),i<2.5&&(i=2.5),i>66&&(i=66),this.floatdiv.nativeElement.style.top=n.toString()+"vh",this.floatdiv.nativeElement.style.left=i.toString()+"vw",this.showDropdownLabelBox=!0,this.labelSearch="",setTimeout(function(){e.lbltypetxt.nativeElement.focus()},100)}},{key:"getLabelList",value:function(){var t,e=this;this.labelList=[],this.allLabelList=[],(null!==(t=this._tabStatus[1].label_list)&&void 0!==t?t:[]).forEach(function(t){var n={name:t,count:0};e.labelList.push(n),e.allLabelList.push(n)})}},{key:"sortingLabelList",value:function(t,e){var n=this;t.forEach(function(t,i){var a=t.name;n.labelList[i].count=e.filter(function(t){return t.label===a}).length,n.allLabelList[i].count=e.filter(function(t){return t.label===a}).length}),this.labelList.sort(function(t,e){return t.count0&&i===a.currentAnnotationIndex)}}function pn(t,e){if(1&t&&(S.Kb(0),S.mc(1,vn,2,1,"ng-container",23),S.Jb()),2&t){var n=e.$implicit;S.xb(1),S.ac("ngForOf",null==n?null:n.bnd_box)}}function _n(t,e){if(1&t&&(S.Kb(0),S.mc(1,pn,2,1,"ng-container",23),S.Jb()),2&t){var n=e.$implicit;S.xb(1),S.ac("ngForOf",n.annotation)}}function yn(t,e){if(1&t&&(S.Mb(0,"tr"),S.Ib(1,"td",72),S.Wb(2,"translate"),S.Ib(3,"td",72),S.Wb(4,"translate"),S.Lb()),2&t){var n=e.$implicit;S.xb(1),S.bc("innerHTML",S.Xb(2,2,n.shortcutKey),S.ic),S.xb(2),S.bc("innerHTML",S.Xb(4,4,n.functionality),S.ic)}}function xn(t,e){if(1&t&&(S.Mb(0,"p",73),S.oc(1),S.Wb(2,"translate"),S.Ib(3,"br"),S.oc(4),S.Lb()),2&t){var n=S.Vb();S.xb(1),S.qc(" ",S.Xb(2,2,"location"),""),S.xb(3),S.qc("",n.modalSpanLocationPath," ")}}var wn,kn,Sn,Cn,Mn=[{path:"",component:(wn=function(){function e(a,o,s,l,c,u,h,d,f,b,g){var S=this;r(this,e),this._router=a,this._imgLblApiService=o,this._modalService=s,this._dataSetService=l,this._annotateService=c,this._imgLblActionService=u,this._imgLblLayoutService=h,this._imgLblModeService=d,this._languageService=f,this._spinnerService=b,this._exportSaveFormatService=g,this.currentUrl="",this.selectedProjectName="",this.imgSrc="",this.loading=!1,this.thumbnailList=[],this.unsubscribe$=new y.a,this.subject$=new y.a,this.tabStatus=[{name:"labellingProject.project",closed:!1},{name:"labellingProject.label",closed:!1,label_list:[]},{name:"labellingProject.annotation",closed:!1,annotation:[]}],this.mainLabelRegionVal="",this.subLabelRegionVal="",this.subLabelValidateMsg="",this.currentAnnotationLabel="",this.currentAnnotationIndex=-1,this.currentImageDisplayIndex=-1,this.isLoading=!1,this.showLoading=!1,this.processingNum=0,this.unsupportedImageList=[],this.spanClass="",this.modalSpanMessage="",this.modalSpanLocationPath="",this.sliceNum=0,this.labelList=[],this.isOverlayOn=!1,this.blockLoadThumbnails=!1,this.totalUuid=0,this.labelChoosen=[],this.tempLabelChoosen=[],this.modalExportOptions="modal-export-options",this.modalExportProject="modal-export-project",this.modalShortcutKeyInfo="modal-shortcut-key-info",this.modalUnsupportedImage="modal-unsupported-image",this.exportModalBodyStyle={minHeight:"15vh",maxHeight:"15vh",minWidth:"19.5vw",maxWidth:"19.5vw",margin:"15vw 71vh",overflow:"none"},this.saveModalBodyStyle={maxHeight:"80vh",minWidth:"28vw",maxWidth:"28vw",margin:"10vh 28vw",overflow:"none"},this.advModalBodyStyle={maxHeight:"80vh",minWidth:"18vw",maxWidth:"18vw",margin:"10vh 28vw",overflow:"none"},this.infoModalBodyStyle={maxHeight:"80vh",minWidth:"40vw",maxWidth:"40vw",margin:"20vh 23vw",padding:"0vh 0vw 3vh 0vw",overflow:"none"},this.exportProjectBodyStyle={minHeight:"10vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.unsupportedImageBodyStyle={minHeight:"18vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.saveType={saveCurrentImage:!0,saveBulk:!1},this.projectList={projects:[],isUploading:!1,isFetching:!1},this.startProject=function(e){S.isLoading=!0,S.selectedProjectName=e;var a=S._dataSetService.checkProjectStatus(e),o=S._dataSetService.updateProjectLoadStatus(e),r=S._dataSetService.checkExistProjectStatus(e),s=S._dataSetService.getThumbnailList;S.subjectSubscription=S.subject$.pipe(Object(v.a)(function(){return Object(x.a)([a])}),Object(p.a)(function(e){var n=t(e,1)[0],i=n.message,a=n.content;S.totalUuid=a[0].total_uuid,S.projectList={isUploading:S.projectList.isUploading,isFetching:S.projectList.isFetching,projects:S.projectList.projects.map(function(t){return t.project_name===a[0].project_name?Object.assign(Object.assign({},a[0]),{created_date:t.created_date}):t})};var o=a[0].is_loaded;return 1===i&&!o}),Object(v.a)(function(e){return t(e,1)[0].message?Object(x.a)([o,r]):[]}),Object(v.a)(function(a){var o=t(a,2);n(o[0]);var l=o[1],c=l.message,u=l.uuid_list,h=l.label_list;return 2===c?(S.labelList=i(h),S.tabStatus[1].label_list=S.labelList,u.length>0?u.map(function(t){return s(e,t)}):[]):Object(w.a)(500).pipe(Object(v.a)(function(){return r}),Object(p.a)(function(t){return 2===t.message}),Object(v.a)(function(t){var n=t.uuid_list,i=t.label_list;return console.log(n.length),S.tabStatus[1].label_list=i,n.length>0?n.slice(S.sliceNum,S.sliceNum+=20).map(function(t){return s(e,t)}):[]}))}),Object(v.a)(function(t){return t})).subscribe(function(t){S.thumbnailList=[].concat(i(S.thumbnailList),[t]),S.onChangeSchema=Object.assign(Object.assign({},S.onChangeSchema),{totalNumThumbnail:S.thumbnailList.length})},function(t){},function(){S.isLoading=!1,S._annotateService.labelStaging$.pipe(Object(_.a)(S.unsubscribe$)).subscribe(function(t){var e=t.annotation;t.isDlbClick?(S.currentAnnotationIndex=e,S.tabStatus.forEach(function(t){var n=t.annotation;return null==n?void 0:n.forEach(function(t){var n=t.bnd_box,i=t.polygons,a=null!=n?n:i;if(a){var o=a[e],r=o.label,s=o.region;S.currentAnnotationLabel=r,S.mainLabelRegionVal=s||""}else console.log("missing prop bnd_box OR polygons")})}),S._imgLblActionService.setState({isActiveModal:!0,draw:!1,drag:!1,scroll:!1}),S.onDisplayModal()):(S.currentAnnotationLabel="",S.currentAnnotationIndex=e)}),S._imgLblActionService.action$.pipe(Object(_.a)(S.unsubscribe$)).subscribe(function(t){var e=t.clear,n=t.save,i=t.keyInfo;e&&(S.thumbnailList[0].bnd_box&&(S.thumbnailList[S.currentImageDisplayIndex].bnd_box=[]),S.thumbnailList[0].polygons&&(S.thumbnailList[S.currentImageDisplayIndex].polygons=[]),S.onChangeSchema=Object.assign(Object.assign({},S.onChangeSchema),{hasAnnotation:!1})),n&&(S.labelChoosen=S.tabStatus[1].label_list?S.tabStatus[1].label_list.map(function(t){return{label:t,isChoosen:!0}}):[],S.onDisplayModal("modal-save")),i&&S.onDisplayShortcutKeyInfo()}),S.navigateByAction({thumbnailAction:1}),S._spinnerService.hideSpinner()}),S.subject$.next()},this.loadThumbnails=function(){if(!S.blockLoadThumbnails&&S.sliceNum0?n.slice(S.sliceNum,S.sliceNum+=10).map(function(t){return e(S.selectedProjectName,t)}):[]}))}),Object(v.a)(function(t){return t})).subscribe(function(t){S.thumbnailList=[].concat(i(S.thumbnailList),[t]),S.onChangeSchema=Object.assign(Object.assign({},S.onChangeSchema),{totalNumThumbnail:S.thumbnailList.length})},function(t){},function(){S.blockLoadThumbnails=!1,S._spinnerService.hideSpinner()}),S.subject$.next()}},this.updateProjectProgress=function(){S._imgLblLayoutService.updateProjectProgress(S.tabStatus,S.selectedProjectName)},this.onChangeMetadata=function(t){S.tabStatus=S.tabStatus.map(function(e){return e.annotation?Object.assign(Object.assign({},e),{annotation:[t]}):e}),S.thumbnailList=S.thumbnailList.map(function(e,n){return S.currentImageDisplayIndex===n?t:e});var e=t.bnd_box?t.bnd_box.length>0:t.polygons.length>0;S.onChangeSchema=Object.assign(Object.assign({},S.onChangeSchema),{hasAnnotation:e}),S.updateProjectProgress()},this.onToggleTab=function(t){var e=t.name,n=t.closed;!S.tabStatus.some(function(t){return t.name.toLowerCase()===e.toLowerCase()&&t.closed===n})&&(S.tabStatus=S.tabStatus.map(function(t){return t.name.toLowerCase()===e.toLowerCase()?Object.assign(Object.assign({},t),{closed:n}):Object.assign({},t)}))},this.onExport=function(){S.modalSpanMessage="",S.modalSpanLocationPath="",S._modalService.open(S.modalExportOptions)},this.exportProject=function(t){"cfgdata"===t&&S.processingNum++;var e=S.selectedProjectName,n=S._imgLblApiService.exportProject(e,t),i=S._imgLblApiService.exportProjectStatus();S.subjectSubscription=S.subject$.pipe(Object(p.a)(),Object(v.a)(function(){return n}),Object(v.a)(function(t){return 1===t.message?Object(w.a)(500).pipe(Object(v.a)(function(){return i}),Object(p.a)(function(t){var e=t.export_status;return S.isOverlayOn=1===e,S.isLoading=1===e,0===e||2===e||3===e})):Object(k.a)(function(t){return console.error(t),t})})).subscribe(function(n){var i=n.export_status,a=n.project_config_path;"cfgdata"===t&&S.processingNum--,2===i?S._languageService._translate.get("exportSuccess").subscribe(function(t){S.toggleExportProjectModalMessage(!0),S.modalSpanMessage=e+t,S.modalSpanLocationPath=a,S.processIsSuccess(!0)}):S._languageService._translate.get("exportFailed").subscribe(function(t){S.toggleExportProjectModalMessage(!0),S.modalSpanMessage=t+e,S.processIsSuccess(!1)})},function(t){},function(){S.closeExportProjectModal()}),S.subject$.next()},this.toggleExportProjectModalMessage=function(t){S._modalService.open(S.modalExportProject)},this.processIsSuccess=function(t){S.spanClass=t?"validation-success":"validation-error"},this.onReload=function(){var t=S.selectedProjectName,e=S._imgLblApiService.reloadProject(t),n=S._imgLblApiService.reloadProjectStatus(t),i=S._dataSetService.getThumbnailList,a=[];S.subjectSubscription=S.subject$.pipe(Object(p.a)(),Object(v.a)(function(){return e}),Object(v.a)(function(e){return 5!==(a=e.message)&&1===a?Object(w.a)(500).pipe(Object(v.a)(function(){return n}),Object(p.a)(function(t){var e=t.file_system_status,n=t.unsupported_image_list;return S.unsupportedImageList=n,3===e||0===e}),Object(v.a)(function(e){S.isLoading=!0;var n=[];S.thumbnailList.forEach(function(t){n.push(t.uuid)}),e.uuid_add_list.forEach(function(t){n.push(t),S.totalUuid++}),e.uuid_delete_list.forEach(function(t){n=n.filter(function(e){return e!==t}),S.totalUuid--}),S.sliceNum=0;var a=3===e.file_system_status&&n.length>0?n.slice(S.sliceNum,S.sliceNum+=20).map(function(e){return i(t,e)}):[];return S.thumbnailList=[],a}),Object(v.a)(function(t){return t})):Object(k.a)(function(t){return console.error(t),S.isLoading=!1,t});var a})).subscribe(function(t){S.isLoading=!0,a.push(t)},function(t){},function(){S.thumbnailList=a,S.onChangeSchema=Object.assign(Object.assign({},S.onChangeSchema),{totalNumThumbnail:S.thumbnailList.length}),S.currentImageDisplayIndex=-1,S.navigateByAction({thumbnailAction:1}),S.isLoading=!1,S.unsupportedImageList.length>0&&S._dataSetService.downloadUnsupportedImageList(t,S.unsupportedImageList).then(function(t){t&&S._modalService.open(S.modalUnsupportedImage)})}),S.subject$.next()},this.navigateByUrl=function(t){var e=t.url;e?S._router.navigate([e]):console.error("No url received from child component")},this.keyDownEvent=function(t){var e=t.key,n=t.repeat;S._imgLblActionService.action$.pipe(Object(p.a)()).subscribe(function(t){if(!t.draw&&!n)switch(e){case"ArrowLeft":S.navigateByAction({thumbnailAction:-1});break;case"ArrowRight":S.navigateByAction({thumbnailAction:1});break;case"Escape":S.onCloseModal()}})},this.navigateByAction=function(t){var e=t.thumbnailAction;if(e){var n=S._imgLblLayoutService.calculateIndex(e,S.currentImageDisplayIndex,S.thumbnailList.length);if(n!==S.currentImageDisplayIndex){S.currentImageDisplayIndex=n;var i=S.thumbnailList.find(function(t,e){return e===n}),a=S.thumbnailList.findIndex(function(t,e){return e===n});a+3===S.thumbnailList.length&&S.loadThumbnails(),i&&-1!==a&&!S.showLoading&&S.displayImage(Object.assign(Object.assign({},i),{thumbnailIndex:a}))}}},this.displayImage=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S.selectedProjectName,i=t.thumbnailIndex,a=Object(m.b)(t,["thumbnailIndex"]);(null===(e=S.selectedMetaData)||void 0===e?void 0:e.uuid)!==a.uuid&&(S.showLoading=!0,S._imgLblApiService.getBase64Thumbnail(n,a.uuid).pipe(Object(p.a)()).subscribe(function(t){var e=t.message,n=t.img_src;if(1===e){S.selectedMetaData=a,S.imgSrc=n,S.currentImageDisplayIndex=i;var o=a.bnd_box?a.bnd_box.length>0:a.polygons&&a.polygons.length>0||!1;S.onChangeSchema=Object.assign(Object.assign({},S.onChangeSchema),{currentThumbnailIndex:i+1,thumbnailName:a.img_path,hasAnnotation:o})}},function(t){return console.error(t)},function(){return S.showLoading=!1}))},this.onProcessLabel=function(t){var e=t.selectedLabel,n=t.label_list,i=t.action,a=e&&!i?n.filter(function(t){return t!==e}):n;S._imgLblApiService.updateLabelList(S.selectedProjectName,a.length>0?a:[]).pipe(Object(p.a)()).subscribe(function(t){1===t.message?S.tabStatus=S._imgLblLayoutService.displayLabelList(S.tabStatus,a):console.error("Error while updating label")}),S.updateProjectProgress()},this.onChangeAnnotationLabel=function(t){t.index=S.currentAnnotationIndex,S.selectedMetaData&&S.selectedMetaData.polygons&&(S.selectedMetaData.polygons[t.index].label=t.label),S.tabStatus=S._imgLblLayoutService.changeAnnotationLabel(S.tabStatus,t),S.updateStateToRenderChild(),S.updateProjectProgress()},this.onDeleteAnnotation=function(t){S.tabStatus=S._imgLblLayoutService.deleteAnnotation(S.tabStatus,t),S.updateStateToRenderChild(),S.updateProjectProgress()},this.onDisplayModal=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"modal-image-labelling";S.subLabelRegionVal="",S.subLabelValidateMsg="",S._modalService.open(t)},this.onCloseModal=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"modal-image-labelling";S._imgLblActionService.setState({isActiveModal:!1,draw:!0,scroll:!0}),S._modalService.close(t)},this.onChangeInput=function(t,e){var n=t.target.value;"main"===e?S.mainLabelRegionVal=n:S.subLabelRegionVal=n},this.onSubmitLabel=function(){var t=S._subLabelSelect.nativeElement.value;if(t.trim()){var e=!1;S.tabStatus.forEach(function(n){var i=n.annotation;return null==i?void 0:i.forEach(function(n){var i=n.bnd_box,a=n.polygons,o=null!=i?i:a;if(o){var r=o[S.currentAnnotationIndex].subLabel;r&&(null==r?void 0:r.length)>0&&(null==r||r.some(function(n){var i=n.label;return e=i===t}))}else console.log("missing prop bnd_box OR polygons")})}),e?S.subLabelValidateMsg="Invalid of duplicate label: "+t:(S.tabStatus=S._imgLblLayoutService.submitLabel(S.tabStatus,t,S.currentAnnotationIndex,{mainLabelRegion:S.mainLabelRegionVal,subLabelRegion:S.subLabelRegionVal}),S.subLabelValidateMsg="",S.updateStateToRenderChild(),S.updateProjectProgress()),S.subLabelRegionVal=""}},this.onRemoveSubLabel=function(t,e){S.tabStatus=S._imgLblLayoutService.removeSubLabel(S.tabStatus,{selectedAnnoIndex:t,selectedSubLabelIndex:e}),S.updateStateToRenderChild(),S.updateProjectProgress()},this.updateStateToRenderChild=function(){S.tabStatus.forEach(function(t){var e=t.annotation;e&&(S.thumbnailList=S.thumbnailList.map(function(t){var n;return null!==(n=e.find(function(e){var n=e.uuid;return t.uuid===n}))&&void 0!==n?n:t}),S.selectedMetaData=e[0])})},this.resetProjectStatus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S.selectedProjectName;t.trim()&&S._dataSetService.manualCloseProject(t).pipe(Object(_.a)(S.unsubscribe$)).subscribe(function(t){n(t),S._router.navigate(["/"])})},this.onSwitchSaveType=function(){S.saveType={saveCurrentImage:!S.saveType.saveCurrentImage,saveBulk:!S.saveType.saveBulk}},this.onClickDownload=function(t){return Object(m.a)(S,void 0,void 0,regeneratorRuntime.mark(function e(){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.labelChoosen.filter(function(t){return!0===t.isChoosen}).map(function(t){return t.label}),this.saveType.saveBulk&&this.processingNum++,e.next=4,this._exportSaveFormatService.exportSaveFormat(Object.assign(Object.assign(Object.assign(Object.assign({},this.saveType),{saveFormat:t,metadata:this.selectedMetaData,index:this.currentAnnotationIndex,projectName:this.selectedProjectName}),(this.saveType.saveBulk||"ocr"===t||"json"===t||"coco"===t)&&{projectFullMetadata:this.thumbnailList}),"json"!==t&&{labelList:n}));case 4:this.saveType.saveBulk&&this.processingNum--;case 5:case"end":return e.stop()}},e,this)}))},this._languageService.initializeLanguage("image-labelling",["image-labelling-en","image-labelling-cn","image-labelling-ms"])}return l(e,[{key:"ngOnInit",value:function(){this.currentUrl=this._router.url;var t=this._imgLblLayoutService.getRouteState(history).projectName;this.selectedProjectName=t,this.onChangeSchema=Object.assign(Object.assign({},this.onChangeSchema),{totalNumThumbnail:this.thumbnailList.length}),this.startProject(this.selectedProjectName)}},{key:"closeExportProjectModal",value:function(){this._modalService.close(this.modalExportOptions)}},{key:"onWindowClose",value:function(t){this.resetProjectStatus(),t.preventDefault()}},{key:"onChangeLabel",value:function(t){this.onChangeAnnotationLabel({index:this.currentAnnotationIndex,label:t})}},{key:"onDisplayShortcutKeyInfo",value:function(){this._modalService.open(this.modalShortcutKeyInfo)}},{key:"onLoadMoreThumbnails",value:function(){this.loadThumbnails()}},{key:"showAdvSettings",value:function(){this.tempLabelChoosen=this.labelChoosen.map(function(t){return Object.assign({},t)}),this.onDisplayModal("modal-adv")}},{key:"saveAdvSettings",value:function(){this.labelChoosen=this.tempLabelChoosen.map(function(t){return Object.assign({},t)}),this.onCloseModal("modal-adv")}},{key:"shortcutKeyInfo",value:function(){return[{no:1,shortcutKey:"info.shortcut.1.key",functionality:"info.shortcut.1.functionality"},{no:2,shortcutKey:"info.shortcut.2.key",functionality:"info.shortcut.2.functionality"},{no:3,shortcutKey:"info.shortcut.3.key",functionality:"info.shortcut.3.functionality"},{no:4,shortcutKey:"info.shortcut.4.key",functionality:"info.shortcut.4.functionality"},{no:5,shortcutKey:"info.shortcut.5.key",functionality:"info.shortcut.5.functionality"}]}},{key:"ngOnDestroy",value:function(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this._imgLblModeService.setState(null),this._imgLblActionService.setState(null),this.resetProjectStatus()}}]),e}(),wn.\u0275fac=function(t){return new(t||wn)(S.Hb(C.a),S.Hb(I),S.Hb(A.a),S.Hb(j.a),S.Hb(E),S.Hb(D),S.Hb(N),S.Hb(L.a),S.Hb(R.a),S.Hb(F.a),S.Hb(U))},wn.\u0275cmp=S.Bb({type:wn,selectors:[["image-labelling-layout"]],viewQuery:function(t,e){var n;1&t&&S.tc(tn,!0),2&t&&S.ec(n=S.Ub())&&(e._subLabelSelect=n.first)},hostBindings:function(t,e){1&t&&S.Tb("keydown",function(t){return e.keyDownEvent(t)},!1,S.gc)("beforeunload",function(t){return e.onWindowClose(t)},!1,S.gc)},decls:108,vars:113,consts:[[1,"layout-container"],[3,"_onChange"],[3,"_totalUuid","_onChange","_tabStatus","_onClick"],[1,"content-container"],[3,"_onChange","_currentUrl","_tabStatus"],[4,"ngIf"],[3,"_selectMetadata","_totalUuid","_thumbnailList","_tabStatus","_onClose","_onClickThumbnail","_onClickLabel","_onEnterLabel","_onChangeAnnotationLabel","_onDeleteAnnotation","_loadMoreThumbnails"],[3,"_onChange","_onClick","_onExport","_onReload"],[3,"_thumbnailInfo","_imgSrc"],["id","modal-save",3,"id","modalBodyStyle","scrollable"],[1,"save-format-list"],[1,"save-format-content"],["id","modal-adv",3,"id","modalBodyStyle","modalTitle","scrollable","zIndex"],[1,"modal-adv-container"],["class","modal-adv-instruction",4,"ngIf"],["class","margin-bottom",4,"ngFor","ngForOf"],["class","button-style modal-adv-btn",3,"click",4,"ngIf"],["id","modal-image-labelling",3,"id","scrollable","showHeader"],[1,"modal-button","close-button","float-right",3,"click"],[1,"font-title"],[1,"main-label-container"],[1,"font-label"],[1,"static-select",3,"change"],[4,"ngFor","ngForOf"],["type","text",1,"static-input",3,"value","placeholder","change"],[1,"hr-line"],[1,"sub-label-container"],[1,"static-select"],["subLabelSelect",""],[1,"modal-button",3,"click"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"export-content-container"],[1,"modal-button-container"],[1,"button-style","confg-btn",3,"click"],[1,"button-style","confgdata-btn",3,"click"],[1,"with-data"],[1,"help-icon-container"],["src","../../assets/icons/help.svg",1,"help-icon"],[1,"tooltiptext"],[3,"id","modalBodyStyle","scrollable"],[1,"shortcut-key-info-header"],[1,"table-box"],["cellpadding","20"],[1,"modal-content-container"],[1,"modal-message-container"],["class","message",4,"ngIf"],[3,"ngClass"],[1,"error-msg",3,"innerHTML"],[3,"_modalUnsupportedImage","_unsupportedImageBodyStyle","_unsupportedImageList"],[3,"_loading"],[3,"_processingNum"],[3,"_selectMetadata","_imgSrc","_tabStatus","_onChangeMetadata","_onChangeAnnotationLabel","_onEnterLabel"],[3,"_selectMetadata","_imgSrc","_tabStatus","_onChangeMetadata","_onChangeAnnotationLabel"],[1,"switch-container"],[1,"switch"],["type","checkbox",1,"checkBox",3,"checked","change"],[1,"slider","round"],[1,"space-verticle"],[1,"adv-settings",3,"click"],[1,"save-format-btn",3,"click"],[1,"modal-adv-instruction"],[1,"margin-bottom"],[1,"switch-2","no-margin-left"],[1,"modal-adv-label"],[1,"button-style","modal-adv-btn",3,"click"],[3,"value","selected"],[1,"validate-msg"],[1,"sub-label-flex-container","sub-label-padding"],[1,"font-label","flex-first"],[1,"font-label","flex-second"],[1,"flex-third"],[1,"modal-butto","flex-fourth",3,"click"],[3,"innerHTML"],[1,"message"]],template:function(t,e){1&t&&(S.Mb(0,"div",0),S.Mb(1,"div"),S.Ib(2,"page-header",1),S.Mb(3,"image-labelling-info",2),S.Tb("_onClick",function(t){return e.navigateByAction(t)}),S.Lb(),S.Lb(),S.Mb(4,"div",3),S.Ib(5,"image-labelling-left-sidebar",4),S.mc(6,en,2,3,"ng-container",5),S.mc(7,nn,2,3,"ng-container",5),S.Mb(8,"image-labelling-project",6),S.Tb("_onClose",function(t){return e.onToggleTab(t)})("_onClickThumbnail",function(t){return e.displayImage(t)})("_onClickLabel",function(t){return e.onProcessLabel(t)})("_onEnterLabel",function(t){return e.onProcessLabel(t)})("_onChangeAnnotationLabel",function(t){return e.onChangeAnnotationLabel(t)})("_onDeleteAnnotation",function(t){return e.onDeleteAnnotation(t)})("_loadMoreThumbnails",function(){return e.onLoadMoreThumbnails()}),S.Lb(),S.Mb(9,"image-labelling-right-sidebar",7),S.Tb("_onClick",function(t){return e.onToggleTab(t)})("_onExport",function(){return e.onExport()})("_onReload",function(){return e.onReload()}),S.Lb(),S.Lb(),S.Ib(10,"image-labelling-footer",8),S.Lb(),S.Mb(11,"modal",9),S.Mb(12,"div",10),S.Mb(13,"div",11),S.mc(14,an,30,11,"ng-container",5),S.mc(15,on,10,0,"ng-container",5),S.Lb(),S.Lb(),S.Lb(),S.Mb(16,"modal",12),S.Wb(17,"translate"),S.Mb(18,"div",13),S.mc(19,rn,3,3,"p",14),S.mc(20,sn,6,2,"div",15),S.mc(21,ln,3,3,"div",5),S.mc(22,cn,3,3,"button",16),S.Lb(),S.Lb(),S.Mb(23,"modal",17),S.Mb(24,"button",18),S.Tb("click",function(){return e.onCloseModal()}),S.oc(25,"\u2716"),S.Lb(),S.Mb(26,"div"),S.Mb(27,"h2",19),S.oc(28),S.Wb(29,"translate"),S.Lb(),S.Mb(30,"div",20),S.Mb(31,"label",21),S.oc(32),S.Wb(33,"translate"),S.Lb(),S.Mb(34,"select",22),S.Tb("change",function(t){return e.onChangeLabel(t.target.value)}),S.mc(35,hn,2,1,"ng-container",23),S.Lb(),S.Mb(36,"label",21),S.oc(37),S.Wb(38,"translate"),S.Lb(),S.Mb(39,"input",24),S.Tb("change",function(t){return e.onChangeInput(t,"main")}),S.Wb(40,"translate"),S.Lb(),S.Lb(),S.Lb(),S.Ib(41,"hr",25),S.Mb(42,"div"),S.Mb(43,"h2",19),S.oc(44),S.Wb(45,"translate"),S.Lb(),S.Mb(46,"div",26),S.Mb(47,"label",21),S.oc(48),S.Wb(49,"translate"),S.Lb(),S.Mb(50,"select",27,28),S.mc(52,fn,2,1,"ng-container",23),S.Lb(),S.Mb(53,"label",21),S.oc(54),S.Wb(55,"translate"),S.Lb(),S.Mb(56,"input",24),S.Tb("change",function(t){return e.onChangeInput(t,"sub")}),S.Wb(57,"translate"),S.Lb(),S.Mb(58,"button",29),S.Tb("click",function(){return e.onSubmitLabel()}),S.oc(59),S.Wb(60,"translate"),S.Lb(),S.Lb(),S.mc(61,bn,3,1,"ng-container",5),S.Lb(),S.Ib(62,"hr",25),S.mc(63,_n,2,1,"ng-container",23),S.Lb(),S.Mb(64,"modal",30),S.Wb(65,"translate"),S.Mb(66,"div",31),S.Mb(67,"div",32),S.Mb(68,"button",33),S.Tb("click",function(){return e.exportProject("cfg")}),S.oc(69),S.Wb(70,"translate"),S.Lb(),S.Mb(71,"button",34),S.Tb("click",function(){return e.exportProject("cfgdata")}),S.oc(72),S.Wb(73,"translate"),S.Ib(74,"br"),S.Mb(75,"span",35),S.oc(76),S.Wb(77,"translate"),S.Lb(),S.Lb(),S.Mb(78,"div",36),S.Ib(79,"img",37),S.Mb(80,"span",38),S.Mb(81,"p"),S.oc(82),S.Wb(83,"translate"),S.Lb(),S.Mb(84,"p"),S.oc(85),S.Wb(86,"translate"),S.Lb(),S.Mb(87,"p"),S.oc(88),S.Wb(89,"translate"),S.Lb(),S.Lb(),S.Lb(),S.Lb(),S.Lb(),S.Lb(),S.Mb(90,"modal",39),S.Mb(91,"div",40),S.oc(92),S.Wb(93,"translate"),S.Lb(),S.Mb(94,"div",41),S.Mb(95,"table",42),S.mc(96,yn,5,6,"tr",23),S.Lb(),S.Lb(),S.Lb(),S.Mb(97,"modal",30),S.Wb(98,"translate"),S.Ib(99,"br"),S.Mb(100,"div",43),S.Mb(101,"div",44),S.mc(102,xn,5,4,"p",45),S.Lb(),S.Mb(103,"div",46),S.Ib(104,"p",47),S.Lb(),S.Lb(),S.Lb(),S.Ib(105,"unsupported-image-modal",48),S.Ib(106,"spinner",49),S.Ib(107,"toastr",50)),2&t&&(S.xb(2),S.ac("_onChange",e.onChangeSchema),S.xb(1),S.ac("_totalUuid",e.totalUuid)("_onChange",e.onChangeSchema)("_tabStatus",e.tabStatus),S.xb(2),S.ac("_onChange",e.onChangeSchema)("_currentUrl",e.currentUrl)("_tabStatus",e.tabStatus),S.xb(1),S.ac("ngIf",e._router.url.includes("imglabel/bndbox")),S.xb(1),S.ac("ngIf",e._router.url.includes("imglabel/seg")),S.xb(1),S.ac("_selectMetadata",e.selectedMetaData)("_totalUuid",e.totalUuid)("_thumbnailList",e.thumbnailList)("_tabStatus",e.tabStatus),S.xb(1),S.ac("_onChange",e.onChangeSchema),S.xb(1),S.ac("_thumbnailInfo",e.selectedMetaData)("_imgSrc",e.imgSrc),S.xb(1),S.ac("id","modal-save")("modalBodyStyle",e.saveModalBodyStyle)("scrollable",!0),S.xb(3),S.ac("ngIf",null==e.selectedMetaData?null:e.selectedMetaData.bnd_box),S.xb(1),S.ac("ngIf",null==e.selectedMetaData?null:e.selectedMetaData.polygons),S.xb(1),S.ac("id","modal-adv")("modalBodyStyle",e.advModalBodyStyle)("modalTitle",S.Xb(17,75,"advModal.title"))("scrollable",!0)("zIndex",2),S.xb(3),S.ac("ngIf",0!==e.tempLabelChoosen.length),S.xb(1),S.ac("ngForOf",e.tempLabelChoosen),S.xb(1),S.ac("ngIf",0===e.tempLabelChoosen.length),S.xb(1),S.ac("ngIf",0!==e.tempLabelChoosen.length),S.xb(1),S.ac("id","modal-image-labelling")("scrollable",!0)("showHeader",!1),S.xb(5),S.pc(S.Xb(29,77,"labellingArea.mainLabel")),S.xb(4),S.qc("",S.Xb(33,79,"labellingArea.label"),": "),S.xb(3),S.ac("ngForOf",e.tabStatus),S.xb(2),S.qc("",S.Xb(38,81,"labellingArea.regionInfo"),": "),S.xb(2),S.ac("value",e.mainLabelRegionVal)("placeholder",S.Xb(40,83,"labellingArea.mainRegionInfo")),S.xb(5),S.pc(S.Xb(45,85,"labellingArea.subLabel")),S.xb(4),S.qc("",S.Xb(49,87,"labellingArea.label"),": "),S.xb(4),S.ac("ngForOf",e.tabStatus),S.xb(2),S.qc("",S.Xb(55,89,"labellingArea.regionInfo"),": "),S.xb(2),S.ac("value",e.subLabelRegionVal)("placeholder",S.Xb(57,91,"labellingArea.subRegionInfo")),S.xb(3),S.pc(S.Xb(60,93,"labellingArea.add")),S.xb(2),S.ac("ngIf",e.subLabelValidateMsg),S.xb(2),S.ac("ngForOf",e.tabStatus),S.xb(1),S.ac("id",e.modalExportOptions)("modalBodyStyle",e.exportModalBodyStyle)("modalTitle",S.Xb(65,95,"exportModal.exportOptions"))("scrollable",!1),S.xb(5),S.qc(" ",S.Xb(70,97,"exportModal.configFile")," "),S.xb(3),S.qc(" ",S.Xb(73,99,"exportModal.zipFile")," "),S.xb(4),S.pc(S.Xb(77,101,"exportModal.withData")),S.xb(6),S.qc("",S.Xb(83,103,"configFileInfoTitle"),":"),S.xb(3),S.pc(S.Xb(86,105,"configFileInfoDest1")),S.xb(3),S.pc(S.Xb(89,107,"configFileInfoDest2")),S.xb(2),S.ac("id",e.modalShortcutKeyInfo)("modalBodyStyle",e.infoModalBodyStyle)("scrollable",!0),S.xb(2),S.pc(S.Xb(93,109,"info.header")),S.xb(4),S.ac("ngForOf",e.shortcutKeyInfo()),S.xb(1),S.ac("id",e.modalExportProject)("modalBodyStyle",e.exportProjectBodyStyle)("modalTitle",S.Xb(98,111,"exportTitle"))("scrollable",!1),S.xb(5),S.ac("ngIf",e.modalSpanLocationPath.trim()),S.xb(1),S.ac("ngClass",e.spanClass),S.xb(1),S.ac("innerHTML",e.modalSpanMessage,S.ic),S.xb(1),S.ac("_modalUnsupportedImage",e.modalUnsupportedImage)("_unsupportedImageBodyStyle",e.unsupportedImageBodyStyle)("_unsupportedImageList",e.unsupportedImageList),S.xb(1),S.ac("_loading",e.isLoading),S.xb(1),S.ac("_processingNum",e.processingNum))},directives:[Y.a,et,At,g.k,ne,oe,ce,ue.a,g.j,g.i,he.a,de.a,ke,We,Qe,Tt.j,Tt.m],pipes:[Z.c],styles:['.layout-container[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}.content-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;min-width:97.8vw;max-width:97.8vw}.modal-button[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw;background:#262a2e;color:azure}.close-button[_ngcontent-%COMP%]{border:none;cursor:pointer}.float-right[_ngcontent-%COMP%]{float:right}.font-title[_ngcontent-%COMP%]{font-size:1.7vw}.font-label[_ngcontent-%COMP%]{line-height:4vh;font-size:1vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.main-label-container[_ngcontent-%COMP%]{min-width:35vw;max-width:35vw}.main-label-container[_ngcontent-%COMP%], .sub-label-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;align-items:center}.sub-label-container[_ngcontent-%COMP%]{min-width:40vw;max-width:40vw}.sub-label-flex-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-flex:1 1 100%;flex:1 1 100%;min-width:0}.static-select[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;min-width:10vw;max-width:10vw;line-height:3vh;font-size:.9vw;-webkit-appearance:none;appearance:none;border-radius:5vh;margin:0;text-align-last:center;background:#262a2e;color:#fff;box-shadow:inset -.5vw 6.25vw 1vw 0 rgba(0,0,0,.2),inset -.5vw -.5vw 1vw 0 hsla(0,0%,100%,.4)}.static-select[_ngcontent-%COMP%]:hover{box-shadow:inset -.375vw -.375vw .625vw 0 rgba(0,0,0,.2),inset .375vw .375vw .625vw 0 hsla(0,0%,100%,.5)}.static-select[_ngcontent-%COMP%]:active{box-shadow:inset .375vw .375vw .625vw 0 rgba(0,0,0,.2),inset -.375vw -.375vw .625vw 0 hsla(0,0%,100%,.5)}.static-input[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;min-width:10vw;max-width:10vw;line-height:3vh;font-size:.9vw;border-radius:2vw;border:none;outline:none;background-color:#363636;color:#fff;padding:0 1vw}.hr-line[_ngcontent-%COMP%]{margin:5vh 0}.sub-label-padding[_ngcontent-%COMP%]{padding:0 0 2vh}.validate-msg[_ngcontent-%COMP%]{color:red;padding:5vh 0 0;font-size:1vw}.flex-first[_ngcontent-%COMP%]{-webkit-flex:1 1 35%;flex:1 1 35%}.flex-second[_ngcontent-%COMP%]{-webkit-flex:1 1 55%;flex:1 1 55%}.flex-fourth[_ngcontent-%COMP%], .flex-third[_ngcontent-%COMP%]{-webkit-flex:0 0 5%;flex:0 0 5%}.flex-fourth[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw;background:#262a2e;color:azure}.modal[_ngcontent-%COMP%]{z-index:1000;padding-top:10vh;top:0;width:100%;height:100%;overflow:auto;background-color:transparent;scrollbar-width:none;position:fixed;background:rgba(0,0,0,.8)}.modal-content[_ngcontent-%COMP%]{background-color:#525353;padding:1vw;max-width:20vw;min-width:20vw;border-radius:1vw;margin:15vh auto auto}.modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.modal-content-header[_ngcontent-%COMP%]{text-align:center;color:#fff;font-size:3vh}.modal-button-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;padding:1vw 1vw 1vw 2vw}.modal-button-cancel[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:flex-end;justify-content:flex-end}.export-content-container[_ngcontent-%COMP%]{margin-left:.5vw}.button-style[_ngcontent-%COMP%]{border-radius:1vh;border:none;outline:none;color:#fff;cursor:pointer}.confg-btn[_ngcontent-%COMP%]{margin-right:.7vw}.confg-btn[_ngcontent-%COMP%], .confgdata-btn[_ngcontent-%COMP%]{padding:1vh .5vw;background-color:#2d8ceb;font-size:2vh;min-width:7.5vw}.cancel-btn[_ngcontent-%COMP%], .with-data[_ngcontent-%COMP%]{font-size:1.5vh}.cancel-btn[_ngcontent-%COMP%]{padding:1vh 1vw;background-color:#444}.error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.help-icon[_ngcontent-%COMP%]{height:3vh}.help-icon-container[_ngcontent-%COMP%]{padding-right:1vw;padding-left:.4vw}.help-icon-container[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:15vw;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:65%;margin-left:-60px;text-align:justify;text-justify:inter-word}.help-icon-container[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible}.message[_ngcontent-%COMP%]{font-size:1vw;overflow-wrap:break-word}.modal-message-container[_ngcontent-%COMP%]{padding-right:3.5vw}.break[_ngcontent-%COMP%]{overflow-wrap:break-word}.save-format-list[_ngcontent-%COMP%]{left:0;top:0;width:100%;height:100%;overflow:auto}.save-format-content[_ngcontent-%COMP%]{margin:auto;padding:10px}.switch-container[_ngcontent-%COMP%]{font-size:small;-webkit-align-content:center;align-content:center;text-align:center}.switch[_ngcontent-%COMP%]{position:relative;display:inline-block;width:4em;height:1.8em;margin-left:auto;margin-right:auto}.switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.switch[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background:#000;background-size:100% 100%;background-position:50%}.switch[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{-webkit-transform:translateX(2.2em);transform:translateX(2.2em)}.switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.8s}.switch[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:1.6em;width:1.6em;left:.14em;bottom:.15em;background-color:snow;transition:.8s}.switch[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]{border-radius:1.2em}.switch[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]:before{border-radius:50%}.switch[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-top:8px;margin-top:.5em;outline:none}.switch-2[_ngcontent-%COMP%]{position:relative;display:inline-block;width:2.5em;height:1.2em;margin-left:auto;margin-right:auto}.switch-2[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;width:0;height:0}.switch-2[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background:#000;background-size:100% 100%;background-position:50%}.switch-2[_ngcontent-%COMP%] .checkBox[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{-webkit-transform:translateX(1.5em);transform:translateX(1.5em)}.switch-2[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.5s}.switch-2[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:1.2em;width:1.2em;left:.14em;background-color:snow;transition:.5s}.switch-2[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]{border-radius:1.2em}.switch-2[_ngcontent-%COMP%] .round[_ngcontent-%COMP%]:before{border-radius:50%}.switch-2[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-top:8px;margin-top:.5em;outline:none}.no-margin-left[_ngcontent-%COMP%]{margin-left:0}.space-verticle[_ngcontent-%COMP%]{background-color:transparent;outline:none;border:none;margin-left:1.5em;margin-right:1.5em}.save-format-btn[_ngcontent-%COMP%]{width:90%;height:6em;margin-top:2%;margin-bottom:2%;margin-left:4.5%;background:#000;background-size:100% 100%;background-position:50%;font-size:medium;outline:none;border:none;color:snow;overflow:hidden;border-radius:5px}.save-format-btn[_ngcontent-%COMP%]:hover{text-shadow:0 0 30px #888;box-shadow:5px 5px 10px #888,-5px -5px 10px #888;cursor:pointer}.save-format-btn[_ngcontent-%COMP%]:active:hover{border:3px dashed green}.adv-settings[_ngcontent-%COMP%]{padding:1vh;margin:1vh 1.5vw;color:#ccc;font-size:.6vw;cursor:pointer;width:-webkit-fit-content;width:fit-content;background:#30353a;border-radius:.5vh;float:right}.adv-settings[_ngcontent-%COMP%]:hover{background:#373d42}.modal-adv-container[_ngcontent-%COMP%]{margin:1vh 1vw}.modal-adv-instruction[_ngcontent-%COMP%]{color:#fff;opacity:.5}.modal-adv-label[_ngcontent-%COMP%]{font-size:1.5vh;margin-left:2vw;white-space:nowrap;width:9vw;overflow:hidden;text-overflow:ellipsis;display:inline-block}.modal-adv-btn[_ngcontent-%COMP%]{float:right;padding:.5vh 1vw;background-color:#2d8ceb;font-size:1.5vh;min-width:3vw}.shortcut-key-info-header[_ngcontent-%COMP%]{font-size:1.2vw;color:#fff;text-align:center;margin-bottom:2vh}.table-box[_ngcontent-%COMP%]{width:100%;height:90%;overflow-y:auto}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%], td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{border-collapse:collapse;text-align:center;color:#fff}th[_ngcontent-%COMP%]{top:0;background:#262a2e;color:#fff;border-top:none!important}tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){color:#bebebe}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child{width:60px;text-align:center;background:#262a2e}.validation-error[_ngcontent-%COMP%]{margin:1px;color:red}.validation-success[_ngcontent-%COMP%]{margin:1px;color:green}.label[_ngcontent-%COMP%]{color:#fff;font-size:2vh;margin-right:1vw}.label-file[_ngcontent-%COMP%]{padding-top:.5vh}.margin-bottom[_ngcontent-%COMP%]{margin-bottom:.5vh}']}),wn)}],On=((kn=function t(){r(this,t)}).\u0275mod=S.Fb({type:kn}),kn.\u0275inj=S.Eb({factory:function(t){return new(t||kn)},imports:[[C.d.forChild(Mn)]]}),kn),Pn=s("KZX/"),Ln=((Sn=function t(){r(this,t)}).\u0275mod=S.Fb({type:Sn}),Sn.\u0275inj=S.Eb({factory:function(t){return new(t||Sn)},imports:[[g.b,Pn.a,Z.b]]}),Sn),In=s("RKnZ"),An=s("O+1G"),jn=((Cn=function t(){r(this,t)}).\u0275mod=S.Fb({type:Cn}),Cn.\u0275inj=S.Eb({factory:function(t){return new(t||Cn)},imports:[[g.b,Pn.a,Z.b,On,In.a,C.d,An.a,Ln]]}),Cn)},xOOu:function(t,e,n){t.exports=function t(e,n,i){function a(r,s){if(!n[r]){if(!e[r]){if(o)return o(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[r]={exports:{}};e[r][0].call(c.exports,function(t){return a(e[r][1][t]||t)},c,c.exports,t,e,n,i)}return n[r].exports}for(var o=!1,r=0;r>4,s=1>6:64,l=2>2)+o.charAt(r)+o.charAt(s)+o.charAt(l));return c.join("")},n.decode=function(t){var e,n,i,r,s,l,c=0,u=0,h="data:";if(t.substr(0,h.length)===h)throw new Error("Invalid base64 input, it looks like a data url.");var d,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&f--,t.charAt(t.length-2)===o.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=a.uint8array?new Uint8Array(0|f):new Array(0|f);c>4,n=(15&r)<<4|(s=o.indexOf(t.charAt(c++)))>>2,i=(3&s)<<6|(l=o.indexOf(t.charAt(c++))),d[u++]=e,64!==s&&(d[u++]=n),64!==l&&(d[u++]=i);return d}},{"./support":30,"./utils":32}],2:[function(t,e,n){"use strict";var i=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/DataLengthProbe"),r=t("./stream/Crc32Probe");function s(t,e,n,i,a){this.compressedSize=t,this.uncompressedSize=e,this.crc32=n,this.compression=i,this.compressedContent=a}o=t("./stream/DataLengthProbe"),s.prototype={getContentWorker:function(){var t=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(t,e,n){return t.pipe(new r).pipe(new o("uncompressedSize")).pipe(e.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,n){"use strict";var i=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,n){"use strict";var i=t("./utils"),a=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,n,i){var o=a,r=0+n;t^=-1;for(var s=0;s>>8^o[255&(t^e[s])];return-1^t}(0|e,t,t.length):function(t,e,n,i){var o=a,r=0+n;t^=-1;for(var s=0;s>>8^o[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,e,n){"use strict";var i;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,a=t("pako"),o=t("./utils"),r=t("./stream/GenericWorker"),s=i?"uint8array":"array";function l(t,e){r.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}n.magic="\b\0",o.inherits(l,r),l.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,t.data),!1)},l.prototype.flush=function(){r.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},n.compressWorker=function(t){return new l("Deflate",t)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,n){"use strict";function i(t,e){var n,i="";for(n=0;n>>=8;return i}function a(t,e,n,a,r,u){var h,d,f=t.file,b=t.compression,g=u!==s.utf8encode,m=o.transformTo("string",u(f.name)),v=o.transformTo("string",s.utf8encode(f.name)),p=f.comment,_=o.transformTo("string",u(p)),y=o.transformTo("string",s.utf8encode(p)),x=v.length!==f.name.length,w=y.length!==p.length,k="",S="",C="",M=f.dir,O=f.date,P={crc32:0,compressedSize:0,uncompressedSize:0};e&&!n||(P.crc32=t.crc32,P.compressedSize=t.compressedSize,P.uncompressedSize=t.uncompressedSize);var L=0;e&&(L|=8),g||!x&&!w||(L|=2048);var I=0,A=0;M&&(I|=16),"UNIX"===r?(A=798,I|=function(t,e){var n=t;return t||(n=e?16893:33204),(65535&n)<<16}(f.unixPermissions,M)):(A=20,I|=function(t){return 63&(t||0)}(f.dosPermissions)),h=O.getUTCHours(),h<<=6,h|=O.getUTCMinutes(),h<<=5,h|=O.getUTCSeconds()/2,d=O.getUTCFullYear()-1980,d<<=4,d|=O.getUTCMonth()+1,d<<=5,d|=O.getUTCDate(),x&&(S=i(1,1)+i(l(m),4)+v,k+="up"+i(S.length,2)+S),w&&(C=i(1,1)+i(l(_),4)+y,k+="uc"+i(C.length,2)+C);var j="";return j+="\n\0",j+=i(L,2),j+=b.magic,j+=i(h,2),j+=i(d,2),j+=i(P.crc32,4),j+=i(P.compressedSize,4),j+=i(P.uncompressedSize,4),j+=i(m.length,2),j+=i(k.length,2),{fileRecord:c.LOCAL_FILE_HEADER+j+m+k,dirRecord:c.CENTRAL_FILE_HEADER+i(A,2)+j+i(_.length,2)+"\0\0\0\0"+i(I,4)+i(a,4)+m+k+_}}var o=t("../utils"),r=t("../stream/GenericWorker"),s=t("../utf8"),l=t("../crc32"),c=t("../signature");function u(t,e,n,i){r.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=n,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,r),u.prototype.push=function(t){var e=t.meta.percent||0,n=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,r.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:n?(e+100*(n-i-1))/n:100}}))},u.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var n=a(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,n=a(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),e)this.push({data:function(t){return c.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)n=(n<<8)+this.byteAt(e);return this.index+=t,n},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=a},{"../utils":32}],19:[function(t,e,n){"use strict";var i=t("./Uint8ArrayReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,n){"use strict";var i=t("./DataReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},a.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},a.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},a.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,e,n){"use strict";var i=t("./ArrayReader");function a(t){i.call(this,t)}t("../utils").inherits(a,i),a.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,n){"use strict";var i=t("../utils"),a=t("../support"),o=t("./ArrayReader"),r=t("./StringReader"),s=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||a.uint8array?"nodebuffer"===e?new s(t):a.uint8array?new l(i.transformTo("uint8array",t)):new o(i.transformTo("array",t)):new r(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,n){"use strict";n.LOCAL_FILE_HEADER="PK\x03\x04",n.CENTRAL_FILE_HEADER="PK\x01\x02",n.CENTRAL_DIRECTORY_END="PK\x05\x06",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,e,n){"use strict";var i=t("./GenericWorker"),a=t("../utils");function o(t){i.call(this,"ConvertWorker to "+t),this.destType=t}a.inherits(o,i),o.prototype.processChunk=function(t){this.push({data:a.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,n){"use strict";var i=t("./GenericWorker"),a=t("../crc32");function o(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,i),o.prototype.processChunk=function(t){this.streamInfo.crc32=a(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./GenericWorker");function o(t){a.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(o,a),o.prototype.processChunk=function(t){t&&(this.streamInfo[this.propName]=(this.streamInfo[this.propName]||0)+t.data.length),a.prototype.processChunk.call(this,t)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./GenericWorker");function o(t){a.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}i.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,n){"use strict";function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var n=0;n "+t:t}},e.exports=i},{}],29:[function(t,e,n){"use strict";var i=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),r=t("../base64"),s=t("../support"),l=t("../external"),c=null;if(s.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function u(t,e,n){var r=e;switch(e){case"blob":case"arraybuffer":r="uint8array";break;case"base64":r="string"}try{this._internalType=r,this._outputType=e,this._mimeType=n,i.checkSupport(r),this._worker=t.pipe(new a(r)),t.lock()}catch(t){this._worker=new o("error"),this._worker.error(t)}}u.prototype={accumulate:function(t){return function(t,e){return new l.Promise(function(n,a){var o=[],s=t._internalType,l=t._outputType,c=t._mimeType;t.on("data",function(t,n){o.push(t),e&&e(n)}).on("error",function(t){o=[],a(t)}).on("end",function(){try{var t=function(t,e,n){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),n);case"base64":return r.encode(e);default:return i.transformTo(t,e)}}(l,function(t,e){var n,i=0,a=null,o=0;for(n=0;n>>6:(n<65536?e[r++]=224|n>>>12:(e[r++]=240|n>>>18,e[r++]=128|n>>>12&63),e[r++]=128|n>>>6&63),e[r++]=128|63&n);return e}(t)},n.utf8decode=function(t){return a.nodebuffer?i.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,n,a,o,r=t.length,l=new Array(2*r);for(e=n=0;e>10&1023,l[n++]=56320|1023&a)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),i.applyFromCharCode(l)}(t=i.transformTo(a.uint8array?"uint8array":"array",t))},i.inherits(c,r),c.prototype.processChunk=function(t){var e=i.transformTo(a.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var r=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+s[t[n]]>e?n:e}(e),l=e;r!==e.length&&(a.uint8array?(l=e.subarray(0,r),this.leftOver=e.subarray(r,e.length)):(l=e.slice(0,r),this.leftOver=e.slice(r,e.length))),this.push({data:n.utf8decode(l),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,i.inherits(u,r),u.prototype.processChunk=function(t){this.push({data:n.utf8encode(t.data),meta:t.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var i=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),r=t("set-immediate-shim"),s=t("./external");function l(t){return t}function c(t,e){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,n,i,a=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(n<65536?e[r++]=224|n>>>12:(e[r++]=240|n>>>18,e[r++]=128|n>>>12&63),e[r++]=128|n>>>6&63),e[r++]=128|63&n);return e},n.buf2binstring=function(t){return l(t,t.length)},n.binstring2buf=function(t){for(var e=new i.Buf8(t.length),n=0,a=e.length;n>10&1023,c[i++]=56320|1023&a)}return l(c,i)},n.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+r[t[n]]>e?n:e}},{"./common":41}],43:[function(t,e,n){"use strict";e.exports=function(t,e,n,i){for(var a=65535&t|0,o=t>>>16&65535|0,r=0;0!==n;){for(n-=r=2e3>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e,n,a){var o=i,r=a+n;t^=-1;for(var s=a;s>>8^o[255&(t^e[s])];return-1^t}},{}],46:[function(t,e,n){"use strict";var i,a=t("../utils/common"),o=t("./trees"),r=t("./adler32"),s=t("./crc32"),l=t("./messages"),c=-2,u=258,h=262,d=113;function f(t,e){return t.msg=l[e],e}function b(t){return(t<<1)-(4t.avail_out&&(n=t.avail_out),0!==n&&(a.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function v(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,m(t.strm)}function p(t,e){t.pending_buf[t.pending++]=e}function _(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function y(t,e){var n,i,a=t.max_chain_length,o=t.strstart,r=t.prev_length,s=t.nice_match,l=t.strstart>t.w_size-h?t.strstart-(t.w_size-h):0,c=t.window,d=t.w_mask,f=t.prev,b=t.strstart+u,g=c[o+r-1],m=c[o+r];t.prev_length>=t.good_match&&(a>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(n=e)+r]===m&&c[n+r-1]===g&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&ol&&0!=--a);return r<=t.lookahead?r:t.lookahead}function x(t){var e,n,i,o,l,c,u,d,f,b,g=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=g+(g-h)){for(a.arraySet(t.window,t.window,g,g,0),t.match_start-=g,t.strstart-=g,t.block_start-=g,e=n=t.hash_size;i=t.head[--e],t.head[e]=g<=i?i-g:0,--n;);for(e=n=g;i=t.prev[--e],t.prev[e]=g<=i?i-g:0,--n;);o+=g}if(0===t.strm.avail_in)break;if(u=t.window,d=t.strstart+t.lookahead,b=void 0,(f=o)<(b=(c=t.strm).avail_in)&&(b=f),n=0===b?0:(c.avail_in-=b,a.arraySet(u,c.input,c.next_in,b,d),1===c.state.wrap?c.adler=r(c.adler,u,b,d):2===c.state.wrap&&(c.adler=s(c.adler,u,b,d)),c.next_in+=b,c.total_in+=b,b),t.lookahead+=n,t.lookahead+t.insert>=3)for(t.ins_h=t.window[l=t.strstart-t.insert],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(i=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3&&t.match_length<=t.prev_length){for(a=t.strstart+t.lookahead-3,i=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=a&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(x(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+n;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,v(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-h&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&v(t,!1),1)}),new S(4,4,8,4,w),new S(4,5,16,8,w),new S(4,6,32,32,w),new S(4,4,16,16,k),new S(8,16,32,32,k),new S(8,16,128,128,k),new S(8,32,128,256,k),new S(32,128,258,1024,k),new S(32,258,258,4096,k)],n.deflateInit=function(t,e){return P(t,e,8,15,8,0)},n.deflateInit2=P,n.deflateReset=O,n.deflateResetKeep=M,n.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},n.deflate=function(t,e){var n,a,r,l;if(!t||!t.state||5>8&255),p(a,a.gzhead.time>>16&255),p(a,a.gzhead.time>>24&255),p(a,9===a.level?2:2<=a.strategy||a.level<2?4:0),p(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(p(a,255&a.gzhead.extra.length),p(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=s(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69):(p(a,0),p(a,0),p(a,0),p(a,0),p(a,0),p(a,9===a.level?2:2<=a.strategy||a.level<2?4:0),p(a,3),a.status=d);else{var h=8+(a.w_bits-8<<4)<<8;h|=(2<=a.strategy||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(h|=32),h+=31-h%31,a.status=d,_(a,h),0!==a.strstart&&(_(a,t.adler>>>16),_(a,65535&t.adler)),t.adler=1}if(69===a.status)if(a.gzhead.extra){for(r=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>r&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),m(t),r=a.pending,a.pending!==a.pending_buf_size));)p(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>r&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=73)}else a.status=73;if(73===a.status)if(a.gzhead.name){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),m(t),r=a.pending,a.pending===a.pending_buf_size)){l=1;break}l=a.gzindexr&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),0===l&&(a.gzindex=0,a.status=91)}else a.status=91;if(91===a.status)if(a.gzhead.comment){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),m(t),r=a.pending,a.pending===a.pending_buf_size)){l=1;break}l=a.gzindexr&&(t.adler=s(t.adler,a.pending_buf,a.pending-r,r)),0===l&&(a.status=103)}else a.status=103;if(103===a.status&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&m(t),a.pending+2<=a.pending_buf_size&&(p(a,255&t.adler),p(a,t.adler>>8&255),t.adler=0,a.status=d)):a.status=d),0!==a.pending){if(m(t),0===t.avail_out)return a.last_flush=-1,0}else if(0===t.avail_in&&b(e)<=b(n)&&4!==e)return f(t,-5);if(666===a.status&&0!==t.avail_in)return f(t,-5);if(0!==t.avail_in||0!==a.lookahead||0!==e&&666!==a.status){var y=2===a.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(x(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(a,e):3===a.strategy?function(t,e){for(var n,i,a,r,s=t.window;;){if(t.lookahead<=u){if(x(t),t.lookahead<=u&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(n=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(a,e):i[a.level].func(a,e);if(3!==y&&4!==y||(a.status=666),1===y||3===y)return 0===t.avail_out&&(a.last_flush=-1),0;if(2===y&&(1===e?o._tr_align(a):5!==e&&(o._tr_stored_block(a,0,0,!1),3===e&&(g(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),m(t),0===t.avail_out))return a.last_flush=-1,0}return 4!==e?0:a.wrap<=0?1:(2===a.wrap?(p(a,255&t.adler),p(a,t.adler>>8&255),p(a,t.adler>>16&255),p(a,t.adler>>24&255),p(a,255&t.total_in),p(a,t.total_in>>8&255),p(a,t.total_in>>16&255),p(a,t.total_in>>24&255)):(_(a,t.adler>>>16),_(a,65535&t.adler)),m(t),0=n.w_size&&(0===s&&(g(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new a.Buf8(n.w_size),a.arraySet(d,e,f-n.w_size,n.w_size,0),e=d,f=n.w_size),l=t.avail_in,u=t.next_in,h=t.input,t.avail_in=f,t.next_in=0,t.input=e,x(n);n.lookahead>=3;){for(i=n.strstart,o=n.lookahead-2;n.ins_h=(n.ins_h<>>=y=_>>>24,b-=y,0==(y=_>>>16&255))M[o++]=65535&_;else{if(!(16&y)){if(0==(64&y)){_=g[(65535&_)+(f&(1<>>=y,b-=y),b<15&&(f+=C[i++]<>>=y=_>>>24,b-=y,!(16&(y=_>>>16&255))){if(0==(64&y)){_=m[(65535&_)+(f&(1<>>=y,b-=y,(y=o-r)>3,f&=(1<<(b-=x<<3))-1,t.next_in=i,t.next_out=o,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(t){var e;return t&&t.state?(t.total_in=t.total_out=(e=t.state).total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):l}function d(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,h(t)):l}function f(t,e){var n,i;return t&&t.state?(i=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=r.wsize?(i.arraySet(r.window,e,n-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(a<(o=r.wsize-r.wnext)&&(o=a),i.arraySet(r.window,e,n-a,o,r.wnext),(a-=o)?(i.arraySet(r.window,e,n-a,a,0),r.wnext=a,r.whave=r.wsize):(r.wnext+=o,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,n.check=o(n.check,T,2,0),v=m=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",n.mode=30;break}if(v-=4,A=8+(15&(m>>>=4)),0===n.wbits)n.wbits=A;else if(A>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(T[0]=255&m,T[1]=m>>>8&255,n.check=o(n.check,T,2,0)),v=m=0,n.mode=3;case 3:for(;v<32;){if(0===b)break t;b--,m+=u[d++]<>>8&255,T[2]=m>>>16&255,T[3]=m>>>24&255,n.check=o(n.check,T,4,0)),v=m=0,n.mode=4;case 4:for(;v<16;){if(0===b)break t;b--,m+=u[d++]<>8),512&n.flags&&(T[0]=255&m,T[1]=m>>>8&255,n.check=o(n.check,T,2,0)),v=m=0,n.mode=5;case 5:if(1024&n.flags){for(;v<16;){if(0===b)break t;b--,m+=u[d++]<>>8&255,n.check=o(n.check,T,2,0)),v=m=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(b<(w=n.length)&&(w=b),w&&(n.head&&(A=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,u,d,w,A)),512&n.flags&&(n.check=o(n.check,u,w,d)),b-=w,d+=w,n.length-=w),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===b)break t;for(w=0;A=u[d+w++],n.head&&A&&n.length<65536&&(n.head.name+=String.fromCharCode(A)),A&&w>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;v<32;){if(0===b)break t;b--,m+=u[d++]<>>=7&v,v-=7&v,n.mode=27;break}for(;v<3;){if(0===b)break t;b--,m+=u[d++]<>>=1)){case 0:n.mode=14;break;case 1:if(p(n),n.mode=20,6!==e)break;m>>>=2,v-=2;break t;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===b)break t;b--,m+=u[d++]<>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,v=m=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(w=n.length){if(b>>=5)),v-=5,n.ncode=4+(15&(m>>>=5)),m>>>=4,v-=4,286>>=3,v-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,j=s(0,n.lens,0,19,n.lencode,0,n.work,B={bits:n.lenbits}),n.lenbits=B.bits,j){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,O=65535&E,!((C=E>>>24)<=v);){if(0===b)break t;b--,m+=u[d++]<>>=C,v-=C,n.lens[n.have++]=O;else{if(16===O){for(z=C+2;v>>=C,v-=C,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}A=n.lens[n.have-1],w=3+(3&m),m>>>=2,v-=2}else if(17===O){for(z=C+3;v>>=C)),m>>>=3,v-=3}else{for(z=C+7;v>>=C)),m>>>=7,v-=7}if(n.have+w>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;w--;)n.lens[n.have++]=A}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,j=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,B={bits:n.lenbits}),n.lenbits=B.bits,j){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,j=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B={bits:n.distbits}),n.distbits=B.bits,j){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(6<=b&&258<=g){t.next_out=f,t.avail_out=g,t.next_in=d,t.avail_in=b,n.hold=m,n.bits=v,r(t,x),f=t.next_out,h=t.output,g=t.avail_out,d=t.next_in,u=t.input,b=t.avail_in,m=n.hold,v=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;M=(E=n.lencode[m&(1<>>16&255,O=65535&E,!((C=E>>>24)<=v);){if(0===b)break t;b--,m+=u[d++]<>P)])>>>16&255,O=65535&E,!(P+(C=E>>>24)<=v);){if(0===b)break t;b--,m+=u[d++]<>>=P,v-=P,n.back+=P}if(m>>>=C,v-=C,n.back+=C,n.length=O,0===M){n.mode=26;break}if(32&M){n.back=-1,n.mode=12;break}if(64&M){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&M,n.mode=22;case 22:if(n.extra){for(z=n.extra;v>>=n.extra,v-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;M=(E=n.distcode[m&(1<>>16&255,O=65535&E,!((C=E>>>24)<=v);){if(0===b)break t;b--,m+=u[d++]<>P)])>>>16&255,O=65535&E,!(P+(C=E>>>24)<=v);){if(0===b)break t;b--,m+=u[d++]<>>=P,v-=P,n.back+=P}if(m>>>=C,v-=C,n.back+=C,64&M){t.msg="invalid distance code",n.mode=30;break}n.offset=O,n.extra=15&M,n.mode=24;case 24:if(n.extra){for(z=n.extra;v>>=n.extra,v-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===g)break t;if(n.offset>(w=x-g)){if((w=n.offset-w)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}k=w>n.wnext?n.wsize-(w-=n.wnext):n.wnext-w,w>n.length&&(w=n.length),S=n.window}else S=h,k=f-n.offset,w=n.length;for(gp?(y=D[N+h[S]],B[z+h[S]]):(y=96,0),f=1<>L)+(b-=f)]=_<<24|y<<16|x|0,0!==b;);for(f=1<>=1;if(0!==f?(j&=f-1,j+=f):j=0,S++,0==--E[k]){if(k===M)break;k=e[n+h[S]]}if(O>>7)]}function x(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function w(t,e,n){t.bi_valid>16-n?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<>>=1,n<<=1,0<--e;);return n>>>1}function C(t,e,n){var i,a,o=new Array(16),r=0;for(i=1;i<=15;i++)o[i]=r=r+n[i-1]<<1;for(a=0;a<=e;a++){var s=t[2*a+1];0!==s&&(t[2*a]=S(o[s]++,s))}}function M(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function O(t){8>1;1<=n;n--)L(t,o,n);for(a=l;n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],L(t,o,1),i=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=i,o[2*a]=o[2*n]+o[2*i],t.depth[a]=(t.depth[n]>=t.depth[i]?t.depth[n]:t.depth[i])+1,o[2*n+1]=o[2*i+1]=a,t.heap[1]=a++,L(t,o,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,i,a,o,r,s,l=e.dyn_tree,c=e.max_code,u=e.stat_desc.static_tree,h=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,b=e.stat_desc.max_length,g=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(l[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<573;n++)b<(o=l[2*l[2*(i=t.heap[n])+1]+1]+1)&&(o=b,g++),l[2*i+1]=o,c>=7;i<30;i++)for(v[i]=a<<7,t=0;t<1<>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),A(t,t.l_desc),A(t,t.d_desc),r=function(t){var e;for(j(t,t.dyn_ltree,t.l_desc.max_code),j(t,t.dyn_dtree,t.d_desc.max_code),A(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),(o=t.static_len+3+7>>>3)<=(a=t.opt_len+3+7>>>3)&&(a=o)):a=o=n+5,n+4<=a&&-1!==e?E(t,e,n,i):4===t.strategy||o===a?(w(t,2+(i?1:0),3),I(t,c,u)):(w(t,4+(i?1:0),3),function(t,e,n,i){var a;for(w(t,e-257,5),w(t,n-1,5),w(t,i-4,4),a=0;a>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(d[n]+256+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},n._tr_align=function(t){w(t,2,3),k(t,256,c),function(t){16===t.bi_valid?(x(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){"use strict";e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}}])}(); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/7-es2015.cfacf17f6f0c118bdebe.js b/classifai-core/src/main/resources/webroot/7-es2015.cfacf17f6f0c118bdebe.js deleted file mode 100644 index 8250510eb..000000000 --- a/classifai-core/src/main/resources/webroot/7-es2015.cfacf17f6f0c118bdebe.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{RN8A:function(e,t,n){"use strict";n.r(t),n.d(t,"DataSetLayoutModule",function(){return pe});var o=n("ofXK"),i=n("XIp8"),a=n("SxV6"),r=n("lJxs"),c=n("eIep"),s=n("5+tZ"),l=n("/uUt"),b=n("1G5W"),d=n("XNiG"),p=n("l5mm"),m=n("z6cu"),h=n("3Pt+"),g=n("fXoL"),u=n("tyNb"),f=n("LY9J"),v=n("F7l1"),w=n("14na"),j=n("I7yr"),_=n("1F7/"),x=n("x2Se"),M=n("sYmb");function P(e,t){if(1&e){const e=g.Nb();g.Kb(0),g.Mb(1,"div",5),g.Mb(2,"div",6),g.Tb("click",function(){return g.hc(e),g.Vb(2).displayModal()}),g.Ib(3,"img",7),g.Mb(4,"label",8),g.oc(5),g.Wb(6,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Jb()}if(2&e){const e=g.Vb(),t=e.index,n=e.$implicit;g.xb(1),g.yb("data-index",t),g.xb(2),g.ac("src",n.src,g.jc),g.xb(2),g.pc(g.Xb(6,3,n.name))}}function y(e,t){if(1&e){const e=g.Nb();g.Mb(0,"div",9),g.Tb("click",function(){g.hc(e);const t=g.Vb().$implicit;return g.Vb().onClickButton(t.id)}),g.Ib(1,"img",10),g.Mb(2,"label",11),g.oc(3),g.Wb(4,"translate"),g.Lb(),g.Lb()}if(2&e){const e=g.Vb(),t=e.$implicit;g.yb("data-index",e.index),g.xb(1),g.lc(t.style),g.ac("src",t.src,g.jc),g.xb(2),g.pc(g.Xb(4,5,t.name))}}function C(e,t){if(1&e&&(g.Kb(0),g.mc(1,P,7,5,"ng-container",3),g.mc(2,y,5,7,"ng-template",null,4,g.nc),g.Jb()),2&e){const e=t.index,n=g.fc(3);g.xb(1),g.ac("ngIf",0===e)("ngIfElse",n)}}let O=(()=>{class e{constructor(){this.menuSchema=[{src:"../../../assets/icons/add.svg",id:"newProject",name:"menuName.newProject"},{src:"../../../assets/icons/import.svg",id:"importProject",name:"menuName.importProject",style:"width: 1.3vw; padding: 0.3vw;"},{src:"../../../assets/icons/project.svg",id:"myProject",name:"menuName.myProject"},{src:"../../../assets/icons/starred.svg",id:"starred",name:"menuName.starred"},{src:"../../../assets/icons/history.svg",id:"recent",name:"menuName.recent"},{src:"../../../assets/icons/trash.svg",id:"trash",name:"menuName.trash"}],this._onCreate=new g.n,this._onImport=new g.n,this.displayModal=()=>{this._onCreate.emit(!0)},this.onClickButton=e=>{"importProject"===e?this._onImport.emit():console.log("This feature is not available yet")}}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=g.Bb({type:e,selectors:[["data-set-side-menu"]],outputs:{_onCreate:"_onCreate",_onImport:"_onImport"},decls:3,vars:1,consts:[[1,"dataset-sidemenu-container"],[4,"ngFor","ngForOf"],[1,"horizontal-line"],[4,"ngIf","ngIfElse"],["otherMenu",""],[1,"new-project-container"],[1,"new-project-btn",3,"click"],[1,"add-icon",3,"src"],[1,"new-project-txt"],[1,"current-project-btn",3,"click"],[1,"project-icon",3,"src"],[1,"current-project-txt"]],template:function(e,t){1&e&&(g.Mb(0,"div",0),g.mc(1,C,4,2,"ng-container",1),g.Lb(),g.Ib(2,"div",2)),2&e&&(g.xb(1),g.ac("ngForOf",t.menuSchema))},directives:[o.j,o.k],pipes:[M.c],styles:[".dataset-sidemenu-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:column;flex-direction:column;width:16vw}.new-project-container[_ngcontent-%COMP%]{margin-bottom:5vh;margin-left:2vw}.new-project-btn[_ngcontent-%COMP%]{padding:1vw;border-radius:5vh;background-color:#525353;border:none;color:#fff;outline:none;cursor:pointer;display:-webkit-flex;display:flex;-webkit-justify-content:space-around;justify-content:space-around;-webkit-align-items:center;align-items:center;min-width:10vw;max-width:10vw;min-height:4vh;max-height:4vh}.new-project-btn[_ngcontent-%COMP%]:hover{background-color:#393838}.add-icon[_ngcontent-%COMP%]{min-height:inherit;max-height:inherit}.new-project-txt[_ngcontent-%COMP%]{border:none;background:none;outline:none;cursor:pointer;font-size:2vh;color:#fff;text-align:start;white-space:nowrap}.current-project-btn[_ngcontent-%COMP%]{color:#fff;cursor:pointer;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;border-radius:5vh;padding:1vh 1vw;margin-left:2vw;min-width:10vw;max-width:10vw;min-height:5vh;max-height:5vh;-webkit-flex:1 1 100%;flex:1 1 100%}.current-project-btn[_ngcontent-%COMP%]:hover{background-color:#525353}.project-icon[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;-webkit-flex:1 1 10%;flex:1 1 10%}.current-project-txt[_ngcontent-%COMP%]{border:none;background:none;outline:none;cursor:pointer;font-size:2vh;color:#fff;white-space:nowrap;-webkit-flex:1 1 90%;flex:1 1 90%;text-align:left;padding-left:20px}.horizontal-line[_ngcontent-%COMP%]{width:12vw;background-color:#393838;min-height:.3vh;max-height:.3vh;margin:auto;border:.0625rem solid #000}"]}),e})(),L=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=g.Bb({type:e,selectors:[["data-set-header"]],decls:6,vars:3,consts:[[1,"dataset-header-container"],[1,"label"],[1,"dataset-icon-container"]],template:function(e,t){1&e&&(g.Mb(0,"div",0),g.Mb(1,"label",1),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Mb(4,"div",2),g.Ib(5,"div"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.pc(g.Xb(3,1,"datasetHeader.datasetManagement")))},pipes:[M.c],styles:[".dataset-header-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:space-around;justify-content:space-around;-webkit-align-items:center;align-items:center;padding:1vw;min-width:80vw;max-width:80vw}.label[_ngcontent-%COMP%]{-webkit-flex:1 1 80%;flex:1 1 80%;background:none;font-size:2.5vh;color:#fff;white-space:nowrap;min-height:inherit;max-height:inherit}.dataset-icon-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;align-items:center;-webkit-flex:1 1 20%;flex:1 1 20%}.dataset-icon[_ngcontent-%COMP%]{-webkit-flex:1 1 3%;flex:1 1 3%;min-width:2vw;max-width:2vw;cursor:pointer}.dataset-icon[_ngcontent-%COMP%]:hover{border-radius:5vh;background-color:#393838}.dataset-select[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;font-size:2vh;min-width:7vw;max-width:7vw;-moz-text-align-last:center;background:#000;color:#fff;border:.1vw solid;text-align-last:center}.dataset-select[_ngcontent-%COMP%]:focus, .dataset-select[_ngcontent-%COMP%]:hover{background:#393838;-moz-appearance:none;-webkit-appearance:none}select[_ngcontent-%COMP%]{-moz-appearance:none;-webkit-appearance:none}option[_ngcontent-%COMP%]{background:#000;text-align:center}"]}),e})();function I(e,t){1&e&&(g.Kb(0),g.Mb(1,"div",2),g.Mb(2,"div",3),g.Mb(3,"div",4),g.Mb(4,"label",5),g.oc(5),g.Wb(6,"translate"),g.Lb(),g.Lb(),g.Mb(7,"div"),g.Mb(8,"label",6),g.oc(9),g.Wb(10,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Jb()),2&e&&(g.xb(5),g.pc(g.Xb(6,2,"datasetCard.fetchingProject")),g.xb(4),g.pc(g.Xb(10,4,"datasetCard.pleaseWait")))}const k=function(e){return{disabled:e}};function S(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"label",24),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Jb()),2&e){const e=g.Vb().$implicit;g.xb(1),g.ac("ngClass",g.dc(4,k,!e.root_path_valid)),g.xb(1),g.qc(" ",g.Xb(3,2,"datasetCard.uploading")," ")}}function N(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"label",26),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Jb()),2&e){const e=g.Vb(2).$implicit;g.xb(1),g.ac("ngClass",g.dc(4,k,!e.root_path_valid)),g.xb(1),g.pc(g.Xb(3,2,"datasetCard.new"))}}function F(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"label",27),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Jb()),2&e){const e=g.Vb(2).$implicit;g.xb(1),g.ac("ngClass",g.dc(4,k,!e.root_path_valid)),g.xb(1),g.pc(g.Xb(3,2,"datasetCard.available"))}}function W(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"label",28),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Jb()),2&e){const e=g.Vb(2).$implicit;g.xb(1),g.ac("ngClass",g.dc(4,k,!e.root_path_valid)),g.xb(1),g.pc(g.Xb(3,2,"datasetCard.opened"))}}function D(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"label",29),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Jb()),2&e){const e=g.Vb(2).$implicit;g.xb(1),g.ac("ngClass",g.dc(4,k,!e.root_path_valid)),g.xb(1),g.pc(g.Xb(3,2,"datasetCard.invalidPath"))}}function X(e,t){if(1&e&&(g.Kb(0,25),g.mc(1,N,4,6,"ng-container",16),g.mc(2,F,4,6,"ng-container",16),g.mc(3,W,4,6,"ng-container",16),g.mc(4,D,4,6,"ng-container",16),g.Jb()),2&e){const e=g.Vb().$implicit;g.ac("ngSwitch",e),g.xb(1),g.ac("ngIf",e.is_new&&e.root_path_valid),g.xb(1),g.ac("ngIf",!e.is_new&&!e.is_loaded&&e.root_path_valid),g.xb(1),g.ac("ngIf",!e.is_new&&e.is_loaded&&e.root_path_valid),g.xb(1),g.ac("ngIf",!e.root_path_valid)}}function T(e,t){if(1&e){const e=g.Nb();g.Kb(0),g.Mb(1,"span"),g.Mb(2,"div",30),g.Mb(3,"div",31),g.Tb("click",function(){g.hc(e);const t=g.Vb().$implicit;return g.Vb(3).onRenameProject(t.project_name)}),g.oc(4),g.Wb(5,"translate"),g.Lb(),g.Mb(6,"div",31),g.Tb("click",function(){g.hc(e);const t=g.Vb().$implicit;return g.Vb(3).onDeleteProject(t.project_name)}),g.oc(7),g.Wb(8,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Jb()}2&e&&(g.xb(4),g.qc(" ",g.Xb(5,2,"datasetCard.renameProject")," "),g.xb(3),g.qc(" ",g.Xb(8,4,"datasetCard.deleteProject")," "))}const E=function(e){return[e]};function z(e,t){if(1&e){const e=g.Nb();g.Kb(0),g.Mb(1,"div",9),g.Tb("dblclick",function(){g.hc(e);const n=t.$implicit,o=t.index,i=g.Vb(3);return n.root_path_valid&&i.onOpenProject(o,n)}),g.Mb(2,"div",10),g.Mb(3,"div"),g.mc(4,S,4,6,"ng-container",0),g.mc(5,X,5,5,"ng-template",null,11,g.nc),g.Lb(),g.Mb(7,"div",12),g.Mb(8,"div",13),g.Tb("click",function(){g.hc(e);const n=t.$implicit;return g.Vb(3).onStarred(n,!n.is_starred)})("dblclick",function(t){return g.hc(e),g.Vb(3).onDblClickStopPropagate(t)}),g.Ib(9,"img",14),g.Lb(),g.Mb(10,"div",13),g.Tb("click",function(){g.hc(e);const n=t.index;return g.Vb(3).onDisplayMore(n)})("dblclick",function(t){return g.hc(e),g.Vb(3).onDblClickStopPropagate(t)}),g.Ib(11,"img",15),g.Lb(),g.mc(12,T,9,6,"ng-container",16),g.Lb(),g.Lb(),g.Mb(13,"div",17),g.Mb(14,"label",18),g.Mb(15,"div",19),g.oc(16),g.Wb(17,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Mb(18,"div",20),g.Mb(19,"label",18),g.Mb(20,"div",21),g.oc(21),g.Lb(),g.Lb(),g.Lb(),g.Mb(22,"div",20),g.Mb(23,"label",18),g.Mb(24,"div",21),g.oc(25),g.Wb(26,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Mb(27,"div",22),g.Mb(28,"label",18),g.Mb(29,"div",23),g.oc(30),g.Wb(31,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Jb()}if(2&e){const e=t.$implicit,n=t.index,o=g.fc(6),i=g.Vb(3);g.xb(1),g.ac("ngClass",g.dc(27,k,!e.root_path_valid)),g.yb("data-index",n),g.xb(3),g.ac("ngIf",i.isExactIndex(n)&&i._jsonSchema.isUploading)("ngIfElse",o),g.xb(5),g.ac("src",g.dc(29,E,e.is_starred?i.starredActiveIcon:i.starredInactiveIcon),g.jc),g.xb(3),g.ac("ngIf",i.isExactIndex(n)),g.xb(2),g.ac("title",e.created_date)("ngClass",g.dc(31,k,!e.root_path_valid)),g.xb(2),g.rc(" ",g.Xb(17,21,"datasetCard.created")," ",e.created_date," "),g.xb(3),g.ac("title",e.project_name)("ngClass",g.dc(33,k,!e.root_path_valid)),g.xb(2),g.qc(" ",e.project_name," "),g.xb(2),g.ac("title","Total Photo: "+e.total_uuid)("ngClass",g.dc(35,k,!e.root_path_valid)),g.xb(2),g.rc(" ",g.Xb(26,23,"datasetCard.totalPhoto")," ",e.total_uuid," "),g.xb(3),g.ac("title",e.project_path)("ngClass",g.dc(37,k,!e.root_path_valid)),g.xb(2),g.rc(" ",g.Xb(31,25,"datasetCard.projectPath")," : ",e.project_path," ")}}function B(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"div",2),g.mc(2,z,32,39,"ng-container",8),g.Lb(),g.Jb()),2&e){const e=g.Vb(2);g.xb(2),g.ac("ngForOf",e._jsonSchema.projects)}}function V(e,t){1&e&&(g.Mb(0,"div",2),g.Mb(1,"div",3),g.Mb(2,"div",4),g.Mb(3,"label",5),g.oc(4),g.Wb(5,"translate"),g.Lb(),g.Lb(),g.Mb(6,"div"),g.Mb(7,"label",6),g.oc(8),g.Wb(9,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Lb()),2&e&&(g.xb(4),g.pc(g.Xb(5,2,"datasetCard.noProject")),g.xb(4),g.pc(g.Xb(9,4,"datasetCard.createNew")))}function U(e,t){if(1&e&&(g.mc(0,B,3,1,"ng-container",0),g.mc(1,V,10,6,"ng-template",null,7,g.nc)),2&e){const e=g.fc(2),t=g.Vb();g.ac("ngIf",t._jsonSchema.projects.length>0)("ngIfElse",e)}}let q=(()=>{class e{constructor(e){this._cd=e,this._onClick=new g.n,this._onStarred=new g.n,this._onDelete=new g.n,this._onRename=new g.n,this.starredActiveIcon="../../../assets/icons/starred_active.svg",this.starredInactiveIcon="../../../assets/icons/starred.svg",this.cardSchema={clickIndex:-1},this.previousProjectLength=0,this.conditionalDisableProject=({is_loaded:e})=>e?"disabled":"enabled",this.conditionalDisableClickEvent=e=>e,this.onOpenProject=(e,{project_name:t})=>{!this.isExactIndex(e)&&this._onClick.emit(t)},this.onDisplayMore=(e=this.cardSchema.clickIndex)=>{const{clickIndex:t}=this.cardSchema;this.cardSchema={clickIndex:t===e?-1:e}},this.onCloseDisplay=()=>{this.cardSchema.clickIndex=-1},this.onStarred=(e,t)=>{const{project_name:n}=e;this._jsonSchema.projects=this._jsonSchema.projects.map(e=>e.project_name===n?(e.is_starred=t,e):e),this._onStarred.emit({projectName:n,starred:t})},this.isExactIndex=e=>e===this.cardSchema.clickIndex,this.onDblClickStopPropagate=e=>e.stopPropagation()}ngOnInit(){}onRenameProject(e){this._onRename.emit({shown:!0,projectName:e}),this.onCloseDisplay()}onDeleteProject(e){this._onDelete.emit(e),this.onCloseDisplay()}ngOnChanges(e){const{isUploading:t}=e._jsonSchema.currentValue;!t&&this.onDisplayMore(),this._jsonSchema.projects.length!==this.previousProjectLength&&(this.cardSchema.clickIndex=-1),this.previousProjectLength=this._jsonSchema.projects.length}}return e.\u0275fac=function(t){return new(t||e)(g.Hb(g.h))},e.\u0275cmp=g.Bb({type:e,selectors:[["data-set-card"]],inputs:{_jsonSchema:"_jsonSchema"},outputs:{_onClick:"_onClick",_onStarred:"_onStarred",_onDelete:"_onDelete",_onRename:"_onRename"},features:[g.vb],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["showCardBody",""],[1,"card-layout-container","scroll","fade-in"],[1,"no-project-card-container"],[1,"no-project-title-padding"],[1,"no-project-title"],[1,"no-project-subtitle"],["noProject",""],[4,"ngFor","ngForOf"],[1,"card-container",3,"ngClass","dblclick"],[1,"card-header-style"],["newLabel",""],[1,"card-icon-container"],[3,"click","dblclick"],[1,"card-icon-style",3,"src"],["src","../../../assets/icons/more.svg",1,"card-icon-style","enabled"],[4,"ngIf"],[1,"card-title-style"],[3,"title","ngClass"],[1,"card-title-txt"],[1,"project-name-style"],[1,"project-info"],[1,"project-path-style"],[1,"project-path"],[1,"project-status-uploading",3,"ngClass"],[3,"ngSwitch"],[1,"project-status-new",3,"ngClass"],[1,"project-status-available",3,"ngClass"],[1,"project-status-opened",3,"ngClass"],[1,"project-status-invalid",3,"ngClass"],[1,"popup-container","enabled"],[1,"popup-label",3,"click"]],template:function(e,t){if(1&e&&(g.mc(0,I,11,6,"ng-container",0),g.mc(1,U,3,2,"ng-template",null,1,g.nc)),2&e){const e=g.fc(2);g.ac("ngIf",t._jsonSchema.isFetching)("ngIfElse",e)}},directives:[o.k,o.j,o.i,o.m],pipes:[M.c],styles:['@keyframes fade-in{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}.fade-in[_ngcontent-%COMP%]{animation:fadeIn 1.5s ease;-webkit-animation:fadeIn 1.5s ease;-moz-animation:fadeIn ease 1.5s;-o-animation:fadeIn ease 1.5s;-ms-animation:fadeIn ease 1.5s}.card-layout-container[_ngcontent-%COMP%]{width:80vw;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;padding:0 0 0 1vw;overflow-y:scroll;position:relative;height:80vh}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px;background-color:#000}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:.5vw}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.card-container[_ngcontent-%COMP%]{min-width:11vw;max-width:11vw;min-height:30vh;max-height:30vh;border-style:solid;font-size:2.2vh;background:#2e2d2d;position:relative}.card-container[_ngcontent-%COMP%]:hover{background:#404040}.card-container[_ngcontent-%COMP%]:before{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:.3vw;background-color:#363636}.enabled[_ngcontent-%COMP%]{cursor:pointer}.disabled[_ngcontent-%COMP%]{cursor:not-allowed}.project-status-new[_ngcontent-%COMP%]{background-color:#f59221}.project-status-available[_ngcontent-%COMP%], .project-status-new[_ngcontent-%COMP%]{color:#f5f5f5;font-size:60%;padding:.3vh 1.5vw .6vh 1vw}.project-status-available[_ngcontent-%COMP%]{background-color:#92c91b}.project-status-opened[_ngcontent-%COMP%]{background-color:#258fc0}.project-status-invalid[_ngcontent-%COMP%], .project-status-opened[_ngcontent-%COMP%]{color:#f5f5f5;font-size:60%;padding:.3vh 1.5vw .6vh 1vw}.project-status-invalid[_ngcontent-%COMP%]{background-color:#de1c44}.card-icon-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex}.card-icon-style[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh}.card-icon-style[_ngcontent-%COMP%]:hover{border-radius:5vh;background-color:#393838}.card-header-style[_ngcontent-%COMP%]{margin-top:1vh;display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;position:relative}.card-title-style[_ngcontent-%COMP%]{margin-left:1vw}.card-title-txt[_ngcontent-%COMP%]{color:#656667;font-size:1.3vh;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-name-style[_ngcontent-%COMP%], .project-path-style[_ngcontent-%COMP%]{margin-left:1vw;padding:1vh 0 0}.project-path-style[_ngcontent-%COMP%]{width:90%;position:absolute;bottom:1vh}.project-info[_ngcontent-%COMP%]{color:#dbdbda;font-size:2vh;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-path[_ngcontent-%COMP%]{word-wrap:break-word;font-size:1.2vh;color:#737475;position:relative}.tag-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;border-radius:10vw;background:#363636;width:4.5vw;padding:.2vw .3vh;cursor:pointer;outline:none;border:none;margin:.8vh 0 0 1vw}.tag-img[_ngcontent-%COMP%]{min-height:2vh;max-height:2vh;min-width:1vw;max-width:1vw;margin-left:.35vw}.tag-txt[_ngcontent-%COMP%]{font-size:1.2vh;color:#fff;padding:.2vh 0 0 .3vw;cursor:pointer}.popup-container[_ngcontent-%COMP%]{overflow:hidden;position:absolute;margin:4vh 0 0 -10vw;padding:.5vw;border-radius:.2vw;box-shadow:0 2px 5px 0 rgba(var(--shadow-rgb),.26),0 2px 10px 0 rgba(var(--shadow-rgb),.16);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:scale(1);transform:scale(1);opacity:1;white-space:nowrap;background:#fff;font-size:1.5vh;-webkit-animation:appear .35s ease-in 1;animation:appear .35s ease-in 1}@-webkit-keyframes appear{0%{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}}@keyframes appear{0%{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}}.popup-label[_ngcontent-%COMP%]{font-size:2vh;padding:.5vw}.popup-label[_ngcontent-%COMP%]:hover{background:#e9e9e9}.no-project-title[_ngcontent-%COMP%]{font-size:4vh;color:#fff;white-space:nowrap}.no-project-title-padding[_ngcontent-%COMP%]{padding:2vw}.no-project-subtitle[_ngcontent-%COMP%]{font-size:2vh;color:#bebebe;white-space:nowrap}.no-project-card-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;background-color:#1f1f1f;width:100%}']}),e})();var R=n("44N4"),J=n("OObL"),$=n("TJKd");const H=["refProjectName"],A=["projectfoldername"],K=["labeltextfilename"],Y=["refNewProjectName"],G=["jsonImportProjectFile"],Z=["jsonImportProjectFilename"];function Q(e,t){if(1&e&&(g.Mb(0,"div",51),g.Mb(1,"p",52),g.oc(2),g.Lb(),g.Lb()),2&e){const e=g.Vb();g.xb(2),g.qc(" ",e.isImageUploading?"Uploading the Images. Please Wait...":"Selection Window is Opened"," ")}}function ee(e,t){1&e&&(g.Mb(0,"span"),g.Mb(1,"small",54),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.qc(" ",g.Xb(3,1,"projectNameExist")," "))}function te(e,t){1&e&&(g.Mb(0,"span"),g.Mb(1,"small",54),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.qc(" ",g.Xb(3,1,"projectNameRequired")," "))}function ne(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"div",53),g.mc(2,ee,4,3,"span",35),g.mc(3,te,4,3,"span",35),g.Lb(),g.Jb()),2&e){const e=g.Vb();let t=null,n=null;g.xb(2),g.ac("ngIf",null==(t=e.form.get("projectName"))?null:t.getError("exist")),g.xb(1),g.ac("ngIf",null==(n=e.form.get("projectName"))?null:n.getError("required"))}}function oe(e,t){1&e&&g.Ib(0,"div",55)}function ie(e,t){1&e&&(g.Mb(0,"span",56),g.Mb(1,"p"),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Mb(4,"p"),g.oc(5),g.Wb(6,"translate"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.pc(g.Xb(3,2,"labelFileDest1")),g.xb(3),g.pc(g.Xb(6,4,"labelFileDest2")))}function ae(e,t){1&e&&(g.Mb(0,"span"),g.Mb(1,"small",58),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.qc(" ",g.Xb(3,1,"projectNameExist")," "))}function re(e,t){1&e&&(g.Mb(0,"span"),g.Mb(1,"small",58),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.qc(" ",g.Xb(3,1,"projectNameRequired")," "))}function ce(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"div",57),g.mc(2,ae,4,3,"span",35),g.mc(3,re,4,3,"span",35),g.Lb(),g.Jb()),2&e){const e=g.Vb();let t=null,n=null;g.xb(2),g.ac("ngIf",null==(t=e.renameForm.get("newProjectName"))?null:t.getError("exist")),g.xb(1),g.ac("ngIf",null==(n=e.renameForm.get("newProjectName"))?null:n.getError("required"))}}function se(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"div",59),g.Mb(2,"span"),g.Mb(3,"small",58),g.oc(4),g.Wb(5,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Jb()),2&e){const e=g.Vb();g.xb(1),g.ac("ngClass",e.spanClass),g.xb(3),g.rc("",g.Xb(5,3,e.modalSpanMessage),"",e.modalImportProjectName,"")}}const le=[{path:"",component:(()=>{class e{constructor(e,t,n,o,g,u,f){this._fb=e,this._router=t,this._dataSetService=n,this._spinnerService=o,this._imgLblModeService=g,this._languageService=u,this._modalService=f,this.onChangeSchema={currentThumbnailIndex:-1,thumbnailName:"",totalNumThumbnail:0,status:void 0},this.projectList={projects:[],isUploading:!1,isFetching:!1},this.inputProjectName="",this.newInputProjectName="",this.selectedProjectName="",this.oldProjectName="",this.subject$=new d.a,this.thumbnailList=[],this.labelList=[],this.unsubscribe$=new d.a,this.isLoading=!1,this.isOverlayOn=!1,this.isImageUploading=!1,this.isProjectLoading=!1,this.isDeleteSuccess=!1,this.projectName="",this.imgLblMode=null,this.modalSpanMessage="",this.modalImportProjectName="",this.spanClass="",this.labelPath="",this.projectFolderPath="",this.showLabelTooltip=!1,this.unsupportedImageList=[],this.modalIdCreateProject="modal-create-project",this.modalIdRenameProject="modal-rename-project",this.modalIdImportProject="modal-import-project",this.modalIdDeleteProject="modal-delete-project",this.modalIdRenameSuccess="modal-rename-success",this.modalUnsupportedImage="modal-unsupported-image",this.createProjectModalBodyStyle={minHeight:"45vh",minWidth:"31vw",maxWidth:"31vw",margin:"12vw 71vh",overflow:"none"},this.renameProjectModalBodyStyle={minHeight:"23vh",maxHeight:"25vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.importProjectModalBodyStyle={minHeight:"15vh",maxHeight:"25vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.deleteProjectBodyStyle={minHeight:"11vh",maxHeight:"11vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.renameSuccessBodyStyle={minHeight:"11vh",maxHeight:"11vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.unsupportedImageBodyStyle={minHeight:"18vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.showProjectList=()=>{this.projectList.isFetching=!0,this._dataSetService.getProjectList().pipe(Object(a.a)()).subscribe(({content:e})=>{if(e){const t=Object(i.a)(e).map(e=>Object.assign(Object.assign({},e),{created_date:this.formatDate(e.created_date)}));this.projectList=Object.assign(Object.assign({},this.projectList),{projects:t,isFetching:!1})}})},this.formatDate=e=>{const t=new Date(e),n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"].find((e,n)=>n===t.getMonth()||void 0);return n?`${n}-${t.getDate()}-${t.getFullYear()}`:"Error"},this.createFormControls=()=>{this.form=this._fb.group({projectName:["",h.l.required]})},this.renameFormControls=()=>{this.renameForm=this._fb.group({newProjectName:["",h.l.required]})},this.onChange=e=>{this.inputProjectName=e},this.onChangeRename=e=>{this.newInputProjectName=e},this.toggleModalDisplay=e=>{this._projectFoldername.nativeElement.innerHTML="",this._labelTextFilename.nativeElement.innerHTML="",e&&this.form.reset(),e?this._modalService.open(this.modalIdCreateProject):this._modalService.close(this.modalIdCreateProject)},this.toggleRenameModalDisplay=e=>{if(!e)return void this._modalService.close(this.modalIdRenameProject);const{shown:t,projectName:n}=e;t?(this.renameForm.reset(),this._modalService.open(this.modalIdRenameProject)):this._modalService.close(this.modalIdRenameProject),this.oldProjectName=n},this.toggleImportProjectModalDisplay=e=>{this.modalSpanMessage="",e?this._modalService.open(this.modalIdImportProject):this._modalService.close(this.modalIdImportProject)},this.onSelectImportProjectJson=()=>{this.toggleImportProjectModalDisplay(!0);const e=this._dataSetService.importStatus();this._dataSetService.importProject().pipe(Object(a.a)(),Object(r.a)(({message:e})=>e)).subscribe(t=>{let n=!1;Object(p.a)(500).pipe(Object(c.a)(()=>e),Object(a.a)(e=>(this.isOverlayOn=1===e.file_system_status||2===e.file_system_status,0!==e.file_system_status&&3!==e.file_system_status&&5!==e.file_system_status||(n=!0),n))).subscribe(e=>{this.modalSpanMessage="DATABASE_UPDATED"===e.file_system_message?"importSuccess":"importAborted",this.modalImportProjectName="DATABASE_UPDATED"===e.file_system_message&&e.project_name?e.project_name:"",this.processIsSuccess(5!==e.file_system_status),this.showProjectList()})})},this.processIsSuccess=e=>{this.spanClass=e?"validation-success":"validation-error"},this.importProject=()=>{this.toggleImportProjectModalDisplay(!0)},this.onStarred=({projectName:e,starred:t})=>{this._dataSetService.updateProjectStatus(e,t,"star").pipe(Object(a.a)()).subscribe(({message:e})=>console.log(e),t=>this.projectList={isUploading:this.projectList.isUploading,isFetching:this.projectList.isFetching,projects:this.projectList.projects.map(t=>t.project_name===e?Object.assign(Object.assign({},t),{is_starred:!1}):t)})},this.onSubmit=(e,t)=>{var n,o,i;this.form.markAllAsTouched(),e?this.inputProjectName?this.projectList.projects&&this.projectList.projects.find(e=>e&&e.project_name===this.inputProjectName)?(null===(n=this.form.get("projectName"))||void 0===n||n.setErrors({exist:!0}),this._refProjectName.nativeElement.focus()):(this.createProject(this.inputProjectName),this.selectedProjectName=null===(o=this.form.get("projectName"))||void 0===o?void 0:o.value):(null===(i=this.form.get("projectName"))||void 0===i||i.setErrors({required:!0}),this._refProjectName.nativeElement.focus()):t&&this.startProject(t)},this.onOpenImportProject=(e,t)=>{console.log("BUTTON IMPORT CLICKED")},this.startProject=e=>{this._router.navigate(["imglabel/"+this.imgLblMode],{state:{projectName:e}})},this.createProject=e=>{const t=this._dataSetService.createNewProject(e,this.labelPath,this.projectFolderPath),n=this._dataSetService.localUploadStatus(e);let o=0;const i=({message:e})=>1===e?Object(p.a)(500).pipe(Object(s.a)(()=>n),Object(a.a)(({file_system_status:e,unsupported_image_list:t})=>(this.unsupportedImageList=t,this.isOverlayOn=1===e||2===e,this.isImageUploading=2===e,3===e))):Object(m.a)(e=>(console.error(e),this.projectList=Object.assign(Object.assign({},this.projectList),{isUploading:!1}),e));this.projectList=Object.assign(Object.assign({},this.projectList),{isUploading:!0}),this.subjectSubscription=this.subject$.pipe(Object(a.a)(),Object(s.a)(()=>t),Object(s.a)(e=>i(e))).subscribe(e=>{3===e.file_system_status&&this.toggleModalDisplay(!1),this.isProjectLoading=!0,o=e?--o:o,o<1&&(this.projectList=Object.assign(Object.assign({},this.projectList),{isUploading:!1}))},e=>{},()=>{this.isProjectLoading=!1,this.showProjectList(),this.unsupportedImageList.length>0&&this._dataSetService.downloadUnsupportedImageList(e,this.unsupportedImageList).then(e=>{e&&this._modalService.open(this.modalUnsupportedImage)})}),this.subject$.next()},this.renameProject=(e,t)=>{this._dataSetService.renameProject(e,t).pipe(Object(a.a)(),Object(r.a)(({message:e})=>e)).subscribe(t=>{1===t&&(this._languageService._translate.get("renameSuccess").subscribe(t=>{this.projectName=e,this.modalSpanMessage=t,this._modalService.open(this.modalIdRenameSuccess)}),this.showProjectList(),this.toggleRenameModalDisplay())})},this.deleteProject=e=>{this._dataSetService.deleteProject(e).pipe(Object(a.a)(),Object(r.a)(({message:e})=>e)).subscribe(t=>{1===t&&(this._languageService._translate.get("deleteSuccess").subscribe(t=>{this.isDeleteSuccess=!0,this.projectName=e,this._modalService.open(this.modalIdDeleteProject)}),this.showProjectList())})},this.keyDownEvent=({key:e})=>{"Escape"===e&&this.toggleRenameModalDisplay()&&this.toggleModalDisplay(!1)},this._imgLblModeService.imgLabelMode$.pipe(Object(l.a)()).subscribe(e=>this.imgLblMode=e),this._spinnerService.returnAsObservable().pipe(Object(b.a)(this.unsubscribe$)).subscribe(e=>this.isLoading=e),this.createFormControls(),this.renameFormControls(),this._languageService.initializeLanguage("data-set-page",["data-set-page-en","data-set-page-cn","data-set-page-ms"])}ngOnInit(){this.showProjectList()}onSubmitRename(){var e,t,n;this.renameForm.markAllAsTouched(),this.newInputProjectName?this.projectList.projects&&this.projectList.projects.find(e=>e?e.project_name===this.newInputProjectName:null)?(null===(e=this.renameForm.get("newProjectName"))||void 0===e||e.setErrors({exist:!0}),this._refProjectName.nativeElement.focus()):(this.renameProject(this.oldProjectName,this.newInputProjectName),this.selectedProjectName=null===(t=this.renameForm.get("newProjectName"))||void 0===t?void 0:t.value):(null===(n=this.renameForm.get("newProjectName"))||void 0===n||n.setErrors({required:!0}),this._refProjectName.nativeElement.focus())}isCreateFormIncomplete(){return""===this.inputProjectName||""===this.projectFolderPath}selectProjectFolder(){const e=this._dataSetService.importProjectFolderStatus();this._dataSetService.importProjectFolder().pipe(Object(a.a)(),Object(r.a)(({message:e})=>e)).subscribe(t=>{let n=!1;Object(p.a)(500).pipe(Object(c.a)(()=>e),Object(a.a)(e=>(this.isOverlayOn=0===e.window_status,1===e.window_status&&""!==e.project_path&&(this._projectFoldername.nativeElement.innerHTML=e.project_path.replace(/^.*[\\\/]/,""),this.projectFolderPath=e.project_path),1===e.window_status&&(n=!0),n))).subscribe(e=>{this.showProjectList()})})}importLabelFile(){const e=this._dataSetService.importLabelFileStatus();this._dataSetService.importLabelFile().pipe(Object(a.a)(),Object(r.a)(({message:e})=>e)).subscribe(t=>{let n=!1;Object(p.a)(500).pipe(Object(c.a)(()=>e),Object(a.a)(e=>(this.isOverlayOn=0===e.window_status,1===e.window_status&&""!==e.label_file_path&&(this._labelTextFilename.nativeElement.innerHTML=e.label_file_path.replace(/^.*[\\\/]/,""),this.labelPath=e.label_file_path),1===e.window_status&&(n=!0),n))).subscribe(e=>{this.showProjectList()})})}onWindowClose(e){e.preventDefault(),this.isProjectLoading&&(e.returnValue="Are you sure you want to leave this page?")}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}}return e.\u0275fac=function(t){return new(t||e)(g.Hb(h.b),g.Hb(u.a),g.Hb(f.a),g.Hb(v.a),g.Hb(w.a),g.Hb(j.a),g.Hb(_.a))},e.\u0275cmp=g.Bb({type:e,selectors:[["data-set-layout"]],viewQuery:function(e,t){if(1&e&&(g.tc(H,!0),g.tc(A,!0),g.tc(K,!0),g.tc(Y,!0),g.tc(G,!0),g.tc(Z,!0)),2&e){let e;g.ec(e=g.Ub())&&(t._refProjectName=e.first),g.ec(e=g.Ub())&&(t._projectFoldername=e.first),g.ec(e=g.Ub())&&(t._labelTextFilename=e.first),g.ec(e=g.Ub())&&(t._refNewProjectName=e.first),g.ec(e=g.Ub())&&(t._jsonImportProjectFile=e.first),g.ec(e=g.Ub())&&(t._jsonImportProjectFilename=e.first)}},hostBindings:function(e,t){1&e&&g.Tb("keydown",function(e){return t.keyDownEvent(e)},!1,g.gc)("beforeunload",function(e){return t.onWindowClose(e)},!1,g.gc)},decls:121,vars:103,consts:[["class","overlay",4,"ngIf"],[3,"_onChange"],[1,"upper-container"],[3,"_onCreate","_onImport"],[3,"_jsonSchema","_onClick","_onStarred","_onDelete","_onRename"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[3,"formGroup"],[1,"content-container"],[1,"new-project-container"],[1,"label","label-name"],["type","text","placeholder","Enter project name","formControlName","projectName",1,"input-style",3,"value","input"],["refProjectName",""],[4,"ngIf","ngIfElse"],["emptycontainer",""],[1,"select-folder-container"],[1,"label","label-select-folder"],["type","button",1,"button-style","choose-folder-button",3,"click"],[1,"folder-name-container"],[1,"foldername"],["projectfoldername",""],[1,"select-file-container"],[1,"label-select-label"],["src","../../assets/icons/help.svg",1,"help-icon",3,"mouseover","mouseout"],[2,"padding-top","1vh"],["type","button",1,"button-file-style","choose-file-button",3,"click"],["class","labeltooltiptext",4,"ngIf"],[1,"file-name-container"],[1,"filename"],["labeltextfilename",""],[1,"horizontal-line"],[1,"model-button-container"],["type","submit",1,"button-style","create-btn",3,"ngClass","disabled","click"],[1,"label"],["type","text","placeholder","Enter new project name","formControlName","newProjectName",1,"input-style",3,"value","input"],["refNewProjectName",""],[4,"ngIf"],["type","submit",1,"button-style","create-btn",3,"click"],[1,"label-config"],[1,"help-icon-container"],["src","../../assets/icons/help.svg",1,"help-icon"],[1,"tooltiptext"],[1,"choose-file-btn"],["type","button",1,"input-id",3,"click"],["jsonImportProjectFilename",""],[2,"padding-bottom","2vh"],[1,"modal-message-container"],[1,"display-message-container"],[1,"display-msg"],[1,"validation-success"],[3,"_modalUnsupportedImage","_unsupportedImageBodyStyle","_unsupportedImageList"],[3,"_loading"],[1,"overlay"],[2,"margin-top","40vh","color","rgb(255, 255, 255, 0.9)","text-align","center","font-size","3vh"],[1,"validation"],[1,"error-create-msg"],[1,"empty-container"],[1,"labeltooltiptext"],[1,"validation-rename"],[1,"error-msg"],[3,"ngClass"]],template:function(e,t){if(1&e&&(g.mc(0,Q,3,1,"div",0),g.Ib(1,"page-header",1),g.Mb(2,"div",2),g.Mb(3,"data-set-side-menu",3),g.Tb("_onCreate",function(e){return t.toggleModalDisplay(e)})("_onImport",function(){return t.importProject()}),g.Lb(),g.Mb(4,"div"),g.Ib(5,"data-set-header"),g.Mb(6,"data-set-card",4),g.Tb("_onClick",function(e){return t.onSubmit(!1,e)})("_onStarred",function(e){return t.onStarred(e)})("_onDelete",function(e){return t.deleteProject(e)})("_onRename",function(e){return t.toggleRenameModalDisplay(e)}),g.Lb(),g.Lb(),g.Lb(),g.Mb(7,"modal",5),g.Wb(8,"translate"),g.Mb(9,"form",6),g.Mb(10,"div",7),g.Mb(11,"div",8),g.Mb(12,"label",9),g.oc(13),g.Wb(14,"translate"),g.Lb(),g.Mb(15,"input",10,11),g.Tb("input",function(e){return t.onChange(e.target.value)}),g.Lb(),g.Lb(),g.mc(17,ne,4,2,"ng-container",12),g.mc(18,oe,1,0,"ng-template",null,13,g.nc),g.Ib(20,"br"),g.Mb(21,"div",14),g.Mb(22,"label",15),g.oc(23),g.Wb(24,"translate"),g.Lb(),g.Mb(25,"button",16),g.Tb("click",function(){return t.selectProjectFolder()}),g.oc(26),g.Wb(27,"translate"),g.Lb(),g.Lb(),g.Mb(28,"div",17),g.Ib(29,"label",18,19),g.Lb(),g.Ib(31,"br"),g.Mb(32,"div",20),g.Mb(33,"label",21),g.oc(34),g.Wb(35,"translate"),g.Ib(36,"br"),g.oc(37),g.Wb(38,"translate"),g.Mb(39,"img",22),g.Tb("mouseover",function(){return t.showLabelTooltip=!0})("mouseout",function(){return t.showLabelTooltip=!1}),g.Lb(),g.Lb(),g.Mb(40,"div",23),g.Mb(41,"button",24),g.Tb("click",function(){return t.importLabelFile()}),g.oc(42),g.Wb(43,"translate"),g.Lb(),g.Lb(),g.Lb(),g.mc(44,ie,7,6,"span",25),g.Mb(45,"div",26),g.Ib(46,"label",27,28),g.Lb(),g.Ib(48,"div",29),g.Mb(49,"div",30),g.Mb(50,"button",31),g.Tb("click",function(){return t.onSubmit(!0)}),g.oc(51),g.Wb(52,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Mb(53,"modal",5),g.Wb(54,"translate"),g.Mb(55,"form",6),g.Mb(56,"div",7),g.Mb(57,"div",8),g.Mb(58,"label",32),g.oc(59),g.Wb(60,"translate"),g.Lb(),g.Mb(61,"input",33,34),g.Tb("input",function(e){return t.onChangeRename(e.target.value)}),g.Lb(),g.Lb(),g.mc(63,ce,4,2,"ng-container",35),g.Ib(64,"div",29),g.Mb(65,"div",30),g.Mb(66,"button",36),g.Tb("click",function(){return t.onSubmitRename()}),g.oc(67),g.Wb(68,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Mb(69,"modal",5),g.Wb(70,"translate"),g.Ib(71,"br"),g.Mb(72,"form",6),g.Mb(73,"div",7),g.Mb(74,"div",20),g.Mb(75,"label",37),g.oc(76),g.Wb(77,"translate"),g.Lb(),g.Mb(78,"div",38),g.Ib(79,"img",39),g.Mb(80,"span",40),g.Mb(81,"p"),g.oc(82),g.Wb(83,"translate"),g.Lb(),g.Mb(84,"p"),g.oc(85),g.Wb(86,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Mb(87,"label",41),g.oc(88),g.Wb(89,"translate"),g.Mb(90,"button",42),g.Tb("click",function(){return t.onSelectImportProjectJson()}),g.oc(91),g.Lb(),g.Lb(),g.Ib(92,"label",27,43),g.Lb(),g.mc(94,se,6,5,"ng-container",35),g.Ib(95,"div",44),g.Ib(96,"div",29),g.Lb(),g.Lb(),g.Lb(),g.Mb(97,"modal",5),g.Wb(98,"translate"),g.Mb(99,"div",45),g.Mb(100,"div",46),g.Mb(101,"p",47),g.oc(102),g.Wb(103,"translate"),g.Mb(104,"b",48),g.oc(105),g.Wb(106,"translate"),g.Lb(),g.oc(107,"! "),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Mb(108,"modal",5),g.Wb(109,"translate"),g.Mb(110,"div",45),g.Mb(111,"div",46),g.Mb(112,"p",47),g.oc(113),g.Wb(114,"translate"),g.Mb(115,"b",48),g.oc(116),g.Wb(117,"translate"),g.Lb(),g.oc(118,"! "),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Ib(119,"unsupported-image-modal",49),g.Ib(120,"spinner",50)),2&e){const e=g.fc(19);let n=null,o=null;g.ac("ngIf",t.isOverlayOn),g.xb(1),g.ac("_onChange",t.onChangeSchema),g.xb(5),g.ac("_jsonSchema",t.projectList),g.xb(1),g.ac("id",t.modalIdCreateProject)("modalBodyStyle",t.createProjectModalBodyStyle)("modalTitle",g.Xb(8,59,"createNewProject"))("scrollable",!1),g.xb(2),g.ac("formGroup",t.form),g.xb(4),g.qc("",g.Xb(14,61,"newProjectName")," "),g.xb(2),g.ac("value",t.inputProjectName),g.xb(2),g.ac("ngIf",(null==(n=t.form.get("projectName"))?null:n.touched)&&(null==(n=t.form.get("projectName"))?null:n.invalid))("ngIfElse",e),g.xb(6),g.pc(g.Xb(24,63,"projectFolder")),g.xb(3),g.qc(" ",g.Xb(27,65,"chooseFolder")," "),g.xb(8),g.qc(" ",g.Xb(35,67,"labelListFile"),""),g.xb(3),g.qc(" ",g.Xb(38,69,"optional"),": "),g.xb(5),g.qc(" ",g.Xb(43,71,"chooseFile")," "),g.xb(2),g.ac("ngIf",t.showLabelTooltip),g.xb(6),g.ac("ngClass",t.isCreateFormIncomplete()?"disabled-create-btn":null)("disabled",t.isCreateFormIncomplete()),g.xb(1),g.qc(" ",g.Xb(52,73,"createButton")," "),g.xb(2),g.ac("id",t.modalIdRenameProject)("modalBodyStyle",t.renameProjectModalBodyStyle)("modalTitle",g.Xb(54,75,"renameProject"))("scrollable",!1),g.xb(2),g.ac("formGroup",t.renameForm),g.xb(4),g.qc("",g.Xb(60,77,"newProjectName")," "),g.xb(2),g.ac("value",t.inputProjectName),g.xb(2),g.ac("ngIf",null==(o=t.renameForm.get("newProjectName"))?null:o.touched),g.xb(4),g.qc(" ",g.Xb(68,79,"updateButton")," "),g.xb(2),g.ac("id",t.modalIdImportProject)("modalBodyStyle",t.importProjectModalBodyStyle)("modalTitle",g.Xb(70,81,"menuName.importProject"))("scrollable",!1),g.xb(3),g.ac("formGroup",t.form),g.xb(4),g.qc("",g.Xb(77,83,"importJson")," "),g.xb(6),g.pc(g.Xb(83,85,"configFileInfoDest1")),g.xb(3),g.pc(g.Xb(86,87,"configFileInfoDest2")),g.xb(3),g.qc(" ",g.Xb(89,89,"chooseFile")," "),g.xb(3),g.qc(" ","Import"," "),g.xb(3),g.ac("ngIf",t.modalSpanMessage.trim()),g.xb(3),g.ac("id",t.modalIdRenameSuccess)("modalBodyStyle",t.renameSuccessBodyStyle)("modalTitle",g.Xb(98,91,"renameProject"))("scrollable",!1),g.xb(5),g.rc(" ",t.projectName," ",g.Xb(103,93,"renameMsg")," "),g.xb(3),g.pc(g.Xb(106,95,"success")),g.xb(3),g.ac("id",t.modalIdDeleteProject)("modalBodyStyle",t.deleteProjectBodyStyle)("modalTitle",g.Xb(109,97,"deleteProject"))("scrollable",!1),g.xb(5),g.rc(" ",t.projectName," ",g.Xb(114,99,"deleteMsg")," "),g.xb(3),g.pc(g.Xb(117,101,"success")),g.xb(3),g.ac("_modalUnsupportedImage",t.modalUnsupportedImage)("_unsupportedImageBodyStyle",t.unsupportedImageBodyStyle)("_unsupportedImageList",t.unsupportedImageList),g.xb(1),g.ac("_loading",t.isLoading)}},directives:[o.k,x.a,O,L,q,R.a,h.n,h.g,h.d,h.a,h.f,h.c,o.i,J.a,$.a],pipes:[M.c],styles:[".upper-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;margin-top:5vh}.model[_ngcontent-%COMP%]{z-index:1000;padding-top:10vh;top:0;width:100%;height:100%;overflow:auto;background-color:transparent;scrollbar-width:none;position:fixed;background:rgba(0,0,0,.7)}.model-content[_ngcontent-%COMP%]{background-color:#525353;padding:1vw;border:solid;max-width:30vw;min-width:30vw;border-radius:1vw;margin:15vh auto auto}.content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.content-header[_ngcontent-%COMP%]{color:#fff;font-size:3vh}.new-project-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;margin:3vh 0 0;-webkit-align-items:baseline;align-items:baseline}.label[_ngcontent-%COMP%]{margin-right:1vw}.label[_ngcontent-%COMP%], .label-config[_ngcontent-%COMP%]{color:#fff;font-size:2vh}.label-config[_ngcontent-%COMP%]{padding-top:.5vh}.input-style[_ngcontent-%COMP%]{border-radius:2vw;border:none;outline:none;background-color:#363636;min-width:11vw;max-width:12vw;min-height:4vh;max-height:4vh;font-size:2vh;color:#fff;padding:0 1vw}.validation[_ngcontent-%COMP%]{margin-left:11vw}.validation[_ngcontent-%COMP%], .validation-rename[_ngcontent-%COMP%]{color:red;margin-top:1.02vh;margin-bottom:.25vh}.validation-rename[_ngcontent-%COMP%]{margin-left:7.5vw}.validation-error[_ngcontent-%COMP%]{margin:1px;color:red}.validation-success[_ngcontent-%COMP%]{margin:1px;color:green}.error-create-msg[_ngcontent-%COMP%], .error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.error-create-msg[_ngcontent-%COMP%]{padding-left:1vw}.select-file-container[_ngcontent-%COMP%], .select-folder-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;margin:0}.empty-container[_ngcontent-%COMP%], .file-name-container[_ngcontent-%COMP%], .folder-name-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;margin:1.5vh 0 0 12vw;min-height:2vh}.filename[_ngcontent-%COMP%], .foldername[_ngcontent-%COMP%]{font-size:1.8vh;color:#fff;overflow:hidden;text-overflow:ellipsis}.input[_ngcontent-%COMP%]{color:#7fffd4}.horizontal-line[_ngcontent-%COMP%]{background-color:#fff;min-height:.3vh;max-height:.3vh;margin:2vh auto}.model-button-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;padding:.5vw}.button-file-style[_ngcontent-%COMP%], .button-style[_ngcontent-%COMP%]{padding:1vh 1.5vw;border-radius:1vh;border:none;outline:none;color:#fff;cursor:pointer;font-size:2vh}.button-file-style[_ngcontent-%COMP%]{max-height:4vh}.choose-file-button[_ngcontent-%COMP%], .choose-folder-button[_ngcontent-%COMP%]{background-color:#444}.create-btn[_ngcontent-%COMP%]{background-color:#2d8ceb}.disabled-create-btn[_ngcontent-%COMP%]{cursor:not-allowed;background-color:#444!important;color:#777!important}.cancel-btn[_ngcontent-%COMP%]{background-color:#444;margin-right:.7vw}.choose-file-btn[_ngcontent-%COMP%]{font-size:2vh;text-decoration:none;background-color:#444;color:#fff;padding:.5vh 1vw;border:none;border-radius:1vh;margin-right:1vw;cursor:pointer}.label-name[_ngcontent-%COMP%]{width:9.5vw;padding-top:.2vh;padding-right:1vw}.help-icon-container[_ngcontent-%COMP%]{padding-right:1vw;padding-left:.2vw}.help-icon[_ngcontent-%COMP%]{height:3vh}.label-file[_ngcontent-%COMP%]{padding-top:1vh;padding-right:.2vw}.label-select-folder[_ngcontent-%COMP%]{padding-top:.7vh;padding-right:1vw;width:9.5vw}.label-select-label[_ngcontent-%COMP%]{color:#fff;font-size:2vh;padding-top:0;width:11.5vw}.label-select-file[_ngcontent-%COMP%]{padding-top:.5vh;width:9.5vw}.input-id[_ngcontent-%COMP%]{font-size:2vh;display:none}.overlay[_ngcontent-%COMP%]{z-index:3000;position:absolute;background-color:rgba(0,0,0,.9);width:99.9vw;height:99.7vh;cursor:not-allowed}.tooltip[_ngcontent-%COMP%]{position:relative;display:inline-block;border-bottom:1px dotted #000;font-size:15px;text-decoration:underline;margin-top:1vh}.tooltiptitle[_ngcontent-%COMP%]{opacity:.3}.help-icon-container[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:10vw;min-width:200px;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:60%;margin-left:-60px;text-align:justify;text-justify:inter-word}.help-icon-container[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible}.labeltooltiptext[_ngcontent-%COMP%]{width:13vw;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:67%;left:30%;margin-left:-60px;text-align:justify;text-justify:inter-word}.display-message-container[_ngcontent-%COMP%]{padding-left:1.2vw}.display-msg[_ngcontent-%COMP%]{font-size:2vh;color:#fff}.modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}"]}),e})()}];let be=(()=>{class e{}return e.\u0275mod=g.Fb({type:e}),e.\u0275inj=g.Eb({factory:function(t){return new(t||e)},imports:[[u.d.forChild(le)]]}),e})();var de=n("KZX/");let pe=(()=>{class e{}return e.\u0275mod=g.Fb({type:e}),e.\u0275inj=g.Eb({factory:function(t){return new(t||e)},imports:[[o.b,de.a,be]]}),e})()}}]); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/7-es2015.eb227bb50af9a504487e.js b/classifai-core/src/main/resources/webroot/7-es2015.eb227bb50af9a504487e.js new file mode 100644 index 000000000..ab6c46203 --- /dev/null +++ b/classifai-core/src/main/resources/webroot/7-es2015.eb227bb50af9a504487e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{RN8A:function(e,t,n){"use strict";n.r(t),n.d(t,"DataSetLayoutModule",function(){return pe});var o=n("ofXK"),a=n("XIp8"),i=n("SxV6"),r=n("lJxs"),c=n("eIep"),s=n("5+tZ"),l=n("/uUt"),b=n("1G5W"),d=n("XNiG"),p=n("l5mm"),m=n("z6cu"),h=n("3Pt+"),g=n("fXoL"),u=n("tyNb"),v=n("LY9J"),f=n("F7l1"),j=n("14na"),_=n("I7yr"),w=n("1F7/"),M=n("x2Se"),P=n("sYmb");function x(e,t){if(1&e){const e=g.Nb();g.Kb(0),g.Mb(1,"div",5),g.Mb(2,"div",6),g.Tb("click",function(){return g.hc(e),g.Vb(2).displayModal()}),g.Ib(3,"img",7),g.Mb(4,"label",8),g.oc(5),g.Wb(6,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Jb()}if(2&e){const e=g.Vb(),t=e.index,n=e.$implicit;g.xb(1),g.yb("data-index",t),g.xb(2),g.ac("src",n.src,g.jc),g.xb(2),g.pc(g.Xb(6,3,n.name))}}function C(e,t){if(1&e){const e=g.Nb();g.Mb(0,"div",9),g.Tb("click",function(){g.hc(e);const t=g.Vb().$implicit;return g.Vb().onClickButton(t.id)}),g.Ib(1,"img",10),g.Mb(2,"label",11),g.oc(3),g.Wb(4,"translate"),g.Lb(),g.Lb()}if(2&e){const e=g.Vb(),t=e.$implicit;g.yb("data-index",e.index),g.xb(1),g.lc(t.style),g.ac("src",t.src,g.jc),g.xb(2),g.pc(g.Xb(4,5,t.name))}}function y(e,t){if(1&e&&(g.Kb(0),g.mc(1,x,7,5,"ng-container",3),g.mc(2,C,5,7,"ng-template",null,4,g.nc),g.Jb()),2&e){const e=t.index,n=g.fc(3);g.xb(1),g.ac("ngIf",0===e)("ngIfElse",n)}}let O=(()=>{class e{constructor(){this.menuSchema=[{src:"../../../assets/icons/add.svg",id:"newProject",name:"menuName.newProject"},{src:"../../../assets/icons/import.svg",id:"importProject",name:"menuName.importProject",style:"width: 1.3vw; padding: 0.3vw;"},{src:"../../../assets/icons/project.svg",id:"myProject",name:"menuName.myProject"},{src:"../../../assets/icons/starred.svg",id:"starred",name:"menuName.starred"},{src:"../../../assets/icons/history.svg",id:"recent",name:"menuName.recent"},{src:"../../../assets/icons/trash.svg",id:"trash",name:"menuName.trash"}],this._onCreate=new g.n,this._onImport=new g.n,this.displayModal=()=>{this._onCreate.emit(!0)},this.onClickButton=e=>{"importProject"===e?this._onImport.emit():console.log("This feature is not available yet")}}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=g.Bb({type:e,selectors:[["data-set-side-menu"]],outputs:{_onCreate:"_onCreate",_onImport:"_onImport"},decls:3,vars:1,consts:[[1,"dataset-sidemenu-container"],[4,"ngFor","ngForOf"],[1,"horizontal-line"],[4,"ngIf","ngIfElse"],["otherMenu",""],[1,"new-project-container"],[1,"new-project-btn",3,"click"],[1,"add-icon",3,"src"],[1,"new-project-txt"],[1,"current-project-btn",3,"click"],[1,"project-icon",3,"src"],[1,"current-project-txt"]],template:function(e,t){1&e&&(g.Mb(0,"div",0),g.mc(1,y,4,2,"ng-container",1),g.Lb(),g.Ib(2,"div",2)),2&e&&(g.xb(1),g.ac("ngForOf",t.menuSchema))},directives:[o.j,o.k],pipes:[P.c],styles:[".dataset-sidemenu-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;flex-direction:column;width:16vw}.new-project-container[_ngcontent-%COMP%]{margin-bottom:5vh;margin-left:2vw}.new-project-btn[_ngcontent-%COMP%]{padding:1vw;border-radius:5vh;background-color:#525353;border:none;color:#fff;outline:none;cursor:pointer;display:flex;justify-content:space-around;align-items:center;min-width:10vw;max-width:10vw;min-height:4vh;max-height:4vh}.new-project-btn[_ngcontent-%COMP%]:hover{background-color:#393838}.add-icon[_ngcontent-%COMP%]{min-height:inherit;max-height:inherit}.new-project-txt[_ngcontent-%COMP%]{border:none;background:none;outline:none;cursor:pointer;font-size:2vh;color:#fff;text-align:start;white-space:nowrap}.current-project-btn[_ngcontent-%COMP%]{color:#fff;cursor:pointer;display:flex;align-items:center;border-radius:5vh;padding:1vh 1vw;margin-left:2vw;min-width:10vw;max-width:10vw;min-height:5vh;max-height:5vh;flex:1 1 100%}.current-project-btn[_ngcontent-%COMP%]:hover{background-color:#525353}.project-icon[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;flex:1 1 10%}.current-project-txt[_ngcontent-%COMP%]{border:none;background:none;outline:none;cursor:pointer;font-size:2vh;color:#fff;white-space:nowrap;flex:1 1 90%;text-align:left;padding-left:20px}.horizontal-line[_ngcontent-%COMP%]{width:12vw;background-color:#393838;min-height:.3vh;max-height:.3vh;margin:auto;border:.0625rem solid #000}"]}),e})(),L=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=g.Bb({type:e,selectors:[["data-set-header"]],decls:6,vars:3,consts:[[1,"dataset-header-container"],[1,"label"],[1,"dataset-icon-container"]],template:function(e,t){1&e&&(g.Mb(0,"div",0),g.Mb(1,"label",1),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Mb(4,"div",2),g.Ib(5,"div"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.pc(g.Xb(3,1,"datasetHeader.datasetManagement")))},pipes:[P.c],styles:[".dataset-header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-around;align-items:center;padding:1vw;min-width:80vw;max-width:80vw}.label[_ngcontent-%COMP%]{flex:1 1 80%;background:none;font-size:2.5vh;color:#fff;white-space:nowrap;min-height:inherit;max-height:inherit}.dataset-icon-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex:1 1 20%}.dataset-icon[_ngcontent-%COMP%]{flex:1 1 3%;min-width:2vw;max-width:2vw;cursor:pointer}.dataset-icon[_ngcontent-%COMP%]:hover{border-radius:5vh;background-color:#393838}.dataset-select[_ngcontent-%COMP%]{min-height:4vh;max-height:4vh;font-size:2vh;min-width:7vw;max-width:7vw;-moz-text-align-last:center;background:#000;color:#fff;border:.1vw solid;text-align-last:center}.dataset-select[_ngcontent-%COMP%]:focus, .dataset-select[_ngcontent-%COMP%]:hover{background:#393838;-moz-appearance:none;-webkit-appearance:none}select[_ngcontent-%COMP%]{-moz-appearance:none;-webkit-appearance:none}option[_ngcontent-%COMP%]{background:#000;text-align:center}"]}),e})();function I(e,t){1&e&&(g.Kb(0),g.Mb(1,"div",2),g.Mb(2,"div",3),g.Mb(3,"div",4),g.Mb(4,"label",5),g.oc(5),g.Wb(6,"translate"),g.Lb(),g.Lb(),g.Mb(7,"div"),g.Mb(8,"label",6),g.oc(9),g.Wb(10,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Jb()),2&e&&(g.xb(5),g.pc(g.Xb(6,2,"datasetCard.fetchingProject")),g.xb(4),g.pc(g.Xb(10,4,"datasetCard.pleaseWait")))}const S=function(e){return{disabled:e}};function k(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"label",24),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Jb()),2&e){const e=g.Vb().$implicit;g.xb(1),g.ac("ngClass",g.dc(4,S,!e.root_path_valid)),g.xb(1),g.qc(" ",g.Xb(3,2,"datasetCard.uploading")," ")}}function N(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"label",26),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Jb()),2&e){const e=g.Vb(2).$implicit;g.xb(1),g.ac("ngClass",g.dc(4,S,!e.root_path_valid)),g.xb(1),g.pc(g.Xb(3,2,"datasetCard.new"))}}function F(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"label",27),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Jb()),2&e){const e=g.Vb(2).$implicit;g.xb(1),g.ac("ngClass",g.dc(4,S,!e.root_path_valid)),g.xb(1),g.pc(g.Xb(3,2,"datasetCard.available"))}}function W(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"label",28),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Jb()),2&e){const e=g.Vb(2).$implicit;g.xb(1),g.ac("ngClass",g.dc(4,S,!e.root_path_valid)),g.xb(1),g.pc(g.Xb(3,2,"datasetCard.opened"))}}function D(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"label",29),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Jb()),2&e){const e=g.Vb(2).$implicit;g.xb(1),g.ac("ngClass",g.dc(4,S,!e.root_path_valid)),g.xb(1),g.pc(g.Xb(3,2,"datasetCard.invalidPath"))}}function X(e,t){if(1&e&&(g.Kb(0,25),g.mc(1,N,4,6,"ng-container",16),g.mc(2,F,4,6,"ng-container",16),g.mc(3,W,4,6,"ng-container",16),g.mc(4,D,4,6,"ng-container",16),g.Jb()),2&e){const e=g.Vb().$implicit;g.ac("ngSwitch",e),g.xb(1),g.ac("ngIf",e.is_new&&e.root_path_valid),g.xb(1),g.ac("ngIf",!e.is_new&&!e.is_loaded&&e.root_path_valid),g.xb(1),g.ac("ngIf",!e.is_new&&e.is_loaded&&e.root_path_valid),g.xb(1),g.ac("ngIf",!e.root_path_valid)}}function T(e,t){if(1&e){const e=g.Nb();g.Kb(0),g.Mb(1,"span"),g.Mb(2,"div",30),g.Mb(3,"div",31),g.Tb("click",function(){g.hc(e);const t=g.Vb().$implicit;return g.Vb(3).onRenameProject(t.project_name)}),g.oc(4),g.Wb(5,"translate"),g.Lb(),g.Mb(6,"div",31),g.Tb("click",function(){g.hc(e);const t=g.Vb().$implicit;return g.Vb(3).onDeleteProject(t.project_name)}),g.oc(7),g.Wb(8,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Jb()}2&e&&(g.xb(4),g.qc(" ",g.Xb(5,2,"datasetCard.renameProject")," "),g.xb(3),g.qc(" ",g.Xb(8,4,"datasetCard.deleteProject")," "))}const E=function(e){return[e]};function z(e,t){if(1&e){const e=g.Nb();g.Kb(0),g.Mb(1,"div",9),g.Tb("dblclick",function(){g.hc(e);const n=t.$implicit,o=t.index,a=g.Vb(3);return n.root_path_valid&&a.onOpenProject(o,n)}),g.Mb(2,"div",10),g.Mb(3,"div"),g.mc(4,k,4,6,"ng-container",0),g.mc(5,X,5,5,"ng-template",null,11,g.nc),g.Lb(),g.Mb(7,"div",12),g.Mb(8,"div",13),g.Tb("click",function(){g.hc(e);const n=t.$implicit;return g.Vb(3).onStarred(n,!n.is_starred)})("dblclick",function(t){return g.hc(e),g.Vb(3).onDblClickStopPropagate(t)}),g.Ib(9,"img",14),g.Lb(),g.Mb(10,"div",13),g.Tb("click",function(){g.hc(e);const n=t.index;return g.Vb(3).onDisplayMore(n)})("dblclick",function(t){return g.hc(e),g.Vb(3).onDblClickStopPropagate(t)}),g.Ib(11,"img",15),g.Lb(),g.mc(12,T,9,6,"ng-container",16),g.Lb(),g.Lb(),g.Mb(13,"div",17),g.Mb(14,"label",18),g.Mb(15,"div",19),g.oc(16),g.Wb(17,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Mb(18,"div",20),g.Mb(19,"label",18),g.Mb(20,"div",21),g.oc(21),g.Lb(),g.Lb(),g.Lb(),g.Mb(22,"div",20),g.Mb(23,"label",18),g.Mb(24,"div",21),g.oc(25),g.Wb(26,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Mb(27,"div",22),g.Mb(28,"label",18),g.Mb(29,"div",23),g.oc(30),g.Wb(31,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Jb()}if(2&e){const e=t.$implicit,n=t.index,o=g.fc(6),a=g.Vb(3);g.xb(1),g.ac("ngClass",g.dc(27,S,!e.root_path_valid)),g.yb("data-index",n),g.xb(3),g.ac("ngIf",a.isExactIndex(n)&&a._jsonSchema.isUploading)("ngIfElse",o),g.xb(5),g.ac("src",g.dc(29,E,e.is_starred?a.starredActiveIcon:a.starredInactiveIcon),g.jc),g.xb(3),g.ac("ngIf",a.isExactIndex(n)),g.xb(2),g.ac("title",e.created_date)("ngClass",g.dc(31,S,!e.root_path_valid)),g.xb(2),g.rc(" ",g.Xb(17,21,"datasetCard.created")," ",e.created_date," "),g.xb(3),g.ac("title",e.project_name)("ngClass",g.dc(33,S,!e.root_path_valid)),g.xb(2),g.qc(" ",e.project_name," "),g.xb(2),g.ac("title","Total Photo: "+e.total_uuid)("ngClass",g.dc(35,S,!e.root_path_valid)),g.xb(2),g.rc(" ",g.Xb(26,23,"datasetCard.totalPhoto")," ",e.total_uuid," "),g.xb(3),g.ac("title",e.project_path)("ngClass",g.dc(37,S,!e.root_path_valid)),g.xb(2),g.rc(" ",g.Xb(31,25,"datasetCard.projectPath")," : ",e.project_path," ")}}function B(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"div",2),g.mc(2,z,32,39,"ng-container",8),g.Lb(),g.Jb()),2&e){const e=g.Vb(2);g.xb(2),g.ac("ngForOf",e._jsonSchema.projects)}}function V(e,t){1&e&&(g.Mb(0,"div",2),g.Mb(1,"div",3),g.Mb(2,"div",4),g.Mb(3,"label",5),g.oc(4),g.Wb(5,"translate"),g.Lb(),g.Lb(),g.Mb(6,"div"),g.Mb(7,"label",6),g.oc(8),g.Wb(9,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Lb()),2&e&&(g.xb(4),g.pc(g.Xb(5,2,"datasetCard.noProject")),g.xb(4),g.pc(g.Xb(9,4,"datasetCard.createNew")))}function U(e,t){if(1&e&&(g.mc(0,B,3,1,"ng-container",0),g.mc(1,V,10,6,"ng-template",null,7,g.nc)),2&e){const e=g.fc(2),t=g.Vb();g.ac("ngIf",t._jsonSchema.projects.length>0)("ngIfElse",e)}}let q=(()=>{class e{constructor(e){this._cd=e,this._onClick=new g.n,this._onStarred=new g.n,this._onDelete=new g.n,this._onRename=new g.n,this.starredActiveIcon="../../../assets/icons/starred_active.svg",this.starredInactiveIcon="../../../assets/icons/starred.svg",this.cardSchema={clickIndex:-1},this.previousProjectLength=0,this.conditionalDisableProject=({is_loaded:e})=>e?"disabled":"enabled",this.conditionalDisableClickEvent=e=>e,this.onOpenProject=(e,{project_name:t})=>{!this.isExactIndex(e)&&this._onClick.emit(t)},this.onDisplayMore=(e=this.cardSchema.clickIndex)=>{const{clickIndex:t}=this.cardSchema;this.cardSchema={clickIndex:t===e?-1:e}},this.onCloseDisplay=()=>{this.cardSchema.clickIndex=-1},this.onStarred=(e,t)=>{const{project_name:n}=e;this._jsonSchema.projects=this._jsonSchema.projects.map(e=>e.project_name===n?(e.is_starred=t,e):e),this._onStarred.emit({projectName:n,starred:t})},this.isExactIndex=e=>e===this.cardSchema.clickIndex,this.onDblClickStopPropagate=e=>e.stopPropagation()}ngOnInit(){}onRenameProject(e){this._onRename.emit({shown:!0,projectName:e}),this.onCloseDisplay()}onDeleteProject(e){this._onDelete.emit(e),this.onCloseDisplay()}ngOnChanges(e){const{isUploading:t}=e._jsonSchema.currentValue;!t&&this.onDisplayMore(),this._jsonSchema.projects.length!==this.previousProjectLength&&(this.cardSchema.clickIndex=-1),this.previousProjectLength=this._jsonSchema.projects.length}}return e.\u0275fac=function(t){return new(t||e)(g.Hb(g.h))},e.\u0275cmp=g.Bb({type:e,selectors:[["data-set-card"]],inputs:{_jsonSchema:"_jsonSchema"},outputs:{_onClick:"_onClick",_onStarred:"_onStarred",_onDelete:"_onDelete",_onRename:"_onRename"},features:[g.vb],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["showCardBody",""],[1,"card-layout-container","scroll","fade-in"],[1,"no-project-card-container"],[1,"no-project-title-padding"],[1,"no-project-title"],[1,"no-project-subtitle"],["noProject",""],[4,"ngFor","ngForOf"],[1,"card-container",3,"ngClass","dblclick"],[1,"card-header-style"],["newLabel",""],[1,"card-icon-container"],[3,"click","dblclick"],[1,"card-icon-style",3,"src"],["src","../../../assets/icons/more.svg",1,"card-icon-style","enabled"],[4,"ngIf"],[1,"card-title-style"],[3,"title","ngClass"],[1,"card-title-txt"],[1,"project-name-style"],[1,"project-info"],[1,"project-path-style"],[1,"project-path"],[1,"project-status-uploading",3,"ngClass"],[3,"ngSwitch"],[1,"project-status-new",3,"ngClass"],[1,"project-status-available",3,"ngClass"],[1,"project-status-opened",3,"ngClass"],[1,"project-status-invalid",3,"ngClass"],[1,"popup-container","enabled"],[1,"popup-label",3,"click"]],template:function(e,t){if(1&e&&(g.mc(0,I,11,6,"ng-container",0),g.mc(1,U,3,2,"ng-template",null,1,g.nc)),2&e){const e=g.fc(2);g.ac("ngIf",t._jsonSchema.isFetching)("ngIfElse",e)}},directives:[o.k,o.j,o.i,o.m],pipes:[P.c],styles:['@keyframes fade-in{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}.fade-in[_ngcontent-%COMP%]{animation:fadeIn 1.5s ease;-webkit-animation:fadeIn 1.5s ease;-moz-animation:fadeIn ease 1.5s;-o-animation:fadeIn ease 1.5s;-ms-animation:fadeIn ease 1.5s}.card-layout-container[_ngcontent-%COMP%]{width:80vw;display:flex;flex-wrap:wrap;padding:0 0 0 1vw;overflow-y:scroll;position:relative;height:80vh}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px;background-color:#000}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:.5vw}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.card-container[_ngcontent-%COMP%]{min-width:11vw;max-width:11vw;min-height:30vh;max-height:30vh;border-style:solid;font-size:2.2vh;background:#2e2d2d;position:relative}.card-container[_ngcontent-%COMP%]:hover{background:#404040}.card-container[_ngcontent-%COMP%]:before{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:.3vw;background-color:#363636}.enabled[_ngcontent-%COMP%]{cursor:pointer}.disabled[_ngcontent-%COMP%]{cursor:not-allowed}.project-status-new[_ngcontent-%COMP%]{background-color:#f59221}.project-status-available[_ngcontent-%COMP%], .project-status-new[_ngcontent-%COMP%]{color:#f5f5f5;font-size:60%;padding:.3vh 1.5vw .6vh 1vw}.project-status-available[_ngcontent-%COMP%]{background-color:#92c91b}.project-status-opened[_ngcontent-%COMP%]{background-color:#258fc0}.project-status-invalid[_ngcontent-%COMP%], .project-status-opened[_ngcontent-%COMP%]{color:#f5f5f5;font-size:60%;padding:.3vh 1.5vw .6vh 1vw}.project-status-invalid[_ngcontent-%COMP%]{background-color:#de1c44}.card-icon-container[_ngcontent-%COMP%]{display:flex}.card-icon-style[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh}.card-icon-style[_ngcontent-%COMP%]:hover{border-radius:5vh;background-color:#393838}.card-header-style[_ngcontent-%COMP%]{margin-top:1vh;display:flex;flex-direction:row;justify-content:space-between;position:relative}.card-title-style[_ngcontent-%COMP%]{margin-left:1vw}.card-title-txt[_ngcontent-%COMP%]{color:#656667;font-size:1.3vh;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-name-style[_ngcontent-%COMP%], .project-path-style[_ngcontent-%COMP%]{margin-left:1vw;padding:1vh 0 0}.project-path-style[_ngcontent-%COMP%]{width:90%;position:absolute;bottom:1vh}.project-info[_ngcontent-%COMP%]{color:#dbdbda;font-size:2vh;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-path[_ngcontent-%COMP%]{word-wrap:break-word;font-size:1.2vh;color:#737475;position:relative}.tag-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;border-radius:10vw;background:#363636;width:4.5vw;padding:.2vw .3vh;cursor:pointer;outline:none;border:none;margin:.8vh 0 0 1vw}.tag-img[_ngcontent-%COMP%]{min-height:2vh;max-height:2vh;min-width:1vw;max-width:1vw;margin-left:.35vw}.tag-txt[_ngcontent-%COMP%]{font-size:1.2vh;color:#fff;padding:.2vh 0 0 .3vw;cursor:pointer}.popup-container[_ngcontent-%COMP%]{overflow:hidden;position:absolute;margin:4vh 0 0 -10vw;padding:.5vw;border-radius:.2vw;box-shadow:0 2px 5px 0 rgba(var(--shadow-rgb),.26),0 2px 10px 0 rgba(var(--shadow-rgb),.16);transform-origin:left top;transform:scale(1);opacity:1;white-space:nowrap;background:#fff;font-size:1.5vh;-webkit-animation:appear .35s ease-in 1;animation:appear .35s ease-in 1}@-webkit-keyframes appear{0%{opacity:0;transform:translateY(-10px)}}@keyframes appear{0%{opacity:0;transform:translateY(-10px)}}.popup-label[_ngcontent-%COMP%]{font-size:2vh;padding:.5vw}.popup-label[_ngcontent-%COMP%]:hover{background:#e9e9e9}.no-project-title[_ngcontent-%COMP%]{font-size:4vh;color:#fff;white-space:nowrap}.no-project-title-padding[_ngcontent-%COMP%]{padding:2vw}.no-project-subtitle[_ngcontent-%COMP%]{font-size:2vh;color:#bebebe;white-space:nowrap}.no-project-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:#1f1f1f;width:100%}']}),e})();var R=n("44N4"),J=n("OObL"),$=n("TJKd");const H=["refProjectName"],A=["projectfoldername"],K=["labeltextfilename"],G=["refNewProjectName"],Y=["jsonImportProjectFile"],Z=["jsonImportProjectFilename"];function Q(e,t){if(1&e&&(g.Mb(0,"div",51),g.Mb(1,"p",52),g.oc(2),g.Lb(),g.Lb()),2&e){const e=g.Vb();g.xb(2),g.qc(" ",e.isImageUploading?"Uploading the Images. Please Wait...":"Selection Window is Opened"," ")}}function ee(e,t){1&e&&(g.Mb(0,"span"),g.Mb(1,"small",54),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.qc(" ",g.Xb(3,1,"projectNameExist")," "))}function te(e,t){1&e&&(g.Mb(0,"span"),g.Mb(1,"small",54),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.qc(" ",g.Xb(3,1,"projectNameRequired")," "))}function ne(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"div",53),g.mc(2,ee,4,3,"span",35),g.mc(3,te,4,3,"span",35),g.Lb(),g.Jb()),2&e){const e=g.Vb();let t=null,n=null;g.xb(2),g.ac("ngIf",null==(t=e.form.get("projectName"))?null:t.getError("exist")),g.xb(1),g.ac("ngIf",null==(n=e.form.get("projectName"))?null:n.getError("required"))}}function oe(e,t){1&e&&g.Ib(0,"div",55)}function ae(e,t){1&e&&(g.Mb(0,"span",56),g.Mb(1,"p"),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Mb(4,"p"),g.oc(5),g.Wb(6,"translate"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.pc(g.Xb(3,2,"labelFileDest1")),g.xb(3),g.pc(g.Xb(6,4,"labelFileDest2")))}function ie(e,t){1&e&&(g.Mb(0,"span"),g.Mb(1,"small",58),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.qc(" ",g.Xb(3,1,"projectNameExist")," "))}function re(e,t){1&e&&(g.Mb(0,"span"),g.Mb(1,"small",58),g.oc(2),g.Wb(3,"translate"),g.Lb(),g.Lb()),2&e&&(g.xb(2),g.qc(" ",g.Xb(3,1,"projectNameRequired")," "))}function ce(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"div",57),g.mc(2,ie,4,3,"span",35),g.mc(3,re,4,3,"span",35),g.Lb(),g.Jb()),2&e){const e=g.Vb();let t=null,n=null;g.xb(2),g.ac("ngIf",null==(t=e.renameForm.get("newProjectName"))?null:t.getError("exist")),g.xb(1),g.ac("ngIf",null==(n=e.renameForm.get("newProjectName"))?null:n.getError("required"))}}function se(e,t){if(1&e&&(g.Kb(0),g.Mb(1,"div",59),g.Mb(2,"span"),g.Mb(3,"small",58),g.oc(4),g.Wb(5,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Jb()),2&e){const e=g.Vb();g.xb(1),g.ac("ngClass",e.spanClass),g.xb(3),g.rc("",g.Xb(5,3,e.modalSpanMessage),"",e.modalImportProjectName,"")}}const le=[{path:"",component:(()=>{class e{constructor(e,t,n,o,g,u,v){this._fb=e,this._router=t,this._dataSetService=n,this._spinnerService=o,this._imgLblModeService=g,this._languageService=u,this._modalService=v,this.onChangeSchema={currentThumbnailIndex:-1,thumbnailName:"",totalNumThumbnail:0,status:void 0},this.projectList={projects:[],isUploading:!1,isFetching:!1},this.inputProjectName="",this.newInputProjectName="",this.selectedProjectName="",this.oldProjectName="",this.subject$=new d.a,this.thumbnailList=[],this.labelList=[],this.unsubscribe$=new d.a,this.isLoading=!1,this.isOverlayOn=!1,this.isImageUploading=!1,this.isProjectLoading=!1,this.isDeleteSuccess=!1,this.projectName="",this.imgLblMode=null,this.modalSpanMessage="",this.modalImportProjectName="",this.spanClass="",this.labelPath="",this.projectFolderPath="",this.showLabelTooltip=!1,this.unsupportedImageList=[],this.modalIdCreateProject="modal-create-project",this.modalIdRenameProject="modal-rename-project",this.modalIdImportProject="modal-import-project",this.modalIdDeleteProject="modal-delete-project",this.modalIdRenameSuccess="modal-rename-success",this.modalUnsupportedImage="modal-unsupported-image",this.createProjectModalBodyStyle={minHeight:"45vh",minWidth:"31vw",maxWidth:"31vw",margin:"12vw 71vh",overflow:"none"},this.renameProjectModalBodyStyle={minHeight:"23vh",maxHeight:"25vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.importProjectModalBodyStyle={minHeight:"15vh",maxHeight:"25vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.deleteProjectBodyStyle={minHeight:"11vh",maxHeight:"11vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.renameSuccessBodyStyle={minHeight:"11vh",maxHeight:"11vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.unsupportedImageBodyStyle={minHeight:"18vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.showProjectList=()=>{this.projectList.isFetching=!0,this._dataSetService.getProjectList().pipe(Object(i.a)()).subscribe(({content:e})=>{if(e){const t=Object(a.a)(e).map(e=>Object.assign(Object.assign({},e),{created_date:this.formatDate(e.created_date)}));this.projectList=Object.assign(Object.assign({},this.projectList),{projects:t,isFetching:!1})}})},this.formatDate=e=>{const t=new Date(e),n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"].find((e,n)=>n===t.getMonth()||void 0);return n?`${n}-${t.getDate()}-${t.getFullYear()}`:"Error"},this.createFormControls=()=>{this.form=this._fb.group({projectName:["",h.l.required]})},this.renameFormControls=()=>{this.renameForm=this._fb.group({newProjectName:["",h.l.required]})},this.onChange=e=>{this.inputProjectName=e},this.onChangeRename=e=>{this.newInputProjectName=e},this.toggleModalDisplay=e=>{this._projectFoldername.nativeElement.innerHTML="",this._labelTextFilename.nativeElement.innerHTML="",e&&this.form.reset(),e?this._modalService.open(this.modalIdCreateProject):this._modalService.close(this.modalIdCreateProject)},this.toggleRenameModalDisplay=e=>{if(!e)return void this._modalService.close(this.modalIdRenameProject);const{shown:t,projectName:n}=e;t?(this.renameForm.reset(),this._modalService.open(this.modalIdRenameProject)):this._modalService.close(this.modalIdRenameProject),this.oldProjectName=n},this.toggleImportProjectModalDisplay=e=>{this.modalSpanMessage="",e?this._modalService.open(this.modalIdImportProject):this._modalService.close(this.modalIdImportProject)},this.onSelectImportProjectJson=()=>{this.toggleImportProjectModalDisplay(!0);const e=this._dataSetService.importStatus();this._dataSetService.importProject().pipe(Object(i.a)(),Object(r.a)(({message:e})=>e)).subscribe(t=>{let n=!1;Object(p.a)(500).pipe(Object(c.a)(()=>e),Object(i.a)(e=>(this.isOverlayOn=1===e.file_system_status||2===e.file_system_status,0!==e.file_system_status&&3!==e.file_system_status&&5!==e.file_system_status||(n=!0),n))).subscribe(e=>{this.modalSpanMessage="DATABASE_UPDATED"===e.file_system_message?"importSuccess":"importAborted",this.modalImportProjectName="DATABASE_UPDATED"===e.file_system_message&&e.project_name?e.project_name:"",this.processIsSuccess(5!==e.file_system_status),this.showProjectList()})})},this.processIsSuccess=e=>{this.spanClass=e?"validation-success":"validation-error"},this.importProject=()=>{this.toggleImportProjectModalDisplay(!0)},this.onStarred=({projectName:e,starred:t})=>{this._dataSetService.updateProjectStatus(e,t,"star").pipe(Object(i.a)()).subscribe(({message:e})=>console.log(e),t=>this.projectList={isUploading:this.projectList.isUploading,isFetching:this.projectList.isFetching,projects:this.projectList.projects.map(t=>t.project_name===e?Object.assign(Object.assign({},t),{is_starred:!1}):t)})},this.onSubmit=(e,t)=>{var n,o,a;this.form.markAllAsTouched(),e?this.inputProjectName?this.projectList.projects&&this.projectList.projects.find(e=>e&&e.project_name===this.inputProjectName)?(null===(n=this.form.get("projectName"))||void 0===n||n.setErrors({exist:!0}),this._refProjectName.nativeElement.focus()):(this.createProject(this.inputProjectName),this.selectedProjectName=null===(o=this.form.get("projectName"))||void 0===o?void 0:o.value):(null===(a=this.form.get("projectName"))||void 0===a||a.setErrors({required:!0}),this._refProjectName.nativeElement.focus()):t&&this.startProject(t)},this.onOpenImportProject=(e,t)=>{console.log("BUTTON IMPORT CLICKED")},this.startProject=e=>{this._router.navigate(["imglabel/"+this.imgLblMode],{state:{projectName:e}})},this.createProject=e=>{const t=this._dataSetService.createNewProject(e,this.labelPath,this.projectFolderPath),n=this._dataSetService.localUploadStatus(e);let o=0;const a=({message:e})=>1===e?Object(p.a)(500).pipe(Object(s.a)(()=>n),Object(i.a)(({file_system_status:e,unsupported_image_list:t})=>(this.unsupportedImageList=t,this.isOverlayOn=1===e||2===e,this.isImageUploading=2===e,3===e))):Object(m.a)(e=>(console.error(e),this.projectList=Object.assign(Object.assign({},this.projectList),{isUploading:!1}),e));this.projectList=Object.assign(Object.assign({},this.projectList),{isUploading:!0}),this.subjectSubscription=this.subject$.pipe(Object(i.a)(),Object(s.a)(()=>t),Object(s.a)(e=>a(e))).subscribe(e=>{3===e.file_system_status&&this.toggleModalDisplay(!1),this.isProjectLoading=!0,o=e?--o:o,o<1&&(this.projectList=Object.assign(Object.assign({},this.projectList),{isUploading:!1}))},e=>{},()=>{this.isProjectLoading=!1,this.showProjectList(),this.unsupportedImageList.length>0&&this._dataSetService.downloadUnsupportedImageList(e,this.unsupportedImageList).then(e=>{e&&this._modalService.open(this.modalUnsupportedImage)})}),this.subject$.next()},this.renameProject=(e,t)=>{this._dataSetService.renameProject(e,t).pipe(Object(i.a)(),Object(r.a)(({message:e})=>e)).subscribe(t=>{1===t&&(this._languageService._translate.get("renameSuccess").subscribe(t=>{this.projectName=e,this.modalSpanMessage=t,this._modalService.open(this.modalIdRenameSuccess)}),this.showProjectList(),this.toggleRenameModalDisplay())})},this.deleteProject=e=>{this._dataSetService.deleteProject(e).pipe(Object(i.a)(),Object(r.a)(({message:e})=>e)).subscribe(t=>{1===t&&(this._languageService._translate.get("deleteSuccess").subscribe(t=>{this.isDeleteSuccess=!0,this.projectName=e,this._modalService.open(this.modalIdDeleteProject)}),this.showProjectList())})},this.keyDownEvent=({key:e})=>{"Escape"===e&&this.toggleRenameModalDisplay()&&this.toggleModalDisplay(!1)},this._imgLblModeService.imgLabelMode$.pipe(Object(l.a)()).subscribe(e=>this.imgLblMode=e),this._spinnerService.returnAsObservable().pipe(Object(b.a)(this.unsubscribe$)).subscribe(e=>this.isLoading=e),this.createFormControls(),this.renameFormControls(),this._languageService.initializeLanguage("data-set-page",["data-set-page-en","data-set-page-cn","data-set-page-ms"])}ngOnInit(){this.showProjectList()}onSubmitRename(){var e,t,n;this.renameForm.markAllAsTouched(),this.newInputProjectName?this.projectList.projects&&this.projectList.projects.find(e=>e?e.project_name===this.newInputProjectName:null)?(null===(e=this.renameForm.get("newProjectName"))||void 0===e||e.setErrors({exist:!0}),this._refProjectName.nativeElement.focus()):(this.renameProject(this.oldProjectName,this.newInputProjectName),this.selectedProjectName=null===(t=this.renameForm.get("newProjectName"))||void 0===t?void 0:t.value):(null===(n=this.renameForm.get("newProjectName"))||void 0===n||n.setErrors({required:!0}),this._refProjectName.nativeElement.focus())}isCreateFormIncomplete(){return""===this.inputProjectName||""===this.projectFolderPath}selectProjectFolder(){const e=this._dataSetService.importProjectFolderStatus();this._dataSetService.importProjectFolder().pipe(Object(i.a)(),Object(r.a)(({message:e})=>e)).subscribe(t=>{let n=!1;Object(p.a)(500).pipe(Object(c.a)(()=>e),Object(i.a)(e=>(this.isOverlayOn=0===e.window_status,1===e.window_status&&""!==e.project_path&&(this._projectFoldername.nativeElement.innerHTML=e.project_path.replace(/^.*[\\\/]/,""),this.projectFolderPath=e.project_path),1===e.window_status&&(n=!0),n))).subscribe(e=>{this.showProjectList()})})}importLabelFile(){const e=this._dataSetService.importLabelFileStatus();this._dataSetService.importLabelFile().pipe(Object(i.a)(),Object(r.a)(({message:e})=>e)).subscribe(t=>{let n=!1;Object(p.a)(500).pipe(Object(c.a)(()=>e),Object(i.a)(e=>(this.isOverlayOn=0===e.window_status,1===e.window_status&&""!==e.label_file_path&&(this._labelTextFilename.nativeElement.innerHTML=e.label_file_path.replace(/^.*[\\\/]/,""),this.labelPath=e.label_file_path),1===e.window_status&&(n=!0),n))).subscribe(e=>{this.showProjectList()})})}onWindowClose(e){e.preventDefault(),this.isProjectLoading&&(e.returnValue="Are you sure you want to leave this page?")}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}}return e.\u0275fac=function(t){return new(t||e)(g.Hb(h.b),g.Hb(u.a),g.Hb(v.a),g.Hb(f.a),g.Hb(j.a),g.Hb(_.a),g.Hb(w.a))},e.\u0275cmp=g.Bb({type:e,selectors:[["data-set-layout"]],viewQuery:function(e,t){if(1&e&&(g.tc(H,!0),g.tc(A,!0),g.tc(K,!0),g.tc(G,!0),g.tc(Y,!0),g.tc(Z,!0)),2&e){let e;g.ec(e=g.Ub())&&(t._refProjectName=e.first),g.ec(e=g.Ub())&&(t._projectFoldername=e.first),g.ec(e=g.Ub())&&(t._labelTextFilename=e.first),g.ec(e=g.Ub())&&(t._refNewProjectName=e.first),g.ec(e=g.Ub())&&(t._jsonImportProjectFile=e.first),g.ec(e=g.Ub())&&(t._jsonImportProjectFilename=e.first)}},hostBindings:function(e,t){1&e&&g.Tb("keydown",function(e){return t.keyDownEvent(e)},!1,g.gc)("beforeunload",function(e){return t.onWindowClose(e)},!1,g.gc)},decls:121,vars:103,consts:[["class","overlay",4,"ngIf"],[3,"_onChange"],[1,"upper-container"],[3,"_onCreate","_onImport"],[3,"_jsonSchema","_onClick","_onStarred","_onDelete","_onRename"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[3,"formGroup"],[1,"content-container"],[1,"new-project-container"],[1,"label","label-name"],["type","text","placeholder","Enter project name","formControlName","projectName",1,"input-style",3,"value","input"],["refProjectName",""],[4,"ngIf","ngIfElse"],["emptycontainer",""],[1,"select-folder-container"],[1,"label","label-select-folder"],["type","button",1,"button-style","choose-folder-button",3,"click"],[1,"folder-name-container"],[1,"foldername"],["projectfoldername",""],[1,"select-file-container"],[1,"label-select-label"],["src","../../assets/icons/help.svg",1,"help-icon",3,"mouseover","mouseout"],[2,"padding-top","1vh"],["type","button",1,"button-file-style","choose-file-button",3,"click"],["class","labeltooltiptext",4,"ngIf"],[1,"file-name-container"],[1,"filename"],["labeltextfilename",""],[1,"horizontal-line"],[1,"model-button-container"],["type","submit",1,"button-style","create-btn",3,"ngClass","disabled","click"],[1,"label"],["type","text","placeholder","Enter new project name","formControlName","newProjectName",1,"input-style",3,"value","input"],["refNewProjectName",""],[4,"ngIf"],["type","submit",1,"button-style","create-btn",3,"click"],[1,"label-config"],[1,"help-icon-container"],["src","../../assets/icons/help.svg",1,"help-icon"],[1,"tooltiptext"],[1,"choose-file-btn"],["type","button",1,"input-id",3,"click"],["jsonImportProjectFilename",""],[2,"padding-bottom","2vh"],[1,"modal-message-container"],[1,"display-message-container"],[1,"display-msg"],[1,"validation-success"],[3,"_modalUnsupportedImage","_unsupportedImageBodyStyle","_unsupportedImageList"],[3,"_loading"],[1,"overlay"],[2,"margin-top","40vh","color","rgb(255, 255, 255, 0.9)","text-align","center","font-size","3vh"],[1,"validation"],[1,"error-create-msg"],[1,"empty-container"],[1,"labeltooltiptext"],[1,"validation-rename"],[1,"error-msg"],[3,"ngClass"]],template:function(e,t){if(1&e&&(g.mc(0,Q,3,1,"div",0),g.Ib(1,"page-header",1),g.Mb(2,"div",2),g.Mb(3,"data-set-side-menu",3),g.Tb("_onCreate",function(e){return t.toggleModalDisplay(e)})("_onImport",function(){return t.importProject()}),g.Lb(),g.Mb(4,"div"),g.Ib(5,"data-set-header"),g.Mb(6,"data-set-card",4),g.Tb("_onClick",function(e){return t.onSubmit(!1,e)})("_onStarred",function(e){return t.onStarred(e)})("_onDelete",function(e){return t.deleteProject(e)})("_onRename",function(e){return t.toggleRenameModalDisplay(e)}),g.Lb(),g.Lb(),g.Lb(),g.Mb(7,"modal",5),g.Wb(8,"translate"),g.Mb(9,"form",6),g.Mb(10,"div",7),g.Mb(11,"div",8),g.Mb(12,"label",9),g.oc(13),g.Wb(14,"translate"),g.Lb(),g.Mb(15,"input",10,11),g.Tb("input",function(e){return t.onChange(e.target.value)}),g.Lb(),g.Lb(),g.mc(17,ne,4,2,"ng-container",12),g.mc(18,oe,1,0,"ng-template",null,13,g.nc),g.Ib(20,"br"),g.Mb(21,"div",14),g.Mb(22,"label",15),g.oc(23),g.Wb(24,"translate"),g.Lb(),g.Mb(25,"button",16),g.Tb("click",function(){return t.selectProjectFolder()}),g.oc(26),g.Wb(27,"translate"),g.Lb(),g.Lb(),g.Mb(28,"div",17),g.Ib(29,"label",18,19),g.Lb(),g.Ib(31,"br"),g.Mb(32,"div",20),g.Mb(33,"label",21),g.oc(34),g.Wb(35,"translate"),g.Ib(36,"br"),g.oc(37),g.Wb(38,"translate"),g.Mb(39,"img",22),g.Tb("mouseover",function(){return t.showLabelTooltip=!0})("mouseout",function(){return t.showLabelTooltip=!1}),g.Lb(),g.Lb(),g.Mb(40,"div",23),g.Mb(41,"button",24),g.Tb("click",function(){return t.importLabelFile()}),g.oc(42),g.Wb(43,"translate"),g.Lb(),g.Lb(),g.Lb(),g.mc(44,ae,7,6,"span",25),g.Mb(45,"div",26),g.Ib(46,"label",27,28),g.Lb(),g.Ib(48,"div",29),g.Mb(49,"div",30),g.Mb(50,"button",31),g.Tb("click",function(){return t.onSubmit(!0)}),g.oc(51),g.Wb(52,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Mb(53,"modal",5),g.Wb(54,"translate"),g.Mb(55,"form",6),g.Mb(56,"div",7),g.Mb(57,"div",8),g.Mb(58,"label",32),g.oc(59),g.Wb(60,"translate"),g.Lb(),g.Mb(61,"input",33,34),g.Tb("input",function(e){return t.onChangeRename(e.target.value)}),g.Lb(),g.Lb(),g.mc(63,ce,4,2,"ng-container",35),g.Ib(64,"div",29),g.Mb(65,"div",30),g.Mb(66,"button",36),g.Tb("click",function(){return t.onSubmitRename()}),g.oc(67),g.Wb(68,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Mb(69,"modal",5),g.Wb(70,"translate"),g.Ib(71,"br"),g.Mb(72,"form",6),g.Mb(73,"div",7),g.Mb(74,"div",20),g.Mb(75,"label",37),g.oc(76),g.Wb(77,"translate"),g.Lb(),g.Mb(78,"div",38),g.Ib(79,"img",39),g.Mb(80,"span",40),g.Mb(81,"p"),g.oc(82),g.Wb(83,"translate"),g.Lb(),g.Mb(84,"p"),g.oc(85),g.Wb(86,"translate"),g.Lb(),g.Lb(),g.Lb(),g.Mb(87,"label",41),g.oc(88),g.Wb(89,"translate"),g.Mb(90,"button",42),g.Tb("click",function(){return t.onSelectImportProjectJson()}),g.oc(91),g.Lb(),g.Lb(),g.Ib(92,"label",27,43),g.Lb(),g.mc(94,se,6,5,"ng-container",35),g.Ib(95,"div",44),g.Ib(96,"div",29),g.Lb(),g.Lb(),g.Lb(),g.Mb(97,"modal",5),g.Wb(98,"translate"),g.Mb(99,"div",45),g.Mb(100,"div",46),g.Mb(101,"p",47),g.oc(102),g.Wb(103,"translate"),g.Mb(104,"b",48),g.oc(105),g.Wb(106,"translate"),g.Lb(),g.oc(107,"! "),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Mb(108,"modal",5),g.Wb(109,"translate"),g.Mb(110,"div",45),g.Mb(111,"div",46),g.Mb(112,"p",47),g.oc(113),g.Wb(114,"translate"),g.Mb(115,"b",48),g.oc(116),g.Wb(117,"translate"),g.Lb(),g.oc(118,"! "),g.Lb(),g.Lb(),g.Lb(),g.Lb(),g.Ib(119,"unsupported-image-modal",49),g.Ib(120,"spinner",50)),2&e){const e=g.fc(19);let n=null,o=null;g.ac("ngIf",t.isOverlayOn),g.xb(1),g.ac("_onChange",t.onChangeSchema),g.xb(5),g.ac("_jsonSchema",t.projectList),g.xb(1),g.ac("id",t.modalIdCreateProject)("modalBodyStyle",t.createProjectModalBodyStyle)("modalTitle",g.Xb(8,59,"createNewProject"))("scrollable",!1),g.xb(2),g.ac("formGroup",t.form),g.xb(4),g.qc("",g.Xb(14,61,"newProjectName")," "),g.xb(2),g.ac("value",t.inputProjectName),g.xb(2),g.ac("ngIf",(null==(n=t.form.get("projectName"))?null:n.touched)&&(null==(n=t.form.get("projectName"))?null:n.invalid))("ngIfElse",e),g.xb(6),g.pc(g.Xb(24,63,"projectFolder")),g.xb(3),g.qc(" ",g.Xb(27,65,"chooseFolder")," "),g.xb(8),g.qc(" ",g.Xb(35,67,"labelListFile"),""),g.xb(3),g.qc(" ",g.Xb(38,69,"optional"),": "),g.xb(5),g.qc(" ",g.Xb(43,71,"chooseFile")," "),g.xb(2),g.ac("ngIf",t.showLabelTooltip),g.xb(6),g.ac("ngClass",t.isCreateFormIncomplete()?"disabled-create-btn":null)("disabled",t.isCreateFormIncomplete()),g.xb(1),g.qc(" ",g.Xb(52,73,"createButton")," "),g.xb(2),g.ac("id",t.modalIdRenameProject)("modalBodyStyle",t.renameProjectModalBodyStyle)("modalTitle",g.Xb(54,75,"renameProject"))("scrollable",!1),g.xb(2),g.ac("formGroup",t.renameForm),g.xb(4),g.qc("",g.Xb(60,77,"newProjectName")," "),g.xb(2),g.ac("value",t.inputProjectName),g.xb(2),g.ac("ngIf",null==(o=t.renameForm.get("newProjectName"))?null:o.touched),g.xb(4),g.qc(" ",g.Xb(68,79,"updateButton")," "),g.xb(2),g.ac("id",t.modalIdImportProject)("modalBodyStyle",t.importProjectModalBodyStyle)("modalTitle",g.Xb(70,81,"menuName.importProject"))("scrollable",!1),g.xb(3),g.ac("formGroup",t.form),g.xb(4),g.qc("",g.Xb(77,83,"importJson")," "),g.xb(6),g.pc(g.Xb(83,85,"configFileInfoDest1")),g.xb(3),g.pc(g.Xb(86,87,"configFileInfoDest2")),g.xb(3),g.qc(" ",g.Xb(89,89,"chooseFile")," "),g.xb(3),g.qc(" ","Import"," "),g.xb(3),g.ac("ngIf",t.modalSpanMessage.trim()),g.xb(3),g.ac("id",t.modalIdRenameSuccess)("modalBodyStyle",t.renameSuccessBodyStyle)("modalTitle",g.Xb(98,91,"renameProject"))("scrollable",!1),g.xb(5),g.rc(" ",t.projectName," ",g.Xb(103,93,"renameMsg")," "),g.xb(3),g.pc(g.Xb(106,95,"success")),g.xb(3),g.ac("id",t.modalIdDeleteProject)("modalBodyStyle",t.deleteProjectBodyStyle)("modalTitle",g.Xb(109,97,"deleteProject"))("scrollable",!1),g.xb(5),g.rc(" ",t.projectName," ",g.Xb(114,99,"deleteMsg")," "),g.xb(3),g.pc(g.Xb(117,101,"success")),g.xb(3),g.ac("_modalUnsupportedImage",t.modalUnsupportedImage)("_unsupportedImageBodyStyle",t.unsupportedImageBodyStyle)("_unsupportedImageList",t.unsupportedImageList),g.xb(1),g.ac("_loading",t.isLoading)}},directives:[o.k,M.a,O,L,q,R.a,h.n,h.g,h.d,h.a,h.f,h.c,o.i,J.a,$.a],pipes:[P.c],styles:[".upper-container[_ngcontent-%COMP%]{display:flex;margin-top:5vh}.model[_ngcontent-%COMP%]{z-index:1000;padding-top:10vh;top:0;width:100%;height:100%;overflow:auto;background-color:transparent;scrollbar-width:none;position:fixed;background:rgba(0,0,0,.7)}.model-content[_ngcontent-%COMP%]{background-color:#525353;padding:1vw;border:solid;max-width:30vw;min-width:30vw;border-radius:1vw;margin:15vh auto auto}.content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.content-header[_ngcontent-%COMP%]{color:#fff;font-size:3vh}.new-project-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:3vh 0 0;align-items:baseline}.label[_ngcontent-%COMP%]{margin-right:1vw}.label[_ngcontent-%COMP%], .label-config[_ngcontent-%COMP%]{color:#fff;font-size:2vh}.label-config[_ngcontent-%COMP%]{padding-top:.5vh}.input-style[_ngcontent-%COMP%]{border-radius:2vw;border:none;outline:none;background-color:#363636;min-width:11vw;max-width:12vw;min-height:4vh;max-height:4vh;font-size:2vh;color:#fff;padding:0 1vw}.validation[_ngcontent-%COMP%]{margin-left:11vw}.validation[_ngcontent-%COMP%], .validation-rename[_ngcontent-%COMP%]{color:red;margin-top:1.02vh;margin-bottom:.25vh}.validation-rename[_ngcontent-%COMP%]{margin-left:7.5vw}.validation-error[_ngcontent-%COMP%]{margin:1px;color:red}.validation-success[_ngcontent-%COMP%]{margin:1px;color:green}.error-create-msg[_ngcontent-%COMP%], .error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.error-create-msg[_ngcontent-%COMP%]{padding-left:1vw}.select-file-container[_ngcontent-%COMP%], .select-folder-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:0}.empty-container[_ngcontent-%COMP%], .file-name-container[_ngcontent-%COMP%], .folder-name-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:1.5vh 0 0 12vw;min-height:2vh}.filename[_ngcontent-%COMP%], .foldername[_ngcontent-%COMP%]{font-size:1.8vh;color:#fff;overflow:hidden;text-overflow:ellipsis}.input[_ngcontent-%COMP%]{color:#7fffd4}.horizontal-line[_ngcontent-%COMP%]{background-color:#fff;min-height:.3vh;max-height:.3vh;margin:2vh auto}.model-button-container[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse;padding:.5vw}.button-file-style[_ngcontent-%COMP%], .button-style[_ngcontent-%COMP%]{padding:1vh 1.5vw;border-radius:1vh;border:none;outline:none;color:#fff;cursor:pointer;font-size:2vh}.button-file-style[_ngcontent-%COMP%]{max-height:4vh}.choose-file-button[_ngcontent-%COMP%], .choose-folder-button[_ngcontent-%COMP%]{background-color:#444}.create-btn[_ngcontent-%COMP%]{background-color:#2d8ceb}.disabled-create-btn[_ngcontent-%COMP%]{cursor:not-allowed;background-color:#444!important;color:#777!important}.cancel-btn[_ngcontent-%COMP%]{background-color:#444;margin-right:.7vw}.choose-file-btn[_ngcontent-%COMP%]{font-size:2vh;text-decoration:none;background-color:#444;color:#fff;padding:.5vh 1vw;border:none;border-radius:1vh;margin-right:1vw;cursor:pointer}.label-name[_ngcontent-%COMP%]{width:9.5vw;padding-top:.2vh;padding-right:1vw}.help-icon-container[_ngcontent-%COMP%]{padding-right:1vw;padding-left:.2vw}.help-icon[_ngcontent-%COMP%]{height:3vh}.label-file[_ngcontent-%COMP%]{padding-top:1vh;padding-right:.2vw}.label-select-folder[_ngcontent-%COMP%]{padding-top:.7vh;padding-right:1vw;width:9.5vw}.label-select-label[_ngcontent-%COMP%]{color:#fff;font-size:2vh;padding-top:0;width:11.5vw}.label-select-file[_ngcontent-%COMP%]{padding-top:.5vh;width:9.5vw}.input-id[_ngcontent-%COMP%]{font-size:2vh;display:none}.overlay[_ngcontent-%COMP%]{z-index:3000;position:absolute;background-color:rgba(0,0,0,.9);width:99.9vw;height:99.7vh;cursor:not-allowed}.tooltip[_ngcontent-%COMP%]{position:relative;display:inline-block;border-bottom:1px dotted #000;font-size:15px;text-decoration:underline;margin-top:1vh}.tooltiptitle[_ngcontent-%COMP%]{opacity:.3}.help-icon-container[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:10vw;min-width:200px;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:60%;margin-left:-60px;text-align:justify;text-justify:inter-word}.help-icon-container[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible}.labeltooltiptext[_ngcontent-%COMP%]{width:13vw;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:67%;left:30%;margin-left:-60px;text-align:justify;text-justify:inter-word}.display-message-container[_ngcontent-%COMP%]{padding-left:1.2vw}.display-msg[_ngcontent-%COMP%]{font-size:2vh;color:#fff}.modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}"]}),e})()}];let be=(()=>{class e{}return e.\u0275mod=g.Fb({type:e}),e.\u0275inj=g.Eb({factory:function(t){return new(t||e)},imports:[[u.d.forChild(le)]]}),e})();var de=n("KZX/");let pe=(()=>{class e{}return e.\u0275mod=g.Fb({type:e}),e.\u0275inj=g.Eb({factory:function(t){return new(t||e)},imports:[[o.b,de.a,be]]}),e})()}}]); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/7-es5.cfacf17f6f0c118bdebe.js b/classifai-core/src/main/resources/webroot/7-es5.cfacf17f6f0c118bdebe.js deleted file mode 100644 index 93000d3c5..000000000 --- a/classifai-core/src/main/resources/webroot/7-es5.cfacf17f6f0c118bdebe.js +++ /dev/null @@ -1 +0,0 @@ -!function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n0)("ngIfElse",n)}}var $,A=(($=function(){function t(n){var o=this;e(this,t),this._cd=n,this._onClick=new h.n,this._onStarred=new h.n,this._onDelete=new h.n,this._onRename=new h.n,this.starredActiveIcon="../../../assets/icons/starred_active.svg",this.starredInactiveIcon="../../../assets/icons/starred.svg",this.cardSchema={clickIndex:-1},this.previousProjectLength=0,this.conditionalDisableProject=function(e){return e.is_loaded?"disabled":"enabled"},this.conditionalDisableClickEvent=function(e){return e},this.onOpenProject=function(e,t){var n=t.project_name;!o.isExactIndex(e)&&o._onClick.emit(n)},this.onDisplayMore=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.cardSchema.clickIndex,t=o.cardSchema.clickIndex;o.cardSchema={clickIndex:t===e?-1:e}},this.onCloseDisplay=function(){o.cardSchema.clickIndex=-1},this.onStarred=function(e,t){var n=e.project_name;o._jsonSchema.projects=o._jsonSchema.projects.map(function(e){return e.project_name===n?(e.is_starred=t,e):e}),o._onStarred.emit({projectName:n,starred:t})},this.isExactIndex=function(e){return e===o.cardSchema.clickIndex},this.onDblClickStopPropagate=function(e){return e.stopPropagation()}}return n(t,[{key:"ngOnInit",value:function(){}},{key:"onRenameProject",value:function(e){this._onRename.emit({shown:!0,projectName:e}),this.onCloseDisplay()}},{key:"onDeleteProject",value:function(e){this._onDelete.emit(e),this.onCloseDisplay()}},{key:"ngOnChanges",value:function(e){!e._jsonSchema.currentValue.isUploading&&this.onDisplayMore(),this._jsonSchema.projects.length!==this.previousProjectLength&&(this.cardSchema.clickIndex=-1),this.previousProjectLength=this._jsonSchema.projects.length}}]),t}()).\u0275fac=function(e){return new(e||$)(h.Hb(h.h))},$.\u0275cmp=h.Bb({type:$,selectors:[["data-set-card"]],inputs:{_jsonSchema:"_jsonSchema"},outputs:{_onClick:"_onClick",_onStarred:"_onStarred",_onDelete:"_onDelete",_onRename:"_onRename"},features:[h.vb],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["showCardBody",""],[1,"card-layout-container","scroll","fade-in"],[1,"no-project-card-container"],[1,"no-project-title-padding"],[1,"no-project-title"],[1,"no-project-subtitle"],["noProject",""],[4,"ngFor","ngForOf"],[1,"card-container",3,"ngClass","dblclick"],[1,"card-header-style"],["newLabel",""],[1,"card-icon-container"],[3,"click","dblclick"],[1,"card-icon-style",3,"src"],["src","../../../assets/icons/more.svg",1,"card-icon-style","enabled"],[4,"ngIf"],[1,"card-title-style"],[3,"title","ngClass"],[1,"card-title-txt"],[1,"project-name-style"],[1,"project-info"],[1,"project-path-style"],[1,"project-path"],[1,"project-status-uploading",3,"ngClass"],[3,"ngSwitch"],[1,"project-status-new",3,"ngClass"],[1,"project-status-available",3,"ngClass"],[1,"project-status-opened",3,"ngClass"],[1,"project-status-invalid",3,"ngClass"],[1,"popup-container","enabled"],[1,"popup-label",3,"click"]],template:function(e,t){if(1&e&&(h.mc(0,F,11,6,"ng-container",0),h.mc(1,H,3,2,"ng-template",null,1,h.nc)),2&e){var n=h.fc(2);h.ac("ngIf",t._jsonSchema.isFetching)("ngIfElse",n)}},directives:[i.k,i.j,i.i,i.m],pipes:[y.c],styles:['@keyframes fade-in{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}.fade-in[_ngcontent-%COMP%]{animation:fadeIn 1.5s ease;-webkit-animation:fadeIn 1.5s ease;-moz-animation:fadeIn ease 1.5s;-o-animation:fadeIn ease 1.5s;-ms-animation:fadeIn ease 1.5s}.card-layout-container[_ngcontent-%COMP%]{width:80vw;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;padding:0 0 0 1vw;overflow-y:scroll;position:relative;height:80vh}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px;background-color:#000}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:.5vw}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.card-container[_ngcontent-%COMP%]{min-width:11vw;max-width:11vw;min-height:30vh;max-height:30vh;border-style:solid;font-size:2.2vh;background:#2e2d2d;position:relative}.card-container[_ngcontent-%COMP%]:hover{background:#404040}.card-container[_ngcontent-%COMP%]:before{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:.3vw;background-color:#363636}.enabled[_ngcontent-%COMP%]{cursor:pointer}.disabled[_ngcontent-%COMP%]{cursor:not-allowed}.project-status-new[_ngcontent-%COMP%]{background-color:#f59221}.project-status-available[_ngcontent-%COMP%], .project-status-new[_ngcontent-%COMP%]{color:#f5f5f5;font-size:60%;padding:.3vh 1.5vw .6vh 1vw}.project-status-available[_ngcontent-%COMP%]{background-color:#92c91b}.project-status-opened[_ngcontent-%COMP%]{background-color:#258fc0}.project-status-invalid[_ngcontent-%COMP%], .project-status-opened[_ngcontent-%COMP%]{color:#f5f5f5;font-size:60%;padding:.3vh 1.5vw .6vh 1vw}.project-status-invalid[_ngcontent-%COMP%]{background-color:#de1c44}.card-icon-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex}.card-icon-style[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh}.card-icon-style[_ngcontent-%COMP%]:hover{border-radius:5vh;background-color:#393838}.card-header-style[_ngcontent-%COMP%]{margin-top:1vh;display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;position:relative}.card-title-style[_ngcontent-%COMP%]{margin-left:1vw}.card-title-txt[_ngcontent-%COMP%]{color:#656667;font-size:1.3vh;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-name-style[_ngcontent-%COMP%], .project-path-style[_ngcontent-%COMP%]{margin-left:1vw;padding:1vh 0 0}.project-path-style[_ngcontent-%COMP%]{width:90%;position:absolute;bottom:1vh}.project-info[_ngcontent-%COMP%]{color:#dbdbda;font-size:2vh;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-path[_ngcontent-%COMP%]{word-wrap:break-word;font-size:1.2vh;color:#737475;position:relative}.tag-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;border-radius:10vw;background:#363636;width:4.5vw;padding:.2vw .3vh;cursor:pointer;outline:none;border:none;margin:.8vh 0 0 1vw}.tag-img[_ngcontent-%COMP%]{min-height:2vh;max-height:2vh;min-width:1vw;max-width:1vw;margin-left:.35vw}.tag-txt[_ngcontent-%COMP%]{font-size:1.2vh;color:#fff;padding:.2vh 0 0 .3vw;cursor:pointer}.popup-container[_ngcontent-%COMP%]{overflow:hidden;position:absolute;margin:4vh 0 0 -10vw;padding:.5vw;border-radius:.2vw;box-shadow:0 2px 5px 0 rgba(var(--shadow-rgb),.26),0 2px 10px 0 rgba(var(--shadow-rgb),.16);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transform:scale(1);transform:scale(1);opacity:1;white-space:nowrap;background:#fff;font-size:1.5vh;-webkit-animation:appear .35s ease-in 1;animation:appear .35s ease-in 1}@-webkit-keyframes appear{0%{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}}@keyframes appear{0%{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}}.popup-label[_ngcontent-%COMP%]{font-size:2vh;padding:.5vw}.popup-label[_ngcontent-%COMP%]:hover{background:#e9e9e9}.no-project-title[_ngcontent-%COMP%]{font-size:4vh;color:#fff;white-space:nowrap}.no-project-title-padding[_ngcontent-%COMP%]{padding:2vw}.no-project-subtitle[_ngcontent-%COMP%]{font-size:2vh;color:#bebebe;white-space:nowrap}.no-project-card-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;background-color:#1f1f1f;width:100%}']}),$),K=a("44N4"),Y=a("OObL"),G=a("TJKd"),Z=["refProjectName"],Q=["projectfoldername"],ee=["labeltextfilename"],te=["refNewProjectName"],ne=["jsonImportProjectFile"],oe=["jsonImportProjectFilename"];function ae(e,t){if(1&e&&(h.Mb(0,"div",51),h.Mb(1,"p",52),h.oc(2),h.Lb(),h.Lb()),2&e){var n=h.Vb();h.xb(2),h.qc(" ",n.isImageUploading?"Uploading the Images. Please Wait...":"Selection Window is Opened"," ")}}function ie(e,t){1&e&&(h.Mb(0,"span"),h.Mb(1,"small",54),h.oc(2),h.Wb(3,"translate"),h.Lb(),h.Lb()),2&e&&(h.xb(2),h.qc(" ",h.Xb(3,1,"projectNameExist")," "))}function re(e,t){1&e&&(h.Mb(0,"span"),h.Mb(1,"small",54),h.oc(2),h.Wb(3,"translate"),h.Lb(),h.Lb()),2&e&&(h.xb(2),h.qc(" ",h.Xb(3,1,"projectNameRequired")," "))}function ce(e,t){if(1&e&&(h.Kb(0),h.Mb(1,"div",53),h.mc(2,ie,4,3,"span",35),h.mc(3,re,4,3,"span",35),h.Lb(),h.Jb()),2&e){var n=h.Vb(),o=null,a=null;h.xb(2),h.ac("ngIf",null==(o=n.form.get("projectName"))?null:o.getError("exist")),h.xb(1),h.ac("ngIf",null==(a=n.form.get("projectName"))?null:a.getError("required"))}}function se(e,t){1&e&&h.Ib(0,"div",55)}function le(e,t){1&e&&(h.Mb(0,"span",56),h.Mb(1,"p"),h.oc(2),h.Wb(3,"translate"),h.Lb(),h.Mb(4,"p"),h.oc(5),h.Wb(6,"translate"),h.Lb(),h.Lb()),2&e&&(h.xb(2),h.pc(h.Xb(3,2,"labelFileDest1")),h.xb(3),h.pc(h.Xb(6,4,"labelFileDest2")))}function be(e,t){1&e&&(h.Mb(0,"span"),h.Mb(1,"small",58),h.oc(2),h.Wb(3,"translate"),h.Lb(),h.Lb()),2&e&&(h.xb(2),h.qc(" ",h.Xb(3,1,"projectNameExist")," "))}function de(e,t){1&e&&(h.Mb(0,"span"),h.Mb(1,"small",58),h.oc(2),h.Wb(3,"translate"),h.Lb(),h.Lb()),2&e&&(h.xb(2),h.qc(" ",h.Xb(3,1,"projectNameRequired")," "))}function pe(e,t){if(1&e&&(h.Kb(0),h.Mb(1,"div",57),h.mc(2,be,4,3,"span",35),h.mc(3,de,4,3,"span",35),h.Lb(),h.Jb()),2&e){var n=h.Vb(),o=null,a=null;h.xb(2),h.ac("ngIf",null==(o=n.renameForm.get("newProjectName"))?null:o.getError("exist")),h.xb(1),h.ac("ngIf",null==(a=n.renameForm.get("newProjectName"))?null:a.getError("required"))}}function me(e,t){if(1&e&&(h.Kb(0),h.Mb(1,"div",59),h.Mb(2,"span"),h.Mb(3,"small",58),h.oc(4),h.Wb(5,"translate"),h.Lb(),h.Lb(),h.Lb(),h.Jb()),2&e){var n=h.Vb();h.xb(1),h.ac("ngClass",n.spanClass),h.xb(3),h.rc("",h.Xb(5,3,n.modalSpanMessage),"",n.modalImportProjectName,"")}}var ue,ge,fe,he=[{path:"",component:(ue=function(){function t(n,o,a,i,h,v,w){var j=this;e(this,t),this._fb=n,this._router=o,this._dataSetService=a,this._spinnerService=i,this._imgLblModeService=h,this._languageService=v,this._modalService=w,this.onChangeSchema={currentThumbnailIndex:-1,thumbnailName:"",totalNumThumbnail:0,status:void 0},this.projectList={projects:[],isUploading:!1,isFetching:!1},this.inputProjectName="",this.newInputProjectName="",this.selectedProjectName="",this.oldProjectName="",this.subject$=new m.a,this.thumbnailList=[],this.labelList=[],this.unsubscribe$=new m.a,this.isLoading=!1,this.isOverlayOn=!1,this.isImageUploading=!1,this.isProjectLoading=!1,this.isDeleteSuccess=!1,this.projectName="",this.imgLblMode=null,this.modalSpanMessage="",this.modalImportProjectName="",this.spanClass="",this.labelPath="",this.projectFolderPath="",this.showLabelTooltip=!1,this.unsupportedImageList=[],this.modalIdCreateProject="modal-create-project",this.modalIdRenameProject="modal-rename-project",this.modalIdImportProject="modal-import-project",this.modalIdDeleteProject="modal-delete-project",this.modalIdRenameSuccess="modal-rename-success",this.modalUnsupportedImage="modal-unsupported-image",this.createProjectModalBodyStyle={minHeight:"45vh",minWidth:"31vw",maxWidth:"31vw",margin:"12vw 71vh",overflow:"none"},this.renameProjectModalBodyStyle={minHeight:"23vh",maxHeight:"25vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.importProjectModalBodyStyle={minHeight:"15vh",maxHeight:"25vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.deleteProjectBodyStyle={minHeight:"11vh",maxHeight:"11vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.renameSuccessBodyStyle={minHeight:"11vh",maxHeight:"11vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.unsupportedImageBodyStyle={minHeight:"18vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.showProjectList=function(){j.projectList.isFetching=!0,j._dataSetService.getProjectList().pipe(Object(c.a)()).subscribe(function(e){var t=e.content;if(t){var n=Object(r.a)(t).map(function(e){return Object.assign(Object.assign({},e),{created_date:j.formatDate(e.created_date)})});j.projectList=Object.assign(Object.assign({},j.projectList),{projects:n,isFetching:!1})}})},this.formatDate=function(e){var t=new Date(e),n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"].find(function(e,n){return n===t.getMonth()||void 0});return n?"".concat(n,"-").concat(t.getDate(),"-").concat(t.getFullYear()):"Error"},this.createFormControls=function(){j.form=j._fb.group({projectName:["",f.l.required]})},this.renameFormControls=function(){j.renameForm=j._fb.group({newProjectName:["",f.l.required]})},this.onChange=function(e){j.inputProjectName=e},this.onChangeRename=function(e){j.newInputProjectName=e},this.toggleModalDisplay=function(e){j._projectFoldername.nativeElement.innerHTML="",j._labelTextFilename.nativeElement.innerHTML="",e&&j.form.reset(),e?j._modalService.open(j.modalIdCreateProject):j._modalService.close(j.modalIdCreateProject)},this.toggleRenameModalDisplay=function(e){if(e){var t=e.shown,n=e.projectName;t?(j.renameForm.reset(),j._modalService.open(j.modalIdRenameProject)):j._modalService.close(j.modalIdRenameProject),j.oldProjectName=n}else j._modalService.close(j.modalIdRenameProject)},this.toggleImportProjectModalDisplay=function(e){j.modalSpanMessage="",e?j._modalService.open(j.modalIdImportProject):j._modalService.close(j.modalIdImportProject)},this.onSelectImportProjectJson=function(){j.toggleImportProjectModalDisplay(!0);var e=j._dataSetService.importStatus();j._dataSetService.importProject().pipe(Object(c.a)(),Object(s.a)(function(e){return e.message})).subscribe(function(t){var n=!1;Object(u.a)(500).pipe(Object(l.a)(function(){return e}),Object(c.a)(function(e){return j.isOverlayOn=1===e.file_system_status||2===e.file_system_status,0!==e.file_system_status&&3!==e.file_system_status&&5!==e.file_system_status||(n=!0),n})).subscribe(function(e){j.modalSpanMessage="DATABASE_UPDATED"===e.file_system_message?"importSuccess":"importAborted",j.modalImportProjectName="DATABASE_UPDATED"===e.file_system_message&&e.project_name?e.project_name:"",j.processIsSuccess(5!==e.file_system_status),j.showProjectList()})})},this.processIsSuccess=function(e){j.spanClass=e?"validation-success":"validation-error"},this.importProject=function(){j.toggleImportProjectModalDisplay(!0)},this.onStarred=function(e){var t=e.projectName,n=e.starred;j._dataSetService.updateProjectStatus(t,n,"star").pipe(Object(c.a)()).subscribe(function(e){var t=e.message;return console.log(t)},function(e){return j.projectList={isUploading:j.projectList.isUploading,isFetching:j.projectList.isFetching,projects:j.projectList.projects.map(function(e){return e.project_name===t?Object.assign(Object.assign({},e),{is_starred:!1}):e})}})},this.onSubmit=function(e,t){var n,o,a;j.form.markAllAsTouched(),e?j.inputProjectName?j.projectList.projects&&j.projectList.projects.find(function(e){return e&&e.project_name===j.inputProjectName})?(null===(n=j.form.get("projectName"))||void 0===n||n.setErrors({exist:!0}),j._refProjectName.nativeElement.focus()):(j.createProject(j.inputProjectName),j.selectedProjectName=null===(o=j.form.get("projectName"))||void 0===o?void 0:o.value):(null===(a=j.form.get("projectName"))||void 0===a||a.setErrors({required:!0}),j._refProjectName.nativeElement.focus()):t&&j.startProject(t)},this.onOpenImportProject=function(e,t){console.log("BUTTON IMPORT CLICKED")},this.startProject=function(e){j._router.navigate(["imglabel/"+j.imgLblMode],{state:{projectName:e}})},this.createProject=function(e){var t=j._dataSetService.createNewProject(e,j.labelPath,j.projectFolderPath),n=j._dataSetService.localUploadStatus(e),o=0;j.projectList=Object.assign(Object.assign({},j.projectList),{isUploading:!0}),j.subjectSubscription=j.subject$.pipe(Object(c.a)(),Object(b.a)(function(){return t}),Object(b.a)(function(e){return 1===e.message?Object(u.a)(500).pipe(Object(b.a)(function(){return n}),Object(c.a)(function(e){var t=e.file_system_status,n=e.unsupported_image_list;return j.unsupportedImageList=n,j.isOverlayOn=1===t||2===t,j.isImageUploading=2===t,3===t})):Object(g.a)(function(e){return console.error(e),j.projectList=Object.assign(Object.assign({},j.projectList),{isUploading:!1}),e})})).subscribe(function(e){3===e.file_system_status&&j.toggleModalDisplay(!1),j.isProjectLoading=!0,(o=e?--o:o)<1&&(j.projectList=Object.assign(Object.assign({},j.projectList),{isUploading:!1}))},function(e){},function(){j.isProjectLoading=!1,j.showProjectList(),j.unsupportedImageList.length>0&&j._dataSetService.downloadUnsupportedImageList(e,j.unsupportedImageList).then(function(e){e&&j._modalService.open(j.modalUnsupportedImage)})}),j.subject$.next()},this.renameProject=function(e,t){j._dataSetService.renameProject(e,t).pipe(Object(c.a)(),Object(s.a)(function(e){return e.message})).subscribe(function(t){1===t&&(j._languageService._translate.get("renameSuccess").subscribe(function(t){j.projectName=e,j.modalSpanMessage=t,j._modalService.open(j.modalIdRenameSuccess)}),j.showProjectList(),j.toggleRenameModalDisplay())})},this.deleteProject=function(e){j._dataSetService.deleteProject(e).pipe(Object(c.a)(),Object(s.a)(function(e){return e.message})).subscribe(function(t){1===t&&(j._languageService._translate.get("deleteSuccess").subscribe(function(t){j.isDeleteSuccess=!0,j.projectName=e,j._modalService.open(j.modalIdDeleteProject)}),j.showProjectList())})},this.keyDownEvent=function(e){"Escape"===e.key&&j.toggleRenameModalDisplay()&&j.toggleModalDisplay(!1)},this._imgLblModeService.imgLabelMode$.pipe(Object(d.a)()).subscribe(function(e){return j.imgLblMode=e}),this._spinnerService.returnAsObservable().pipe(Object(p.a)(this.unsubscribe$)).subscribe(function(e){return j.isLoading=e}),this.createFormControls(),this.renameFormControls(),this._languageService.initializeLanguage("data-set-page",["data-set-page-en","data-set-page-cn","data-set-page-ms"])}return n(t,[{key:"ngOnInit",value:function(){this.showProjectList()}},{key:"onSubmitRename",value:function(){var e,t,n,o=this;this.renameForm.markAllAsTouched(),this.newInputProjectName?this.projectList.projects&&this.projectList.projects.find(function(e){return e?e.project_name===o.newInputProjectName:null})?(null===(e=this.renameForm.get("newProjectName"))||void 0===e||e.setErrors({exist:!0}),this._refProjectName.nativeElement.focus()):(this.renameProject(this.oldProjectName,this.newInputProjectName),this.selectedProjectName=null===(t=this.renameForm.get("newProjectName"))||void 0===t?void 0:t.value):(null===(n=this.renameForm.get("newProjectName"))||void 0===n||n.setErrors({required:!0}),this._refProjectName.nativeElement.focus())}},{key:"isCreateFormIncomplete",value:function(){return""===this.inputProjectName||""===this.projectFolderPath}},{key:"selectProjectFolder",value:function(){var e=this,t=this._dataSetService.importProjectFolderStatus();this._dataSetService.importProjectFolder().pipe(Object(c.a)(),Object(s.a)(function(e){return e.message})).subscribe(function(n){var o=!1;Object(u.a)(500).pipe(Object(l.a)(function(){return t}),Object(c.a)(function(t){return e.isOverlayOn=0===t.window_status,1===t.window_status&&""!==t.project_path&&(e._projectFoldername.nativeElement.innerHTML=t.project_path.replace(/^.*[\\\/]/,""),e.projectFolderPath=t.project_path),1===t.window_status&&(o=!0),o})).subscribe(function(t){e.showProjectList()})})}},{key:"importLabelFile",value:function(){var e=this,t=this._dataSetService.importLabelFileStatus();this._dataSetService.importLabelFile().pipe(Object(c.a)(),Object(s.a)(function(e){return e.message})).subscribe(function(n){var o=!1;Object(u.a)(500).pipe(Object(l.a)(function(){return t}),Object(c.a)(function(t){return e.isOverlayOn=0===t.window_status,1===t.window_status&&""!==t.label_file_path&&(e._labelTextFilename.nativeElement.innerHTML=t.label_file_path.replace(/^.*[\\\/]/,""),e.labelPath=t.label_file_path),1===t.window_status&&(o=!0),o})).subscribe(function(t){e.showProjectList()})})}},{key:"onWindowClose",value:function(e){e.preventDefault(),this.isProjectLoading&&(e.returnValue="Are you sure you want to leave this page?")}},{key:"ngOnDestroy",value:function(){this.unsubscribe$.next(),this.unsubscribe$.complete()}}]),t}(),ue.\u0275fac=function(e){return new(e||ue)(h.Hb(f.b),h.Hb(v.a),h.Hb(w.a),h.Hb(j.a),h.Hb(_.a),h.Hb(x.a),h.Hb(M.a))},ue.\u0275cmp=h.Bb({type:ue,selectors:[["data-set-layout"]],viewQuery:function(e,t){var n;1&e&&(h.tc(Z,!0),h.tc(Q,!0),h.tc(ee,!0),h.tc(te,!0),h.tc(ne,!0),h.tc(oe,!0)),2&e&&(h.ec(n=h.Ub())&&(t._refProjectName=n.first),h.ec(n=h.Ub())&&(t._projectFoldername=n.first),h.ec(n=h.Ub())&&(t._labelTextFilename=n.first),h.ec(n=h.Ub())&&(t._refNewProjectName=n.first),h.ec(n=h.Ub())&&(t._jsonImportProjectFile=n.first),h.ec(n=h.Ub())&&(t._jsonImportProjectFilename=n.first))},hostBindings:function(e,t){1&e&&h.Tb("keydown",function(e){return t.keyDownEvent(e)},!1,h.gc)("beforeunload",function(e){return t.onWindowClose(e)},!1,h.gc)},decls:121,vars:103,consts:[["class","overlay",4,"ngIf"],[3,"_onChange"],[1,"upper-container"],[3,"_onCreate","_onImport"],[3,"_jsonSchema","_onClick","_onStarred","_onDelete","_onRename"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[3,"formGroup"],[1,"content-container"],[1,"new-project-container"],[1,"label","label-name"],["type","text","placeholder","Enter project name","formControlName","projectName",1,"input-style",3,"value","input"],["refProjectName",""],[4,"ngIf","ngIfElse"],["emptycontainer",""],[1,"select-folder-container"],[1,"label","label-select-folder"],["type","button",1,"button-style","choose-folder-button",3,"click"],[1,"folder-name-container"],[1,"foldername"],["projectfoldername",""],[1,"select-file-container"],[1,"label-select-label"],["src","../../assets/icons/help.svg",1,"help-icon",3,"mouseover","mouseout"],[2,"padding-top","1vh"],["type","button",1,"button-file-style","choose-file-button",3,"click"],["class","labeltooltiptext",4,"ngIf"],[1,"file-name-container"],[1,"filename"],["labeltextfilename",""],[1,"horizontal-line"],[1,"model-button-container"],["type","submit",1,"button-style","create-btn",3,"ngClass","disabled","click"],[1,"label"],["type","text","placeholder","Enter new project name","formControlName","newProjectName",1,"input-style",3,"value","input"],["refNewProjectName",""],[4,"ngIf"],["type","submit",1,"button-style","create-btn",3,"click"],[1,"label-config"],[1,"help-icon-container"],["src","../../assets/icons/help.svg",1,"help-icon"],[1,"tooltiptext"],[1,"choose-file-btn"],["type","button",1,"input-id",3,"click"],["jsonImportProjectFilename",""],[2,"padding-bottom","2vh"],[1,"modal-message-container"],[1,"display-message-container"],[1,"display-msg"],[1,"validation-success"],[3,"_modalUnsupportedImage","_unsupportedImageBodyStyle","_unsupportedImageList"],[3,"_loading"],[1,"overlay"],[2,"margin-top","40vh","color","rgb(255, 255, 255, 0.9)","text-align","center","font-size","3vh"],[1,"validation"],[1,"error-create-msg"],[1,"empty-container"],[1,"labeltooltiptext"],[1,"validation-rename"],[1,"error-msg"],[3,"ngClass"]],template:function(e,t){if(1&e&&(h.mc(0,ae,3,1,"div",0),h.Ib(1,"page-header",1),h.Mb(2,"div",2),h.Mb(3,"data-set-side-menu",3),h.Tb("_onCreate",function(e){return t.toggleModalDisplay(e)})("_onImport",function(){return t.importProject()}),h.Lb(),h.Mb(4,"div"),h.Ib(5,"data-set-header"),h.Mb(6,"data-set-card",4),h.Tb("_onClick",function(e){return t.onSubmit(!1,e)})("_onStarred",function(e){return t.onStarred(e)})("_onDelete",function(e){return t.deleteProject(e)})("_onRename",function(e){return t.toggleRenameModalDisplay(e)}),h.Lb(),h.Lb(),h.Lb(),h.Mb(7,"modal",5),h.Wb(8,"translate"),h.Mb(9,"form",6),h.Mb(10,"div",7),h.Mb(11,"div",8),h.Mb(12,"label",9),h.oc(13),h.Wb(14,"translate"),h.Lb(),h.Mb(15,"input",10,11),h.Tb("input",function(e){return t.onChange(e.target.value)}),h.Lb(),h.Lb(),h.mc(17,ce,4,2,"ng-container",12),h.mc(18,se,1,0,"ng-template",null,13,h.nc),h.Ib(20,"br"),h.Mb(21,"div",14),h.Mb(22,"label",15),h.oc(23),h.Wb(24,"translate"),h.Lb(),h.Mb(25,"button",16),h.Tb("click",function(){return t.selectProjectFolder()}),h.oc(26),h.Wb(27,"translate"),h.Lb(),h.Lb(),h.Mb(28,"div",17),h.Ib(29,"label",18,19),h.Lb(),h.Ib(31,"br"),h.Mb(32,"div",20),h.Mb(33,"label",21),h.oc(34),h.Wb(35,"translate"),h.Ib(36,"br"),h.oc(37),h.Wb(38,"translate"),h.Mb(39,"img",22),h.Tb("mouseover",function(){return t.showLabelTooltip=!0})("mouseout",function(){return t.showLabelTooltip=!1}),h.Lb(),h.Lb(),h.Mb(40,"div",23),h.Mb(41,"button",24),h.Tb("click",function(){return t.importLabelFile()}),h.oc(42),h.Wb(43,"translate"),h.Lb(),h.Lb(),h.Lb(),h.mc(44,le,7,6,"span",25),h.Mb(45,"div",26),h.Ib(46,"label",27,28),h.Lb(),h.Ib(48,"div",29),h.Mb(49,"div",30),h.Mb(50,"button",31),h.Tb("click",function(){return t.onSubmit(!0)}),h.oc(51),h.Wb(52,"translate"),h.Lb(),h.Lb(),h.Lb(),h.Lb(),h.Lb(),h.Mb(53,"modal",5),h.Wb(54,"translate"),h.Mb(55,"form",6),h.Mb(56,"div",7),h.Mb(57,"div",8),h.Mb(58,"label",32),h.oc(59),h.Wb(60,"translate"),h.Lb(),h.Mb(61,"input",33,34),h.Tb("input",function(e){return t.onChangeRename(e.target.value)}),h.Lb(),h.Lb(),h.mc(63,pe,4,2,"ng-container",35),h.Ib(64,"div",29),h.Mb(65,"div",30),h.Mb(66,"button",36),h.Tb("click",function(){return t.onSubmitRename()}),h.oc(67),h.Wb(68,"translate"),h.Lb(),h.Lb(),h.Lb(),h.Lb(),h.Lb(),h.Mb(69,"modal",5),h.Wb(70,"translate"),h.Ib(71,"br"),h.Mb(72,"form",6),h.Mb(73,"div",7),h.Mb(74,"div",20),h.Mb(75,"label",37),h.oc(76),h.Wb(77,"translate"),h.Lb(),h.Mb(78,"div",38),h.Ib(79,"img",39),h.Mb(80,"span",40),h.Mb(81,"p"),h.oc(82),h.Wb(83,"translate"),h.Lb(),h.Mb(84,"p"),h.oc(85),h.Wb(86,"translate"),h.Lb(),h.Lb(),h.Lb(),h.Mb(87,"label",41),h.oc(88),h.Wb(89,"translate"),h.Mb(90,"button",42),h.Tb("click",function(){return t.onSelectImportProjectJson()}),h.oc(91),h.Lb(),h.Lb(),h.Ib(92,"label",27,43),h.Lb(),h.mc(94,me,6,5,"ng-container",35),h.Ib(95,"div",44),h.Ib(96,"div",29),h.Lb(),h.Lb(),h.Lb(),h.Mb(97,"modal",5),h.Wb(98,"translate"),h.Mb(99,"div",45),h.Mb(100,"div",46),h.Mb(101,"p",47),h.oc(102),h.Wb(103,"translate"),h.Mb(104,"b",48),h.oc(105),h.Wb(106,"translate"),h.Lb(),h.oc(107,"! "),h.Lb(),h.Lb(),h.Lb(),h.Lb(),h.Mb(108,"modal",5),h.Wb(109,"translate"),h.Mb(110,"div",45),h.Mb(111,"div",46),h.Mb(112,"p",47),h.oc(113),h.Wb(114,"translate"),h.Mb(115,"b",48),h.oc(116),h.Wb(117,"translate"),h.Lb(),h.oc(118,"! "),h.Lb(),h.Lb(),h.Lb(),h.Lb(),h.Ib(119,"unsupported-image-modal",49),h.Ib(120,"spinner",50)),2&e){var n,o=h.fc(19),a=null;h.ac("ngIf",t.isOverlayOn),h.xb(1),h.ac("_onChange",t.onChangeSchema),h.xb(5),h.ac("_jsonSchema",t.projectList),h.xb(1),h.ac("id",t.modalIdCreateProject)("modalBodyStyle",t.createProjectModalBodyStyle)("modalTitle",h.Xb(8,59,"createNewProject"))("scrollable",!1),h.xb(2),h.ac("formGroup",t.form),h.xb(4),h.qc("",h.Xb(14,61,"newProjectName")," "),h.xb(2),h.ac("value",t.inputProjectName),h.xb(2),h.ac("ngIf",(null==(a=t.form.get("projectName"))?null:a.touched)&&(null==(a=t.form.get("projectName"))?null:a.invalid))("ngIfElse",o),h.xb(6),h.pc(h.Xb(24,63,"projectFolder")),h.xb(3),h.qc(" ",h.Xb(27,65,"chooseFolder")," "),h.xb(8),h.qc(" ",h.Xb(35,67,"labelListFile"),""),h.xb(3),h.qc(" ",h.Xb(38,69,"optional"),": "),h.xb(5),h.qc(" ",h.Xb(43,71,"chooseFile")," "),h.xb(2),h.ac("ngIf",t.showLabelTooltip),h.xb(6),h.ac("ngClass",t.isCreateFormIncomplete()?"disabled-create-btn":null)("disabled",t.isCreateFormIncomplete()),h.xb(1),h.qc(" ",h.Xb(52,73,"createButton")," "),h.xb(2),h.ac("id",t.modalIdRenameProject)("modalBodyStyle",t.renameProjectModalBodyStyle)("modalTitle",h.Xb(54,75,"renameProject"))("scrollable",!1),h.xb(2),h.ac("formGroup",t.renameForm),h.xb(4),h.qc("",h.Xb(60,77,"newProjectName")," "),h.xb(2),h.ac("value",t.inputProjectName),h.xb(2),h.ac("ngIf",null==(n=t.renameForm.get("newProjectName"))?null:n.touched),h.xb(4),h.qc(" ",h.Xb(68,79,"updateButton")," "),h.xb(2),h.ac("id",t.modalIdImportProject)("modalBodyStyle",t.importProjectModalBodyStyle)("modalTitle",h.Xb(70,81,"menuName.importProject"))("scrollable",!1),h.xb(3),h.ac("formGroup",t.form),h.xb(4),h.qc("",h.Xb(77,83,"importJson")," "),h.xb(6),h.pc(h.Xb(83,85,"configFileInfoDest1")),h.xb(3),h.pc(h.Xb(86,87,"configFileInfoDest2")),h.xb(3),h.qc(" ",h.Xb(89,89,"chooseFile")," "),h.xb(3),h.qc(" ","Import"," "),h.xb(3),h.ac("ngIf",t.modalSpanMessage.trim()),h.xb(3),h.ac("id",t.modalIdRenameSuccess)("modalBodyStyle",t.renameSuccessBodyStyle)("modalTitle",h.Xb(98,91,"renameProject"))("scrollable",!1),h.xb(5),h.rc(" ",t.projectName," ",h.Xb(103,93,"renameMsg")," "),h.xb(3),h.pc(h.Xb(106,95,"success")),h.xb(3),h.ac("id",t.modalIdDeleteProject)("modalBodyStyle",t.deleteProjectBodyStyle)("modalTitle",h.Xb(109,97,"deleteProject"))("scrollable",!1),h.xb(5),h.rc(" ",t.projectName," ",h.Xb(114,99,"deleteMsg")," "),h.xb(3),h.pc(h.Xb(117,101,"success")),h.xb(3),h.ac("_modalUnsupportedImage",t.modalUnsupportedImage)("_unsupportedImageBodyStyle",t.unsupportedImageBodyStyle)("_unsupportedImageList",t.unsupportedImageList),h.xb(1),h.ac("_loading",t.isLoading)}},directives:[i.k,P.a,S,N,A,K.a,f.n,f.g,f.d,f.a,f.f,f.c,i.i,Y.a,G.a],pipes:[y.c],styles:[".upper-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;margin-top:5vh}.model[_ngcontent-%COMP%]{z-index:1000;padding-top:10vh;top:0;width:100%;height:100%;overflow:auto;background-color:transparent;scrollbar-width:none;position:fixed;background:rgba(0,0,0,.7)}.model-content[_ngcontent-%COMP%]{background-color:#525353;padding:1vw;border:solid;max-width:30vw;min-width:30vw;border-radius:1vw;margin:15vh auto auto}.content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.content-header[_ngcontent-%COMP%]{color:#fff;font-size:3vh}.new-project-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;margin:3vh 0 0;-webkit-align-items:baseline;align-items:baseline}.label[_ngcontent-%COMP%]{margin-right:1vw}.label[_ngcontent-%COMP%], .label-config[_ngcontent-%COMP%]{color:#fff;font-size:2vh}.label-config[_ngcontent-%COMP%]{padding-top:.5vh}.input-style[_ngcontent-%COMP%]{border-radius:2vw;border:none;outline:none;background-color:#363636;min-width:11vw;max-width:12vw;min-height:4vh;max-height:4vh;font-size:2vh;color:#fff;padding:0 1vw}.validation[_ngcontent-%COMP%]{margin-left:11vw}.validation[_ngcontent-%COMP%], .validation-rename[_ngcontent-%COMP%]{color:red;margin-top:1.02vh;margin-bottom:.25vh}.validation-rename[_ngcontent-%COMP%]{margin-left:7.5vw}.validation-error[_ngcontent-%COMP%]{margin:1px;color:red}.validation-success[_ngcontent-%COMP%]{margin:1px;color:green}.error-create-msg[_ngcontent-%COMP%], .error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.error-create-msg[_ngcontent-%COMP%]{padding-left:1vw}.select-file-container[_ngcontent-%COMP%], .select-folder-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;margin:0}.empty-container[_ngcontent-%COMP%], .file-name-container[_ngcontent-%COMP%], .folder-name-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;margin:1.5vh 0 0 12vw;min-height:2vh}.filename[_ngcontent-%COMP%], .foldername[_ngcontent-%COMP%]{font-size:1.8vh;color:#fff;overflow:hidden;text-overflow:ellipsis}.input[_ngcontent-%COMP%]{color:#7fffd4}.horizontal-line[_ngcontent-%COMP%]{background-color:#fff;min-height:.3vh;max-height:.3vh;margin:2vh auto}.model-button-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;padding:.5vw}.button-file-style[_ngcontent-%COMP%], .button-style[_ngcontent-%COMP%]{padding:1vh 1.5vw;border-radius:1vh;border:none;outline:none;color:#fff;cursor:pointer;font-size:2vh}.button-file-style[_ngcontent-%COMP%]{max-height:4vh}.choose-file-button[_ngcontent-%COMP%], .choose-folder-button[_ngcontent-%COMP%]{background-color:#444}.create-btn[_ngcontent-%COMP%]{background-color:#2d8ceb}.disabled-create-btn[_ngcontent-%COMP%]{cursor:not-allowed;background-color:#444!important;color:#777!important}.cancel-btn[_ngcontent-%COMP%]{background-color:#444;margin-right:.7vw}.choose-file-btn[_ngcontent-%COMP%]{font-size:2vh;text-decoration:none;background-color:#444;color:#fff;padding:.5vh 1vw;border:none;border-radius:1vh;margin-right:1vw;cursor:pointer}.label-name[_ngcontent-%COMP%]{width:9.5vw;padding-top:.2vh;padding-right:1vw}.help-icon-container[_ngcontent-%COMP%]{padding-right:1vw;padding-left:.2vw}.help-icon[_ngcontent-%COMP%]{height:3vh}.label-file[_ngcontent-%COMP%]{padding-top:1vh;padding-right:.2vw}.label-select-folder[_ngcontent-%COMP%]{padding-top:.7vh;padding-right:1vw;width:9.5vw}.label-select-label[_ngcontent-%COMP%]{color:#fff;font-size:2vh;padding-top:0;width:11.5vw}.label-select-file[_ngcontent-%COMP%]{padding-top:.5vh;width:9.5vw}.input-id[_ngcontent-%COMP%]{font-size:2vh;display:none}.overlay[_ngcontent-%COMP%]{z-index:3000;position:absolute;background-color:rgba(0,0,0,.9);width:99.9vw;height:99.7vh;cursor:not-allowed}.tooltip[_ngcontent-%COMP%]{position:relative;display:inline-block;border-bottom:1px dotted #000;font-size:15px;text-decoration:underline;margin-top:1vh}.tooltiptitle[_ngcontent-%COMP%]{opacity:.3}.help-icon-container[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:10vw;min-width:200px;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:60%;margin-left:-60px;text-align:justify;text-justify:inter-word}.help-icon-container[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible}.labeltooltiptext[_ngcontent-%COMP%]{width:13vw;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:67%;left:30%;margin-left:-60px;text-align:justify;text-justify:inter-word}.display-message-container[_ngcontent-%COMP%]{padding-left:1.2vw}.display-msg[_ngcontent-%COMP%]{font-size:2vh;color:#fff}.modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}"]}),ue)}],ve=((ge=function t(){e(this,t)}).\u0275mod=h.Fb({type:ge}),ge.\u0275inj=h.Eb({factory:function(e){return new(e||ge)},imports:[[v.d.forChild(he)]]}),ge),we=a("KZX/"),je=((fe=function t(){e(this,t)}).\u0275mod=h.Fb({type:fe}),fe.\u0275inj=h.Eb({factory:function(e){return new(e||fe)},imports:[[i.b,we.a,ve]]}),fe)}}])}(); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/7-es5.eb227bb50af9a504487e.js b/classifai-core/src/main/resources/webroot/7-es5.eb227bb50af9a504487e.js new file mode 100644 index 000000000..fb0539dd7 --- /dev/null +++ b/classifai-core/src/main/resources/webroot/7-es5.eb227bb50af9a504487e.js @@ -0,0 +1 @@ +!function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n0)("ngIfElse",n)}}var $,A=(($=function(){function t(n){var o=this;e(this,t),this._cd=n,this._onClick=new f.n,this._onStarred=new f.n,this._onDelete=new f.n,this._onRename=new f.n,this.starredActiveIcon="../../../assets/icons/starred_active.svg",this.starredInactiveIcon="../../../assets/icons/starred.svg",this.cardSchema={clickIndex:-1},this.previousProjectLength=0,this.conditionalDisableProject=function(e){return e.is_loaded?"disabled":"enabled"},this.conditionalDisableClickEvent=function(e){return e},this.onOpenProject=function(e,t){var n=t.project_name;!o.isExactIndex(e)&&o._onClick.emit(n)},this.onDisplayMore=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.cardSchema.clickIndex,t=o.cardSchema.clickIndex;o.cardSchema={clickIndex:t===e?-1:e}},this.onCloseDisplay=function(){o.cardSchema.clickIndex=-1},this.onStarred=function(e,t){var n=e.project_name;o._jsonSchema.projects=o._jsonSchema.projects.map(function(e){return e.project_name===n?(e.is_starred=t,e):e}),o._onStarred.emit({projectName:n,starred:t})},this.isExactIndex=function(e){return e===o.cardSchema.clickIndex},this.onDblClickStopPropagate=function(e){return e.stopPropagation()}}return n(t,[{key:"ngOnInit",value:function(){}},{key:"onRenameProject",value:function(e){this._onRename.emit({shown:!0,projectName:e}),this.onCloseDisplay()}},{key:"onDeleteProject",value:function(e){this._onDelete.emit(e),this.onCloseDisplay()}},{key:"ngOnChanges",value:function(e){!e._jsonSchema.currentValue.isUploading&&this.onDisplayMore(),this._jsonSchema.projects.length!==this.previousProjectLength&&(this.cardSchema.clickIndex=-1),this.previousProjectLength=this._jsonSchema.projects.length}}]),t}()).\u0275fac=function(e){return new(e||$)(f.Hb(f.h))},$.\u0275cmp=f.Bb({type:$,selectors:[["data-set-card"]],inputs:{_jsonSchema:"_jsonSchema"},outputs:{_onClick:"_onClick",_onStarred:"_onStarred",_onDelete:"_onDelete",_onRename:"_onRename"},features:[f.vb],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["showCardBody",""],[1,"card-layout-container","scroll","fade-in"],[1,"no-project-card-container"],[1,"no-project-title-padding"],[1,"no-project-title"],[1,"no-project-subtitle"],["noProject",""],[4,"ngFor","ngForOf"],[1,"card-container",3,"ngClass","dblclick"],[1,"card-header-style"],["newLabel",""],[1,"card-icon-container"],[3,"click","dblclick"],[1,"card-icon-style",3,"src"],["src","../../../assets/icons/more.svg",1,"card-icon-style","enabled"],[4,"ngIf"],[1,"card-title-style"],[3,"title","ngClass"],[1,"card-title-txt"],[1,"project-name-style"],[1,"project-info"],[1,"project-path-style"],[1,"project-path"],[1,"project-status-uploading",3,"ngClass"],[3,"ngSwitch"],[1,"project-status-new",3,"ngClass"],[1,"project-status-available",3,"ngClass"],[1,"project-status-opened",3,"ngClass"],[1,"project-status-invalid",3,"ngClass"],[1,"popup-container","enabled"],[1,"popup-label",3,"click"]],template:function(e,t){if(1&e&&(f.mc(0,F,11,6,"ng-container",0),f.mc(1,H,3,2,"ng-template",null,1,f.nc)),2&e){var n=f.fc(2);f.ac("ngIf",t._jsonSchema.isFetching)("ngIfElse",n)}},directives:[i.k,i.j,i.i,i.m],pipes:[y.c],styles:['@keyframes fade-in{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}.fade-in[_ngcontent-%COMP%]{animation:fadeIn 1.5s ease;-webkit-animation:fadeIn 1.5s ease;-moz-animation:fadeIn ease 1.5s;-o-animation:fadeIn ease 1.5s;-ms-animation:fadeIn ease 1.5s}.card-layout-container[_ngcontent-%COMP%]{width:80vw;display:flex;flex-wrap:wrap;padding:0 0 0 1vw;overflow-y:scroll;position:relative;height:80vh}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px;background-color:#000}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:.5vw}.scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.card-container[_ngcontent-%COMP%]{min-width:11vw;max-width:11vw;min-height:30vh;max-height:30vh;border-style:solid;font-size:2.2vh;background:#2e2d2d;position:relative}.card-container[_ngcontent-%COMP%]:hover{background:#404040}.card-container[_ngcontent-%COMP%]:before{content:"";display:block;height:100%;position:absolute;top:0;left:0;width:.3vw;background-color:#363636}.enabled[_ngcontent-%COMP%]{cursor:pointer}.disabled[_ngcontent-%COMP%]{cursor:not-allowed}.project-status-new[_ngcontent-%COMP%]{background-color:#f59221}.project-status-available[_ngcontent-%COMP%], .project-status-new[_ngcontent-%COMP%]{color:#f5f5f5;font-size:60%;padding:.3vh 1.5vw .6vh 1vw}.project-status-available[_ngcontent-%COMP%]{background-color:#92c91b}.project-status-opened[_ngcontent-%COMP%]{background-color:#258fc0}.project-status-invalid[_ngcontent-%COMP%], .project-status-opened[_ngcontent-%COMP%]{color:#f5f5f5;font-size:60%;padding:.3vh 1.5vw .6vh 1vw}.project-status-invalid[_ngcontent-%COMP%]{background-color:#de1c44}.card-icon-container[_ngcontent-%COMP%]{display:flex}.card-icon-style[_ngcontent-%COMP%]{min-width:1.5vw;max-width:1.5vw;min-height:3vh;max-height:3vh}.card-icon-style[_ngcontent-%COMP%]:hover{border-radius:5vh;background-color:#393838}.card-header-style[_ngcontent-%COMP%]{margin-top:1vh;display:flex;flex-direction:row;justify-content:space-between;position:relative}.card-title-style[_ngcontent-%COMP%]{margin-left:1vw}.card-title-txt[_ngcontent-%COMP%]{color:#656667;font-size:1.3vh;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-name-style[_ngcontent-%COMP%], .project-path-style[_ngcontent-%COMP%]{margin-left:1vw;padding:1vh 0 0}.project-path-style[_ngcontent-%COMP%]{width:90%;position:absolute;bottom:1vh}.project-info[_ngcontent-%COMP%]{color:#dbdbda;font-size:2vh;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-path[_ngcontent-%COMP%]{word-wrap:break-word;font-size:1.2vh;color:#737475;position:relative}.tag-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;border-radius:10vw;background:#363636;width:4.5vw;padding:.2vw .3vh;cursor:pointer;outline:none;border:none;margin:.8vh 0 0 1vw}.tag-img[_ngcontent-%COMP%]{min-height:2vh;max-height:2vh;min-width:1vw;max-width:1vw;margin-left:.35vw}.tag-txt[_ngcontent-%COMP%]{font-size:1.2vh;color:#fff;padding:.2vh 0 0 .3vw;cursor:pointer}.popup-container[_ngcontent-%COMP%]{overflow:hidden;position:absolute;margin:4vh 0 0 -10vw;padding:.5vw;border-radius:.2vw;box-shadow:0 2px 5px 0 rgba(var(--shadow-rgb),.26),0 2px 10px 0 rgba(var(--shadow-rgb),.16);transform-origin:left top;transform:scale(1);opacity:1;white-space:nowrap;background:#fff;font-size:1.5vh;-webkit-animation:appear .35s ease-in 1;animation:appear .35s ease-in 1}@-webkit-keyframes appear{0%{opacity:0;transform:translateY(-10px)}}@keyframes appear{0%{opacity:0;transform:translateY(-10px)}}.popup-label[_ngcontent-%COMP%]{font-size:2vh;padding:.5vw}.popup-label[_ngcontent-%COMP%]:hover{background:#e9e9e9}.no-project-title[_ngcontent-%COMP%]{font-size:4vh;color:#fff;white-space:nowrap}.no-project-title-padding[_ngcontent-%COMP%]{padding:2vw}.no-project-subtitle[_ngcontent-%COMP%]{font-size:2vh;color:#bebebe;white-space:nowrap}.no-project-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:#1f1f1f;width:100%}']}),$),K=a("44N4"),G=a("OObL"),Y=a("TJKd"),Z=["refProjectName"],Q=["projectfoldername"],ee=["labeltextfilename"],te=["refNewProjectName"],ne=["jsonImportProjectFile"],oe=["jsonImportProjectFilename"];function ae(e,t){if(1&e&&(f.Mb(0,"div",51),f.Mb(1,"p",52),f.oc(2),f.Lb(),f.Lb()),2&e){var n=f.Vb();f.xb(2),f.qc(" ",n.isImageUploading?"Uploading the Images. Please Wait...":"Selection Window is Opened"," ")}}function ie(e,t){1&e&&(f.Mb(0,"span"),f.Mb(1,"small",54),f.oc(2),f.Wb(3,"translate"),f.Lb(),f.Lb()),2&e&&(f.xb(2),f.qc(" ",f.Xb(3,1,"projectNameExist")," "))}function re(e,t){1&e&&(f.Mb(0,"span"),f.Mb(1,"small",54),f.oc(2),f.Wb(3,"translate"),f.Lb(),f.Lb()),2&e&&(f.xb(2),f.qc(" ",f.Xb(3,1,"projectNameRequired")," "))}function ce(e,t){if(1&e&&(f.Kb(0),f.Mb(1,"div",53),f.mc(2,ie,4,3,"span",35),f.mc(3,re,4,3,"span",35),f.Lb(),f.Jb()),2&e){var n=f.Vb(),o=null,a=null;f.xb(2),f.ac("ngIf",null==(o=n.form.get("projectName"))?null:o.getError("exist")),f.xb(1),f.ac("ngIf",null==(a=n.form.get("projectName"))?null:a.getError("required"))}}function se(e,t){1&e&&f.Ib(0,"div",55)}function le(e,t){1&e&&(f.Mb(0,"span",56),f.Mb(1,"p"),f.oc(2),f.Wb(3,"translate"),f.Lb(),f.Mb(4,"p"),f.oc(5),f.Wb(6,"translate"),f.Lb(),f.Lb()),2&e&&(f.xb(2),f.pc(f.Xb(3,2,"labelFileDest1")),f.xb(3),f.pc(f.Xb(6,4,"labelFileDest2")))}function be(e,t){1&e&&(f.Mb(0,"span"),f.Mb(1,"small",58),f.oc(2),f.Wb(3,"translate"),f.Lb(),f.Lb()),2&e&&(f.xb(2),f.qc(" ",f.Xb(3,1,"projectNameExist")," "))}function de(e,t){1&e&&(f.Mb(0,"span"),f.Mb(1,"small",58),f.oc(2),f.Wb(3,"translate"),f.Lb(),f.Lb()),2&e&&(f.xb(2),f.qc(" ",f.Xb(3,1,"projectNameRequired")," "))}function pe(e,t){if(1&e&&(f.Kb(0),f.Mb(1,"div",57),f.mc(2,be,4,3,"span",35),f.mc(3,de,4,3,"span",35),f.Lb(),f.Jb()),2&e){var n=f.Vb(),o=null,a=null;f.xb(2),f.ac("ngIf",null==(o=n.renameForm.get("newProjectName"))?null:o.getError("exist")),f.xb(1),f.ac("ngIf",null==(a=n.renameForm.get("newProjectName"))?null:a.getError("required"))}}function me(e,t){if(1&e&&(f.Kb(0),f.Mb(1,"div",59),f.Mb(2,"span"),f.Mb(3,"small",58),f.oc(4),f.Wb(5,"translate"),f.Lb(),f.Lb(),f.Lb(),f.Jb()),2&e){var n=f.Vb();f.xb(1),f.ac("ngClass",n.spanClass),f.xb(3),f.rc("",f.Xb(5,3,n.modalSpanMessage),"",n.modalImportProjectName,"")}}var ue,ge,he,fe=[{path:"",component:(ue=function(){function t(n,o,a,i,f,v,j){var _=this;e(this,t),this._fb=n,this._router=o,this._dataSetService=a,this._spinnerService=i,this._imgLblModeService=f,this._languageService=v,this._modalService=j,this.onChangeSchema={currentThumbnailIndex:-1,thumbnailName:"",totalNumThumbnail:0,status:void 0},this.projectList={projects:[],isUploading:!1,isFetching:!1},this.inputProjectName="",this.newInputProjectName="",this.selectedProjectName="",this.oldProjectName="",this.subject$=new m.a,this.thumbnailList=[],this.labelList=[],this.unsubscribe$=new m.a,this.isLoading=!1,this.isOverlayOn=!1,this.isImageUploading=!1,this.isProjectLoading=!1,this.isDeleteSuccess=!1,this.projectName="",this.imgLblMode=null,this.modalSpanMessage="",this.modalImportProjectName="",this.spanClass="",this.labelPath="",this.projectFolderPath="",this.showLabelTooltip=!1,this.unsupportedImageList=[],this.modalIdCreateProject="modal-create-project",this.modalIdRenameProject="modal-rename-project",this.modalIdImportProject="modal-import-project",this.modalIdDeleteProject="modal-delete-project",this.modalIdRenameSuccess="modal-rename-success",this.modalUnsupportedImage="modal-unsupported-image",this.createProjectModalBodyStyle={minHeight:"45vh",minWidth:"31vw",maxWidth:"31vw",margin:"12vw 71vh",overflow:"none"},this.renameProjectModalBodyStyle={minHeight:"23vh",maxHeight:"25vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.importProjectModalBodyStyle={minHeight:"15vh",maxHeight:"25vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.deleteProjectBodyStyle={minHeight:"11vh",maxHeight:"11vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.renameSuccessBodyStyle={minHeight:"11vh",maxHeight:"11vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.unsupportedImageBodyStyle={minHeight:"18vh",maxHeight:"30vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.showProjectList=function(){_.projectList.isFetching=!0,_._dataSetService.getProjectList().pipe(Object(c.a)()).subscribe(function(e){var t=e.content;if(t){var n=Object(r.a)(t).map(function(e){return Object.assign(Object.assign({},e),{created_date:_.formatDate(e.created_date)})});_.projectList=Object.assign(Object.assign({},_.projectList),{projects:n,isFetching:!1})}})},this.formatDate=function(e){var t=new Date(e),n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"].find(function(e,n){return n===t.getMonth()||void 0});return n?"".concat(n,"-").concat(t.getDate(),"-").concat(t.getFullYear()):"Error"},this.createFormControls=function(){_.form=_._fb.group({projectName:["",h.l.required]})},this.renameFormControls=function(){_.renameForm=_._fb.group({newProjectName:["",h.l.required]})},this.onChange=function(e){_.inputProjectName=e},this.onChangeRename=function(e){_.newInputProjectName=e},this.toggleModalDisplay=function(e){_._projectFoldername.nativeElement.innerHTML="",_._labelTextFilename.nativeElement.innerHTML="",e&&_.form.reset(),e?_._modalService.open(_.modalIdCreateProject):_._modalService.close(_.modalIdCreateProject)},this.toggleRenameModalDisplay=function(e){if(e){var t=e.shown,n=e.projectName;t?(_.renameForm.reset(),_._modalService.open(_.modalIdRenameProject)):_._modalService.close(_.modalIdRenameProject),_.oldProjectName=n}else _._modalService.close(_.modalIdRenameProject)},this.toggleImportProjectModalDisplay=function(e){_.modalSpanMessage="",e?_._modalService.open(_.modalIdImportProject):_._modalService.close(_.modalIdImportProject)},this.onSelectImportProjectJson=function(){_.toggleImportProjectModalDisplay(!0);var e=_._dataSetService.importStatus();_._dataSetService.importProject().pipe(Object(c.a)(),Object(s.a)(function(e){return e.message})).subscribe(function(t){var n=!1;Object(u.a)(500).pipe(Object(l.a)(function(){return e}),Object(c.a)(function(e){return _.isOverlayOn=1===e.file_system_status||2===e.file_system_status,0!==e.file_system_status&&3!==e.file_system_status&&5!==e.file_system_status||(n=!0),n})).subscribe(function(e){_.modalSpanMessage="DATABASE_UPDATED"===e.file_system_message?"importSuccess":"importAborted",_.modalImportProjectName="DATABASE_UPDATED"===e.file_system_message&&e.project_name?e.project_name:"",_.processIsSuccess(5!==e.file_system_status),_.showProjectList()})})},this.processIsSuccess=function(e){_.spanClass=e?"validation-success":"validation-error"},this.importProject=function(){_.toggleImportProjectModalDisplay(!0)},this.onStarred=function(e){var t=e.projectName,n=e.starred;_._dataSetService.updateProjectStatus(t,n,"star").pipe(Object(c.a)()).subscribe(function(e){var t=e.message;return console.log(t)},function(e){return _.projectList={isUploading:_.projectList.isUploading,isFetching:_.projectList.isFetching,projects:_.projectList.projects.map(function(e){return e.project_name===t?Object.assign(Object.assign({},e),{is_starred:!1}):e})}})},this.onSubmit=function(e,t){var n,o,a;_.form.markAllAsTouched(),e?_.inputProjectName?_.projectList.projects&&_.projectList.projects.find(function(e){return e&&e.project_name===_.inputProjectName})?(null===(n=_.form.get("projectName"))||void 0===n||n.setErrors({exist:!0}),_._refProjectName.nativeElement.focus()):(_.createProject(_.inputProjectName),_.selectedProjectName=null===(o=_.form.get("projectName"))||void 0===o?void 0:o.value):(null===(a=_.form.get("projectName"))||void 0===a||a.setErrors({required:!0}),_._refProjectName.nativeElement.focus()):t&&_.startProject(t)},this.onOpenImportProject=function(e,t){console.log("BUTTON IMPORT CLICKED")},this.startProject=function(e){_._router.navigate(["imglabel/"+_.imgLblMode],{state:{projectName:e}})},this.createProject=function(e){var t=_._dataSetService.createNewProject(e,_.labelPath,_.projectFolderPath),n=_._dataSetService.localUploadStatus(e),o=0;_.projectList=Object.assign(Object.assign({},_.projectList),{isUploading:!0}),_.subjectSubscription=_.subject$.pipe(Object(c.a)(),Object(b.a)(function(){return t}),Object(b.a)(function(e){return 1===e.message?Object(u.a)(500).pipe(Object(b.a)(function(){return n}),Object(c.a)(function(e){var t=e.file_system_status,n=e.unsupported_image_list;return _.unsupportedImageList=n,_.isOverlayOn=1===t||2===t,_.isImageUploading=2===t,3===t})):Object(g.a)(function(e){return console.error(e),_.projectList=Object.assign(Object.assign({},_.projectList),{isUploading:!1}),e})})).subscribe(function(e){3===e.file_system_status&&_.toggleModalDisplay(!1),_.isProjectLoading=!0,(o=e?--o:o)<1&&(_.projectList=Object.assign(Object.assign({},_.projectList),{isUploading:!1}))},function(e){},function(){_.isProjectLoading=!1,_.showProjectList(),_.unsupportedImageList.length>0&&_._dataSetService.downloadUnsupportedImageList(e,_.unsupportedImageList).then(function(e){e&&_._modalService.open(_.modalUnsupportedImage)})}),_.subject$.next()},this.renameProject=function(e,t){_._dataSetService.renameProject(e,t).pipe(Object(c.a)(),Object(s.a)(function(e){return e.message})).subscribe(function(t){1===t&&(_._languageService._translate.get("renameSuccess").subscribe(function(t){_.projectName=e,_.modalSpanMessage=t,_._modalService.open(_.modalIdRenameSuccess)}),_.showProjectList(),_.toggleRenameModalDisplay())})},this.deleteProject=function(e){_._dataSetService.deleteProject(e).pipe(Object(c.a)(),Object(s.a)(function(e){return e.message})).subscribe(function(t){1===t&&(_._languageService._translate.get("deleteSuccess").subscribe(function(t){_.isDeleteSuccess=!0,_.projectName=e,_._modalService.open(_.modalIdDeleteProject)}),_.showProjectList())})},this.keyDownEvent=function(e){"Escape"===e.key&&_.toggleRenameModalDisplay()&&_.toggleModalDisplay(!1)},this._imgLblModeService.imgLabelMode$.pipe(Object(d.a)()).subscribe(function(e){return _.imgLblMode=e}),this._spinnerService.returnAsObservable().pipe(Object(p.a)(this.unsubscribe$)).subscribe(function(e){return _.isLoading=e}),this.createFormControls(),this.renameFormControls(),this._languageService.initializeLanguage("data-set-page",["data-set-page-en","data-set-page-cn","data-set-page-ms"])}return n(t,[{key:"ngOnInit",value:function(){this.showProjectList()}},{key:"onSubmitRename",value:function(){var e,t,n,o=this;this.renameForm.markAllAsTouched(),this.newInputProjectName?this.projectList.projects&&this.projectList.projects.find(function(e){return e?e.project_name===o.newInputProjectName:null})?(null===(e=this.renameForm.get("newProjectName"))||void 0===e||e.setErrors({exist:!0}),this._refProjectName.nativeElement.focus()):(this.renameProject(this.oldProjectName,this.newInputProjectName),this.selectedProjectName=null===(t=this.renameForm.get("newProjectName"))||void 0===t?void 0:t.value):(null===(n=this.renameForm.get("newProjectName"))||void 0===n||n.setErrors({required:!0}),this._refProjectName.nativeElement.focus())}},{key:"isCreateFormIncomplete",value:function(){return""===this.inputProjectName||""===this.projectFolderPath}},{key:"selectProjectFolder",value:function(){var e=this,t=this._dataSetService.importProjectFolderStatus();this._dataSetService.importProjectFolder().pipe(Object(c.a)(),Object(s.a)(function(e){return e.message})).subscribe(function(n){var o=!1;Object(u.a)(500).pipe(Object(l.a)(function(){return t}),Object(c.a)(function(t){return e.isOverlayOn=0===t.window_status,1===t.window_status&&""!==t.project_path&&(e._projectFoldername.nativeElement.innerHTML=t.project_path.replace(/^.*[\\\/]/,""),e.projectFolderPath=t.project_path),1===t.window_status&&(o=!0),o})).subscribe(function(t){e.showProjectList()})})}},{key:"importLabelFile",value:function(){var e=this,t=this._dataSetService.importLabelFileStatus();this._dataSetService.importLabelFile().pipe(Object(c.a)(),Object(s.a)(function(e){return e.message})).subscribe(function(n){var o=!1;Object(u.a)(500).pipe(Object(l.a)(function(){return t}),Object(c.a)(function(t){return e.isOverlayOn=0===t.window_status,1===t.window_status&&""!==t.label_file_path&&(e._labelTextFilename.nativeElement.innerHTML=t.label_file_path.replace(/^.*[\\\/]/,""),e.labelPath=t.label_file_path),1===t.window_status&&(o=!0),o})).subscribe(function(t){e.showProjectList()})})}},{key:"onWindowClose",value:function(e){e.preventDefault(),this.isProjectLoading&&(e.returnValue="Are you sure you want to leave this page?")}},{key:"ngOnDestroy",value:function(){this.unsubscribe$.next(),this.unsubscribe$.complete()}}]),t}(),ue.\u0275fac=function(e){return new(e||ue)(f.Hb(h.b),f.Hb(v.a),f.Hb(j.a),f.Hb(_.a),f.Hb(w.a),f.Hb(M.a),f.Hb(P.a))},ue.\u0275cmp=f.Bb({type:ue,selectors:[["data-set-layout"]],viewQuery:function(e,t){var n;1&e&&(f.tc(Z,!0),f.tc(Q,!0),f.tc(ee,!0),f.tc(te,!0),f.tc(ne,!0),f.tc(oe,!0)),2&e&&(f.ec(n=f.Ub())&&(t._refProjectName=n.first),f.ec(n=f.Ub())&&(t._projectFoldername=n.first),f.ec(n=f.Ub())&&(t._labelTextFilename=n.first),f.ec(n=f.Ub())&&(t._refNewProjectName=n.first),f.ec(n=f.Ub())&&(t._jsonImportProjectFile=n.first),f.ec(n=f.Ub())&&(t._jsonImportProjectFilename=n.first))},hostBindings:function(e,t){1&e&&f.Tb("keydown",function(e){return t.keyDownEvent(e)},!1,f.gc)("beforeunload",function(e){return t.onWindowClose(e)},!1,f.gc)},decls:121,vars:103,consts:[["class","overlay",4,"ngIf"],[3,"_onChange"],[1,"upper-container"],[3,"_onCreate","_onImport"],[3,"_jsonSchema","_onClick","_onStarred","_onDelete","_onRename"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[3,"formGroup"],[1,"content-container"],[1,"new-project-container"],[1,"label","label-name"],["type","text","placeholder","Enter project name","formControlName","projectName",1,"input-style",3,"value","input"],["refProjectName",""],[4,"ngIf","ngIfElse"],["emptycontainer",""],[1,"select-folder-container"],[1,"label","label-select-folder"],["type","button",1,"button-style","choose-folder-button",3,"click"],[1,"folder-name-container"],[1,"foldername"],["projectfoldername",""],[1,"select-file-container"],[1,"label-select-label"],["src","../../assets/icons/help.svg",1,"help-icon",3,"mouseover","mouseout"],[2,"padding-top","1vh"],["type","button",1,"button-file-style","choose-file-button",3,"click"],["class","labeltooltiptext",4,"ngIf"],[1,"file-name-container"],[1,"filename"],["labeltextfilename",""],[1,"horizontal-line"],[1,"model-button-container"],["type","submit",1,"button-style","create-btn",3,"ngClass","disabled","click"],[1,"label"],["type","text","placeholder","Enter new project name","formControlName","newProjectName",1,"input-style",3,"value","input"],["refNewProjectName",""],[4,"ngIf"],["type","submit",1,"button-style","create-btn",3,"click"],[1,"label-config"],[1,"help-icon-container"],["src","../../assets/icons/help.svg",1,"help-icon"],[1,"tooltiptext"],[1,"choose-file-btn"],["type","button",1,"input-id",3,"click"],["jsonImportProjectFilename",""],[2,"padding-bottom","2vh"],[1,"modal-message-container"],[1,"display-message-container"],[1,"display-msg"],[1,"validation-success"],[3,"_modalUnsupportedImage","_unsupportedImageBodyStyle","_unsupportedImageList"],[3,"_loading"],[1,"overlay"],[2,"margin-top","40vh","color","rgb(255, 255, 255, 0.9)","text-align","center","font-size","3vh"],[1,"validation"],[1,"error-create-msg"],[1,"empty-container"],[1,"labeltooltiptext"],[1,"validation-rename"],[1,"error-msg"],[3,"ngClass"]],template:function(e,t){if(1&e&&(f.mc(0,ae,3,1,"div",0),f.Ib(1,"page-header",1),f.Mb(2,"div",2),f.Mb(3,"data-set-side-menu",3),f.Tb("_onCreate",function(e){return t.toggleModalDisplay(e)})("_onImport",function(){return t.importProject()}),f.Lb(),f.Mb(4,"div"),f.Ib(5,"data-set-header"),f.Mb(6,"data-set-card",4),f.Tb("_onClick",function(e){return t.onSubmit(!1,e)})("_onStarred",function(e){return t.onStarred(e)})("_onDelete",function(e){return t.deleteProject(e)})("_onRename",function(e){return t.toggleRenameModalDisplay(e)}),f.Lb(),f.Lb(),f.Lb(),f.Mb(7,"modal",5),f.Wb(8,"translate"),f.Mb(9,"form",6),f.Mb(10,"div",7),f.Mb(11,"div",8),f.Mb(12,"label",9),f.oc(13),f.Wb(14,"translate"),f.Lb(),f.Mb(15,"input",10,11),f.Tb("input",function(e){return t.onChange(e.target.value)}),f.Lb(),f.Lb(),f.mc(17,ce,4,2,"ng-container",12),f.mc(18,se,1,0,"ng-template",null,13,f.nc),f.Ib(20,"br"),f.Mb(21,"div",14),f.Mb(22,"label",15),f.oc(23),f.Wb(24,"translate"),f.Lb(),f.Mb(25,"button",16),f.Tb("click",function(){return t.selectProjectFolder()}),f.oc(26),f.Wb(27,"translate"),f.Lb(),f.Lb(),f.Mb(28,"div",17),f.Ib(29,"label",18,19),f.Lb(),f.Ib(31,"br"),f.Mb(32,"div",20),f.Mb(33,"label",21),f.oc(34),f.Wb(35,"translate"),f.Ib(36,"br"),f.oc(37),f.Wb(38,"translate"),f.Mb(39,"img",22),f.Tb("mouseover",function(){return t.showLabelTooltip=!0})("mouseout",function(){return t.showLabelTooltip=!1}),f.Lb(),f.Lb(),f.Mb(40,"div",23),f.Mb(41,"button",24),f.Tb("click",function(){return t.importLabelFile()}),f.oc(42),f.Wb(43,"translate"),f.Lb(),f.Lb(),f.Lb(),f.mc(44,le,7,6,"span",25),f.Mb(45,"div",26),f.Ib(46,"label",27,28),f.Lb(),f.Ib(48,"div",29),f.Mb(49,"div",30),f.Mb(50,"button",31),f.Tb("click",function(){return t.onSubmit(!0)}),f.oc(51),f.Wb(52,"translate"),f.Lb(),f.Lb(),f.Lb(),f.Lb(),f.Lb(),f.Mb(53,"modal",5),f.Wb(54,"translate"),f.Mb(55,"form",6),f.Mb(56,"div",7),f.Mb(57,"div",8),f.Mb(58,"label",32),f.oc(59),f.Wb(60,"translate"),f.Lb(),f.Mb(61,"input",33,34),f.Tb("input",function(e){return t.onChangeRename(e.target.value)}),f.Lb(),f.Lb(),f.mc(63,pe,4,2,"ng-container",35),f.Ib(64,"div",29),f.Mb(65,"div",30),f.Mb(66,"button",36),f.Tb("click",function(){return t.onSubmitRename()}),f.oc(67),f.Wb(68,"translate"),f.Lb(),f.Lb(),f.Lb(),f.Lb(),f.Lb(),f.Mb(69,"modal",5),f.Wb(70,"translate"),f.Ib(71,"br"),f.Mb(72,"form",6),f.Mb(73,"div",7),f.Mb(74,"div",20),f.Mb(75,"label",37),f.oc(76),f.Wb(77,"translate"),f.Lb(),f.Mb(78,"div",38),f.Ib(79,"img",39),f.Mb(80,"span",40),f.Mb(81,"p"),f.oc(82),f.Wb(83,"translate"),f.Lb(),f.Mb(84,"p"),f.oc(85),f.Wb(86,"translate"),f.Lb(),f.Lb(),f.Lb(),f.Mb(87,"label",41),f.oc(88),f.Wb(89,"translate"),f.Mb(90,"button",42),f.Tb("click",function(){return t.onSelectImportProjectJson()}),f.oc(91),f.Lb(),f.Lb(),f.Ib(92,"label",27,43),f.Lb(),f.mc(94,me,6,5,"ng-container",35),f.Ib(95,"div",44),f.Ib(96,"div",29),f.Lb(),f.Lb(),f.Lb(),f.Mb(97,"modal",5),f.Wb(98,"translate"),f.Mb(99,"div",45),f.Mb(100,"div",46),f.Mb(101,"p",47),f.oc(102),f.Wb(103,"translate"),f.Mb(104,"b",48),f.oc(105),f.Wb(106,"translate"),f.Lb(),f.oc(107,"! "),f.Lb(),f.Lb(),f.Lb(),f.Lb(),f.Mb(108,"modal",5),f.Wb(109,"translate"),f.Mb(110,"div",45),f.Mb(111,"div",46),f.Mb(112,"p",47),f.oc(113),f.Wb(114,"translate"),f.Mb(115,"b",48),f.oc(116),f.Wb(117,"translate"),f.Lb(),f.oc(118,"! "),f.Lb(),f.Lb(),f.Lb(),f.Lb(),f.Ib(119,"unsupported-image-modal",49),f.Ib(120,"spinner",50)),2&e){var n,o=f.fc(19),a=null;f.ac("ngIf",t.isOverlayOn),f.xb(1),f.ac("_onChange",t.onChangeSchema),f.xb(5),f.ac("_jsonSchema",t.projectList),f.xb(1),f.ac("id",t.modalIdCreateProject)("modalBodyStyle",t.createProjectModalBodyStyle)("modalTitle",f.Xb(8,59,"createNewProject"))("scrollable",!1),f.xb(2),f.ac("formGroup",t.form),f.xb(4),f.qc("",f.Xb(14,61,"newProjectName")," "),f.xb(2),f.ac("value",t.inputProjectName),f.xb(2),f.ac("ngIf",(null==(a=t.form.get("projectName"))?null:a.touched)&&(null==(a=t.form.get("projectName"))?null:a.invalid))("ngIfElse",o),f.xb(6),f.pc(f.Xb(24,63,"projectFolder")),f.xb(3),f.qc(" ",f.Xb(27,65,"chooseFolder")," "),f.xb(8),f.qc(" ",f.Xb(35,67,"labelListFile"),""),f.xb(3),f.qc(" ",f.Xb(38,69,"optional"),": "),f.xb(5),f.qc(" ",f.Xb(43,71,"chooseFile")," "),f.xb(2),f.ac("ngIf",t.showLabelTooltip),f.xb(6),f.ac("ngClass",t.isCreateFormIncomplete()?"disabled-create-btn":null)("disabled",t.isCreateFormIncomplete()),f.xb(1),f.qc(" ",f.Xb(52,73,"createButton")," "),f.xb(2),f.ac("id",t.modalIdRenameProject)("modalBodyStyle",t.renameProjectModalBodyStyle)("modalTitle",f.Xb(54,75,"renameProject"))("scrollable",!1),f.xb(2),f.ac("formGroup",t.renameForm),f.xb(4),f.qc("",f.Xb(60,77,"newProjectName")," "),f.xb(2),f.ac("value",t.inputProjectName),f.xb(2),f.ac("ngIf",null==(n=t.renameForm.get("newProjectName"))?null:n.touched),f.xb(4),f.qc(" ",f.Xb(68,79,"updateButton")," "),f.xb(2),f.ac("id",t.modalIdImportProject)("modalBodyStyle",t.importProjectModalBodyStyle)("modalTitle",f.Xb(70,81,"menuName.importProject"))("scrollable",!1),f.xb(3),f.ac("formGroup",t.form),f.xb(4),f.qc("",f.Xb(77,83,"importJson")," "),f.xb(6),f.pc(f.Xb(83,85,"configFileInfoDest1")),f.xb(3),f.pc(f.Xb(86,87,"configFileInfoDest2")),f.xb(3),f.qc(" ",f.Xb(89,89,"chooseFile")," "),f.xb(3),f.qc(" ","Import"," "),f.xb(3),f.ac("ngIf",t.modalSpanMessage.trim()),f.xb(3),f.ac("id",t.modalIdRenameSuccess)("modalBodyStyle",t.renameSuccessBodyStyle)("modalTitle",f.Xb(98,91,"renameProject"))("scrollable",!1),f.xb(5),f.rc(" ",t.projectName," ",f.Xb(103,93,"renameMsg")," "),f.xb(3),f.pc(f.Xb(106,95,"success")),f.xb(3),f.ac("id",t.modalIdDeleteProject)("modalBodyStyle",t.deleteProjectBodyStyle)("modalTitle",f.Xb(109,97,"deleteProject"))("scrollable",!1),f.xb(5),f.rc(" ",t.projectName," ",f.Xb(114,99,"deleteMsg")," "),f.xb(3),f.pc(f.Xb(117,101,"success")),f.xb(3),f.ac("_modalUnsupportedImage",t.modalUnsupportedImage)("_unsupportedImageBodyStyle",t.unsupportedImageBodyStyle)("_unsupportedImageList",t.unsupportedImageList),f.xb(1),f.ac("_loading",t.isLoading)}},directives:[i.k,x.a,k,N,A,K.a,h.n,h.g,h.d,h.a,h.f,h.c,i.i,G.a,Y.a],pipes:[y.c],styles:[".upper-container[_ngcontent-%COMP%]{display:flex;margin-top:5vh}.model[_ngcontent-%COMP%]{z-index:1000;padding-top:10vh;top:0;width:100%;height:100%;overflow:auto;background-color:transparent;scrollbar-width:none;position:fixed;background:rgba(0,0,0,.7)}.model-content[_ngcontent-%COMP%]{background-color:#525353;padding:1vw;border:solid;max-width:30vw;min-width:30vw;border-radius:1vw;margin:15vh auto auto}.content-container[_ngcontent-%COMP%]{margin-left:1.3vw}.content-header[_ngcontent-%COMP%]{color:#fff;font-size:3vh}.new-project-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:3vh 0 0;align-items:baseline}.label[_ngcontent-%COMP%]{margin-right:1vw}.label[_ngcontent-%COMP%], .label-config[_ngcontent-%COMP%]{color:#fff;font-size:2vh}.label-config[_ngcontent-%COMP%]{padding-top:.5vh}.input-style[_ngcontent-%COMP%]{border-radius:2vw;border:none;outline:none;background-color:#363636;min-width:11vw;max-width:12vw;min-height:4vh;max-height:4vh;font-size:2vh;color:#fff;padding:0 1vw}.validation[_ngcontent-%COMP%]{margin-left:11vw}.validation[_ngcontent-%COMP%], .validation-rename[_ngcontent-%COMP%]{color:red;margin-top:1.02vh;margin-bottom:.25vh}.validation-rename[_ngcontent-%COMP%]{margin-left:7.5vw}.validation-error[_ngcontent-%COMP%]{margin:1px;color:red}.validation-success[_ngcontent-%COMP%]{margin:1px;color:green}.error-create-msg[_ngcontent-%COMP%], .error-msg[_ngcontent-%COMP%]{padding-top:1vh;font-size:2vh}.error-create-msg[_ngcontent-%COMP%]{padding-left:1vw}.select-file-container[_ngcontent-%COMP%], .select-folder-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:0}.empty-container[_ngcontent-%COMP%], .file-name-container[_ngcontent-%COMP%], .folder-name-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;margin:1.5vh 0 0 12vw;min-height:2vh}.filename[_ngcontent-%COMP%], .foldername[_ngcontent-%COMP%]{font-size:1.8vh;color:#fff;overflow:hidden;text-overflow:ellipsis}.input[_ngcontent-%COMP%]{color:#7fffd4}.horizontal-line[_ngcontent-%COMP%]{background-color:#fff;min-height:.3vh;max-height:.3vh;margin:2vh auto}.model-button-container[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse;padding:.5vw}.button-file-style[_ngcontent-%COMP%], .button-style[_ngcontent-%COMP%]{padding:1vh 1.5vw;border-radius:1vh;border:none;outline:none;color:#fff;cursor:pointer;font-size:2vh}.button-file-style[_ngcontent-%COMP%]{max-height:4vh}.choose-file-button[_ngcontent-%COMP%], .choose-folder-button[_ngcontent-%COMP%]{background-color:#444}.create-btn[_ngcontent-%COMP%]{background-color:#2d8ceb}.disabled-create-btn[_ngcontent-%COMP%]{cursor:not-allowed;background-color:#444!important;color:#777!important}.cancel-btn[_ngcontent-%COMP%]{background-color:#444;margin-right:.7vw}.choose-file-btn[_ngcontent-%COMP%]{font-size:2vh;text-decoration:none;background-color:#444;color:#fff;padding:.5vh 1vw;border:none;border-radius:1vh;margin-right:1vw;cursor:pointer}.label-name[_ngcontent-%COMP%]{width:9.5vw;padding-top:.2vh;padding-right:1vw}.help-icon-container[_ngcontent-%COMP%]{padding-right:1vw;padding-left:.2vw}.help-icon[_ngcontent-%COMP%]{height:3vh}.label-file[_ngcontent-%COMP%]{padding-top:1vh;padding-right:.2vw}.label-select-folder[_ngcontent-%COMP%]{padding-top:.7vh;padding-right:1vw;width:9.5vw}.label-select-label[_ngcontent-%COMP%]{color:#fff;font-size:2vh;padding-top:0;width:11.5vw}.label-select-file[_ngcontent-%COMP%]{padding-top:.5vh;width:9.5vw}.input-id[_ngcontent-%COMP%]{font-size:2vh;display:none}.overlay[_ngcontent-%COMP%]{z-index:3000;position:absolute;background-color:rgba(0,0,0,.9);width:99.9vw;height:99.7vh;cursor:not-allowed}.tooltip[_ngcontent-%COMP%]{position:relative;display:inline-block;border-bottom:1px dotted #000;font-size:15px;text-decoration:underline;margin-top:1vh}.tooltiptitle[_ngcontent-%COMP%]{opacity:.3}.help-icon-container[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:10vw;min-width:200px;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:60%;margin-left:-60px;text-align:justify;text-justify:inter-word}.help-icon-container[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible}.labeltooltiptext[_ngcontent-%COMP%]{width:13vw;background-color:#000;color:#fff;text-align:left;border-radius:6px;padding:1vh .5vw;position:absolute;top:67%;left:30%;margin-left:-60px;text-align:justify;text-justify:inter-word}.display-message-container[_ngcontent-%COMP%]{padding-left:1.2vw}.display-msg[_ngcontent-%COMP%]{font-size:2vh;color:#fff}.modal-content-container[_ngcontent-%COMP%]{margin-left:1.3vw}"]}),ue)}],ve=((ge=function t(){e(this,t)}).\u0275mod=f.Fb({type:ge}),ge.\u0275inj=f.Eb({factory:function(e){return new(e||ge)},imports:[[v.d.forChild(fe)]]}),ge),je=a("KZX/"),_e=((he=function t(){e(this,t)}).\u0275mod=f.Fb({type:he}),he.\u0275inj=f.Eb({factory:function(e){return new(e||he)},imports:[[i.b,je.a,ve]]}),he)}}])}(); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-cn.json b/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-cn.json index 66be66274..3aa01141f 100644 --- a/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-cn.json +++ b/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-cn.json @@ -1,71 +1,71 @@ -{ - "createNewProject": "建立新项目", - "renameProject": "重新命名项目", - "newProjectName": "新项目名称 : ", - "projectNameExist": "* 项目名称已被使用。请选择其他名称", - "projectNameRequired": "* 项目名称空缺", - "projectFolder": "项目文件:", - "chooseFolder": "选择文件", - "labelListFile": "标签文件", - "optional": "(可选)", - "chooseFile": "选择文件", - "createButton": "创建", - "updateButton": "继续", - "cancelButton": "取消", - "menuName": { - "newProject": "创建新项目", - "importProject": "导入项目", - "myProject": "我的项目", - "starred": "书签", - "recent": "最新", - "trash": "已删除" - }, - "datasetHeader": { - "datasetManagement": "资料集管理" - }, - "pageHeader": { - "home": "主页", - "datasetManagement": "资料集管理", - "revision": "修订", - "addUser": "添加用户", - "profile": "用户资料" - }, - "datasetCard": { - "fetchingProject": "正在读取档案...", - "pleaseWait": "请稍等...缓冲处理中", - "uploading": "正在读取", - "new": "最新", - "available": "可开启", - "opened": "开了", - "invalidPath": "无效路径", - "uploadFolder": "上载文件夹", - "uploadPhotos": "上载图像", - "renameProject": "重新命名项目", - "deleteProject": "删除现有项目", - "created": "已创建:", - "totalPhoto": "图像总数:", - "noProject": "没有项目", - "createNew": "开始新的项目吧!", - "projectPath": "项目路径" - }, - "deleteMsg": "删除 ", - "success": "成功", - "renameMsg": "名称更新 ", - "renameSuccess": "名称更新成功!", - "deleteProject": "删除项目", - "exportProject": "导出项目", - "importJson": "导入配置文件", - "selectJson": "配置文件", - "labelFileDest1": "标签文件是 Classifai 生成的 TXT 文件", - "labelFileDest2": "该文件有助于在多个项目中使用正确顺序和大小写的标签。\n可以使用导出标签功能检索它。", - "configFileInfoTitle": "什么是配置文件? ", - "configFileInfoDest1": "配置文件是 Classifai 生成的JSON文件。", - "configFileInfoDest2": "该文件包含项目的元数据,可以使用导出项目功能进行检索。", - "importSuccess": "导入项目成功。重命名为", - "importAborted": "导入项目报错。", - "unsupportedImage": "发现不受支持的图像!", - "containsUnsupportedImage1": "项目中包含", - "containsUnsupportedImage2": "个不受支持的图像!", - "unsupportedImageList1": "图像列表在下载的TXT 文件中。", - "unsupportedImageList2": "请将它们转换为 jpg/png 类型并再次重新导入。" -} +{ + "createNewProject": "建立新项目", + "renameProject": "重新命名项目", + "newProjectName": "新项目名称 : ", + "projectNameExist": "* 项目名称已被使用。请选择其他名称", + "projectNameRequired": "* 项目名称空缺", + "projectFolder": "项目文件:", + "chooseFolder": "选择文件", + "labelListFile": "标签文件", + "optional": "(可选)", + "chooseFile": "选择文件", + "createButton": "创建", + "updateButton": "继续", + "cancelButton": "取消", + "menuName": { + "newProject": "创建新项目", + "importProject": "导入项目", + "myProject": "我的项目", + "starred": "书签", + "recent": "最新", + "trash": "已删除" + }, + "datasetHeader": { + "datasetManagement": "资料集管理" + }, + "pageHeader": { + "home": "主页", + "datasetManagement": "资料集管理", + "revision": "修订", + "addUser": "添加用户", + "profile": "用户资料" + }, + "datasetCard": { + "fetchingProject": "正在读取档案...", + "pleaseWait": "请稍等...缓冲处理中", + "uploading": "正在读取", + "new": "最新", + "available": "可开启", + "opened": "开了", + "invalidPath": "无效路径", + "uploadFolder": "上载文件夹", + "uploadPhotos": "上载图像", + "renameProject": "重新命名项目", + "deleteProject": "删除现有项目", + "created": "已创建:", + "totalPhoto": "图像总数:", + "noProject": "没有项目", + "createNew": "开始新的项目吧!", + "projectPath": "项目路径" + }, + "deleteMsg": "删除 ", + "success": "成功", + "renameMsg": "名称更新 ", + "renameSuccess": "名称更新成功!", + "deleteProject": "删除项目", + "exportProject": "导出项目", + "importJson": "导入配置文件", + "selectJson": "配置文件", + "labelFileDest1": "标签文件是 Classifai 生成的 TXT 文件", + "labelFileDest2": "该文件有助于在多个项目中使用正确顺序和大小写的标签。\n可以使用导出标签功能检索它。", + "configFileInfoTitle": "什么是配置文件? ", + "configFileInfoDest1": "配置文件是 Classifai 生成的JSON文件。", + "configFileInfoDest2": "该文件包含项目的元数据,可以使用导出项目功能进行检索。", + "importSuccess": "导入项目成功。重命名为", + "importAborted": "导入项目报错。", + "unsupportedImage": "发现不受支持的图像!", + "containsUnsupportedImage1": "项目中包含", + "containsUnsupportedImage2": "个不受支持的图像!", + "unsupportedImageList1": "图像列表在下载的TXT 文件中。", + "unsupportedImageList2": "请将它们转换为 jpg/png 类型并再次重新导入。" +} diff --git a/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-en.json b/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-en.json index 74d63d61f..33c56774c 100644 --- a/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-en.json +++ b/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-en.json @@ -1,70 +1,70 @@ -{ - "createNewProject": "Create New Project", - "renameProject": "Rename Project", - "newProjectName": "Project Name:", - "projectNameExist": "* Project name already exist! Try other name", - "projectNameRequired": "* Project name is required", - "projectFolder": "Project Folder:", - "chooseFolder": "Choose Folder", - "labelListFile": "Label File", - "optional": "(Optional)", - "chooseFile": "Choose File", - "createButton": "Create", - "updateButton": "Proceed", - "cancelButton": "Cancel", - "menuName": { - "newProject": "New Project", - "importProject": "Import Project", - "myProject": "My Project", - "starred": "Starred", - "recent": "Recent", - "trash": "Trash" - }, - "datasetHeader": { - "datasetManagement": "Dataset Management" - }, - "pageHeader": { - "home": "Home", - "datasetManagement": "Dataset Management", - "revision": "Revision", - "addUser": "Add user", - "profile": "Profile" - }, - "datasetCard": { - "fetchingProject": "Fetching your project...", - "pleaseWait": "Please wait... while we prepare the dishes", - "uploading": "Uploading", - "new": "New", - "available": "Available", - "opened": "Opened", - "invalidPath": "Invalid Path", - "uploadFolder": "Upload Folder", - "uploadPhotos": "Upload Photo(s)", - "renameProject": "Rename Project", - "deleteProject": "Delete Project", - "created": "Created:", - "totalPhoto": "Total Photo:", - "noProject": "Wait a minute... there's no project", - "createNew": "Gear up and start creating new project!", - "projectPath": "Project Path" - }, - "deleteMsg": "deleted ", - "renameMsg": "renamed ", - "success": "successfully", - "deleteProject": "Delete Project", - "exportProject": "Export Project", - "importJson": "Select Config File", - "selectJson": "Config File", - "labelFileDest1": "Label file is TXT file generated by Classifai.\nIt can be retrieved using export labels function.", - "labelFileDest2": "The file facilitate labels of the right order and capitalization being used across multiple projects.", - "configFileInfoTitle": "What is Config File? ", - "configFileInfoDest1": "Config File is a JSON file generated by Classifai.", - "configFileInfoDest2": "The file contains metadata of a project and can be retrieved using export project function.", - "importSuccess": "Import project success. Rename as ", - "importAborted": "Import project aborted.", - "unsupportedImage": "Unsupported Image Found!", - "containsUnsupportedImage1": "There are ", - "containsUnsupportedImage2": " unsupported images included in the project!", - "unsupportedImageList1": "The list of images is in the downloaded TXT file.", - "unsupportedImageList2": "Kindly convert them to jpg/png type and reimport them again." -} +{ + "createNewProject": "Create New Project", + "renameProject": "Rename Project", + "newProjectName": "Project Name:", + "projectNameExist": "* Project name already exist! Try other name", + "projectNameRequired": "* Project name is required", + "projectFolder": "Project Folder:", + "chooseFolder": "Choose Folder", + "labelListFile": "Label File", + "optional": "(Optional)", + "chooseFile": "Choose File", + "createButton": "Create", + "updateButton": "Proceed", + "cancelButton": "Cancel", + "menuName": { + "newProject": "New Project", + "importProject": "Import Project", + "myProject": "My Project", + "starred": "Starred", + "recent": "Recent", + "trash": "Trash" + }, + "datasetHeader": { + "datasetManagement": "Dataset Management" + }, + "pageHeader": { + "home": "Home", + "datasetManagement": "Dataset Management", + "revision": "Revision", + "addUser": "Add user", + "profile": "Profile" + }, + "datasetCard": { + "fetchingProject": "Fetching your project...", + "pleaseWait": "Please wait... while we prepare the dishes", + "uploading": "Uploading", + "new": "New", + "available": "Available", + "opened": "Opened", + "invalidPath": "Invalid Path", + "uploadFolder": "Upload Folder", + "uploadPhotos": "Upload Photo(s)", + "renameProject": "Rename Project", + "deleteProject": "Delete Project", + "created": "Created:", + "totalPhoto": "Total Photo:", + "noProject": "Wait a minute... there's no project", + "createNew": "Gear up and start creating new project!", + "projectPath": "Project Path" + }, + "deleteMsg": "deleted ", + "renameMsg": "renamed ", + "success": "successfully", + "deleteProject": "Delete Project", + "exportProject": "Export Project", + "importJson": "Select Config File", + "selectJson": "Config File", + "labelFileDest1": "Label file is TXT file generated by Classifai.\nIt can be retrieved using export labels function.", + "labelFileDest2": "The file facilitate labels of the right order and capitalization being used across multiple projects.", + "configFileInfoTitle": "What is Config File? ", + "configFileInfoDest1": "Config File is a JSON file generated by Classifai.", + "configFileInfoDest2": "The file contains metadata of a project and can be retrieved using export project function.", + "importSuccess": "Import project success. Rename as ", + "importAborted": "Import project aborted.", + "unsupportedImage": "Unsupported Image Found!", + "containsUnsupportedImage1": "There are ", + "containsUnsupportedImage2": " unsupported images included in the project!", + "unsupportedImageList1": "The list of images is in the downloaded TXT file.", + "unsupportedImageList2": "Kindly convert them to jpg/png type and reimport them again." +} diff --git a/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-ms.json b/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-ms.json index d2ec15265..83cb29efd 100644 --- a/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-ms.json +++ b/classifai-core/src/main/resources/webroot/assets/i18n/data-set-page-ms.json @@ -1,71 +1,71 @@ -{ - "createNewProject": "Reka Projek Baru", - "renameProject": "Tukar Nama Projek", - "newProjectName": "Nama Projek:", - "projectNameExist": "* Nama projek telah tersedia! Sila cuba nama lain", - "projectNameRequired": "* Sila isi nama projek", - "projectFolder": "Folder Projek:", - "chooseFolder": "Pilih Folder", - "labelListFile": "Fail Label", - "optional": "(Pilihan)", - "chooseFile": "Pilih Fail", - "createButton": "Reka", - "updateButton": "Teruskan", - "cancelButton": "Batal", - "menuName": { - "newProject": "Projek Baru", - "importProject": "Import Projek", - "myProject": "Projek Saya", - "starred": "Dibintangi", - "recent": "Terbaru", - "trash": "Sampah" - }, - "datasetHeader": { - "datasetManagement": "Pengurusan Set Data" - }, - "pageHeader": { - "home": "Laman Utama", - "datasetManagement": "Pengurusan Set Data", - "revision": "Semakan", - "addUser": "Tambah pengguna", - "profile": "Profil" - }, - "datasetCard": { - "fetchingProject": "Mengambil projek anda...", - "pleaseWait": "Sila tunggu sebentar... sementara kami menyediakan hidangan", - "uploading": "Memuat naik", - "new": "Terbaru", - "available": "Tersedia", - "opened": "Telah Dibuka", - "invalidPath": "Pautan Hilang", - "uploadFolder": "Memuat naik folder", - "uploadPhotos": "Memuat naik foto", - "renameProject": "Tukar Nama Projek", - "deleteProject": "Padam Projek", - "created": "Dicipta pada:", - "totalPhoto": "Jumlah foto:", - "noProject": "Tunggu sekejap... tidak ada projek pun", - "createNew": "Bersedia dan jom mulakan projek baru!", - "projectPath": "Lokasi Projek" - }, - "deleteMsg": "dipadam ", - "success": "berjaya", - "renameMsg": "dinamakan semula", - "renameSuccess": "telah berjaya dinamakan semula!", - "deleteProject": "Padam Projek", - "exportProject": "Eksport Projek", - "importJson": "Fail Json", - "selectJson": "Fail Konfig", - "labelFileDest1": "Fail label ialah fail TXT yang dihasilkan oleh Classifai.", - "labelFileDest2": "Fail ini memudahkan penggunaan label dengan susunan dan penggunaan huruf besar yang sama dalam pelbagai projek.\nIa boleh dihasilkan semula mneggunakan fungsi eksport label.", - "configFileInfoTitle": "Apa itu Fail Konfig? ", - "configFileInfoDest1": "Fail konfig ialah fail JSON yang dihasilkan oleh Classifai.", - "configFileInfoDest2": "Fail ini mengandungi metadata projek dan ianya boleh digunakan untuk menghasilkan semula projek menggunakan fungsi eksport projek.", - "importSuccess": "Import projek telah berjaya. Dinamakan semula sebagai ", - "importAborted": "Import projek dibatalkan.", - "unsupportedImage": "Imej Tidak Disokong Ditemui!", - "containsUnsupportedImage1": "Terdapat ", - "containsUnsupportedImage2": " imej yang tidak disokong di dalam projek ini!", - "unsupportedImageList1": "Senarai imej tersebut terdapat di dalam fail TXT yang telah dimuat turun.", - "unsupportedImageList2": "Sila tukar format imej tersebut ke format jpg/png dan import semula." -} +{ + "createNewProject": "Reka Projek Baru", + "renameProject": "Tukar Nama Projek", + "newProjectName": "Nama Projek:", + "projectNameExist": "* Nama projek telah tersedia! Sila cuba nama lain", + "projectNameRequired": "* Sila isi nama projek", + "projectFolder": "Folder Projek:", + "chooseFolder": "Pilih Folder", + "labelListFile": "Fail Label", + "optional": "(Pilihan)", + "chooseFile": "Pilih Fail", + "createButton": "Reka", + "updateButton": "Teruskan", + "cancelButton": "Batal", + "menuName": { + "newProject": "Projek Baru", + "importProject": "Import Projek", + "myProject": "Projek Saya", + "starred": "Dibintangi", + "recent": "Terbaru", + "trash": "Sampah" + }, + "datasetHeader": { + "datasetManagement": "Pengurusan Set Data" + }, + "pageHeader": { + "home": "Laman Utama", + "datasetManagement": "Pengurusan Set Data", + "revision": "Semakan", + "addUser": "Tambah pengguna", + "profile": "Profil" + }, + "datasetCard": { + "fetchingProject": "Mengambil projek anda...", + "pleaseWait": "Sila tunggu sebentar... sementara kami menyediakan hidangan", + "uploading": "Memuat naik", + "new": "Terbaru", + "available": "Tersedia", + "opened": "Telah Dibuka", + "invalidPath": "Pautan Hilang", + "uploadFolder": "Memuat naik folder", + "uploadPhotos": "Memuat naik foto", + "renameProject": "Tukar Nama Projek", + "deleteProject": "Padam Projek", + "created": "Dicipta pada:", + "totalPhoto": "Jumlah foto:", + "noProject": "Tunggu sekejap... tidak ada projek pun", + "createNew": "Bersedia dan jom mulakan projek baru!", + "projectPath": "Lokasi Projek" + }, + "deleteMsg": "dipadam ", + "success": "berjaya", + "renameMsg": "dinamakan semula", + "renameSuccess": "telah berjaya dinamakan semula!", + "deleteProject": "Padam Projek", + "exportProject": "Eksport Projek", + "importJson": "Fail Json", + "selectJson": "Fail Konfig", + "labelFileDest1": "Fail label ialah fail TXT yang dihasilkan oleh Classifai.", + "labelFileDest2": "Fail ini memudahkan penggunaan label dengan susunan dan penggunaan huruf besar yang sama dalam pelbagai projek.\nIa boleh dihasilkan semula mneggunakan fungsi eksport label.", + "configFileInfoTitle": "Apa itu Fail Konfig? ", + "configFileInfoDest1": "Fail konfig ialah fail JSON yang dihasilkan oleh Classifai.", + "configFileInfoDest2": "Fail ini mengandungi metadata projek dan ianya boleh digunakan untuk menghasilkan semula projek menggunakan fungsi eksport projek.", + "importSuccess": "Import projek telah berjaya. Dinamakan semula sebagai ", + "importAborted": "Import projek dibatalkan.", + "unsupportedImage": "Imej Tidak Disokong Ditemui!", + "containsUnsupportedImage1": "Terdapat ", + "containsUnsupportedImage2": " imej yang tidak disokong di dalam projek ini!", + "unsupportedImageList1": "Senarai imej tersebut terdapat di dalam fail TXT yang telah dimuat turun.", + "unsupportedImageList2": "Sila tukar format imej tersebut ke format jpg/png dan import semula." +} diff --git a/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-cn.json b/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-cn.json index b394565ec..b861af038 100644 --- a/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-cn.json +++ b/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-cn.json @@ -1,91 +1,138 @@ -{ - "pageHeader": { - "home": "主页", - "datasetManagement": "资料集管理", - "revision": "修订", - "addUser": "添加用户", - "profile": "用户资料" - }, - "labellingInfo": { - "previous": "上一个", - "next": "下一个", - "undo": "撤销", - "redo": "重做" - }, - "leftSideBar": { - "pointer": "鼠标", - "rectangularBB": "边界框", - "polygon": "多边形", - "eraser": "橡皮", - "fitCenter": "调整到屏幕大小", - "save": "存档", - "info": "快捷键资讯" - }, - "rightSideBar": { - "folderOrFiles": "文件夹 / 文件", - "label": "标签", - "annotation": "标注", - "statistic": "数据", - "export": "导出", - "reload": "重新加载" - }, - "labellingProject": { - "project": "项目", - "label": "标签", - "enterLabel": "输入标签", - "annotation": "标注", - "delete": "删除", - "labelNotExist": "没有此标签,按下回车键以添加标签" - }, - "searchLabel": { - "labelNotExist": "没有此标签", - "enterToAdd": "按回车键添加" - }, - "labellingArea": { - "mainLabel": "主标签", - "label": "标签", - "regionInfo": "区域资讯", - "subLabel": "副标签", - "add": "添加", - "addedSubLabel": "添加副标签", - "mainRegionInfo": "主标签资讯", - "subRegionInfo": "副标签资讯" - }, - "exportModal": { - "exportOptions": "导出选择", - "configFile": "配置文件", - "zipFile": "压缩文件", - "withData": "(包括数据)", - "cancel": "取消" - }, - "footer": { - "projectName": "项目名", - "size": "容量", - "image": "格式", - "dimension": "尺寸", - "copyToClipboard": "复制" - }, - "exportSuccess": "导出成功", - "exportFailed": "导出失败", - "reloadSuccess": "重新导入成功", - "reloadFailed": "重新导入失败", - "labelExist": "此标签已被使用,无法删除", - "location": "文件位置: ", - "exportTitle": "导出项目", - "bulkSave": "所有图片", - "singleSave": "单一图片", - "advModal": { - "title": "高级设置", - "noLabel": "无标签", - "btnSave": "保存", - "instructionText": "向左切换以禁用标签" - }, - "configFileInfoTitle": "选择正确的导出格式", - "configFileInfoDest1": "配置文件是包含项目元数据的配置文件。当数据在要导入到的系统中随时可用时,它是合适的。", - "configFileInfoDest2": "压缩文件包含带有项目中使用的数据集的配置文件。它编译要在不同系统中复制的项目的所有组件。", - "unsupportedImage": "发现不受支持的图像!", - "containsUnsupportedImage1": "项目中包含", - "containsUnsupportedImage2": "个不受支持的图像!", - "unsupportedImageList1": "图像列表在下载的TXT 文件中。", - "unsupportedImageList2": "请将它们转换为 jpg/png 类型并再次重新导入。" -} +{ + "pageHeader": { + "home": "主页", + "datasetManagement": "资料集管理", + "revision": "修订", + "addUser": "添加用户", + "profile": "用户资料" + }, + "labellingInfo": { + "previous": "上一个", + "next": "下一个", + "undo": "撤销", + "redo": "重做" + }, + "leftSideBar": { + "pointer": "鼠标", + "rectangularBB": "边界框", + "polygon": "多边形", + "eraser": "橡皮", + "fitCenter": "调整到屏幕大小", + "save": "存档", + "info": "快捷键资讯" + }, + "rightSideBar": { + "folderOrFiles": "文件夹 / 文件", + "label": "标签", + "annotation": "标注", + "statistic": "数据", + "export": "导出", + "reload": "重新加载" + }, + "labellingProject": { + "project": "项目", + "label": "标签", + "enterLabel": "输入标签", + "annotation": "标注", + "delete": "删除", + "labelNotExist": "没有此标签,按下回车键以添加标签" + }, + "searchLabel": { + "labelNotExist": "没有此标签", + "enterToAdd": "按回车键添加" + }, + "labellingArea": { + "mainLabel": "主标签", + "label": "标签", + "regionInfo": "区域资讯", + "subLabel": "副标签", + "add": "添加", + "addedSubLabel": "添加副标签", + "mainRegionInfo": "主标签资讯", + "subRegionInfo": "副标签资讯" + }, + "exportModal": { + "exportOptions": "导出选择", + "configFile": "配置文件", + "zipFile": "压缩文件", + "withData": "(包括数据)", + "cancel": "取消" + }, + "info": { + "header": "快捷键资讯", + "shortcut": { + "1": { + "key": "Ctrl + z", + "functionality": "撤销上一步的操作" + }, + "2": { + "key": "Ctrl + c", + "functionality": "复制选定的边界框/多边形" + }, + "3": { + "key": "Ctrl + v", + "functionality": "粘贴选定的边界框/多边形" + }, + "4": { + "key": "Delete/Backspace", + "functionality": "删除选定的边界框/多边形" + }, + "5": { + "key": "双击选定的边界框/多边形", + "functionality": "为选定的边界框选择标签/多边形" + }, + "6": { + "key": "F2", + "functionality": "重命名当前图像" + } + } + }, + "footer": { + "projectName": "项目名", + "size": "容量", + "image": "格式", + "dimension": "尺寸", + "copyToClipboard": "复制" + }, + "exportSuccess": "导出成功", + "exportFailed": "导出失败", + "reloadSuccess": "重新导入成功", + "reloadFailed": "重新导入失败", + "labelExist": "此标签已被使用,无法删除", + "location": "文件位置: ", + "exportTitle": "导出项目", + "bulkSave": "所有图片", + "singleSave": "单一图片", + "advModal": { + "title": "高级设置", + "noLabel": "无标签", + "btnSave": "保存", + "instructionText": "向左切换以禁用标签" + }, + "renameModal": { + "renameImg": "重命名图像", + "imageName": "图片名称", + "typeNewName": "输入新名称", + "nameExist": "图像名称已存在!", + "nameEmpty": "图片名称为必填项!", + "submit": "提交" + }, + "configFileInfoTitle": "选择正确的导出格式", + "configFileInfoDest1": "配置文件是包含项目元数据的配置文件。当数据在要导入到的系统中随时可用时,它是合适的。", + "configFileInfoDest2": "压缩文件包含带有项目中使用的数据集的配置文件。它编译要在不同系统中复制的项目的所有组件。", + "unsupportedImage": "发现不受支持的图像!", + "containsUnsupportedImage1": "项目中包含", + "containsUnsupportedImage2": "个不受支持的图像!", + "unsupportedImageList1": "图像列表在下载的TXT 文件中。", + "unsupportedImageList2": "请将它们转换为 jpg/png 类型并再次重新导入。", + "warningNoLabel": "没有选择标签!请至少选择一个要导出的标签。", + "warning": { + "noMetadata": "没有元数据。", + "noBoundingBox": "没有边界框。", + "noLabelList": "没有标签列表。", + "noImageList": "没有图像列表。 ", + "noProgress": "没有标签进展。", + "noLabelSelected": "没有选择标签。", + "noPolygon": "There are no polygon." + } +} diff --git a/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-en.json b/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-en.json index d7f8d8db2..50034a460 100644 --- a/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-en.json +++ b/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-en.json @@ -1,116 +1,138 @@ -{ - "pageHeader": { - "home": "Home", - "datasetManagement": "Dataset Management", - "revision": "Revision", - "addUser": "Add user", - "profile": "Profile" - }, - "labellingInfo": { - "previous": "Previous", - "next": "Next", - "undo": "Undo", - "redo": "Redo" - }, - "leftSideBar": { - "pointer": "Pointer", - "rectangularBB": "Rectangular Bounding Box", - "polygon": "Polygon", - "eraser": "Eraser", - "fitCenter": "Fit Center", - "save": "Save", - "info": "Shortcut Key Info" - }, - "rightSideBar": { - "folderOrFiles": "Folder / Files", - "label": "Label", - "annotation": "Annotation", - "statistic": "Statistic", - "export": "Export", - "reload": "Reload" - }, - "labellingProject": { - "project": "Project", - "label": "Label", - "enterLabel": "Enter Label", - "annotation": "Annotation", - "delete": "Delete", - "labelNotExist": "Label does not exist. Press Enter to add." - }, - "searchLabel": { - "labelNotExist": "Label does not exist.", - "enterToAdd": "Press enter to add." - }, - "labellingArea": { - "mainLabel": "Main Label", - "label": "Label", - "regionInfo": "Region Info", - "subLabel": "Sub Label", - "add": "Add", - "addedSubLabel": "Added Sub Label", - "mainRegionInfo": "Input Main Region Info", - "subRegionInfo": "Input Sub Region Info" - }, - "exportModal": { - "exportOptions": "Export Project To", - "configFile": "Config File", - "zipFile": "Zip File", - "withData": "(With Data)", - "cancel": "Cancel" - }, - "info": { - "header": "Keyboard Shortcut Information", - "shortcut": { - "1": { - "key": "Ctrl + z", - "functionality": "Undo the last action" - }, - "2": { - "key": "Ctrl + c", - "functionality": "Copy the selected bounding box" - }, - "3": { - "key": "Ctrl + v", - "functionality": "Paste the selected bounding box" - }, - "4": { - "key": "Delete/Backspace", - "functionality": "Delete a selected bounding box" - }, - "5": { - "key": "Double click on a selected bounding box", - "functionality": "Choose label for the selected bounding box" - } - } - }, - "footer": { - "projectName": "Project Name", - "size": "Size", - "image": "Image", - "dimension": "Dimension", - "copyToClipboard": "Copy to Clipboard" - }, - "exportSuccess": " project was exported successfully!", - "exportFailed": "Fail to export ", - "reloadSuccess": " project was reload successfully!", - "reloadFailed": "Fail to reload ", - "labelExist": "Some image in project are using this label. Deleting this label are not allowed.", - "location": "File Location: ", - "exportTitle": "Export Project", - "bulkSave": "Bulk Saving", - "singleSave": "Current Image", - "advModal": { - "title": "Advanced Setting", - "noLabel": "No Label", - "btnSave": "Save", - "instructionText": "Toggle left to disable the label" - }, - "configFileInfoTitle": "Choosing the Right Export", - "configFileInfoDest1": "Config File is the configuration file contains of metadata of a project. It is suitable when the data is readily available in the system to be imported to.", - "configFileInfoDest2": "Zip File contains the Config File with dataset used in a project. It compiles all the components of a project to be reproduced in a different system.", - "unsupportedImage": "Unsupported Image Found!", - "containsUnsupportedImage1": "There are ", - "containsUnsupportedImage2": " unsupported images included in the project!", - "unsupportedImageList1": "The list of images is in the downloaded TXT file.", - "unsupportedImageList2": "Kindly convert them to jpg/png type and reimport them again." -} +{ + "pageHeader": { + "home": "Home", + "datasetManagement": "Dataset Management", + "revision": "Revision", + "addUser": "Add user", + "profile": "Profile" + }, + "labellingInfo": { + "previous": "Previous", + "next": "Next", + "undo": "Undo", + "redo": "Redo" + }, + "leftSideBar": { + "pointer": "Pointer", + "rectangularBB": "Rectangular Bounding Box", + "polygon": "Polygon", + "eraser": "Eraser", + "fitCenter": "Fit Center", + "save": "Save", + "info": "Shortcut Key Info" + }, + "rightSideBar": { + "folderOrFiles": "Folder / Files", + "label": "Label", + "annotation": "Annotation", + "statistic": "Statistic", + "export": "Export", + "reload": "Reload" + }, + "labellingProject": { + "project": "Project", + "label": "Label", + "enterLabel": "Enter Label", + "annotation": "Annotation", + "delete": "Delete", + "labelNotExist": "Label does not exist. Press Enter to add." + }, + "searchLabel": { + "labelNotExist": "Label does not exist.", + "enterToAdd": "Press enter to add." + }, + "labellingArea": { + "mainLabel": "Main Label", + "label": "Label", + "regionInfo": "Region Info", + "subLabel": "Sub Label", + "add": "Add", + "addedSubLabel": "Added Sub Label", + "mainRegionInfo": "Input Main Region Info", + "subRegionInfo": "Input Sub Region Info" + }, + "exportModal": { + "exportOptions": "Export Project To", + "configFile": "Config File", + "zipFile": "Zip File", + "withData": "(With Data)", + "cancel": "Cancel" + }, + "info": { + "header": "Keyboard Shortcut Information", + "shortcut": { + "1": { + "key": "Ctrl + z", + "functionality": "Undo the last action" + }, + "2": { + "key": "Ctrl + c", + "functionality": "Copy the selected bounding box/ polygon" + }, + "3": { + "key": "Ctrl + v", + "functionality": "Paste the selected bounding box/ polygon" + }, + "4": { + "key": "Delete/Backspace", + "functionality": "Delete a selected bounding box/ polygon" + }, + "5": { + "key": "Double click on a selected bounding box/ polygon", + "functionality": "Choose label for the selected bounding box" + }, + "6": { + "key": "F2", + "functionality": "Rename the current image" + } + } + }, + "footer": { + "projectName": "Project Name", + "size": "Size", + "image": "Image", + "dimension": "Dimension", + "copyToClipboard": "Copy to Clipboard" + }, + "exportSuccess": " project was exported successfully!", + "exportFailed": "Fail to export ", + "reloadSuccess": " project was reload successfully!", + "reloadFailed": "Fail to reload ", + "labelExist": "Some image in project are using this label. Deleting this label are not allowed.", + "location": "File Location: ", + "exportTitle": "Export Project", + "bulkSave": "Bulk Saving", + "singleSave": "Current Image", + "advModal": { + "title": "Advanced Setting", + "noLabel": "No Label", + "btnSave": "Save", + "instructionText": "Toggle left to disable the label" + }, + "renameModal": { + "renameImg": "Rename Image", + "imageName": "Image Name", + "typeNewName": "Enter new name", + "nameExist": "Image name already exist!", + "nameEmpty": "Image name is required!", + "submit": "Proceed" + }, + "configFileInfoTitle": "Choosing the Right Export", + "configFileInfoDest1": "Config File is the configuration file contains of metadata of a project. It is suitable when the data is readily available in the system to be imported to.", + "configFileInfoDest2": "Zip File contains the Config File with dataset used in a project. It compiles all the components of a project to be reproduced in a different system.", + "unsupportedImage": "Unsupported Image Found!", + "containsUnsupportedImage1": "There are ", + "containsUnsupportedImage2": " unsupported images included in the project!", + "unsupportedImageList1": "The list of images is in the downloaded TXT file.", + "unsupportedImageList2": "Kindly convert them to jpg/png type and reimport them again.", + "warningNoLabel": "No label is selected! Please select at least one label to export.", + "warning": { + "noMetadata": "There are no metadata.", + "noBoundingBox": "There are no bounding box.", + "noLabelList": "There are no label list.", + "noImageList": "There are no image list.", + "noProgress": " There are no labelling progress.", + "noLabelSelected": "There are no label selected.", + "noPolygon": "There are no polygon." + } +} diff --git a/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-ms.json b/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-ms.json index 62784b0e7..dca2924b4 100644 --- a/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-ms.json +++ b/classifai-core/src/main/resources/webroot/assets/i18n/image-labelling-ms.json @@ -1,91 +1,138 @@ -{ - "pageHeader": { - "home": "Laman Utama", - "datasetManagement": "Pengurusan Set Data", - "revision": "Semakan", - "addUser": "Tambah pengguna", - "profile": "Profil" - }, - "labellingInfo": { - "previous": "Sebelumnya", - "next": "Seterusnya", - "undo": "Kembali ke tindakan terakhir", - "redo": "Buat semula" - }, - "leftSideBar": { - "pointer": "Penunjuk", - "rectangularBB": "Kotak Sempadan", - "polygon": "Poligon", - "eraser": "Pemadam", - "fitCenter": "Sesuaikan Dengan Saiz Skrin", - "save": "Simpan", - "info": "Info Kekunci Pintasan" - }, - "rightSideBar": { - "folderOrFiles": "Folder / Fail", - "label": "Label", - "annotation": "Anotasi", - "statistic": "Statistik", - "export": "Eksport", - "reload": "Muat Semula" - }, - "labellingProject": { - "project": "Projek", - "label": "Label", - "enterLabel": "Masukkan Label", - "annotation": "Anotasi", - "delete": "Padam", - "labelNotExist": "Label tidak wujud. Tekan 'enter' untuk tambah." - }, - "searchLabel": { - "labelNotExist": "Label tidak wujud.", - "enterToAdd": "Tekan 'enter' untuk tambah." - }, - "labellingArea": { - "mainLabel": "Label Utama", - "label": "Label", - "regionInfo": "Info Wilayah", - "subLabel": "Sub Label", - "add": "Tambah", - "addedSubLabel": "Senarai Sub Label", - "mainRegionInfo": "Info Label Utama", - "subRegionInfo": "Info Sub Label" - }, - "exportModal": { - "exportOptions": "Eksport Projek Ke", - "configFile": "Fail Konfig", - "zipFile": "Fail Zip", - "withData": "(Bersama Data)", - "cancel": "Batal" - }, - "footer": { - "projectName": "Nama Projek", - "size": "Saiz", - "image": "Imej", - "dimension": "Dimensi", - "copyToClipboard": "Salin" - }, - "exportSuccess": " telah berjaya diesksport!", - "exportFailed": "Gagal untuk mengeksport projek ", - "reloadSuccess": " telah berjaya dimuat semula!", - "reloadFailed": "Gagal untuk memuat semula ", - "labelExist": "Beberapa imej dalam projek menggunakan label ini. Memadam label ini tidak dibenarkan.", - "location": "Lokasi Fail: ", - "exportTitle": "Esksport Projek", - "bulkSave": "Simpan Secara Pukal", - "singleSave": "Imej Semasa", - "advModal": { - "title": "Tetapan Lanjutan", - "noLabel": "Tiada label wujud", - "btnSave": "Simpan", - "instructionText": "Togol ke kiri untuk melumpuhkan label" - }, - "configFileInfoTitle": "Pilih Fail Eksport", - "configFileInfoDest1": "Fail Konfig ialah fail konfigurasi yang mengandungi metadata sesuatu projek. Pilihan ini sesuai jika data sudah tersedia dalam sistem untuk diimport.", - "configFileInfoDest2": "Fail Zip mengandungi Fail Konfig beserta dengan set data yang digunakan dalam projek. Semua komponen sesuatu projek disertakan untuk membolehkan penghasilan semula projek tersebut di dalam sistem yang berbeza.", - "unsupportedImage": "Imej Tidak Disokong Ditemui!", - "containsUnsupportedImage1": "Terdapat ", - "containsUnsupportedImage2": " imej yang tidak disokong di dalam projek ini!", - "unsupportedImageList1": "Senarai imej tersebut terdapat di dalam fail TXT yang telah dimuat turun.", - "unsupportedImageList2": "Sila tukar format imej tersebut ke format jpg/png dan import semula." -} +{ + "pageHeader": { + "home": "Laman Utama", + "datasetManagement": "Pengurusan Set Data", + "revision": "Semakan", + "addUser": "Tambah pengguna", + "profile": "Profil" + }, + "labellingInfo": { + "previous": "Sebelumnya", + "next": "Seterusnya", + "undo": "Kembali ke tindakan terakhir", + "redo": "Buat semula" + }, + "leftSideBar": { + "pointer": "Penunjuk", + "rectangularBB": "Kotak Sempadan", + "polygon": "Poligon", + "eraser": "Pemadam", + "fitCenter": "Sesuaikan Dengan Saiz Skrin", + "save": "Simpan", + "info": "Info Kekunci Pintasan" + }, + "rightSideBar": { + "folderOrFiles": "Folder / Fail", + "label": "Label", + "annotation": "Anotasi", + "statistic": "Statistik", + "export": "Eksport", + "reload": "Muat Semula" + }, + "labellingProject": { + "project": "Projek", + "label": "Label", + "enterLabel": "Masukkan Label", + "annotation": "Anotasi", + "delete": "Padam", + "labelNotExist": "Label tidak wujud. Tekan 'enter' untuk tambah." + }, + "searchLabel": { + "labelNotExist": "Label tidak wujud.", + "enterToAdd": "Tekan 'enter' untuk tambah." + }, + "labellingArea": { + "mainLabel": "Label Utama", + "label": "Label", + "regionInfo": "Info Wilayah", + "subLabel": "Sub Label", + "add": "Tambah", + "addedSubLabel": "Senarai Sub Label", + "mainRegionInfo": "Info Label Utama", + "subRegionInfo": "Info Sub Label" + }, + "exportModal": { + "exportOptions": "Eksport Projek Ke", + "configFile": "Fail Konfig", + "zipFile": "Fail Zip", + "withData": "(Bersama Data)", + "cancel": "Batal" + }, + "info": { + "header": "Informasi Kekunci Pintasan", + "shortcut": { + "1": { + "key": "Ctrl + z", + "functionality": "Kembali ke tindakan terakhir" + }, + "2": { + "key": "Ctrl + c", + "functionality": "Menyalin kotak sempadan/poligon yang dipilih" + }, + "3": { + "key": "Ctrl + v", + "functionality": "Menampal kotak sempadan/poligon yang telah disalin" + }, + "4": { + "key": "Delete/Backspace", + "functionality": "Memadam kotak sempadan/poligon yang dipilih" + }, + "5": { + "key": "Klik dua kali pada kotak sempadan/poligon yang dipilih", + "functionality": "Memilih/ menukar label untuk kotak sempadan/poligon yang dipilih" + }, + "6": { + "key": "F2", + "functionality": "Menamakan semula imej semasa" + } + } + }, + "footer": { + "projectName": "Nama Projek", + "size": "Saiz", + "image": "Imej", + "dimension": "Dimensi", + "copyToClipboard": "Salin" + }, + "exportSuccess": " telah berjaya diesksport!", + "exportFailed": "Gagal untuk mengeksport projek ", + "reloadSuccess": " telah berjaya dimuat semula!", + "reloadFailed": "Gagal untuk memuat semula ", + "labelExist": "Beberapa imej dalam projek menggunakan label ini. Memadam label ini tidak dibenarkan.", + "location": "Lokasi Fail: ", + "exportTitle": "Esksport Projek", + "bulkSave": "Simpan Secara Pukal", + "singleSave": "Imej Semasa", + "advModal": { + "title": "Tetapan Lanjutan", + "noLabel": "Tiada label wujud", + "btnSave": "Simpan", + "instructionText": "Togol ke kiri untuk melumpuhkan label" + }, + "renameModal": { + "renameImg": "Namakan Semula Imej", + "imageName": "Nama Imej", + "typeNewName": "Masukkan nama baru", + "nameExist": "Nama imej telah tersedia!", + "nameEmpty": "Nama imej diperlukan!", + "submit": "Hantar" + }, + "configFileInfoTitle": "Pilih Fail Eksport", + "configFileInfoDest1": "Fail Konfig ialah fail konfigurasi yang mengandungi metadata sesuatu projek. Pilihan ini sesuai jika data sudah tersedia dalam sistem untuk diimport.", + "configFileInfoDest2": "Fail Zip mengandungi Fail Konfig beserta dengan set data yang digunakan dalam projek. Semua komponen sesuatu projek disertakan untuk membolehkan penghasilan semula projek tersebut di dalam sistem yang berbeza.", + "unsupportedImage": "Imej Tidak Disokong Ditemui!", + "containsUnsupportedImage1": "Terdapat ", + "containsUnsupportedImage2": " imej yang tidak disokong di dalam projek ini!", + "unsupportedImageList1": "Senarai imej tersebut terdapat di dalam fail TXT yang telah dimuat turun.", + "unsupportedImageList2": "Sila tukar format imej tersebut ke format jpg/png dan import semula.", + "warningNoLabel": "Tiada label dipilih! Sila pilih sekurang-kurangnya satu label untuk dieksport.", + "warning": { + "noMetadata": "Tidak ada metadata.", + "noBoundingBox": "Tidak ada kotak sempadan.", + "noLabelList": "Tidak ada senarai label.", + "noImageList": "Tidak ada senarai imej.", + "noProgress": " Tidak ada kemajuan pelabelan.", + "noLabelSelected": "Tidak ada label yang dipilih.", + "noPolygon": "Tidak ada poligon." + } +} diff --git a/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-cn.json b/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-cn.json index ed4e2fcb3..9e045860d 100644 --- a/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-cn.json +++ b/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-cn.json @@ -1,12 +1,12 @@ -{ - "comingSoon": "即將推出", - "tabular": "表格", - "image": "图片", - "video": "视频", - "voice": "语音", - "imageOpt": { - "selection": "请选择项目种类:", - "boundingBoxes": "边界框", - "polygons": "多边形" - } -} +{ + "comingSoon": "即將推出", + "tabular": "表格", + "image": "图片", + "video": "视频", + "voice": "语音", + "imageOpt": { + "selection": "请选择项目种类:", + "boundingBoxes": "边界框", + "polygons": "多边形" + } +} diff --git a/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-en.json b/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-en.json index 73a90819b..6d067ea38 100644 --- a/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-en.json +++ b/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-en.json @@ -1,12 +1,12 @@ -{ - "comingSoon": "Coming Soon", - "tabular": "Tabular", - "image": "Image", - "video": "Video", - "voice": "Voice", - "imageOpt": { - "selection": "Please select one of the below:", - "boundingBoxes": "Bounding Boxes", - "polygons": "Polygons" - } -} +{ + "comingSoon": "Coming Soon", + "tabular": "Tabular", + "image": "Image", + "video": "Video", + "voice": "Voice", + "imageOpt": { + "selection": "Please select one of the below:", + "boundingBoxes": "Bounding Boxes", + "polygons": "Polygons" + } +} diff --git a/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-ms.json b/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-ms.json index 700b6dabf..01cd137db 100644 --- a/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-ms.json +++ b/classifai-core/src/main/resources/webroot/assets/i18n/landing-page-ms.json @@ -1,12 +1,12 @@ -{ - "comingSoon": "Akan Datang", - "tabular": "Jadual", - "image": "Imej", - "video": "Video", - "voice": "Suara", - "imageOpt": { - "selection": "Sila pilih salah satu daripada pilihan berikut:", - "boundingBoxes": "Kotak", - "polygons": "Poligon" - } -} +{ + "comingSoon": "Akan Datang", + "tabular": "Jadual", + "image": "Imej", + "video": "Video", + "voice": "Suara", + "imageOpt": { + "selection": "Sila pilih salah satu daripada pilihan berikut:", + "boundingBoxes": "Kotak", + "polygons": "Poligon" + } +} diff --git a/classifai-core/src/main/resources/webroot/assets/icons/Certifai UI Icon_Folder.svg b/classifai-core/src/main/resources/webroot/assets/icons/Certifai UI Icon_Folder.svg index a2b0ddce1..fec12b8d1 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/Certifai UI Icon_Folder.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/Certifai UI Icon_Folder.svg @@ -1,36 +1,36 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/archived.svg b/classifai-core/src/main/resources/webroot/assets/icons/archived.svg index aafc045e1..f08404bcc 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/archived.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/archived.svg @@ -1,43 +1,43 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/audio.svg b/classifai-core/src/main/resources/webroot/assets/icons/audio.svg index e35935146..6f0fbec5e 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/audio.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/audio.svg @@ -1,50 +1,50 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/download.svg b/classifai-core/src/main/resources/webroot/assets/icons/download.svg index b3e7c68ce..2238c8f9b 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/download.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/download.svg @@ -1,47 +1,47 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/export.svg b/classifai-core/src/main/resources/webroot/assets/icons/export.svg index 07f98f554..3dc4a7a57 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/export.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/export.svg @@ -1,13 +1,13 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/gridview.svg b/classifai-core/src/main/resources/webroot/assets/icons/gridview.svg index d05df921b..3f391a1af 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/gridview.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/gridview.svg @@ -1,52 +1,52 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/image.svg b/classifai-core/src/main/resources/webroot/assets/icons/image.svg index 488ce92a0..a9e8316c3 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/image.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/image.svg @@ -1,40 +1,40 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/import.svg b/classifai-core/src/main/resources/webroot/assets/icons/import.svg index 86c8f5dfc..30921ba12 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/import.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/import.svg @@ -1 +1 @@ - + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/last_modify.svg b/classifai-core/src/main/resources/webroot/assets/icons/last_modify.svg index 6c73d8b6f..175ef8706 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/last_modify.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/last_modify.svg @@ -1,40 +1,40 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/list_view.svg b/classifai-core/src/main/resources/webroot/assets/icons/list_view.svg index 59b90cda7..d35ebb6ca 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/list_view.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/list_view.svg @@ -1,65 +1,65 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/more.svg b/classifai-core/src/main/resources/webroot/assets/icons/more.svg index 5f6c3338e..325aad303 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/more.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/more.svg @@ -1,35 +1,35 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/option.svg b/classifai-core/src/main/resources/webroot/assets/icons/option.svg index f7a3eb076..e50dd0dbe 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/option.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/option.svg @@ -1,42 +1,42 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/project.svg b/classifai-core/src/main/resources/webroot/assets/icons/project.svg index 86b1d5ab2..b659993f3 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/project.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/project.svg @@ -1,40 +1,40 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/reload.svg b/classifai-core/src/main/resources/webroot/assets/icons/reload.svg index d609fe0be..4e8d93100 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/reload.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/reload.svg @@ -1 +1 @@ - + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/search.svg b/classifai-core/src/main/resources/webroot/assets/icons/search.svg index dba3d5c4c..3b893afc9 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/search.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/search.svg @@ -1,37 +1,37 @@ - - - - - - - - - + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/separator.svg b/classifai-core/src/main/resources/webroot/assets/icons/separator.svg index 2daaa1eea..c81b73624 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/separator.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/separator.svg @@ -1,6 +1,6 @@ - - - - - - + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/tabular.svg b/classifai-core/src/main/resources/webroot/assets/icons/tabular.svg index a61d54677..502ab4151 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/tabular.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/tabular.svg @@ -1,58 +1,58 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/text.svg b/classifai-core/src/main/resources/webroot/assets/icons/text.svg index 6ccea4c80..52263c028 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/text.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/text.svg @@ -1,46 +1,46 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/trash.svg b/classifai-core/src/main/resources/webroot/assets/icons/trash.svg index e16dd1dfd..5a0b7c54a 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/trash.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/trash.svg @@ -1,38 +1,38 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/assets/icons/video.svg b/classifai-core/src/main/resources/webroot/assets/icons/video.svg index d640e4c61..197a69e3c 100644 --- a/classifai-core/src/main/resources/webroot/assets/icons/video.svg +++ b/classifai-core/src/main/resources/webroot/assets/icons/video.svg @@ -1,47 +1,47 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/index.html b/classifai-core/src/main/resources/webroot/index.html index 97589194a..b4e99d55c 100644 --- a/classifai-core/src/main/resources/webroot/index.html +++ b/classifai-core/src/main/resources/webroot/index.html @@ -1,16 +1,16 @@ - - - - - - - - Classifai - - - - - - - - + + + + + + + + Classifai + + + + + + + + diff --git a/classifai-core/src/main/resources/webroot/main-es2015.34df3fe33df29b5354fb.js b/classifai-core/src/main/resources/webroot/main-es2015.34df3fe33df29b5354fb.js deleted file mode 100644 index e51cfc459..000000000 --- a/classifai-core/src/main/resources/webroot/main-es2015.34df3fe33df29b5354fb.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{0:function(t,e,n){t.exports=n("zUnb")},"0EUg":function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("bHdf");function s(){return Object(r.a)(1)}},"14na":function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("2Vo4"),s=n("fXoL");let i=(()=>{class t{constructor(){this.imgLabellingModeSubject=new r.a(null),this.imgLabelMode$=this.imgLabellingModeSubject.asObservable(),this.setState=t=>{this.imgLabellingModeSubject.next(t||null)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},"1F7/":function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("fXoL");let s=(()=>{class t{constructor(){this.modals=[],this.add=t=>{this.modals.push(t)},this.remove=t=>{this.modals=this.modals.filter(({id:e})=>e!==t)},this.open=t=>{const e=this.modals.find(({id:e})=>e===t);null==e||e.open()},this.close=t=>{const e=this.modals.find(({id:e})=>e===t);null==e||e.close()}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},"2QA8":function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())()},"2Vo4":function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("XNiG"),s=n("9ppp");class i extends r.a{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new s.a;return this._value}next(t){super.next(this._value=t)}}},"2fFW":function(t,e,n){"use strict";n.d(e,"a",function(){return s});let r=!1;const s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else r&&console.log("RxJS: Back to a better error behavior. Thank you. <3");r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},"3N8a":function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("quSY");class s extends r.a{constructor(t,e){super()}schedule(t,e=0){return this}}class i extends s{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n=!1,r=void 0;try{this.work(t)}catch(s){n=!0,r=!!s&&s||new Error(s)}if(n)return this.unsubscribe(),r}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}},"3Pt+":function(t,e,n){"use strict";n.d(e,"a",function(){return f}),n.d(e,"b",function(){return It}),n.d(e,"c",function(){return jt}),n.d(e,"d",function(){return kt}),n.d(e,"e",function(){return Dt}),n.d(e,"f",function(){return N}),n.d(e,"g",function(){return L}),n.d(e,"h",function(){return wt}),n.d(e,"i",function(){return Et}),n.d(e,"j",function(){return W}),n.d(e,"k",function(){return Rt}),n.d(e,"l",function(){return _}),n.d(e,"m",function(){return X}),n.d(e,"n",function(){return Ot});var r=n("fXoL"),s=n("ofXK"),i=n("cp0P"),o=n("Cfvw"),a=n("lJxs");const l=new r.q("NgValueAccessor"),c={provide:l,useExisting:Object(r.S)(()=>u),multi:!0};let u=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l))},t.\u0275dir=r.Cb({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&r.Tb("change",function(t){return e.onChange(t.target.checked)})("blur",function(){return e.onTouched()})},features:[r.wb([c])]}),t})();const h={provide:l,useExisting:Object(r.S)(()=>f),multi:!0},d=new r.q("CompositionEventMode");let f=(()=>{class t{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=Object(s.s)()?Object(s.s)().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l),r.Hb(d,8))},t.\u0275dir=r.Cb({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&r.Tb("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:[r.wb([h])]}),t})();function p(t){return null==t||0===t.length}function g(t){return null!=t&&"number"==typeof t.length}const m=new r.q("NgValidators"),y=new r.q("NgAsyncValidators"),b=/^(?=.{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])?)*$/;class _{static min(t){return e=>{if(p(e.value)||p(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n{if(p(e.value)||p(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}static required(t){return p(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return p(t.value)||b.test(t.value)?null:{email:!0}}static minLength(t){return e=>p(e.value)||!g(e.value)?null:e.value.lengthg(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}static pattern(t){if(!t)return _.nullValidator;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),t=>{if(p(t.value))return null;const r=t.value;return e.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(v);return 0==e.length?null:function(t){return C(S(t,e))}}static composeAsync(t){if(!t)return null;const e=t.filter(v);return 0==e.length?null:function(t){const n=S(t,e).map(w);return Object(i.a)(n).pipe(Object(a.a)(C))}}}function v(t){return null!=t}function w(t){const e=Object(r.pb)(t)?Object(o.a)(t):t;return Object(r.ob)(e),e}function C(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function S(t,e){return e.map(e=>e(t))}function E(t){return t.map(t=>function(t){return!t.validate}(t)?t:e=>t.validate(e))}function O(t){return null!=t?_.compose(E(t)):null}function x(t){return null!=t?_.composeAsync(E(t)):null}function T(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function k(t){return t._rawValidators}function A(t){return t._rawAsyncValidators}let j=(()=>{class t{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=O(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=x(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Cb({type:t}),t})(),P=(()=>{class t extends j{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return I(e||t)},t.\u0275dir=r.Cb({type:t,features:[r.ub]}),t})();const I=r.Ob(P);class D extends j{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class R{constructor(t){this._cd=t}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}let N=(()=>{class t extends R{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(D,2))},t.\u0275dir=r.Cb({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&r.zb("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:[r.ub]}),t})(),L=(()=>{class t extends R{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(P,2))},t.\u0275dir=r.Cb({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&r.zb("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:[r.ub]}),t})();const V={provide:l,useExisting:Object(r.S)(()=>M),multi:!0};let M=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l))},t.\u0275dir=r.Cb({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&r.Tb("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[r.wb([V])]}),t})();const F={provide:l,useExisting:Object(r.S)(()=>U),multi:!0};let H=(()=>{class t{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),U=(()=>{class t{constructor(t,e,n,r){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=r,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(D),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l),r.Hb(H),r.Hb(r.r))},t.\u0275dir=r.Cb({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&r.Tb("change",function(){return e.onChange()})("blur",function(){return e.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[r.wb([F])]}),t})();const q={provide:l,useExisting:Object(r.S)(()=>z),multi:!0};let z=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l))},t.\u0275dir=r.Cb({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&r.Tb("change",function(t){return e.onChange(t.target.value)})("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[r.wb([q])]}),t})();const $={provide:l,useExisting:Object(r.S)(()=>Q),multi:!0};function B(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let Q=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=B(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(t){this.onChange=e=>{this.value=this._getOptionValue(e),t(this.value)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l))},t.\u0275dir=r.Cb({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&r.Tb("change",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},inputs:{compareWith:"compareWith"},features:[r.wb([$])]}),t})(),W=(()=>{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(B(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.l),r.Hb(r.D),r.Hb(Q,9))},t.\u0275dir=r.Cb({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const K={provide:l,useExisting:Object(r.S)(()=>Z),multi:!0};function G(t,e){return null==t?""+e:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let Z=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const n=t.map(t=>this._getOptionId(t));e=(t,e)=>{t._setSelected(n.indexOf(e.toString())>-1)}}else e=(t,e)=>{t._setSelected(!1)};this._optionMap.forEach(e)}registerOnChange(t){this.onChange=e=>{const n=[];if(void 0!==e.selectedOptions){const t=e.selectedOptions;for(let e=0;e{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(G(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(G(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.l),r.Hb(r.D),r.Hb(Z,9))},t.\u0275dir=r.Cb({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();function J(t,e){return[...e.path,t]}function Y(t,e){et(t,e,!0),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&rt(t,e)})}(t,e),function(t,e){const n=(t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&rt(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function(t,e){if(e.valueAccessor.setDisabledState){const n=t=>{e.valueAccessor.setDisabledState(t)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}(t,e)}function tt(t,e){t.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function et(t,e,n){const r=k(t);null!==e.validator?t.setValidators(T(r,e.validator)):"function"==typeof r&&t.setValidators([r]);const s=A(t);if(null!==e.asyncValidator?t.setAsyncValidators(T(s,e.asyncValidator)):"function"==typeof s&&t.setAsyncValidators([s]),n){const n=()=>t.updateValueAndValidity();tt(e._rawValidators,n),tt(e._rawAsyncValidators,n)}}function nt(t,e,n){if(null!==t){if(null!==e.validator){const n=k(t);Array.isArray(n)&&n.length>0&&t.setValidators(n.filter(t=>t!==e.validator))}if(null!==e.asyncValidator){const n=A(t);Array.isArray(n)&&n.length>0&&t.setAsyncValidators(n.filter(t=>t!==e.asyncValidator))}}if(n){const t=()=>{};tt(e._rawValidators,t),tt(e._rawAsyncValidators,t)}}function rt(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function st(t,e){et(t,e,!1)}function it(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}const ot=[u,z,M,Q,Z,U];function at(t,e){t._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function lt(t,e){if(!e)return null;Array.isArray(e);let n=void 0,r=void 0,s=void 0;return e.forEach(t=>{var e;t.constructor===f?n=t:(e=t,ot.some(t=>e.constructor===t)?r=t:s=t)}),s||r||n||null}function ct(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function ut(t){return(pt(t)?t.validators:t)||null}function ht(t){return Array.isArray(t)?O(t):t||null}function dt(t,e){return(pt(e)?e.asyncValidators:t)||null}function ft(t){return Array.isArray(t)?x(t):t||null}function pt(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class gt{constructor(t,e){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=ht(this._rawValidators),this._composedAsyncValidatorFn=ft(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return"VALID"===this.status}get invalid(){return"INVALID"===this.status}get pending(){return"PENDING"==this.status}get disabled(){return"DISABLED"===this.status}get enabled(){return"DISABLED"!==this.status}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._rawValidators=t,this._composedValidatorFn=ht(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=ft(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(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(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild(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(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){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)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;const e=w(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(e,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(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;let r=t;return e.forEach(t=>{r=r instanceof yt?r.controls.hasOwnProperty(t)?r.controls[t]:null:r instanceof bt&&r.at(t)||null}),r}(this,t)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new r.n,this.statusChanges=new r.n}_calculateStatus(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){pt(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class mt extends gt{constructor(t=null,e,n){super(ut(e),dt(n,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){ct(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){ct(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(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}}class yt extends gt{constructor(t,e,n){super(ut(e),dt(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e instanceof mt?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(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: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const e of Object.keys(this.controls)){const n=this.controls[e];if(this.contains(e)&&t(n))return!0}return!1}_reduceValue(){return this._reduceChildren({},(t,e,n)=>((e.enabled||this.disabled)&&(t[n]=e.value),t))}_reduceChildren(t,e){let n=t;return this._forEachChild((t,r)=>{n=e(n,t,r)}),n}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class bt extends gt{constructor(t,e,n){super(ut(e),dt(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof mt?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const _t={provide:P,useExisting:Object(r.S)(()=>wt)},vt=(()=>Promise.resolve(null))();let wt=(()=>{class t extends P{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new r.n,this.form=new yt({},O(t),x(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){vt.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),Y(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){vt.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),ct(this._directives,t)})}addFormGroup(t){vt.then(()=>{const e=this._findContainer(t.path),n=new yt({});st(n,t),e.registerControl(t.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){vt.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){vt.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,at(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(m,10),r.Hb(y,10))},t.\u0275dir=r.Cb({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&r.Tb("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.wb([_t]),r.ub]}),t})();const Ct={provide:D,useExisting:Object(r.S)(()=>Et)},St=(()=>Promise.resolve(null))();let Et=(()=>{class t extends D{constructor(t,e,n,s){super(),this.control=new mt,this._registered=!1,this.update=new r.n,this._parent=t,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=lt(0,s)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),it(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?J(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Y(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){St.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,n=""===e||e&&"false"!==e;St.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(P,9),r.Hb(m,10),r.Hb(y,10),r.Hb(l,10))},t.\u0275dir=r.Cb({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[r.wb([Ct]),r.ub,r.vb]}),t})(),Ot=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Cb({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const xt=new r.q("NgModelWithFormControlWarning"),Tt={provide:P,useExisting:Object(r.S)(()=>kt)};let kt=(()=>{class t extends P{constructor(t,e){super(),this.validators=t,this.asyncValidators=e,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new r.n,this._setValidators(t),this._setAsyncValidators(e)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return Y(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){ct(this.directives,t)}addFormGroup(t){const e=this.form.get(t.path);st(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormGroup(t){}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){const e=this.form.get(t.path);st(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormArray(t){}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,at(this.form,this.directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=this.form.get(t.path);t.control!==e&&(function(t,e){const n=()=>{};e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n),nt(t,e,!0),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}(t.control||null,t),e&&Y(e,t),t.control=e)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){et(this.form,this,!1),this._oldForm&&nt(this._oldForm,this,!1)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(m,10),r.Hb(y,10))},t.\u0275dir=r.Cb({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&r.Tb("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.wb([Tt]),r.ub,r.vb]}),t})();const At={provide:D,useExisting:Object(r.S)(()=>jt)};let jt=(()=>{class t extends D{constructor(t,e,n,s,i){super(),this._ngModelWarningConfig=i,this._added=!1,this.update=new r.n,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=lt(0,s)}set isDisabled(t){}ngOnChanges(e){var n,s;this._added||this._setUpControl(),it(e,this.viewModel)&&(n=t,this,s=this._ngModelWarningConfig,Object(r.T)()&&"never"!==s&&((null!==s&&"once"!==s||n._ngModelWarningSentOnce)&&("always"!==s||this._ngModelWarningSent)||(n._ngModelWarningSentOnce=!0,this._ngModelWarningSent=!0)),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return J(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(P,13),r.Hb(m,10),r.Hb(y,10),r.Hb(l,10),r.Hb(xt,8))},t.\u0275dir=r.Cb({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[r.wb([At]),r.ub,r.vb]}),t._ngModelWarningSentOnce=!1,t})(),Pt=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)}}),t})(),It=(()=>{class t{group(t,e=null){const n=this._reduceControls(t);let r=null,s=null,i=void 0;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(r=null!=e.validators?e.validators:null,s=null!=e.asyncValidators?e.asyncValidators:null,i=null!=e.updateOn?e.updateOn:void 0):(r=null!=e.validator?e.validator:null,s=null!=e.asyncValidator?e.asyncValidator:null)),new yt(n,{asyncValidators:s,updateOn:i,validators:r})}control(t,e,n){return new mt(t,e,n)}array(t,e,n){const r=t.map(t=>this._createControl(t));return new bt(r,e,n)}_reduceControls(t){const e={};return Object.keys(t).forEach(n=>{e[n]=this._createControl(t[n])}),e}_createControl(t){return t instanceof mt||t instanceof yt||t instanceof bt?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),Dt=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[H],imports:[Pt]}),t})(),Rt=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:xt,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[It,H],imports:[Pt]}),t})()},"44N4":function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("fXoL"),s=n("1F7/"),i=n("ofXK");const o=function(t){return{"font-size":t}};function a(t,e){if(1&t){const t=r.Nb();r.Mb(0,"div",4),r.Mb(1,"label",5),r.oc(2),r.Lb(),r.Mb(3,"button",6),r.Tb("click",function(){return r.hc(t),r.Vb().close()}),r.oc(4,"\u2716"),r.Lb(),r.Lb()}if(2&t){const t=r.Vb();r.xb(1),r.ac("ngStyle",r.dc(2,o,t.modalTitle.length>20?"2.2vh":"3vh")),r.xb(1),r.pc(t.modalTitle)}}const l=function(t){return{"z-index":t}},c=["*"];let u=(()=>{class t{constructor(t,e){this._modalService=t,this._el=e,this.id="",this.modalTitle="",this.showHeader=!0,this.scrollable=!0,this.zIndex=1,this.applyStyling=()=>`${!this.modalBodyStyle&&"modal-body-height modal-body-width modal-body-margin"} ${this.scrollable&&"scroll"}`,this.keyDownEvent=({key:t})=>{"modal-create-project"!==this.id&&"modal-import-project"!==this.id&&"Escape"===t&&this.close()},this.element=this._el.nativeElement}ngOnInit(){1!==this.zIndex&&(this.modalBodyStyle.zIndex=(2e3*this.zIndex).toString()),this.id?(this._modalService.add(this),this.close()):console.error("modal must have an id")}ngOnDestroy(){this._modalService.remove(this.id),this.element.remove()}open(){this.element.style.display="block",document.body.classList.add("modal-open")}close(){this.element.style.display="none",document.body.classList.remove("modal-open")}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(s.a),r.Hb(r.l))},t.\u0275cmp=r.Bb({type:t,selectors:[["modal"]],hostBindings:function(t,e){1&t&&r.Tb("keydown",function(t){return e.keyDownEvent(t)},!1,r.gc)},inputs:{id:"id",modalBodyStyle:"modalBodyStyle",modalTitle:"modalTitle",showHeader:"showHeader",scrollable:"scrollable",zIndex:"zIndex"},ngContentSelectors:c,decls:5,vars:6,consts:[[1,"modal"],[1,"modal-body",3,"ngStyle","ngClass"],["class","modal-header-container",4,"ngIf"],[1,"modal-background",3,"ngStyle","click"],[1,"modal-header-container"],[2,"text-indent","0.5vw","padding-left","0.2vw",3,"ngStyle"],[1,"modal-button","close-button","float-right",3,"click"]],template:function(t,e){1&t&&(r.Zb(),r.Mb(0,"div",0),r.Mb(1,"div",1),r.mc(2,a,5,4,"div",2),r.Yb(3),r.Lb(),r.Lb(),r.Mb(4,"div",3),r.Tb("click",function(){return e.close()}),r.Lb()),2&t&&(r.xb(1),r.ac("ngStyle",e.modalBodyStyle)("ngClass",e.applyStyling()),r.xb(1),r.ac("ngIf",e.showHeader),r.xb(2),r.ac("ngStyle",r.dc(4,l,1e3*e.zIndex)))},directives:[i.l,i.i,i.k],styles:[".modal{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.modal-body{border-radius:1vw;padding:1.5vw;background:#262a2e;color:#fff;position:absolute;z-index:2000}.modal-body-height{min-height:75%;max-height:80%}.modal-body-width{min-width:50%;max-width:50%}.modal-header-container{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;align-items:center}.modal-button,.modal-header-container{font-size:1vw;padding:.5vw;background:#262a2e;color:azure}.modal-button{line-height:1vh}.close-button{border:none;cursor:pointer}.float-right{float:right}.modal-body-margin{left:25%;top:10%}.scroll{overflow-y:auto}.scroll::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px}.scroll::-webkit-scrollbar{width:.5vw}.scroll::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.modal-background{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.75}body.modal-open{overflow:hidden}"],encapsulation:2}),t})()},"4I5i":function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})()},"5+tZ":function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("lJxs"),s=n("Cfvw"),i=n("zx2A");function o(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(o((n,i)=>Object(s.a)(t(n,i)).pipe(Object(r.a)((t,r)=>e(n,t,i,r))),n)):("number"==typeof e&&(n=e),e=>e.lift(new a(t,n)))}class a{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new l(t,this.project,this.concurrent))}}class l extends i.b{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}},"7o/Q":function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("n6bG"),s=n("gRHU"),i=n("quSY"),o=n("2QA8"),a=n("2fFW"),l=n("NJ4a");class c extends i.a{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.a;break;case 1:if(!t){this.destination=s.a;break}if("object"==typeof t){t instanceof c?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new u(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new u(this,t,e,n)}}[o.a](){return this}static create(t,e,n){const r=new c(t,e,n);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class u extends c{constructor(t,e,n,i){let o;super(),this._parentSubscriber=t;let a=this;Object(r.a)(e)?o=e:e&&(o=e.next,n=e.error,i=e.complete,e!==s.a&&(a=Object.create(e),Object(r.a)(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=o,this._error=n,this._complete=i}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;a.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=a.a;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(l.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(l.a)(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);a.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),a.a.useDeprecatedSynchronousErrorHandling)throw n;Object(l.a)(n)}}__tryOrSetError(t,e,n){if(!a.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return a.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(Object(l.a)(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}},"9ppp":function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})()},Cfvw:function(t,e,n){"use strict";n.d(e,"a",function(){return h});var r=n("HDdC"),s=n("SeVD"),i=n("quSY"),o=n("kJWO"),a=n("jZKg"),l=n("Lhse"),c=n("c2HN"),u=n("I55L");function h(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.a]}(t))return function(t,e){return new r.a(n=>{const r=new i.a;return r.add(e.schedule(()=>{const s=t[o.a]();r.add(s.subscribe({next(t){r.add(e.schedule(()=>n.next(t)))},error(t){r.add(e.schedule(()=>n.error(t)))},complete(){r.add(e.schedule(()=>n.complete()))}}))})),r})}(t,e);if(Object(c.a)(t))return function(t,e){return new r.a(n=>{const r=new i.a;return r.add(e.schedule(()=>t.then(t=>{r.add(e.schedule(()=>{n.next(t),r.add(e.schedule(()=>n.complete()))}))},t=>{r.add(e.schedule(()=>n.error(t)))}))),r})}(t,e);if(Object(u.a)(t))return Object(a.a)(t,e);if(function(t){return t&&"function"==typeof t[l.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.a(n=>{const r=new i.a;let s;return r.add(()=>{s&&"function"==typeof s.return&&s.return()}),r.add(e.schedule(()=>{s=t[l.a](),r.add(e.schedule(function(){if(n.closed)return;let t,e;try{const n=s.next();t=n.value,e=n.done}catch(r){return void n.error(r)}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 r.a?t:new r.a(Object(s.a)(t))}},DH7j:function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))()},EY2u:function(t,e,n){"use strict";n.d(e,"a",function(){return s}),n.d(e,"b",function(){return i});var r=n("HDdC");const s=new r.a(t=>t.complete());function i(t){return t?function(t){return new r.a(e=>t.schedule(()=>e.complete()))}(t):s}},F7l1:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("2Vo4"),s=n("fXoL");let i=(()=>{class t{constructor(){this.toggleSpinnerSubject=new r.a(!1)}returnAsObservable(){return this.toggleSpinnerSubject.asObservable()}showSpinner(){this.toggleSpinnerSubject.next(!0)}hideSpinner(){this.toggleSpinnerSubject.next(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},GyhO:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("LRne"),s=n("0EUg");function i(...t){return Object(s.a)()(Object(r.a)(...t))}},HDdC:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("7o/Q"),s=n("2QA8"),i=n("gRHU"),o=n("kJWO"),a=n("SpAZ"),l=n("2fFW");let c=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:o}=this,a=function(t,e,n){if(t){if(t instanceof r.a)return t;if(t[s.a])return t[s.a]()}return t||e||n?new r.a(t,e,n):new r.a(i.a)}(t,e,n);if(a.add(o?o.call(a,this.source):this.source||l.a.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),l.a.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a}_trySubscribe(t){try{return this._subscribe(t)}catch(e){l.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:s}=t;if(e||s)return!1;t=n&&n instanceof r.a?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=u(e))((e,n)=>{let r;r=this.subscribe(e=>{try{t(e)}catch(s){n(s),r&&r.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[o.a](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?a.a:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=u(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function u(t){if(t||(t=l.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},I55L:function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=t=>t&&"number"==typeof t.length&&"function"!=typeof t},I7yr:function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n("2Vo4"),s=n("SxV6"),i=n("fXoL"),o=n("sYmb");let a=(()=>{class t{constructor(t){this._translate=t,this.languageSubject=new r.a(""),this.language$=this.languageSubject.asObservable(),this.filterLanguageList=(t,e)=>t.map(t=>t.startsWith(e)?t:null).filter(t=>null!==t),this.initializeLanguage=(t,e)=>{const n=e.map((t,n)=>e.length===n+1?t+"/":`/${t}|`).join(" ").replace(/ /g,"");this._translate.addLangs(e),this.language$.pipe(Object(s.a)()).subscribe(e=>{const r=e||localStorage.getItem("language")||"en";this.setTranslation(t,r,n)})},this.setTranslation=(t,e,n)=>{const r=this._translate.getBrowserLang();this._translate.use(r.match(n)?r:`${t}-${e}`)}}setLanguageState(t){const e=t.length>2?t.slice(-2):t;this.languageSubject.next(e),localStorage.setItem("language",e)}}return t.\u0275fac=function(e){return new(e||t)(i.Qb(o.d))},t.\u0275prov=i.Db({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},IjjT:function(t,e,n){"use strict";n.d(e,"a",function(){return s});let r=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class s extends r{constructor(t,e=r.now){super(t,()=>s.delegate&&s.delegate!==this?s.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return s.delegate&&s.delegate!==this?s.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let 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}}}},IzEk:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("7o/Q"),s=n("4I5i"),i=n("EY2u");function o(t){return e=>0===t?Object(i.b)():e.lift(new a(t))}class a{constructor(t){if(this.total=t,this.total<0)throw new s.a}call(t,e){return e.subscribe(new l(t,this.total))}}class l extends r.a{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}},"KZX/":function(t,e,n){"use strict";n.d(e,"a",function(){return v});var r=n("ofXK"),s=n("sYmb"),i=n("RKnZ"),o=n("fXoL");let a=(()=>{class t{}return t.\u0275mod=o.Fb({type:t}),t.\u0275inj=o.Eb({factory:function(e){return new(e||t)},imports:[[r.b,s.b,i.a]]}),t})(),l=(()=>{class t{}return t.\u0275mod=o.Fb({type:t}),t.\u0275inj=o.Eb({factory:function(e){return new(e||t)},imports:[[r.b]]}),t})(),c=(()=>{class t{intercept(t,e){const n=t.clone({setHeaders:{"Cache-Control":"no-cache",Pragma:"no-cache"}});return e.handle(n)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Db({token:t,factory:t.\u0275fac}),t})();var u=n("3Pt+"),h=n("tk/3"),d=n("I7yr"),f=n("vkgz"),p=n("F7l1");let g=(()=>{class t{constructor(t){this._spinner=t,this.pendingRequestsCount=0}intercept(t,e){return this.pendingRequestsCount++,this._spinner.showSpinner(),e.handle(t).pipe(Object(f.a)(t=>{if(t instanceof h.e){this.pendingRequestsCount--;const e=t.url?t.url.toString().split("/"):"";0===this.pendingRequestsCount&&"importstatus"!==e[e.length-1]&&"folders"!==e[e.length-1]&&"labelfiles"!==e[e.length-1]&&this._spinner.hideSpinner()}},t=>{t instanceof h.d&&(this.pendingRequestsCount--,this._spinner.hideSpinner())}))}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(p.a))},t.\u0275prov=o.Db({token:t,factory:t.\u0275fac}),t})();var m=n("O+1G");let y=(()=>{class t{}return t.\u0275mod=o.Fb({type:t}),t.\u0275inj=o.Eb({factory:function(e){return new(e||t)},imports:[[r.b]]}),t})();class b{constructor(t,e="/assets/i18n/",n=".json"){this.http=t,this.prefix=e,this.suffix=n}getTranslation(t){return this.http.get(`${this.prefix}${t}${this.suffix}`)}}const _=t=>new b(t,"../assets/i18n/",".json");let v=(()=>{class t{}return t.\u0275mod=o.Fb({type:t}),t.\u0275inj=o.Eb({factory:function(e){return new(e||t)},providers:[d.a,{provide:h.a,useClass:c,multi:!0},{provide:h.a,useClass:g,multi:!0}],imports:[[r.b,u.e,u.k,i.a,a,y,l,m.a,s.b.forRoot({loader:{provide:s.a,useFactory:_,deps:[h.b]}})],i.a,a,y,l,m.a,u.e,u.k,s.b]}),t})()},LRne:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("z+Ro"),s=n("yCtX"),i=n("jZKg");function o(...t){let e=t[t.length-1];return Object(r.a)(e)?(t.pop(),Object(i.a)(t,e)):Object(s.a)(t)}},Lhse:function(t,e,n){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",function(){return s});const s=r()},NJ4a:function(t,e,n){"use strict";function r(t){setTimeout(()=>{throw t},0)}n.d(e,"a",function(){return r})},NXyV:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("HDdC"),s=n("Cfvw"),i=n("EY2u");function o(t){return new r.a(e=>{let n;try{n=t()}catch(r){return void e.error(r)}return(n?Object(s.a)(n):Object(i.b)()).subscribe(e)})}},"O+1G":function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n("ofXK"),s=n("tyNb"),i=n("sYmb"),o=n("fXoL");let a=(()=>{class t{}return t.\u0275mod=o.Fb({type:t}),t.\u0275inj=o.Eb({factory:function(e){return new(e||t)},imports:[[r.b,s.d,i.b]]}),t})()},RKnZ:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("ofXK"),s=n("fXoL");let i=(()=>{class t{}return t.\u0275mod=s.Fb({type:t}),t.\u0275inj=s.Eb({factory:function(e){return new(e||t)},imports:[[r.b]]}),t})()},SeVD:function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("ngJS"),s=n("NJ4a"),i=n("Lhse"),o=n("kJWO"),a=n("I55L"),l=n("c2HN"),c=n("XoHu");const u=t=>{if(t&&"function"==typeof t[o.a])return u=t,t=>{const e=u[o.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(a.a)(t))return Object(r.a)(t);if(Object(l.a)(t))return n=t,t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,s.a),t);if(t&&"function"==typeof t[i.a])return e=t,t=>{const n=e[i.a]();for(;;){let e;try{e=n.next()}catch(r){return t.error(r),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=Object(c.a)(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n,u}},SpAZ:function(t,e,n){"use strict";function r(t){return t}n.d(e,"a",function(){return r})},SxV6:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("sVev"),s=n("pLZG"),i=n("IzEk"),o=n("xbPD"),a=n("XDbj"),l=n("SpAZ");function c(t,e){const n=arguments.length>=2;return c=>c.pipe(t?Object(s.a)((e,n)=>t(e,n,c)):l.a,Object(i.a)(1),n?Object(o.a)(e):Object(a.a)(()=>new r.a))}},XDbj:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("sVev"),s=n("7o/Q");function i(t=l){return e=>e.lift(new o(t))}class o{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new a(t,this.errorFactory))}}class a extends s.a{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function l(){return new r.a}},XNiG:function(t,e,n){"use strict";n.d(e,"b",function(){return c}),n.d(e,"a",function(){return u});var r=n("HDdC"),s=n("7o/Q"),i=n("quSY"),o=n("9ppp"),a=n("Ylt2"),l=n("2QA8");class c extends s.a{constructor(t){super(t),this.destination=t}}let u=(()=>{class t extends r.a{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[l.a](){return new c(this)}lift(t){const e=new h(this,this);return e.operator=t,e}next(t){if(this.closed)throw new o.a;if(!this.isStopped){const{observers:e}=this,n=e.length,r=e.slice();for(let s=0;snew h(t,e),t})();class h extends u{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):i.a.EMPTY}}},XoHu:function(t,e,n){"use strict";function r(t){return null!==t&&"object"==typeof t}n.d(e,"a",function(){return r})},Ylt2:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("quSY");class s extends r.a{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},bHdf:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("5+tZ"),s=n("SpAZ");function i(t=Number.POSITIVE_INFINITY){return Object(r.a)(s.a,t)}},bOdf:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("5+tZ");function s(t,e){return Object(r.a)(t,e,1)}},c2HN:function(t,e,n){"use strict";function r(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",function(){return r})},cp0P:function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n("HDdC"),s=n("DH7j"),i=n("lJxs"),o=n("XoHu"),a=n("Cfvw");function l(...t){if(1===t.length){const e=t[0];if(Object(s.a)(e))return c(e,null);if(Object(o.a)(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return c(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return c(t=1===t.length&&Object(s.a)(t[0])?t[0]:t,null).pipe(Object(i.a)(t=>e(...t)))}return c(t,null)}function c(t,e){return new r.a(n=>{const r=t.length;if(0===r)return void n.complete();const s=new Array(r);let i=0,o=0;for(let l=0;l{u||(u=!0,o++),s[l]=t},error:t=>n.error(t),complete:()=>{i++,i!==r&&u||(o===r&&n.next(e?e.reduce((t,e,n)=>(t[e]=s[n],t),{}):s),n.complete())}}))}})}},eIep:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("lJxs"),s=n("Cfvw"),i=n("zx2A");function o(t,e){return"function"==typeof e?n=>n.pipe(o((n,i)=>Object(s.a)(t(n,i)).pipe(Object(r.a)((t,r)=>e(n,t,i,r))))):e=>e.lift(new a(t))}class a{constructor(t){this.project=t}call(t,e){return e.subscribe(new l(t,this.project))}}class l extends i.b{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const n=new i.a(this),r=this.destination;r.add(n),this.innerSubscription=Object(i.c)(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}},fXoL:function(t,e,n){"use strict";n.d(e,"a",function(){return V}),n.d(e,"b",function(){return $l}),n.d(e,"c",function(){return Fl}),n.d(e,"d",function(){return Vl}),n.d(e,"e",function(){return Ml}),n.d(e,"f",function(){return Rc}),n.d(e,"g",function(){return Ec}),n.d(e,"h",function(){return Va}),n.d(e,"i",function(){return ec}),n.d(e,"j",function(){return ua}),n.d(e,"k",function(){return Wl}),n.d(e,"l",function(){return pa}),n.d(e,"m",function(){return Tr}),n.d(e,"n",function(){return ml}),n.d(e,"o",function(){return di}),n.d(e,"p",function(){return _}),n.d(e,"q",function(){return L}),n.d(e,"r",function(){return ki}),n.d(e,"s",function(){return Pa}),n.d(e,"t",function(){return Ia}),n.d(e,"u",function(){return Ql}),n.d(e,"v",function(){return Ka}),n.d(e,"w",function(){return xc}),n.d(e,"x",function(){return Wa}),n.d(e,"y",function(){return _c}),n.d(e,"z",function(){return sc}),n.d(e,"A",function(){return v}),n.d(e,"B",function(){return zl}),n.d(e,"C",function(){return ql}),n.d(e,"D",function(){return ma}),n.d(e,"E",function(){return ga}),n.d(e,"F",function(){return Ir}),n.d(e,"G",function(){return ba}),n.d(e,"H",function(){return An}),n.d(e,"I",function(){return C}),n.d(e,"J",function(){return Ac}),n.d(e,"K",function(){return za}),n.d(e,"L",function(){return dc}),n.d(e,"M",function(){return K}),n.d(e,"N",function(){return _a}),n.d(e,"O",function(){return Za}),n.d(e,"P",function(){return rt}),n.d(e,"Q",function(){return vc}),n.d(e,"R",function(){return sn}),n.d(e,"S",function(){return B}),n.d(e,"T",function(){return rn}),n.d(e,"U",function(){return Ic}),n.d(e,"V",function(){return gc}),n.d(e,"W",function(){return Bl}),n.d(e,"X",function(){return pi}),n.d(e,"Y",function(){return Xo}),n.d(e,"Z",function(){return Tn}),n.d(e,"ab",function(){return un}),n.d(e,"bb",function(){return Ke}),n.d(e,"cb",function(){return Ze}),n.d(e,"db",function(){return tn}),n.d(e,"eb",function(){return Je}),n.d(e,"fb",function(){return Xe}),n.d(e,"gb",function(){return Ye}),n.d(e,"hb",function(){return Wo}),n.d(e,"ib",function(){return Pc}),n.d(e,"jb",function(){return Ko}),n.d(e,"kb",function(){return Go}),n.d(e,"lb",function(){return Ge}),n.d(e,"mb",function(){return z}),n.d(e,"nb",function(){return Mi}),n.d(e,"ob",function(){return so}),n.d(e,"pb",function(){return ro}),n.d(e,"qb",function(){return Qo}),n.d(e,"rb",function(){return Ht}),n.d(e,"sb",function(){return S}),n.d(e,"tb",function(){return We}),n.d(e,"ub",function(){return ji}),n.d(e,"vb",function(){return Vn}),n.d(e,"wb",function(){return aa}),n.d(e,"xb",function(){return ys}),n.d(e,"yb",function(){return zi}),n.d(e,"zb",function(){return Oo}),n.d(e,"Ab",function(){return jl}),n.d(e,"Bb",function(){return pt}),n.d(e,"Cb",function(){return wt}),n.d(e,"Db",function(){return T}),n.d(e,"Eb",function(){return k}),n.d(e,"Fb",function(){return bt}),n.d(e,"Gb",function(){return Ct}),n.d(e,"Hb",function(){return Wi}),n.d(e,"Ib",function(){return Yi}),n.d(e,"Jb",function(){return eo}),n.d(e,"Kb",function(){return to}),n.d(e,"Lb",function(){return Ji}),n.d(e,"Mb",function(){return Xi}),n.d(e,"Nb",function(){return no}),n.d(e,"Ob",function(){return Sr}),n.d(e,"Pb",function(){return qo}),n.d(e,"Qb",function(){return Vt}),n.d(e,"Rb",function(){return Ki}),n.d(e,"Sb",function(){return Ll}),n.d(e,"Tb",function(){return io}),n.d(e,"Ub",function(){return Pl}),n.d(e,"Vb",function(){return lo}),n.d(e,"Wb",function(){return pl}),n.d(e,"Xb",function(){return gl}),n.d(e,"Yb",function(){return ho}),n.d(e,"Zb",function(){return uo}),n.d(e,"ac",function(){return Gi}),n.d(e,"bc",function(){return fo}),n.d(e,"cc",function(){return hl}),n.d(e,"dc",function(){return dl}),n.d(e,"ec",function(){return kl}),n.d(e,"fc",function(){return Qi}),n.d(e,"gc",function(){return jr}),n.d(e,"hc",function(){return de}),n.d(e,"ic",function(){return jn}),n.d(e,"jc",function(){return Pn}),n.d(e,"kc",function(){return _t}),n.d(e,"lc",function(){return xo}),n.d(e,"mc",function(){return Bi}),n.d(e,"nc",function(){return Nl}),n.d(e,"oc",function(){return Vo}),n.d(e,"pc",function(){return Mo}),n.d(e,"qc",function(){return Fo}),n.d(e,"rc",function(){return Ho}),n.d(e,"sc",function(){return Uo}),n.d(e,"tc",function(){return Al});var r=n("XNiG"),s=n("quSY"),i=n("HDdC"),o=n("z+Ro"),a=n("bHdf"),l=n("yCtX"),c=n("7o/Q");function u(){return function(t){return t.lift(new h(t))}}class h{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const r=new d(t,n),s=e.subscribe(r);return r.closed||(r.connection=n.connect()),s}}class d extends c.a{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}class f extends i.a{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new s.a,t.add(this.source.subscribe(new g(this.getSubject(),this))),t.closed&&(this._connection=null,t=s.a.EMPTY)),t}refCount(){return u()(this)}}const p=(()=>{const t=f.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class g extends r.b{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function m(){return new r.a}function y(t){return{toString:t}.toString()}function b(t,e,n){return y(()=>{const r=function(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}(e);function s(...t){if(this instanceof s)return r.apply(this,t),this;const e=new s(...t);return n.annotation=e,n;function n(t,n,r){const s=t.hasOwnProperty("__parameters__")?t.__parameters__:Object.defineProperty(t,"__parameters__",{value:[]}).__parameters__;for(;s.length<=r;)s.push(null);return(s[r]=s[r]||[]).push(e),t}}return n&&(s.prototype=Object.create(n.prototype)),s.prototype.ngMetadataName=t,s.annotationCls=s,s})}const _=b("Inject",t=>({token:t})),v=b("Optional"),w=b("Self"),C=b("SkipSelf");function S(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(S).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function E(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}function O(t){for(let e in t)if(t[e]===O)return e;throw Error("Could not find renamed property on target object.")}function x(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function T(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function k(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function A(t){return j(t,I)||j(t,R)}function j(t,e){return t.hasOwnProperty(e)?t[e]:null}function P(t){return t&&(t.hasOwnProperty(D)||t.hasOwnProperty(N))?t[D]:null}const I=O({\u0275prov:O}),D=O({\u0275inj:O}),R=O({ngInjectableDef:O}),N=O({ngInjectorDef:O});class L{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=T({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return"InjectionToken "+this._desc}}const V=new L("AnalyzeForEntryComponents");var M=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({});const F="undefined"!=typeof globalThis&&globalThis,H="undefined"!=typeof window&&window,U="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,q="undefined"!=typeof global&&global,z=F||q||H||U,$=O({__forward_ref__:O});function B(t){return t.__forward_ref__=B,t.toString=function(){return S(this())},t}function Q(t){return W(t)?t():t}function W(t){return"function"==typeof t&&t.hasOwnProperty($)&&t.__forward_ref__===B}const K=Function;function G(t,e){void 0===e&&(e=t);for(let n=0;nArray.isArray(t)?Z(t,e):e(t))}function X(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function J(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Y(t,e){const n=[];for(let r=0;r=0?t[1|r]=n:(r=~r,function(t,e,n,r){let s=t.length;if(s==e)t.push(n,r);else if(1===s)t.push(r,t[0]),t[0]=n;else{for(s--,t.push(t[s-1],t[s]);s>e;)t[s]=t[s-2],s--;t[e]=n,t[e+1]=r}}(t,r,e,n)),r}function et(t,e){const n=nt(t,e);if(n>=0)return t[1|n]}function nt(t,e){return function(t,e,n){let r=0,s=t.length>>1;for(;s!==r;){const n=r+(s-r>>1),i=t[n<<1];if(e===i)return n<<1;i>e?s=n:r=n+1}return~(s<<1)}(t,e)}var rt=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({});const st={},it=[],ot=O({\u0275cmp:O}),at=O({\u0275dir:O}),lt=O({\u0275pipe:O}),ct=O({\u0275mod:O}),ut=O({\u0275loc:O}),ht=O({\u0275fac:O}),dt=O({__NG_ELEMENT_ID__:O});let ft=0;function pt(t){return y(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===M.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||it,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||rt.Emulated,id:"c",styles:t.styles||it,_:null,setInput:null,schemas:t.schemas||null,tView:null},r=t.directives,s=t.features,i=t.pipes;return n.id+=ft++,n.inputs=vt(t.inputs,e),n.outputs=vt(t.outputs),s&&s.forEach(t=>t(n)),n.directiveDefs=r?()=>("function"==typeof r?r():r).map(gt):null,n.pipeDefs=i?()=>("function"==typeof i?i():i).map(mt):null,n})}function gt(t){return St(t)||function(t){return t[at]||null}(t)}function mt(t){return function(t){return t[lt]||null}(t)}const yt={};function bt(t){const e={type:t.type,bootstrap:t.bootstrap||it,declarations:t.declarations||it,imports:t.imports||it,exports:t.exports||it,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&y(()=>{yt[t.id]=t.type}),e}function _t(t,e){return y(()=>{const n=Et(t,!0);n.declarations=e.declarations||it,n.imports=e.imports||it,n.exports=e.exports||it})}function vt(t,e){if(null==t)return st;const n={};for(const r in t)if(t.hasOwnProperty(r)){let s=t[r],i=s;Array.isArray(s)&&(i=s[1],s=s[0]),n[s]=r,e&&(e[s]=i)}return n}const wt=pt;function Ct(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function St(t){return t[ot]||null}function Et(t,e){const n=t[ct]||null;if(!n&&!0===e)throw new Error(`Type ${S(t)} does not have '\u0275mod' property.`);return n}function Ot(t){return"string"==typeof t?t:null==t?"":""+t}function xt(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Ot(t)}var Tt=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}({});let kt;function At(t){const e=kt;return kt=t,e}function jt(t,e,n){const r=A(t);if(r&&"root"==r.providedIn)return void 0===r.value?r.value=r.factory():r.value;if(n&Tt.Optional)return null;if(void 0!==e)return e;throw new Error(`Injector: NOT_FOUND [${S(t)}]`)}const Pt={},It=/\n/gm,Dt=O({provide:String,useValue:O});let Rt=void 0;function Nt(t){const e=Rt;return Rt=t,e}function Lt(t,e=Tt.Default){if(void 0===Rt)throw new Error("inject() must be called from an injection context");return null===Rt?jt(t,void 0,e):Rt.get(t,e&Tt.Optional?null:void 0,e)}function Vt(t,e=Tt.Default){return(kt||Lt)(Q(t),e)}function Mt(t){const e=[];for(let n=0;nUt()};function Zt(t){for(;Array.isArray(t);)t=t[0];return t}function Xt(t,e){return Zt(e[t])}function Jt(t,e){return Zt(e[t.index])}function Yt(t,e){return t.data[e]}function te(t,e){return t[e]}function ee(t,e){const n=e[t];return qt(n)?n:n[0]}function ne(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function re(t){return 4==(4&t[2])}function se(t){return 128==(128&t[2])}function ie(t,e){return null==e?null:t[e]}function oe(t){t[18]=0}function ae(t,e){t[5]+=e;let n=t,r=t[3];for(;null!==r&&(1===e&&1===n[5]||-1===e&&0===n[5]);)r[5]+=e,n=r,r=r[3]}const le={lFrame:Ie(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function ce(){return le.bindingsEnabled}function ue(){return le.lFrame.lView}function he(){return le.lFrame.tView}function de(t){le.lFrame.contextLView=t}function fe(){let t=pe();for(;null!==t&&64===t.type;)t=t.parent;return t}function pe(){return le.lFrame.currentTNode}function ge(t,e){const n=le.lFrame;n.currentTNode=t,n.isParent=e}function me(){return le.lFrame.isParent}function ye(){le.lFrame.isParent=!1}function be(){return le.isInCheckNoChangesMode}function _e(t){le.isInCheckNoChangesMode=t}function ve(){const t=le.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function we(){return le.lFrame.bindingIndex}function Ce(){return le.lFrame.bindingIndex++}function Se(t){const e=le.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function Ee(t,e){const n=le.lFrame;n.bindingIndex=n.bindingRootIndex=t,Oe(e)}function Oe(t){le.lFrame.currentDirectiveIndex=t}function xe(){return le.lFrame.currentQueryIndex}function Te(t){le.lFrame.currentQueryIndex=t}function ke(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function Ae(t,e,n){if(n&Tt.SkipSelf){let r=e,s=t;for(;r=r.parent,!(null!==r||n&Tt.Host||(r=ke(s),null===r)||(s=s[15],10&r.type)););if(null===r)return!1;e=r,t=s}const r=le.lFrame=Pe();return r.currentTNode=e,r.lView=t,!0}function je(t){const e=Pe(),n=t[1];le.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function Pe(){const t=le.lFrame,e=null===t?null:t.child;return null===e?Ie(t):e}function Ie(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function De(){const t=le.lFrame;return le.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Re=De;function Ne(){const t=De();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Le(){return le.lFrame.selectedIndex}function Ve(t){le.lFrame.selectedIndex=t}function Me(){const t=le.lFrame;return Yt(t.tView,t.selectedIndex)}let Fe;function He(t){var e;return(null===(e=function(){if(void 0===Fe&&(Fe=null,z.trustedTypes))try{Fe=z.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(e){}return Fe}())||void 0===e?void 0:e.createHTML(t))||t}class Ue{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}class qe extends Ue{getTypeName(){return"HTML"}}class ze extends Ue{getTypeName(){return"Style"}}class $e extends Ue{getTypeName(){return"Script"}}class Be extends Ue{getTypeName(){return"URL"}}class Qe extends Ue{getTypeName(){return"ResourceURL"}}function We(t){return t instanceof Ue?t.changingThisBreaksApplicationSecurity:t}function Ke(t,e){const n=Ge(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see http://g.co/ng/security#xss)`)}return n===e}function Ge(t){return t instanceof Ue&&t.getTypeName()||null}function Ze(t){return new qe(t)}function Xe(t){return new ze(t)}function Je(t){return new $e(t)}function Ye(t){return new Be(t)}function tn(t){return new Qe(t)}let en=!0,nn=!1;function rn(){return nn=!0,en}function sn(){if(nn)throw new Error("Cannot enable prod mode after platform setup.");en=!1}class on{getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(He(t),"text/html").body;return e.removeChild(e.firstChild),e}catch(e){return null}}}class an{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const e=this.inertDocument.createElement("body");t.appendChild(e)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=He(t),e;const n=this.inertDocument.createElement("body");return n.innerHTML=He(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(t){const e=t.attributes;for(let r=e.length-1;0un(t.trim())).join(", ")),this.buf.push(" ",e,'="',On(o),'"')}var r;return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();yn.hasOwnProperty(e)&&!fn.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(On(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e}}const Sn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,En=/([^\#-~ |!])/g;function On(t){return t.replace(/&/g,"&").replace(Sn,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(En,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let xn;function Tn(t,e){let n=null;try{xn=xn||function(t){return function(){try{return!!(new window.DOMParser).parseFromString(He(""),"text/html")}catch(t){return!1}}()?new on:new an(t)}(t);let r=e?String(e):"";n=xn.getInertBodyElement(r);let s=5,i=r;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,r=i,i=n.innerHTML,n=xn.getInertBodyElement(r)}while(r!==i);const o=new Cn,a=o.sanitizeChildren(kn(n)||n);return rn()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),a}finally{if(n){const t=kn(n)||n;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function kn(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var An=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function jn(t){const e=In();return e?e.sanitize(An.HTML,t)||"":Ke(t,"HTML")?We(t):Tn(Ut(),Ot(t))}function Pn(t){const e=In();return e?e.sanitize(An.URL,t)||"":Ke(t,"URL")?We(t):un(Ot(t))}function In(){const t=ue();return t&&t[12]}function Dn(t,e){return t.hasOwnProperty(ht)?t[ht]:null}class Rn extends Error{constructor(t,e){super(function(t,e){return`${t?`NG0${t}: `:""}${e}`}(t,e)),this.code=t}}function Nn(t,e){const n=e?" in "+e:"";throw new Rn("201",`No provider for ${xt(t)} found${n}`)}class Ln{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function Vn(){return Mn}function Mn(t){return t.type.prototype.ngOnChanges&&(t.setInput=Hn),Fn}function Fn(){const t=Un(this),e=null==t?void 0:t.current;if(e){const n=t.previous;if(n===st)t.previous=e;else for(let t in e)n[t]=e[t];t.current=null,this.ngOnChanges(e)}}function Hn(t,e,n,r){const s=Un(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:st,current:null}),i=s.current||(s.current={}),o=s.previous,a=this.declaredInputs[n],l=o[a];i[a]=new Ln(l&&l.currentValue,e,o===st),t[r]=e}function Un(t){return t.__ngSimpleChanges__||null}function qn(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n=r)break}else e[o]<0&&(t[18]+=65536),(i>11>16&&(3&t[2])===e&&(t[2]+=2048,i.call(o)):i.call(o)}Vn.ngInherit=!0;class Kn{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function Gn(t,e,n){const r=Kt(t);let s=0;for(;se){o=i-1;break}}}for(;i>16,r=e;for(;n>0;)r=r[15],n--;return r}let rr=!0;function sr(t){const e=rr;return rr=t,e}let ir=0;function or(t,e){const n=lr(t,e);if(-1!==n)return n;const r=e[1];r.firstCreatePass&&(t.injectorIndex=e.length,ar(r.data,t),ar(e,null),ar(r.blueprint,null));const s=cr(t,e),i=t.injectorIndex;if(tr(s)){const t=er(s),n=nr(s,e),r=n[1].data;for(let s=0;s<8;s++)e[i+s]=n[t+s]|r[t+s]}return e[i+8]=s,i}function ar(t,e){t.push(0,0,0,0,0,0,0,0,e)}function lr(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function cr(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,r=null,s=e;for(;null!==s;){const t=s[1],e=t.type;if(r=2===e?t.declTNode:1===e?s[6]:null,null===r)return-1;if(n++,s=s[15],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return-1}function ur(t,e,n){!function(t,e,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(dt)&&(r=n[dt]),null==r&&(r=n[dt]=ir++);const s=255&r,i=1<=0?255&e:gr:e}(n);if("function"==typeof i){if(!Ae(e,t,r))return r&Tt.Host?hr(s,n,r):dr(e,n,r,s);try{const t=i();if(null!=t||r&Tt.Optional)return t;Nn(n)}finally{Re()}}else if("number"==typeof i){let s=null,o=lr(t,e),a=-1,l=r&Tt.Host?e[16][6]:null;for((-1===o||r&Tt.SkipSelf)&&(a=-1===o?cr(t,e):e[o+8],-1!==a&&vr(r,!1)?(s=e[1],o=er(a),e=nr(a,e)):o=-1);-1!==o;){const t=e[1];if(_r(i,o,t.data)){const t=mr(o,e,n,s,r,l);if(t!==pr)return t}a=e[o+8],-1!==a&&vr(r,e[1].data[o+8]===l)&&_r(i,o,e)?(s=t,o=er(a),e=nr(a,e)):o=-1}}}return dr(e,n,r,s)}const pr={};function gr(){return new wr(fe(),ue())}function mr(t,e,n,r,s,i){const o=e[1],a=o.data[t+8],l=yr(a,o,n,null==r?Bt(a)&&rr:r!=o&&0!=(3&a.type),s&Tt.Host&&i===a);return null!==l?br(e,o,l,a):pr}function yr(t,e,n,r,s){const i=t.providerIndexes,o=e.data,a=1048575&i,l=t.directiveStart,c=i>>20,u=s?a+c:t.directiveEnd;for(let h=r?a:a+c;h=l&&t.type===n)return h}if(s){const t=o[l];if(t&&Wt(t)&&t.type===n)return l}return null}function br(t,e,n,r){let s=t[n];const i=e.data;if(s instanceof Kn){const o=s;o.resolving&&function(t,e){throw new Rn("200","Circular dependency in DI detected for "+t)}(xt(i[n]));const a=sr(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?At(o.injectImpl):null;Ae(t,r,Tt.Default);try{s=t[n]=o.factory(void 0,i,t,r),e.firstCreatePass&&n>=r.directiveStart&&function(t,e,n){const{ngOnChanges:r,ngOnInit:s,ngDoCheck:i}=e.type.prototype;if(r){const r=Mn(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,r),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,r)}s&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,s),i&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,i))}(n,i[n],e)}finally{null!==l&&At(l),sr(a),o.resolving=!1,Re()}}return s}function _r(t,e,n){const r=64&t,s=32&t;let i;return i=128&t?r?s?n[e+7]:n[e+6]:s?n[e+5]:n[e+4]:r?s?n[e+3]:n[e+2]:s?n[e+1]:n[e],!!(i&1<{const t=Cr(Q(e));return t?t():null};let n=Dn(e);if(null===n){const t=P(e);n=t&&t.factory}return n||null}function Sr(t){return y(()=>{const e=t.prototype.constructor,n=e[ht]||Cr(e),r=Object.prototype;let s=Object.getPrototypeOf(t.prototype).constructor;for(;s&&s!==r;){const t=s[ht]||Cr(s);if(t&&t!==n)return t;s=Object.getPrototypeOf(s)}return t=>new t})}function Er(t){return t.ngDebugContext}function Or(t){return t.ngOriginalError}function xr(t,...e){t.error(...e)}class Tr{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),r=function(t){return t.ngErrorLogger||xr}(t);r(this._console,"ERROR",t),e&&r(this._console,"ORIGINAL ERROR",e),n&&r(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?Er(t)?Er(t):this._findContext(Or(t)):null}_findOriginalError(t){let e=Or(t);for(;e&&Or(e);)e=Or(e);return e}}function kr(t,e){t.__ngContext__=e}const Ar=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(z))();function jr(t){return{name:"window",target:t.ownerDocument.defaultView}}function Pr(t){return t instanceof Function?t():t}var Ir=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});function Dr(t,e){return(void 0)(t,e)}function Rr(t){const e=t[3];return zt(e)?e[3]:e}function Nr(t){return Vr(t[13])}function Lr(t){return Vr(t[4])}function Vr(t){for(;null!==t&&!zt(t);)t=t[4];return t}function Mr(t,e,n,r,s){if(null!=r){let i,o=!1;zt(r)?i=r:qt(r)&&(o=!0,r=r[0]);const a=Zt(r);0===t&&null!==n?null==s?Qr(e,n,a):Br(e,n,a,s||null,!0):1===t&&null!==n?Br(e,n,a,s||null,!0):2===t?function(t,e,n){const r=Kr(t,e);r&&function(t,e,n,r){Kt(t)?t.removeChild(e,n,r):e.removeChild(n)}(t,r,e,n)}(e,a,o):3===t&&e.destroyNode(a),null!=i&&function(t,e,n,r,s){const i=n[7];i!==Zt(n)&&Mr(e,t,r,i,s);for(let o=10;o0&&(t[n-1][4]=r[4]);const o=J(t,10+e);es(r[1],s=r,s[11],2,null,null),s[0]=null,s[6]=null;const a=o[19];null!==a&&a.detachView(o[1]),r[3]=null,r[4]=null,r[2]&=-129}var s;return r}function qr(t,e){if(!(256&e[2])){const n=e[11];Kt(n)&&n.destroyNode&&es(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return zr(t[1],t);for(;e;){let n=null;if(qt(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)qt(e)&&zr(e[1],e),e=e[3];null===e&&(e=t),qt(e)&&zr(e[1],e),n=e&&e[4]}e=n}}(e)}}function zr(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let r=0;r=0?t[a]():t[-a].unsubscribe(),r+=2}else n[r].call(t[n[r+1]]);e[7]=null}}(t,e),1===e[1].type&&Kt(e[11])&&e[11].destroy();const n=e[17];if(null!==n&&zt(e[3])){n!==e[3]&&Hr(n,e);const r=e[19];null!==r&&r.detachView(t)}}}function $r(t,e,n){return function(t,e,n){let r=e;for(;null!==r&&40&r.type;)r=(e=r).parent;if(null===r)return n[0];if(2&r.flags){const e=t.data[r.directiveStart].encapsulation;if(e===rt.None||e===rt.Emulated)return null}return Jt(r,n)}(t,e.parent,n)}function Br(t,e,n,r,s){Kt(t)?t.insertBefore(e,n,r,s):e.insertBefore(n,r,s)}function Qr(t,e,n){Kt(t)?t.appendChild(e,n):e.appendChild(n)}function Wr(t,e,n,r,s){null!==r?Br(t,e,n,r,s):Qr(t,e,n)}function Kr(t,e){return Kt(t)?t.parentNode(e):e.parentNode}function Gr(t,e,n){return Zr(t,e,n)}let Zr=function(t,e,n){return 40&t.type?Jt(t,n):null};function Xr(t,e,n,r){const s=$r(t,r,e),i=e[11],o=Gr(r.parent||e[6],r,e);if(null!=s)if(Array.isArray(n))for(let a=0;ai?"":s[u+1].toLowerCase();const e=8&r?t:null;if(e&&-1!==is(e,c,0)||2&r&&c!==t){if(us(r))return!1;o=!0}}}}else{if(!o&&!us(r)&&!us(l))return!1;if(o&&us(l))continue;o=!1,r=l|1&r}}return us(r)||o}function us(t){return 0==(1&t)}function hs(t,e,n,r){if(null===e)return-1;let s=0;if(r||!n){let n=!1;for(;s-1)for(n++;n0?'="'+e+'"':"")+"]"}else 8&r?s+="."+o:4&r&&(s+=" "+o);else""===s||us(o)||(e+=ps(i,s),s=""),r=o,i=i||!us(r);n++}return""!==s&&(e+=ps(i,s)),e}const ms={};function ys(t){bs(he(),ue(),Le()+t,be())}function bs(t,e,n,r){if(!r)if(3==(3&e[2])){const r=t.preOrderCheckHooks;null!==r&&zn(e,r,n)}else{const r=t.preOrderHooks;null!==r&&$n(e,r,0,n)}Ve(n)}function _s(t,e){return t<<17|e<<2}function vs(t){return t>>17&32767}function ws(t){return 2|t}function Cs(t){return(131068&t)>>2}function Ss(t,e){return-131069&t|e<<2}function Es(t){return 1|t}function Os(t,e){const n=t.contentQueries;if(null!==n)for(let r=0;r20&&bs(t,e,20,be()),n(r,s)}finally{Ve(i)}}function Ds(t,e,n){if($t(e)){const r=e.directiveEnd;for(let s=e.directiveStart;s0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(n)!=i&&n.push(i),n.push(r,s,o)}}function zs(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function $s(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function Bs(t,e,n){if(n){if(e.exportAs)for(let r=0;r0&&Ys(n)}}function Ys(t){for(let n=Nr(t);null!==n;n=Lr(n))for(let t=10;t0&&Ys(e)}const e=t[1].components;if(null!==e)for(let n=0;n0&&Ys(r)}}function ti(t,e){const n=ee(e,t),r=n[1];!function(t,e){for(let n=e.length;nPromise.resolve(null))();function ai(t){return t[7]||(t[7]=[])}function li(t,e){const n=t[9],r=n?n.get(Tr,null):null;r&&r.handleError(e)}function ci(t,e,n,r,s){for(let i=0;ithis.processProvider(n,t,e)),Z([t],t=>this.processInjectorType(t,[],s)),this.records.set(di,Ei(void 0,this));const i=this.records.get(pi);this.scope=null!=i?i.value:null,this.source=r||("object"==typeof t?null:S(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Pt,n=Tt.Default){this.assertNotDestroyed();const r=Nt(this);try{if(!(n&Tt.SkipSelf)){let e=this.records.get(t);if(void 0===e){const n=("function"==typeof(s=t)||"object"==typeof s&&s instanceof L)&&A(t);e=n&&this.injectableDefInScope(n)?Ei(Ci(t),gi):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(n&Tt.Self?_i():this.parent).get(t,e=n&Tt.Optional&&e===Pt?null:e)}catch(i){if("NullInjectorError"===i.name){if((i.ngTempTokenPath=i.ngTempTokenPath||[]).unshift(S(t)),r)throw i;return function(t,e,n,r){const s=t.ngTempTokenPath;throw e.__source&&s.unshift(e.__source),t.message=function(t,e,n,r=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let s=S(e);if(Array.isArray(e))s=e.map(S).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let r=e[n];t.push(n+":"+("string"==typeof r?JSON.stringify(r):S(r)))}s=`{${t.join(", ")}}`}return`${n}${r?"("+r+")":""}[${s}]: ${t.replace(It,"\n ")}`}("\n"+t.message,s,n,r),t.ngTokenPath=s,t.ngTempTokenPath=null,t}(i,t,"R3InjectorError",this.source)}throw i}finally{Nt(r)}var s}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,n)=>t.push(S(n))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,n){if(!(t=Q(t)))return!1;let r=P(t);const s=null==r&&t.ngModule||void 0,i=void 0===s?t:s,o=-1!==n.indexOf(i);if(void 0!==s&&(r=P(s)),null==r)return!1;if(null!=r.imports&&!o){let t;n.push(i);try{Z(r.imports,r=>{this.processInjectorType(r,e,n)&&(void 0===t&&(t=[]),t.push(r))})}finally{}if(void 0!==t)for(let e=0;ethis.processProvider(t,n,r||yi))}}this.injectorDefTypes.add(i),this.records.set(i,Ei(r.factory,gi));const a=r.providers;if(null!=a&&!o){const e=t;Z(a,t=>this.processProvider(t,e,a))}return void 0!==s&&void 0!==t.providers}processProvider(t,e,n){let r=xi(t=Q(t))?t:Q(t&&t.provide);const s=function(t,e,n){return Oi(t)?Ei(void 0,t.useValue):Ei(Si(t),gi)}(t);if(xi(t)||!0!==t.multi)this.records.get(r);else{let e=this.records.get(r);e||(e=Ei(void 0,gi,!0),e.factory=()=>Mt(e.multi),this.records.set(r,e)),r=t,e.multi.push(t)}this.records.set(r,s)}hydrate(t,e){var n;return e.value===gi&&(e.value=mi,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}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function Ci(t){const e=A(t),n=null!==e?e.factory:Dn(t);if(null!==n)return n;const r=P(t);if(null!==r)return r.factory;if(t instanceof L)throw new Error(`Token ${S(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const n=Y(e,"?");throw new Error(`Can't resolve all parameters for ${S(t)}: (${n.join(", ")}).`)}const n=function(t){const e=t&&(t[I]||t[R]);if(e){const n=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${n}" class.`),e}return null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new Error("unreachable")}function Si(t,e,n){let r=void 0;if(xi(t)){const e=Q(t);return Dn(e)||Ci(e)}if(Oi(t))r=()=>Q(t.useValue);else if((s=t)&&s.useFactory)r=()=>t.useFactory(...Mt(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))r=()=>Vt(Q(t.useExisting));else{const e=Q(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return Dn(e)||Ci(e);r=()=>new e(...Mt(t.deps))}var s;return r}function Ei(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function Oi(t){return null!==t&&"object"==typeof t&&Dt in t}function xi(t){return"function"==typeof t}const Ti=function(t,e,n){return function(t,e=null,n=null,r){const s=vi(t,e,n,r);return s._resolveInjectorDefTypes(),s}({name:n},e,t,n)};let ki=(()=>{class t{static create(t,e){return Array.isArray(t)?Ti(t,e,""):Ti(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=Pt,t.NULL=new fi,t.\u0275prov=T({token:t,providedIn:"any",factory:()=>Vt(di)}),t.__NG_ELEMENT_ID__=-1,t})();function Ai(t,e){qn(ne(t)[1],fe())}function ji(t){let e=Object.getPrototypeOf(t.type.prototype).constructor,n=!0;const r=[t];for(;e;){let s=void 0;if(Wt(t))s=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");s=e.\u0275dir}if(s){if(n){r.push(s);const e=t;e.inputs=Pi(t.inputs),e.declaredInputs=Pi(t.declaredInputs),e.outputs=Pi(t.outputs);const n=s.hostBindings;n&&Ri(t,n);const i=s.viewQuery,o=s.contentQueries;if(i&&Ii(t,i),o&&Di(t,o),x(t.inputs,s.inputs),x(t.declaredInputs,s.declaredInputs),x(t.outputs,s.outputs),Wt(s)&&s.data.animation){const e=t.data;e.animation=(e.animation||[]).concat(s.data.animation)}}const e=s.features;if(e)for(let r=0;r=0;r--){const s=t[r];s.hostVars=e+=s.hostVars,s.hostAttrs=Jn(s.hostAttrs,n=Jn(n,s.hostAttrs))}}(r)}function Pi(t){return t===st?{}:t===it?[]:t}function Ii(t,e){const n=t.viewQuery;t.viewQuery=n?(t,r)=>{e(t,r),n(t,r)}:e}function Di(t,e){const n=t.contentQueries;t.contentQueries=n?(t,r,s)=>{e(t,r,s),n(t,r,s)}:e}function Ri(t,e){const n=t.hostBindings;t.hostBindings=n?(t,r)=>{e(t,r),n(t,r)}:e}let Ni=null;function Li(){if(!Ni){const t=z.Symbol;if(t&&t.iterator)Ni=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;ea(Zt(t[r.index])).target:r.index;if(Kt(n)){let o=null;if(!a&&l&&(o=function(t,e,n,r){const s=t.cleanup;if(null!=s)for(let i=0;in?t[n]:null}"string"==typeof t&&(i+=2)}return null}(t,e,s,r.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=i,o.__ngLastListenerFn__=i,h=!1;else{i=ao(r,e,i,!1);const t=n.listen(f.name||p,s,i);u.push(i,t),c&&c.push(s,m,g,g+1)}}else i=ao(r,e,i,!0),p.addEventListener(s,i,o),u.push(i),c&&c.push(s,m,g,o)}const d=r.outputs;let f;if(h&&null!==d&&(f=d[s])){const t=f.length;if(t)for(let n=0;n0;)e=e[15],t--;return e}(t,le.lFrame.contextLView))[8]}(t)}function co(t,e){let n=null;const r=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let s=0;s=0}const bo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function _o(t){return t.substring(bo.key,bo.keyEnd)}function vo(t){return t.substring(bo.value,bo.valueEnd)}function wo(t,e){const n=bo.textEnd;let r=bo.key=Co(t,e,n);return n===r?-1:(r=bo.keyEnd=function(t,e,n){let r;for(;e=65&&(-33&r)<=90||r>=48&&r<=57);)e++;return e}(t,r,n),r=So(t,r,n),r=bo.value=Co(t,r,n),r=bo.valueEnd=function(t,e,n){let r=-1,s=-1,i=-1,o=e,a=o;for(;o32&&(a=o),i=s,s=r,r=-33&l}return a}(t,r,n),So(t,r,n))}function Co(t,e,n){for(;e=0;n=wo(e,n))Io(t,_o(e),vo(e))}function ko(t,e){return e>=t.expandoStartIndex}function Ao(t,e,n,r){const s=t.data;if(null===s[n+1]){const i=s[Le()],o=ko(t,n);Lo(i,r)&&null===e&&!o&&(e=!1),e=function(t,e,n,r){const s=function(t){const e=le.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}(t);let i=r?e.residualClasses:e.residualStyles;if(null===s)0===(r?e.classBindings:e.styleBindings)&&(n=Po(n=jo(null,t,e,n,r),e.attrs,r),i=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==s)if(n=jo(s,t,e,n,r),null===i){let n=function(t,e,n){const r=n?e.classBindings:e.styleBindings;if(0!==Cs(r))return t[vs(r)]}(t,e,r);void 0!==n&&Array.isArray(n)&&(n=jo(null,t,e,n[1],r),n=Po(n,e.attrs,r),function(t,e,n,r){t[vs(n?e.classBindings:e.styleBindings)]=r}(t,e,r,n))}else i=function(t,e,n){let r=void 0;const s=e.directiveEnd;for(let i=1+e.directiveStylingLast;i0)&&(u=!0)}else c=n;if(s)if(0!==l){const e=vs(t[a+1]);t[r+1]=_s(e,a),0!==e&&(t[e+1]=Ss(t[e+1],r)),t[a+1]=131071&t[a+1]|r<<17}else t[r+1]=_s(a,0),0!==a&&(t[a+1]=Ss(t[a+1],r)),a=r;else t[r+1]=_s(l,0),0===a?a=r:t[l+1]=Ss(t[l+1],r),l=r;u&&(t[r+1]=ws(t[r+1])),mo(t,c,r,!0),mo(t,c,r,!1),function(t,e,n,r,s){const i=s?t.residualClasses:t.residualStyles;null!=i&&"string"==typeof e&&nt(i,e)>=0&&(n[r+1]=Es(n[r+1]))}(e,c,t,r,i),o=_s(a,l),i?e.classBindings=o:e.styleBindings=o}(s,i,e,n,o,r)}}function jo(t,e,n,r,s){let i=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a0;){const e=t[s],i=Array.isArray(e),l=i?e[1]:e,c=null===l;let u=n[s+1];u===ms&&(u=c?go:void 0);let h=c?et(u,r):l===r?u:void 0;if(i&&!No(h)&&(h=et(e,r)),No(h)&&(a=h,o))return a;const d=t[s+1];s=o?vs(d):Cs(d)}if(null!==e){let t=i?e.residualClasses:e.residualStyles;null!=t&&(a=et(t,r))}return a}function No(t){return void 0!==t}function Lo(t,e){return 0!=(t.flags&(e?16:32))}function Vo(t,e=""){const n=ue(),r=he(),s=t+20,i=r.firstCreatePass?Ts(r,s,1,e,null):r.data[s],o=n[s]=function(t,e){return Kt(t)?t.createText(e):t.createTextNode(e)}(n[11],e);Xr(r,n,o,i),ge(i,!1)}function Mo(t){return Fo("",t,""),Mo}function Fo(t,e,n){const r=ue(),s=$i(r,t,e,n);return s!==ms&&ui(r,Le(),s),Fo}function Ho(t,e,n,r,s){const i=ue(),o=function(t,e,n,r,s,i){const o=qi(t,we(),n,s);return Se(2),o?e+Ot(n)+r+Ot(s)+i:ms}(i,t,e,n,r,s);return o!==ms&&ui(i,Le(),o),Ho}function Uo(t,e,n,r,s,i,o){const a=ue(),l=function(t,e,n,r,s,i,o,a){const l=function(t,e,n,r,s){const i=qi(t,e,n,r);return Ui(t,e+2,s)||i}(t,we(),n,s,o);return Se(3),l?e+Ot(n)+r+Ot(s)+i+Ot(o)+a:ms}(a,t,e,n,r,s,i,o);return l!==ms&&ui(a,Le(),l),Uo}function qo(t,e,n){const r=ue();return Ui(r,Ce(),e)&&Hs(he(),Me(),r,t,e,r[11],n,!0),qo}const zo=void 0;var $o=["en",[["a","p"],["AM","PM"],zo],[["AM","PM"],zo,zo],[["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"]],zo,[["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"]],zo,[["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}",zo,"{1} 'at' {0}",zo],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let Bo={};function Qo(t,e,n){"string"!=typeof e&&(n=e,e=t[Xo.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),Bo[e]=t,n&&(Bo[e][Xo.ExtraData]=n)}function Wo(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=Zo(e);if(n)return n;const r=e.split("-")[0];if(n=Zo(r),n)return n;if("en"===r)return $o;throw new Error(`Missing locale data for the locale "${t}".`)}function Ko(t){return Wo(t)[Xo.CurrencyCode]||null}function Go(t){return Wo(t)[Xo.PluralCase]}function Zo(t){return t in Bo||(Bo[t]=z.ng&&z.ng.common&&z.ng.common.locales&&z.ng.common.locales[t]),Bo[t]}var Xo=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});let Jo="en-US";function Yo(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,r){throw new Error("ASSERTION ERROR: "+t+` [Expected=> null != ${e} <=Actual]`)}(n,e),"string"==typeof t&&(Jo=t.toLowerCase().replace(/_/g,"-"))}function ta(t,e,n,r,s){if(t=Q(t),Array.isArray(t))for(let i=0;i>20;if(xi(t)||!t.multi){const r=new Kn(l,s,Wi),f=ra(a,e,s?u:u+d,h);-1===f?(ur(or(c,o),i,a),ea(i,t,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=1048576),n.push(r),o.push(r)):(n[f]=r,o[f]=r)}else{const f=ra(a,e,u+d,h),p=ra(a,e,u,u+d),g=f>=0&&n[f],m=p>=0&&n[p];if(s&&!m||!s&&!g){ur(or(c,o),i,a);const u=function(t,e,n,r,s){const i=new Kn(t,n,Wi);return i.multi=[],i.index=e,i.componentProviders=0,na(i,s,r&&!n),i}(s?ia:sa,n.length,s,r,l);!s&&m&&(n[p].providerFactory=u),ea(i,t,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=1048576),n.push(u),o.push(u)}else ea(i,t,f>-1?f:p,na(n[s?p:f],l,!s&&r));!s&&r&&m&&n[p].componentProviders++}}}function ea(t,e,n,r){const s=xi(e);if(s||e.useClass){const i=(e.useClass||e).prototype.ngOnDestroy;if(i){const o=t.destroyHooks||(t.destroyHooks=[]);if(!s&&e.multi){const t=o.indexOf(n);-1===t?o.push(n,[r,i]):o[t+1].push(r,i)}else o.push(n,i)}}}function na(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function ra(t,e,n,r){for(let s=n;s{n.providersResolver=(n,r)=>function(t,e,n){const r=he();if(r.firstCreatePass){const s=Wt(t);ta(n,r.data,r.blueprint,s,!0),ta(e,r.data,r.blueprint,s,!1)}}(n,r?r(t):t,e)}}class la{}class ca{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${S(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let ua=(()=>{class t{}return t.NULL=new ca,t})();function ha(...t){}function da(t,e){return new pa(Jt(t,e))}const fa=function(){return da(fe(),ue())};let pa=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=fa,t})();class ga{}let ma=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>ya(),t})();const ya=function(){const t=ue(),e=ee(fe().index,t);return function(t){return t[11]}(qt(e)?e:t)};let ba=(()=>{class t{}return t.\u0275prov=T({token:t,providedIn:"root",factory:()=>null}),t})();class _a{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const va=new _a("11.0.2");class wa{constructor(){}supports(t){return Mi(t)}create(t){return new Sa(t)}}const Ca=(t,e)=>e;class Sa{constructor(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=t||Ca}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,r=0,s=null;for(;e||n;){const i=!n||e&&e.currentIndex{r=this._trackByFn(e,t),null!==s&&Object.is(s.trackById,r)?(i&&(s=this._verifyReinsertion(s,t,r,e)),Object.is(s.item,t)||this._addIdentityChange(s,t)):(s=this._mismatch(s,t,r,e),i=!0),s=s._next,e++}),this.length=e;return this._truncate(s),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;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=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,r){let s;return null===t?s=this._itTail:(s=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,s,r)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,s,r)):t=this._addAfter(new Ea(e,n),s,r),t}_verifyReinsertion(t,e,n,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==s?t=this._reinsertAfter(s,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const 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)}_reinsertAfter(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,s=t._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new xa),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new xa),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}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class Ea{constructor(t,e){this.item=t,this.trackById=e,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}}class Oa{constructor(){this._head=null,this._tail=null}add(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)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){const 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}}class xa{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new Oa,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Ta(t,e,n){const r=t.previousIndex;if(null===r)return r;let s=0;return n&&r{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const r=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,r)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const 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}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const r=n._prev,s=n._next;return r&&(r._next=s),s&&(s._prev=r),n._next=null,n._prev=null,n}const n=new ja(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let 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}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}class ja{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let Pa=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(null!=n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new C,new v]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${n=t,n.name||typeof n}'`);var n}}return t.\u0275prov=T({token:t,providedIn:"root",factory:()=>new t([new wa])}),t})(),Ia=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new C,new v]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=T({token:t,providedIn:"root",factory:()=>new t([new ka])}),t})();function Da(t,e,n,r,s=!1){for(;null!==n;){const i=e[n.index];if(null!==i&&r.push(Zt(i)),zt(i))for(let t=10;t-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}qr(this._lView[1],this._lView)}onDestroy(t){Ms(this._lView[1],this._lView,null,t)}markForCheck(){ni(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){ri(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){_e(!0);try{ri(t,e,n)}finally{_e(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}detachFromAppRef(){var t;this._appRef=null,es(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class Na extends Ra{constructor(t){super(t),this._view=t}detectChanges(){si(this._view)}checkNoChanges(){!function(t){_e(!0);try{si(t)}finally{_e(!1)}}(this._view)}get context(){return null}}const La=Ma;let Va=(()=>{class t{}return t.__NG_ELEMENT_ID__=La,t.__ChangeDetectorRef__=!0,t})();function Ma(t=!1){return function(t,e,n){if(!n&&Bt(t)){const n=ee(t.index,e);return new Ra(n,n)}return 47&t.type?new Ra(e[16],e):null}(fe(),ue(),t)}const Fa=[new ka],Ha=new Pa([new wa]),Ua=new Ia(Fa),qa=function(){return Qa(fe(),ue())};let za=(()=>{class t{}return t.__NG_ELEMENT_ID__=qa,t})();const $a=za,Ba=class extends $a{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t){const e=this._declarationTContainer.tViews,n=xs(this._declarationLView,e,t,16,null,e.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];const r=this._declarationLView[19];return null!==r&&(n[19]=r.createEmbeddedView(e)),As(e,n,t),new Ra(n)}};function Qa(t,e){return 4&t.type?new Ba(e,t,da(t,e)):null}class Wa{}class Ka{}const Ga=function(){return el(fe(),ue())};let Za=(()=>{class t{}return t.__NG_ELEMENT_ID__=Ga,t})();const Xa=Za,Ja=class extends Xa{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return da(this._hostTNode,this._hostLView)}get injector(){return new wr(this._hostTNode,this._hostLView)}get parentInjector(){const t=cr(this._hostTNode,this._hostLView);if(tr(t)){const e=nr(t,this._hostLView),n=er(t);return new wr(e[1].data[n+8],e)}return new wr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=Ya(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,n){const r=t.createEmbeddedView(e||{});return this.insert(r,n),r}createComponent(t,e,n,r,s){const i=n||this.parentInjector;if(!s&&null==t.ngModule&&i){const t=i.get(Wa,null);t&&(s=t)}const o=t.create(i,r,void 0,s);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,r=n[1];if(zt(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],r=new Ja(e,e[6],e[3]);r.detach(r.indexOf(t))}}const s=this._adjustIndex(e),i=this._lContainer;!function(t,e,n,r){const s=10+r,i=n.length;r>0&&(n[s-1][4]=e),rAr});class ol extends la{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(gs).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return sl(this.componentDef.inputs)}get outputs(){return sl(this.componentDef.outputs)}create(t,e,n,r){const s=(r=r||this.ngModule)?function(t,e){return{get:(n,r,s)=>{const i=t.get(n,nl,s);return i!==nl||r===nl?i:e.get(n,r,s)}}}(t,r.injector):t,i=s.get(ga,Gt),o=s.get(ba,null),a=i.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=n?function(t,e,n){if(Kt(t))return t.selectRootElement(e,n===rt.ShadowDom);let r="string"==typeof e?t.querySelector(e):e;return r.textContent="",r}(a,n,this.componentDef.encapsulation):Fr(i.createRenderer(null,this.componentDef),l,function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),u=this.componentDef.onPush?576:528,h={components:[],scheduler:Ar,clean:oi,playerHandler:null,flags:0},d=Vs(0,null,null,1,0,null,null,null,null,null),f=xs(null,d,h,u,null,null,i,a,o,s);let p,g;je(f);try{const t=function(t,e,n,r,s,i){const o=n[1];n[20]=t;const a=Ts(o,20,2,"#host",null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(hi(a,l,!0),null!==t&&(Gn(s,t,l),null!==a.classes&&ss(s,t,a.classes),null!==a.styles&&rs(s,t,a.styles)));const c=r.createRenderer(t,e),u=xs(n,Ls(e),null,e.onPush?64:16,n[20],a,r,c,null,null);return o.firstCreatePass&&(ur(or(a,n),o,e.type),$s(o,a),Qs(a,n.length,1)),ei(n,u),n[20]=u}(c,this.componentDef,f,i,a);if(c)if(n)Gn(a,c,["ng-version",va.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let r=1,s=2;for(;r0&&ss(a,c,e.join(" "))}if(g=Yt(d,20),void 0!==e){const t=g.projection=[];for(let n=0;nt(o,e)),e.contentQueries){const t=fe();e.contentQueries(1,o,t.directiveStart)}const a=fe();return!i.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(Ve(a.index),qs(n[1],a,0,a.directiveStart,a.directiveEnd,e),zs(e,o)),o}(t,this.componentDef,f,h,[Ai]),As(d,f,null)}finally{Ne()}return new al(this.componentType,p,da(g,f),f,g)}}class al extends class{}{constructor(t,e,n,r,s){super(),this.location=n,this._rootLView=r,this._tNode=s,this.destroyCbs=[],this.instance=e,this.hostView=this.changeDetectorRef=new Na(r),this.componentType=t}get injector(){return new wr(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(t=>t()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(t){this.destroyCbs&&this.destroyCbs.push(t)}}const ll=new Map;class cl extends Wa{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new rl(this);const n=Et(t),r=t[ut]||null;r&&Yo(r),this._bootstrapComponents=Pr(n.bootstrap),this._r3Injector=vi(t,e,[{provide:Wa,useValue:this},{provide:ua,useValue:this.componentFactoryResolver}],S(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=ki.THROW_IF_NOT_FOUND,n=Tt.Default){return t===ki||t===Wa||t===di?this:this._r3Injector.get(t,e,n)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class ul extends Ka{constructor(t){super(),this.moduleType=t,null!==Et(t)&&function(t){const e=new Set;!function t(n){const r=Et(n,!0),s=r.id;null!==s&&(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${S(e)} vs ${S(e.name)}`)}(s,ll.get(s),n),ll.set(s,n));const i=Pr(r.imports);for(const o of i)e.has(o)||(e.add(o),t(o))}(t)}(t)}create(t){return new cl(this.moduleType,t)}}function hl(t,e,n){const r=ve()+t,s=ue();return s[r]===ms?Hi(s,r,n?e.call(n):e()):function(t,e){return t[e]}(s,r)}function dl(t,e,n,r){return fl(ue(),ve(),t,e,n,r)}function fl(t,e,n,r,s,i){const o=e+n;return Ui(t,o,s)?Hi(t,o+1,i?r.call(i,s):r(s)):function(t,e){const n=t[e];return n===ms?void 0:n}(t,o+1)}function pl(t,e){const n=he();let r;const s=t+20;n.firstCreatePass?(r=function(t,e){if(e)for(let n=e.length-1;n>=0;n--){const r=e[n];if(t===r.name)return r}throw new Rn("302",`The pipe '${t}' could not be found!`)}(e,n.pipeRegistry),n.data[s]=r,r.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(s,r.onDestroy)):r=n.data[s];const i=r.factory||(r.factory=Dn(r.type)),o=At(Wi);try{const t=sr(!1),e=i();return sr(t),function(t,e,n,r){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=r}(n,ue(),s,e),e}finally{At(o)}}function gl(t,e,n){const r=t+20,s=ue(),i=te(s,r);return function(t,e){return Vi.isWrapped(e)&&(e=Vi.unwrap(e),t[we()]=ms),e}(s,function(t,e){return t[1].data[e].pure}(s,r)?fl(s,ve(),e,i.transform,n,i):i.transform(n))}const ml=class extends r.a{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let r,i=t=>null,o=()=>null;t&&"object"==typeof t?(r=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(i=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(o=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(r=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(i=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),n&&(o=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const a=super.subscribe(r,i,o);return t instanceof s.a&&t.add(a),a}};function yl(){return this._results[Li()]()}class bl{constructor(){this.dirty=!0,this._results=[],this.changes=new ml,this.length=0;const t=Li(),e=bl.prototype;e[t]||(e[t]=yl)}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t){this._results=G(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class _l{constructor(t){this.queryList=t,this.matches=null}clone(){return new _l(this.queryList)}setDirty(){this.queryList.setDirty()}}class vl{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,r=[];for(let t=0;t0)r.push(o[t/2]);else{const s=i[t+1],o=e[-n];for(let t=10;t{class t{constructor(t){this.appInits=t,this.resolve=ha,this.reject=ha,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Vt(Vl,8))},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();const Fl=new L("AppId"),Hl={provide:Fl,useFactory:function(){return`${Ul()}${Ul()}${Ul()}`},deps:[]};function Ul(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const ql=new L("Platform Initializer"),zl=new L("Platform ID"),$l=new L("appBootstrapListener");let Bl=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();const Ql=new L("LocaleId"),Wl=new L("DefaultCurrencyCode");class Kl{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const Gl=function(t){return new ul(t)},Zl=Gl,Xl=function(t){return Promise.resolve(Gl(t))},Jl=function(t){const e=Gl(t),n=Pr(Et(t).declarations).reduce((t,e)=>{const n=St(e);return n&&t.push(new ol(n)),t},[]);return new Kl(e,n)},Yl=Jl,tc=function(t){return Promise.resolve(Jl(t))};let ec=(()=>{class t{constructor(){this.compileModuleSync=Zl,this.compileModuleAsync=Xl,this.compileModuleAndAllComponentsSync=Yl,this.compileModuleAndAllComponentsAsync=tc}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();const nc=(()=>Promise.resolve(0))();function rc(t){"undefined"==typeof Zone?nc.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class sc{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new ml(!1),this.onMicrotaskEmpty=new ml(!1),this.onStable=new ml(!1),this.onError=new ml(!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.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=e,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){let t=z.requestAnimationFrame,e=z.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=!!t.shouldCoalesceEventChangeDetection&&t.nativeRequestAnimationFrame&&(()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(z,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,lc(t),ac(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),lc(t))}(t)});t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:e},onInvokeTask:(n,r,s,i,o,a)=>{try{return cc(t),n.invokeTask(s,i,o,a)}finally{e&&"eventTask"===i.type&&e(),uc(t)}},onInvoke:(e,n,r,s,i,o,a)=>{try{return cc(t),e.invoke(r,s,i,o,a)}finally{uc(t)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(t._hasPendingMicrotasks=s.microTask,lc(t),ac(t)):"macroTask"==s.change&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,n,r,s)=>(e.handleError(r,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!sc.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(sc.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,r){const s=this._inner,i=s.scheduleEventTask("NgZoneEvent: "+r,t,oc,ic,ic);try{return s.runTask(i,e,n)}finally{s.cancelTask(i)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}function ic(){}const oc={};function ac(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(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function lc(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function cc(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function uc(t){t._nesting--,ac(t)}class hc{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new ml,this.onMicrotaskEmpty=new ml,this.onStable=new ml,this.onError=new ml}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,r){return t.apply(e,n)}}let dc=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{sc.assertNotInAngularZone(),rc(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())rc(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let r=-1;e&&e>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==r),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})}whenStable(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()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(Vt(sc))},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})(),fc=(()=>{class t{constructor(){this._applications=new Map,yc.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return yc.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();class pc{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}function gc(t){yc=t}let mc,yc=new pc;const bc=new L("AllowMultipleToken");class _c{constructor(t,e){this.name=t,this.token=e}}function vc(t,e,n=[]){const r="Platform: "+e,s=new L(r);return(e=[])=>{let i=wc();if(!i||i.injector.get(bc,!1))if(t)t(n.concat(e).concat({provide:s,useValue:!0}));else{const t=n.concat(e).concat({provide:s,useValue:!0},{provide:pi,useValue:"platform"});!function(t){if(mc&&!mc.destroyed&&!mc.injector.get(bc,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");mc=t.get(Cc);const e=t.get(ql,null);e&&e.forEach(t=>t())}(ki.create({providers:t,name:r}))}return function(t){const e=wc();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}(s)}}function wc(){return mc&&!mc.destroyed?mc:null}let Cc=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new hc:("zone.js"===t?void 0:t)||new sc({enableLongStackTrace:rn(),shouldCoalesceEventChangeDetection:e}),n}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),r=[{provide:sc,useValue:n}];return n.run(()=>{const e=ki.create({providers:r,parent:this.injector,name:t.moduleType.name}),s=t.create(e),i=s.injector.get(Tr,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return s.onDestroy(()=>Oc(this._modules,s)),n.runOutsideAngular(()=>n.onError.subscribe({next:t=>{i.handleError(t)}})),function(t,e,n){try{const r=n();return ro(r)?r.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}(i,n,()=>{const t=s.injector.get(Ml);return t.runInitializers(),t.donePromise.then(()=>(Yo(s.injector.get(Ql,"en-US")||"en-US"),this._moduleDoBootstrap(s),s))})})}bootstrapModule(t,e=[]){const n=Sc({},e);return function(t,e,n){const r=new ul(n);return Promise.resolve(r)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(Ec);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${S(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)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Vt(ki))},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();function Sc(t,e){return Array.isArray(e)?e.reduce(Sc,t):Object.assign(Object.assign({},t),e)}let Ec=(()=>{class t{constructor(t,e,n,r,s,c){this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=s,this._initStatus=c,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=rn(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const h=new i.a(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),d=new i.a(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{sc.assertNotInAngularZone(),rc(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{sc.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=function(...t){let e=Number.POSITIVE_INFINITY,n=null,r=t[t.length-1];return Object(o.a)(r)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof r&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof i.a?t[0]:Object(a.a)(e)(Object(l.a)(t,n))}(h,d.pipe(t=>{return u()((e=m,function(t){let n;n="function"==typeof e?e:function(){return e};const r=Object.create(t,p);return r.source=t,r.subjectFactory=n,r})(t));var e}))}bootstrap(t,e){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.");let n;n=t instanceof la?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const r=n.isBoundToModule?void 0:this._injector.get(Wa),s=n.create(ki.NULL,[],e||n.selector,r);s.onDestroy(()=>{this._unloadComponent(s)});const i=s.injector.get(dc,null);return i&&s.injector.get(fc).registerApplication(s.location.nativeElement,i),this._loadComponent(s),rn()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),s}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges();if(this._enforceNoNewChanges)for(let t of this._views)t.checkNoChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;Oc(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get($l,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),Oc(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(Vt(sc),Vt(Bl),Vt(ki),Vt(Tr),Vt(ua),Vt(Ml))},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();function Oc(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class xc{}class Tc{}const kc={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let Ac=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||kc}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,r]=t.split("#");return void 0===r&&(r="default"),n("zn8P")(e).then(t=>t[r]).then(t=>jc(t,e,r)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,r]=t.split("#"),s="NgFactory";return void 0===r&&(r="default",s=""),n("zn8P")(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[r+s]).then(t=>jc(t,e,r))}}return t.\u0275fac=function(e){return new(e||t)(Vt(ec),Vt(Tc,8))},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();function jc(t,e,n){if(!t)throw new Error(`Cannot find '${n}' in '${e}'`);return t}const Pc=function(t){return null},Ic=vc(null,"core",[{provide:zl,useValue:"unknown"},{provide:Cc,deps:[ki]},{provide:fc,deps:[]},{provide:Bl,deps:[]}]),Dc=[{provide:Ec,useClass:Ec,deps:[sc,Bl,ki,Tr,ua,Ml]},{provide:il,deps:[sc],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Ml,useClass:Ml,deps:[[new v,Vl]]},{provide:ec,useClass:ec,deps:[]},Hl,{provide:Pa,useFactory:function(){return Ha},deps:[]},{provide:Ia,useFactory:function(){return Ua},deps:[]},{provide:Ql,useFactory:function(t){return Yo(t=t||"undefined"!=typeof $localize&&$localize.locale||"en-US"),t},deps:[[new _(Ql),new v,new C]]},{provide:Wl,useValue:"USD"}];let Rc=(()=>{class t{constructor(t){}}return t.\u0275mod=bt({type:t}),t.\u0275inj=k({factory:function(e){return new(e||t)(Vt(Ec))},providers:Dc}),t})()},gRHU:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("2fFW"),s=n("NJ4a");const i={closed:!0,next(t){},error(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(s.a)(t)},complete(){}}},jZKg:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("HDdC"),s=n("quSY");function i(t,e){return new r.a(n=>{const r=new s.a;let i=0;return r.add(e.schedule(function(){i!==t.length?(n.next(t[i++]),n.closed||r.add(this.schedule())):n.complete()})),r})}},kJWO:function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")()},lJxs:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("7o/Q");function s(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 i(t,e))}}class i{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new o(t,this.project,this.thisArg))}}class o extends r.a{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}},n6bG:function(t,e,n){"use strict";function r(t){return"function"==typeof t}n.d(e,"a",function(){return r})},ngJS:function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=t=>e=>{for(let n=0,r=t.length;n{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Db)({factory:u,token:t,providedIn:"platform"}),t})();function u(){return Object(r.Qb)(d)}const h=new r.q("Location Initialized");let d=(()=>{class t extends c{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=i().getLocation(),this._history=i().getHistory()}getBaseHrefFromDOM(){return i().getBaseHref(this._doc)}onPopState(t){i().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){i().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,e,n){f()?this._history.pushState(t,e,n):this.location.hash=n}replaceState(t,e,n){f()?this._history.replaceState(t,e,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(l))},t.\u0275prov=Object(r.Db)({factory:p,token:t,providedIn:"platform"}),t})();function f(){return!!window.history.pushState}function p(){return new d(Object(r.Qb)(l))}function g(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function m(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function y(t){return t&&"?"!==t[0]?"?"+t:t}let b=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Db)({factory:_,token:t,providedIn:"root"}),t})();function _(t){const e=Object(r.Qb)(l).location;return new w(Object(r.Qb)(c),e&&e.origin||"")}const v=new r.q("appBaseHref");let w=(()=>{class t extends b{constructor(t,e){if(super(),this._platformLocation=t,null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)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.");this._baseHref=e}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return g(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+y(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?`${e}${n}`:e}pushState(t,e,n,r){const s=this.prepareExternalUrl(n+y(r));this._platformLocation.pushState(t,e,s)}replaceState(t,e,n,r){const s=this.prepareExternalUrl(n+y(r));this._platformLocation.replaceState(t,e,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(c),r.Qb(v,8))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),C=(()=>{class t extends b{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",null!=e&&(this._baseHref=e)}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=g(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,n,r){let s=this.prepareExternalUrl(n+y(r));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(t,e,s)}replaceState(t,e,n,r){let s=this.prepareExternalUrl(n+y(r));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(c),r.Qb(v,8))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),S=(()=>{class t{constructor(t,e){this._subject=new r.n,this._urlChangeListeners=[],this._platformStrategy=t;const n=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=m(O(n)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+y(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,O(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",n=null){this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+y(e)),n)}replaceState(t,e="",n=null){this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+y(e)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}))}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(n=>n(t,e))}subscribe(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(b),r.Qb(c))},t.normalizeQueryParams=y,t.joinWithSlash=g,t.stripTrailingSlash=m,t.\u0275prov=Object(r.Db)({factory:E,token:t,providedIn:"root"}),t})();function E(){return new S(Object(r.Qb)(b),Object(r.Qb)(c))}function O(t){return t.replace(/\/index.html$/,"")}var x=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({});const T=r.kb;class k{}let A=(()=>{class t extends k{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(T(e||this.locale)(t)){case x.Zero:return"zero";case x.One:return"one";case x.Two:return"two";case x.Few:return"few";case x.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.u))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();function j(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[r,s]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(r.trim()===e)return decodeURIComponent(s)}return null}let P=(()=>{class t{constructor(t,e,n,r){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(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&&(Object(r.nb)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Object(r.sb)(t.item));this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.s),r.Hb(r.t),r.Hb(r.l),r.Hb(r.D))},t.\u0275dir=r.Cb({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class I{constructor(t,e,n,r){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let D=(()=>{class t{constructor(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){Object(r.T)()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(t)}. See https://angular.io/api/common/NgForOf#change-propagation for more information.`),this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;if(!this._differ&&n)try{this._differ=this._differs.find(n).create(this.ngForTrackBy)}catch(e){throw new Error(`Cannot find a differ supporting object '${n}' of type '${t=n,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,n,r)=>{if(null==t.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new I(null,this._ngForOf,-1,-1),null===r?void 0:r),s=new R(t,n);e.push(s)}else if(null==r)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const s=this._viewContainer.get(n);this._viewContainer.move(s,r);const i=new R(t,s);e.push(i)}});for(let n=0;n{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.O),r.Hb(r.K),r.Hb(r.s))},t.\u0275dir=r.Cb({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class R{constructor(t,e){this.record=t,this.view=e}}let N=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new L,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){V("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){V("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){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)))}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.O),r.Hb(r.K))},t.\u0275dir=r.Cb({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class L{constructor(){this.$implicit=null,this.ngIf=null}}function V(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Object(r.sb)(e)}'.`)}let M=(()=>{class t{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)}_matchCase(t){const 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}_updateDefaultCases(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(let e=0;e{class t{constructor(t,e,n){this._ngEl=t,this._differs=e,this._renderer=n,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[n,r]=t.split(".");null!=(e=null!=e&&r?`${e}${r}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,n,e):this._renderer.removeStyle(this._ngEl.nativeElement,n)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.l),r.Hb(r.t),r.Hb(r.D))},t.\u0275dir=r.Cb({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),H=(()=>{class t{transform(t){return JSON.stringify(t,null,2)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=r.Gb({name:"json",type:t,pure:!1}),t})(),U=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[{provide:k,useClass:A}]}),t})();const q="browser";let z=(()=>{class t{}return t.\u0275prov=Object(r.Db)({token:t,providedIn:"root",factory:()=>new $(Object(r.Qb)(l),window,Object(r.Qb)(r.m))}),t})();class ${constructor(t,e,n){this.document=t,this.window=e,this.errorHandler=n,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(this.supportsScrolling()){const e=this.document.getElementById(t)||this.document.getElementsByName(t)[0];e&&this.scrollToElement(e)}}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),n=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(n-s[0],r-s[1])}supportScrollRestoration(){try{if(!this.window||!this.window.scrollTo)return!1;const t=B(this.window.history)||B(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(t){return!1}}supportsScrolling(){try{return!!this.window.scrollTo}catch(t){return!1}}}function B(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}},pLZG:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("7o/Q");function s(t,e){return function(n){return n.lift(new i(t,e))}}class i{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new o(t,this.predicate,this.thisArg))}}class o extends r.a{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}},quSY:function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n("DH7j"),s=n("XoHu"),i=n("n6bG");const o=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let a=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:a,_unsubscribe:c,_subscriptions:u}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;tt.concat(e instanceof o?e.errors:e),[])}},sVev:function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})()},sYmb:function(t,e,n){"use strict";n.d(e,"a",function(){return I}),n.d(e,"b",function(){return tt}),n.d(e,"c",function(){return Y}),n.d(e,"d",function(){return J});var r=n("fXoL"),s=n("LRne"),i=n("HDdC");function o(t){return!!t&&(t instanceof i.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var a=n("cp0P"),l=n("GyhO"),c=n("NXyV"),u=n("IzEk"),h=n("XNiG"),d=n("3N8a");class f extends d.a{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(t,e,n):t.flush(this)}}var p=n("IjjT");class g extends p.a{}const m=new g(f);var y=n("quSY"),b=n("7o/Q"),_=n("EY2u"),v=n("z6cu");let w=(()=>{class t{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(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()}}do(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()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return Object(s.a)(this.value);case"E":return Object(v.a)(this.error);case"C":return Object(_.b)()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})();class C extends b.a{constructor(t,e,n=0){super(t),this.scheduler=e,this.delay=n}static dispatch(t){const{notification:e,destination:n}=t;e.observe(n),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(C.dispatch,this.delay,new S(t,this.destination)))}_next(t){this.scheduleMessage(w.createNext(t))}_error(t){this.scheduleMessage(w.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(w.createComplete()),this.unsubscribe()}}class S{constructor(t,e){this.notification=t,this.destination=e}}var E=n("9ppp"),O=n("Ylt2");class x extends h.a{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n){super(),this.scheduler=n,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new T(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,n=e?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,s=n.length;let i;if(this.closed)throw new E.a;if(this.isStopped||this.hasError?i=y.a.EMPTY:(this.observers.push(t),i=new O.a(this,t)),r&&t.add(t=new C(t,r)),e)for(let o=0;oe&&(i=Math.max(i,s-e)),i>0&&r.splice(0,i),r}}class T{constructor(t,e){this.time=t,this.value=e}}function k(t,e,n){let r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},t=>t.lift(function({bufferSize:t=Number.POSITIVE_INFINITY,windowTime:e=Number.POSITIVE_INFINITY,refCount:n,scheduler:r}){let s,i,o=0,a=!1,l=!1;return function(c){let u;o++,!s||a?(a=!1,s=new x(t,e,r),u=s.subscribe(this),i=c.subscribe({next(t){s.next(t)},error(t){a=!0,s.error(t)},complete(){l=!0,i=void 0,s.complete()}})):u=s.subscribe(this),this.add(()=>{o--,u.unsubscribe(),i&&!l&&n&&0===o&&(i.unsubscribe(),i=void 0,s=void 0)})}}(r))}var A=n("lJxs"),j=n("bOdf"),P=n("eIep");class I{}let D=(()=>{class t extends I{getTranslation(t){return Object(s.a)({})}}return t.\u0275fac=function(e){return R(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const R=r.Ob(D);class N{}let L=(()=>{class t{handle(t){return t.key}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();function V(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;let n,r,s,i=typeof t;if(i==typeof e&&"object"==i){if(!Array.isArray(t)){if(Array.isArray(e))return!1;for(r in s=Object.create(null),t){if(!V(t[r],e[r]))return!1;s[r]=!0}for(r in e)if(!(r in s)&&void 0!==e[r])return!1;return!0}if(!Array.isArray(e))return!1;if((n=t.length)==e.length){for(r=0;r{F(e[r])?r in t?n[r]=H(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})}),n}class U{}let q=(()=>{class t extends U{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(t,e){let n;return n="string"==typeof t?this.interpolateString(t,e):"function"==typeof t?this.interpolateFunction(t,e):t,n}getValue(t,e){let n="string"==typeof e?e.split("."):[e];e="";do{e+=n.shift(),!M(t)||!M(t[e])||"object"!=typeof t[e]&&n.length?n.length?e+=".":t=void 0:(t=t[e],e="")}while(n.length);return t}interpolateFunction(t,e){return t(e)}interpolateString(t,e){return e?t.replace(this.templateMatcher,(t,n)=>{let r=this.getValue(e,n);return M(r)?r:t}):t}}return t.\u0275fac=function(e){return z(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const z=r.Ob(q);class ${}let B=(()=>{class t extends ${compile(t,e){return t}compileTranslations(t,e){return t}}return t.\u0275fac=function(e){return Q(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const Q=r.Ob(B);class W{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new r.n,this.onLangChange=new r.n,this.onDefaultLangChange=new r.n}}const K=new r.q("USE_STORE"),G=new r.q("USE_DEFAULT_LANG"),Z=new r.q("DEFAULT_LANGUAGE"),X=new r.q("USE_EXTEND");let J=(()=>{class t{constructor(t,e,n,s,i,o=!0,a=!1,l=!1,c){this.store=t,this.currentLoader=e,this.compiler=n,this.parser=s,this.missingTranslationHandler=i,this.useDefaultLang=o,this.isolate=a,this.extend=l,this.pending=!1,this._onTranslationChange=new r.n,this._onLangChange=new r.n,this._onDefaultLangChange=new r.n,this._langs=[],this._translations={},this._translationRequests={},c&&this.setDefaultLang(c)}get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(t){this.isolate?this._defaultLang=t:this.store.defaultLang=t}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(t){this.isolate?this._currentLang=t:this.store.currentLang=t}get langs(){return this.isolate?this._langs:this.store.langs}set langs(t){this.isolate?this._langs=t:this.store.langs=t}get translations(){return this.isolate?this._translations:this.store.translations}set translations(t){this.isolate?this._translations=t:this.store.translations=t}setDefaultLang(t){if(t===this.defaultLang)return;let e=this.retrieveTranslations(t);void 0!==e?(null==this.defaultLang&&(this.defaultLang=t),e.pipe(Object(u.a)(1)).subscribe(e=>{this.changeDefaultLang(t)})):this.changeDefaultLang(t)}getDefaultLang(){return this.defaultLang}use(t){if(t===this.currentLang)return Object(s.a)(this.translations[t]);let e=this.retrieveTranslations(t);return void 0!==e?(this.currentLang||(this.currentLang=t),e.pipe(Object(u.a)(1)).subscribe(e=>{this.changeLang(t)}),e):(this.changeLang(t),Object(s.a)(this.translations[t]))}retrieveTranslations(t){let e;return(void 0===this.translations[t]||this.extend)&&(this._translationRequests[t]=this._translationRequests[t]||this.getTranslation(t),e=this._translationRequests[t]),e}getTranslation(t){this.pending=!0;const e=this.currentLoader.getTranslation(t).pipe(k(1),Object(u.a)(1));return this.loadingTranslations=e.pipe(Object(A.a)(e=>this.compiler.compileTranslations(e,t)),k(1),Object(u.a)(1)),this.loadingTranslations.subscribe({next:e=>{this.translations[t]=this.extend&&this.translations[t]?Object.assign(Object.assign({},e),this.translations[t]):e,this.updateLangs(),this.pending=!1},error:t=>{this.pending=!1}}),e}setTranslation(t,e,n=!1){e=this.compiler.compileTranslations(e,t),this.translations[t]=(n||this.extend)&&this.translations[t]?H(this.translations[t],e):e,this.updateLangs(),this.onTranslationChange.emit({lang:t,translations:this.translations[t]})}getLangs(){return this.langs}addLangs(t){t.forEach(t=>{-1===this.langs.indexOf(t)&&this.langs.push(t)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(t,e,n){let r;if(e instanceof Array){let r={},i=!1;for(let s of e)r[s]=this.getParsedResult(t,s,n),o(r[s])&&(i=!0);if(i){const t=e.map(t=>o(r[t])?r[t]:Object(s.a)(r[t]));return Object(a.a)(t).pipe(Object(A.a)(t=>{let n={};return t.forEach((t,r)=>{n[e[r]]=t}),n}))}return r}if(t&&(r=this.parser.interpolate(this.parser.getValue(t,e),n)),void 0===r&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],e),n)),void 0===r){let t={key:e,translateService:this};void 0!==n&&(t.interpolateParams=n),r=this.missingTranslationHandler.handle(t)}return void 0!==r?r:e}get(t,e){if(!M(t)||!t.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(Object(j.a)(n=>o(n=this.getParsedResult(n,t,e))?n:Object(s.a)(n)));{let n=this.getParsedResult(this.translations[this.currentLang],t,e);return o(n)?n:Object(s.a)(n)}}getStreamOnTranslationChange(t,e){if(!M(t)||!t.length)throw new Error('Parameter "key" required');return Object(l.a)(Object(c.a)(()=>this.get(t,e)),this.onTranslationChange.pipe(Object(P.a)(n=>{const r=this.getParsedResult(n.translations,t,e);return"function"==typeof r.subscribe?r:Object(s.a)(r)})))}stream(t,e){if(!M(t)||!t.length)throw new Error('Parameter "key" required');return Object(l.a)(Object(c.a)(()=>this.get(t,e)),this.onLangChange.pipe(Object(P.a)(n=>{const r=this.getParsedResult(n.translations,t,e);return o(r)?r:Object(s.a)(r)})))}instant(t,e){if(!M(t)||!t.length)throw new Error('Parameter "key" required');let n=this.getParsedResult(this.translations[this.currentLang],t,e);if(o(n)){if(t instanceof Array){let e={};return t.forEach((n,r)=>{e[t[r]]=t[r]}),e}return t}return n}set(t,e,n=this.currentLang){this.translations[n][t]=this.compiler.compile(e,n),this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}changeLang(t){this.currentLang=t,this.onLangChange.emit({lang:t,translations:this.translations[t]}),null==this.defaultLang&&this.changeDefaultLang(t)}changeDefaultLang(t){this.defaultLang=t,this.onDefaultLangChange.emit({lang:t,translations:this.translations[t]})}reloadLang(t){return this.resetLang(t),this.getTranslation(t)}resetLang(t){this._translationRequests[t]=void 0,this.translations[t]=void 0}getBrowserLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,void 0!==t?(-1!==t.indexOf("-")&&(t=t.split("-")[0]),-1!==t.indexOf("_")&&(t=t.split("_")[0]),t):void 0}getBrowserCultureLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,t}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(W),r.Qb(I),r.Qb($),r.Qb(U),r.Qb(N),r.Qb(G),r.Qb(K),r.Qb(X),r.Qb(Z))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),Y=(()=>{class t{constructor(t,e){this.translate=t,this._ref=e,this.value=""}updateValue(t,e,n){let r=e=>{this.value=void 0!==e?e:t,this.lastKey=t,this._ref.markForCheck()};if(n){let s=this.translate.getParsedResult(n,t,e);o(s.subscribe)?s.subscribe(r):r(s)}this.translate.get(t,e).subscribe(r)}transform(t,...e){if(!t||!t.length)return t;if(V(t,this.lastKey)&&V(e,this.lastParams))return this.value;let n;if(M(e[0])&&e.length)if("string"==typeof e[0]&&e[0].length){let t=e[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{n=JSON.parse(t)}catch(r){throw new SyntaxError("Wrong parameter in TranslatePipe. Expected a valid Object, received: "+e[0])}}else"object"!=typeof e[0]||Array.isArray(e[0])||(n=e[0]);return this.lastKey=t,this.lastParams=e,this.updateValue(t,n),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(e=>{this.lastKey&&e.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(t,n,e.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(e=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,n,e.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,n))})),this.value}_dispose(){void 0!==this.onTranslationChange&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),void 0!==this.onLangChange&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),void 0!==this.onDefaultLangChange&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(J),r.Sb())},t.\u0275pipe=r.Gb({name:"translate",type:t,pure:!1}),t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),tt=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:I,useClass:D},e.compiler||{provide:$,useClass:B},e.parser||{provide:U,useClass:q},e.missingTranslationHandler||{provide:N,useClass:L},W,{provide:K,useValue:e.isolate},{provide:G,useValue:e.useDefaultLang},{provide:X,useValue:e.extend},{provide:Z,useValue:e.defaultLanguage},J]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:I,useClass:D},e.compiler||{provide:$,useClass:B},e.parser||{provide:U,useClass:q},e.missingTranslationHandler||{provide:N,useClass:L},{provide:K,useValue:e.isolate},{provide:G,useValue:e.useDefaultLang},{provide:X,useValue:e.extend},{provide:Z,useValue:e.defaultLanguage},J]}}}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)}}),t})()},"tk/3":function(t,e,n){"use strict";n.d(e,"a",function(){return k}),n.d(e,"b",function(){return x}),n.d(e,"c",function(){return U}),n.d(e,"d",function(){return E}),n.d(e,"e",function(){return S});var r=n("fXoL"),s=n("LRne"),i=n("HDdC"),o=n("bOdf"),a=n("pLZG"),l=n("lJxs"),c=n("ofXK");class u{}class h{}class d{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const n=t.slice(0,e),r=n.toLowerCase(),s=t.slice(e+1).trim();this.maybeSetNormalizedName(n,r),this.headers.has(r)?this.headers.get(r).push(s):this.headers.set(r,[s])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let n=t[e];const r=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(r,n),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof d?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new d;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof d?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...n),this.headers.set(e,r);break;case"d":const s=t.value;if(s){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===s.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class f{encodeKey(t){return p(t)}encodeValue(t){return p(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function p(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,"/")}class g{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new f,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.split("&").forEach(t=>{const r=t.indexOf("="),[s,i]=-1==r?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,r)),e.decodeValue(t.slice(r+1))],o=n.get(s)||[];o.push(i),n.set(s,o)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new g({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat([t]),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const n=e.indexOf(t.value);-1!==n&&e.splice(n,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}function m(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function y(t){return"undefined"!=typeof Blob&&t instanceof Blob}function b(t){return"undefined"!=typeof FormData&&t instanceof FormData}class _{constructor(t,e,n,r){let s;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.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!==n?n:null,s=r):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.params&&(this.params=s.params)),this.headers||(this.headers=new d),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const n=e.indexOf("?");this.urlWithParams=e+(-1===n?"?":ne.set(n,t.setHeaders[n]),a)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,n)=>e.set(n,t.setParams[n]),l)),new _(e,n,s,{params:l,headers:a,reportProgress:o,responseType:r,withCredentials:i})}}var v=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({});class w{constructor(t,e=200,n="OK"){this.headers=t.headers||new d,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class C extends w{constructor(t={}){super(t),this.type=v.ResponseHeader}clone(t={}){return new C({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})}}class S extends w{constructor(t={}){super(t),this.type=v.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new S({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})}}class E extends w{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?"Http failure during parsing for "+(t.url||"(unknown url)"):`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function O(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let x=(()=>{class t{constructor(t){this.handler=t}request(t,e,n={}){let r;if(t instanceof _)r=t;else{let s=void 0;s=n.headers instanceof d?n.headers:new d(n.headers);let i=void 0;n.params&&(i=n.params instanceof g?n.params:new g({fromObject:n.params})),r=new _(t,e,void 0!==n.body?n.body:null,{headers:s,params:i,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const i=Object(s.a)(r).pipe(Object(o.a)(t=>this.handler.handle(t)));if(t instanceof _||"events"===n.observe)return i;const c=i.pipe(Object(a.a)(t=>t instanceof S));switch(n.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return c.pipe(Object(l.a)(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return c.pipe(Object(l.a)(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return c.pipe(Object(l.a)(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return c.pipe(Object(l.a)(t=>t.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new g).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,n={}){return this.request("PATCH",t,O(n,e))}post(t,e,n={}){return this.request("POST",t,O(n,e))}put(t,e,n={}){return this.request("PUT",t,O(n,e))}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(u))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();class T{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const k=new r.q("HTTP_INTERCEPTORS");let A=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const j=/^\)\]\}',?\n/;class P{}let I=(()=>{class t{constructor(){}build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),D=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new i.a(e=>{const n=this.xhrFactory.build();if(n.open(t.method,t.urlWithParams),t.withCredentials&&(n.withCredentials=!0),t.headers.forEach((t,e)=>n.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&n.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();n.responseType="json"!==e?e:"text"}const r=t.serializeBody();let s=null;const i=()=>{if(null!==s)return s;const e=1223===n.status?204:n.status,r=n.statusText||"OK",i=new d(n.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}(n)||t.url;return s=new C({headers:i,status:e,statusText:r,url:o}),s},o=()=>{let{headers:r,status:s,statusText:o,url:a}=i(),l=null;204!==s&&(l=void 0===n.response?n.responseText:n.response),0===s&&(s=l?200:0);let c=s>=200&&s<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(j,"");try{l=""!==l?JSON.parse(l):null}catch(u){l=t,c&&(c=!1,l={error:u,text:l})}}c?(e.next(new S({body:l,headers:r,status:s,statusText:o,url:a||void 0})),e.complete()):e.error(new E({error:l,headers:r,status:s,statusText:o,url:a||void 0}))},a=t=>{const{url:r}=i(),s=new E({error:t,status:n.status||0,statusText:n.statusText||"Unknown Error",url:r||void 0});e.error(s)};let l=!1;const c=r=>{l||(e.next(i()),l=!0);let s={type:v.DownloadProgress,loaded:r.loaded};r.lengthComputable&&(s.total=r.total),"text"===t.responseType&&n.responseText&&(s.partialText=n.responseText),e.next(s)},u=t=>{let n={type:v.UploadProgress,loaded:t.loaded};t.lengthComputable&&(n.total=t.total),e.next(n)};return n.addEventListener("load",o),n.addEventListener("error",a),t.reportProgress&&(n.addEventListener("progress",c),null!==r&&n.upload&&n.upload.addEventListener("progress",u)),n.send(r),e.next({type:v.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("load",o),t.reportProgress&&(n.removeEventListener("progress",c),null!==r&&n.upload&&n.upload.removeEventListener("progress",u)),n.readyState!==n.DONE&&n.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(P))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const R=new r.q("XSRF_COOKIE_NAME"),N=new r.q("XSRF_HEADER_NAME");class L{}let V=(()=>{class t{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Object(c.t)(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(c.c),r.Qb(r.B),r.Qb(R))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),M=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const r=this.tokenService.getToken();return null===r||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,r)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(L),r.Qb(N))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),F=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(k,[]);this.chain=t.reduceRight((t,e)=>new T(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(h),r.Qb(r.r))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),H=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:M,useClass:A}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:R,useValue:e.cookieName}:[],e.headerName?{provide:N,useValue:e.headerName}:[]]}}}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[M,{provide:k,useExisting:M,multi:!0},{provide:L,useClass:V},{provide:R,useValue:"XSRF-TOKEN"},{provide:N,useValue:"X-XSRF-TOKEN"}]}),t})(),U=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[x,{provide:u,useClass:F},D,{provide:h,useExisting:D},I,{provide:P,useExisting:I}],imports:[[H.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})()},tyNb:function(t,e,n){"use strict";n.d(e,"a",function(){return Cn}),n.d(e,"b",function(){return xn}),n.d(e,"c",function(){return En}),n.d(e,"d",function(){return Vn}),n.d(e,"e",function(){return Tn});var r=n("ofXK"),s=n("fXoL"),i=n("LRne"),o=n("Cfvw"),a=n("2Vo4"),l=n("z+Ro"),c=n("DH7j"),u=n("7o/Q");class h extends u.a{notifyNext(t,e,n,r,s){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class d extends u.a{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}var f=n("SeVD"),p=n("HDdC");function g(t,e,n,r,s=new d(t,n,r)){if(!s.closed)return e instanceof p.a?e.subscribe(s):Object(f.a)(e)(s)}var m=n("yCtX");const y={};class b{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new _(t,this.resultSelector))}}class _ extends h{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(y),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n0){const n=this.count>=this.total?this.total:this.count,r=this.ring;for(let s=0;st.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||r.lengthr[e]===t)}return t===e}function vt(t){return Array.prototype.concat.apply([],t)}function wt(t){return t.length>0?t[t.length-1]:null}function Ct(t,e){for(const n in t)t.hasOwnProperty(n)&&e(t[n],n)}function St(t){return Object(s.ob)(t)?t:Object(s.pb)(t)?Object(o.a)(Promise.resolve(t)):Object(i.a)(t)}function Et(t,e,n){return n?function(t,e){return bt(t,e)}(t.queryParams,e.queryParams)&&Ot(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>_t(t[n],e[n]))}(t.queryParams,e.queryParams)&&xt(t.root,e.root)}function Ot(t,e){if(!Pt(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(const n in e.children){if(!t.children[n])return!1;if(!Ot(t.children[n],e.children[n]))return!1}return!0}function xt(t,e){return Tt(t,e,e.segments)}function Tt(t,e,n){if(t.segments.length>n.length)return!!Pt(t.segments.slice(0,n.length),n)&&!e.hasChildren();if(t.segments.length===n.length){if(!Pt(t.segments,n))return!1;for(const n in e.children){if(!t.children[n])return!1;if(!xt(t.children[n],e.children[n]))return!1}return!0}{const r=n.slice(0,t.segments.length),s=n.slice(t.segments.length);return!!Pt(t.segments,r)&&!!t.children.primary&&Tt(t.children.primary,e,s)}}class kt{constructor(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=gt(this.queryParams)),this._queryParamMap}toString(){return Nt.serialize(this)}}class At{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Ct(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Lt(this)}}class jt{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=gt(this.parameters)),this._parameterMap}toString(){return zt(this)}}function Pt(t,e){return t.length===e.length&&t.every((t,n)=>t.path===e[n].path)}function It(t,e){let n=[];return Ct(t.children,(t,r)=>{"primary"===r&&(n=n.concat(e(t,r)))}),Ct(t.children,(t,r)=>{"primary"!==r&&(n=n.concat(e(t,r)))}),n}class Dt{}class Rt{parse(t){const e=new Kt(t);return new kt(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){return`${"/"+Vt(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(t=>`${Ft(e)}=${Ft(t)}`).join("&"):`${Ft(e)}=${Ft(n)}`});return e.length?"?"+e.join("&"):""}(t.queryParams)}${"string"==typeof t.fragment?"#"+encodeURI(t.fragment):""}`}}const Nt=new Rt;function Lt(t){return t.segments.map(t=>zt(t)).join("/")}function Vt(t,e){if(!t.hasChildren())return Lt(t);if(e){const e=t.children.primary?Vt(t.children.primary,!1):"",n=[];return Ct(t.children,(t,e)=>{"primary"!==e&&n.push(`${e}:${Vt(t,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=It(t,(e,n)=>"primary"===n?[Vt(t.children.primary,!1)]:[`${n}:${Vt(e,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children.primary?`${Lt(t)}/${e[0]}`:`${Lt(t)}/(${e.join("//")})`}}function Mt(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Ft(t){return Mt(t).replace(/%3B/gi,";")}function Ht(t){return Mt(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Ut(t){return decodeURIComponent(t)}function qt(t){return Ut(t.replace(/\+/g,"%20"))}function zt(t){return`${Ht(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${Ht(t)}=${Ht(e[t])}`).join("")}`;var e}const $t=/^[^\/()?;=#]+/;function Bt(t){const e=t.match($t);return e?e[0]:""}const Qt=/^[^=?&#]+/,Wt=/^[^?&#]+/;class Kt{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new At([],{}):new At([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new At(t,e)),n}parseSegment(){const t=Bt(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new jt(Ut(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Bt(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=Bt(this.remaining);t&&(n=t,this.capture(n))}t[Ut(e)]=Ut(n)}parseQueryParam(t){const e=function(t){const e=t.match(Qt);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(Wt);return e?e[0]:""}(this.remaining);t&&(n=t,this.capture(n))}const r=qt(e),s=qt(n);if(t.hasOwnProperty(r)){let e=t[r];Array.isArray(e)||(e=[e],t[r]=e),e.push(s)}else t[r]=s}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=Bt(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error(`Cannot parse url '${this.url}'`);let s=void 0;n.indexOf(":")>-1?(s=n.substr(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s="primary");const i=this.parseChildren();e[s]=1===Object.keys(i).length?i.primary:new At([],i),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class Gt{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=Zt(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=Zt(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=Xt(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return Xt(t,this._root).map(t=>t.value)}}function Zt(t,e){if(t===e.value)return e;for(const n of e.children){const e=Zt(t,n);if(e)return e}return null}function Xt(t,e){if(t===e.value)return[e];for(const n of e.children){const r=Xt(t,n);if(r.length)return r.unshift(e),r}return[]}class Jt{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function Yt(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e}class te extends Gt{constructor(t,e){super(t),this.snapshot=e,oe(this,t)}toString(){return this.snapshot.toString()}}function ee(t,e){const n=function(t,e){const n=new se([],{},{},"",{},"primary",e,null,t.root,-1,{});return new ie("",new Jt(n,[]))}(t,e),r=new a.a([new jt("",{})]),s=new a.a({}),i=new a.a({}),o=new a.a({}),l=new a.a(""),c=new ne(r,s,o,l,i,"primary",e,n.root);return c.snapshot=n.root,new te(new Jt(c,[]),n)}class ne{constructor(t,e,n,r,s,i,o,a){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=i,this.component=o,this._futureSnapshot=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(Object(E.a)(t=>gt(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Object(E.a)(t=>gt(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function re(t,e="emptyOnly"){const n=t.pathFromRoot;let r=0;if("always"!==e)for(r=n.length-1;r>=1;){const t=n[r],e=n[r-1];if(t.routeConfig&&""===t.routeConfig.path)r--;else{if(e.component)break;r--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(n.slice(r))}class se{constructor(t,e,n,r,s,i,o,a,l,c,u){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=i,this.component=o,this.routeConfig=a,this._urlSegment=l,this._lastPathIndex=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=gt(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=gt(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class ie extends Gt{constructor(t,e){super(e),this.url=t,oe(this,e)}toString(){return ae(this._root)}}function oe(t,e){e.value._routerState=t,e.children.forEach(e=>oe(t,e))}function ae(t){const e=t.children.length>0?` { ${t.children.map(ae).join(", ")} } `:"";return`${t.value}${e}`}function le(t){if(t.snapshot){const e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,bt(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),bt(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(let n=0;nbt(t.parameters,r[e].parameters))&&!(!t.parent!=!e.parent)&&(!t.parent||ce(t.parent,e.parent))}function ue(t,e,n){if(n&&t.shouldReuseRoute(e.value,n.value.snapshot)){const r=n.value;r._futureSnapshot=e.value;const s=function(t,e,n){return e.children.map(e=>{for(const r of n.children)if(t.shouldReuseRoute(e.value,r.value.snapshot))return ue(t,e,r);return ue(t,e)})}(t,e,n);return new Jt(r,s)}{const n=t.retrieve(e.value);if(n){const t=n.route;return he(e,t),t}{const n=new ne(new a.a((r=e.value).url),new a.a(r.params),new a.a(r.queryParams),new a.a(r.fragment),new a.a(r.data),r.outlet,r.component,r),s=e.children.map(e=>ue(t,e));return new Jt(n,s)}}var r}function he(t,e){if(t.value.routeConfig!==e.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==e.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");e.value._futureSnapshot=t.value;for(let n=0;n{i[e]=Array.isArray(t)?t.map(t=>""+t):""+t}),new kt(n.root===t?e:ge(n.root,t,e),i,s)}function ge(t,e,n){const r={};return Ct(t.children,(t,s)=>{r[s]=t===e?n:ge(t,e,n)}),new At(t.segments,r)}class me{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&de(n[0]))throw new Error("Root segment cannot have matrix parameters");const r=n.find(fe);if(r&&r!==wt(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ye{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function be(t,e,n){if(t||(t=new At([],{})),0===t.segments.length&&t.hasChildren())return _e(t,e,n);const r=function(t,e,n){let r=0,s=e;const i={match:!1,pathIndex:0,commandIndex:0};for(;s=n.length)return i;const e=t.segments[s],o=n[r];if(fe(o))break;const a=""+o,l=r0&&void 0===a)break;if(a&&l&&"object"==typeof l&&void 0===l.outlets){if(!Se(a,l,e))return i;r+=2}else{if(!Se(a,{},e))return i;r++}s++}return{match:!0,pathIndex:s,commandIndex:r}}(t,e,n),s=n.slice(r.commandIndex);if(r.match&&r.pathIndex{null!==n&&(s[r]=be(t.children[r],e,n))}),Ct(t.children,(t,e)=>{void 0===r[e]&&(s[e]=t)}),new At(t.segments,s)}}function ve(t,e,n){const r=t.segments.slice(0,e);let s=0;for(;s{null!==t&&(e[n]=ve(new At([],{}),0,t))}),e}function Ce(t){const e={};return Ct(t,(t,n)=>e[n]=""+t),e}function Se(t,e,n){return t==n.path&&bt(e,n.parameters)}class Ee{constructor(t,e,n,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=r}activate(t){const e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),le(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const r=Yt(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,r[e],n),delete r[e]}),Ct(r,(t,e)=>{this.deactivateRouteAndItsChildren(t,n)})}deactivateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(r===s)if(r.component){const s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,n);else s&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const n=e.getContext(t.value.outlet);if(n&&n.outlet){const e=n.outlet.detach(),r=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:r})}}deactivateRouteAndOutlet(t,e){const n=e.getContext(t.value.outlet);if(n){const r=Yt(t),s=t.value.component?n.children:e;Ct(r,(t,e)=>this.deactivateRouteAndItsChildren(t,s)),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}}activateChildRoutes(t,e,n){const r=Yt(e);t.children.forEach(t=>{this.activateRoutes(t,r[t.value.outlet],n),this.forwardEvent(new dt(t.value.snapshot))}),t.children.length&&this.forwardEvent(new ut(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(le(r),r===s)if(r.component){const s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,n);else if(r.component){const e=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const t=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),Oe(t.route)}else{const n=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(r.snapshot),s=n?n.module.componentFactoryResolver:null;e.attachRef=null,e.route=r,e.resolver=s,e.outlet&&e.outlet.activateWith(r,s),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,n)}}function Oe(t){le(t.value),t.children.forEach(Oe)}class xe{constructor(t,e){this.routes=t,this.module=e}}function Te(t){return"function"==typeof t}function ke(t){return t instanceof kt}const Ae=Symbol("INITIAL_VALUE");function je(){return Object(R.a)(t=>function(...t){let e=void 0,n=void 0;return Object(l.a)(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&Object(c.a)(t[0])&&(t=t[0]),Object(m.a)(t,n).lift(new b(e))}(...t.map(t=>t.pipe(Object(N.a)(1),function(...t){const e=t[t.length-1];return Object(l.a)(e)?(t.pop(),n=>Object(L.a)(t,n,e)):e=>Object(L.a)(t,e)}(Ae)))).pipe(function(t,e){let n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new V(t,e,n))}}((t,e)=>{let n=!1;return e.reduce((t,r,s)=>{if(t!==Ae)return t;if(r===Ae&&(n=!0),!n){if(!1===r)return r;if(s===e.length-1||ke(r))return r}return t},t)},Ae),Object(x.a)(t=>t!==Ae),Object(E.a)(t=>ke(t)?t:!0===t),Object(N.a)(1)))}let Pe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Bb({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&s.Ib(0,"router-outlet")},directives:function(){return[Tn]},encapsulation:2}),t})();function Ie(t,e=""){for(let n=0;ne.error(new Ve(t)))}function He(t){return new p.a(e=>e.error(new Me(t)))}function Ue(t){return new p.a(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class qe{constructor(t,e,n,r,i){this.configLoader=e,this.urlSerializer=n,this.urlTree=r,this.config=i,this.allowRedirects=!0,this.ngModule=t.get(s.x)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(Object(E.a)(t=>this.createUrlTree(t,this.urlTree.queryParams,this.urlTree.fragment))).pipe(H(t=>{if(t instanceof Me)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof Ve)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(Object(E.a)(e=>this.createUrlTree(e,t.queryParams,t.fragment))).pipe(H(t=>{if(t instanceof Ve)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,n){const r=t.segments.length>0?new At([],{primary:t}):t;return new kt(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(Object(E.a)(t=>new At([],t))):this.expandSegment(t,n,e,n.segments,r,!0)}expandChildren(t,e,n){return function(t,e){if(0===Object.keys(t).length)return Object(i.a)({});const n=[],r=[],s={};return Ct(t,(t,i)=>{const o=e(i,t).pipe(Object(E.a)(t=>s[i]=t));"primary"===i?n.push(o):r.push(o)}),i.a.apply(null,n.concat(r)).pipe(Object(O.a)(),function(t,e){const n=arguments.length>=2;return r=>r.pipe(t?Object(x.a)((e,n)=>t(e,n,r)):D.a,k(1),n?Object(I.a)(e):Object(P.a)(()=>new v.a))}(),Object(E.a)(()=>s))}(n.children,(n,r)=>this.expandSegmentGroup(t,e,r,n))}expandSegment(t,e,n,r,s,a){const l=function(t){return t.reduce((t,e)=>{const n=Le(e);return t.has(n)?t.get(n).push(e):t.set(n,[e]),t},new Map)}(n);l.has(s)||l.set(s,[]);const c=n=>Object(o.a)(n).pipe(Object(z.a)(o=>this.expandSegmentAgainstRoute(t,e,n,o,r,s,a).pipe(H(t=>{if(t instanceof Ve)return Object(i.a)(null);throw t}))),Object($.a)(t=>null!==t),H(t=>{if(t instanceof v.a||"EmptyError"===t.name){if(this.noLeftoversInUrl(e,r,s))return Object(i.a)(new At([],{}));throw new Ve(e)}throw t})),u=Array.from(l.entries()).map(([t,e])=>{const n=c(e);return t===s?n:n.pipe(Object(E.a)(()=>null),H(()=>Object(i.a)(null)))});return Object(o.a)(u).pipe(t=>t.lift(new b(void 0)),Object($.a)(),Object(E.a)(t=>t.find(t=>null!==t)))}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}expandSegmentAgainstRoute(t,e,n,r,s,i,o){return Le(r)!==i&&""!==r.path?Fe(e):void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,s):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i):Fe(e)}expandSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,r,i):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,n,r){const s=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?He(s):this.lineralizeSegments(n,s).pipe(Object(B.a)(n=>{const s=new At(n,{});return this.expandSegment(t,s,e,n,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:c}=ze(e,r,s);if(!o)return Fe(e);const u=this.applyRedirectCommands(a,r.redirectTo,c);return r.redirectTo.startsWith("/")?He(u):this.lineralizeSegments(r,u).pipe(Object(B.a)(r=>this.expandSegment(t,e,n,r.concat(s.slice(l)),i,!1)))}matchSegmentAgainstRoute(t,e,n,r){if("**"===n.path)return n.loadChildren?this.configLoader.load(t.injector,n).pipe(Object(E.a)(t=>(n._loadedConfig=t,new At(r,{})))):Object(i.a)(new At(r,{}));const{matched:s,consumedSegments:o,lastChild:a}=ze(e,n,r);if(!s)return Fe(e);const l=r.slice(a);return this.getChildConfig(t,n,r).pipe(Object(B.a)(t=>{const n=t.module,r=t.routes,{segmentGroup:s,slicedSegments:a}=function(t,e,n,r){return n.length>0&&function(t,e,n){return n.some(n=>Be(t,e,n)&&"primary"!==Le(n))}(t,n,r)?{segmentGroup:$e(new At(e,function(t,e){const n={};n.primary=e;for(const r of t)""===r.path&&"primary"!==Le(r)&&(n[Le(r)]=new At([],{}));return n}(r,new At(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return n.some(n=>Be(t,e,n))}(t,n,r)?{segmentGroup:$e(new At(t.segments,function(t,e,n,r){const s={};for(const i of n)Be(t,e,i)&&!r[Le(i)]&&(s[Le(i)]=new At([],{}));return Object.assign(Object.assign({},r),s)}(t,n,r,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,o,l,r);return 0===a.length&&s.hasChildren()?this.expandChildren(n,r,s).pipe(Object(E.a)(t=>new At(o,t))):0===r.length&&0===a.length?Object(i.a)(new At(o,{})):this.expandSegment(n,s,r,a,"primary",!0).pipe(Object(E.a)(t=>new At(o.concat(t.segments),t.children)))}))}getChildConfig(t,e,n){return e.children?Object(i.a)(new xe(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Object(i.a)(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(Object(B.a)(n=>n?this.configLoader.load(t.injector,e).pipe(Object(E.a)(t=>(e._loadedConfig=t,t))):function(t){return new p.a(e=>e.error(mt(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):Object(i.a)(new xe([],t))}runCanLoadGuards(t,e,n){const r=e.canLoad;if(!r||0===r.length)return Object(i.a)(!0);const s=r.map(r=>{const s=t.get(r);let i;if(function(t){return t&&Te(t.canLoad)}(s))i=s.canLoad(e,n);else{if(!Te(s))throw new Error("Invalid CanLoad guard");i=s(e,n)}return St(i)});return Object(i.a)(s).pipe(je(),Object(Q.a)(t=>{if(!ke(t))return;const e=mt(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),Object(E.a)(t=>!0===t))}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return Object(i.a)(n);if(r.numberOfChildren>1||!r.children.primary)return Ue(t.redirectTo);r=r.children.primary}}applyRedirectCommands(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}applyRedirectCreatreUrlTree(t,e,n,r){const s=this.createSegmentGroup(t,e.root,n,r);return new kt(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return Ct(t,(t,r)=>{if("string"==typeof t&&t.startsWith(":")){const s=t.substring(1);n[r]=e[s]}else n[r]=t}),n}createSegmentGroup(t,e,n,r){const s=this.createSegments(t,e.segments,n,r);let i={};return Ct(e.children,(e,s)=>{i[s]=this.createSegmentGroup(t,e,n,r)}),new At(s,i)}createSegments(t,e,n,r){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,r):this.findOrReturn(e,n))}findPosParam(t,e,n){const r=n[e.path.substring(1)];if(!r)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return r}findOrReturn(t,e){let n=0;for(const r of e){if(r.path===t.path)return e.splice(n),r;n++}return t}}function ze(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const r=(e.matcher||yt)(n,t,e);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function $e(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new At(t.segments.concat(e.segments),e.children)}return t}function Be(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}class Qe{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class We{constructor(t,e){this.component=t,this.route=e}}function Ke(t,e,n){const r=t._root;return Ze(r,e?e._root:null,n,[r.value])}function Ge(t,e,n){const r=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(r?r.module.injector:n).get(t)}function Ze(t,e,n,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const i=Yt(e);return t.children.forEach(t=>{!function(t,e,n,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const i=t.value,o=e?e.value:null,a=n?n.getContext(t.value.outlet):null;if(o&&i.routeConfig===o.routeConfig){const l=function(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!Pt(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Pt(t.url,e.url)||!bt(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ce(t,e)||!bt(t.queryParams,e.queryParams);case"paramsChange":default:return!ce(t,e)}}(o,i,i.routeConfig.runGuardsAndResolvers);l?s.canActivateChecks.push(new Qe(r)):(i.data=o.data,i._resolvedData=o._resolvedData),Ze(t,e,i.component?a?a.children:null:n,r,s),l&&a&&a.outlet&&a.outlet.isActivated&&s.canDeactivateChecks.push(new We(a.outlet.component,o))}else o&&Xe(e,a,s),s.canActivateChecks.push(new Qe(r)),Ze(t,null,i.component?a?a.children:null:n,r,s)}(t,i[t.value.outlet],n,r.concat([t.value]),s),delete i[t.value.outlet]}),Ct(i,(t,e)=>Xe(t,n.getContext(e),s)),s}function Xe(t,e,n){const r=Yt(t),s=t.value;Ct(r,(t,r)=>{Xe(t,s.component?e?e.children.getContext(r):null:e,n)}),n.canDeactivateChecks.push(new We(s.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,s))}function Je(t,e){return null!==t&&e&&e(new ht(t)),Object(i.a)(!0)}function Ye(t,e){return null!==t&&e&&e(new ct(t)),Object(i.a)(!0)}function tn(t,e,n){const r=e.routeConfig?e.routeConfig.canActivate:null;if(!r||0===r.length)return Object(i.a)(!0);const s=r.map(r=>Object(w.a)(()=>{const s=Ge(r,e,n);let i;if(function(t){return t&&Te(t.canActivate)}(s))i=St(s.canActivate(e,t));else{if(!Te(s))throw new Error("Invalid CanActivate guard");i=St(s(e,t))}return i.pipe(Object($.a)())}));return Object(i.a)(s).pipe(je())}function en(t,e,n){const r=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>Object(w.a)(()=>{const s=e.guards.map(s=>{const i=Ge(s,e.node,n);let o;if(function(t){return t&&Te(t.canActivateChild)}(i))o=St(i.canActivateChild(r,t));else{if(!Te(i))throw new Error("Invalid CanActivateChild guard");o=St(i(r,t))}return o.pipe(Object($.a)())});return Object(i.a)(s).pipe(je())}));return Object(i.a)(s).pipe(je())}class nn{}class rn{constructor(t,e,n,r,s,i){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=r,this.paramsInheritanceStrategy=s,this.relativeLinkResolution=i}recognize(){try{const t=an(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary"),n=new se([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Jt(n,e),s=new ie(this.url,r);return this.inheritParamsAndData(s._root),Object(i.a)(s)}catch(t){return new p.a(e=>e.error(t))}}inheritParamsAndData(t){const e=t.value,n=re(e,this.paramsInheritanceStrategy);e.params=Object.freeze(n.params),e.data=Object.freeze(n.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}processChildren(t,e){const n=It(e,(e,n)=>this.processSegmentGroup(t,e,n));return function(t){const e={};t.forEach(t=>{const n=e[t.value.outlet];if(n){const e=n.url.map(t=>t.toString()).join("/"),r=t.value.url.map(t=>t.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${e}' and '${r}'.`)}e[t.value.outlet]=t.value})}(n),n.sort((t,e)=>"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)),n}processSegment(t,e,n,r){for(const i of t)try{return this.processSegmentAgainstRoute(i,e,n,r)}catch(s){if(!(s instanceof nn))throw s}if(this.noLeftoversInUrl(e,n,r))return[];throw new nn}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}processSegmentAgainstRoute(t,e,n,r){if(t.redirectTo)throw new nn;if((t.outlet||"primary")!==r)throw new nn;let s,i=[],o=[];if("**"===t.path){const i=n.length>0?wt(n).parameters:{};s=new se(n,i,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,un(t),r,t.component,t,sn(e),on(e)+n.length,hn(t))}else{const a=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new nn;return{consumedSegments:[],lastChild:0,parameters:{}}}const r=(e.matcher||yt)(n,t,e);if(!r)throw new nn;const s={};Ct(r.posParams,(t,e)=>{s[e]=t.path});const i=r.consumed.length>0?Object.assign(Object.assign({},s),r.consumed[r.consumed.length-1].parameters):s;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:i}}(e,t,n);i=a.consumedSegments,o=n.slice(a.lastChild),s=new se(i,a.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,un(t),r,t.component,t,sn(e),on(e)+i.length,hn(t))}const a=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),{segmentGroup:l,slicedSegments:c}=an(e,i,o,a,this.relativeLinkResolution);if(0===c.length&&l.hasChildren()){const t=this.processChildren(a,l);return[new Jt(s,t)]}if(0===a.length&&0===c.length)return[new Jt(s,[])];const u=this.processSegment(a,l,c,"primary");return[new Jt(s,u)]}}function sn(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function on(t){let e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,n+=e._segmentIndexShift?e._segmentIndexShift:0;return n-1}function an(t,e,n,r,s){if(n.length>0&&function(t,e,n){return n.some(n=>ln(t,e,n)&&"primary"!==cn(n))}(t,n,r)){const s=new At(e,function(t,e,n,r){const s={};s.primary=r,r._sourceSegment=t,r._segmentIndexShift=e.length;for(const i of n)if(""===i.path&&"primary"!==cn(i)){const n=new At([],{});n._sourceSegment=t,n._segmentIndexShift=e.length,s[cn(i)]=n}return s}(t,e,r,new At(n,t.children)));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return n.some(n=>ln(t,e,n))}(t,n,r)){const i=new At(t.segments,function(t,e,n,r,s,i){const o={};for(const a of r)if(ln(t,n,a)&&!s[cn(a)]){const n=new At([],{});n._sourceSegment=t,n._segmentIndexShift="legacy"===i?t.segments.length:e.length,o[cn(a)]=n}return Object.assign(Object.assign({},s),o)}(t,e,n,r,t.children,s));return i._sourceSegment=t,i._segmentIndexShift=e.length,{segmentGroup:i,slicedSegments:n}}const i=new At(t.segments,t.children);return i._sourceSegment=t,i._segmentIndexShift=e.length,{segmentGroup:i,slicedSegments:n}}function ln(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function cn(t){return t.outlet||"primary"}function un(t){return t.data||{}}function hn(t){return t.resolve||{}}function dn(t){return function(e){return e.pipe(Object(R.a)(e=>{const n=t(e);return n?Object(o.a)(n).pipe(Object(E.a)(()=>e)):Object(o.a)([e])}))}}class fn extends class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}const pn=new s.q("ROUTES");class gn{constructor(t,e,n,r){this.loader=t,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=r}load(t,e){return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(Object(E.a)(n=>{this.onLoadEndListener&&this.onLoadEndListener(e);const r=n.create(t);return new xe(vt(r.injector.get(pn)).map(Ne),r)}))}loadModuleFactory(t){return"string"==typeof t?Object(o.a)(this.loader.load(t)):St(t()).pipe(Object(B.a)(t=>t instanceof s.v?Object(i.a)(t):Object(o.a)(this.compiler.compileModuleAsync(t))))}}class mn{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new yn,this.attachRef=null}}class yn{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new mn,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}class bn{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function _n(t){throw t}function vn(t,e,n){return e.parse("/")}function wn(t,e){return Object(i.a)(null)}let Cn=(()=>{class t{constructor(t,e,n,r,i,o,l,c){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=r,this.config=c,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new S.a,this.errorHandler=_n,this.malformedUriErrorHandler=vn,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:wn,afterPreactivation:wn},this.urlHandlingStrategy=new bn,this.routeReuseStrategy=new fn,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=i.get(s.x),this.console=i.get(s.W);const u=i.get(s.z);this.isNgZoneEnabled=u instanceof s.z,this.resetConfig(c),this.currentUrlTree=new kt(new At([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new gn(o,l,t=>this.triggerEvent(new at(t)),t=>this.triggerEvent(new lt(t))),this.routerState=ee(this.currentUrlTree,this.rootComponentType),this.transitions=new a.a({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(t){const e=this.events;return t.pipe(Object(x.a)(t=>0!==t.id),Object(E.a)(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),Object(R.a)(t=>{let n=!1,r=!1;return Object(i.a)(t).pipe(Object(Q.a)(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Object(R.a)(t=>{const n=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Object(i.a)(t).pipe(Object(R.a)(t=>{const n=this.transitions.getValue();return e.next(new J(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),n!==this.transitions.getValue()?C.a:[t]}),Object(R.a)(t=>Promise.resolve(t)),(r=this.ngModule.injector,s=this.configLoader,o=this.urlSerializer,a=this.config,function(t){return t.pipe(Object(R.a)(t=>function(t,e,n,r,s){return new qe(t,e,n,r,s).apply()}(r,s,o,t.extractedUrl,a).pipe(Object(E.a)(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e})))))}),Object(Q.a)(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,n,r,s){return function(i){return i.pipe(Object(B.a)(i=>function(t,e,n,r,s="emptyOnly",i="legacy"){return new rn(t,e,n,r,s,i).recognize()}(t,e,i.urlAfterRedirects,n(i.urlAfterRedirects),r,s).pipe(Object(E.a)(t=>Object.assign(Object.assign({},i),{targetSnapshot:t})))))}}(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),Object(Q.a)(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),Object(Q.a)(t=>{const n=new nt(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(n)}));var r,s,o,a;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:r,source:s,restoredState:o,extras:a}=t,l=new J(n,this.serializeUrl(r),s,o);e.next(l);const c=ee(r,this.rootComponentType).snapshot;return Object(i.a)(Object.assign(Object.assign({},t),{targetSnapshot:c,urlAfterRedirects:r,extras:Object.assign(Object.assign({},a),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),C.a}),dn(t=>{const{targetSnapshot:e,id:n,extractedUrl:r,rawUrl:s,extras:{skipLocationChange:i,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:n,appliedUrlTree:r,rawUrlTree:s,skipLocationChange:!!i,replaceUrl:!!o})}),Object(Q.a)(t=>{const e=new rt(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Object(E.a)(t=>Object.assign(Object.assign({},t),{guards:Ke(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return function(n){return n.pipe(Object(B.a)(n=>{const{targetSnapshot:r,currentSnapshot:s,guards:{canActivateChecks:a,canDeactivateChecks:l}}=n;return 0===l.length&&0===a.length?Object(i.a)(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,r){return Object(o.a)(t).pipe(Object(B.a)(t=>function(t,e,n,r,s){const o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||0===o.length)return Object(i.a)(!0);const a=o.map(i=>{const o=Ge(i,e,s);let a;if(function(t){return t&&Te(t.canDeactivate)}(o))a=St(o.canDeactivate(t,e,n,r));else{if(!Te(o))throw new Error("Invalid CanDeactivate guard");a=St(o(t,e,n,r))}return a.pipe(Object($.a)())});return Object(i.a)(a).pipe(je())}(t.component,t.route,n,e,r)),Object($.a)(t=>!0!==t,!0))}(l,r,s,t).pipe(Object(B.a)(n=>n&&"boolean"==typeof n?function(t,e,n,r){return Object(o.a)(e).pipe(Object(z.a)(e=>Object(o.a)([Ye(e.route.parent,r),Je(e.route,r),en(t,e.path,n),tn(t,e.route,n)]).pipe(Object(O.a)(),Object($.a)(t=>!0!==t,!0))),Object($.a)(t=>!0!==t,!0))}(r,a,t,e):Object(i.a)(n)),Object(E.a)(t=>Object.assign(Object.assign({},n),{guardsResult:t})))}))}}(this.ngModule.injector,t=>this.triggerEvent(t)),Object(Q.a)(t=>{if(ke(t.guardsResult)){const e=mt(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}}),Object(Q.a)(t=>{const e=new st(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),Object(x.a)(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const n=new tt(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(n),t.resolve(!1),!1}return!0}),dn(t=>{if(t.guards.canActivateChecks.length)return Object(i.a)(t).pipe(Object(Q.a)(t=>{const e=new it(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Object(R.a)(t=>{let n=!1;return Object(i.a)(t).pipe((r=this.paramsInheritanceStrategy,s=this.ngModule.injector,function(t){return t.pipe(Object(B.a)(t=>{const{targetSnapshot:e,guards:{canActivateChecks:n}}=t;if(!n.length)return Object(i.a)(t);let a=0;return Object(o.a)(n).pipe(Object(z.a)(t=>function(t,e,n,r){return function(t,e,n,r){const s=Object.keys(t);if(0===s.length)return Object(i.a)({});const a={};return Object(o.a)(s).pipe(Object(B.a)(s=>function(t,e,n,r){const s=Ge(t,e,r);return St(s.resolve?s.resolve(e,n):s(e,n))}(t[s],e,n,r).pipe(Object(Q.a)(t=>{a[s]=t}))),k(1),Object(B.a)(()=>Object.keys(a).length===s.length?Object(i.a)(a):C.a))}(t._resolve,t,e,r).pipe(Object(E.a)(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),re(t,n).resolve),null)))}(t.route,e,r,s)),Object(Q.a)(()=>a++),k(1),Object(B.a)(e=>a===n.length?Object(i.a)(t):C.a))}))}),Object(Q.a)({next:()=>n=!0,complete:()=>{if(!n){const n=new tt(t.id,this.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");e.next(n),t.resolve(!1)}}}));var r,s}),Object(Q.a)(t=>{const e=new ot(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),dn(t=>{const{targetSnapshot:e,id:n,extractedUrl:r,rawUrl:s,extras:{skipLocationChange:i,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:n,appliedUrlTree:r,rawUrlTree:s,skipLocationChange:!!i,replaceUrl:!!o})}),Object(E.a)(t=>{const e=function(t,e,n){const r=ue(t,e._root,n?n._root:void 0);return new te(r,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),Object(Q.a)(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(a=this.rootContexts,l=this.routeReuseStrategy,c=t=>this.triggerEvent(t),Object(E.a)(t=>(new Ee(l,t.targetRouterState,t.currentRouterState,c).activate(a),t))),Object(Q.a)({next(){n=!0},complete(){n=!0}}),(s=()=>{if(!n&&!r){this.resetUrlToCurrentUrlTree();const n=new tt(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(n),t.resolve(!1)}this.currentNavigation=null},t=>t.lift(new K(s))),H(n=>{if(r=!0,(s=n)&&s.ngNavigationCancelingError){const r=ke(n.url);r||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const s=new tt(t.id,this.serializeUrl(t.extractedUrl),n.message);e.next(s),r?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree);return this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const r=new et(t.id,this.serializeUrl(t.extractedUrl),n);e.next(r);try{t.resolve(this.errorHandler(n))}catch(i){t.reject(i)}}var s;return C.a}));var s,a,l,c}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const e=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,e)&&setTimeout(()=>{const{source:t,state:n,urlTree:r}=e,s={replaceUrl:!0};if(n){const t=Object.assign({},n);delete t.navigationId,0!==Object.keys(t).length&&(s.state=t)}this.scheduleNavigation(r,t,n,s)},0),this.lastLocationChangeInfo=e}))}extractLocationChangeInfoFromEvent(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,e){if(!t)return!0;const n=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&n&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){Ie(t),this.config=t.map(Ne),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}createUrlTree(t,e={}){const{relativeTo:n,queryParams:r,fragment:s,queryParamsHandling:i,preserveFragment:o}=e,a=n||this.routerState.root,l=o?this.currentUrlTree.fragment:s;let c=null;switch(i){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=r||null}return null!==c&&(c=this.removeEmptyProps(c)),function(t,e,n,r,s){if(0===n.length)return pe(e.root,e.root,e,r,s);const i=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new me(!0,0,t);let e=0,n=!1;const r=t.reduce((t,r,s)=>{if("object"==typeof r&&null!=r){if(r.outlets){const e={};return Ct(r.outlets,(t,n)=>{e[n]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(r.segmentPath)return[...t,r.segmentPath]}return"string"!=typeof r?[...t,r]:0===s?(r.split("/").forEach((r,s)=>{0==s&&"."===r||(0==s&&""===r?n=!0:".."===r?e++:""!=r&&t.push(r))}),t):[...t,r]},[]);return new me(n,e,r)}(n);if(i.toRoot())return pe(e.root,new At([],{}),e,r,s);const o=function(t,e,n){if(t.isAbsolute)return new ye(e.root,!0,0);if(-1===n.snapshot._lastPathIndex){const t=n.snapshot._urlSegment;return new ye(t,t===e.root,0)}const r=de(t.commands[0])?0:1;return function(t,e,n){let r=t,s=e,i=n;for(;i>s;){if(i-=s,r=r.parent,!r)throw new Error("Invalid number of '../'");s=r.segments.length}return new ye(r,!1,s-i)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+r,t.numberOfDoubleDots)}(i,e,t),a=o.processChildren?_e(o.segmentGroup,o.index,i.commands):be(o.segmentGroup,o.index,i.commands);return pe(o.segmentGroup,a,e,r,s)}(a,this.currentUrlTree,t,c,l)}navigateByUrl(t,e={skipLocationChange:!1}){const n=ke(t)?t:this.parseUrl(t),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e{const r=t[n];return null!=r&&(e[n]=r),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new Y(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,n,r,s){const i=this.getTransition(),o="imperative"!==e&&"imperative"===(null==i?void 0:i.source),a=(this.lastSuccessfulId===i.id||this.currentNavigation?i.rawUrl:i.urlAfterRedirects).toString()===t.toString();if(o&&a)return Promise.resolve(!0);let l,c,u;s?(l=s.resolve,c=s.reject,u=s.promise):u=new Promise((t,e)=>{l=t,c=e});const h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:r,resolve:l,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,n,r){const s=this.urlSerializer.serialize(t);r=r||{},this.location.isCurrentPathEqualTo(s)||e?this.location.replaceState(s,"",Object.assign(Object.assign({},r),{navigationId:n})):this.location.go(s,"",Object.assign(Object.assign({},r),{navigationId:n}))}resetStateAndUrl(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.M),s.Qb(Dt),s.Qb(yn),s.Qb(r.g),s.Qb(s.r),s.Qb(s.w),s.Qb(s.i),s.Qb(void 0))},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac}),t})(),Sn=(()=>{class t{constructor(t,e,n,r,s){this.router=t,this.route=e,this.commands=[],this.onChanges=new S.a,null==n&&r.setAttribute(s.nativeElement,"tabindex","0")}ngOnChanges(t){this.onChanges.next(this)}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}onClick(){const t={skipLocationChange:On(this.skipLocationChange),replaceUrl:On(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:On(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(s.Hb(Cn),s.Hb(ne),s.Rb("tabindex"),s.Hb(s.D),s.Hb(s.l))},t.\u0275dir=s.Cb({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(t,e){1&t&&s.Tb("click",function(){return e.onClick()})},inputs:{routerLink:"routerLink",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[s.vb]}),t})(),En=(()=>{class t{constructor(t,e,n){this.router=t,this.route=e,this.locationStrategy=n,this.commands=[],this.onChanges=new S.a,this.subscription=t.events.subscribe(t=>{t instanceof Y&&this.updateTargetUrlAndHref()})}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}ngOnChanges(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(t,e,n,r,s){if(0!==t||e||n||r||s)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;const i={skipLocationChange:On(this.skipLocationChange),replaceUrl:On(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,i),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:On(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(s.Hb(Cn),s.Hb(ne),s.Hb(r.h))},t.\u0275dir=s.Cb({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(t,e){1&t&&s.Tb("click",function(t){return e.onClick(t.button,t.ctrlKey,t.shiftKey,t.altKey,t.metaKey)}),2&t&&(s.Pb("href",e.href,s.jc),s.yb("target",e.target))},inputs:{routerLink:"routerLink",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[s.vb]}),t})();function On(t){return""===t||!!t}let xn=(()=>{class t{constructor(t,e,n,r,s,i){this.router=t,this.element=e,this.renderer=n,this.cdr=r,this.link=s,this.linkWithHref=i,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe(t=>{t instanceof Y&&this.update()})}ngAfterContentInit(){Object(o.a)([this.links.changes,this.linksWithHrefs.changes,Object(i.a)(null)]).pipe(Object(Z.a)()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var t;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();const e=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(t=>!!t).map(t=>t.onChanges);this.linkInputChangesSubscription=Object(o.a)(e).pipe(Object(Z.a)()).subscribe(t=>{this.isActive!==this.isLinkActive(this.router)(t)&&this.update()})}set routerLinkActive(t){const e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(t=>!!t)}ngOnChanges(t){this.update()}ngOnDestroy(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()}update(){this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(()=>{const t=this.hasActiveLinks();this.isActive!==t&&(this.isActive=t,this.cdr.markForCheck(),this.classes.forEach(e=>{t?this.renderer.addClass(this.element.nativeElement,e):this.renderer.removeClass(this.element.nativeElement,e)}))})}isLinkActive(t){return e=>t.isActive(e.urlTree,this.routerLinkActiveOptions.exact)}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)}}return t.\u0275fac=function(e){return new(e||t)(s.Hb(Cn),s.Hb(s.l),s.Hb(s.D),s.Hb(s.h),s.Hb(Sn,8),s.Hb(En,8))},t.\u0275dir=s.Cb({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(t,e,n){if(1&t&&(s.Ab(n,Sn,!0),s.Ab(n,En,!0)),2&t){let t;s.ec(t=s.Ub())&&(e.links=t),s.ec(t=s.Ub())&&(e.linksWithHrefs=t)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[s.vb]}),t})(),Tn=(()=>{class t{constructor(t,e,n,r,i){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=i,this.activated=null,this._activatedRoute=null,this.activateEvents=new s.n,this.deactivateEvents=new s.n,this.name=r||"primary",t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const n=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),r=this.parentContexts.getOrCreateContext(this.name).children,s=new kn(t,r,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,s),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(s.Hb(yn),s.Hb(s.O),s.Hb(s.j),s.Rb("name"),s.Hb(s.h))},t.\u0275dir=s.Cb({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class kn{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===ne?this.route:t===yn?this.childContexts:this.parent.get(t,e)}}class An{}class jn{preload(t,e){return Object(i.a)(null)}}let Pn=(()=>{class t{constructor(t,e,n,r,s){this.router=t,this.injector=r,this.preloadingStrategy=s,this.loader=new gn(e,n,e=>t.triggerEvent(new at(e)),e=>t.triggerEvent(new lt(e)))}setUpPreloading(){this.subscription=this.router.events.pipe(Object(x.a)(t=>t instanceof Y),Object(z.a)(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(s.x);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,e){const n=[];for(const r of e)if(r.loadChildren&&!r.canLoad&&r._loadedConfig){const t=r._loadedConfig;n.push(this.processRoutes(t.module,t.routes))}else r.loadChildren&&!r.canLoad?n.push(this.preloadConfig(t,r)):r.children&&n.push(this.processRoutes(t,r.children));return Object(o.a)(n).pipe(Object(Z.a)(),Object(E.a)(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>this.loader.load(t.injector,e).pipe(Object(B.a)(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(Cn),s.Qb(s.w),s.Qb(s.i),s.Qb(s.r),s.Qb(An))},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac}),t})(),In=(()=>{class t{constructor(t,e,n={}){this.router=t,this.viewportScroller=e,this.options=n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},n.scrollPositionRestoration=n.scrollPositionRestoration||"disabled",n.anchorScrolling=n.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof J?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof Y&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof ft&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new ft(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(Cn),s.Qb(r.p),s.Qb(void 0))},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac}),t})();const Dn=new s.q("ROUTER_CONFIGURATION"),Rn=new s.q("ROUTER_FORROOT_GUARD"),Nn=[r.g,{provide:Dt,useClass:Rt},{provide:Cn,useFactory:function(t,e,n,s,i,o,a,l={},c,u){const h=new Cn(null,t,e,n,s,i,o,vt(a));if(c&&(h.urlHandlingStrategy=c),u&&(h.routeReuseStrategy=u),function(t,e){t.errorHandler&&(e.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(e.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(e.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(e.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(e.urlUpdateStrategy=t.urlUpdateStrategy)}(l,h),l.enableTracing){const t=Object(r.s)();h.events.subscribe(e=>{t.logGroup("Router Event: "+e.constructor.name),t.log(e.toString()),t.log(e),t.logGroupEnd()})}return h},deps:[Dt,yn,r.g,s.r,s.w,s.i,pn,Dn,[class{},new s.A],[class{},new s.A]]},yn,{provide:ne,useFactory:function(t){return t.routerState.root},deps:[Cn]},{provide:s.w,useClass:s.J},Pn,jn,class{preload(t,e){return e().pipe(H(()=>Object(i.a)(null)))}},{provide:Dn,useValue:{enableTracing:!1}}];function Ln(){return new s.y("Router",Cn)}let Vn=(()=>{class t{constructor(t,e){}static forRoot(e,n){return{ngModule:t,providers:[Nn,Un(e),{provide:Rn,useFactory:Hn,deps:[[Cn,new s.A,new s.I]]},{provide:Dn,useValue:n||{}},{provide:r.h,useFactory:Fn,deps:[r.o,[new s.p(r.a),new s.A],Dn]},{provide:In,useFactory:Mn,deps:[Cn,r.p,Dn]},{provide:An,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:jn},{provide:s.y,multi:!0,useFactory:Ln},[qn,{provide:s.d,multi:!0,useFactory:zn,deps:[qn]},{provide:Bn,useFactory:$n,deps:[qn]},{provide:s.b,multi:!0,useExisting:Bn}]]}}static forChild(e){return{ngModule:t,providers:[Un(e)]}}}return t.\u0275mod=s.Fb({type:t}),t.\u0275inj=s.Eb({factory:function(e){return new(e||t)(s.Qb(Rn,8),s.Qb(Cn,8))}}),t})();function Mn(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new In(t,e,n)}function Fn(t,e,n={}){return n.useHash?new r.d(t,e):new r.n(t,e)}function Hn(t){return"guarded"}function Un(t){return[{provide:s.a,multi:!0,useValue:t},{provide:pn,multi:!0,useValue:t}]}let qn=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new S.a}appInitializer(){return this.injector.get(r.f,Promise.resolve(null)).then(()=>{let t=null;const e=new Promise(e=>t=e),n=this.injector.get(Cn),r=this.injector.get(Dn);return"disabled"===r.initialNavigation?(n.setUpLocationChangeListener(),t(!0)):"enabled"===r.initialNavigation||"enabledBlocking"===r.initialNavigation?(n.hooks.afterPreactivation=()=>this.initNavigation?Object(i.a)(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),n.initialNavigation()):t(!0),e})}bootstrapListener(t){const e=this.injector.get(Dn),n=this.injector.get(Pn),r=this.injector.get(In),i=this.injector.get(Cn),o=this.injector.get(s.g);t===o.components[0]&&("enabledNonBlocking"!==e.initialNavigation&&void 0!==e.initialNavigation||i.initialNavigation(),n.setUpPreloading(),r.init(),i.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.r))},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac}),t})();function zn(t){return t.appInitializer.bind(t)}function $n(t){return t.bootstrapListener.bind(t)}const Bn=new s.q("Router Initializer")},vkgz:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("7o/Q");function s(){}var i=n("n6bG");function o(t,e,n){return function(r){return r.lift(new a(t,e,n))}}class a{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new l(t,this.nextOrObserver,this.error,this.complete))}}class l extends r.a{constructor(t,e,n,r){super(t),this._tapNext=s,this._tapError=s,this._tapComplete=s,this._tapError=n||s,this._tapComplete=r||s,Object(i.a)(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||s,this._tapError=e.error||s,this._tapComplete=e.complete||s)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}},xbPD:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("7o/Q");function s(t=null){return e=>e.lift(new i(t))}class i{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new o(t,this.defaultValue))}}class o extends r.a{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}},yCtX:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("HDdC"),s=n("ngJS"),i=n("jZKg");function o(t,e){return e?Object(i.a)(t,e):new r.a(Object(s.a)(t))}},"z+Ro":function(t,e,n){"use strict";function r(t){return t&&"function"==typeof t.schedule}n.d(e,"a",function(){return r})},z6cu:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("HDdC");function s(t,e){return new r.a(e?n=>e.schedule(i,0,{error:t,subscriber:n}):e=>e.error(t))}function i({error:t,subscriber:e}){e.error(t)}},zUnb:function(t,e,n){"use strict";n.r(e);var r=n("fXoL"),s=n("tyNb");let i=(()=>{class t{constructor(){this.favIcon=document.querySelector("#favIcon"),this.lightIcon="../assets/classifai_dark.ico",this.favIcon.href=this.lightIcon}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(t,e){1&t&&r.Ib(0,"router-outlet")},directives:[s.e],styles:[""]}),t})();var o=n("1F7/"),a=n("14na"),l=n("I7yr"),c=n("sYmb"),u=n("ofXK");let h=(()=>{class t{transform(t){let e="";switch(t.slice(-2)){case"en":e="EN";break;case"cn":e="CN";break;case"ms":e="MS"}return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=r.Gb({name:"languageSlice",type:t,pure:!0}),t})();const d=["languages"];function f(t,e){if(1&t){const t=r.Nb();r.Mb(0,"li",9,10),r.Tb("click",function(){r.hc(t);const e=r.Vb().$implicit,n=r.Vb();return n.setLanguage(e),n.hideLangOpts()}),r.oc(2),r.Wb(3,"languageSlice"),r.Lb()}if(2&t){const t=r.Vb().$implicit;r.xb(2),r.qc(" ",r.Xb(3,1,t)," ")}}function p(t,e){if(1&t&&(r.Mb(0,"div"),r.mc(1,f,4,3,"li",8),r.Lb()),2&t){const t=e.$implicit,n=r.Vb();r.xb(1),r.ac("ngIf",t!==n._translate.currentLang)}}let g=(()=>{class t{constructor(t,e){this._translate=t,this._languageService=e,this.languageArr=[],this.headerImage="../../assets/landing-page/Classifai_Community_Logo.png";const n=["landing-page-en","landing-page-cn","landing-page-ms"];this._languageService.initializeLanguage("landing-page",n),this.languageArr=this._languageService.filterLanguageList(n,"landing-page")}ngOnInit(){}setLanguage(t){try{t?(this._languageService.setLanguageState(t),this._translate.use(t)):this._languageService.setLanguageState("en")}catch(e){console.log("setLanguage(language: string) ----\x3e ",e.name+": ",e.message)}}showLangOpts(){this.languages.forEach((t,e)=>{t.nativeElement.style.visibility="visible",t.nativeElement.style.opacity="100%",t.nativeElement.style.left=(-112*(e+1)).toString()+"%",t.nativeElement.style.transition=(.15*(1+e)).toString()+"s"})}hideLangOpts(){this.languages.forEach((t,e)=>{t.nativeElement.style.visibility="hidden",t.nativeElement.style.opacity="0%",t.nativeElement.style.left="0%",t.nativeElement.style.transition=(.15*(3-e)).toString()+"s"})}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(c.d),r.Hb(l.a))},t.\u0275cmp=r.Bb({type:t,selectors:[["home-header"]],viewQuery:function(t,e){if(1&t&&r.tc(d,!0),2&t){let t;r.ec(t=r.Ub())&&(e.languages=t)}},decls:13,vars:5,consts:[[1,"flex-header","header-container"],[1,"div-header-container"],[1,"header-img",3,"src"],[1,"version-container"],[1,"version-text"],[1,"share",3,"mouseenter","mouseleave"],[1,"toggle"],[4,"ngFor","ngForOf"],[3,"click",4,"ngIf"],[3,"click"],["languages",""]],template:function(t,e){1&t&&(r.Mb(0,"header",0),r.Mb(1,"div",1),r.Ib(2,"img",2),r.Lb(),r.Lb(),r.Mb(3,"div",3),r.Mb(4,"div",4),r.Mb(5,"p"),r.oc(6,"Version: 2.0.0 alpha1"),r.Lb(),r.Lb(),r.Lb(),r.Mb(7,"div",5),r.Tb("mouseenter",function(){return e.showLangOpts()})("mouseleave",function(){return e.hideLangOpts()}),r.Mb(8,"ul"),r.Mb(9,"div",6),r.oc(10),r.Wb(11,"languageSlice"),r.Lb(),r.mc(12,p,2,1,"div",7),r.Lb(),r.Lb()),2&t&&(r.xb(2),r.ac("src",e.headerImage,r.jc),r.xb(8),r.pc(r.Xb(11,3,e._translate.currentLang)),r.xb(2),r.ac("ngForOf",e.languageArr))},directives:[u.j,u.k],pipes:[h],styles:[".flex-header[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center}.header-container[_ngcontent-%COMP%]{background:#262a2e;color:snow;height:21vh}.div-header-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:space-around;justify-content:space-around;width:90vw;-webkit-align-items:center;align-items:center}.flex-grow[_ngcontent-%COMP%]{-webkit-flex-grow:1;flex-grow:1}.header-img[_ngcontent-%COMP%]{height:10vh;-webkit-user-select:none;user-select:none}.header[_ngcontent-%COMP%]{text-shadow:0 0 1.875rem #888}.sub-header[_ngcontent-%COMP%]{font-size:1rem;margin:0 0 0 5rem}.absolute[_ngcontent-%COMP%]{position:absolute;right:5rem}select[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none}.select-padding[_ngcontent-%COMP%]{position:absolute;height:4vh;font-size:1.5vh;top:10%;right:3%;border-radius:3vh;width:8vh;margin:0;text-align-last:center;background:#3c4044;color:#fff;border:2px solid #a7a7a7}.select-padding[_ngcontent-%COMP%]:hover{border:2px solid #fff}.select-padding[_ngcontent-%COMP%]:active{border:2px solid #fff}.share[_ngcontent-%COMP%]{position:absolute;top:8%;right:2%;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%);width:8vh;height:4vh;border-radius:3vh;margin:0;z-index:1;text-align:center;vertical-align:middle;line-height:4vh}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{position:relative;margin:0;padding:0;width:100%;height:100%}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style:none;border:.5px solid #a7a7a7;-webkit-transform:scale(.95);border-radius:3vh;visibility:hidden;opacity:0;-webkit-transform:translateZ(0)}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .toggle[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background:#3c4044;color:#fff;font-size:1.5vh;overflow:hidden;transform:scale(.95);cursor:pointer}.toggle[_ngcontent-%COMP%]{border:.0325vh solid #a7a7a7;-webkit-transform:scale(.95);border-radius:3vh}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover, .toggle[_ngcontent-%COMP%]:hover{background:#464a4e;border:.0625vh solid #fff}.version-container[_ngcontent-%COMP%]{position:absolute;top:8%;left:6%;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%);width:20vh;height:4vh;border-radius:3vh;margin:0;z-index:1;text-align:center;vertical-align:middle;line-height:4vh}.version-text[_ngcontent-%COMP%]{color:snow;font-size:1.7vh}"]}),t})();function m(t,e){if(1&t&&(r.Kb(0),r.Mb(1,"span",9),r.oc(2),r.Wb(3,"translate"),r.Lb(),r.Jb()),2&t){const t=r.Vb(),e=t.$implicit,n=t.index,s=r.Vb();r.xb(1),r.ac("ngClass",e.hoverLabel?null:"label-hidden"),r.xb(1),r.qc(" ",r.Xb(3,2,s.conditionalHoverPlaceholder(n,e.hoverLabel))," ")}}function y(t,e){if(1&t){const t=r.Nb();r.Kb(0),r.Mb(1,"div",4),r.Tb("mouseover",function(n){r.hc(t);const s=e.index;return r.Vb().mouseEventCapture(n,s)})("mouseleave",function(n){r.hc(t);const s=e.index;return r.Vb().mouseEventCapture(n,s)})("click",function(){r.hc(t);const n=e.$implicit;return r.Vb().emitParentUrl(n.enabled,n.urlPath)}),r.Mb(2,"div",5),r.Ib(3,"img",6),r.mc(4,m,4,4,"ng-container",7),r.Lb(),r.Mb(5,"div",8),r.Mb(6,"p"),r.oc(7),r.Wb(8,"translate"),r.Lb(),r.Lb(),r.Lb(),r.Jb()}if(2&t){const t=e.$implicit,n=e.index,s=r.Vb();r.xb(1),r.ac("ngStyle",s.hoverStyling(n,s.hover,t.hoverLabel,t.imgPath)),r.yb("data-index",n),r.xb(2),r.ac("src",t.logoPath,r.jc)("alt",t.logoAlt),r.xb(1),r.ac("ngIf",s.hover),r.xb(3),r.pc(r.Xb(8,6,t.title))}}let b=(()=>{class t{constructor(){this._onThumbnailClick=new r.n,this.hoverStyling=(t,e,n,r)=>t===this.hoverIndex&&e?{"background-image":"url("+r+")",opacity:"1.0",cursor:n?"not-allowed":"pointer"}:{"background-image":"url("+r+")",opacity:"0.5"},this.conditionalHoverPlaceholder=(t,e)=>t===this.hoverIndex&&e?e:""}ngOnInit(){}mouseEventCapture(t,e){const{type:n}=t;this.hover="mouseover"===n,this.hoverIndex=e}emitParentUrl(t,e){t&&this._onThumbnailClick.emit(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["home-card"]],inputs:{_jsonSchema:"_jsonSchema"},outputs:{_onThumbnailClick:"_onThumbnailClick"},decls:7,vars:1,consts:[[1,"flex-container"],[4,"ngFor","ngForOf"],[1,"copyright-container"],[1,"copyright-text"],[1,"card-container",3,"ngStyle","mouseover","mouseleave","click"],[1,"header-container"],[1,"logo",3,"src","alt"],[4,"ngIf"],[1,"banner"],[3,"ngClass"]],template:function(t,e){1&t&&(r.Mb(0,"div",0),r.mc(1,y,9,8,"ng-container",1),r.Mb(2,"div",2),r.Mb(3,"div",3),r.oc(4," Copyright \xa9 2020-2021 classifai. All rights reserved. "),r.Ib(5,"br"),r.oc(6," Classifai and the Classifai logo are trademarks of Skymind registered in Malaysia. "),r.Lb(),r.Lb(),r.Lb()),2&t&&(r.xb(1),r.ac("ngForOf",e._jsonSchema.fields))},directives:[u.j,u.l,u.k,u.i],pipes:[c.c],styles:[".flex-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:baseline;align-items:baseline;overflow:hidden}.card-container[_ngcontent-%COMP%]{display:table;background-repeat:no-repeat;background-size:cover;position:relative;height:74.5vh;width:25vw;object-fit:contain;border:.01vh solid #000}.flex-center[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.header-container[_ngcontent-%COMP%]{color:#fff;padding:10vh;font-size:xxx-large;display:grid;justify-items:center;height:58.7vh;line-height:10vh;font-size:2.5vh;text-align:center;white-space:nowrap}.label-hidden[_ngcontent-%COMP%]{visibility:hidden}.img[_ngcontent-%COMP%]{position:absolute}.image-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.logo[_ngcontent-%COMP%]{position:relative;height:15vh;margin-top:10vh}.banner[_ngcontent-%COMP%]{position:absolute;background:#fff;opacity:.9;width:inherit;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;bottom:5vh;font-size:2.5vh;height:10vh;min-height:10vh;line-height:5vh}.copyright-container[_ngcontent-%COMP%]{position:absolute;bottom:1vh;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.copyright-text[_ngcontent-%COMP%]{opacity:.5;text-align:center;color:#fff;font-size:1vh}"]}),t})(),_=(()=>{class t{constructor(){this._navigate=new r.n,this.languageArr=[],this.jsonSchema={fields:[{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"tabular",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Tabular.jpg",imgAlt:"tabular",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_CSV.png",logoAlt:"CSV"},{enabled:!0,urlPath:"/dataset",title:"image",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Image.jpg",imgAlt:"image",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_JPEG.png",logoAlt:"image"},{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"video",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Video.jpg",imgAlt:"video",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_MP4.png",logoAlt:"Video"},{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"voice",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Voice.jpg",imgAlt:"voice",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_MP3.png",logoAlt:"voice"}]}}ngOnInit(){}onThumbnailClick(t){this._navigate.emit(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["home-content"]],outputs:{_navigate:"_navigate"},decls:1,vars:1,consts:[[3,"_jsonSchema","_onThumbnailClick"]],template:function(t,e){1&t&&(r.Mb(0,"home-card",0),r.Tb("_onThumbnailClick",function(t){return e.onThumbnailClick(t)}),r.Lb()),2&t&&r.ac("_jsonSchema",e.jsonSchema)},directives:[b],styles:[""]}),t})(),v=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["home-footer"]],decls:0,vars:0,template:function(t,e){},styles:[".footer-container[_ngcontent-%COMP%]{background:#262a2e}.copyright-text[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;color:snow;text-align:center;font-size:10px}"]}),t})();var w=n("44N4");function C(t,e){if(1&t&&(r.Kb(0),r.Mb(1,"div"),r.Mb(2,"span",8),r.oc(3),r.Wb(4,"translate"),r.Lb(),r.Lb(),r.Mb(5,"div",9),r.Mb(6,"span",8),r.oc(7),r.Wb(8,"translate"),r.Lb(),r.Lb(),r.Jb()),2&t){const t=r.Vb(),e=t.$implicit,n=t.index,s=r.Vb();r.xb(2),r.ac("ngClass",e.title?null:"label-hidden"),r.xb(1),r.qc(" ",r.Xb(4,4,s.conditionalHoverPlaceholder(n,e.title))," "),r.xb(3),r.ac("ngClass",e.hoverLabel?null:"label-hidden"),r.xb(1),r.qc(" ",r.Xb(8,6,s.conditionalHoverPlaceholder(n,e.hoverLabel))," ")}}function S(t,e){if(1&t){const t=r.Nb();r.Kb(0),r.Mb(1,"div",4),r.Tb("mouseover",function(n){r.hc(t);const s=e.index;return r.Vb().mouseEventCapture(n,s)})("mouseleave",function(n){r.hc(t);const s=e.index;return r.Vb().mouseEventCapture(n,s)}),r.Mb(2,"div",5),r.Tb("click",function(){r.hc(t);const n=e.$implicit,s=r.Vb();return s.onCloseModal(s.modalIdImgLbl,n.enabled,n.urlPath)}),r.Ib(3,"img",6),r.mc(4,C,9,8,"ng-container",7),r.Lb(),r.Lb(),r.Jb()}if(2&t){const t=e.$implicit,n=e.index,s=r.Vb();r.xb(1),r.yb("data-index",n),r.xb(1),r.ac("ngStyle",s.hoverStyling(n,s.hover,t.enabled)),r.xb(1),r.ac("src",t.imgPath,r.jc)("alt",t.imgAlt),r.xb(1),r.ac("ngIf",s.hover)}}let E=(()=>{class t{constructor(t,e,n,r){this._modalService=t,this._router=e,this._imgLblMode=n,this._languageService=r,this.navigateUrl="",this.modalBodyStyle={minHeight:"37vh",maxHeight:"37vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.cardSchema={fields:[{enabled:!0,title:"imageOpt.boundingBoxes",urlPath:"boundingbox",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Band_Labeling.jpg",imgAlt:"Bounding Box"},{enabled:!1,title:"imageOpt.polygons",urlPath:"segmentation",hoverLabel:"comingSoon",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Band_Segmentation.jpg",imgAlt:"Segmentation"}]},this.modalIdImgLbl="modal-home-image-labelling",this.hover=!1,this.hoverIndex=-1,this.onDisplayModal=t=>{this._modalService.open(t)},this.onCloseModal=(t,e,n)=>{e&&(n&&(this._imgLblMode.setState("boundingbox"===n?"bndbox":"seg"),this._router.navigate([this.navigateUrl])),this._modalService.close(t))},this.hoverStyling=(t,e,n)=>t===this.hoverIndex&&e?{opacity:"1.0",cursor:n?"pointer":"not-allowed"}:{opacity:"0.5"},this.conditionalHoverPlaceholder=(t,e)=>t===this.hoverIndex&&e?e:"",this._languageService.initializeLanguage("landing-page",["landing-page-en","landing-page-cn","landing-page-ms"])}ngOnInit(){}navigate(t){this.navigateUrl=t,this.onDisplayModal(this.modalIdImgLbl)}mouseEventCapture(t,e){const{type:n}=t;this.hover="mouseover"===n,this.hoverIndex=e}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(o.a),r.Hb(s.a),r.Hb(a.a),r.Hb(l.a))},t.\u0275cmp=r.Bb({type:t,selectors:[["home-layout"]],decls:7,vars:7,consts:[[3,"_navigate"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"modal-body-container"],[4,"ngFor","ngForOf"],[1,"card-container",3,"mouseover","mouseleave"],[1,"img-container",3,"ngStyle","click"],[1,"card-image",3,"src","alt"],[4,"ngIf"],[3,"ngClass"],[1,"centered"]],template:function(t,e){1&t&&(r.Ib(0,"home-header"),r.Mb(1,"home-content",0),r.Tb("_navigate",function(t){return e.navigate(t)}),r.Lb(),r.Ib(2,"home-footer"),r.Mb(3,"modal",1),r.Wb(4,"translate"),r.Mb(5,"div",2),r.mc(6,S,5,5,"ng-container",3),r.Lb(),r.Lb()),2&t&&(r.xb(3),r.ac("id",e.modalIdImgLbl)("modalBodyStyle",e.modalBodyStyle)("modalTitle",r.Xb(4,5,"imageOpt.selection"))("scrollable",!1),r.xb(3),r.ac("ngForOf",e.cardSchema.fields))},directives:[g,_,v,w.a,u.j,u.l,u.k,u.i],pipes:[c.c],styles:[".modal-button[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw}.float-right[_ngcontent-%COMP%]{float:right}.label-hidden[_ngcontent-%COMP%]{visibility:hidden}.modal-header-container[_ngcontent-%COMP%]{-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;align-items:center;line-height:1vh;font-size:1vw;padding:.5vw}.modal-body-container[_ngcontent-%COMP%], .modal-header-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row}.modal-body-container[_ngcontent-%COMP%]{-webkit-justify-content:space-around;justify-content:space-around}.card-container[_ngcontent-%COMP%]{position:relative;text-align:center;font-weight:700;line-height:1vh;font-size:1vw;padding:.5vw}.card-image[_ngcontent-%COMP%]{max-width:14vw;min-width:14vw;min-height:25vh;max-height:25vh;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s;padding-bottom:3vh}.card-image[_ngcontent-%COMP%]:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.img-container[_ngcontent-%COMP%]{position:relative;text-align:center;color:#fff}.centered[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}"]}),t})(),O=(()=>{class t{constructor(){this.errorTitle="404",this.errorSubTitle="Page not found",this.errorMessage="Sorry, but the page you are looking for is not found. Please, make sure you have typed the current URL."}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["app-page-not-found"]],decls:6,vars:3,template:function(t,e){1&t&&(r.Mb(0,"h1"),r.oc(1),r.Lb(),r.Mb(2,"h2"),r.oc(3),r.Lb(),r.Mb(4,"p"),r.oc(5),r.Lb()),2&t&&(r.xb(1),r.pc(e.errorTitle),r.xb(2),r.pc(e.errorSubTitle),r.xb(2),r.pc(e.errorMessage))},styles:["h2[_ngcontent-%COMP%]{font-size:4em}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%]{font-weight:700;text-align:center;color:#fff}h1[_ngcontent-%COMP%]{margin-top:10%;font-size:10em}p[_ngcontent-%COMP%]{font-weight:700;font-size:1em;text-align:center;color:#fff}"]}),t})();const x=[{path:"",component:E},{path:"dataset",loadChildren:()=>Promise.all([n.e(1),n.e(7)]).then(n.bind(null,"RN8A")).then(({DataSetLayoutModule:t})=>t)},{path:"imglabel/bndbox",loadChildren:()=>Promise.all([n.e(1),n.e(2)]).then(n.bind(null,"i5u5")).then(({ImageLabellingLayoutModule:t})=>t)},{path:"imglabel/seg",loadChildren:()=>Promise.all([n.e(1),n.e(2)]).then(n.bind(null,"i5u5")).then(({ImageLabellingLayoutModule:t})=>t)},{path:"500",component:(()=>{class t{constructor(){this.errorMessage="Server Probably is Down, Please Contact Administrator!"}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["server-error"]],decls:4,vars:1,template:function(t,e){1&t&&(r.Mb(0,"h1"),r.oc(1,"500 Internal Server Error!"),r.Lb(),r.Mb(2,"p"),r.oc(3),r.Lb()),2&t&&(r.xb(3),r.qc(" ",e.errorMessage,"\n"))},styles:["p[_ngcontent-%COMP%]{font-size:2em}h1[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{font-weight:700;text-align:center;color:#000}h1[_ngcontent-%COMP%]{margin-top:15%;font-size:6em}"]}),t})()},{path:"**",component:O}];let T=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},imports:[[s.d.forRoot(x,{relativeLinkResolution:"legacy"})],s.d]}),t})();class k extends u.q{constructor(){super()}supportsDOMEvents(){return!0}}class A extends k{static makeCurrent(){Object(u.u)(new A)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=P||(P=document.querySelector("base"),P)?P.getAttribute("href"):null;return null==e?null:(n=e,j||(j=document.createElement("a")),j.setAttribute("href",n),"/"===j.pathname.charAt(0)?j.pathname:"/"+j.pathname);var n}resetBaseElement(){P=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return Object(u.t)(document.cookie,t)}}let j,P=null;const I=new r.q("TRANSITION_ID"),D=[{provide:r.d,useFactory:function(t,e,n){return()=>{n.get(r.e).donePromise.then(()=>{const n=Object(u.s)();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[I,u.c,r.r],multi:!0}];class R{static init(){Object(r.V)(new R)}addToWindow(t){r.mb.getAngularTestability=(e,n=!0)=>{const r=t.findTestabilityInTree(e,n);if(null==r)throw new Error("Could not find testability for element.");return r},r.mb.getAllAngularTestabilities=()=>t.getAllTestabilities(),r.mb.getAllAngularRootElements=()=>t.getAllRootElements(),r.mb.frameworkStabilizers||(r.mb.frameworkStabilizers=[]),r.mb.frameworkStabilizers.push(t=>{const e=r.mb.getAllAngularTestabilities();let n=e.length,s=!1;const i=function(e){s=s||e,n--,0==n&&t(s)};e.forEach(function(t){t.whenStable(i)})})}findTestabilityInTree(t,e,n){if(null==e)return null;const r=t.getTestability(e);return null!=r?r:n?Object(u.s)().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const N=new r.q("EventManagerPlugins");let L=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let r=0;r{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),F=(()=>{class t extends M{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const n=this._doc.createElement("style");n.textContent=t,this._styleNodes.add(e.appendChild(n))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>Object(u.s)().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(u.c))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const H={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/"},U=/%COMP%/g;function q(t,e,n){for(let r=0;r{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let $=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new B(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case r.P.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new Q(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case 1:case r.P.ShadowDom:return new W(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=q(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(L),r.Qb(F),r.Qb(r.c))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();class B{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(H[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;const s=H[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=H[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,s){s&(r.F.DashCase|r.F.Important)?t.style.setProperty(e,n,s&r.F.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&r.F.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,z(n)):this.eventManager.addEventListener(t,e,z(n))}}class Q extends B{constructor(t,e,n,r){super(t),this.component=n;const s=q(r+"-"+n.id,n.styles,[]);e.addStyles(s),this.contentAttr="_ngcontent-%COMP%".replace(U,r+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(U,r+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class W extends B{constructor(t,e,n,r){super(t),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=q(r.id,r.styles,[]);for(let i=0;i{class t extends V{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(u.c))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const G=["alt","control","meta","shift"],Z={"\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"},X={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"},J={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let Y=(()=>{class t extends V{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,r){const s=t.parseEventName(n),i=t.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Object(u.s)().onAndCancel(e,s.domEventName,i))}static parseEventName(e){const n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;const s=t._normalizeKey(n.pop());let i="";if(G.forEach(t=>{const e=n.indexOf(t);e>-1&&(n.splice(e,1),i+=t+".")}),i+=s,0!=n.length||0===s.length)return null;const o={};return o.domEventName=r,o.fullKey=i,o}static getEventFullKey(t){let e="",n=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&X.hasOwnProperty(e)&&(e=X[e]))}return Z[e]||e}(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),G.forEach(r=>{r!=n&&(0,J[r])(t)&&(e+=r+".")}),e+=n,e}static eventCallback(e,n,r){return s=>{t.getEventFullKey(s)===e&&r.runGuarded(()=>n(s))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(u.c))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const tt=[{provide:r.B,useValue:u.r},{provide:r.C,useValue:function(){A.makeCurrent(),R.init()},multi:!0},{provide:u.c,useFactory:function(){return Object(r.rb)(document),document},deps:[]}],et=Object(r.Q)(r.U,"browser",tt),nt=[[],{provide:r.X,useValue:"root"},{provide:r.m,useFactory:function(){return new r.m},deps:[]},{provide:N,useClass:K,multi:!0,deps:[u.c,r.z,r.B]},{provide:N,useClass:Y,multi:!0,deps:[u.c]},[],{provide:$,useClass:$,deps:[L,F,r.c]},{provide:r.E,useExisting:$},{provide:M,useExisting:F},{provide:F,useClass:F,deps:[u.c]},{provide:r.L,useClass:r.L,deps:[r.z]},{provide:L,useClass:L,deps:[N,r.z]},[]];let rt=(()=>{class t{constructor(t){if(t)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.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:r.c,useValue:e.appId},{provide:I,useExisting:r.c},D]}}}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)(r.Qb(t,12))},providers:nt,imports:[u.b,r.f]}),t})();"undefined"!=typeof window&&window;class st{}function it(t,e=null){return{type:2,steps:t,options:e}}function ot(t){return{type:6,styles:t,offset:null}}function at(t){Promise.resolve(null).then(t)}class lt{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){at(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class ct{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,r=0;const s=this.players.length;0==s?at(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==s&&this._onFinish()}),t.onDestroy(()=>{++n==s&&this._onDestroy()}),t.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){let t=0;return this.players.forEach(e=>{const n=e.getPosition();t=Math.min(n,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}function ut(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function ht(t){switch(t.length){case 0:return new lt;case 1:return t[0];default:return new ct(t)}}function dt(t,e,n,r,s={},i={}){const o=[],a=[];let l=-1,c=null;if(r.forEach(t=>{const n=t.offset,r=n==l,u=r&&c||{};Object.keys(t).forEach(n=>{let r=n,a=t[n];if("offset"!==n)switch(r=e.normalizePropertyName(r,o),a){case"!":a=s[n];break;case"*":a=i[n];break;default:a=e.normalizeStyleValue(n,r,a,o)}u[r]=a}),r||a.push(u),c=u,l=n}),o.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${o.join(t)}`)}return a}function ft(t,e,n,r){switch(e){case"start":t.onStart(()=>r(n&&pt(n,"start",t)));break;case"done":t.onDone(()=>r(n&&pt(n,"done",t)));break;case"destroy":t.onDestroy(()=>r(n&&pt(n,"destroy",t)))}}function pt(t,e,n){const r=n.totalTime,s=gt(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==r?t.totalTime:r,!!n.disabled),i=t._data;return null!=i&&(s._data=i),s}function gt(t,e,n,r,s="",i=0,o){return{element:t,triggerName:e,fromState:n,toState:r,phaseName:s,totalTime:i,disabled:!!o}}function mt(t,e,n){let r;return t instanceof Map?(r=t.get(e),r||t.set(e,r=n)):(r=t[e],r||(r=t[e]=n)),r}function yt(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let bt=(t,e)=>!1,_t=(t,e)=>!1,vt=(t,e,n)=>[];const wt=ut();(wt||"undefined"!=typeof Element)&&(bt=(t,e)=>t.contains(e),_t=(()=>{if(wt||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,n)=>e.apply(t,[n]):_t}})(),vt=(t,e,n)=>{let r=[];if(n)r.push(...t.querySelectorAll(e));else{const n=t.querySelector(e);n&&r.push(n)}return r});let Ct=null,St=!1;function Et(t){Ct||(Ct=("undefined"!=typeof document?document.body:null)||{},St=!!Ct.style&&"WebkitAppearance"in Ct.style);let e=!0;return Ct.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in Ct.style,!e&&St)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in Ct.style),e}const Ot=_t,xt=bt,Tt=vt;function kt(t){const e={};return Object.keys(t).forEach(n=>{const r=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[r]=t[n]}),e}let At=(()=>{class t{validateStyleProperty(t){return Et(t)}matchesElement(t,e){return Ot(t,e)}containsElement(t,e){return xt(t,e)}query(t,e,n){return Tt(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,r,s,i=[],o){return new lt(n,r)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),jt=(()=>{class t{}return t.NOOP=new At,t})();function Pt(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:It(parseFloat(e[1]),e[2])}function It(t,e){switch(e){case"s":return 1e3*t;default:return t}}function Dt(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let r,s=0,i="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};r=It(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(s=It(parseFloat(o),n[4]));const a=n[5];a&&(i=a)}else r=t;if(!n){let n=!1,i=e.length;r<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),s<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(i,0,`The provided timing value "${t}" is invalid.`)}return{duration:r,delay:s,easing:i}}(t,e,n)}function Rt(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function Nt(t,e,n={}){if(e)for(let r in t)n[r]=t[r];else Rt(t,n);return n}function Lt(t,e,n){return n?e+":"+n+";":""}function Vt(t){let e="";for(let n=0;n{const s=Qt(r);n&&!n.hasOwnProperty(r)&&(n[r]=t.style[s]),t.style[s]=e[r]}),ut()&&Vt(t))}function Ft(t,e){t.style&&(Object.keys(e).forEach(e=>{const n=Qt(e);t.style[n]=""}),ut()&&Vt(t))}function Ht(t){return Array.isArray(t)?1==t.length?t[0]:it(t):t}const Ut=new RegExp("{{\\s*(.+?)\\s*}}","g");function qt(t){let e=[];if("string"==typeof t){let n;for(;n=Ut.exec(t);)e.push(n[1]);Ut.lastIndex=0}return e}function zt(t,e,n){const r=t.toString(),s=r.replace(Ut,(t,r)=>{let s=e[r];return e.hasOwnProperty(r)||(n.push("Please provide a value for the animation param "+r),s=""),s.toString()});return s==r?t:s}function $t(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const Bt=/-+([a-z0-9])/g;function Qt(t){return t.replace(Bt,(...t)=>t[1].toUpperCase())}function Wt(t,e){return 0===t||0===e}function Kt(t,e,n){const r=Object.keys(n);if(r.length&&e.length){let i=e[0],o=[];if(r.forEach(t=>{i.hasOwnProperty(t)||o.push(t),i[t]=n[t]}),o.length)for(var s=1;sfunction(t,e,n){if(":"==t[0]){const r=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e) *"}}(t,n);if("function"==typeof r)return void e.push(r);t=r}const r=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const s=r[1],i=r[2],o=r[3];e.push(te(s,o)),"<"!=i[0]||"*"==s&&"*"==o||e.push(te(o,s))}(t,n,e)):n.push(t),n}const Jt=new Set(["true","1"]),Yt=new Set(["false","0"]);function te(t,e){const n=Jt.has(t)||Yt.has(t),r=Jt.has(e)||Yt.has(e);return(s,i)=>{let o="*"==t||t==s,a="*"==e||e==i;return!o&&n&&"boolean"==typeof s&&(o=s?Jt.has(t):Yt.has(t)),!a&&r&&"boolean"==typeof i&&(a=i?Jt.has(e):Yt.has(e)),o&&a}}const ee=new RegExp("s*:selfs*,?","g");function ne(t,e,n){return new re(t).build(e,n)}class re{constructor(t){this._driver=t}build(t,e){const n=new se(e);return this._resetContextStyleTimingState(n),Gt(this,Ht(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,r=e.depCount=0;const s=[],i=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,r=n.name;r.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,s.push(this.visitState(n,e))}),n.name=r}else if(1==t.type){const s=this.visitTransition(t,e);n+=s.queryCount,r+=s.depCount,i.push(s)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:s,transitions:i,queryCount:n,depCount:r,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(n.containsDynamicStyles){const s=new Set,i=r||{};if(n.styles.forEach(t=>{if(ie(t)){const e=t;Object.keys(e).forEach(t=>{qt(e[t]).forEach(t=>{i.hasOwnProperty(t)||s.add(t)})})}}),s.size){const n=$t(s.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=Gt(this,Ht(t.animation),e);return{type:1,matchers:Xt(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:oe(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>Gt(this,t,e)),options:oe(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(t=>{e.currentTime=n;const s=Gt(this,t,e);return r=Math.max(r,e.currentTime),s});return e.currentTime=r,{type:3,steps:s,options:oe(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return ae(Dt(t,e).duration,0,"");const r=t;if(r.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=ae(0,0,"");return t.dynamic=!0,t.strValue=r,t}return n=n||Dt(r,e),ae(n.duration,n.delay,n.easing)}(t.timings,e.errors);let r;e.currentAnimateTimings=n;let s=t.styles?t.styles:ot({});if(5==s.type)r=this.visitKeyframes(s,e);else{let s=t.styles,i=!1;if(!s){i=!0;const t={};n.easing&&(t.easing=n.easing),s=ot(t)}e.currentTime+=n.duration+n.delay;const o=this.visitStyle(s,e);o.isEmptyStep=i,r=o}return e.currentAnimateTimings=null,{type:4,timings:n,style:r,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?"*"==t?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let r=!1,s=null;return n.forEach(t=>{if(ie(t)){const e=t,n=e.easing;if(n&&(s=n,delete e.easing),!r)for(let t in e)if(e[t].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:n,easing:s,offset:t.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let r=e.currentTime,s=e.currentTime;n&&s>0&&(s-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const i=e.collectedStyles[e.currentQuerySelector],o=i[n];let a=!0;o&&(s!=r&&s>=o.startTime&&r<=o.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${s}ms" and "${r}ms"`),a=!1),s=o.startTime),a&&(i[n]={startTime:s,endTime:r}),e.options&&function(t,e,n){const r=e.params||{},s=qt(t);s.length&&s.forEach(t=>{r.hasOwnProperty(t)||n.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[n],e.options,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let r=0;const s=[];let i=!1,o=!1,a=0;const l=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let l=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(ie(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if(ie(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),c=0;return null!=l&&(r++,c=n.offset=l),o=o||c<0||c>1,i=i||c0&&r{const i=u>0?r==h?1:u*r:s[r],o=i*p;e.currentTime=d+f.delay+o,f.duration=o,this._validateStyleAst(t,e),t.offset=i,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:Gt(this,Ht(t.animation),e),options:oe(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:oe(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:oe(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,i]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(ee,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,".ng-animating"),e]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,mt(e.collectedStyles,e.currentQuerySelector,{});const o=Gt(this,Ht(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:i,animation:o,originalSelector:t.selector,options:oe(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:Dt(t.timings,e.errors,!0);return{type:12,animation:Gt(this,Ht(t.animation),e),timings:n,options:null}}}class se{constructor(t){this.errors=t,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 ie(t){return!Array.isArray(t)&&"object"==typeof t}function oe(t){var e;return t?(t=Rt(t)).params&&(t.params=(e=t.params)?Rt(e):null):t={},t}function ae(t,e,n){return{duration:t,delay:e,easing:n}}function le(t,e,n,r,s,i,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:r,duration:s,delay:i,totalTime:s+i,easing:o,subTimeline:a}}class ce{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const ue=new RegExp(":enter","g"),he=new RegExp(":leave","g");function de(t,e,n,r,s,i={},o={},a,l,c=[]){return(new fe).buildKeyframes(t,e,n,r,s,i,o,a,l,c)}class fe{buildKeyframes(t,e,n,r,s,i,o,a,l,c=[]){l=l||new ce;const u=new ge(t,e,l,r,s,c,[]);u.options=a,u.currentTimeline.setStyles([i],null,u.errors,a),Gt(this,n,u);const h=u.timelines.filter(t=>t.containsAnimation());if(h.length&&Object.keys(o).length){const t=h[h.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,u.errors,a)}return h.length?h.map(t=>t.buildKeyframes()):[le(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const r=e.createSubContext(t.options),s=e.currentTimeline.currentTime,i=this._visitSubInstructions(n,r,r.options);s!=i&&e.transformIntoNewTimeline(i)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let r=e.currentTimeline.currentTime;const s=null!=n.duration?Pt(n.duration):null,i=null!=n.delay?Pt(n.delay):null;return 0!==s&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,s,i);r=Math.max(r,n.duration+n.delay)}),r}visitReference(t,e){e.updateOptions(t.options,!0),Gt(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let r=e;const s=t.options;if(s&&(s.params||s.delay)&&(r=e.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=pe);const t=Pt(s.delay);r.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>Gt(this,t,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let r=e.currentTimeline.currentTime;const s=t.options&&t.options.delay?Pt(t.options.delay):0;t.steps.forEach(i=>{const o=e.createSubContext(t.options);s&&o.delayNextStep(s),Gt(this,i,o),r=Math.max(r,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return Dt(e.params?zt(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),r.snapshotCurrentStyles());const s=t.style;5==s.type?this.visitKeyframes(s,e):(e.incrementTime(n.duration),this.visitStyle(s,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,r=e.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();const s=r&&r.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(s):n.setStyles(t.styles,s,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,r=e.currentTimeline.duration,s=n.duration,i=e.createSubContext().currentTimeline;i.easing=n.easing,t.styles.forEach(t=>{i.forwardTime((t.offset||0)*s),i.setStyles(t.styles,t.easing,e.errors,e.options),i.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(i),e.transformIntoNewTimeline(r+s),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,r=t.options||{},s=r.delay?Pt(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pe);let i=n;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=o.length;let a=null;o.forEach((n,r)=>{e.currentQueryIndex=r;const o=e.createSubContext(t.options,n);s&&o.delayNextStep(s),n===e.element&&(a=o.currentTimeline),Gt(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),i=Math.max(i,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(i),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,r=e.currentTimeline,s=t.timings,i=Math.abs(s.duration),o=i*(e.currentQueryTotal-1);let a=i*e.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;Gt(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-c+(r.startTime-n.currentTimeline.startTime)}}const pe={};class ge{constructor(t,e,n,r,s,i,o,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=s,this.errors=i,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=pe,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new me(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let r=this.options;null!=n.duration&&(r.duration=Pt(n.duration)),null!=n.delay&&(r.delay=Pt(n.delay));const s=n.params;if(s){let t=r.params;t||(t=this.options.params={}),Object.keys(s).forEach(n=>{e&&t.hasOwnProperty(n)||(t[n]=zt(s[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const r=e||this.element,s=new ge(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(t),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(t){return this.previousNode=pe,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const r={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},s=new ye(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,r,s,i){let o=[];if(r&&o.push(this.element),t.length>0){t=(t=t.replace(ue,"."+this._enterClassName)).replace(he,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),o.push(...e)}return s||0!=o.length||i.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class me{constructor(t,e,n,r){this._driver=t,this.element=e,this.startTime=n,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(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new me(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){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))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||"*",this._currentKeyframe[t]="*"}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&(this._previousKeyframe.easing=e);const s=r&&r.params||{},i=function(t,e){const n={};let r;return t.forEach(t=>{"*"===t?(r=r||Object.keys(e),r.forEach(t=>{n[t]="*"})):Nt(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(i).forEach(t=>{const e=zt(i[t],s,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:"*"),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],r=t._styleSummary[e];(!n||r.time>n.time)&&this._updateStyle(e,r.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((s,i)=>{const o=Nt(s,!0);Object.keys(o).forEach(n=>{const r=o[n];"!"==r?t.add(n):"*"==r&&e.add(n)}),n||(o.offset=i/this.duration),r.push(o)});const s=t.size?$t(t.values()):[],i=e.size?$t(e.values()):[];if(n){const t=r[0],e=Rt(t);t.offset=0,e.offset=1,r=[t,e]}return le(this.element,r,s,i,this.duration,this.startTime,this.easing,!1)}}class ye extends me{constructor(t,e,n,r,s,i,o=!1){super(t,e,i.delay),this.element=e,this.keyframes=n,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=o,this.timings={duration:i.duration,delay:i.delay,easing:i.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const s=[],i=n+e,o=e/i,a=Nt(t[0],!1);a.offset=0,s.push(a);const l=Nt(t[0],!1);l.offset=be(o),s.push(l);const c=t.length-1;for(let r=1;r<=c;r++){let o=Nt(t[r],!1);o.offset=be((e+o.offset*n)/i),s.push(o)}n=i,e=0,r="",t=s}return le(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function be(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class _e{}class ve extends _e{normalizePropertyName(t,e){return Qt(t)}normalizeStyleValue(t,e,n,r){let s="";const i=n.toString().trim();if(we[e]&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&r.push(`Please provide a CSS unit value for ${t}:${n}`)}return i+s}}const we=(()=>function(t){const e={};return t.forEach(t=>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 Ce(t,e,n,r,s,i,o,a,l,c,u,h,d){return{type:0,element:t,triggerName:e,isRemovalTransition:s,fromState:n,fromStyles:i,toState:r,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:h,errors:d}}const Se={};class Ee{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function(t,e,n,r,s){return t.some(t=>t(e,n,r,s))}(this.ast.matchers,t,e,n,r)}buildStyles(t,e,n){const r=this._stateStyles["*"],s=this._stateStyles[t],i=r?r.buildStyles(e,n):{};return s?s.buildStyles(e,n):i}build(t,e,n,r,s,i,o,a,l,c){const u=[],h=this.ast.options&&this.ast.options.params||Se,d=this.buildStyles(n,o&&o.params||Se,u),f=a&&a.params||Se,p=this.buildStyles(r,f,u),g=new Set,m=new Map,y=new Map,b="void"===r,_={params:Object.assign(Object.assign({},h),f)},v=c?[]:de(t,e,this.ast.animation,s,i,d,p,_,l,u);let w=0;if(v.forEach(t=>{w=Math.max(t.duration+t.delay,w)}),u.length)return Ce(e,this._triggerName,n,r,b,d,p,[],[],m,y,w,u);v.forEach(t=>{const n=t.element,r=mt(m,n,{});t.preStyleProps.forEach(t=>r[t]=!0);const s=mt(y,n,{});t.postStyleProps.forEach(t=>s[t]=!0),n!==e&&g.add(n)});const C=$t(g.values());return Ce(e,this._triggerName,n,r,b,d,p,v,C,m,y,w)}}class Oe{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const n={},r=Rt(this.defaultParams);return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(r[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const s=t;Object.keys(s).forEach(t=>{let i=s[t];i.length>1&&(i=zt(i,r,e)),n[t]=i})}}),n}}class xe{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new Oe(t.style,t.options&&t.options.params||{})}),Te(this.states,"true","1"),Te(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new Ee(t,e,this.states))}),this.fallbackTransition=new Ee(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,r){return this.transitionFactories.find(s=>s.match(t,e,n,r))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function Te(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const ke=new ce;class Ae{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],r=ne(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=r}_buildPlayer(t,e,n){const r=t.element,s=dt(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(r,s,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const r=[],s=this._animations[t];let i;const o=new Map;if(s?(i=de(this._driver,e,s,"ng-enter","ng-leave",{},{},n,ke,r),i.forEach(t=>{const e=mt(o,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(r.push("The requested animation doesn't exist or has already been destroyed"),i=[]),r.length)throw new Error("Unable to create the animation due to the following errors: "+r.join("\n"));o.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,"*")})});const a=ht(i.map(t=>{const e=o.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e}listen(t,e,n,r){const s=gt(e,"","","");return ft(this._getPlayer(t),n,s,r),()=>{}}command(t,e,n,r){if("register"==n)return void this.register(t,r[0]);if("create"==n)return void this.create(t,e,r[0]||{});const s=this._getPlayer(t);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const je=[],Pe={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Ie={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class De{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=null!=(r=n?t.value:t)?r:null,n){const e=Rt(t);delete e.value,this.options=e}else this.options={};var r;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const Re=new De("void");class Ne{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,qe(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(s=n)&&"done"!=s)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);var s;const i=mt(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};i.push(o);const a=mt(this._engine.statesByElement,t,{});return a.hasOwnProperty(e)||(qe(t,"ng-trigger"),qe(t,"ng-trigger-"+e),a[e]=Re),()=>{this._engine.afterFlush(()=>{const t=i.indexOf(o);t>=0&&i.splice(t,1),this._triggers[e]||delete a[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),i=new Ve(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(qe(t,"ng-trigger"),qe(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let a=o[e];const l=new De(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[e]=l,a||(a=Re),"void"!==l.value&&a.value===l.value){if(!function(t,e){const n=Object.keys(t),r=Object.keys(e);if(n.length!=r.length)return!1;for(let s=0;s{Ft(t,n),Mt(t,r)})}return}const c=mt(this._engine.playersByElement,t,[]);c.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let u=s.matchTransition(a.value,l.value,t,l.params),h=!1;if(!u){if(!r)return;u=s.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:u,fromState:a,toState:l,player:i,isFallbackTransition:h}),h||(qe(t,"ng-animate-queued"),i.onStart(()=>{ze(t,"ng-animate-queued")})),i.onDone(()=>{let e=this.players.indexOf(i);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(i);t>=0&&n.splice(t,1)}}),this.players.push(i),c.push(i),i}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const n=this._engine.driver.query(t,".ng-trigger",!0);n.forEach(t=>{if(t.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,n,r){const s=this._engine.statesByElement.get(t);if(s){const i=[];if(Object.keys(s).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,"void",r);n&&i.push(n)}}),i.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&ht(i).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const n=new Set;e.forEach(e=>{const r=e.name;if(n.has(r))return;n.add(r);const s=this._triggers[r].fallbackTransition,i=this._engine.statesByElement.get(t)[r]||Re,o=new De("void"),a=new Ve(this.id,r,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:r,transition:s,fromState:i,toState:o,player:a,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)r=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)n.markElementAsRemoved(this.id,t,!1,e);else{const r=t.__ng_removed;r&&r!==Pe||(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){qe(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const r=n.player;if(r.destroyed)return;const s=n.element,i=this._elementListeners.get(s);i&&i.forEach(e=>{if(e.name==n.triggerName){const r=gt(s,n.triggerName,n.fromState.value,n.toState.value);r._data=t,ft(n.player,e.phase,r,e.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,r=e.transition.ast.depCount;return 0==n||0==r?n-r:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class Le{constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,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=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new Ne(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let r=!1;for(let s=n;s>=0;s--)if(this.driver.containsElement(this._namespaceList[s].hostElement,e)){this._namespaceList.splice(s+1,0,t),r=!0;break}r||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let r=this._namespaceLookup[t];r&&r.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let r=0;r=0&&this.collectedLeaveElements.splice(t,1)}if(t){const r=this._fetchNamespace(t);r&&r.insertNode(e,n)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),qe(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),ze(t,"ng-animate-disabled"))}removeNode(t,e,n,r){if(Me(e)){const s=t?this._fetchNamespace(t):null;if(s?s.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),n){const n=this.namespacesByHostElement.get(e);n&&n.id!==t&&n.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,n,r){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,r,s){return Me(e)?this._fetchNamespace(t).listen(e,n,r,s):()=>{}}_buildInstruction(t,e,n,r,s){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,r,t.fromState.options,t.toState.options,e,s)}destroyInnerAnimations(t){let e=this.driver.query(t,".ng-trigger",!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,".ng-animating",!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return ht(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=Pe,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nt()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?ht(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))}_flushAnimations(t,e){const n=new ce,r=[],s=new Map,i=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(t=>{c.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let n=0;n{const n="ng-enter"+p++;f.set(e,n),t.forEach(t=>qe(t,n))});const g=[],m=new Set,y=new Set;for(let j=0;jm.add(t)):y.add(t))}const b=new Map,_=Ue(h,Array.from(m));_.forEach((t,e)=>{const n="ng-leave"+p++;b.set(e,n),t.forEach(t=>qe(t,n))}),t.push(()=>{d.forEach((t,e)=>{const n=f.get(e);t.forEach(t=>ze(t,n))}),_.forEach((t,e)=>{const n=b.get(e);t.forEach(t=>ze(t,n))}),g.forEach(t=>{this.processLeaveNode(t)})});const v=[],w=[];for(let j=this._namespaceList.length-1;j>=0;j--)this._namespaceList[j].drainQueuedTransitions(e).forEach(t=>{const e=t.player,s=t.element;if(v.push(e),this.collectedEnterElements.length){const t=s.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const c=!u||!this.driver.containsElement(u,s),h=b.get(s),d=f.get(s),p=this._buildInstruction(t,n,d,h,c);if(p.errors&&p.errors.length)w.push(p);else{if(c)return e.onStart(()=>Ft(s,p.fromStyles)),e.onDestroy(()=>Mt(s,p.toStyles)),void r.push(e);if(t.isFallbackTransition)return e.onStart(()=>Ft(s,p.fromStyles)),e.onDestroy(()=>Mt(s,p.toStyles)),void r.push(e);p.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(s,p.timelines),i.push({instruction:p,player:e,element:s}),p.queriedElements.forEach(t=>mt(o,t,[]).push(e)),p.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),p.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let r=l.get(e);r||l.set(e,r=new Set),n.forEach(t=>r.add(t))})}});if(w.length){const t=[];w.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),v.forEach(t=>t.destroy()),this.reportError(t)}const C=new Map,S=new Map;i.forEach(t=>{const e=t.element;n.has(e)&&(S.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,C))}),r.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{mt(C,e,[]).push(t),t.destroy()})});const E=g.filter(t=>Qe(t,a,l)),O=new Map;He(O,this.driver,y,l,"*").forEach(t=>{Qe(t,a,l)&&E.push(t)});const x=new Map;d.forEach((t,e)=>{He(x,this.driver,new Set(t),a,"!")}),E.forEach(t=>{const e=O.get(t),n=x.get(t);O.set(t,Object.assign(Object.assign({},e),n))});const T=[],k=[],A={};i.forEach(t=>{const{element:e,player:i,instruction:o}=t;if(n.has(e)){if(c.has(e))return i.onDestroy(()=>Mt(e,o.toStyles)),i.disabled=!0,i.overrideTotalTime(o.totalTime),void r.push(i);let t=A;if(S.size>1){let n=e;const r=[];for(;n=n.parentNode;){const e=S.get(n);if(e){t=e;break}r.push(n)}r.forEach(e=>S.set(e,t))}const n=this._buildAnimation(i.namespaceId,o,C,s,x,O);if(i.setRealPlayer(n),t===A)T.push(i);else{const e=this.playersByElement.get(t);e&&e.length&&(i.parentPlayer=ht(e)),r.push(i)}}else Ft(e,o.fromStyles),i.onDestroy(()=>Mt(e,o.toStyles)),k.push(i),c.has(e)&&r.push(i)}),k.forEach(t=>{const e=s.get(t.element);if(e&&e.length){const n=ht(e);t.setRealPlayer(n)}}),r.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let j=0;j!t.destroyed);r.length?$e(this,t,r):this.processLeaveNode(t)}return g.length=0,T.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),T}elementContainsData(t,e){let n=!1;const r=e.__ng_removed;return r&&r.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}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,r,s){let i=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(i=e)}else{const e=this.playersByElement.get(t);if(e){const t=!s||"void"==s;e.forEach(e=>{e.queued||(t||e.triggerName==r)&&i.push(e)})}}return(n||r)&&(i=i.filter(t=>!(n&&n!=t.namespaceId||r&&r!=t.triggerName))),i}_beforeAnimationBuild(t,e,n){const r=e.element,s=e.isRemovalTransition?void 0:t,i=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,a=t!==r,l=mt(n,t,[]);this._getPreviousPlayers(t,a,s,i,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}Ft(r,e.fromStyles)}_buildAnimation(t,e,n,r,s,i){const o=e.triggerName,a=e.element,l=[],c=new Set,u=new Set,h=e.timelines.map(e=>{const h=e.element;c.add(h);const d=h.__ng_removed;if(d&&d.removedBeforeQueried)return new lt(e.duration,e.delay);const f=h!==a,p=function(t){const e=[];return Be(t,e),e}((n.get(h)||je).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===h),g=s.get(h),m=i.get(h),y=dt(0,this._normalizer,0,e.keyframes,g,m),b=this._buildPlayer(e,y,p);if(e.subTimeline&&r&&u.add(h),f){const e=new Ve(t,o,h);e.setRealPlayer(b),l.push(e)}return b});l.forEach(t=>{mt(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,n){let r;if(t instanceof Map){if(r=t.get(e),r){if(r.length){const t=r.indexOf(n);r.splice(t,1)}0==r.length&&t.delete(e)}}else if(r=t[e],r){if(r.length){const t=r.indexOf(n);r.splice(t,1)}0==r.length&&delete t[e]}return r}(this.playersByQueriedElement,t.element,t))}),c.forEach(t=>qe(t,"ng-animating"));const d=ht(h);return d.onDestroy(()=>{c.forEach(t=>ze(t,"ng-animating")),Mt(a,e.toStyles)}),u.forEach(t=>{mt(r,t,[]).push(d)}),d}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new lt(t.duration,t.delay)}}class Ve{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new lt,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>ft(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){mt(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Me(t){return t&&1===t.nodeType}function Fe(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function He(t,e,n,r,s){const i=[];n.forEach(t=>i.push(Fe(t)));const o=[];r.forEach((n,r)=>{const i={};n.forEach(t=>{const n=i[t]=e.computeStyle(r,t,s);n&&0!=n.length||(r.__ng_removed=Ie,o.push(r))}),t.set(r,i)});let a=0;return n.forEach(t=>Fe(t,i[a++])),o}function Ue(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const r=new Set(e),s=new Map;function i(t){if(!t)return 1;let e=s.get(t);if(e)return e;const o=t.parentNode;return e=n.has(o)?o:r.has(o)?1:i(o),s.set(t,e),e}return e.forEach(t=>{const e=i(t);1!==e&&n.get(e).push(t)}),n}function qe(t,e){if(t.classList)t.classList.add(e);else{let n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function ze(t,e){if(t.classList)t.classList.remove(e);else{let n=t.$$classes;n&&delete n[e]}}function $e(t,e,n){ht(n).onDone(()=>t.processLeaveNode(e))}function Be(t,e){for(let n=0;ns.add(t)):e.set(t,r),n.delete(t),!0}class We{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new Le(t,e,n),this._timelineEngine=new Ae(t,e,n),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,n,r,s){const i=t+"-"+r;let o=this._triggerCache[i];if(!o){const t=[],e=ne(this._driver,s,t);if(t.length)throw new Error(`The animation trigger "${r}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new xe(t,e)}(r,e),this._triggerCache[i]=o}this._transitionEngine.registerTrigger(e,r,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,r){this._transitionEngine.insertNode(t,e,n,r)}onRemove(t,e,n,r){this._transitionEngine.removeNode(t,e,r||!1,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,r){if("@"==n.charAt(0)){const[t,s]=yt(n);this._timelineEngine.command(t,e,s,r)}else this._transitionEngine.trigger(t,e,n,r)}listen(t,e,n,r,s){if("@"==n.charAt(0)){const[t,r]=yt(n);return this._timelineEngine.listen(t,e,r,s)}return this._transitionEngine.listen(t,e,n,r,s)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function Ke(t,e){let n=null,r=null;return Array.isArray(e)&&e.length?(n=Ze(e[0]),e.length>1&&(r=Ze(e[e.length-1]))):e&&(n=Ze(e)),n||r?new Ge(t,n,r):null}let Ge=(()=>{class t{constructor(e,n,r){this._element=e,this._startStyles=n,this._endStyles=r,this._state=0;let s=t.initialStylesByElement.get(e);s||t.initialStylesByElement.set(e,s={}),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Mt(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Mt(this._element,this._initialStyles),this._endStyles&&(Mt(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Ft(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Ft(this._element,this._endStyles),this._endStyles=null),Mt(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function Ze(t){let e=null;const n=Object.keys(t);for(let r=0;rthis._handleCallback(t)}apply(){!function(t,e){const n=sn(t,"").trim();n.length&&(function(t,e){let n=0;for(let r=0;r=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),nn(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=sn(t,"").split(","),r=en(n,e);r>=0&&(n.splice(r,1),rn(t,"",n.join(",")))}(this._element,this._name))}}function Ye(t,e,n){rn(t,"PlayState",n,tn(t,e))}function tn(t,e){const n=sn(t,"");return n.indexOf(",")>0?en(n.split(","),e):en([n],e)}function en(t,e){for(let n=0;n=0)return n;return-1}function nn(t,e,n){n?t.removeEventListener("animationend",e):t.addEventListener("animationend",e)}function rn(t,e,n,r){const s="animation"+e;if(null!=r){const e=t.style[s];if(e.length){const t=e.split(",");t[r]=n,n=t.join(",")}}t.style[s]=n}function sn(t,e){return t.style["animation"+e]}class on{constructor(t,e,n,r,s,i,o,a){this.element=t,this.keyframes=e,this.animationName=n,this._duration=r,this._delay=s,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=i||"linear",this.totalTime=r+s,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Je(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:Zt(this.element,n))})}this.currentSnapshot=t}}class an extends lt{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=kt(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class ln{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return Et(t)}matchesElement(t,e){return Ot(t,e)}containsElement(t,e){return xt(t,e)}query(t,e,n){return Tt(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){n=n.map(t=>kt(t));let r=`@keyframes ${e} {\n`,s="";n.forEach(t=>{s=" ";const e=parseFloat(t.offset);r+=`${s}${100*e}% {\n`,s+=" ",Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(r+=`${s}animation-timing-function: ${n};\n`));default:return void(r+=`${s}${e}: ${n};\n`)}}),r+=s+"}\n"}),r+="}\n";const i=document.createElement("style");return i.textContent=r,i}animate(t,e,n,r,s,i=[],o){o&&this._notifyFaultyScrubber();const a=i.filter(t=>t instanceof on),l={};Wt(n,r)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const c=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=Kt(t,e,l));if(0==n)return new an(t,c);const u="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(h);const d=Ke(t,e),f=new on(t,e,u,n,r,s,c,d);return f.onDestroy(()=>{var t;(t=h).parentNode.removeChild(t)}),f}_notifyFaultyScrubber(){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)}}class cn{constructor(t,e,n,r){this.element=t,this.keyframes=e,this.options=n,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=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:Zt(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class un{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(hn().toString()),this._cssKeyframesDriver=new ln}validateStyleProperty(t){return Et(t)}matchesElement(t,e){return Ot(t,e)}containsElement(t,e){return xt(t,e)}query(t,e,n){return Tt(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,r,s,i=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,r,s,i);const a={duration:n,delay:r,fill:0==r?"both":"forwards"};s&&(a.easing=s);const l={},c=i.filter(t=>t instanceof cn);Wt(n,r)&&c.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const u=Ke(t,e=Kt(t,e=e.map(t=>Nt(t,!1)),l));return new cn(t,e,a,u)}}function hn(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}let dn=(()=>{class t extends st{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:r.P.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?it(t):t;return gn(this._renderer,null,e,"register",[n]),new fn(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.E),r.Qb(u.c))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();class fn extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new pn(this._id,t,e||{},this._renderer)}}class pn{constructor(t,e,n,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return gn(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(t){this._command("setPosition",t)}getPosition(){return 0}}function gn(t,e,n,r,s){return t.setProperty(e,`@@${n}:${r}`,s)}let mn=(()=>{class t{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new yn("",n,this.engine),this._rendererCache.set(n,t)),t}const r=e.id,s=e.id+"-"+this._currentId;this._currentId++,this.engine.register(s,t);const i=e=>{Array.isArray(e)?e.forEach(i):this.engine.registerTrigger(r,s,t,e.name,e)};return e.data.animation.forEach(i),new bn(this,s,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&te(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.E),r.Qb(We),r.Qb(r.z))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();class yn{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n,r=!0){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,r){this.delegate.setAttribute(t,e,n,r)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,r){this.delegate.setStyle(t,e,n,r)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){"@"==e.charAt(0)&&"@.disabled"==e?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class bn extends yn{constructor(t,e,n,r){super(e,n,r),this.factory=t,this.namespaceId=e}setProperty(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)}listen(t,e,n){if("@"==e.charAt(0)){const r=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let s=e.substr(1),i="";return"@"!=s.charAt(0)&&([s,i]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(s)),this.engine.listen(this.namespaceId,r,s,i,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}let _n=(()=>{class t extends We{constructor(t,e,n){super(t.body,e,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(u.c),r.Qb(jt),r.Qb(_e))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const vn=[{provide:jt,useFactory:function(){return"function"==typeof hn()?new un:new ln}},{provide:new r.q("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:st,useClass:dn},{provide:_e,useFactory:function(){return new ve}},{provide:We,useClass:_n},{provide:r.E,useFactory:function(t,e,n){return new mn(t,e,n)},deps:[$,We,r.z]}];let wn=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:vn,imports:[rt]}),t})();var Cn=n("RKnZ"),Sn=n("KZX/");let En=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},imports:[[u.b,Sn.a,c.b,Cn.a,s.d]]}),t})();var On=n("tk/3");let xn=(()=>{class t{}return t.\u0275mod=r.Fb({type:t,bootstrap:[i]}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[l.a,{provide:u.h,useClass:u.d}],imports:[[rt,wn,u.b,T,Sn.a,On.c,En]]}),t})();Object(r.R)(),et().bootstrapModule(xn).catch(t=>console.error(t))},zn8P:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"},zx2A:function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return a}),n.d(e,"c",function(){return l});var r=n("7o/Q"),s=n("HDdC"),i=n("SeVD");class o extends r.a{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class a extends r.a{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function l(t,e){if(!e.closed)return t instanceof s.a?t.subscribe(e):Object(i.a)(t)(e)}}},[[0,0]]]); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/main-es2015.82494a37001f1781a756.js b/classifai-core/src/main/resources/webroot/main-es2015.82494a37001f1781a756.js new file mode 100644 index 000000000..12743dc7c --- /dev/null +++ b/classifai-core/src/main/resources/webroot/main-es2015.82494a37001f1781a756.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{0:function(t,e,n){t.exports=n("zUnb")},"0EUg":function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("bHdf");function s(){return Object(r.a)(1)}},"14na":function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("2Vo4"),s=n("fXoL");let i=(()=>{class t{constructor(){this.imgLabellingModeSubject=new r.a(null),this.imgLabelMode$=this.imgLabellingModeSubject.asObservable(),this.setState=t=>{this.imgLabellingModeSubject.next(t||null)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},"1F7/":function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("fXoL");let s=(()=>{class t{constructor(){this.modals=[],this.add=t=>{this.modals.push(t)},this.remove=t=>{this.modals=this.modals.filter(({id:e})=>e!==t)},this.open=t=>{const e=this.modals.find(({id:e})=>e===t);null==e||e.open()},this.close=t=>{const e=this.modals.find(({id:e})=>e===t);null==e||e.close()}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},"2QA8":function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())()},"2Vo4":function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("XNiG"),s=n("9ppp");class i extends r.a{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new s.a;return this._value}next(t){super.next(this._value=t)}}},"2fFW":function(t,e,n){"use strict";n.d(e,"a",function(){return s});let r=!1;const s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else r&&console.log("RxJS: Back to a better error behavior. Thank you. <3");r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},"3N8a":function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("quSY");class s extends r.a{constructor(t,e){super()}schedule(t,e=0){return this}}class i extends s{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n=!1,r=void 0;try{this.work(t)}catch(s){n=!0,r=!!s&&s||new Error(s)}if(n)return this.unsubscribe(),r}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}},"3Pt+":function(t,e,n){"use strict";n.d(e,"a",function(){return f}),n.d(e,"b",function(){return It}),n.d(e,"c",function(){return jt}),n.d(e,"d",function(){return kt}),n.d(e,"e",function(){return Dt}),n.d(e,"f",function(){return N}),n.d(e,"g",function(){return L}),n.d(e,"h",function(){return wt}),n.d(e,"i",function(){return Et}),n.d(e,"j",function(){return W}),n.d(e,"k",function(){return Rt}),n.d(e,"l",function(){return _}),n.d(e,"m",function(){return X}),n.d(e,"n",function(){return Ot});var r=n("fXoL"),s=n("ofXK"),i=n("cp0P"),o=n("Cfvw"),a=n("lJxs");const l=new r.q("NgValueAccessor"),c={provide:l,useExisting:Object(r.S)(()=>u),multi:!0};let u=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l))},t.\u0275dir=r.Cb({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&r.Tb("change",function(t){return e.onChange(t.target.checked)})("blur",function(){return e.onTouched()})},features:[r.wb([c])]}),t})();const h={provide:l,useExisting:Object(r.S)(()=>f),multi:!0},d=new r.q("CompositionEventMode");let f=(()=>{class t{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=Object(s.s)()?Object(s.s)().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l),r.Hb(d,8))},t.\u0275dir=r.Cb({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&r.Tb("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:[r.wb([h])]}),t})();function p(t){return null==t||0===t.length}function g(t){return null!=t&&"number"==typeof t.length}const m=new r.q("NgValidators"),y=new r.q("NgAsyncValidators"),b=/^(?=.{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])?)*$/;class _{static min(t){return e=>{if(p(e.value)||p(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n{if(p(e.value)||p(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}static required(t){return p(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return p(t.value)||b.test(t.value)?null:{email:!0}}static minLength(t){return e=>p(e.value)||!g(e.value)?null:e.value.lengthg(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}static pattern(t){if(!t)return _.nullValidator;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),t=>{if(p(t.value))return null;const r=t.value;return e.test(r)?null:{pattern:{requiredPattern:n,actualValue:r}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(v);return 0==e.length?null:function(t){return C(S(t,e))}}static composeAsync(t){if(!t)return null;const e=t.filter(v);return 0==e.length?null:function(t){const n=S(t,e).map(w);return Object(i.a)(n).pipe(Object(a.a)(C))}}}function v(t){return null!=t}function w(t){const e=Object(r.pb)(t)?Object(o.a)(t):t;return Object(r.ob)(e),e}function C(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function S(t,e){return e.map(e=>e(t))}function E(t){return t.map(t=>function(t){return!t.validate}(t)?t:e=>t.validate(e))}function O(t){return null!=t?_.compose(E(t)):null}function x(t){return null!=t?_.composeAsync(E(t)):null}function T(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function k(t){return t._rawValidators}function A(t){return t._rawAsyncValidators}let j=(()=>{class t{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=O(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=x(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Cb({type:t}),t})(),P=(()=>{class t extends j{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return I(e||t)},t.\u0275dir=r.Cb({type:t,features:[r.ub]}),t})();const I=r.Ob(P);class D extends j{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class R{constructor(t){this._cd=t}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}let N=(()=>{class t extends R{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(D,2))},t.\u0275dir=r.Cb({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&r.zb("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:[r.ub]}),t})(),L=(()=>{class t extends R{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(P,2))},t.\u0275dir=r.Cb({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&r.zb("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:[r.ub]}),t})();const V={provide:l,useExisting:Object(r.S)(()=>M),multi:!0};let M=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l))},t.\u0275dir=r.Cb({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&r.Tb("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[r.wb([V])]}),t})();const F={provide:l,useExisting:Object(r.S)(()=>U),multi:!0};let H=(()=>{class t{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),U=(()=>{class t{constructor(t,e,n,r){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=r,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(D),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l),r.Hb(H),r.Hb(r.r))},t.\u0275dir=r.Cb({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&r.Tb("change",function(){return e.onChange()})("blur",function(){return e.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[r.wb([F])]}),t})();const q={provide:l,useExisting:Object(r.S)(()=>z),multi:!0};let z=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l))},t.\u0275dir=r.Cb({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&r.Tb("change",function(t){return e.onChange(t.target.value)})("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[r.wb([q])]}),t})();const $={provide:l,useExisting:Object(r.S)(()=>Q),multi:!0};function B(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let Q=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=B(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(t){this.onChange=e=>{this.value=this._getOptionValue(e),t(this.value)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.D),r.Hb(r.l))},t.\u0275dir=r.Cb({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&r.Tb("change",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},inputs:{compareWith:"compareWith"},features:[r.wb([$])]}),t})(),W=(()=>{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(B(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.l),r.Hb(r.D),r.Hb(Q,9))},t.\u0275dir=r.Cb({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const K={provide:l,useExisting:Object(r.S)(()=>Z),multi:!0};function G(t,e){return null==t?""+e:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let Z=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const n=t.map(t=>this._getOptionId(t));e=(t,e)=>{t._setSelected(n.indexOf(e.toString())>-1)}}else e=(t,e)=>{t._setSelected(!1)};this._optionMap.forEach(e)}registerOnChange(t){this.onChange=e=>{const n=[];if(void 0!==e.selectedOptions){const t=e.selectedOptions;for(let e=0;e{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(G(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(G(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.l),r.Hb(r.D),r.Hb(Z,9))},t.\u0275dir=r.Cb({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();function J(t,e){return[...e.path,t]}function Y(t,e){et(t,e,!0),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&rt(t,e)})}(t,e),function(t,e){const n=(t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&rt(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function(t,e){if(e.valueAccessor.setDisabledState){const n=t=>{e.valueAccessor.setDisabledState(t)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}(t,e)}function tt(t,e){t.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function et(t,e,n){const r=k(t);null!==e.validator?t.setValidators(T(r,e.validator)):"function"==typeof r&&t.setValidators([r]);const s=A(t);if(null!==e.asyncValidator?t.setAsyncValidators(T(s,e.asyncValidator)):"function"==typeof s&&t.setAsyncValidators([s]),n){const n=()=>t.updateValueAndValidity();tt(e._rawValidators,n),tt(e._rawAsyncValidators,n)}}function nt(t,e,n){if(null!==t){if(null!==e.validator){const n=k(t);Array.isArray(n)&&n.length>0&&t.setValidators(n.filter(t=>t!==e.validator))}if(null!==e.asyncValidator){const n=A(t);Array.isArray(n)&&n.length>0&&t.setAsyncValidators(n.filter(t=>t!==e.asyncValidator))}}if(n){const t=()=>{};tt(e._rawValidators,t),tt(e._rawAsyncValidators,t)}}function rt(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function st(t,e){et(t,e,!1)}function it(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}const ot=[u,z,M,Q,Z,U];function at(t,e){t._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function lt(t,e){if(!e)return null;Array.isArray(e);let n=void 0,r=void 0,s=void 0;return e.forEach(t=>{var e;t.constructor===f?n=t:(e=t,ot.some(t=>e.constructor===t)?r=t:s=t)}),s||r||n||null}function ct(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function ut(t){return(pt(t)?t.validators:t)||null}function ht(t){return Array.isArray(t)?O(t):t||null}function dt(t,e){return(pt(e)?e.asyncValidators:t)||null}function ft(t){return Array.isArray(t)?x(t):t||null}function pt(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class gt{constructor(t,e){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=ht(this._rawValidators),this._composedAsyncValidatorFn=ft(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return"VALID"===this.status}get invalid(){return"INVALID"===this.status}get pending(){return"PENDING"==this.status}get disabled(){return"DISABLED"===this.status}get enabled(){return"DISABLED"!==this.status}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._rawValidators=t,this._composedValidatorFn=ht(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=ft(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(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(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild(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(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){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)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;const e=w(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(e,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(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;let r=t;return e.forEach(t=>{r=r instanceof yt?r.controls.hasOwnProperty(t)?r.controls[t]:null:r instanceof bt&&r.at(t)||null}),r}(this,t)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new r.n,this.statusChanges=new r.n}_calculateStatus(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){pt(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class mt extends gt{constructor(t=null,e,n){super(ut(e),dt(n,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){ct(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){ct(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(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}}class yt extends gt{constructor(t,e,n){super(ut(e),dt(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e instanceof mt?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(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: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const e of Object.keys(this.controls)){const n=this.controls[e];if(this.contains(e)&&t(n))return!0}return!1}_reduceValue(){return this._reduceChildren({},(t,e,n)=>((e.enabled||this.disabled)&&(t[n]=e.value),t))}_reduceChildren(t,e){let n=t;return this._forEachChild((t,r)=>{n=e(n,t,r)}),n}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class bt extends gt{constructor(t,e,n){super(ut(e),dt(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((n,r)=>{n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof mt?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const _t={provide:P,useExisting:Object(r.S)(()=>wt)},vt=(()=>Promise.resolve(null))();let wt=(()=>{class t extends P{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new r.n,this.form=new yt({},O(t),x(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){vt.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),Y(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){vt.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),ct(this._directives,t)})}addFormGroup(t){vt.then(()=>{const e=this._findContainer(t.path),n=new yt({});st(n,t),e.registerControl(t.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){vt.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){vt.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,at(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(m,10),r.Hb(y,10))},t.\u0275dir=r.Cb({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&r.Tb("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.wb([_t]),r.ub]}),t})();const Ct={provide:D,useExisting:Object(r.S)(()=>Et)},St=(()=>Promise.resolve(null))();let Et=(()=>{class t extends D{constructor(t,e,n,s){super(),this.control=new mt,this._registered=!1,this.update=new r.n,this._parent=t,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=lt(0,s)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),it(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?J(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Y(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(t){St.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,n=""===e||e&&"false"!==e;St.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(P,9),r.Hb(m,10),r.Hb(y,10),r.Hb(l,10))},t.\u0275dir=r.Cb({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[r.wb([Ct]),r.ub,r.vb]}),t})(),Ot=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Cb({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const xt=new r.q("NgModelWithFormControlWarning"),Tt={provide:P,useExisting:Object(r.S)(()=>kt)};let kt=(()=>{class t extends P{constructor(t,e){super(),this.validators=t,this.asyncValidators=e,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new r.n,this._setValidators(t),this._setAsyncValidators(e)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return Y(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){ct(this.directives,t)}addFormGroup(t){const e=this.form.get(t.path);st(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormGroup(t){}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){const e=this.form.get(t.path);st(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormArray(t){}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,at(this.form,this.directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=this.form.get(t.path);t.control!==e&&(function(t,e){const n=()=>{};e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n),nt(t,e,!0),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}(t.control||null,t),e&&Y(e,t),t.control=e)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){et(this.form,this,!1),this._oldForm&&nt(this._oldForm,this,!1)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(m,10),r.Hb(y,10))},t.\u0275dir=r.Cb({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&r.Tb("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.wb([Tt]),r.ub,r.vb]}),t})();const At={provide:D,useExisting:Object(r.S)(()=>jt)};let jt=(()=>{class t extends D{constructor(t,e,n,s,i){super(),this._ngModelWarningConfig=i,this._added=!1,this.update=new r.n,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=lt(0,s)}set isDisabled(t){}ngOnChanges(e){var n,s;this._added||this._setUpControl(),it(e,this.viewModel)&&(n=t,this,s=this._ngModelWarningConfig,Object(r.T)()&&"never"!==s&&((null!==s&&"once"!==s||n._ngModelWarningSentOnce)&&("always"!==s||this._ngModelWarningSent)||(n._ngModelWarningSentOnce=!0,this._ngModelWarningSent=!0)),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return J(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(P,13),r.Hb(m,10),r.Hb(y,10),r.Hb(l,10),r.Hb(xt,8))},t.\u0275dir=r.Cb({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[r.wb([At]),r.ub,r.vb]}),t._ngModelWarningSentOnce=!1,t})(),Pt=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)}}),t})(),It=(()=>{class t{group(t,e=null){const n=this._reduceControls(t);let r=null,s=null,i=void 0;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(r=null!=e.validators?e.validators:null,s=null!=e.asyncValidators?e.asyncValidators:null,i=null!=e.updateOn?e.updateOn:void 0):(r=null!=e.validator?e.validator:null,s=null!=e.asyncValidator?e.asyncValidator:null)),new yt(n,{asyncValidators:s,updateOn:i,validators:r})}control(t,e,n){return new mt(t,e,n)}array(t,e,n){const r=t.map(t=>this._createControl(t));return new bt(r,e,n)}_reduceControls(t){const e={};return Object.keys(t).forEach(n=>{e[n]=this._createControl(t[n])}),e}_createControl(t){return t instanceof mt||t instanceof yt||t instanceof bt?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),Dt=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[H],imports:[Pt]}),t})(),Rt=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:xt,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[It,H],imports:[Pt]}),t})()},"44N4":function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("fXoL"),s=n("1F7/"),i=n("ofXK");const o=function(t){return{"font-size":t}};function a(t,e){if(1&t){const t=r.Nb();r.Mb(0,"div",4),r.Mb(1,"label",5),r.oc(2),r.Lb(),r.Mb(3,"button",6),r.Tb("click",function(){return r.hc(t),r.Vb().close()}),r.oc(4,"\u2716"),r.Lb(),r.Lb()}if(2&t){const t=r.Vb();r.xb(1),r.ac("ngStyle",r.dc(2,o,t.modalTitle.length>20?"2.2vh":"3vh")),r.xb(1),r.pc(t.modalTitle)}}const l=function(t){return{"z-index":t}},c=["*"];let u=(()=>{class t{constructor(t,e){this._modalService=t,this._el=e,this.id="",this.modalTitle="",this.showHeader=!0,this.scrollable=!0,this.zIndex=1,this.applyStyling=()=>`${!this.modalBodyStyle&&"modal-body-height modal-body-width modal-body-margin"} ${this.scrollable&&"scroll"}`,this.keyDownEvent=({key:t})=>{"modal-create-project"!==this.id&&"modal-import-project"!==this.id&&"Escape"===t&&this.close()},this.element=this._el.nativeElement}ngOnInit(){1!==this.zIndex&&(this.modalBodyStyle.zIndex=(2e3*this.zIndex).toString()),this.id?(this._modalService.add(this),this.close()):console.error("modal must have an id")}ngOnDestroy(){this._modalService.remove(this.id),this.element.remove()}open(){this.element.style.display="block",document.body.classList.add("modal-open")}close(){this.element.style.display="none",document.body.classList.remove("modal-open")}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(s.a),r.Hb(r.l))},t.\u0275cmp=r.Bb({type:t,selectors:[["modal"]],hostBindings:function(t,e){1&t&&r.Tb("keydown",function(t){return e.keyDownEvent(t)},!1,r.gc)},inputs:{id:"id",modalBodyStyle:"modalBodyStyle",modalTitle:"modalTitle",showHeader:"showHeader",scrollable:"scrollable",zIndex:"zIndex"},ngContentSelectors:c,decls:5,vars:6,consts:[[1,"modal"],[1,"modal-body",3,"ngStyle","ngClass"],["class","modal-header-container",4,"ngIf"],[1,"modal-background",3,"ngStyle","click"],[1,"modal-header-container"],[2,"text-indent","0.5vw","padding-left","0.2vw",3,"ngStyle"],[1,"modal-button","close-button","float-right",3,"click"]],template:function(t,e){1&t&&(r.Zb(),r.Mb(0,"div",0),r.Mb(1,"div",1),r.mc(2,a,5,4,"div",2),r.Yb(3),r.Lb(),r.Lb(),r.Mb(4,"div",3),r.Tb("click",function(){return e.close()}),r.Lb()),2&t&&(r.xb(1),r.ac("ngStyle",e.modalBodyStyle)("ngClass",e.applyStyling()),r.xb(1),r.ac("ngIf",e.showHeader),r.xb(2),r.ac("ngStyle",r.dc(4,l,1e3*e.zIndex)))},directives:[i.l,i.i,i.k],styles:[".modal{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;display:flex;justify-content:center}.modal-body{border-radius:1vw;padding:1.5vw;background:#262a2e;color:#fff;position:absolute;z-index:2000}.modal-body-height{min-height:75%;max-height:80%}.modal-body-width{min-width:50%;max-width:50%}.modal-header-container{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.modal-button,.modal-header-container{font-size:1vw;padding:.5vw;background:#262a2e;color:azure}.modal-button{line-height:1vh}.close-button{border:none;cursor:pointer}.float-right{float:right}.modal-body-margin{left:25%;top:10%}.scroll{overflow-y:auto}.scroll::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px}.scroll::-webkit-scrollbar{width:.5vw}.scroll::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.modal-background{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.75}body.modal-open{overflow:hidden}"],encapsulation:2}),t})()},"4I5i":function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})()},"5+tZ":function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("lJxs"),s=n("Cfvw"),i=n("zx2A");function o(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(o((n,i)=>Object(s.a)(t(n,i)).pipe(Object(r.a)((t,r)=>e(n,t,i,r))),n)):("number"==typeof e&&(n=e),e=>e.lift(new a(t,n)))}class a{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new l(t,this.project,this.concurrent))}}class l extends i.b{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}},"7o/Q":function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("n6bG"),s=n("gRHU"),i=n("quSY"),o=n("2QA8"),a=n("2fFW"),l=n("NJ4a");class c extends i.a{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.a;break;case 1:if(!t){this.destination=s.a;break}if("object"==typeof t){t instanceof c?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new u(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new u(this,t,e,n)}}[o.a](){return this}static create(t,e,n){const r=new c(t,e,n);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class u extends c{constructor(t,e,n,i){let o;super(),this._parentSubscriber=t;let a=this;Object(r.a)(e)?o=e:e&&(o=e.next,n=e.error,i=e.complete,e!==s.a&&(a=Object.create(e),Object(r.a)(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=o,this._error=n,this._complete=i}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;a.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=a.a;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(l.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(l.a)(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);a.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),a.a.useDeprecatedSynchronousErrorHandling)throw n;Object(l.a)(n)}}__tryOrSetError(t,e,n){if(!a.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return a.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(Object(l.a)(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}},"9ppp":function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})()},Cfvw:function(t,e,n){"use strict";n.d(e,"a",function(){return h});var r=n("HDdC"),s=n("SeVD"),i=n("quSY"),o=n("kJWO"),a=n("jZKg"),l=n("Lhse"),c=n("c2HN"),u=n("I55L");function h(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.a]}(t))return function(t,e){return new r.a(n=>{const r=new i.a;return r.add(e.schedule(()=>{const s=t[o.a]();r.add(s.subscribe({next(t){r.add(e.schedule(()=>n.next(t)))},error(t){r.add(e.schedule(()=>n.error(t)))},complete(){r.add(e.schedule(()=>n.complete()))}}))})),r})}(t,e);if(Object(c.a)(t))return function(t,e){return new r.a(n=>{const r=new i.a;return r.add(e.schedule(()=>t.then(t=>{r.add(e.schedule(()=>{n.next(t),r.add(e.schedule(()=>n.complete()))}))},t=>{r.add(e.schedule(()=>n.error(t)))}))),r})}(t,e);if(Object(u.a)(t))return Object(a.a)(t,e);if(function(t){return t&&"function"==typeof t[l.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.a(n=>{const r=new i.a;let s;return r.add(()=>{s&&"function"==typeof s.return&&s.return()}),r.add(e.schedule(()=>{s=t[l.a](),r.add(e.schedule(function(){if(n.closed)return;let t,e;try{const n=s.next();t=n.value,e=n.done}catch(r){return void n.error(r)}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 r.a?t:new r.a(Object(s.a)(t))}},DH7j:function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))()},EY2u:function(t,e,n){"use strict";n.d(e,"a",function(){return s}),n.d(e,"b",function(){return i});var r=n("HDdC");const s=new r.a(t=>t.complete());function i(t){return t?function(t){return new r.a(e=>t.schedule(()=>e.complete()))}(t):s}},F7l1:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("2Vo4"),s=n("fXoL");let i=(()=>{class t{constructor(){this.toggleSpinnerSubject=new r.a(!1)}returnAsObservable(){return this.toggleSpinnerSubject.asObservable()}showSpinner(){this.toggleSpinnerSubject.next(!0)}hideSpinner(){this.toggleSpinnerSubject.next(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},GyhO:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("LRne"),s=n("0EUg");function i(...t){return Object(s.a)()(Object(r.a)(...t))}},HDdC:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("7o/Q"),s=n("2QA8"),i=n("gRHU"),o=n("kJWO"),a=n("SpAZ"),l=n("2fFW");let c=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:o}=this,a=function(t,e,n){if(t){if(t instanceof r.a)return t;if(t[s.a])return t[s.a]()}return t||e||n?new r.a(t,e,n):new r.a(i.a)}(t,e,n);if(a.add(o?o.call(a,this.source):this.source||l.a.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),l.a.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a}_trySubscribe(t){try{return this._subscribe(t)}catch(e){l.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:s}=t;if(e||s)return!1;t=n&&n instanceof r.a?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=u(e))((e,n)=>{let r;r=this.subscribe(e=>{try{t(e)}catch(s){n(s),r&&r.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[o.a](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?a.a:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=u(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function u(t){if(t||(t=l.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},I55L:function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=t=>t&&"number"==typeof t.length&&"function"!=typeof t},I7yr:function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n("2Vo4"),s=n("SxV6"),i=n("fXoL"),o=n("sYmb");let a=(()=>{class t{constructor(t){this._translate=t,this.languageSubject=new r.a(""),this.language$=this.languageSubject.asObservable(),this.filterLanguageList=(t,e)=>t.map(t=>t.startsWith(e)?t:null).filter(t=>null!==t),this.initializeLanguage=(t,e)=>{const n=e.map((t,n)=>e.length===n+1?t+"/":`/${t}|`).join(" ").replace(/ /g,"");this._translate.addLangs(e),this.language$.pipe(Object(s.a)()).subscribe(e=>{const r=e||localStorage.getItem("language")||"en";this.setTranslation(t,r,n)})},this.setTranslation=(t,e,n)=>{const r=this._translate.getBrowserLang();this._translate.use(r.match(n)?r:`${t}-${e}`)}}setLanguageState(t){const e=t.length>2?t.slice(-2):t;this.languageSubject.next(e),localStorage.setItem("language",e)}}return t.\u0275fac=function(e){return new(e||t)(i.Qb(o.d))},t.\u0275prov=i.Db({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},IjjT:function(t,e,n){"use strict";n.d(e,"a",function(){return s});let r=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class s extends r{constructor(t,e=r.now){super(t,()=>s.delegate&&s.delegate!==this?s.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return s.delegate&&s.delegate!==this?s.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let 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}}}},IzEk:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("7o/Q"),s=n("4I5i"),i=n("EY2u");function o(t){return e=>0===t?Object(i.b)():e.lift(new a(t))}class a{constructor(t){if(this.total=t,this.total<0)throw new s.a}call(t,e){return e.subscribe(new l(t,this.total))}}class l extends r.a{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}},"KZX/":function(t,e,n){"use strict";n.d(e,"a",function(){return v});var r=n("ofXK"),s=n("sYmb"),i=n("RKnZ"),o=n("fXoL");let a=(()=>{class t{}return t.\u0275mod=o.Fb({type:t}),t.\u0275inj=o.Eb({factory:function(e){return new(e||t)},imports:[[r.b,s.b,i.a]]}),t})(),l=(()=>{class t{}return t.\u0275mod=o.Fb({type:t}),t.\u0275inj=o.Eb({factory:function(e){return new(e||t)},imports:[[r.b]]}),t})(),c=(()=>{class t{intercept(t,e){const n=t.clone({setHeaders:{"Cache-Control":"no-cache",Pragma:"no-cache"}});return e.handle(n)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Db({token:t,factory:t.\u0275fac}),t})();var u=n("3Pt+"),h=n("tk/3"),d=n("I7yr"),f=n("vkgz"),p=n("F7l1");let g=(()=>{class t{constructor(t){this._spinner=t,this.pendingRequestsCount=0}intercept(t,e){return this.pendingRequestsCount++,this._spinner.showSpinner(),e.handle(t).pipe(Object(f.a)(t=>{if(t instanceof h.e){this.pendingRequestsCount--;const e=t.url?t.url.toString().split("/"):"";0===this.pendingRequestsCount&&"importstatus"!==e[e.length-1]&&"folders"!==e[e.length-1]&&"labelfiles"!==e[e.length-1]&&this._spinner.hideSpinner()}},t=>{t instanceof h.d&&(this.pendingRequestsCount--,this._spinner.hideSpinner())}))}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(p.a))},t.\u0275prov=o.Db({token:t,factory:t.\u0275fac}),t})();var m=n("O+1G");let y=(()=>{class t{}return t.\u0275mod=o.Fb({type:t}),t.\u0275inj=o.Eb({factory:function(e){return new(e||t)},imports:[[r.b]]}),t})();class b{constructor(t,e="/assets/i18n/",n=".json"){this.http=t,this.prefix=e,this.suffix=n}getTranslation(t){return this.http.get(`${this.prefix}${t}${this.suffix}`)}}const _=t=>new b(t,"../assets/i18n/",".json");let v=(()=>{class t{}return t.\u0275mod=o.Fb({type:t}),t.\u0275inj=o.Eb({factory:function(e){return new(e||t)},providers:[d.a,{provide:h.a,useClass:c,multi:!0},{provide:h.a,useClass:g,multi:!0}],imports:[[r.b,u.e,u.k,i.a,a,y,l,m.a,s.b.forRoot({loader:{provide:s.a,useFactory:_,deps:[h.b]}})],i.a,a,y,l,m.a,u.e,u.k,s.b]}),t})()},LRne:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("z+Ro"),s=n("yCtX"),i=n("jZKg");function o(...t){let e=t[t.length-1];return Object(r.a)(e)?(t.pop(),Object(i.a)(t,e)):Object(s.a)(t)}},Lhse:function(t,e,n){"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",function(){return s});const s=r()},NJ4a:function(t,e,n){"use strict";function r(t){setTimeout(()=>{throw t},0)}n.d(e,"a",function(){return r})},NXyV:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("HDdC"),s=n("Cfvw"),i=n("EY2u");function o(t){return new r.a(e=>{let n;try{n=t()}catch(r){return void e.error(r)}return(n?Object(s.a)(n):Object(i.b)()).subscribe(e)})}},"O+1G":function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n("ofXK"),s=n("tyNb"),i=n("sYmb"),o=n("fXoL");let a=(()=>{class t{}return t.\u0275mod=o.Fb({type:t}),t.\u0275inj=o.Eb({factory:function(e){return new(e||t)},imports:[[r.b,s.d,i.b]]}),t})()},RKnZ:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("ofXK"),s=n("fXoL");let i=(()=>{class t{}return t.\u0275mod=s.Fb({type:t}),t.\u0275inj=s.Eb({factory:function(e){return new(e||t)},imports:[[r.b]]}),t})()},SeVD:function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("ngJS"),s=n("NJ4a"),i=n("Lhse"),o=n("kJWO"),a=n("I55L"),l=n("c2HN"),c=n("XoHu");const u=t=>{if(t&&"function"==typeof t[o.a])return u=t,t=>{const e=u[o.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(a.a)(t))return Object(r.a)(t);if(Object(l.a)(t))return n=t,t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,s.a),t);if(t&&"function"==typeof t[i.a])return e=t,t=>{const n=e[i.a]();for(;;){let e;try{e=n.next()}catch(r){return t.error(r),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=Object(c.a)(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n,u}},SpAZ:function(t,e,n){"use strict";function r(t){return t}n.d(e,"a",function(){return r})},SxV6:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("sVev"),s=n("pLZG"),i=n("IzEk"),o=n("xbPD"),a=n("XDbj"),l=n("SpAZ");function c(t,e){const n=arguments.length>=2;return c=>c.pipe(t?Object(s.a)((e,n)=>t(e,n,c)):l.a,Object(i.a)(1),n?Object(o.a)(e):Object(a.a)(()=>new r.a))}},XDbj:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("sVev"),s=n("7o/Q");function i(t=l){return e=>e.lift(new o(t))}class o{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new a(t,this.errorFactory))}}class a extends s.a{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function l(){return new r.a}},XNiG:function(t,e,n){"use strict";n.d(e,"b",function(){return c}),n.d(e,"a",function(){return u});var r=n("HDdC"),s=n("7o/Q"),i=n("quSY"),o=n("9ppp"),a=n("Ylt2"),l=n("2QA8");class c extends s.a{constructor(t){super(t),this.destination=t}}let u=(()=>{class t extends r.a{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[l.a](){return new c(this)}lift(t){const e=new h(this,this);return e.operator=t,e}next(t){if(this.closed)throw new o.a;if(!this.isStopped){const{observers:e}=this,n=e.length,r=e.slice();for(let s=0;snew h(t,e),t})();class h extends u{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):i.a.EMPTY}}},XoHu:function(t,e,n){"use strict";function r(t){return null!==t&&"object"==typeof t}n.d(e,"a",function(){return r})},Ylt2:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("quSY");class s extends r.a{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},bHdf:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("5+tZ"),s=n("SpAZ");function i(t=Number.POSITIVE_INFINITY){return Object(r.a)(s.a,t)}},bOdf:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("5+tZ");function s(t,e){return Object(r.a)(t,e,1)}},c2HN:function(t,e,n){"use strict";function r(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",function(){return r})},cp0P:function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n("HDdC"),s=n("DH7j"),i=n("lJxs"),o=n("XoHu"),a=n("Cfvw");function l(...t){if(1===t.length){const e=t[0];if(Object(s.a)(e))return c(e,null);if(Object(o.a)(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return c(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return c(t=1===t.length&&Object(s.a)(t[0])?t[0]:t,null).pipe(Object(i.a)(t=>e(...t)))}return c(t,null)}function c(t,e){return new r.a(n=>{const r=t.length;if(0===r)return void n.complete();const s=new Array(r);let i=0,o=0;for(let l=0;l{u||(u=!0,o++),s[l]=t},error:t=>n.error(t),complete:()=>{i++,i!==r&&u||(o===r&&n.next(e?e.reduce((t,e,n)=>(t[e]=s[n],t),{}):s),n.complete())}}))}})}},eIep:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("lJxs"),s=n("Cfvw"),i=n("zx2A");function o(t,e){return"function"==typeof e?n=>n.pipe(o((n,i)=>Object(s.a)(t(n,i)).pipe(Object(r.a)((t,r)=>e(n,t,i,r))))):e=>e.lift(new a(t))}class a{constructor(t){this.project=t}call(t,e){return e.subscribe(new l(t,this.project))}}class l extends i.b{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const n=new i.a(this),r=this.destination;r.add(n),this.innerSubscription=Object(i.c)(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}},fXoL:function(t,e,n){"use strict";n.d(e,"a",function(){return V}),n.d(e,"b",function(){return $l}),n.d(e,"c",function(){return Fl}),n.d(e,"d",function(){return Vl}),n.d(e,"e",function(){return Ml}),n.d(e,"f",function(){return Rc}),n.d(e,"g",function(){return Ec}),n.d(e,"h",function(){return Va}),n.d(e,"i",function(){return ec}),n.d(e,"j",function(){return ua}),n.d(e,"k",function(){return Wl}),n.d(e,"l",function(){return pa}),n.d(e,"m",function(){return Tr}),n.d(e,"n",function(){return ml}),n.d(e,"o",function(){return di}),n.d(e,"p",function(){return _}),n.d(e,"q",function(){return L}),n.d(e,"r",function(){return ki}),n.d(e,"s",function(){return Pa}),n.d(e,"t",function(){return Ia}),n.d(e,"u",function(){return Ql}),n.d(e,"v",function(){return Ka}),n.d(e,"w",function(){return xc}),n.d(e,"x",function(){return Wa}),n.d(e,"y",function(){return _c}),n.d(e,"z",function(){return sc}),n.d(e,"A",function(){return v}),n.d(e,"B",function(){return zl}),n.d(e,"C",function(){return ql}),n.d(e,"D",function(){return ma}),n.d(e,"E",function(){return ga}),n.d(e,"F",function(){return Ir}),n.d(e,"G",function(){return ba}),n.d(e,"H",function(){return An}),n.d(e,"I",function(){return C}),n.d(e,"J",function(){return Ac}),n.d(e,"K",function(){return za}),n.d(e,"L",function(){return dc}),n.d(e,"M",function(){return K}),n.d(e,"N",function(){return _a}),n.d(e,"O",function(){return Za}),n.d(e,"P",function(){return rt}),n.d(e,"Q",function(){return vc}),n.d(e,"R",function(){return sn}),n.d(e,"S",function(){return B}),n.d(e,"T",function(){return rn}),n.d(e,"U",function(){return Ic}),n.d(e,"V",function(){return gc}),n.d(e,"W",function(){return Bl}),n.d(e,"X",function(){return pi}),n.d(e,"Y",function(){return Xo}),n.d(e,"Z",function(){return Tn}),n.d(e,"ab",function(){return un}),n.d(e,"bb",function(){return Ke}),n.d(e,"cb",function(){return Ze}),n.d(e,"db",function(){return tn}),n.d(e,"eb",function(){return Je}),n.d(e,"fb",function(){return Xe}),n.d(e,"gb",function(){return Ye}),n.d(e,"hb",function(){return Wo}),n.d(e,"ib",function(){return Pc}),n.d(e,"jb",function(){return Ko}),n.d(e,"kb",function(){return Go}),n.d(e,"lb",function(){return Ge}),n.d(e,"mb",function(){return z}),n.d(e,"nb",function(){return Mi}),n.d(e,"ob",function(){return so}),n.d(e,"pb",function(){return ro}),n.d(e,"qb",function(){return Qo}),n.d(e,"rb",function(){return Ht}),n.d(e,"sb",function(){return S}),n.d(e,"tb",function(){return We}),n.d(e,"ub",function(){return ji}),n.d(e,"vb",function(){return Vn}),n.d(e,"wb",function(){return aa}),n.d(e,"xb",function(){return ys}),n.d(e,"yb",function(){return zi}),n.d(e,"zb",function(){return Oo}),n.d(e,"Ab",function(){return jl}),n.d(e,"Bb",function(){return pt}),n.d(e,"Cb",function(){return wt}),n.d(e,"Db",function(){return T}),n.d(e,"Eb",function(){return k}),n.d(e,"Fb",function(){return bt}),n.d(e,"Gb",function(){return Ct}),n.d(e,"Hb",function(){return Wi}),n.d(e,"Ib",function(){return Yi}),n.d(e,"Jb",function(){return eo}),n.d(e,"Kb",function(){return to}),n.d(e,"Lb",function(){return Ji}),n.d(e,"Mb",function(){return Xi}),n.d(e,"Nb",function(){return no}),n.d(e,"Ob",function(){return Sr}),n.d(e,"Pb",function(){return qo}),n.d(e,"Qb",function(){return Vt}),n.d(e,"Rb",function(){return Ki}),n.d(e,"Sb",function(){return Ll}),n.d(e,"Tb",function(){return io}),n.d(e,"Ub",function(){return Pl}),n.d(e,"Vb",function(){return lo}),n.d(e,"Wb",function(){return pl}),n.d(e,"Xb",function(){return gl}),n.d(e,"Yb",function(){return ho}),n.d(e,"Zb",function(){return uo}),n.d(e,"ac",function(){return Gi}),n.d(e,"bc",function(){return fo}),n.d(e,"cc",function(){return hl}),n.d(e,"dc",function(){return dl}),n.d(e,"ec",function(){return kl}),n.d(e,"fc",function(){return Qi}),n.d(e,"gc",function(){return jr}),n.d(e,"hc",function(){return de}),n.d(e,"ic",function(){return jn}),n.d(e,"jc",function(){return Pn}),n.d(e,"kc",function(){return _t}),n.d(e,"lc",function(){return xo}),n.d(e,"mc",function(){return Bi}),n.d(e,"nc",function(){return Nl}),n.d(e,"oc",function(){return Vo}),n.d(e,"pc",function(){return Mo}),n.d(e,"qc",function(){return Fo}),n.d(e,"rc",function(){return Ho}),n.d(e,"sc",function(){return Uo}),n.d(e,"tc",function(){return Al});var r=n("XNiG"),s=n("quSY"),i=n("HDdC"),o=n("z+Ro"),a=n("bHdf"),l=n("yCtX"),c=n("7o/Q");function u(){return function(t){return t.lift(new h(t))}}class h{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const r=new d(t,n),s=e.subscribe(r);return r.closed||(r.connection=n.connect()),s}}class d extends c.a{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}class f extends i.a{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new s.a,t.add(this.source.subscribe(new g(this.getSubject(),this))),t.closed&&(this._connection=null,t=s.a.EMPTY)),t}refCount(){return u()(this)}}const p=(()=>{const t=f.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class g extends r.b{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function m(){return new r.a}function y(t){return{toString:t}.toString()}function b(t,e,n){return y(()=>{const r=function(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}(e);function s(...t){if(this instanceof s)return r.apply(this,t),this;const e=new s(...t);return n.annotation=e,n;function n(t,n,r){const s=t.hasOwnProperty("__parameters__")?t.__parameters__:Object.defineProperty(t,"__parameters__",{value:[]}).__parameters__;for(;s.length<=r;)s.push(null);return(s[r]=s[r]||[]).push(e),t}}return n&&(s.prototype=Object.create(n.prototype)),s.prototype.ngMetadataName=t,s.annotationCls=s,s})}const _=b("Inject",t=>({token:t})),v=b("Optional"),w=b("Self"),C=b("SkipSelf");function S(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(S).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function E(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}function O(t){for(let e in t)if(t[e]===O)return e;throw Error("Could not find renamed property on target object.")}function x(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function T(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function k(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function A(t){return j(t,I)||j(t,R)}function j(t,e){return t.hasOwnProperty(e)?t[e]:null}function P(t){return t&&(t.hasOwnProperty(D)||t.hasOwnProperty(N))?t[D]:null}const I=O({\u0275prov:O}),D=O({\u0275inj:O}),R=O({ngInjectableDef:O}),N=O({ngInjectorDef:O});class L{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=T({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return"InjectionToken "+this._desc}}const V=new L("AnalyzeForEntryComponents");var M=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({});const F="undefined"!=typeof globalThis&&globalThis,H="undefined"!=typeof window&&window,U="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,q="undefined"!=typeof global&&global,z=F||q||H||U,$=O({__forward_ref__:O});function B(t){return t.__forward_ref__=B,t.toString=function(){return S(this())},t}function Q(t){return W(t)?t():t}function W(t){return"function"==typeof t&&t.hasOwnProperty($)&&t.__forward_ref__===B}const K=Function;function G(t,e){void 0===e&&(e=t);for(let n=0;nArray.isArray(t)?Z(t,e):e(t))}function X(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function J(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Y(t,e){const n=[];for(let r=0;r=0?t[1|r]=n:(r=~r,function(t,e,n,r){let s=t.length;if(s==e)t.push(n,r);else if(1===s)t.push(r,t[0]),t[0]=n;else{for(s--,t.push(t[s-1],t[s]);s>e;)t[s]=t[s-2],s--;t[e]=n,t[e+1]=r}}(t,r,e,n)),r}function et(t,e){const n=nt(t,e);if(n>=0)return t[1|n]}function nt(t,e){return function(t,e,n){let r=0,s=t.length>>1;for(;s!==r;){const n=r+(s-r>>1),i=t[n<<1];if(e===i)return n<<1;i>e?s=n:r=n+1}return~(s<<1)}(t,e)}var rt=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({});const st={},it=[],ot=O({\u0275cmp:O}),at=O({\u0275dir:O}),lt=O({\u0275pipe:O}),ct=O({\u0275mod:O}),ut=O({\u0275loc:O}),ht=O({\u0275fac:O}),dt=O({__NG_ELEMENT_ID__:O});let ft=0;function pt(t){return y(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===M.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||it,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||rt.Emulated,id:"c",styles:t.styles||it,_:null,setInput:null,schemas:t.schemas||null,tView:null},r=t.directives,s=t.features,i=t.pipes;return n.id+=ft++,n.inputs=vt(t.inputs,e),n.outputs=vt(t.outputs),s&&s.forEach(t=>t(n)),n.directiveDefs=r?()=>("function"==typeof r?r():r).map(gt):null,n.pipeDefs=i?()=>("function"==typeof i?i():i).map(mt):null,n})}function gt(t){return St(t)||function(t){return t[at]||null}(t)}function mt(t){return function(t){return t[lt]||null}(t)}const yt={};function bt(t){const e={type:t.type,bootstrap:t.bootstrap||it,declarations:t.declarations||it,imports:t.imports||it,exports:t.exports||it,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&y(()=>{yt[t.id]=t.type}),e}function _t(t,e){return y(()=>{const n=Et(t,!0);n.declarations=e.declarations||it,n.imports=e.imports||it,n.exports=e.exports||it})}function vt(t,e){if(null==t)return st;const n={};for(const r in t)if(t.hasOwnProperty(r)){let s=t[r],i=s;Array.isArray(s)&&(i=s[1],s=s[0]),n[s]=r,e&&(e[s]=i)}return n}const wt=pt;function Ct(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function St(t){return t[ot]||null}function Et(t,e){const n=t[ct]||null;if(!n&&!0===e)throw new Error(`Type ${S(t)} does not have '\u0275mod' property.`);return n}function Ot(t){return"string"==typeof t?t:null==t?"":""+t}function xt(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Ot(t)}var Tt=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}({});let kt;function At(t){const e=kt;return kt=t,e}function jt(t,e,n){const r=A(t);if(r&&"root"==r.providedIn)return void 0===r.value?r.value=r.factory():r.value;if(n&Tt.Optional)return null;if(void 0!==e)return e;throw new Error(`Injector: NOT_FOUND [${S(t)}]`)}const Pt={},It=/\n/gm,Dt=O({provide:String,useValue:O});let Rt=void 0;function Nt(t){const e=Rt;return Rt=t,e}function Lt(t,e=Tt.Default){if(void 0===Rt)throw new Error("inject() must be called from an injection context");return null===Rt?jt(t,void 0,e):Rt.get(t,e&Tt.Optional?null:void 0,e)}function Vt(t,e=Tt.Default){return(kt||Lt)(Q(t),e)}function Mt(t){const e=[];for(let n=0;nUt()};function Zt(t){for(;Array.isArray(t);)t=t[0];return t}function Xt(t,e){return Zt(e[t])}function Jt(t,e){return Zt(e[t.index])}function Yt(t,e){return t.data[e]}function te(t,e){return t[e]}function ee(t,e){const n=e[t];return qt(n)?n:n[0]}function ne(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function re(t){return 4==(4&t[2])}function se(t){return 128==(128&t[2])}function ie(t,e){return null==e?null:t[e]}function oe(t){t[18]=0}function ae(t,e){t[5]+=e;let n=t,r=t[3];for(;null!==r&&(1===e&&1===n[5]||-1===e&&0===n[5]);)r[5]+=e,n=r,r=r[3]}const le={lFrame:Ie(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function ce(){return le.bindingsEnabled}function ue(){return le.lFrame.lView}function he(){return le.lFrame.tView}function de(t){le.lFrame.contextLView=t}function fe(){let t=pe();for(;null!==t&&64===t.type;)t=t.parent;return t}function pe(){return le.lFrame.currentTNode}function ge(t,e){const n=le.lFrame;n.currentTNode=t,n.isParent=e}function me(){return le.lFrame.isParent}function ye(){le.lFrame.isParent=!1}function be(){return le.isInCheckNoChangesMode}function _e(t){le.isInCheckNoChangesMode=t}function ve(){const t=le.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function we(){return le.lFrame.bindingIndex}function Ce(){return le.lFrame.bindingIndex++}function Se(t){const e=le.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function Ee(t,e){const n=le.lFrame;n.bindingIndex=n.bindingRootIndex=t,Oe(e)}function Oe(t){le.lFrame.currentDirectiveIndex=t}function xe(){return le.lFrame.currentQueryIndex}function Te(t){le.lFrame.currentQueryIndex=t}function ke(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function Ae(t,e,n){if(n&Tt.SkipSelf){let r=e,s=t;for(;r=r.parent,!(null!==r||n&Tt.Host||(r=ke(s),null===r)||(s=s[15],10&r.type)););if(null===r)return!1;e=r,t=s}const r=le.lFrame=Pe();return r.currentTNode=e,r.lView=t,!0}function je(t){const e=Pe(),n=t[1];le.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function Pe(){const t=le.lFrame,e=null===t?null:t.child;return null===e?Ie(t):e}function Ie(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function De(){const t=le.lFrame;return le.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Re=De;function Ne(){const t=De();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Le(){return le.lFrame.selectedIndex}function Ve(t){le.lFrame.selectedIndex=t}function Me(){const t=le.lFrame;return Yt(t.tView,t.selectedIndex)}let Fe;function He(t){var e;return(null===(e=function(){if(void 0===Fe&&(Fe=null,z.trustedTypes))try{Fe=z.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(e){}return Fe}())||void 0===e?void 0:e.createHTML(t))||t}class Ue{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}class qe extends Ue{getTypeName(){return"HTML"}}class ze extends Ue{getTypeName(){return"Style"}}class $e extends Ue{getTypeName(){return"Script"}}class Be extends Ue{getTypeName(){return"URL"}}class Qe extends Ue{getTypeName(){return"ResourceURL"}}function We(t){return t instanceof Ue?t.changingThisBreaksApplicationSecurity:t}function Ke(t,e){const n=Ge(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see http://g.co/ng/security#xss)`)}return n===e}function Ge(t){return t instanceof Ue&&t.getTypeName()||null}function Ze(t){return new qe(t)}function Xe(t){return new ze(t)}function Je(t){return new $e(t)}function Ye(t){return new Be(t)}function tn(t){return new Qe(t)}let en=!0,nn=!1;function rn(){return nn=!0,en}function sn(){if(nn)throw new Error("Cannot enable prod mode after platform setup.");en=!1}class on{getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(He(t),"text/html").body;return e.removeChild(e.firstChild),e}catch(e){return null}}}class an{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const e=this.inertDocument.createElement("body");t.appendChild(e)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=He(t),e;const n=this.inertDocument.createElement("body");return n.innerHTML=He(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(t){const e=t.attributes;for(let r=e.length-1;0un(t.trim())).join(", ")),this.buf.push(" ",e,'="',On(o),'"')}var r;return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();yn.hasOwnProperty(e)&&!fn.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(On(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e}}const Sn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,En=/([^\#-~ |!])/g;function On(t){return t.replace(/&/g,"&").replace(Sn,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(En,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let xn;function Tn(t,e){let n=null;try{xn=xn||function(t){return function(){try{return!!(new window.DOMParser).parseFromString(He(""),"text/html")}catch(t){return!1}}()?new on:new an(t)}(t);let r=e?String(e):"";n=xn.getInertBodyElement(r);let s=5,i=r;do{if(0===s)throw new Error("Failed to sanitize html because the input is unstable");s--,r=i,i=n.innerHTML,n=xn.getInertBodyElement(r)}while(r!==i);const o=new Cn,a=o.sanitizeChildren(kn(n)||n);return rn()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),a}finally{if(n){const t=kn(n)||n;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function kn(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var An=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function jn(t){const e=In();return e?e.sanitize(An.HTML,t)||"":Ke(t,"HTML")?We(t):Tn(Ut(),Ot(t))}function Pn(t){const e=In();return e?e.sanitize(An.URL,t)||"":Ke(t,"URL")?We(t):un(Ot(t))}function In(){const t=ue();return t&&t[12]}function Dn(t,e){return t.hasOwnProperty(ht)?t[ht]:null}class Rn extends Error{constructor(t,e){super(function(t,e){return`${t?`NG0${t}: `:""}${e}`}(t,e)),this.code=t}}function Nn(t,e){const n=e?" in "+e:"";throw new Rn("201",`No provider for ${xt(t)} found${n}`)}class Ln{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function Vn(){return Mn}function Mn(t){return t.type.prototype.ngOnChanges&&(t.setInput=Hn),Fn}function Fn(){const t=Un(this),e=null==t?void 0:t.current;if(e){const n=t.previous;if(n===st)t.previous=e;else for(let t in e)n[t]=e[t];t.current=null,this.ngOnChanges(e)}}function Hn(t,e,n,r){const s=Un(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:st,current:null}),i=s.current||(s.current={}),o=s.previous,a=this.declaredInputs[n],l=o[a];i[a]=new Ln(l&&l.currentValue,e,o===st),t[r]=e}function Un(t){return t.__ngSimpleChanges__||null}function qn(t,e){for(let n=e.directiveStart,r=e.directiveEnd;n=r)break}else e[o]<0&&(t[18]+=65536),(i>11>16&&(3&t[2])===e&&(t[2]+=2048,i.call(o)):i.call(o)}Vn.ngInherit=!0;class Kn{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function Gn(t,e,n){const r=Kt(t);let s=0;for(;se){o=i-1;break}}}for(;i>16,r=e;for(;n>0;)r=r[15],n--;return r}let rr=!0;function sr(t){const e=rr;return rr=t,e}let ir=0;function or(t,e){const n=lr(t,e);if(-1!==n)return n;const r=e[1];r.firstCreatePass&&(t.injectorIndex=e.length,ar(r.data,t),ar(e,null),ar(r.blueprint,null));const s=cr(t,e),i=t.injectorIndex;if(tr(s)){const t=er(s),n=nr(s,e),r=n[1].data;for(let s=0;s<8;s++)e[i+s]=n[t+s]|r[t+s]}return e[i+8]=s,i}function ar(t,e){t.push(0,0,0,0,0,0,0,0,e)}function lr(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function cr(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,r=null,s=e;for(;null!==s;){const t=s[1],e=t.type;if(r=2===e?t.declTNode:1===e?s[6]:null,null===r)return-1;if(n++,s=s[15],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return-1}function ur(t,e,n){!function(t,e,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(dt)&&(r=n[dt]),null==r&&(r=n[dt]=ir++);const s=255&r,i=1<=0?255&e:gr:e}(n);if("function"==typeof i){if(!Ae(e,t,r))return r&Tt.Host?hr(s,n,r):dr(e,n,r,s);try{const t=i();if(null!=t||r&Tt.Optional)return t;Nn(n)}finally{Re()}}else if("number"==typeof i){let s=null,o=lr(t,e),a=-1,l=r&Tt.Host?e[16][6]:null;for((-1===o||r&Tt.SkipSelf)&&(a=-1===o?cr(t,e):e[o+8],-1!==a&&vr(r,!1)?(s=e[1],o=er(a),e=nr(a,e)):o=-1);-1!==o;){const t=e[1];if(_r(i,o,t.data)){const t=mr(o,e,n,s,r,l);if(t!==pr)return t}a=e[o+8],-1!==a&&vr(r,e[1].data[o+8]===l)&&_r(i,o,e)?(s=t,o=er(a),e=nr(a,e)):o=-1}}}return dr(e,n,r,s)}const pr={};function gr(){return new wr(fe(),ue())}function mr(t,e,n,r,s,i){const o=e[1],a=o.data[t+8],l=yr(a,o,n,null==r?Bt(a)&&rr:r!=o&&0!=(3&a.type),s&Tt.Host&&i===a);return null!==l?br(e,o,l,a):pr}function yr(t,e,n,r,s){const i=t.providerIndexes,o=e.data,a=1048575&i,l=t.directiveStart,c=i>>20,u=s?a+c:t.directiveEnd;for(let h=r?a:a+c;h=l&&t.type===n)return h}if(s){const t=o[l];if(t&&Wt(t)&&t.type===n)return l}return null}function br(t,e,n,r){let s=t[n];const i=e.data;if(s instanceof Kn){const o=s;o.resolving&&function(t,e){throw new Rn("200","Circular dependency in DI detected for "+t)}(xt(i[n]));const a=sr(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?At(o.injectImpl):null;Ae(t,r,Tt.Default);try{s=t[n]=o.factory(void 0,i,t,r),e.firstCreatePass&&n>=r.directiveStart&&function(t,e,n){const{ngOnChanges:r,ngOnInit:s,ngDoCheck:i}=e.type.prototype;if(r){const r=Mn(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,r),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,r)}s&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,s),i&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,i))}(n,i[n],e)}finally{null!==l&&At(l),sr(a),o.resolving=!1,Re()}}return s}function _r(t,e,n){const r=64&t,s=32&t;let i;return i=128&t?r?s?n[e+7]:n[e+6]:s?n[e+5]:n[e+4]:r?s?n[e+3]:n[e+2]:s?n[e+1]:n[e],!!(i&1<{const t=Cr(Q(e));return t?t():null};let n=Dn(e);if(null===n){const t=P(e);n=t&&t.factory}return n||null}function Sr(t){return y(()=>{const e=t.prototype.constructor,n=e[ht]||Cr(e),r=Object.prototype;let s=Object.getPrototypeOf(t.prototype).constructor;for(;s&&s!==r;){const t=s[ht]||Cr(s);if(t&&t!==n)return t;s=Object.getPrototypeOf(s)}return t=>new t})}function Er(t){return t.ngDebugContext}function Or(t){return t.ngOriginalError}function xr(t,...e){t.error(...e)}class Tr{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),r=function(t){return t.ngErrorLogger||xr}(t);r(this._console,"ERROR",t),e&&r(this._console,"ORIGINAL ERROR",e),n&&r(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?Er(t)?Er(t):this._findContext(Or(t)):null}_findOriginalError(t){let e=Or(t);for(;e&&Or(e);)e=Or(e);return e}}function kr(t,e){t.__ngContext__=e}const Ar=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(z))();function jr(t){return{name:"window",target:t.ownerDocument.defaultView}}function Pr(t){return t instanceof Function?t():t}var Ir=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});function Dr(t,e){return(void 0)(t,e)}function Rr(t){const e=t[3];return zt(e)?e[3]:e}function Nr(t){return Vr(t[13])}function Lr(t){return Vr(t[4])}function Vr(t){for(;null!==t&&!zt(t);)t=t[4];return t}function Mr(t,e,n,r,s){if(null!=r){let i,o=!1;zt(r)?i=r:qt(r)&&(o=!0,r=r[0]);const a=Zt(r);0===t&&null!==n?null==s?Qr(e,n,a):Br(e,n,a,s||null,!0):1===t&&null!==n?Br(e,n,a,s||null,!0):2===t?function(t,e,n){const r=Kr(t,e);r&&function(t,e,n,r){Kt(t)?t.removeChild(e,n,r):e.removeChild(n)}(t,r,e,n)}(e,a,o):3===t&&e.destroyNode(a),null!=i&&function(t,e,n,r,s){const i=n[7];i!==Zt(n)&&Mr(e,t,r,i,s);for(let o=10;o0&&(t[n-1][4]=r[4]);const o=J(t,10+e);es(r[1],s=r,s[11],2,null,null),s[0]=null,s[6]=null;const a=o[19];null!==a&&a.detachView(o[1]),r[3]=null,r[4]=null,r[2]&=-129}var s;return r}function qr(t,e){if(!(256&e[2])){const n=e[11];Kt(n)&&n.destroyNode&&es(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return zr(t[1],t);for(;e;){let n=null;if(qt(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)qt(e)&&zr(e[1],e),e=e[3];null===e&&(e=t),qt(e)&&zr(e[1],e),n=e&&e[4]}e=n}}(e)}}function zr(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let r=0;r=0?t[a]():t[-a].unsubscribe(),r+=2}else n[r].call(t[n[r+1]]);e[7]=null}}(t,e),1===e[1].type&&Kt(e[11])&&e[11].destroy();const n=e[17];if(null!==n&&zt(e[3])){n!==e[3]&&Hr(n,e);const r=e[19];null!==r&&r.detachView(t)}}}function $r(t,e,n){return function(t,e,n){let r=e;for(;null!==r&&40&r.type;)r=(e=r).parent;if(null===r)return n[0];if(2&r.flags){const e=t.data[r.directiveStart].encapsulation;if(e===rt.None||e===rt.Emulated)return null}return Jt(r,n)}(t,e.parent,n)}function Br(t,e,n,r,s){Kt(t)?t.insertBefore(e,n,r,s):e.insertBefore(n,r,s)}function Qr(t,e,n){Kt(t)?t.appendChild(e,n):e.appendChild(n)}function Wr(t,e,n,r,s){null!==r?Br(t,e,n,r,s):Qr(t,e,n)}function Kr(t,e){return Kt(t)?t.parentNode(e):e.parentNode}function Gr(t,e,n){return Zr(t,e,n)}let Zr=function(t,e,n){return 40&t.type?Jt(t,n):null};function Xr(t,e,n,r){const s=$r(t,r,e),i=e[11],o=Gr(r.parent||e[6],r,e);if(null!=s)if(Array.isArray(n))for(let a=0;ai?"":s[u+1].toLowerCase();const e=8&r?t:null;if(e&&-1!==is(e,c,0)||2&r&&c!==t){if(us(r))return!1;o=!0}}}}else{if(!o&&!us(r)&&!us(l))return!1;if(o&&us(l))continue;o=!1,r=l|1&r}}return us(r)||o}function us(t){return 0==(1&t)}function hs(t,e,n,r){if(null===e)return-1;let s=0;if(r||!n){let n=!1;for(;s-1)for(n++;n0?'="'+e+'"':"")+"]"}else 8&r?s+="."+o:4&r&&(s+=" "+o);else""===s||us(o)||(e+=ps(i,s),s=""),r=o,i=i||!us(r);n++}return""!==s&&(e+=ps(i,s)),e}const ms={};function ys(t){bs(he(),ue(),Le()+t,be())}function bs(t,e,n,r){if(!r)if(3==(3&e[2])){const r=t.preOrderCheckHooks;null!==r&&zn(e,r,n)}else{const r=t.preOrderHooks;null!==r&&$n(e,r,0,n)}Ve(n)}function _s(t,e){return t<<17|e<<2}function vs(t){return t>>17&32767}function ws(t){return 2|t}function Cs(t){return(131068&t)>>2}function Ss(t,e){return-131069&t|e<<2}function Es(t){return 1|t}function Os(t,e){const n=t.contentQueries;if(null!==n)for(let r=0;r20&&bs(t,e,20,be()),n(r,s)}finally{Ve(i)}}function Ds(t,e,n){if($t(e)){const r=e.directiveEnd;for(let s=e.directiveStart;s0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(n)!=i&&n.push(i),n.push(r,s,o)}}function zs(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function $s(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function Bs(t,e,n){if(n){if(e.exportAs)for(let r=0;r0&&Ys(n)}}function Ys(t){for(let n=Nr(t);null!==n;n=Lr(n))for(let t=10;t0&&Ys(e)}const e=t[1].components;if(null!==e)for(let n=0;n0&&Ys(r)}}function ti(t,e){const n=ee(e,t),r=n[1];!function(t,e){for(let n=e.length;nPromise.resolve(null))();function ai(t){return t[7]||(t[7]=[])}function li(t,e){const n=t[9],r=n?n.get(Tr,null):null;r&&r.handleError(e)}function ci(t,e,n,r,s){for(let i=0;ithis.processProvider(n,t,e)),Z([t],t=>this.processInjectorType(t,[],s)),this.records.set(di,Ei(void 0,this));const i=this.records.get(pi);this.scope=null!=i?i.value:null,this.source=r||("object"==typeof t?null:S(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Pt,n=Tt.Default){this.assertNotDestroyed();const r=Nt(this);try{if(!(n&Tt.SkipSelf)){let e=this.records.get(t);if(void 0===e){const n=("function"==typeof(s=t)||"object"==typeof s&&s instanceof L)&&A(t);e=n&&this.injectableDefInScope(n)?Ei(Ci(t),gi):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(n&Tt.Self?_i():this.parent).get(t,e=n&Tt.Optional&&e===Pt?null:e)}catch(i){if("NullInjectorError"===i.name){if((i.ngTempTokenPath=i.ngTempTokenPath||[]).unshift(S(t)),r)throw i;return function(t,e,n,r){const s=t.ngTempTokenPath;throw e.__source&&s.unshift(e.__source),t.message=function(t,e,n,r=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let s=S(e);if(Array.isArray(e))s=e.map(S).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let r=e[n];t.push(n+":"+("string"==typeof r?JSON.stringify(r):S(r)))}s=`{${t.join(", ")}}`}return`${n}${r?"("+r+")":""}[${s}]: ${t.replace(It,"\n ")}`}("\n"+t.message,s,n,r),t.ngTokenPath=s,t.ngTempTokenPath=null,t}(i,t,"R3InjectorError",this.source)}throw i}finally{Nt(r)}var s}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,n)=>t.push(S(n))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,n){if(!(t=Q(t)))return!1;let r=P(t);const s=null==r&&t.ngModule||void 0,i=void 0===s?t:s,o=-1!==n.indexOf(i);if(void 0!==s&&(r=P(s)),null==r)return!1;if(null!=r.imports&&!o){let t;n.push(i);try{Z(r.imports,r=>{this.processInjectorType(r,e,n)&&(void 0===t&&(t=[]),t.push(r))})}finally{}if(void 0!==t)for(let e=0;ethis.processProvider(t,n,r||yi))}}this.injectorDefTypes.add(i),this.records.set(i,Ei(r.factory,gi));const a=r.providers;if(null!=a&&!o){const e=t;Z(a,t=>this.processProvider(t,e,a))}return void 0!==s&&void 0!==t.providers}processProvider(t,e,n){let r=xi(t=Q(t))?t:Q(t&&t.provide);const s=function(t,e,n){return Oi(t)?Ei(void 0,t.useValue):Ei(Si(t),gi)}(t);if(xi(t)||!0!==t.multi)this.records.get(r);else{let e=this.records.get(r);e||(e=Ei(void 0,gi,!0),e.factory=()=>Mt(e.multi),this.records.set(r,e)),r=t,e.multi.push(t)}this.records.set(r,s)}hydrate(t,e){var n;return e.value===gi&&(e.value=mi,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}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function Ci(t){const e=A(t),n=null!==e?e.factory:Dn(t);if(null!==n)return n;const r=P(t);if(null!==r)return r.factory;if(t instanceof L)throw new Error(`Token ${S(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const n=Y(e,"?");throw new Error(`Can't resolve all parameters for ${S(t)}: (${n.join(", ")}).`)}const n=function(t){const e=t&&(t[I]||t[R]);if(e){const n=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${n}" class.`),e}return null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new Error("unreachable")}function Si(t,e,n){let r=void 0;if(xi(t)){const e=Q(t);return Dn(e)||Ci(e)}if(Oi(t))r=()=>Q(t.useValue);else if((s=t)&&s.useFactory)r=()=>t.useFactory(...Mt(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))r=()=>Vt(Q(t.useExisting));else{const e=Q(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return Dn(e)||Ci(e);r=()=>new e(...Mt(t.deps))}var s;return r}function Ei(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function Oi(t){return null!==t&&"object"==typeof t&&Dt in t}function xi(t){return"function"==typeof t}const Ti=function(t,e,n){return function(t,e=null,n=null,r){const s=vi(t,e,n,r);return s._resolveInjectorDefTypes(),s}({name:n},e,t,n)};let ki=(()=>{class t{static create(t,e){return Array.isArray(t)?Ti(t,e,""):Ti(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=Pt,t.NULL=new fi,t.\u0275prov=T({token:t,providedIn:"any",factory:()=>Vt(di)}),t.__NG_ELEMENT_ID__=-1,t})();function Ai(t,e){qn(ne(t)[1],fe())}function ji(t){let e=Object.getPrototypeOf(t.type.prototype).constructor,n=!0;const r=[t];for(;e;){let s=void 0;if(Wt(t))s=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");s=e.\u0275dir}if(s){if(n){r.push(s);const e=t;e.inputs=Pi(t.inputs),e.declaredInputs=Pi(t.declaredInputs),e.outputs=Pi(t.outputs);const n=s.hostBindings;n&&Ri(t,n);const i=s.viewQuery,o=s.contentQueries;if(i&&Ii(t,i),o&&Di(t,o),x(t.inputs,s.inputs),x(t.declaredInputs,s.declaredInputs),x(t.outputs,s.outputs),Wt(s)&&s.data.animation){const e=t.data;e.animation=(e.animation||[]).concat(s.data.animation)}}const e=s.features;if(e)for(let r=0;r=0;r--){const s=t[r];s.hostVars=e+=s.hostVars,s.hostAttrs=Jn(s.hostAttrs,n=Jn(n,s.hostAttrs))}}(r)}function Pi(t){return t===st?{}:t===it?[]:t}function Ii(t,e){const n=t.viewQuery;t.viewQuery=n?(t,r)=>{e(t,r),n(t,r)}:e}function Di(t,e){const n=t.contentQueries;t.contentQueries=n?(t,r,s)=>{e(t,r,s),n(t,r,s)}:e}function Ri(t,e){const n=t.hostBindings;t.hostBindings=n?(t,r)=>{e(t,r),n(t,r)}:e}let Ni=null;function Li(){if(!Ni){const t=z.Symbol;if(t&&t.iterator)Ni=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;ea(Zt(t[r.index])).target:r.index;if(Kt(n)){let o=null;if(!a&&l&&(o=function(t,e,n,r){const s=t.cleanup;if(null!=s)for(let i=0;in?t[n]:null}"string"==typeof t&&(i+=2)}return null}(t,e,s,r.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=i,o.__ngLastListenerFn__=i,h=!1;else{i=ao(r,e,i,!1);const t=n.listen(f.name||p,s,i);u.push(i,t),c&&c.push(s,m,g,g+1)}}else i=ao(r,e,i,!0),p.addEventListener(s,i,o),u.push(i),c&&c.push(s,m,g,o)}const d=r.outputs;let f;if(h&&null!==d&&(f=d[s])){const t=f.length;if(t)for(let n=0;n0;)e=e[15],t--;return e}(t,le.lFrame.contextLView))[8]}(t)}function co(t,e){let n=null;const r=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let s=0;s=0}const bo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function _o(t){return t.substring(bo.key,bo.keyEnd)}function vo(t){return t.substring(bo.value,bo.valueEnd)}function wo(t,e){const n=bo.textEnd;let r=bo.key=Co(t,e,n);return n===r?-1:(r=bo.keyEnd=function(t,e,n){let r;for(;e=65&&(-33&r)<=90||r>=48&&r<=57);)e++;return e}(t,r,n),r=So(t,r,n),r=bo.value=Co(t,r,n),r=bo.valueEnd=function(t,e,n){let r=-1,s=-1,i=-1,o=e,a=o;for(;o32&&(a=o),i=s,s=r,r=-33&l}return a}(t,r,n),So(t,r,n))}function Co(t,e,n){for(;e=0;n=wo(e,n))Io(t,_o(e),vo(e))}function ko(t,e){return e>=t.expandoStartIndex}function Ao(t,e,n,r){const s=t.data;if(null===s[n+1]){const i=s[Le()],o=ko(t,n);Lo(i,r)&&null===e&&!o&&(e=!1),e=function(t,e,n,r){const s=function(t){const e=le.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}(t);let i=r?e.residualClasses:e.residualStyles;if(null===s)0===(r?e.classBindings:e.styleBindings)&&(n=Po(n=jo(null,t,e,n,r),e.attrs,r),i=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==s)if(n=jo(s,t,e,n,r),null===i){let n=function(t,e,n){const r=n?e.classBindings:e.styleBindings;if(0!==Cs(r))return t[vs(r)]}(t,e,r);void 0!==n&&Array.isArray(n)&&(n=jo(null,t,e,n[1],r),n=Po(n,e.attrs,r),function(t,e,n,r){t[vs(n?e.classBindings:e.styleBindings)]=r}(t,e,r,n))}else i=function(t,e,n){let r=void 0;const s=e.directiveEnd;for(let i=1+e.directiveStylingLast;i0)&&(u=!0)}else c=n;if(s)if(0!==l){const e=vs(t[a+1]);t[r+1]=_s(e,a),0!==e&&(t[e+1]=Ss(t[e+1],r)),t[a+1]=131071&t[a+1]|r<<17}else t[r+1]=_s(a,0),0!==a&&(t[a+1]=Ss(t[a+1],r)),a=r;else t[r+1]=_s(l,0),0===a?a=r:t[l+1]=Ss(t[l+1],r),l=r;u&&(t[r+1]=ws(t[r+1])),mo(t,c,r,!0),mo(t,c,r,!1),function(t,e,n,r,s){const i=s?t.residualClasses:t.residualStyles;null!=i&&"string"==typeof e&&nt(i,e)>=0&&(n[r+1]=Es(n[r+1]))}(e,c,t,r,i),o=_s(a,l),i?e.classBindings=o:e.styleBindings=o}(s,i,e,n,o,r)}}function jo(t,e,n,r,s){let i=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a0;){const e=t[s],i=Array.isArray(e),l=i?e[1]:e,c=null===l;let u=n[s+1];u===ms&&(u=c?go:void 0);let h=c?et(u,r):l===r?u:void 0;if(i&&!No(h)&&(h=et(e,r)),No(h)&&(a=h,o))return a;const d=t[s+1];s=o?vs(d):Cs(d)}if(null!==e){let t=i?e.residualClasses:e.residualStyles;null!=t&&(a=et(t,r))}return a}function No(t){return void 0!==t}function Lo(t,e){return 0!=(t.flags&(e?16:32))}function Vo(t,e=""){const n=ue(),r=he(),s=t+20,i=r.firstCreatePass?Ts(r,s,1,e,null):r.data[s],o=n[s]=function(t,e){return Kt(t)?t.createText(e):t.createTextNode(e)}(n[11],e);Xr(r,n,o,i),ge(i,!1)}function Mo(t){return Fo("",t,""),Mo}function Fo(t,e,n){const r=ue(),s=$i(r,t,e,n);return s!==ms&&ui(r,Le(),s),Fo}function Ho(t,e,n,r,s){const i=ue(),o=function(t,e,n,r,s,i){const o=qi(t,we(),n,s);return Se(2),o?e+Ot(n)+r+Ot(s)+i:ms}(i,t,e,n,r,s);return o!==ms&&ui(i,Le(),o),Ho}function Uo(t,e,n,r,s,i,o){const a=ue(),l=function(t,e,n,r,s,i,o,a){const l=function(t,e,n,r,s){const i=qi(t,e,n,r);return Ui(t,e+2,s)||i}(t,we(),n,s,o);return Se(3),l?e+Ot(n)+r+Ot(s)+i+Ot(o)+a:ms}(a,t,e,n,r,s,i,o);return l!==ms&&ui(a,Le(),l),Uo}function qo(t,e,n){const r=ue();return Ui(r,Ce(),e)&&Hs(he(),Me(),r,t,e,r[11],n,!0),qo}const zo=void 0;var $o=["en",[["a","p"],["AM","PM"],zo],[["AM","PM"],zo,zo],[["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"]],zo,[["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"]],zo,[["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}",zo,"{1} 'at' {0}",zo],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let Bo={};function Qo(t,e,n){"string"!=typeof e&&(n=e,e=t[Xo.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),Bo[e]=t,n&&(Bo[e][Xo.ExtraData]=n)}function Wo(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=Zo(e);if(n)return n;const r=e.split("-")[0];if(n=Zo(r),n)return n;if("en"===r)return $o;throw new Error(`Missing locale data for the locale "${t}".`)}function Ko(t){return Wo(t)[Xo.CurrencyCode]||null}function Go(t){return Wo(t)[Xo.PluralCase]}function Zo(t){return t in Bo||(Bo[t]=z.ng&&z.ng.common&&z.ng.common.locales&&z.ng.common.locales[t]),Bo[t]}var Xo=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});let Jo="en-US";function Yo(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,r){throw new Error("ASSERTION ERROR: "+t+` [Expected=> null != ${e} <=Actual]`)}(n,e),"string"==typeof t&&(Jo=t.toLowerCase().replace(/_/g,"-"))}function ta(t,e,n,r,s){if(t=Q(t),Array.isArray(t))for(let i=0;i>20;if(xi(t)||!t.multi){const r=new Kn(l,s,Wi),f=ra(a,e,s?u:u+d,h);-1===f?(ur(or(c,o),i,a),ea(i,t,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=1048576),n.push(r),o.push(r)):(n[f]=r,o[f]=r)}else{const f=ra(a,e,u+d,h),p=ra(a,e,u,u+d),g=f>=0&&n[f],m=p>=0&&n[p];if(s&&!m||!s&&!g){ur(or(c,o),i,a);const u=function(t,e,n,r,s){const i=new Kn(t,n,Wi);return i.multi=[],i.index=e,i.componentProviders=0,na(i,s,r&&!n),i}(s?ia:sa,n.length,s,r,l);!s&&m&&(n[p].providerFactory=u),ea(i,t,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,s&&(c.providerIndexes+=1048576),n.push(u),o.push(u)}else ea(i,t,f>-1?f:p,na(n[s?p:f],l,!s&&r));!s&&r&&m&&n[p].componentProviders++}}}function ea(t,e,n,r){const s=xi(e);if(s||e.useClass){const i=(e.useClass||e).prototype.ngOnDestroy;if(i){const o=t.destroyHooks||(t.destroyHooks=[]);if(!s&&e.multi){const t=o.indexOf(n);-1===t?o.push(n,[r,i]):o[t+1].push(r,i)}else o.push(n,i)}}}function na(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function ra(t,e,n,r){for(let s=n;s{n.providersResolver=(n,r)=>function(t,e,n){const r=he();if(r.firstCreatePass){const s=Wt(t);ta(n,r.data,r.blueprint,s,!0),ta(e,r.data,r.blueprint,s,!1)}}(n,r?r(t):t,e)}}class la{}class ca{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${S(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let ua=(()=>{class t{}return t.NULL=new ca,t})();function ha(...t){}function da(t,e){return new pa(Jt(t,e))}const fa=function(){return da(fe(),ue())};let pa=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=fa,t})();class ga{}let ma=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>ya(),t})();const ya=function(){const t=ue(),e=ee(fe().index,t);return function(t){return t[11]}(qt(e)?e:t)};let ba=(()=>{class t{}return t.\u0275prov=T({token:t,providedIn:"root",factory:()=>null}),t})();class _a{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const va=new _a("11.0.2");class wa{constructor(){}supports(t){return Mi(t)}create(t){return new Sa(t)}}const Ca=(t,e)=>e;class Sa{constructor(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=t||Ca}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,r=0,s=null;for(;e||n;){const i=!n||e&&e.currentIndex{r=this._trackByFn(e,t),null!==s&&Object.is(s.trackById,r)?(i&&(s=this._verifyReinsertion(s,t,r,e)),Object.is(s.item,t)||this._addIdentityChange(s,t)):(s=this._mismatch(s,t,r,e),i=!0),s=s._next,e++}),this.length=e;return this._truncate(s),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;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=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,r){let s;return null===t?s=this._itTail:(s=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,s,r)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,s,r)):t=this._addAfter(new Ea(e,n),s,r),t}_verifyReinsertion(t,e,n,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==s?t=this._reinsertAfter(s,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const 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)}_reinsertAfter(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,s=t._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new xa),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new xa),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}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class Ea{constructor(t,e){this.item=t,this.trackById=e,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}}class Oa{constructor(){this._head=null,this._tail=null}add(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)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){const 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}}class xa{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new Oa,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Ta(t,e,n){const r=t.previousIndex;if(null===r)return r;let s=0;return n&&r{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const r=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,r)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const 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}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const r=n._prev,s=n._next;return r&&(r._next=s),s&&(s._prev=r),n._next=null,n._prev=null,n}const n=new ja(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let 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}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}class ja{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let Pa=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(null!=n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new C,new v]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${n=t,n.name||typeof n}'`);var n}}return t.\u0275prov=T({token:t,providedIn:"root",factory:()=>new t([new wa])}),t})(),Ia=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new C,new v]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=T({token:t,providedIn:"root",factory:()=>new t([new ka])}),t})();function Da(t,e,n,r,s=!1){for(;null!==n;){const i=e[n.index];if(null!==i&&r.push(Zt(i)),zt(i))for(let t=10;t-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}qr(this._lView[1],this._lView)}onDestroy(t){Ms(this._lView[1],this._lView,null,t)}markForCheck(){ni(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){ri(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){_e(!0);try{ri(t,e,n)}finally{_e(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}detachFromAppRef(){var t;this._appRef=null,es(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class Na extends Ra{constructor(t){super(t),this._view=t}detectChanges(){si(this._view)}checkNoChanges(){!function(t){_e(!0);try{si(t)}finally{_e(!1)}}(this._view)}get context(){return null}}const La=Ma;let Va=(()=>{class t{}return t.__NG_ELEMENT_ID__=La,t.__ChangeDetectorRef__=!0,t})();function Ma(t=!1){return function(t,e,n){if(!n&&Bt(t)){const n=ee(t.index,e);return new Ra(n,n)}return 47&t.type?new Ra(e[16],e):null}(fe(),ue(),t)}const Fa=[new ka],Ha=new Pa([new wa]),Ua=new Ia(Fa),qa=function(){return Qa(fe(),ue())};let za=(()=>{class t{}return t.__NG_ELEMENT_ID__=qa,t})();const $a=za,Ba=class extends $a{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}createEmbeddedView(t){const e=this._declarationTContainer.tViews,n=xs(this._declarationLView,e,t,16,null,e.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];const r=this._declarationLView[19];return null!==r&&(n[19]=r.createEmbeddedView(e)),As(e,n,t),new Ra(n)}};function Qa(t,e){return 4&t.type?new Ba(e,t,da(t,e)):null}class Wa{}class Ka{}const Ga=function(){return el(fe(),ue())};let Za=(()=>{class t{}return t.__NG_ELEMENT_ID__=Ga,t})();const Xa=Za,Ja=class extends Xa{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return da(this._hostTNode,this._hostLView)}get injector(){return new wr(this._hostTNode,this._hostLView)}get parentInjector(){const t=cr(this._hostTNode,this._hostLView);if(tr(t)){const e=nr(t,this._hostLView),n=er(t);return new wr(e[1].data[n+8],e)}return new wr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=Ya(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,n){const r=t.createEmbeddedView(e||{});return this.insert(r,n),r}createComponent(t,e,n,r,s){const i=n||this.parentInjector;if(!s&&null==t.ngModule&&i){const t=i.get(Wa,null);t&&(s=t)}const o=t.create(i,r,void 0,s);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,r=n[1];if(zt(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],r=new Ja(e,e[6],e[3]);r.detach(r.indexOf(t))}}const s=this._adjustIndex(e),i=this._lContainer;!function(t,e,n,r){const s=10+r,i=n.length;r>0&&(n[s-1][4]=e),rAr});class ol extends la{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(gs).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return sl(this.componentDef.inputs)}get outputs(){return sl(this.componentDef.outputs)}create(t,e,n,r){const s=(r=r||this.ngModule)?function(t,e){return{get:(n,r,s)=>{const i=t.get(n,nl,s);return i!==nl||r===nl?i:e.get(n,r,s)}}}(t,r.injector):t,i=s.get(ga,Gt),o=s.get(ba,null),a=i.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=n?function(t,e,n){if(Kt(t))return t.selectRootElement(e,n===rt.ShadowDom);let r="string"==typeof e?t.querySelector(e):e;return r.textContent="",r}(a,n,this.componentDef.encapsulation):Fr(i.createRenderer(null,this.componentDef),l,function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),u=this.componentDef.onPush?576:528,h={components:[],scheduler:Ar,clean:oi,playerHandler:null,flags:0},d=Vs(0,null,null,1,0,null,null,null,null,null),f=xs(null,d,h,u,null,null,i,a,o,s);let p,g;je(f);try{const t=function(t,e,n,r,s,i){const o=n[1];n[20]=t;const a=Ts(o,20,2,"#host",null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(hi(a,l,!0),null!==t&&(Gn(s,t,l),null!==a.classes&&ss(s,t,a.classes),null!==a.styles&&rs(s,t,a.styles)));const c=r.createRenderer(t,e),u=xs(n,Ls(e),null,e.onPush?64:16,n[20],a,r,c,null,null);return o.firstCreatePass&&(ur(or(a,n),o,e.type),$s(o,a),Qs(a,n.length,1)),ei(n,u),n[20]=u}(c,this.componentDef,f,i,a);if(c)if(n)Gn(a,c,["ng-version",va.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let r=1,s=2;for(;r0&&ss(a,c,e.join(" "))}if(g=Yt(d,20),void 0!==e){const t=g.projection=[];for(let n=0;nt(o,e)),e.contentQueries){const t=fe();e.contentQueries(1,o,t.directiveStart)}const a=fe();return!i.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(Ve(a.index),qs(n[1],a,0,a.directiveStart,a.directiveEnd,e),zs(e,o)),o}(t,this.componentDef,f,h,[Ai]),As(d,f,null)}finally{Ne()}return new al(this.componentType,p,da(g,f),f,g)}}class al extends class{}{constructor(t,e,n,r,s){super(),this.location=n,this._rootLView=r,this._tNode=s,this.destroyCbs=[],this.instance=e,this.hostView=this.changeDetectorRef=new Na(r),this.componentType=t}get injector(){return new wr(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(t=>t()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(t){this.destroyCbs&&this.destroyCbs.push(t)}}const ll=new Map;class cl extends Wa{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new rl(this);const n=Et(t),r=t[ut]||null;r&&Yo(r),this._bootstrapComponents=Pr(n.bootstrap),this._r3Injector=vi(t,e,[{provide:Wa,useValue:this},{provide:ua,useValue:this.componentFactoryResolver}],S(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=ki.THROW_IF_NOT_FOUND,n=Tt.Default){return t===ki||t===Wa||t===di?this:this._r3Injector.get(t,e,n)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class ul extends Ka{constructor(t){super(),this.moduleType=t,null!==Et(t)&&function(t){const e=new Set;!function t(n){const r=Et(n,!0),s=r.id;null!==s&&(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${S(e)} vs ${S(e.name)}`)}(s,ll.get(s),n),ll.set(s,n));const i=Pr(r.imports);for(const o of i)e.has(o)||(e.add(o),t(o))}(t)}(t)}create(t){return new cl(this.moduleType,t)}}function hl(t,e,n){const r=ve()+t,s=ue();return s[r]===ms?Hi(s,r,n?e.call(n):e()):function(t,e){return t[e]}(s,r)}function dl(t,e,n,r){return fl(ue(),ve(),t,e,n,r)}function fl(t,e,n,r,s,i){const o=e+n;return Ui(t,o,s)?Hi(t,o+1,i?r.call(i,s):r(s)):function(t,e){const n=t[e];return n===ms?void 0:n}(t,o+1)}function pl(t,e){const n=he();let r;const s=t+20;n.firstCreatePass?(r=function(t,e){if(e)for(let n=e.length-1;n>=0;n--){const r=e[n];if(t===r.name)return r}throw new Rn("302",`The pipe '${t}' could not be found!`)}(e,n.pipeRegistry),n.data[s]=r,r.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(s,r.onDestroy)):r=n.data[s];const i=r.factory||(r.factory=Dn(r.type)),o=At(Wi);try{const t=sr(!1),e=i();return sr(t),function(t,e,n,r){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=r}(n,ue(),s,e),e}finally{At(o)}}function gl(t,e,n){const r=t+20,s=ue(),i=te(s,r);return function(t,e){return Vi.isWrapped(e)&&(e=Vi.unwrap(e),t[we()]=ms),e}(s,function(t,e){return t[1].data[e].pure}(s,r)?fl(s,ve(),e,i.transform,n,i):i.transform(n))}const ml=class extends r.a{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let r,i=t=>null,o=()=>null;t&&"object"==typeof t?(r=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(i=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(o=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(r=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(i=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),n&&(o=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const a=super.subscribe(r,i,o);return t instanceof s.a&&t.add(a),a}};function yl(){return this._results[Li()]()}class bl{constructor(){this.dirty=!0,this._results=[],this.changes=new ml,this.length=0;const t=Li(),e=bl.prototype;e[t]||(e[t]=yl)}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t){this._results=G(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class _l{constructor(t){this.queryList=t,this.matches=null}clone(){return new _l(this.queryList)}setDirty(){this.queryList.setDirty()}}class vl{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,r=[];for(let t=0;t0)r.push(o[t/2]);else{const s=i[t+1],o=e[-n];for(let t=10;t{class t{constructor(t){this.appInits=t,this.resolve=ha,this.reject=ha,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Vt(Vl,8))},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();const Fl=new L("AppId"),Hl={provide:Fl,useFactory:function(){return`${Ul()}${Ul()}${Ul()}`},deps:[]};function Ul(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const ql=new L("Platform Initializer"),zl=new L("Platform ID"),$l=new L("appBootstrapListener");let Bl=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();const Ql=new L("LocaleId"),Wl=new L("DefaultCurrencyCode");class Kl{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const Gl=function(t){return new ul(t)},Zl=Gl,Xl=function(t){return Promise.resolve(Gl(t))},Jl=function(t){const e=Gl(t),n=Pr(Et(t).declarations).reduce((t,e)=>{const n=St(e);return n&&t.push(new ol(n)),t},[]);return new Kl(e,n)},Yl=Jl,tc=function(t){return Promise.resolve(Jl(t))};let ec=(()=>{class t{constructor(){this.compileModuleSync=Zl,this.compileModuleAsync=Xl,this.compileModuleAndAllComponentsSync=Yl,this.compileModuleAndAllComponentsAsync=tc}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();const nc=(()=>Promise.resolve(0))();function rc(t){"undefined"==typeof Zone?nc.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class sc{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new ml(!1),this.onMicrotaskEmpty=new ml(!1),this.onStable=new ml(!1),this.onError=new ml(!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.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=e,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){let t=z.requestAnimationFrame,e=z.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const r=e[Zone.__symbol__("OriginalDelegate")];r&&(e=r)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=!!t.shouldCoalesceEventChangeDetection&&t.nativeRequestAnimationFrame&&(()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(z,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,lc(t),ac(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),lc(t))}(t)});t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:e},onInvokeTask:(n,r,s,i,o,a)=>{try{return cc(t),n.invokeTask(s,i,o,a)}finally{e&&"eventTask"===i.type&&e(),uc(t)}},onInvoke:(e,n,r,s,i,o,a)=>{try{return cc(t),e.invoke(r,s,i,o,a)}finally{uc(t)}},onHasTask:(e,n,r,s)=>{e.hasTask(r,s),n===r&&("microTask"==s.change?(t._hasPendingMicrotasks=s.microTask,lc(t),ac(t)):"macroTask"==s.change&&(t.hasPendingMacrotasks=s.macroTask))},onHandleError:(e,n,r,s)=>(e.handleError(r,s),t.runOutsideAngular(()=>t.onError.emit(s)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!sc.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(sc.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,r){const s=this._inner,i=s.scheduleEventTask("NgZoneEvent: "+r,t,oc,ic,ic);try{return s.runTask(i,e,n)}finally{s.cancelTask(i)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}function ic(){}const oc={};function ac(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(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function lc(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function cc(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function uc(t){t._nesting--,ac(t)}class hc{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new ml,this.onMicrotaskEmpty=new ml,this.onStable=new ml,this.onError=new ml}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,r){return t.apply(e,n)}}let dc=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{sc.assertNotInAngularZone(),rc(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())rc(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let r=-1;e&&e>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==r),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})}whenStable(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()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(Vt(sc))},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})(),fc=(()=>{class t{constructor(){this._applications=new Map,yc.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return yc.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();class pc{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}function gc(t){yc=t}let mc,yc=new pc;const bc=new L("AllowMultipleToken");class _c{constructor(t,e){this.name=t,this.token=e}}function vc(t,e,n=[]){const r="Platform: "+e,s=new L(r);return(e=[])=>{let i=wc();if(!i||i.injector.get(bc,!1))if(t)t(n.concat(e).concat({provide:s,useValue:!0}));else{const t=n.concat(e).concat({provide:s,useValue:!0},{provide:pi,useValue:"platform"});!function(t){if(mc&&!mc.destroyed&&!mc.injector.get(bc,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");mc=t.get(Cc);const e=t.get(ql,null);e&&e.forEach(t=>t())}(ki.create({providers:t,name:r}))}return function(t){const e=wc();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}(s)}}function wc(){return mc&&!mc.destroyed?mc:null}let Cc=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new hc:("zone.js"===t?void 0:t)||new sc({enableLongStackTrace:rn(),shouldCoalesceEventChangeDetection:e}),n}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),r=[{provide:sc,useValue:n}];return n.run(()=>{const e=ki.create({providers:r,parent:this.injector,name:t.moduleType.name}),s=t.create(e),i=s.injector.get(Tr,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return s.onDestroy(()=>Oc(this._modules,s)),n.runOutsideAngular(()=>n.onError.subscribe({next:t=>{i.handleError(t)}})),function(t,e,n){try{const r=n();return ro(r)?r.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):r}catch(r){throw e.runOutsideAngular(()=>t.handleError(r)),r}}(i,n,()=>{const t=s.injector.get(Ml);return t.runInitializers(),t.donePromise.then(()=>(Yo(s.injector.get(Ql,"en-US")||"en-US"),this._moduleDoBootstrap(s),s))})})}bootstrapModule(t,e=[]){const n=Sc({},e);return function(t,e,n){const r=new ul(n);return Promise.resolve(r)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(Ec);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${S(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)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Vt(ki))},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();function Sc(t,e){return Array.isArray(e)?e.reduce(Sc,t):Object.assign(Object.assign({},t),e)}let Ec=(()=>{class t{constructor(t,e,n,r,s,c){this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=s,this._initStatus=c,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=rn(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const h=new i.a(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),d=new i.a(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{sc.assertNotInAngularZone(),rc(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{sc.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=function(...t){let e=Number.POSITIVE_INFINITY,n=null,r=t[t.length-1];return Object(o.a)(r)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof r&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof i.a?t[0]:Object(a.a)(e)(Object(l.a)(t,n))}(h,d.pipe(t=>{return u()((e=m,function(t){let n;n="function"==typeof e?e:function(){return e};const r=Object.create(t,p);return r.source=t,r.subjectFactory=n,r})(t));var e}))}bootstrap(t,e){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.");let n;n=t instanceof la?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const r=n.isBoundToModule?void 0:this._injector.get(Wa),s=n.create(ki.NULL,[],e||n.selector,r);s.onDestroy(()=>{this._unloadComponent(s)});const i=s.injector.get(dc,null);return i&&s.injector.get(fc).registerApplication(s.location.nativeElement,i),this._loadComponent(s),rn()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),s}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges();if(this._enforceNoNewChanges)for(let t of this._views)t.checkNoChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;Oc(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get($l,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),Oc(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(Vt(sc),Vt(Bl),Vt(ki),Vt(Tr),Vt(ua),Vt(Ml))},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();function Oc(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class xc{}class Tc{}const kc={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let Ac=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||kc}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,r]=t.split("#");return void 0===r&&(r="default"),n("zn8P")(e).then(t=>t[r]).then(t=>jc(t,e,r)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,r]=t.split("#"),s="NgFactory";return void 0===r&&(r="default",s=""),n("zn8P")(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[r+s]).then(t=>jc(t,e,r))}}return t.\u0275fac=function(e){return new(e||t)(Vt(ec),Vt(Tc,8))},t.\u0275prov=T({token:t,factory:t.\u0275fac}),t})();function jc(t,e,n){if(!t)throw new Error(`Cannot find '${n}' in '${e}'`);return t}const Pc=function(t){return null},Ic=vc(null,"core",[{provide:zl,useValue:"unknown"},{provide:Cc,deps:[ki]},{provide:fc,deps:[]},{provide:Bl,deps:[]}]),Dc=[{provide:Ec,useClass:Ec,deps:[sc,Bl,ki,Tr,ua,Ml]},{provide:il,deps:[sc],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Ml,useClass:Ml,deps:[[new v,Vl]]},{provide:ec,useClass:ec,deps:[]},Hl,{provide:Pa,useFactory:function(){return Ha},deps:[]},{provide:Ia,useFactory:function(){return Ua},deps:[]},{provide:Ql,useFactory:function(t){return Yo(t=t||"undefined"!=typeof $localize&&$localize.locale||"en-US"),t},deps:[[new _(Ql),new v,new C]]},{provide:Wl,useValue:"USD"}];let Rc=(()=>{class t{constructor(t){}}return t.\u0275mod=bt({type:t}),t.\u0275inj=k({factory:function(e){return new(e||t)(Vt(Ec))},providers:Dc}),t})()},gRHU:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("2fFW"),s=n("NJ4a");const i={closed:!0,next(t){},error(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(s.a)(t)},complete(){}}},jZKg:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("HDdC"),s=n("quSY");function i(t,e){return new r.a(n=>{const r=new s.a;let i=0;return r.add(e.schedule(function(){i!==t.length?(n.next(t[i++]),n.closed||r.add(this.schedule())):n.complete()})),r})}},kJWO:function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")()},lJxs:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("7o/Q");function s(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 i(t,e))}}class i{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new o(t,this.project,this.thisArg))}}class o extends r.a{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}},n6bG:function(t,e,n){"use strict";function r(t){return"function"==typeof t}n.d(e,"a",function(){return r})},ngJS:function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=t=>e=>{for(let n=0,r=t.length;n{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Db)({factory:u,token:t,providedIn:"platform"}),t})();function u(){return Object(r.Qb)(d)}const h=new r.q("Location Initialized");let d=(()=>{class t extends c{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=i().getLocation(),this._history=i().getHistory()}getBaseHrefFromDOM(){return i().getBaseHref(this._doc)}onPopState(t){i().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){i().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,e,n){f()?this._history.pushState(t,e,n):this.location.hash=n}replaceState(t,e,n){f()?this._history.replaceState(t,e,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(l))},t.\u0275prov=Object(r.Db)({factory:p,token:t,providedIn:"platform"}),t})();function f(){return!!window.history.pushState}function p(){return new d(Object(r.Qb)(l))}function g(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function m(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function y(t){return t&&"?"!==t[0]?"?"+t:t}let b=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Db)({factory:_,token:t,providedIn:"root"}),t})();function _(t){const e=Object(r.Qb)(l).location;return new w(Object(r.Qb)(c),e&&e.origin||"")}const v=new r.q("appBaseHref");let w=(()=>{class t extends b{constructor(t,e){if(super(),this._platformLocation=t,null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)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.");this._baseHref=e}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return g(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+y(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?`${e}${n}`:e}pushState(t,e,n,r){const s=this.prepareExternalUrl(n+y(r));this._platformLocation.pushState(t,e,s)}replaceState(t,e,n,r){const s=this.prepareExternalUrl(n+y(r));this._platformLocation.replaceState(t,e,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(c),r.Qb(v,8))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),C=(()=>{class t extends b{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",null!=e&&(this._baseHref=e)}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=g(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,n,r){let s=this.prepareExternalUrl(n+y(r));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(t,e,s)}replaceState(t,e,n,r){let s=this.prepareExternalUrl(n+y(r));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(c),r.Qb(v,8))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),S=(()=>{class t{constructor(t,e){this._subject=new r.n,this._urlChangeListeners=[],this._platformStrategy=t;const n=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=m(O(n)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+y(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,O(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",n=null){this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+y(e)),n)}replaceState(t,e="",n=null){this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+y(e)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}))}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(n=>n(t,e))}subscribe(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(b),r.Qb(c))},t.normalizeQueryParams=y,t.joinWithSlash=g,t.stripTrailingSlash=m,t.\u0275prov=Object(r.Db)({factory:E,token:t,providedIn:"root"}),t})();function E(){return new S(Object(r.Qb)(b),Object(r.Qb)(c))}function O(t){return t.replace(/\/index.html$/,"")}var x=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({});const T=r.kb;class k{}let A=(()=>{class t extends k{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(T(e||this.locale)(t)){case x.Zero:return"zero";case x.One:return"one";case x.Two:return"two";case x.Few:return"few";case x.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.u))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();function j(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[r,s]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(r.trim()===e)return decodeURIComponent(s)}return null}let P=(()=>{class t{constructor(t,e,n,r){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(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&&(Object(r.nb)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Object(r.sb)(t.item));this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.s),r.Hb(r.t),r.Hb(r.l),r.Hb(r.D))},t.\u0275dir=r.Cb({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class I{constructor(t,e,n,r){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let D=(()=>{class t{constructor(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){Object(r.T)()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(t)}. See https://angular.io/api/common/NgForOf#change-propagation for more information.`),this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;if(!this._differ&&n)try{this._differ=this._differs.find(n).create(this.ngForTrackBy)}catch(e){throw new Error(`Cannot find a differ supporting object '${n}' of type '${t=n,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,n,r)=>{if(null==t.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new I(null,this._ngForOf,-1,-1),null===r?void 0:r),s=new R(t,n);e.push(s)}else if(null==r)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const s=this._viewContainer.get(n);this._viewContainer.move(s,r);const i=new R(t,s);e.push(i)}});for(let n=0;n{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.O),r.Hb(r.K),r.Hb(r.s))},t.\u0275dir=r.Cb({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class R{constructor(t,e){this.record=t,this.view=e}}let N=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new L,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){V("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){V("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){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)))}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.O),r.Hb(r.K))},t.\u0275dir=r.Cb({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class L{constructor(){this.$implicit=null,this.ngIf=null}}function V(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Object(r.sb)(e)}'.`)}let M=(()=>{class t{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)}_matchCase(t){const 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}_updateDefaultCases(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(let e=0;e{class t{constructor(t,e,n){this._ngEl=t,this._differs=e,this._renderer=n,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[n,r]=t.split(".");null!=(e=null!=e&&r?`${e}${r}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,n,e):this._renderer.removeStyle(this._ngEl.nativeElement,n)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(r.l),r.Hb(r.t),r.Hb(r.D))},t.\u0275dir=r.Cb({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),H=(()=>{class t{transform(t){return JSON.stringify(t,null,2)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=r.Gb({name:"json",type:t,pure:!1}),t})(),U=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[{provide:k,useClass:A}]}),t})();const q="browser";let z=(()=>{class t{}return t.\u0275prov=Object(r.Db)({token:t,providedIn:"root",factory:()=>new $(Object(r.Qb)(l),window,Object(r.Qb)(r.m))}),t})();class ${constructor(t,e,n){this.document=t,this.window=e,this.errorHandler=n,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(this.supportsScrolling()){const e=this.document.getElementById(t)||this.document.getElementsByName(t)[0];e&&this.scrollToElement(e)}}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),n=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(n-s[0],r-s[1])}supportScrollRestoration(){try{if(!this.window||!this.window.scrollTo)return!1;const t=B(this.window.history)||B(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(t){return!1}}supportsScrolling(){try{return!!this.window.scrollTo}catch(t){return!1}}}function B(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}},pLZG:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("7o/Q");function s(t,e){return function(n){return n.lift(new i(t,e))}}class i{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new o(t,this.predicate,this.thisArg))}}class o extends r.a{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}},quSY:function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n("DH7j"),s=n("XoHu"),i=n("n6bG");const o=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let a=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:a,_unsubscribe:c,_subscriptions:u}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;tt.concat(e instanceof o?e.errors:e),[])}},sVev:function(t,e,n){"use strict";n.d(e,"a",function(){return r});const r=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})()},sYmb:function(t,e,n){"use strict";n.d(e,"a",function(){return I}),n.d(e,"b",function(){return tt}),n.d(e,"c",function(){return Y}),n.d(e,"d",function(){return J});var r=n("fXoL"),s=n("LRne"),i=n("HDdC");function o(t){return!!t&&(t instanceof i.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var a=n("cp0P"),l=n("GyhO"),c=n("NXyV"),u=n("IzEk"),h=n("XNiG"),d=n("3N8a");class f extends d.a{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(t,e,n):t.flush(this)}}var p=n("IjjT");class g extends p.a{}const m=new g(f);var y=n("quSY"),b=n("7o/Q"),_=n("EY2u"),v=n("z6cu");let w=(()=>{class t{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(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()}}do(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()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return Object(s.a)(this.value);case"E":return Object(v.a)(this.error);case"C":return Object(_.b)()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})();class C extends b.a{constructor(t,e,n=0){super(t),this.scheduler=e,this.delay=n}static dispatch(t){const{notification:e,destination:n}=t;e.observe(n),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(C.dispatch,this.delay,new S(t,this.destination)))}_next(t){this.scheduleMessage(w.createNext(t))}_error(t){this.scheduleMessage(w.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(w.createComplete()),this.unsubscribe()}}class S{constructor(t,e){this.notification=t,this.destination=e}}var E=n("9ppp"),O=n("Ylt2");class x extends h.a{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n){super(),this.scheduler=n,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new T(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,n=e?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,s=n.length;let i;if(this.closed)throw new E.a;if(this.isStopped||this.hasError?i=y.a.EMPTY:(this.observers.push(t),i=new O.a(this,t)),r&&t.add(t=new C(t,r)),e)for(let o=0;oe&&(i=Math.max(i,s-e)),i>0&&r.splice(0,i),r}}class T{constructor(t,e){this.time=t,this.value=e}}function k(t,e,n){let r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},t=>t.lift(function({bufferSize:t=Number.POSITIVE_INFINITY,windowTime:e=Number.POSITIVE_INFINITY,refCount:n,scheduler:r}){let s,i,o=0,a=!1,l=!1;return function(c){let u;o++,!s||a?(a=!1,s=new x(t,e,r),u=s.subscribe(this),i=c.subscribe({next(t){s.next(t)},error(t){a=!0,s.error(t)},complete(){l=!0,i=void 0,s.complete()}})):u=s.subscribe(this),this.add(()=>{o--,u.unsubscribe(),i&&!l&&n&&0===o&&(i.unsubscribe(),i=void 0,s=void 0)})}}(r))}var A=n("lJxs"),j=n("bOdf"),P=n("eIep");class I{}let D=(()=>{class t extends I{getTranslation(t){return Object(s.a)({})}}return t.\u0275fac=function(e){return R(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const R=r.Ob(D);class N{}let L=(()=>{class t{handle(t){return t.key}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();function V(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;let n,r,s,i=typeof t;if(i==typeof e&&"object"==i){if(!Array.isArray(t)){if(Array.isArray(e))return!1;for(r in s=Object.create(null),t){if(!V(t[r],e[r]))return!1;s[r]=!0}for(r in e)if(!(r in s)&&void 0!==e[r])return!1;return!0}if(!Array.isArray(e))return!1;if((n=t.length)==e.length){for(r=0;r{F(e[r])?r in t?n[r]=H(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})}),n}class U{}let q=(()=>{class t extends U{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(t,e){let n;return n="string"==typeof t?this.interpolateString(t,e):"function"==typeof t?this.interpolateFunction(t,e):t,n}getValue(t,e){let n="string"==typeof e?e.split("."):[e];e="";do{e+=n.shift(),!M(t)||!M(t[e])||"object"!=typeof t[e]&&n.length?n.length?e+=".":t=void 0:(t=t[e],e="")}while(n.length);return t}interpolateFunction(t,e){return t(e)}interpolateString(t,e){return e?t.replace(this.templateMatcher,(t,n)=>{let r=this.getValue(e,n);return M(r)?r:t}):t}}return t.\u0275fac=function(e){return z(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const z=r.Ob(q);class ${}let B=(()=>{class t extends ${compile(t,e){return t}compileTranslations(t,e){return t}}return t.\u0275fac=function(e){return Q(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const Q=r.Ob(B);class W{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new r.n,this.onLangChange=new r.n,this.onDefaultLangChange=new r.n}}const K=new r.q("USE_STORE"),G=new r.q("USE_DEFAULT_LANG"),Z=new r.q("DEFAULT_LANGUAGE"),X=new r.q("USE_EXTEND");let J=(()=>{class t{constructor(t,e,n,s,i,o=!0,a=!1,l=!1,c){this.store=t,this.currentLoader=e,this.compiler=n,this.parser=s,this.missingTranslationHandler=i,this.useDefaultLang=o,this.isolate=a,this.extend=l,this.pending=!1,this._onTranslationChange=new r.n,this._onLangChange=new r.n,this._onDefaultLangChange=new r.n,this._langs=[],this._translations={},this._translationRequests={},c&&this.setDefaultLang(c)}get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(t){this.isolate?this._defaultLang=t:this.store.defaultLang=t}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(t){this.isolate?this._currentLang=t:this.store.currentLang=t}get langs(){return this.isolate?this._langs:this.store.langs}set langs(t){this.isolate?this._langs=t:this.store.langs=t}get translations(){return this.isolate?this._translations:this.store.translations}set translations(t){this.isolate?this._translations=t:this.store.translations=t}setDefaultLang(t){if(t===this.defaultLang)return;let e=this.retrieveTranslations(t);void 0!==e?(null==this.defaultLang&&(this.defaultLang=t),e.pipe(Object(u.a)(1)).subscribe(e=>{this.changeDefaultLang(t)})):this.changeDefaultLang(t)}getDefaultLang(){return this.defaultLang}use(t){if(t===this.currentLang)return Object(s.a)(this.translations[t]);let e=this.retrieveTranslations(t);return void 0!==e?(this.currentLang||(this.currentLang=t),e.pipe(Object(u.a)(1)).subscribe(e=>{this.changeLang(t)}),e):(this.changeLang(t),Object(s.a)(this.translations[t]))}retrieveTranslations(t){let e;return(void 0===this.translations[t]||this.extend)&&(this._translationRequests[t]=this._translationRequests[t]||this.getTranslation(t),e=this._translationRequests[t]),e}getTranslation(t){this.pending=!0;const e=this.currentLoader.getTranslation(t).pipe(k(1),Object(u.a)(1));return this.loadingTranslations=e.pipe(Object(A.a)(e=>this.compiler.compileTranslations(e,t)),k(1),Object(u.a)(1)),this.loadingTranslations.subscribe({next:e=>{this.translations[t]=this.extend&&this.translations[t]?Object.assign(Object.assign({},e),this.translations[t]):e,this.updateLangs(),this.pending=!1},error:t=>{this.pending=!1}}),e}setTranslation(t,e,n=!1){e=this.compiler.compileTranslations(e,t),this.translations[t]=(n||this.extend)&&this.translations[t]?H(this.translations[t],e):e,this.updateLangs(),this.onTranslationChange.emit({lang:t,translations:this.translations[t]})}getLangs(){return this.langs}addLangs(t){t.forEach(t=>{-1===this.langs.indexOf(t)&&this.langs.push(t)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(t,e,n){let r;if(e instanceof Array){let r={},i=!1;for(let s of e)r[s]=this.getParsedResult(t,s,n),o(r[s])&&(i=!0);if(i){const t=e.map(t=>o(r[t])?r[t]:Object(s.a)(r[t]));return Object(a.a)(t).pipe(Object(A.a)(t=>{let n={};return t.forEach((t,r)=>{n[e[r]]=t}),n}))}return r}if(t&&(r=this.parser.interpolate(this.parser.getValue(t,e),n)),void 0===r&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],e),n)),void 0===r){let t={key:e,translateService:this};void 0!==n&&(t.interpolateParams=n),r=this.missingTranslationHandler.handle(t)}return void 0!==r?r:e}get(t,e){if(!M(t)||!t.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(Object(j.a)(n=>o(n=this.getParsedResult(n,t,e))?n:Object(s.a)(n)));{let n=this.getParsedResult(this.translations[this.currentLang],t,e);return o(n)?n:Object(s.a)(n)}}getStreamOnTranslationChange(t,e){if(!M(t)||!t.length)throw new Error('Parameter "key" required');return Object(l.a)(Object(c.a)(()=>this.get(t,e)),this.onTranslationChange.pipe(Object(P.a)(n=>{const r=this.getParsedResult(n.translations,t,e);return"function"==typeof r.subscribe?r:Object(s.a)(r)})))}stream(t,e){if(!M(t)||!t.length)throw new Error('Parameter "key" required');return Object(l.a)(Object(c.a)(()=>this.get(t,e)),this.onLangChange.pipe(Object(P.a)(n=>{const r=this.getParsedResult(n.translations,t,e);return o(r)?r:Object(s.a)(r)})))}instant(t,e){if(!M(t)||!t.length)throw new Error('Parameter "key" required');let n=this.getParsedResult(this.translations[this.currentLang],t,e);if(o(n)){if(t instanceof Array){let e={};return t.forEach((n,r)=>{e[t[r]]=t[r]}),e}return t}return n}set(t,e,n=this.currentLang){this.translations[n][t]=this.compiler.compile(e,n),this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}changeLang(t){this.currentLang=t,this.onLangChange.emit({lang:t,translations:this.translations[t]}),null==this.defaultLang&&this.changeDefaultLang(t)}changeDefaultLang(t){this.defaultLang=t,this.onDefaultLangChange.emit({lang:t,translations:this.translations[t]})}reloadLang(t){return this.resetLang(t),this.getTranslation(t)}resetLang(t){this._translationRequests[t]=void 0,this.translations[t]=void 0}getBrowserLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,void 0!==t?(-1!==t.indexOf("-")&&(t=t.split("-")[0]),-1!==t.indexOf("_")&&(t=t.split("_")[0]),t):void 0}getBrowserCultureLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,t}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(W),r.Qb(I),r.Qb($),r.Qb(U),r.Qb(N),r.Qb(G),r.Qb(K),r.Qb(X),r.Qb(Z))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),Y=(()=>{class t{constructor(t,e){this.translate=t,this._ref=e,this.value=""}updateValue(t,e,n){let r=e=>{this.value=void 0!==e?e:t,this.lastKey=t,this._ref.markForCheck()};if(n){let s=this.translate.getParsedResult(n,t,e);o(s.subscribe)?s.subscribe(r):r(s)}this.translate.get(t,e).subscribe(r)}transform(t,...e){if(!t||!t.length)return t;if(V(t,this.lastKey)&&V(e,this.lastParams))return this.value;let n;if(M(e[0])&&e.length)if("string"==typeof e[0]&&e[0].length){let t=e[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{n=JSON.parse(t)}catch(r){throw new SyntaxError("Wrong parameter in TranslatePipe. Expected a valid Object, received: "+e[0])}}else"object"!=typeof e[0]||Array.isArray(e[0])||(n=e[0]);return this.lastKey=t,this.lastParams=e,this.updateValue(t,n),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(e=>{this.lastKey&&e.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(t,n,e.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(e=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,n,e.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,n))})),this.value}_dispose(){void 0!==this.onTranslationChange&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),void 0!==this.onLangChange&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),void 0!==this.onDefaultLangChange&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(J),r.Sb())},t.\u0275pipe=r.Gb({name:"translate",type:t,pure:!1}),t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),tt=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:I,useClass:D},e.compiler||{provide:$,useClass:B},e.parser||{provide:U,useClass:q},e.missingTranslationHandler||{provide:N,useClass:L},W,{provide:K,useValue:e.isolate},{provide:G,useValue:e.useDefaultLang},{provide:X,useValue:e.extend},{provide:Z,useValue:e.defaultLanguage},J]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:I,useClass:D},e.compiler||{provide:$,useClass:B},e.parser||{provide:U,useClass:q},e.missingTranslationHandler||{provide:N,useClass:L},{provide:K,useValue:e.isolate},{provide:G,useValue:e.useDefaultLang},{provide:X,useValue:e.extend},{provide:Z,useValue:e.defaultLanguage},J]}}}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)}}),t})()},"tk/3":function(t,e,n){"use strict";n.d(e,"a",function(){return k}),n.d(e,"b",function(){return x}),n.d(e,"c",function(){return U}),n.d(e,"d",function(){return E}),n.d(e,"e",function(){return S});var r=n("fXoL"),s=n("LRne"),i=n("HDdC"),o=n("bOdf"),a=n("pLZG"),l=n("lJxs"),c=n("ofXK");class u{}class h{}class d{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const n=t.slice(0,e),r=n.toLowerCase(),s=t.slice(e+1).trim();this.maybeSetNormalizedName(n,r),this.headers.has(r)?this.headers.get(r).push(s):this.headers.set(r,[s])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let n=t[e];const r=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(r,n),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof d?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new d;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof d?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...n),this.headers.set(e,r);break;case"d":const s=t.value;if(s){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===s.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class f{encodeKey(t){return p(t)}encodeValue(t){return p(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function p(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,"/")}class g{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new f,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.split("&").forEach(t=>{const r=t.indexOf("="),[s,i]=-1==r?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,r)),e.decodeValue(t.slice(r+1))],o=n.get(s)||[];o.push(i),n.set(s,o)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new g({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat([t]),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const n=e.indexOf(t.value);-1!==n&&e.splice(n,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}function m(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function y(t){return"undefined"!=typeof Blob&&t instanceof Blob}function b(t){return"undefined"!=typeof FormData&&t instanceof FormData}class _{constructor(t,e,n,r){let s;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.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!==n?n:null,s=r):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.params&&(this.params=s.params)),this.headers||(this.headers=new d),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const n=e.indexOf("?");this.urlWithParams=e+(-1===n?"?":ne.set(n,t.setHeaders[n]),a)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,n)=>e.set(n,t.setParams[n]),l)),new _(e,n,s,{params:l,headers:a,reportProgress:o,responseType:r,withCredentials:i})}}var v=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({});class w{constructor(t,e=200,n="OK"){this.headers=t.headers||new d,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class C extends w{constructor(t={}){super(t),this.type=v.ResponseHeader}clone(t={}){return new C({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})}}class S extends w{constructor(t={}){super(t),this.type=v.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new S({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})}}class E extends w{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?"Http failure during parsing for "+(t.url||"(unknown url)"):`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function O(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let x=(()=>{class t{constructor(t){this.handler=t}request(t,e,n={}){let r;if(t instanceof _)r=t;else{let s=void 0;s=n.headers instanceof d?n.headers:new d(n.headers);let i=void 0;n.params&&(i=n.params instanceof g?n.params:new g({fromObject:n.params})),r=new _(t,e,void 0!==n.body?n.body:null,{headers:s,params:i,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const i=Object(s.a)(r).pipe(Object(o.a)(t=>this.handler.handle(t)));if(t instanceof _||"events"===n.observe)return i;const c=i.pipe(Object(a.a)(t=>t instanceof S));switch(n.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return c.pipe(Object(l.a)(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return c.pipe(Object(l.a)(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return c.pipe(Object(l.a)(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return c.pipe(Object(l.a)(t=>t.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new g).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,n={}){return this.request("PATCH",t,O(n,e))}post(t,e,n={}){return this.request("POST",t,O(n,e))}put(t,e,n={}){return this.request("PUT",t,O(n,e))}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(u))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();class T{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const k=new r.q("HTTP_INTERCEPTORS");let A=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const j=/^\)\]\}',?\n/;class P{}let I=(()=>{class t{constructor(){}build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),D=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new i.a(e=>{const n=this.xhrFactory.build();if(n.open(t.method,t.urlWithParams),t.withCredentials&&(n.withCredentials=!0),t.headers.forEach((t,e)=>n.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&n.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();n.responseType="json"!==e?e:"text"}const r=t.serializeBody();let s=null;const i=()=>{if(null!==s)return s;const e=1223===n.status?204:n.status,r=n.statusText||"OK",i=new d(n.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}(n)||t.url;return s=new C({headers:i,status:e,statusText:r,url:o}),s},o=()=>{let{headers:r,status:s,statusText:o,url:a}=i(),l=null;204!==s&&(l=void 0===n.response?n.responseText:n.response),0===s&&(s=l?200:0);let c=s>=200&&s<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(j,"");try{l=""!==l?JSON.parse(l):null}catch(u){l=t,c&&(c=!1,l={error:u,text:l})}}c?(e.next(new S({body:l,headers:r,status:s,statusText:o,url:a||void 0})),e.complete()):e.error(new E({error:l,headers:r,status:s,statusText:o,url:a||void 0}))},a=t=>{const{url:r}=i(),s=new E({error:t,status:n.status||0,statusText:n.statusText||"Unknown Error",url:r||void 0});e.error(s)};let l=!1;const c=r=>{l||(e.next(i()),l=!0);let s={type:v.DownloadProgress,loaded:r.loaded};r.lengthComputable&&(s.total=r.total),"text"===t.responseType&&n.responseText&&(s.partialText=n.responseText),e.next(s)},u=t=>{let n={type:v.UploadProgress,loaded:t.loaded};t.lengthComputable&&(n.total=t.total),e.next(n)};return n.addEventListener("load",o),n.addEventListener("error",a),t.reportProgress&&(n.addEventListener("progress",c),null!==r&&n.upload&&n.upload.addEventListener("progress",u)),n.send(r),e.next({type:v.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("load",o),t.reportProgress&&(n.removeEventListener("progress",c),null!==r&&n.upload&&n.upload.removeEventListener("progress",u)),n.readyState!==n.DONE&&n.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(P))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const R=new r.q("XSRF_COOKIE_NAME"),N=new r.q("XSRF_HEADER_NAME");class L{}let V=(()=>{class t{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Object(c.t)(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(c.c),r.Qb(r.B),r.Qb(R))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),M=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const r=this.tokenService.getToken();return null===r||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,r)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(L),r.Qb(N))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),F=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(k,[]);this.chain=t.reduceRight((t,e)=>new T(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(h),r.Qb(r.r))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),H=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:M,useClass:A}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:R,useValue:e.cookieName}:[],e.headerName?{provide:N,useValue:e.headerName}:[]]}}}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[M,{provide:k,useExisting:M,multi:!0},{provide:L,useClass:V},{provide:R,useValue:"XSRF-TOKEN"},{provide:N,useValue:"X-XSRF-TOKEN"}]}),t})(),U=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[x,{provide:u,useClass:F},D,{provide:h,useExisting:D},I,{provide:P,useExisting:I}],imports:[[H.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})()},tyNb:function(t,e,n){"use strict";n.d(e,"a",function(){return Cn}),n.d(e,"b",function(){return xn}),n.d(e,"c",function(){return En}),n.d(e,"d",function(){return Vn}),n.d(e,"e",function(){return Tn});var r=n("ofXK"),s=n("fXoL"),i=n("LRne"),o=n("Cfvw"),a=n("2Vo4"),l=n("z+Ro"),c=n("DH7j"),u=n("7o/Q");class h extends u.a{notifyNext(t,e,n,r,s){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class d extends u.a{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}var f=n("SeVD"),p=n("HDdC");function g(t,e,n,r,s=new d(t,n,r)){if(!s.closed)return e instanceof p.a?e.subscribe(s):Object(f.a)(e)(s)}var m=n("yCtX");const y={};class b{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new _(t,this.resultSelector))}}class _ extends h{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(y),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n0){const n=this.count>=this.total?this.total:this.count,r=this.ring;for(let s=0;st.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||r.lengthr[e]===t)}return t===e}function vt(t){return Array.prototype.concat.apply([],t)}function wt(t){return t.length>0?t[t.length-1]:null}function Ct(t,e){for(const n in t)t.hasOwnProperty(n)&&e(t[n],n)}function St(t){return Object(s.ob)(t)?t:Object(s.pb)(t)?Object(o.a)(Promise.resolve(t)):Object(i.a)(t)}function Et(t,e,n){return n?function(t,e){return bt(t,e)}(t.queryParams,e.queryParams)&&Ot(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>_t(t[n],e[n]))}(t.queryParams,e.queryParams)&&xt(t.root,e.root)}function Ot(t,e){if(!Pt(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(const n in e.children){if(!t.children[n])return!1;if(!Ot(t.children[n],e.children[n]))return!1}return!0}function xt(t,e){return Tt(t,e,e.segments)}function Tt(t,e,n){if(t.segments.length>n.length)return!!Pt(t.segments.slice(0,n.length),n)&&!e.hasChildren();if(t.segments.length===n.length){if(!Pt(t.segments,n))return!1;for(const n in e.children){if(!t.children[n])return!1;if(!xt(t.children[n],e.children[n]))return!1}return!0}{const r=n.slice(0,t.segments.length),s=n.slice(t.segments.length);return!!Pt(t.segments,r)&&!!t.children.primary&&Tt(t.children.primary,e,s)}}class kt{constructor(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=gt(this.queryParams)),this._queryParamMap}toString(){return Nt.serialize(this)}}class At{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Ct(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Lt(this)}}class jt{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=gt(this.parameters)),this._parameterMap}toString(){return zt(this)}}function Pt(t,e){return t.length===e.length&&t.every((t,n)=>t.path===e[n].path)}function It(t,e){let n=[];return Ct(t.children,(t,r)=>{"primary"===r&&(n=n.concat(e(t,r)))}),Ct(t.children,(t,r)=>{"primary"!==r&&(n=n.concat(e(t,r)))}),n}class Dt{}class Rt{parse(t){const e=new Kt(t);return new kt(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){return`${"/"+Vt(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(t=>`${Ft(e)}=${Ft(t)}`).join("&"):`${Ft(e)}=${Ft(n)}`});return e.length?"?"+e.join("&"):""}(t.queryParams)}${"string"==typeof t.fragment?"#"+encodeURI(t.fragment):""}`}}const Nt=new Rt;function Lt(t){return t.segments.map(t=>zt(t)).join("/")}function Vt(t,e){if(!t.hasChildren())return Lt(t);if(e){const e=t.children.primary?Vt(t.children.primary,!1):"",n=[];return Ct(t.children,(t,e)=>{"primary"!==e&&n.push(`${e}:${Vt(t,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=It(t,(e,n)=>"primary"===n?[Vt(t.children.primary,!1)]:[`${n}:${Vt(e,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children.primary?`${Lt(t)}/${e[0]}`:`${Lt(t)}/(${e.join("//")})`}}function Mt(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Ft(t){return Mt(t).replace(/%3B/gi,";")}function Ht(t){return Mt(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Ut(t){return decodeURIComponent(t)}function qt(t){return Ut(t.replace(/\+/g,"%20"))}function zt(t){return`${Ht(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${Ht(t)}=${Ht(e[t])}`).join("")}`;var e}const $t=/^[^\/()?;=#]+/;function Bt(t){const e=t.match($t);return e?e[0]:""}const Qt=/^[^=?&#]+/,Wt=/^[^?&#]+/;class Kt{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new At([],{}):new At([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new At(t,e)),n}parseSegment(){const t=Bt(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new jt(Ut(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Bt(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=Bt(this.remaining);t&&(n=t,this.capture(n))}t[Ut(e)]=Ut(n)}parseQueryParam(t){const e=function(t){const e=t.match(Qt);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(Wt);return e?e[0]:""}(this.remaining);t&&(n=t,this.capture(n))}const r=qt(e),s=qt(n);if(t.hasOwnProperty(r)){let e=t[r];Array.isArray(e)||(e=[e],t[r]=e),e.push(s)}else t[r]=s}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=Bt(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error(`Cannot parse url '${this.url}'`);let s=void 0;n.indexOf(":")>-1?(s=n.substr(0,n.indexOf(":")),this.capture(s),this.capture(":")):t&&(s="primary");const i=this.parseChildren();e[s]=1===Object.keys(i).length?i.primary:new At([],i),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class Gt{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=Zt(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=Zt(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=Xt(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return Xt(t,this._root).map(t=>t.value)}}function Zt(t,e){if(t===e.value)return e;for(const n of e.children){const e=Zt(t,n);if(e)return e}return null}function Xt(t,e){if(t===e.value)return[e];for(const n of e.children){const r=Xt(t,n);if(r.length)return r.unshift(e),r}return[]}class Jt{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function Yt(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e}class te extends Gt{constructor(t,e){super(t),this.snapshot=e,oe(this,t)}toString(){return this.snapshot.toString()}}function ee(t,e){const n=function(t,e){const n=new se([],{},{},"",{},"primary",e,null,t.root,-1,{});return new ie("",new Jt(n,[]))}(t,e),r=new a.a([new jt("",{})]),s=new a.a({}),i=new a.a({}),o=new a.a({}),l=new a.a(""),c=new ne(r,s,o,l,i,"primary",e,n.root);return c.snapshot=n.root,new te(new Jt(c,[]),n)}class ne{constructor(t,e,n,r,s,i,o,a){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=i,this.component=o,this._futureSnapshot=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(Object(E.a)(t=>gt(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Object(E.a)(t=>gt(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function re(t,e="emptyOnly"){const n=t.pathFromRoot;let r=0;if("always"!==e)for(r=n.length-1;r>=1;){const t=n[r],e=n[r-1];if(t.routeConfig&&""===t.routeConfig.path)r--;else{if(e.component)break;r--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(n.slice(r))}class se{constructor(t,e,n,r,s,i,o,a,l,c,u){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=i,this.component=o,this.routeConfig=a,this._urlSegment=l,this._lastPathIndex=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=gt(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=gt(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class ie extends Gt{constructor(t,e){super(e),this.url=t,oe(this,e)}toString(){return ae(this._root)}}function oe(t,e){e.value._routerState=t,e.children.forEach(e=>oe(t,e))}function ae(t){const e=t.children.length>0?` { ${t.children.map(ae).join(", ")} } `:"";return`${t.value}${e}`}function le(t){if(t.snapshot){const e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,bt(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),bt(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(let n=0;nbt(t.parameters,r[e].parameters))&&!(!t.parent!=!e.parent)&&(!t.parent||ce(t.parent,e.parent))}function ue(t,e,n){if(n&&t.shouldReuseRoute(e.value,n.value.snapshot)){const r=n.value;r._futureSnapshot=e.value;const s=function(t,e,n){return e.children.map(e=>{for(const r of n.children)if(t.shouldReuseRoute(e.value,r.value.snapshot))return ue(t,e,r);return ue(t,e)})}(t,e,n);return new Jt(r,s)}{const n=t.retrieve(e.value);if(n){const t=n.route;return he(e,t),t}{const n=new ne(new a.a((r=e.value).url),new a.a(r.params),new a.a(r.queryParams),new a.a(r.fragment),new a.a(r.data),r.outlet,r.component,r),s=e.children.map(e=>ue(t,e));return new Jt(n,s)}}var r}function he(t,e){if(t.value.routeConfig!==e.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==e.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");e.value._futureSnapshot=t.value;for(let n=0;n{i[e]=Array.isArray(t)?t.map(t=>""+t):""+t}),new kt(n.root===t?e:ge(n.root,t,e),i,s)}function ge(t,e,n){const r={};return Ct(t.children,(t,s)=>{r[s]=t===e?n:ge(t,e,n)}),new At(t.segments,r)}class me{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&de(n[0]))throw new Error("Root segment cannot have matrix parameters");const r=n.find(fe);if(r&&r!==wt(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ye{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function be(t,e,n){if(t||(t=new At([],{})),0===t.segments.length&&t.hasChildren())return _e(t,e,n);const r=function(t,e,n){let r=0,s=e;const i={match:!1,pathIndex:0,commandIndex:0};for(;s=n.length)return i;const e=t.segments[s],o=n[r];if(fe(o))break;const a=""+o,l=r0&&void 0===a)break;if(a&&l&&"object"==typeof l&&void 0===l.outlets){if(!Se(a,l,e))return i;r+=2}else{if(!Se(a,{},e))return i;r++}s++}return{match:!0,pathIndex:s,commandIndex:r}}(t,e,n),s=n.slice(r.commandIndex);if(r.match&&r.pathIndex{null!==n&&(s[r]=be(t.children[r],e,n))}),Ct(t.children,(t,e)=>{void 0===r[e]&&(s[e]=t)}),new At(t.segments,s)}}function ve(t,e,n){const r=t.segments.slice(0,e);let s=0;for(;s{null!==t&&(e[n]=ve(new At([],{}),0,t))}),e}function Ce(t){const e={};return Ct(t,(t,n)=>e[n]=""+t),e}function Se(t,e,n){return t==n.path&&bt(e,n.parameters)}class Ee{constructor(t,e,n,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=r}activate(t){const e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),le(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const r=Yt(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,r[e],n),delete r[e]}),Ct(r,(t,e)=>{this.deactivateRouteAndItsChildren(t,n)})}deactivateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(r===s)if(r.component){const s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,n);else s&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const n=e.getContext(t.value.outlet);if(n&&n.outlet){const e=n.outlet.detach(),r=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:r})}}deactivateRouteAndOutlet(t,e){const n=e.getContext(t.value.outlet);if(n){const r=Yt(t),s=t.value.component?n.children:e;Ct(r,(t,e)=>this.deactivateRouteAndItsChildren(t,s)),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}}activateChildRoutes(t,e,n){const r=Yt(e);t.children.forEach(t=>{this.activateRoutes(t,r[t.value.outlet],n),this.forwardEvent(new dt(t.value.snapshot))}),t.children.length&&this.forwardEvent(new ut(t.value.snapshot))}activateRoutes(t,e,n){const r=t.value,s=e?e.value:null;if(le(r),r===s)if(r.component){const s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,n);else if(r.component){const e=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const t=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),Oe(t.route)}else{const n=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(r.snapshot),s=n?n.module.componentFactoryResolver:null;e.attachRef=null,e.route=r,e.resolver=s,e.outlet&&e.outlet.activateWith(r,s),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,n)}}function Oe(t){le(t.value),t.children.forEach(Oe)}class xe{constructor(t,e){this.routes=t,this.module=e}}function Te(t){return"function"==typeof t}function ke(t){return t instanceof kt}const Ae=Symbol("INITIAL_VALUE");function je(){return Object(R.a)(t=>function(...t){let e=void 0,n=void 0;return Object(l.a)(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&Object(c.a)(t[0])&&(t=t[0]),Object(m.a)(t,n).lift(new b(e))}(...t.map(t=>t.pipe(Object(N.a)(1),function(...t){const e=t[t.length-1];return Object(l.a)(e)?(t.pop(),n=>Object(L.a)(t,n,e)):e=>Object(L.a)(t,e)}(Ae)))).pipe(function(t,e){let n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new V(t,e,n))}}((t,e)=>{let n=!1;return e.reduce((t,r,s)=>{if(t!==Ae)return t;if(r===Ae&&(n=!0),!n){if(!1===r)return r;if(s===e.length-1||ke(r))return r}return t},t)},Ae),Object(x.a)(t=>t!==Ae),Object(E.a)(t=>ke(t)?t:!0===t),Object(N.a)(1)))}let Pe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Bb({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&s.Ib(0,"router-outlet")},directives:function(){return[Tn]},encapsulation:2}),t})();function Ie(t,e=""){for(let n=0;ne.error(new Ve(t)))}function He(t){return new p.a(e=>e.error(new Me(t)))}function Ue(t){return new p.a(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class qe{constructor(t,e,n,r,i){this.configLoader=e,this.urlSerializer=n,this.urlTree=r,this.config=i,this.allowRedirects=!0,this.ngModule=t.get(s.x)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(Object(E.a)(t=>this.createUrlTree(t,this.urlTree.queryParams,this.urlTree.fragment))).pipe(H(t=>{if(t instanceof Me)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof Ve)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(Object(E.a)(e=>this.createUrlTree(e,t.queryParams,t.fragment))).pipe(H(t=>{if(t instanceof Ve)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,n){const r=t.segments.length>0?new At([],{primary:t}):t;return new kt(r,e,n)}expandSegmentGroup(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(Object(E.a)(t=>new At([],t))):this.expandSegment(t,n,e,n.segments,r,!0)}expandChildren(t,e,n){return function(t,e){if(0===Object.keys(t).length)return Object(i.a)({});const n=[],r=[],s={};return Ct(t,(t,i)=>{const o=e(i,t).pipe(Object(E.a)(t=>s[i]=t));"primary"===i?n.push(o):r.push(o)}),i.a.apply(null,n.concat(r)).pipe(Object(O.a)(),function(t,e){const n=arguments.length>=2;return r=>r.pipe(t?Object(x.a)((e,n)=>t(e,n,r)):D.a,k(1),n?Object(I.a)(e):Object(P.a)(()=>new v.a))}(),Object(E.a)(()=>s))}(n.children,(n,r)=>this.expandSegmentGroup(t,e,r,n))}expandSegment(t,e,n,r,s,a){const l=function(t){return t.reduce((t,e)=>{const n=Le(e);return t.has(n)?t.get(n).push(e):t.set(n,[e]),t},new Map)}(n);l.has(s)||l.set(s,[]);const c=n=>Object(o.a)(n).pipe(Object(z.a)(o=>this.expandSegmentAgainstRoute(t,e,n,o,r,s,a).pipe(H(t=>{if(t instanceof Ve)return Object(i.a)(null);throw t}))),Object($.a)(t=>null!==t),H(t=>{if(t instanceof v.a||"EmptyError"===t.name){if(this.noLeftoversInUrl(e,r,s))return Object(i.a)(new At([],{}));throw new Ve(e)}throw t})),u=Array.from(l.entries()).map(([t,e])=>{const n=c(e);return t===s?n:n.pipe(Object(E.a)(()=>null),H(()=>Object(i.a)(null)))});return Object(o.a)(u).pipe(t=>t.lift(new b(void 0)),Object($.a)(),Object(E.a)(t=>t.find(t=>null!==t)))}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}expandSegmentAgainstRoute(t,e,n,r,s,i,o){return Le(r)!==i&&""!==r.path?Fe(e):void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,s):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i):Fe(e)}expandSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,r,i):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,n,r){const s=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?He(s):this.lineralizeSegments(n,s).pipe(Object(B.a)(n=>{const s=new At(n,{});return this.expandSegment(t,s,e,n,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,s,i){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:c}=ze(e,r,s);if(!o)return Fe(e);const u=this.applyRedirectCommands(a,r.redirectTo,c);return r.redirectTo.startsWith("/")?He(u):this.lineralizeSegments(r,u).pipe(Object(B.a)(r=>this.expandSegment(t,e,n,r.concat(s.slice(l)),i,!1)))}matchSegmentAgainstRoute(t,e,n,r){if("**"===n.path)return n.loadChildren?this.configLoader.load(t.injector,n).pipe(Object(E.a)(t=>(n._loadedConfig=t,new At(r,{})))):Object(i.a)(new At(r,{}));const{matched:s,consumedSegments:o,lastChild:a}=ze(e,n,r);if(!s)return Fe(e);const l=r.slice(a);return this.getChildConfig(t,n,r).pipe(Object(B.a)(t=>{const n=t.module,r=t.routes,{segmentGroup:s,slicedSegments:a}=function(t,e,n,r){return n.length>0&&function(t,e,n){return n.some(n=>Be(t,e,n)&&"primary"!==Le(n))}(t,n,r)?{segmentGroup:$e(new At(e,function(t,e){const n={};n.primary=e;for(const r of t)""===r.path&&"primary"!==Le(r)&&(n[Le(r)]=new At([],{}));return n}(r,new At(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return n.some(n=>Be(t,e,n))}(t,n,r)?{segmentGroup:$e(new At(t.segments,function(t,e,n,r){const s={};for(const i of n)Be(t,e,i)&&!r[Le(i)]&&(s[Le(i)]=new At([],{}));return Object.assign(Object.assign({},r),s)}(t,n,r,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,o,l,r);return 0===a.length&&s.hasChildren()?this.expandChildren(n,r,s).pipe(Object(E.a)(t=>new At(o,t))):0===r.length&&0===a.length?Object(i.a)(new At(o,{})):this.expandSegment(n,s,r,a,"primary",!0).pipe(Object(E.a)(t=>new At(o.concat(t.segments),t.children)))}))}getChildConfig(t,e,n){return e.children?Object(i.a)(new xe(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Object(i.a)(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(Object(B.a)(n=>n?this.configLoader.load(t.injector,e).pipe(Object(E.a)(t=>(e._loadedConfig=t,t))):function(t){return new p.a(e=>e.error(mt(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):Object(i.a)(new xe([],t))}runCanLoadGuards(t,e,n){const r=e.canLoad;if(!r||0===r.length)return Object(i.a)(!0);const s=r.map(r=>{const s=t.get(r);let i;if(function(t){return t&&Te(t.canLoad)}(s))i=s.canLoad(e,n);else{if(!Te(s))throw new Error("Invalid CanLoad guard");i=s(e,n)}return St(i)});return Object(i.a)(s).pipe(je(),Object(Q.a)(t=>{if(!ke(t))return;const e=mt(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),Object(E.a)(t=>!0===t))}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return Object(i.a)(n);if(r.numberOfChildren>1||!r.children.primary)return Ue(t.redirectTo);r=r.children.primary}}applyRedirectCommands(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}applyRedirectCreatreUrlTree(t,e,n,r){const s=this.createSegmentGroup(t,e.root,n,r);return new kt(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return Ct(t,(t,r)=>{if("string"==typeof t&&t.startsWith(":")){const s=t.substring(1);n[r]=e[s]}else n[r]=t}),n}createSegmentGroup(t,e,n,r){const s=this.createSegments(t,e.segments,n,r);let i={};return Ct(e.children,(e,s)=>{i[s]=this.createSegmentGroup(t,e,n,r)}),new At(s,i)}createSegments(t,e,n,r){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,r):this.findOrReturn(e,n))}findPosParam(t,e,n){const r=n[e.path.substring(1)];if(!r)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return r}findOrReturn(t,e){let n=0;for(const r of e){if(r.path===t.path)return e.splice(n),r;n++}return t}}function ze(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const r=(e.matcher||yt)(n,t,e);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function $e(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new At(t.segments.concat(e.segments),e.children)}return t}function Be(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}class Qe{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class We{constructor(t,e){this.component=t,this.route=e}}function Ke(t,e,n){const r=t._root;return Ze(r,e?e._root:null,n,[r.value])}function Ge(t,e,n){const r=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(r?r.module.injector:n).get(t)}function Ze(t,e,n,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const i=Yt(e);return t.children.forEach(t=>{!function(t,e,n,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const i=t.value,o=e?e.value:null,a=n?n.getContext(t.value.outlet):null;if(o&&i.routeConfig===o.routeConfig){const l=function(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!Pt(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Pt(t.url,e.url)||!bt(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ce(t,e)||!bt(t.queryParams,e.queryParams);case"paramsChange":default:return!ce(t,e)}}(o,i,i.routeConfig.runGuardsAndResolvers);l?s.canActivateChecks.push(new Qe(r)):(i.data=o.data,i._resolvedData=o._resolvedData),Ze(t,e,i.component?a?a.children:null:n,r,s),l&&a&&a.outlet&&a.outlet.isActivated&&s.canDeactivateChecks.push(new We(a.outlet.component,o))}else o&&Xe(e,a,s),s.canActivateChecks.push(new Qe(r)),Ze(t,null,i.component?a?a.children:null:n,r,s)}(t,i[t.value.outlet],n,r.concat([t.value]),s),delete i[t.value.outlet]}),Ct(i,(t,e)=>Xe(t,n.getContext(e),s)),s}function Xe(t,e,n){const r=Yt(t),s=t.value;Ct(r,(t,r)=>{Xe(t,s.component?e?e.children.getContext(r):null:e,n)}),n.canDeactivateChecks.push(new We(s.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,s))}function Je(t,e){return null!==t&&e&&e(new ht(t)),Object(i.a)(!0)}function Ye(t,e){return null!==t&&e&&e(new ct(t)),Object(i.a)(!0)}function tn(t,e,n){const r=e.routeConfig?e.routeConfig.canActivate:null;if(!r||0===r.length)return Object(i.a)(!0);const s=r.map(r=>Object(w.a)(()=>{const s=Ge(r,e,n);let i;if(function(t){return t&&Te(t.canActivate)}(s))i=St(s.canActivate(e,t));else{if(!Te(s))throw new Error("Invalid CanActivate guard");i=St(s(e,t))}return i.pipe(Object($.a)())}));return Object(i.a)(s).pipe(je())}function en(t,e,n){const r=e[e.length-1],s=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>Object(w.a)(()=>{const s=e.guards.map(s=>{const i=Ge(s,e.node,n);let o;if(function(t){return t&&Te(t.canActivateChild)}(i))o=St(i.canActivateChild(r,t));else{if(!Te(i))throw new Error("Invalid CanActivateChild guard");o=St(i(r,t))}return o.pipe(Object($.a)())});return Object(i.a)(s).pipe(je())}));return Object(i.a)(s).pipe(je())}class nn{}class rn{constructor(t,e,n,r,s,i){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=r,this.paramsInheritanceStrategy=s,this.relativeLinkResolution=i}recognize(){try{const t=an(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary"),n=new se([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Jt(n,e),s=new ie(this.url,r);return this.inheritParamsAndData(s._root),Object(i.a)(s)}catch(t){return new p.a(e=>e.error(t))}}inheritParamsAndData(t){const e=t.value,n=re(e,this.paramsInheritanceStrategy);e.params=Object.freeze(n.params),e.data=Object.freeze(n.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}processChildren(t,e){const n=It(e,(e,n)=>this.processSegmentGroup(t,e,n));return function(t){const e={};t.forEach(t=>{const n=e[t.value.outlet];if(n){const e=n.url.map(t=>t.toString()).join("/"),r=t.value.url.map(t=>t.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${e}' and '${r}'.`)}e[t.value.outlet]=t.value})}(n),n.sort((t,e)=>"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)),n}processSegment(t,e,n,r){for(const i of t)try{return this.processSegmentAgainstRoute(i,e,n,r)}catch(s){if(!(s instanceof nn))throw s}if(this.noLeftoversInUrl(e,n,r))return[];throw new nn}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}processSegmentAgainstRoute(t,e,n,r){if(t.redirectTo)throw new nn;if((t.outlet||"primary")!==r)throw new nn;let s,i=[],o=[];if("**"===t.path){const i=n.length>0?wt(n).parameters:{};s=new se(n,i,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,un(t),r,t.component,t,sn(e),on(e)+n.length,hn(t))}else{const a=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new nn;return{consumedSegments:[],lastChild:0,parameters:{}}}const r=(e.matcher||yt)(n,t,e);if(!r)throw new nn;const s={};Ct(r.posParams,(t,e)=>{s[e]=t.path});const i=r.consumed.length>0?Object.assign(Object.assign({},s),r.consumed[r.consumed.length-1].parameters):s;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:i}}(e,t,n);i=a.consumedSegments,o=n.slice(a.lastChild),s=new se(i,a.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,un(t),r,t.component,t,sn(e),on(e)+i.length,hn(t))}const a=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),{segmentGroup:l,slicedSegments:c}=an(e,i,o,a,this.relativeLinkResolution);if(0===c.length&&l.hasChildren()){const t=this.processChildren(a,l);return[new Jt(s,t)]}if(0===a.length&&0===c.length)return[new Jt(s,[])];const u=this.processSegment(a,l,c,"primary");return[new Jt(s,u)]}}function sn(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function on(t){let e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,n+=e._segmentIndexShift?e._segmentIndexShift:0;return n-1}function an(t,e,n,r,s){if(n.length>0&&function(t,e,n){return n.some(n=>ln(t,e,n)&&"primary"!==cn(n))}(t,n,r)){const s=new At(e,function(t,e,n,r){const s={};s.primary=r,r._sourceSegment=t,r._segmentIndexShift=e.length;for(const i of n)if(""===i.path&&"primary"!==cn(i)){const n=new At([],{});n._sourceSegment=t,n._segmentIndexShift=e.length,s[cn(i)]=n}return s}(t,e,r,new At(n,t.children)));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return n.some(n=>ln(t,e,n))}(t,n,r)){const i=new At(t.segments,function(t,e,n,r,s,i){const o={};for(const a of r)if(ln(t,n,a)&&!s[cn(a)]){const n=new At([],{});n._sourceSegment=t,n._segmentIndexShift="legacy"===i?t.segments.length:e.length,o[cn(a)]=n}return Object.assign(Object.assign({},s),o)}(t,e,n,r,t.children,s));return i._sourceSegment=t,i._segmentIndexShift=e.length,{segmentGroup:i,slicedSegments:n}}const i=new At(t.segments,t.children);return i._sourceSegment=t,i._segmentIndexShift=e.length,{segmentGroup:i,slicedSegments:n}}function ln(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function cn(t){return t.outlet||"primary"}function un(t){return t.data||{}}function hn(t){return t.resolve||{}}function dn(t){return function(e){return e.pipe(Object(R.a)(e=>{const n=t(e);return n?Object(o.a)(n).pipe(Object(E.a)(()=>e)):Object(o.a)([e])}))}}class fn extends class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}const pn=new s.q("ROUTES");class gn{constructor(t,e,n,r){this.loader=t,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=r}load(t,e){return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(Object(E.a)(n=>{this.onLoadEndListener&&this.onLoadEndListener(e);const r=n.create(t);return new xe(vt(r.injector.get(pn)).map(Ne),r)}))}loadModuleFactory(t){return"string"==typeof t?Object(o.a)(this.loader.load(t)):St(t()).pipe(Object(B.a)(t=>t instanceof s.v?Object(i.a)(t):Object(o.a)(this.compiler.compileModuleAsync(t))))}}class mn{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new yn,this.attachRef=null}}class yn{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new mn,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}class bn{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function _n(t){throw t}function vn(t,e,n){return e.parse("/")}function wn(t,e){return Object(i.a)(null)}let Cn=(()=>{class t{constructor(t,e,n,r,i,o,l,c){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=r,this.config=c,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new S.a,this.errorHandler=_n,this.malformedUriErrorHandler=vn,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:wn,afterPreactivation:wn},this.urlHandlingStrategy=new bn,this.routeReuseStrategy=new fn,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=i.get(s.x),this.console=i.get(s.W);const u=i.get(s.z);this.isNgZoneEnabled=u instanceof s.z,this.resetConfig(c),this.currentUrlTree=new kt(new At([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new gn(o,l,t=>this.triggerEvent(new at(t)),t=>this.triggerEvent(new lt(t))),this.routerState=ee(this.currentUrlTree,this.rootComponentType),this.transitions=new a.a({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(t){const e=this.events;return t.pipe(Object(x.a)(t=>0!==t.id),Object(E.a)(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),Object(R.a)(t=>{let n=!1,r=!1;return Object(i.a)(t).pipe(Object(Q.a)(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Object(R.a)(t=>{const n=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Object(i.a)(t).pipe(Object(R.a)(t=>{const n=this.transitions.getValue();return e.next(new J(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),n!==this.transitions.getValue()?C.a:[t]}),Object(R.a)(t=>Promise.resolve(t)),(r=this.ngModule.injector,s=this.configLoader,o=this.urlSerializer,a=this.config,function(t){return t.pipe(Object(R.a)(t=>function(t,e,n,r,s){return new qe(t,e,n,r,s).apply()}(r,s,o,t.extractedUrl,a).pipe(Object(E.a)(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e})))))}),Object(Q.a)(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,n,r,s){return function(i){return i.pipe(Object(B.a)(i=>function(t,e,n,r,s="emptyOnly",i="legacy"){return new rn(t,e,n,r,s,i).recognize()}(t,e,i.urlAfterRedirects,n(i.urlAfterRedirects),r,s).pipe(Object(E.a)(t=>Object.assign(Object.assign({},i),{targetSnapshot:t})))))}}(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),Object(Q.a)(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),Object(Q.a)(t=>{const n=new nt(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(n)}));var r,s,o,a;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:r,source:s,restoredState:o,extras:a}=t,l=new J(n,this.serializeUrl(r),s,o);e.next(l);const c=ee(r,this.rootComponentType).snapshot;return Object(i.a)(Object.assign(Object.assign({},t),{targetSnapshot:c,urlAfterRedirects:r,extras:Object.assign(Object.assign({},a),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),C.a}),dn(t=>{const{targetSnapshot:e,id:n,extractedUrl:r,rawUrl:s,extras:{skipLocationChange:i,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:n,appliedUrlTree:r,rawUrlTree:s,skipLocationChange:!!i,replaceUrl:!!o})}),Object(Q.a)(t=>{const e=new rt(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Object(E.a)(t=>Object.assign(Object.assign({},t),{guards:Ke(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return function(n){return n.pipe(Object(B.a)(n=>{const{targetSnapshot:r,currentSnapshot:s,guards:{canActivateChecks:a,canDeactivateChecks:l}}=n;return 0===l.length&&0===a.length?Object(i.a)(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,r){return Object(o.a)(t).pipe(Object(B.a)(t=>function(t,e,n,r,s){const o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||0===o.length)return Object(i.a)(!0);const a=o.map(i=>{const o=Ge(i,e,s);let a;if(function(t){return t&&Te(t.canDeactivate)}(o))a=St(o.canDeactivate(t,e,n,r));else{if(!Te(o))throw new Error("Invalid CanDeactivate guard");a=St(o(t,e,n,r))}return a.pipe(Object($.a)())});return Object(i.a)(a).pipe(je())}(t.component,t.route,n,e,r)),Object($.a)(t=>!0!==t,!0))}(l,r,s,t).pipe(Object(B.a)(n=>n&&"boolean"==typeof n?function(t,e,n,r){return Object(o.a)(e).pipe(Object(z.a)(e=>Object(o.a)([Ye(e.route.parent,r),Je(e.route,r),en(t,e.path,n),tn(t,e.route,n)]).pipe(Object(O.a)(),Object($.a)(t=>!0!==t,!0))),Object($.a)(t=>!0!==t,!0))}(r,a,t,e):Object(i.a)(n)),Object(E.a)(t=>Object.assign(Object.assign({},n),{guardsResult:t})))}))}}(this.ngModule.injector,t=>this.triggerEvent(t)),Object(Q.a)(t=>{if(ke(t.guardsResult)){const e=mt(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}}),Object(Q.a)(t=>{const e=new st(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),Object(x.a)(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const n=new tt(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(n),t.resolve(!1),!1}return!0}),dn(t=>{if(t.guards.canActivateChecks.length)return Object(i.a)(t).pipe(Object(Q.a)(t=>{const e=new it(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Object(R.a)(t=>{let n=!1;return Object(i.a)(t).pipe((r=this.paramsInheritanceStrategy,s=this.ngModule.injector,function(t){return t.pipe(Object(B.a)(t=>{const{targetSnapshot:e,guards:{canActivateChecks:n}}=t;if(!n.length)return Object(i.a)(t);let a=0;return Object(o.a)(n).pipe(Object(z.a)(t=>function(t,e,n,r){return function(t,e,n,r){const s=Object.keys(t);if(0===s.length)return Object(i.a)({});const a={};return Object(o.a)(s).pipe(Object(B.a)(s=>function(t,e,n,r){const s=Ge(t,e,r);return St(s.resolve?s.resolve(e,n):s(e,n))}(t[s],e,n,r).pipe(Object(Q.a)(t=>{a[s]=t}))),k(1),Object(B.a)(()=>Object.keys(a).length===s.length?Object(i.a)(a):C.a))}(t._resolve,t,e,r).pipe(Object(E.a)(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),re(t,n).resolve),null)))}(t.route,e,r,s)),Object(Q.a)(()=>a++),k(1),Object(B.a)(e=>a===n.length?Object(i.a)(t):C.a))}))}),Object(Q.a)({next:()=>n=!0,complete:()=>{if(!n){const n=new tt(t.id,this.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");e.next(n),t.resolve(!1)}}}));var r,s}),Object(Q.a)(t=>{const e=new ot(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),dn(t=>{const{targetSnapshot:e,id:n,extractedUrl:r,rawUrl:s,extras:{skipLocationChange:i,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:n,appliedUrlTree:r,rawUrlTree:s,skipLocationChange:!!i,replaceUrl:!!o})}),Object(E.a)(t=>{const e=function(t,e,n){const r=ue(t,e._root,n?n._root:void 0);return new te(r,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),Object(Q.a)(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(a=this.rootContexts,l=this.routeReuseStrategy,c=t=>this.triggerEvent(t),Object(E.a)(t=>(new Ee(l,t.targetRouterState,t.currentRouterState,c).activate(a),t))),Object(Q.a)({next(){n=!0},complete(){n=!0}}),(s=()=>{if(!n&&!r){this.resetUrlToCurrentUrlTree();const n=new tt(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(n),t.resolve(!1)}this.currentNavigation=null},t=>t.lift(new K(s))),H(n=>{if(r=!0,(s=n)&&s.ngNavigationCancelingError){const r=ke(n.url);r||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const s=new tt(t.id,this.serializeUrl(t.extractedUrl),n.message);e.next(s),r?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree);return this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const r=new et(t.id,this.serializeUrl(t.extractedUrl),n);e.next(r);try{t.resolve(this.errorHandler(n))}catch(i){t.reject(i)}}var s;return C.a}));var s,a,l,c}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const e=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,e)&&setTimeout(()=>{const{source:t,state:n,urlTree:r}=e,s={replaceUrl:!0};if(n){const t=Object.assign({},n);delete t.navigationId,0!==Object.keys(t).length&&(s.state=t)}this.scheduleNavigation(r,t,n,s)},0),this.lastLocationChangeInfo=e}))}extractLocationChangeInfoFromEvent(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,e){if(!t)return!0;const n=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&n&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){Ie(t),this.config=t.map(Ne),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}createUrlTree(t,e={}){const{relativeTo:n,queryParams:r,fragment:s,queryParamsHandling:i,preserveFragment:o}=e,a=n||this.routerState.root,l=o?this.currentUrlTree.fragment:s;let c=null;switch(i){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=r||null}return null!==c&&(c=this.removeEmptyProps(c)),function(t,e,n,r,s){if(0===n.length)return pe(e.root,e.root,e,r,s);const i=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new me(!0,0,t);let e=0,n=!1;const r=t.reduce((t,r,s)=>{if("object"==typeof r&&null!=r){if(r.outlets){const e={};return Ct(r.outlets,(t,n)=>{e[n]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(r.segmentPath)return[...t,r.segmentPath]}return"string"!=typeof r?[...t,r]:0===s?(r.split("/").forEach((r,s)=>{0==s&&"."===r||(0==s&&""===r?n=!0:".."===r?e++:""!=r&&t.push(r))}),t):[...t,r]},[]);return new me(n,e,r)}(n);if(i.toRoot())return pe(e.root,new At([],{}),e,r,s);const o=function(t,e,n){if(t.isAbsolute)return new ye(e.root,!0,0);if(-1===n.snapshot._lastPathIndex){const t=n.snapshot._urlSegment;return new ye(t,t===e.root,0)}const r=de(t.commands[0])?0:1;return function(t,e,n){let r=t,s=e,i=n;for(;i>s;){if(i-=s,r=r.parent,!r)throw new Error("Invalid number of '../'");s=r.segments.length}return new ye(r,!1,s-i)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+r,t.numberOfDoubleDots)}(i,e,t),a=o.processChildren?_e(o.segmentGroup,o.index,i.commands):be(o.segmentGroup,o.index,i.commands);return pe(o.segmentGroup,a,e,r,s)}(a,this.currentUrlTree,t,c,l)}navigateByUrl(t,e={skipLocationChange:!1}){const n=ke(t)?t:this.parseUrl(t),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e{const r=t[n];return null!=r&&(e[n]=r),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new Y(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,n,r,s){const i=this.getTransition(),o="imperative"!==e&&"imperative"===(null==i?void 0:i.source),a=(this.lastSuccessfulId===i.id||this.currentNavigation?i.rawUrl:i.urlAfterRedirects).toString()===t.toString();if(o&&a)return Promise.resolve(!0);let l,c,u;s?(l=s.resolve,c=s.reject,u=s.promise):u=new Promise((t,e)=>{l=t,c=e});const h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:r,resolve:l,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,n,r){const s=this.urlSerializer.serialize(t);r=r||{},this.location.isCurrentPathEqualTo(s)||e?this.location.replaceState(s,"",Object.assign(Object.assign({},r),{navigationId:n})):this.location.go(s,"",Object.assign(Object.assign({},r),{navigationId:n}))}resetStateAndUrl(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.M),s.Qb(Dt),s.Qb(yn),s.Qb(r.g),s.Qb(s.r),s.Qb(s.w),s.Qb(s.i),s.Qb(void 0))},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac}),t})(),Sn=(()=>{class t{constructor(t,e,n,r,s){this.router=t,this.route=e,this.commands=[],this.onChanges=new S.a,null==n&&r.setAttribute(s.nativeElement,"tabindex","0")}ngOnChanges(t){this.onChanges.next(this)}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}onClick(){const t={skipLocationChange:On(this.skipLocationChange),replaceUrl:On(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:On(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(s.Hb(Cn),s.Hb(ne),s.Rb("tabindex"),s.Hb(s.D),s.Hb(s.l))},t.\u0275dir=s.Cb({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(t,e){1&t&&s.Tb("click",function(){return e.onClick()})},inputs:{routerLink:"routerLink",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[s.vb]}),t})(),En=(()=>{class t{constructor(t,e,n){this.router=t,this.route=e,this.locationStrategy=n,this.commands=[],this.onChanges=new S.a,this.subscription=t.events.subscribe(t=>{t instanceof Y&&this.updateTargetUrlAndHref()})}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}ngOnChanges(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(t,e,n,r,s){if(0!==t||e||n||r||s)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;const i={skipLocationChange:On(this.skipLocationChange),replaceUrl:On(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,i),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:On(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(s.Hb(Cn),s.Hb(ne),s.Hb(r.h))},t.\u0275dir=s.Cb({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(t,e){1&t&&s.Tb("click",function(t){return e.onClick(t.button,t.ctrlKey,t.shiftKey,t.altKey,t.metaKey)}),2&t&&(s.Pb("href",e.href,s.jc),s.yb("target",e.target))},inputs:{routerLink:"routerLink",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[s.vb]}),t})();function On(t){return""===t||!!t}let xn=(()=>{class t{constructor(t,e,n,r,s,i){this.router=t,this.element=e,this.renderer=n,this.cdr=r,this.link=s,this.linkWithHref=i,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe(t=>{t instanceof Y&&this.update()})}ngAfterContentInit(){Object(o.a)([this.links.changes,this.linksWithHrefs.changes,Object(i.a)(null)]).pipe(Object(Z.a)()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var t;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();const e=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(t=>!!t).map(t=>t.onChanges);this.linkInputChangesSubscription=Object(o.a)(e).pipe(Object(Z.a)()).subscribe(t=>{this.isActive!==this.isLinkActive(this.router)(t)&&this.update()})}set routerLinkActive(t){const e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(t=>!!t)}ngOnChanges(t){this.update()}ngOnDestroy(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()}update(){this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(()=>{const t=this.hasActiveLinks();this.isActive!==t&&(this.isActive=t,this.cdr.markForCheck(),this.classes.forEach(e=>{t?this.renderer.addClass(this.element.nativeElement,e):this.renderer.removeClass(this.element.nativeElement,e)}))})}isLinkActive(t){return e=>t.isActive(e.urlTree,this.routerLinkActiveOptions.exact)}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)}}return t.\u0275fac=function(e){return new(e||t)(s.Hb(Cn),s.Hb(s.l),s.Hb(s.D),s.Hb(s.h),s.Hb(Sn,8),s.Hb(En,8))},t.\u0275dir=s.Cb({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(t,e,n){if(1&t&&(s.Ab(n,Sn,!0),s.Ab(n,En,!0)),2&t){let t;s.ec(t=s.Ub())&&(e.links=t),s.ec(t=s.Ub())&&(e.linksWithHrefs=t)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[s.vb]}),t})(),Tn=(()=>{class t{constructor(t,e,n,r,i){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=i,this.activated=null,this._activatedRoute=null,this.activateEvents=new s.n,this.deactivateEvents=new s.n,this.name=r||"primary",t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const n=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),r=this.parentContexts.getOrCreateContext(this.name).children,s=new kn(t,r,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,s),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(s.Hb(yn),s.Hb(s.O),s.Hb(s.j),s.Rb("name"),s.Hb(s.h))},t.\u0275dir=s.Cb({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class kn{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===ne?this.route:t===yn?this.childContexts:this.parent.get(t,e)}}class An{}class jn{preload(t,e){return Object(i.a)(null)}}let Pn=(()=>{class t{constructor(t,e,n,r,s){this.router=t,this.injector=r,this.preloadingStrategy=s,this.loader=new gn(e,n,e=>t.triggerEvent(new at(e)),e=>t.triggerEvent(new lt(e)))}setUpPreloading(){this.subscription=this.router.events.pipe(Object(x.a)(t=>t instanceof Y),Object(z.a)(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(s.x);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,e){const n=[];for(const r of e)if(r.loadChildren&&!r.canLoad&&r._loadedConfig){const t=r._loadedConfig;n.push(this.processRoutes(t.module,t.routes))}else r.loadChildren&&!r.canLoad?n.push(this.preloadConfig(t,r)):r.children&&n.push(this.processRoutes(t,r.children));return Object(o.a)(n).pipe(Object(Z.a)(),Object(E.a)(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>this.loader.load(t.injector,e).pipe(Object(B.a)(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(Cn),s.Qb(s.w),s.Qb(s.i),s.Qb(s.r),s.Qb(An))},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac}),t})(),In=(()=>{class t{constructor(t,e,n={}){this.router=t,this.viewportScroller=e,this.options=n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},n.scrollPositionRestoration=n.scrollPositionRestoration||"disabled",n.anchorScrolling=n.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof J?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof Y&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof ft&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new ft(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(Cn),s.Qb(r.p),s.Qb(void 0))},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac}),t})();const Dn=new s.q("ROUTER_CONFIGURATION"),Rn=new s.q("ROUTER_FORROOT_GUARD"),Nn=[r.g,{provide:Dt,useClass:Rt},{provide:Cn,useFactory:function(t,e,n,s,i,o,a,l={},c,u){const h=new Cn(null,t,e,n,s,i,o,vt(a));if(c&&(h.urlHandlingStrategy=c),u&&(h.routeReuseStrategy=u),function(t,e){t.errorHandler&&(e.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(e.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(e.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(e.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(e.urlUpdateStrategy=t.urlUpdateStrategy)}(l,h),l.enableTracing){const t=Object(r.s)();h.events.subscribe(e=>{t.logGroup("Router Event: "+e.constructor.name),t.log(e.toString()),t.log(e),t.logGroupEnd()})}return h},deps:[Dt,yn,r.g,s.r,s.w,s.i,pn,Dn,[class{},new s.A],[class{},new s.A]]},yn,{provide:ne,useFactory:function(t){return t.routerState.root},deps:[Cn]},{provide:s.w,useClass:s.J},Pn,jn,class{preload(t,e){return e().pipe(H(()=>Object(i.a)(null)))}},{provide:Dn,useValue:{enableTracing:!1}}];function Ln(){return new s.y("Router",Cn)}let Vn=(()=>{class t{constructor(t,e){}static forRoot(e,n){return{ngModule:t,providers:[Nn,Un(e),{provide:Rn,useFactory:Hn,deps:[[Cn,new s.A,new s.I]]},{provide:Dn,useValue:n||{}},{provide:r.h,useFactory:Fn,deps:[r.o,[new s.p(r.a),new s.A],Dn]},{provide:In,useFactory:Mn,deps:[Cn,r.p,Dn]},{provide:An,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:jn},{provide:s.y,multi:!0,useFactory:Ln},[qn,{provide:s.d,multi:!0,useFactory:zn,deps:[qn]},{provide:Bn,useFactory:$n,deps:[qn]},{provide:s.b,multi:!0,useExisting:Bn}]]}}static forChild(e){return{ngModule:t,providers:[Un(e)]}}}return t.\u0275mod=s.Fb({type:t}),t.\u0275inj=s.Eb({factory:function(e){return new(e||t)(s.Qb(Rn,8),s.Qb(Cn,8))}}),t})();function Mn(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new In(t,e,n)}function Fn(t,e,n={}){return n.useHash?new r.d(t,e):new r.n(t,e)}function Hn(t){return"guarded"}function Un(t){return[{provide:s.a,multi:!0,useValue:t},{provide:pn,multi:!0,useValue:t}]}let qn=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new S.a}appInitializer(){return this.injector.get(r.f,Promise.resolve(null)).then(()=>{let t=null;const e=new Promise(e=>t=e),n=this.injector.get(Cn),r=this.injector.get(Dn);return"disabled"===r.initialNavigation?(n.setUpLocationChangeListener(),t(!0)):"enabled"===r.initialNavigation||"enabledBlocking"===r.initialNavigation?(n.hooks.afterPreactivation=()=>this.initNavigation?Object(i.a)(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),n.initialNavigation()):t(!0),e})}bootstrapListener(t){const e=this.injector.get(Dn),n=this.injector.get(Pn),r=this.injector.get(In),i=this.injector.get(Cn),o=this.injector.get(s.g);t===o.components[0]&&("enabledNonBlocking"!==e.initialNavigation&&void 0!==e.initialNavigation||i.initialNavigation(),n.setUpPreloading(),r.init(),i.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.r))},t.\u0275prov=s.Db({token:t,factory:t.\u0275fac}),t})();function zn(t){return t.appInitializer.bind(t)}function $n(t){return t.bootstrapListener.bind(t)}const Bn=new s.q("Router Initializer")},vkgz:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("7o/Q");function s(){}var i=n("n6bG");function o(t,e,n){return function(r){return r.lift(new a(t,e,n))}}class a{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new l(t,this.nextOrObserver,this.error,this.complete))}}class l extends r.a{constructor(t,e,n,r){super(t),this._tapNext=s,this._tapError=s,this._tapComplete=s,this._tapError=n||s,this._tapComplete=r||s,Object(i.a)(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||s,this._tapError=e.error||s,this._tapComplete=e.complete||s)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}},xbPD:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("7o/Q");function s(t=null){return e=>e.lift(new i(t))}class i{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new o(t,this.defaultValue))}}class o extends r.a{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}},yCtX:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("HDdC"),s=n("ngJS"),i=n("jZKg");function o(t,e){return e?Object(i.a)(t,e):new r.a(Object(s.a)(t))}},"z+Ro":function(t,e,n){"use strict";function r(t){return t&&"function"==typeof t.schedule}n.d(e,"a",function(){return r})},z6cu:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("HDdC");function s(t,e){return new r.a(e?n=>e.schedule(i,0,{error:t,subscriber:n}):e=>e.error(t))}function i({error:t,subscriber:e}){e.error(t)}},zUnb:function(t,e,n){"use strict";n.r(e);var r=n("fXoL"),s=n("tyNb");let i=(()=>{class t{constructor(){this.favIcon=document.querySelector("#favIcon"),this.lightIcon="../assets/classifai_dark.ico",this.favIcon.href=this.lightIcon}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(t,e){1&t&&r.Ib(0,"router-outlet")},directives:[s.e],styles:[""]}),t})();var o=n("1F7/"),a=n("14na"),l=n("I7yr"),c=n("sYmb"),u=n("ofXK");let h=(()=>{class t{transform(t){let e="";switch(t.slice(-2)){case"en":e="EN";break;case"cn":e="CN";break;case"ms":e="MS"}return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=r.Gb({name:"languageSlice",type:t,pure:!0}),t})();const d=["languages"];function f(t,e){if(1&t){const t=r.Nb();r.Mb(0,"li",9,10),r.Tb("click",function(){r.hc(t);const e=r.Vb().$implicit,n=r.Vb();return n.setLanguage(e),n.hideLangOpts()}),r.oc(2),r.Wb(3,"languageSlice"),r.Lb()}if(2&t){const t=r.Vb().$implicit;r.xb(2),r.qc(" ",r.Xb(3,1,t)," ")}}function p(t,e){if(1&t&&(r.Mb(0,"div"),r.mc(1,f,4,3,"li",8),r.Lb()),2&t){const t=e.$implicit,n=r.Vb();r.xb(1),r.ac("ngIf",t!==n._translate.currentLang)}}let g=(()=>{class t{constructor(t,e){this._translate=t,this._languageService=e,this.languageArr=[],this.headerImage="../../assets/landing-page/Classifai_Community_Logo.png";const n=["landing-page-en","landing-page-cn","landing-page-ms"];this._languageService.initializeLanguage("landing-page",n),this.languageArr=this._languageService.filterLanguageList(n,"landing-page")}ngOnInit(){}setLanguage(t){try{t?(this._languageService.setLanguageState(t),this._translate.use(t)):this._languageService.setLanguageState("en")}catch(e){console.log("setLanguage(language: string) ----\x3e ",e.name+": ",e.message)}}showLangOpts(){this.languages.forEach((t,e)=>{t.nativeElement.style.visibility="visible",t.nativeElement.style.opacity="100%",t.nativeElement.style.left=(-112*(e+1)).toString()+"%",t.nativeElement.style.transition=(.15*(1+e)).toString()+"s"})}hideLangOpts(){this.languages.forEach((t,e)=>{t.nativeElement.style.visibility="hidden",t.nativeElement.style.opacity="0%",t.nativeElement.style.left="0%",t.nativeElement.style.transition=(.15*(3-e)).toString()+"s"})}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(c.d),r.Hb(l.a))},t.\u0275cmp=r.Bb({type:t,selectors:[["home-header"]],viewQuery:function(t,e){if(1&t&&r.tc(d,!0),2&t){let t;r.ec(t=r.Ub())&&(e.languages=t)}},decls:13,vars:5,consts:[[1,"flex-header","header-container"],[1,"div-header-container"],[1,"header-img",3,"src"],[1,"version-container"],[1,"version-text"],[1,"share",3,"mouseenter","mouseleave"],[1,"toggle"],[4,"ngFor","ngForOf"],[3,"click",4,"ngIf"],[3,"click"],["languages",""]],template:function(t,e){1&t&&(r.Mb(0,"header",0),r.Mb(1,"div",1),r.Ib(2,"img",2),r.Lb(),r.Lb(),r.Mb(3,"div",3),r.Mb(4,"div",4),r.Mb(5,"p"),r.oc(6,"Version: 2.0.0 alpha1"),r.Lb(),r.Lb(),r.Lb(),r.Mb(7,"div",5),r.Tb("mouseenter",function(){return e.showLangOpts()})("mouseleave",function(){return e.hideLangOpts()}),r.Mb(8,"ul"),r.Mb(9,"div",6),r.oc(10),r.Wb(11,"languageSlice"),r.Lb(),r.mc(12,p,2,1,"div",7),r.Lb(),r.Lb()),2&t&&(r.xb(2),r.ac("src",e.headerImage,r.jc),r.xb(8),r.pc(r.Xb(11,3,e._translate.currentLang)),r.xb(2),r.ac("ngForOf",e.languageArr))},directives:[u.j,u.k],pipes:[h],styles:[".flex-header[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.header-container[_ngcontent-%COMP%]{background:#262a2e;color:snow;height:21vh}.div-header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-around;width:90vw;align-items:center}.flex-grow[_ngcontent-%COMP%]{flex-grow:1}.header-img[_ngcontent-%COMP%]{height:10vh;-webkit-user-select:none;-moz-user-select:none;user-select:none}.header[_ngcontent-%COMP%]{text-shadow:0 0 1.875rem #888}.sub-header[_ngcontent-%COMP%]{font-size:1rem;margin:0 0 0 5rem}.absolute[_ngcontent-%COMP%]{position:absolute;right:5rem}select[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.select-padding[_ngcontent-%COMP%]{position:absolute;height:4vh;font-size:1.5vh;top:10%;right:3%;border-radius:3vh;width:8vh;margin:0;-moz-text-align-last:center;text-align-last:center;background:#3c4044;color:#fff;border:2px solid #a7a7a7}.select-padding[_ngcontent-%COMP%]:hover{border:2px solid #fff}.select-padding[_ngcontent-%COMP%]:active{border:2px solid #fff}.share[_ngcontent-%COMP%]{position:absolute;top:8%;right:2%;transform:translate(-50%,50%);width:8vh;height:4vh;border-radius:3vh;margin:0;z-index:1;text-align:center;vertical-align:middle;line-height:4vh}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{position:relative;margin:0;padding:0;width:100%;height:100%}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style:none;border:.5px solid #a7a7a7;border-radius:3vh;visibility:hidden;opacity:0;-webkit-transform:translateZ(0)}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .toggle[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background:#3c4044;color:#fff;font-size:1.5vh;overflow:hidden;transform:scale(.95);cursor:pointer}.toggle[_ngcontent-%COMP%]{border:.0325vh solid #a7a7a7;border-radius:3vh}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover, .toggle[_ngcontent-%COMP%]:hover{background:#464a4e;border:.0625vh solid #fff}.version-container[_ngcontent-%COMP%]{position:absolute;top:8%;left:6%;transform:translate(-50%,50%);width:20vh;height:4vh;border-radius:3vh;margin:0;z-index:1;text-align:center;vertical-align:middle;line-height:4vh}.version-text[_ngcontent-%COMP%]{color:snow;font-size:1.7vh}"]}),t})();function m(t,e){if(1&t&&(r.Kb(0),r.Mb(1,"span",9),r.oc(2),r.Wb(3,"translate"),r.Lb(),r.Jb()),2&t){const t=r.Vb(),e=t.$implicit,n=t.index,s=r.Vb();r.xb(1),r.ac("ngClass",e.hoverLabel?null:"label-hidden"),r.xb(1),r.qc(" ",r.Xb(3,2,s.conditionalHoverPlaceholder(n,e.hoverLabel))," ")}}function y(t,e){if(1&t){const t=r.Nb();r.Kb(0),r.Mb(1,"div",4),r.Tb("mouseover",function(n){r.hc(t);const s=e.index;return r.Vb().mouseEventCapture(n,s)})("mouseleave",function(n){r.hc(t);const s=e.index;return r.Vb().mouseEventCapture(n,s)})("click",function(){r.hc(t);const n=e.$implicit;return r.Vb().emitParentUrl(n.enabled,n.urlPath)}),r.Mb(2,"div",5),r.Ib(3,"img",6),r.mc(4,m,4,4,"ng-container",7),r.Lb(),r.Mb(5,"div",8),r.Mb(6,"p"),r.oc(7),r.Wb(8,"translate"),r.Lb(),r.Lb(),r.Lb(),r.Jb()}if(2&t){const t=e.$implicit,n=e.index,s=r.Vb();r.xb(1),r.ac("ngStyle",s.hoverStyling(n,s.hover,t.hoverLabel,t.imgPath)),r.yb("data-index",n),r.xb(2),r.ac("src",t.logoPath,r.jc)("alt",t.logoAlt),r.xb(1),r.ac("ngIf",s.hover),r.xb(3),r.pc(r.Xb(8,6,t.title))}}let b=(()=>{class t{constructor(){this._onThumbnailClick=new r.n,this.hoverStyling=(t,e,n,r)=>t===this.hoverIndex&&e?{"background-image":"url("+r+")",opacity:"1.0",cursor:n?"not-allowed":"pointer"}:{"background-image":"url("+r+")",opacity:"0.5"},this.conditionalHoverPlaceholder=(t,e)=>t===this.hoverIndex&&e?e:""}ngOnInit(){}mouseEventCapture(t,e){const{type:n}=t;this.hover="mouseover"===n,this.hoverIndex=e}emitParentUrl(t,e){t&&this._onThumbnailClick.emit(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["home-card"]],inputs:{_jsonSchema:"_jsonSchema"},outputs:{_onThumbnailClick:"_onThumbnailClick"},decls:7,vars:1,consts:[[1,"flex-container"],[4,"ngFor","ngForOf"],[1,"copyright-container"],[1,"copyright-text"],[1,"card-container",3,"ngStyle","mouseover","mouseleave","click"],[1,"header-container"],[1,"logo",3,"src","alt"],[4,"ngIf"],[1,"banner"],[3,"ngClass"]],template:function(t,e){1&t&&(r.Mb(0,"div",0),r.mc(1,y,9,8,"ng-container",1),r.Mb(2,"div",2),r.Mb(3,"div",3),r.oc(4," Copyright \xa9 2020-2021 classifai. All rights reserved. "),r.Ib(5,"br"),r.oc(6," Classifai and the Classifai logo are trademarks of Skymind registered in Malaysia. "),r.Lb(),r.Lb(),r.Lb()),2&t&&(r.xb(1),r.ac("ngForOf",e._jsonSchema.fields))},directives:[u.j,u.l,u.k,u.i],pipes:[c.c],styles:[".flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;overflow:hidden}.card-container[_ngcontent-%COMP%]{display:table;background-repeat:no-repeat;background-size:cover;position:relative;height:74.5vh;width:25vw;-o-object-fit:contain;object-fit:contain;border:.01vh solid #000}.flex-center[_ngcontent-%COMP%]{display:flex;justify-content:center}.header-container[_ngcontent-%COMP%]{color:#fff;padding:10vh;font-size:xxx-large;display:grid;justify-items:center;height:58.7vh;line-height:10vh;font-size:2.5vh;text-align:center;white-space:nowrap}.label-hidden[_ngcontent-%COMP%]{visibility:hidden}.img[_ngcontent-%COMP%]{position:absolute}.image-container[_ngcontent-%COMP%]{display:flex;justify-content:center}.logo[_ngcontent-%COMP%]{position:relative;height:15vh;margin-top:10vh}.banner[_ngcontent-%COMP%]{position:absolute;background:#fff;opacity:.9;width:inherit;display:flex;justify-content:center;bottom:5vh;font-size:2.5vh;height:10vh;min-height:10vh;line-height:5vh}.copyright-container[_ngcontent-%COMP%]{position:absolute;bottom:1vh;left:50%;transform:translate(-50%,-50%)}.copyright-text[_ngcontent-%COMP%]{opacity:.5;text-align:center;color:#fff;font-size:1vh}"]}),t})(),_=(()=>{class t{constructor(){this._navigate=new r.n,this.languageArr=[],this.jsonSchema={fields:[{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"tabular",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Tabular.jpg",imgAlt:"tabular",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_CSV.png",logoAlt:"CSV"},{enabled:!0,urlPath:"/dataset",title:"image",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Image.jpg",imgAlt:"image",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_JPEG.png",logoAlt:"image"},{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"video",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Video.jpg",imgAlt:"video",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_MP4.png",logoAlt:"Video"},{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"voice",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Voice.jpg",imgAlt:"voice",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_MP3.png",logoAlt:"voice"}]}}ngOnInit(){}onThumbnailClick(t){this._navigate.emit(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["home-content"]],outputs:{_navigate:"_navigate"},decls:1,vars:1,consts:[[3,"_jsonSchema","_onThumbnailClick"]],template:function(t,e){1&t&&(r.Mb(0,"home-card",0),r.Tb("_onThumbnailClick",function(t){return e.onThumbnailClick(t)}),r.Lb()),2&t&&r.ac("_jsonSchema",e.jsonSchema)},directives:[b],styles:[""]}),t})(),v=(()=>{class t{constructor(){}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["home-footer"]],decls:0,vars:0,template:function(t,e){},styles:[".footer-container[_ngcontent-%COMP%]{background:#262a2e}.copyright-text[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;color:snow;text-align:center;font-size:10px}"]}),t})();var w=n("44N4");function C(t,e){if(1&t&&(r.Kb(0),r.Mb(1,"div"),r.Mb(2,"span",8),r.oc(3),r.Wb(4,"translate"),r.Lb(),r.Lb(),r.Mb(5,"div",9),r.Mb(6,"span",8),r.oc(7),r.Wb(8,"translate"),r.Lb(),r.Lb(),r.Jb()),2&t){const t=r.Vb(),e=t.$implicit,n=t.index,s=r.Vb();r.xb(2),r.ac("ngClass",e.title?null:"label-hidden"),r.xb(1),r.qc(" ",r.Xb(4,4,s.conditionalHoverPlaceholder(n,e.title))," "),r.xb(3),r.ac("ngClass",e.hoverLabel?null:"label-hidden"),r.xb(1),r.qc(" ",r.Xb(8,6,s.conditionalHoverPlaceholder(n,e.hoverLabel))," ")}}function S(t,e){if(1&t){const t=r.Nb();r.Kb(0),r.Mb(1,"div",4),r.Tb("mouseover",function(n){r.hc(t);const s=e.index;return r.Vb().mouseEventCapture(n,s)})("mouseleave",function(n){r.hc(t);const s=e.index;return r.Vb().mouseEventCapture(n,s)}),r.Mb(2,"div",5),r.Tb("click",function(){r.hc(t);const n=e.$implicit,s=r.Vb();return s.onCloseModal(s.modalIdImgLbl,n.enabled,n.urlPath)}),r.Ib(3,"img",6),r.mc(4,C,9,8,"ng-container",7),r.Lb(),r.Lb(),r.Jb()}if(2&t){const t=e.$implicit,n=e.index,s=r.Vb();r.xb(1),r.yb("data-index",n),r.xb(1),r.ac("ngStyle",s.hoverStyling(n,s.hover,t.enabled)),r.xb(1),r.ac("src",t.imgPath,r.jc)("alt",t.imgAlt),r.xb(1),r.ac("ngIf",s.hover)}}let E=(()=>{class t{constructor(t,e,n,r){this._modalService=t,this._router=e,this._imgLblMode=n,this._languageService=r,this.navigateUrl="",this.modalBodyStyle={minHeight:"37vh",maxHeight:"37vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.cardSchema={fields:[{enabled:!0,title:"imageOpt.boundingBoxes",urlPath:"boundingbox",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Band_Labeling.jpg",imgAlt:"Bounding Box"},{enabled:!1,title:"imageOpt.polygons",urlPath:"segmentation",hoverLabel:"comingSoon",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Band_Segmentation.jpg",imgAlt:"Segmentation"}]},this.modalIdImgLbl="modal-home-image-labelling",this.hover=!1,this.hoverIndex=-1,this.onDisplayModal=t=>{this._modalService.open(t)},this.onCloseModal=(t,e,n)=>{e&&(n&&(this._imgLblMode.setState("boundingbox"===n?"bndbox":"seg"),this._router.navigate([this.navigateUrl])),this._modalService.close(t))},this.hoverStyling=(t,e,n)=>t===this.hoverIndex&&e?{opacity:"1.0",cursor:n?"pointer":"not-allowed"}:{opacity:"0.5"},this.conditionalHoverPlaceholder=(t,e)=>t===this.hoverIndex&&e?e:"",this._languageService.initializeLanguage("landing-page",["landing-page-en","landing-page-cn","landing-page-ms"])}ngOnInit(){}navigate(t){this.navigateUrl=t,this.onDisplayModal(this.modalIdImgLbl)}mouseEventCapture(t,e){const{type:n}=t;this.hover="mouseover"===n,this.hoverIndex=e}}return t.\u0275fac=function(e){return new(e||t)(r.Hb(o.a),r.Hb(s.a),r.Hb(a.a),r.Hb(l.a))},t.\u0275cmp=r.Bb({type:t,selectors:[["home-layout"]],decls:7,vars:7,consts:[[3,"_navigate"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"modal-body-container"],[4,"ngFor","ngForOf"],[1,"card-container",3,"mouseover","mouseleave"],[1,"img-container",3,"ngStyle","click"],[1,"card-image",3,"src","alt"],[4,"ngIf"],[3,"ngClass"],[1,"centered"]],template:function(t,e){1&t&&(r.Ib(0,"home-header"),r.Mb(1,"home-content",0),r.Tb("_navigate",function(t){return e.navigate(t)}),r.Lb(),r.Ib(2,"home-footer"),r.Mb(3,"modal",1),r.Wb(4,"translate"),r.Mb(5,"div",2),r.mc(6,S,5,5,"ng-container",3),r.Lb(),r.Lb()),2&t&&(r.xb(3),r.ac("id",e.modalIdImgLbl)("modalBodyStyle",e.modalBodyStyle)("modalTitle",r.Xb(4,5,"imageOpt.selection"))("scrollable",!1),r.xb(3),r.ac("ngForOf",e.cardSchema.fields))},directives:[g,_,v,w.a,u.j,u.l,u.k,u.i],pipes:[c.c],styles:[".modal-button[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw}.float-right[_ngcontent-%COMP%]{float:right}.label-hidden[_ngcontent-%COMP%]{visibility:hidden}.modal-header-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;line-height:1vh;font-size:1vw;padding:.5vw}.modal-body-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-around}.card-container[_ngcontent-%COMP%]{position:relative;text-align:center;font-weight:700;line-height:1vh;font-size:1vw;padding:.5vw}.card-image[_ngcontent-%COMP%]{max-width:14vw;min-width:14vw;min-height:25vh;max-height:25vh;transition:transform .2s;padding-bottom:3vh}.card-image[_ngcontent-%COMP%]:hover{transform:scale(1.1)}.img-container[_ngcontent-%COMP%]{position:relative;text-align:center;color:#fff}.centered[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}"]}),t})(),O=(()=>{class t{constructor(){this.errorTitle="404",this.errorSubTitle="Page not found",this.errorMessage="Sorry, but the page you are looking for is not found. Please, make sure you have typed the current URL."}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["app-page-not-found"]],decls:6,vars:3,template:function(t,e){1&t&&(r.Mb(0,"h1"),r.oc(1),r.Lb(),r.Mb(2,"h2"),r.oc(3),r.Lb(),r.Mb(4,"p"),r.oc(5),r.Lb()),2&t&&(r.xb(1),r.pc(e.errorTitle),r.xb(2),r.pc(e.errorSubTitle),r.xb(2),r.pc(e.errorMessage))},styles:["h2[_ngcontent-%COMP%]{font-size:4em}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%]{font-weight:700;text-align:center;color:#fff}h1[_ngcontent-%COMP%]{margin-top:10%;font-size:10em}p[_ngcontent-%COMP%]{font-weight:700;font-size:1em;text-align:center;color:#fff}"]}),t})();const x=[{path:"",component:E},{path:"dataset",loadChildren:()=>Promise.all([n.e(1),n.e(7)]).then(n.bind(null,"RN8A")).then(({DataSetLayoutModule:t})=>t)},{path:"imglabel/bndbox",loadChildren:()=>Promise.all([n.e(1),n.e(2)]).then(n.bind(null,"i5u5")).then(({ImageLabellingLayoutModule:t})=>t)},{path:"imglabel/seg",loadChildren:()=>Promise.all([n.e(1),n.e(2)]).then(n.bind(null,"i5u5")).then(({ImageLabellingLayoutModule:t})=>t)},{path:"500",component:(()=>{class t{constructor(){this.errorMessage="Server Probably is Down, Please Contact Administrator!"}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Bb({type:t,selectors:[["server-error"]],decls:4,vars:1,template:function(t,e){1&t&&(r.Mb(0,"h1"),r.oc(1,"500 Internal Server Error!"),r.Lb(),r.Mb(2,"p"),r.oc(3),r.Lb()),2&t&&(r.xb(3),r.qc(" ",e.errorMessage,"\n"))},styles:["p[_ngcontent-%COMP%]{font-size:2em}h1[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{font-weight:700;text-align:center;color:#000}h1[_ngcontent-%COMP%]{margin-top:15%;font-size:6em}"]}),t})()},{path:"**",component:O}];let T=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},imports:[[s.d.forRoot(x,{relativeLinkResolution:"legacy"})],s.d]}),t})();class k extends u.q{constructor(){super()}supportsDOMEvents(){return!0}}class A extends k{static makeCurrent(){Object(u.u)(new A)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=P||(P=document.querySelector("base"),P)?P.getAttribute("href"):null;return null==e?null:(n=e,j||(j=document.createElement("a")),j.setAttribute("href",n),"/"===j.pathname.charAt(0)?j.pathname:"/"+j.pathname);var n}resetBaseElement(){P=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return Object(u.t)(document.cookie,t)}}let j,P=null;const I=new r.q("TRANSITION_ID"),D=[{provide:r.d,useFactory:function(t,e,n){return()=>{n.get(r.e).donePromise.then(()=>{const n=Object(u.s)();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[I,u.c,r.r],multi:!0}];class R{static init(){Object(r.V)(new R)}addToWindow(t){r.mb.getAngularTestability=(e,n=!0)=>{const r=t.findTestabilityInTree(e,n);if(null==r)throw new Error("Could not find testability for element.");return r},r.mb.getAllAngularTestabilities=()=>t.getAllTestabilities(),r.mb.getAllAngularRootElements=()=>t.getAllRootElements(),r.mb.frameworkStabilizers||(r.mb.frameworkStabilizers=[]),r.mb.frameworkStabilizers.push(t=>{const e=r.mb.getAllAngularTestabilities();let n=e.length,s=!1;const i=function(e){s=s||e,n--,0==n&&t(s)};e.forEach(function(t){t.whenStable(i)})})}findTestabilityInTree(t,e,n){if(null==e)return null;const r=t.getTestability(e);return null!=r?r:n?Object(u.s)().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const N=new r.q("EventManagerPlugins");let L=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let r=0;r{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),F=(()=>{class t extends M{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const n=this._doc.createElement("style");n.textContent=t,this._styleNodes.add(e.appendChild(n))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>Object(u.s)().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(u.c))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const H={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/"},U=/%COMP%/g;function q(t,e,n){for(let r=0;r{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let $=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new B(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case r.P.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new Q(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case 1:case r.P.ShadowDom:return new W(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=q(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(L),r.Qb(F),r.Qb(r.c))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();class B{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(H[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;const s=H[r];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const r=H[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,s){s&(r.F.DashCase|r.F.Important)?t.style.setProperty(e,n,s&r.F.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&r.F.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,z(n)):this.eventManager.addEventListener(t,e,z(n))}}class Q extends B{constructor(t,e,n,r){super(t),this.component=n;const s=q(r+"-"+n.id,n.styles,[]);e.addStyles(s),this.contentAttr="_ngcontent-%COMP%".replace(U,r+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(U,r+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class W extends B{constructor(t,e,n,r){super(t),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const s=q(r.id,r.styles,[]);for(let i=0;i{class t extends V{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(u.c))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const G=["alt","control","meta","shift"],Z={"\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"},X={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"},J={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let Y=(()=>{class t extends V{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,r){const s=t.parseEventName(n),i=t.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Object(u.s)().onAndCancel(e,s.domEventName,i))}static parseEventName(e){const n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;const s=t._normalizeKey(n.pop());let i="";if(G.forEach(t=>{const e=n.indexOf(t);e>-1&&(n.splice(e,1),i+=t+".")}),i+=s,0!=n.length||0===s.length)return null;const o={};return o.domEventName=r,o.fullKey=i,o}static getEventFullKey(t){let e="",n=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&X.hasOwnProperty(e)&&(e=X[e]))}return Z[e]||e}(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),G.forEach(r=>{r!=n&&(0,J[r])(t)&&(e+=r+".")}),e+=n,e}static eventCallback(e,n,r){return s=>{t.getEventFullKey(s)===e&&r.runGuarded(()=>n(s))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(u.c))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const tt=[{provide:r.B,useValue:u.r},{provide:r.C,useValue:function(){A.makeCurrent(),R.init()},multi:!0},{provide:u.c,useFactory:function(){return Object(r.rb)(document),document},deps:[]}],et=Object(r.Q)(r.U,"browser",tt),nt=[[],{provide:r.X,useValue:"root"},{provide:r.m,useFactory:function(){return new r.m},deps:[]},{provide:N,useClass:K,multi:!0,deps:[u.c,r.z,r.B]},{provide:N,useClass:Y,multi:!0,deps:[u.c]},[],{provide:$,useClass:$,deps:[L,F,r.c]},{provide:r.E,useExisting:$},{provide:M,useExisting:F},{provide:F,useClass:F,deps:[u.c]},{provide:r.L,useClass:r.L,deps:[r.z]},{provide:L,useClass:L,deps:[N,r.z]},[]];let rt=(()=>{class t{constructor(t){if(t)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.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:r.c,useValue:e.appId},{provide:I,useExisting:r.c},D]}}}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)(r.Qb(t,12))},providers:nt,imports:[u.b,r.f]}),t})();"undefined"!=typeof window&&window;class st{}function it(t,e=null){return{type:2,steps:t,options:e}}function ot(t){return{type:6,styles:t,offset:null}}function at(t){Promise.resolve(null).then(t)}class lt{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){at(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class ct{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,r=0;const s=this.players.length;0==s?at(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==s&&this._onFinish()}),t.onDestroy(()=>{++n==s&&this._onDestroy()}),t.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){let t=0;return this.players.forEach(e=>{const n=e.getPosition();t=Math.min(n,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}function ut(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function ht(t){switch(t.length){case 0:return new lt;case 1:return t[0];default:return new ct(t)}}function dt(t,e,n,r,s={},i={}){const o=[],a=[];let l=-1,c=null;if(r.forEach(t=>{const n=t.offset,r=n==l,u=r&&c||{};Object.keys(t).forEach(n=>{let r=n,a=t[n];if("offset"!==n)switch(r=e.normalizePropertyName(r,o),a){case"!":a=s[n];break;case"*":a=i[n];break;default:a=e.normalizeStyleValue(n,r,a,o)}u[r]=a}),r||a.push(u),c=u,l=n}),o.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${o.join(t)}`)}return a}function ft(t,e,n,r){switch(e){case"start":t.onStart(()=>r(n&&pt(n,"start",t)));break;case"done":t.onDone(()=>r(n&&pt(n,"done",t)));break;case"destroy":t.onDestroy(()=>r(n&&pt(n,"destroy",t)))}}function pt(t,e,n){const r=n.totalTime,s=gt(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==r?t.totalTime:r,!!n.disabled),i=t._data;return null!=i&&(s._data=i),s}function gt(t,e,n,r,s="",i=0,o){return{element:t,triggerName:e,fromState:n,toState:r,phaseName:s,totalTime:i,disabled:!!o}}function mt(t,e,n){let r;return t instanceof Map?(r=t.get(e),r||t.set(e,r=n)):(r=t[e],r||(r=t[e]=n)),r}function yt(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let bt=(t,e)=>!1,_t=(t,e)=>!1,vt=(t,e,n)=>[];const wt=ut();(wt||"undefined"!=typeof Element)&&(bt=(t,e)=>t.contains(e),_t=(()=>{if(wt||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,n)=>e.apply(t,[n]):_t}})(),vt=(t,e,n)=>{let r=[];if(n)r.push(...t.querySelectorAll(e));else{const n=t.querySelector(e);n&&r.push(n)}return r});let Ct=null,St=!1;function Et(t){Ct||(Ct=("undefined"!=typeof document?document.body:null)||{},St=!!Ct.style&&"WebkitAppearance"in Ct.style);let e=!0;return Ct.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in Ct.style,!e&&St)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in Ct.style),e}const Ot=_t,xt=bt,Tt=vt;function kt(t){const e={};return Object.keys(t).forEach(n=>{const r=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[r]=t[n]}),e}let At=(()=>{class t{validateStyleProperty(t){return Et(t)}matchesElement(t,e){return Ot(t,e)}containsElement(t,e){return xt(t,e)}query(t,e,n){return Tt(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,r,s,i=[],o){return new lt(n,r)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})(),jt=(()=>{class t{}return t.NOOP=new At,t})();function Pt(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:It(parseFloat(e[1]),e[2])}function It(t,e){switch(e){case"s":return 1e3*t;default:return t}}function Dt(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let r,s=0,i="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};r=It(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(s=It(parseFloat(o),n[4]));const a=n[5];a&&(i=a)}else r=t;if(!n){let n=!1,i=e.length;r<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),s<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(i,0,`The provided timing value "${t}" is invalid.`)}return{duration:r,delay:s,easing:i}}(t,e,n)}function Rt(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function Nt(t,e,n={}){if(e)for(let r in t)n[r]=t[r];else Rt(t,n);return n}function Lt(t,e,n){return n?e+":"+n+";":""}function Vt(t){let e="";for(let n=0;n{const s=Qt(r);n&&!n.hasOwnProperty(r)&&(n[r]=t.style[s]),t.style[s]=e[r]}),ut()&&Vt(t))}function Ft(t,e){t.style&&(Object.keys(e).forEach(e=>{const n=Qt(e);t.style[n]=""}),ut()&&Vt(t))}function Ht(t){return Array.isArray(t)?1==t.length?t[0]:it(t):t}const Ut=new RegExp("{{\\s*(.+?)\\s*}}","g");function qt(t){let e=[];if("string"==typeof t){let n;for(;n=Ut.exec(t);)e.push(n[1]);Ut.lastIndex=0}return e}function zt(t,e,n){const r=t.toString(),s=r.replace(Ut,(t,r)=>{let s=e[r];return e.hasOwnProperty(r)||(n.push("Please provide a value for the animation param "+r),s=""),s.toString()});return s==r?t:s}function $t(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const Bt=/-+([a-z0-9])/g;function Qt(t){return t.replace(Bt,(...t)=>t[1].toUpperCase())}function Wt(t,e){return 0===t||0===e}function Kt(t,e,n){const r=Object.keys(n);if(r.length&&e.length){let i=e[0],o=[];if(r.forEach(t=>{i.hasOwnProperty(t)||o.push(t),i[t]=n[t]}),o.length)for(var s=1;sfunction(t,e,n){if(":"==t[0]){const r=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e) *"}}(t,n);if("function"==typeof r)return void e.push(r);t=r}const r=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const s=r[1],i=r[2],o=r[3];e.push(te(s,o)),"<"!=i[0]||"*"==s&&"*"==o||e.push(te(o,s))}(t,n,e)):n.push(t),n}const Jt=new Set(["true","1"]),Yt=new Set(["false","0"]);function te(t,e){const n=Jt.has(t)||Yt.has(t),r=Jt.has(e)||Yt.has(e);return(s,i)=>{let o="*"==t||t==s,a="*"==e||e==i;return!o&&n&&"boolean"==typeof s&&(o=s?Jt.has(t):Yt.has(t)),!a&&r&&"boolean"==typeof i&&(a=i?Jt.has(e):Yt.has(e)),o&&a}}const ee=new RegExp("s*:selfs*,?","g");function ne(t,e,n){return new re(t).build(e,n)}class re{constructor(t){this._driver=t}build(t,e){const n=new se(e);return this._resetContextStyleTimingState(n),Gt(this,Ht(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,r=e.depCount=0;const s=[],i=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,r=n.name;r.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,s.push(this.visitState(n,e))}),n.name=r}else if(1==t.type){const s=this.visitTransition(t,e);n+=s.queryCount,r+=s.depCount,i.push(s)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:s,transitions:i,queryCount:n,depCount:r,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(n.containsDynamicStyles){const s=new Set,i=r||{};if(n.styles.forEach(t=>{if(ie(t)){const e=t;Object.keys(e).forEach(t=>{qt(e[t]).forEach(t=>{i.hasOwnProperty(t)||s.add(t)})})}}),s.size){const n=$t(s.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=Gt(this,Ht(t.animation),e);return{type:1,matchers:Xt(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:oe(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>Gt(this,t,e)),options:oe(t.options)}}visitGroup(t,e){const n=e.currentTime;let r=0;const s=t.steps.map(t=>{e.currentTime=n;const s=Gt(this,t,e);return r=Math.max(r,e.currentTime),s});return e.currentTime=r,{type:3,steps:s,options:oe(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return ae(Dt(t,e).duration,0,"");const r=t;if(r.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=ae(0,0,"");return t.dynamic=!0,t.strValue=r,t}return n=n||Dt(r,e),ae(n.duration,n.delay,n.easing)}(t.timings,e.errors);let r;e.currentAnimateTimings=n;let s=t.styles?t.styles:ot({});if(5==s.type)r=this.visitKeyframes(s,e);else{let s=t.styles,i=!1;if(!s){i=!0;const t={};n.easing&&(t.easing=n.easing),s=ot(t)}e.currentTime+=n.duration+n.delay;const o=this.visitStyle(s,e);o.isEmptyStep=i,r=o}return e.currentAnimateTimings=null,{type:4,timings:n,style:r,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?"*"==t?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let r=!1,s=null;return n.forEach(t=>{if(ie(t)){const e=t,n=e.easing;if(n&&(s=n,delete e.easing),!r)for(let t in e)if(e[t].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:n,easing:s,offset:t.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let r=e.currentTime,s=e.currentTime;n&&s>0&&(s-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const i=e.collectedStyles[e.currentQuerySelector],o=i[n];let a=!0;o&&(s!=r&&s>=o.startTime&&r<=o.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${s}ms" and "${r}ms"`),a=!1),s=o.startTime),a&&(i[n]={startTime:s,endTime:r}),e.options&&function(t,e,n){const r=e.params||{},s=qt(t);s.length&&s.forEach(t=>{r.hasOwnProperty(t)||n.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[n],e.options,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let r=0;const s=[];let i=!1,o=!1,a=0;const l=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let l=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(ie(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if(ie(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),c=0;return null!=l&&(r++,c=n.offset=l),o=o||c<0||c>1,i=i||c0&&r{const i=u>0?r==h?1:u*r:s[r],o=i*p;e.currentTime=d+f.delay+o,f.duration=o,this._validateStyleAst(t,e),t.offset=i,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:Gt(this,Ht(t.animation),e),options:oe(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:oe(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:oe(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[s,i]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(ee,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,".ng-animating"),e]}(t.selector);e.currentQuerySelector=n.length?n+" "+s:s,mt(e.collectedStyles,e.currentQuerySelector,{});const o=Gt(this,Ht(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:i,animation:o,originalSelector:t.selector,options:oe(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:Dt(t.timings,e.errors,!0);return{type:12,animation:Gt(this,Ht(t.animation),e),timings:n,options:null}}}class se{constructor(t){this.errors=t,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 ie(t){return!Array.isArray(t)&&"object"==typeof t}function oe(t){var e;return t?(t=Rt(t)).params&&(t.params=(e=t.params)?Rt(e):null):t={},t}function ae(t,e,n){return{duration:t,delay:e,easing:n}}function le(t,e,n,r,s,i,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:r,duration:s,delay:i,totalTime:s+i,easing:o,subTimeline:a}}class ce{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const ue=new RegExp(":enter","g"),he=new RegExp(":leave","g");function de(t,e,n,r,s,i={},o={},a,l,c=[]){return(new fe).buildKeyframes(t,e,n,r,s,i,o,a,l,c)}class fe{buildKeyframes(t,e,n,r,s,i,o,a,l,c=[]){l=l||new ce;const u=new ge(t,e,l,r,s,c,[]);u.options=a,u.currentTimeline.setStyles([i],null,u.errors,a),Gt(this,n,u);const h=u.timelines.filter(t=>t.containsAnimation());if(h.length&&Object.keys(o).length){const t=h[h.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,u.errors,a)}return h.length?h.map(t=>t.buildKeyframes()):[le(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const r=e.createSubContext(t.options),s=e.currentTimeline.currentTime,i=this._visitSubInstructions(n,r,r.options);s!=i&&e.transformIntoNewTimeline(i)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let r=e.currentTimeline.currentTime;const s=null!=n.duration?Pt(n.duration):null,i=null!=n.delay?Pt(n.delay):null;return 0!==s&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,s,i);r=Math.max(r,n.duration+n.delay)}),r}visitReference(t,e){e.updateOptions(t.options,!0),Gt(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let r=e;const s=t.options;if(s&&(s.params||s.delay)&&(r=e.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=pe);const t=Pt(s.delay);r.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>Gt(this,t,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let r=e.currentTimeline.currentTime;const s=t.options&&t.options.delay?Pt(t.options.delay):0;t.steps.forEach(i=>{const o=e.createSubContext(t.options);s&&o.delayNextStep(s),Gt(this,i,o),r=Math.max(r,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return Dt(e.params?zt(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),r.snapshotCurrentStyles());const s=t.style;5==s.type?this.visitKeyframes(s,e):(e.incrementTime(n.duration),this.visitStyle(s,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,r=e.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();const s=r&&r.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(s):n.setStyles(t.styles,s,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,r=e.currentTimeline.duration,s=n.duration,i=e.createSubContext().currentTimeline;i.easing=n.easing,t.styles.forEach(t=>{i.forwardTime((t.offset||0)*s),i.setStyles(t.styles,t.easing,e.errors,e.options),i.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(i),e.transformIntoNewTimeline(r+s),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,r=t.options||{},s=r.delay?Pt(r.delay):0;s&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=pe);let i=n;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=o.length;let a=null;o.forEach((n,r)=>{e.currentQueryIndex=r;const o=e.createSubContext(t.options,n);s&&o.delayNextStep(s),n===e.element&&(a=o.currentTimeline),Gt(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),i=Math.max(i,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(i),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,r=e.currentTimeline,s=t.timings,i=Math.abs(s.duration),o=i*(e.currentQueryTotal-1);let a=i*e.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;Gt(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-c+(r.startTime-n.currentTimeline.startTime)}}const pe={};class ge{constructor(t,e,n,r,s,i,o,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=s,this.errors=i,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=pe,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new me(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let r=this.options;null!=n.duration&&(r.duration=Pt(n.duration)),null!=n.delay&&(r.delay=Pt(n.delay));const s=n.params;if(s){let t=r.params;t||(t=this.options.params={}),Object.keys(s).forEach(n=>{e&&t.hasOwnProperty(n)||(t[n]=zt(s[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const r=e||this.element,s=new ge(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(t),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(t){return this.previousNode=pe,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const r={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},s=new ye(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,r,s,i){let o=[];if(r&&o.push(this.element),t.length>0){t=(t=t.replace(ue,"."+this._enterClassName)).replace(he,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),o.push(...e)}return s||0!=o.length||i.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class me{constructor(t,e,n,r){this._driver=t,this.element=e,this.startTime=n,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(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new me(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){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))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||"*",this._currentKeyframe[t]="*"}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&(this._previousKeyframe.easing=e);const s=r&&r.params||{},i=function(t,e){const n={};let r;return t.forEach(t=>{"*"===t?(r=r||Object.keys(e),r.forEach(t=>{n[t]="*"})):Nt(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(i).forEach(t=>{const e=zt(i[t],s,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:"*"),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],r=t._styleSummary[e];(!n||r.time>n.time)&&this._updateStyle(e,r.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((s,i)=>{const o=Nt(s,!0);Object.keys(o).forEach(n=>{const r=o[n];"!"==r?t.add(n):"*"==r&&e.add(n)}),n||(o.offset=i/this.duration),r.push(o)});const s=t.size?$t(t.values()):[],i=e.size?$t(e.values()):[];if(n){const t=r[0],e=Rt(t);t.offset=0,e.offset=1,r=[t,e]}return le(this.element,r,s,i,this.duration,this.startTime,this.easing,!1)}}class ye extends me{constructor(t,e,n,r,s,i,o=!1){super(t,e,i.delay),this.element=e,this.keyframes=n,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=o,this.timings={duration:i.duration,delay:i.delay,easing:i.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const s=[],i=n+e,o=e/i,a=Nt(t[0],!1);a.offset=0,s.push(a);const l=Nt(t[0],!1);l.offset=be(o),s.push(l);const c=t.length-1;for(let r=1;r<=c;r++){let o=Nt(t[r],!1);o.offset=be((e+o.offset*n)/i),s.push(o)}n=i,e=0,r="",t=s}return le(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}}function be(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class _e{}class ve extends _e{normalizePropertyName(t,e){return Qt(t)}normalizeStyleValue(t,e,n,r){let s="";const i=n.toString().trim();if(we[e]&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&r.push(`Please provide a CSS unit value for ${t}:${n}`)}return i+s}}const we=(()=>function(t){const e={};return t.forEach(t=>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 Ce(t,e,n,r,s,i,o,a,l,c,u,h,d){return{type:0,element:t,triggerName:e,isRemovalTransition:s,fromState:n,fromStyles:i,toState:r,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:h,errors:d}}const Se={};class Ee{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return function(t,e,n,r,s){return t.some(t=>t(e,n,r,s))}(this.ast.matchers,t,e,n,r)}buildStyles(t,e,n){const r=this._stateStyles["*"],s=this._stateStyles[t],i=r?r.buildStyles(e,n):{};return s?s.buildStyles(e,n):i}build(t,e,n,r,s,i,o,a,l,c){const u=[],h=this.ast.options&&this.ast.options.params||Se,d=this.buildStyles(n,o&&o.params||Se,u),f=a&&a.params||Se,p=this.buildStyles(r,f,u),g=new Set,m=new Map,y=new Map,b="void"===r,_={params:Object.assign(Object.assign({},h),f)},v=c?[]:de(t,e,this.ast.animation,s,i,d,p,_,l,u);let w=0;if(v.forEach(t=>{w=Math.max(t.duration+t.delay,w)}),u.length)return Ce(e,this._triggerName,n,r,b,d,p,[],[],m,y,w,u);v.forEach(t=>{const n=t.element,r=mt(m,n,{});t.preStyleProps.forEach(t=>r[t]=!0);const s=mt(y,n,{});t.postStyleProps.forEach(t=>s[t]=!0),n!==e&&g.add(n)});const C=$t(g.values());return Ce(e,this._triggerName,n,r,b,d,p,v,C,m,y,w)}}class Oe{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const n={},r=Rt(this.defaultParams);return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(r[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const s=t;Object.keys(s).forEach(t=>{let i=s[t];i.length>1&&(i=zt(i,r,e)),n[t]=i})}}),n}}class xe{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new Oe(t.style,t.options&&t.options.params||{})}),Te(this.states,"true","1"),Te(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new Ee(t,e,this.states))}),this.fallbackTransition=new Ee(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,r){return this.transitionFactories.find(s=>s.match(t,e,n,r))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function Te(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const ke=new ce;class Ae{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],r=ne(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=r}_buildPlayer(t,e,n){const r=t.element,s=dt(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(r,s,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const r=[],s=this._animations[t];let i;const o=new Map;if(s?(i=de(this._driver,e,s,"ng-enter","ng-leave",{},{},n,ke,r),i.forEach(t=>{const e=mt(o,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(r.push("The requested animation doesn't exist or has already been destroyed"),i=[]),r.length)throw new Error("Unable to create the animation due to the following errors: "+r.join("\n"));o.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,"*")})});const a=ht(i.map(t=>{const e=o.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e}listen(t,e,n,r){const s=gt(e,"","","");return ft(this._getPlayer(t),n,s,r),()=>{}}command(t,e,n,r){if("register"==n)return void this.register(t,r[0]);if("create"==n)return void this.create(t,e,r[0]||{});const s=this._getPlayer(t);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const je=[],Pe={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Ie={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class De{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=null!=(r=n?t.value:t)?r:null,n){const e=Rt(t);delete e.value,this.options=e}else this.options={};var r;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const Re=new De("void");class Ne{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,qe(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(s=n)&&"done"!=s)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);var s;const i=mt(this._elementListeners,t,[]),o={name:e,phase:n,callback:r};i.push(o);const a=mt(this._engine.statesByElement,t,{});return a.hasOwnProperty(e)||(qe(t,"ng-trigger"),qe(t,"ng-trigger-"+e),a[e]=Re),()=>{this._engine.afterFlush(()=>{const t=i.indexOf(o);t>=0&&i.splice(t,1),this._triggers[e]||delete a[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,r=!0){const s=this._getTrigger(e),i=new Ve(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(qe(t,"ng-trigger"),qe(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let a=o[e];const l=new De(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[e]=l,a||(a=Re),"void"!==l.value&&a.value===l.value){if(!function(t,e){const n=Object.keys(t),r=Object.keys(e);if(n.length!=r.length)return!1;for(let s=0;s{Ft(t,n),Mt(t,r)})}return}const c=mt(this._engine.playersByElement,t,[]);c.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let u=s.matchTransition(a.value,l.value,t,l.params),h=!1;if(!u){if(!r)return;u=s.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:u,fromState:a,toState:l,player:i,isFallbackTransition:h}),h||(qe(t,"ng-animate-queued"),i.onStart(()=>{ze(t,"ng-animate-queued")})),i.onDone(()=>{let e=this.players.indexOf(i);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(i);t>=0&&n.splice(t,1)}}),this.players.push(i),c.push(i),i}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const n=this._engine.driver.query(t,".ng-trigger",!0);n.forEach(t=>{if(t.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,n,r){const s=this._engine.statesByElement.get(t);if(s){const i=[];if(Object.keys(s).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,"void",r);n&&i.push(n)}}),i.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&ht(i).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const n=new Set;e.forEach(e=>{const r=e.name;if(n.has(r))return;n.add(r);const s=this._triggers[r].fallbackTransition,i=this._engine.statesByElement.get(t)[r]||Re,o=new De("void"),a=new Ve(this.id,r,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:r,transition:s,fromState:i,toState:o,player:a,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)r=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)n.markElementAsRemoved(this.id,t,!1,e);else{const r=t.__ng_removed;r&&r!==Pe||(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){qe(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const r=n.player;if(r.destroyed)return;const s=n.element,i=this._elementListeners.get(s);i&&i.forEach(e=>{if(e.name==n.triggerName){const r=gt(s,n.triggerName,n.fromState.value,n.toState.value);r._data=t,ft(n.player,e.phase,r,e.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,r=e.transition.ast.depCount;return 0==n||0==r?n-r:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class Le{constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,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=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new Ne(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let r=!1;for(let s=n;s>=0;s--)if(this.driver.containsElement(this._namespaceList[s].hostElement,e)){this._namespaceList.splice(s+1,0,t),r=!0;break}r||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let r=this._namespaceLookup[t];r&&r.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let r=0;r=0&&this.collectedLeaveElements.splice(t,1)}if(t){const r=this._fetchNamespace(t);r&&r.insertNode(e,n)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),qe(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),ze(t,"ng-animate-disabled"))}removeNode(t,e,n,r){if(Me(e)){const s=t?this._fetchNamespace(t):null;if(s?s.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),n){const n=this.namespacesByHostElement.get(e);n&&n.id!==t&&n.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,n,r){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,r,s){return Me(e)?this._fetchNamespace(t).listen(e,n,r,s):()=>{}}_buildInstruction(t,e,n,r,s){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,r,t.fromState.options,t.toState.options,e,s)}destroyInnerAnimations(t){let e=this.driver.query(t,".ng-trigger",!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,".ng-animating",!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return ht(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=Pe,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nt()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?ht(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))}_flushAnimations(t,e){const n=new ce,r=[],s=new Map,i=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(t=>{c.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let n=0;n{const n="ng-enter"+p++;f.set(e,n),t.forEach(t=>qe(t,n))});const g=[],m=new Set,y=new Set;for(let j=0;jm.add(t)):y.add(t))}const b=new Map,_=Ue(h,Array.from(m));_.forEach((t,e)=>{const n="ng-leave"+p++;b.set(e,n),t.forEach(t=>qe(t,n))}),t.push(()=>{d.forEach((t,e)=>{const n=f.get(e);t.forEach(t=>ze(t,n))}),_.forEach((t,e)=>{const n=b.get(e);t.forEach(t=>ze(t,n))}),g.forEach(t=>{this.processLeaveNode(t)})});const v=[],w=[];for(let j=this._namespaceList.length-1;j>=0;j--)this._namespaceList[j].drainQueuedTransitions(e).forEach(t=>{const e=t.player,s=t.element;if(v.push(e),this.collectedEnterElements.length){const t=s.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const c=!u||!this.driver.containsElement(u,s),h=b.get(s),d=f.get(s),p=this._buildInstruction(t,n,d,h,c);if(p.errors&&p.errors.length)w.push(p);else{if(c)return e.onStart(()=>Ft(s,p.fromStyles)),e.onDestroy(()=>Mt(s,p.toStyles)),void r.push(e);if(t.isFallbackTransition)return e.onStart(()=>Ft(s,p.fromStyles)),e.onDestroy(()=>Mt(s,p.toStyles)),void r.push(e);p.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(s,p.timelines),i.push({instruction:p,player:e,element:s}),p.queriedElements.forEach(t=>mt(o,t,[]).push(e)),p.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),p.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let r=l.get(e);r||l.set(e,r=new Set),n.forEach(t=>r.add(t))})}});if(w.length){const t=[];w.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),v.forEach(t=>t.destroy()),this.reportError(t)}const C=new Map,S=new Map;i.forEach(t=>{const e=t.element;n.has(e)&&(S.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,C))}),r.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{mt(C,e,[]).push(t),t.destroy()})});const E=g.filter(t=>Qe(t,a,l)),O=new Map;He(O,this.driver,y,l,"*").forEach(t=>{Qe(t,a,l)&&E.push(t)});const x=new Map;d.forEach((t,e)=>{He(x,this.driver,new Set(t),a,"!")}),E.forEach(t=>{const e=O.get(t),n=x.get(t);O.set(t,Object.assign(Object.assign({},e),n))});const T=[],k=[],A={};i.forEach(t=>{const{element:e,player:i,instruction:o}=t;if(n.has(e)){if(c.has(e))return i.onDestroy(()=>Mt(e,o.toStyles)),i.disabled=!0,i.overrideTotalTime(o.totalTime),void r.push(i);let t=A;if(S.size>1){let n=e;const r=[];for(;n=n.parentNode;){const e=S.get(n);if(e){t=e;break}r.push(n)}r.forEach(e=>S.set(e,t))}const n=this._buildAnimation(i.namespaceId,o,C,s,x,O);if(i.setRealPlayer(n),t===A)T.push(i);else{const e=this.playersByElement.get(t);e&&e.length&&(i.parentPlayer=ht(e)),r.push(i)}}else Ft(e,o.fromStyles),i.onDestroy(()=>Mt(e,o.toStyles)),k.push(i),c.has(e)&&r.push(i)}),k.forEach(t=>{const e=s.get(t.element);if(e&&e.length){const n=ht(e);t.setRealPlayer(n)}}),r.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let j=0;j!t.destroyed);r.length?$e(this,t,r):this.processLeaveNode(t)}return g.length=0,T.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),T}elementContainsData(t,e){let n=!1;const r=e.__ng_removed;return r&&r.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}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,r,s){let i=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(i=e)}else{const e=this.playersByElement.get(t);if(e){const t=!s||"void"==s;e.forEach(e=>{e.queued||(t||e.triggerName==r)&&i.push(e)})}}return(n||r)&&(i=i.filter(t=>!(n&&n!=t.namespaceId||r&&r!=t.triggerName))),i}_beforeAnimationBuild(t,e,n){const r=e.element,s=e.isRemovalTransition?void 0:t,i=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,a=t!==r,l=mt(n,t,[]);this._getPreviousPlayers(t,a,s,i,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}Ft(r,e.fromStyles)}_buildAnimation(t,e,n,r,s,i){const o=e.triggerName,a=e.element,l=[],c=new Set,u=new Set,h=e.timelines.map(e=>{const h=e.element;c.add(h);const d=h.__ng_removed;if(d&&d.removedBeforeQueried)return new lt(e.duration,e.delay);const f=h!==a,p=function(t){const e=[];return Be(t,e),e}((n.get(h)||je).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===h),g=s.get(h),m=i.get(h),y=dt(0,this._normalizer,0,e.keyframes,g,m),b=this._buildPlayer(e,y,p);if(e.subTimeline&&r&&u.add(h),f){const e=new Ve(t,o,h);e.setRealPlayer(b),l.push(e)}return b});l.forEach(t=>{mt(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,n){let r;if(t instanceof Map){if(r=t.get(e),r){if(r.length){const t=r.indexOf(n);r.splice(t,1)}0==r.length&&t.delete(e)}}else if(r=t[e],r){if(r.length){const t=r.indexOf(n);r.splice(t,1)}0==r.length&&delete t[e]}return r}(this.playersByQueriedElement,t.element,t))}),c.forEach(t=>qe(t,"ng-animating"));const d=ht(h);return d.onDestroy(()=>{c.forEach(t=>ze(t,"ng-animating")),Mt(a,e.toStyles)}),u.forEach(t=>{mt(r,t,[]).push(d)}),d}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new lt(t.duration,t.delay)}}class Ve{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new lt,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>ft(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){mt(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Me(t){return t&&1===t.nodeType}function Fe(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function He(t,e,n,r,s){const i=[];n.forEach(t=>i.push(Fe(t)));const o=[];r.forEach((n,r)=>{const i={};n.forEach(t=>{const n=i[t]=e.computeStyle(r,t,s);n&&0!=n.length||(r.__ng_removed=Ie,o.push(r))}),t.set(r,i)});let a=0;return n.forEach(t=>Fe(t,i[a++])),o}function Ue(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const r=new Set(e),s=new Map;function i(t){if(!t)return 1;let e=s.get(t);if(e)return e;const o=t.parentNode;return e=n.has(o)?o:r.has(o)?1:i(o),s.set(t,e),e}return e.forEach(t=>{const e=i(t);1!==e&&n.get(e).push(t)}),n}function qe(t,e){if(t.classList)t.classList.add(e);else{let n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function ze(t,e){if(t.classList)t.classList.remove(e);else{let n=t.$$classes;n&&delete n[e]}}function $e(t,e,n){ht(n).onDone(()=>t.processLeaveNode(e))}function Be(t,e){for(let n=0;ns.add(t)):e.set(t,r),n.delete(t),!0}class We{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new Le(t,e,n),this._timelineEngine=new Ae(t,e,n),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,n,r,s){const i=t+"-"+r;let o=this._triggerCache[i];if(!o){const t=[],e=ne(this._driver,s,t);if(t.length)throw new Error(`The animation trigger "${r}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new xe(t,e)}(r,e),this._triggerCache[i]=o}this._transitionEngine.registerTrigger(e,r,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,r){this._transitionEngine.insertNode(t,e,n,r)}onRemove(t,e,n,r){this._transitionEngine.removeNode(t,e,r||!1,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,r){if("@"==n.charAt(0)){const[t,s]=yt(n);this._timelineEngine.command(t,e,s,r)}else this._transitionEngine.trigger(t,e,n,r)}listen(t,e,n,r,s){if("@"==n.charAt(0)){const[t,r]=yt(n);return this._timelineEngine.listen(t,e,r,s)}return this._transitionEngine.listen(t,e,n,r,s)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function Ke(t,e){let n=null,r=null;return Array.isArray(e)&&e.length?(n=Ze(e[0]),e.length>1&&(r=Ze(e[e.length-1]))):e&&(n=Ze(e)),n||r?new Ge(t,n,r):null}let Ge=(()=>{class t{constructor(e,n,r){this._element=e,this._startStyles=n,this._endStyles=r,this._state=0;let s=t.initialStylesByElement.get(e);s||t.initialStylesByElement.set(e,s={}),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Mt(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Mt(this._element,this._initialStyles),this._endStyles&&(Mt(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Ft(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Ft(this._element,this._endStyles),this._endStyles=null),Mt(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function Ze(t){let e=null;const n=Object.keys(t);for(let r=0;rthis._handleCallback(t)}apply(){!function(t,e){const n=sn(t,"").trim();n.length&&(function(t,e){let n=0;for(let r=0;r=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),nn(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=sn(t,"").split(","),r=en(n,e);r>=0&&(n.splice(r,1),rn(t,"",n.join(",")))}(this._element,this._name))}}function Ye(t,e,n){rn(t,"PlayState",n,tn(t,e))}function tn(t,e){const n=sn(t,"");return n.indexOf(",")>0?en(n.split(","),e):en([n],e)}function en(t,e){for(let n=0;n=0)return n;return-1}function nn(t,e,n){n?t.removeEventListener("animationend",e):t.addEventListener("animationend",e)}function rn(t,e,n,r){const s="animation"+e;if(null!=r){const e=t.style[s];if(e.length){const t=e.split(",");t[r]=n,n=t.join(",")}}t.style[s]=n}function sn(t,e){return t.style["animation"+e]}class on{constructor(t,e,n,r,s,i,o,a){this.element=t,this.keyframes=e,this.animationName=n,this._duration=r,this._delay=s,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=i||"linear",this.totalTime=r+s,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Je(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:Zt(this.element,n))})}this.currentSnapshot=t}}class an extends lt{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=kt(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class ln{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return Et(t)}matchesElement(t,e){return Ot(t,e)}containsElement(t,e){return xt(t,e)}query(t,e,n){return Tt(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){n=n.map(t=>kt(t));let r=`@keyframes ${e} {\n`,s="";n.forEach(t=>{s=" ";const e=parseFloat(t.offset);r+=`${s}${100*e}% {\n`,s+=" ",Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(r+=`${s}animation-timing-function: ${n};\n`));default:return void(r+=`${s}${e}: ${n};\n`)}}),r+=s+"}\n"}),r+="}\n";const i=document.createElement("style");return i.textContent=r,i}animate(t,e,n,r,s,i=[],o){o&&this._notifyFaultyScrubber();const a=i.filter(t=>t instanceof on),l={};Wt(n,r)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const c=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=Kt(t,e,l));if(0==n)return new an(t,c);const u="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(h);const d=Ke(t,e),f=new on(t,e,u,n,r,s,c,d);return f.onDestroy(()=>{var t;(t=h).parentNode.removeChild(t)}),f}_notifyFaultyScrubber(){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)}}class cn{constructor(t,e,n,r){this.element=t,this.keyframes=e,this.options=n,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=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:Zt(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class un{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(hn().toString()),this._cssKeyframesDriver=new ln}validateStyleProperty(t){return Et(t)}matchesElement(t,e){return Ot(t,e)}containsElement(t,e){return xt(t,e)}query(t,e,n){return Tt(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,r,s,i=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,r,s,i);const a={duration:n,delay:r,fill:0==r?"both":"forwards"};s&&(a.easing=s);const l={},c=i.filter(t=>t instanceof cn);Wt(n,r)&&c.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const u=Ke(t,e=Kt(t,e=e.map(t=>Nt(t,!1)),l));return new cn(t,e,a,u)}}function hn(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}let dn=(()=>{class t extends st{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:r.P.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?it(t):t;return gn(this._renderer,null,e,"register",[n]),new fn(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.E),r.Qb(u.c))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();class fn extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new pn(this._id,t,e||{},this._renderer)}}class pn{constructor(t,e,n,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return gn(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(t){this._command("setPosition",t)}getPosition(){return 0}}function gn(t,e,n,r,s){return t.setProperty(e,`@@${n}:${r}`,s)}let mn=(()=>{class t{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new yn("",n,this.engine),this._rendererCache.set(n,t)),t}const r=e.id,s=e.id+"-"+this._currentId;this._currentId++,this.engine.register(s,t);const i=e=>{Array.isArray(e)?e.forEach(i):this.engine.registerTrigger(r,s,t,e.name,e)};return e.data.animation.forEach(i),new bn(this,s,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&te(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.E),r.Qb(We),r.Qb(r.z))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();class yn{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n,r=!0){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,r){this.delegate.setAttribute(t,e,n,r)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,r){this.delegate.setStyle(t,e,n,r)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){"@"==e.charAt(0)&&"@.disabled"==e?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class bn extends yn{constructor(t,e,n,r){super(e,n,r),this.factory=t,this.namespaceId=e}setProperty(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)}listen(t,e,n){if("@"==e.charAt(0)){const r=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let s=e.substr(1),i="";return"@"!=s.charAt(0)&&([s,i]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(s)),this.engine.listen(this.namespaceId,r,s,i,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}let _n=(()=>{class t extends We{constructor(t,e,n){super(t.body,e,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(u.c),r.Qb(jt),r.Qb(_e))},t.\u0275prov=r.Db({token:t,factory:t.\u0275fac}),t})();const vn=[{provide:jt,useFactory:function(){return"function"==typeof hn()?new un:new ln}},{provide:new r.q("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:st,useClass:dn},{provide:_e,useFactory:function(){return new ve}},{provide:We,useClass:_n},{provide:r.E,useFactory:function(t,e,n){return new mn(t,e,n)},deps:[$,We,r.z]}];let wn=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:vn,imports:[rt]}),t})();var Cn=n("RKnZ"),Sn=n("KZX/");let En=(()=>{class t{}return t.\u0275mod=r.Fb({type:t}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},imports:[[u.b,Sn.a,c.b,Cn.a,s.d]]}),t})();var On=n("tk/3");let xn=(()=>{class t{}return t.\u0275mod=r.Fb({type:t,bootstrap:[i]}),t.\u0275inj=r.Eb({factory:function(e){return new(e||t)},providers:[l.a,{provide:u.h,useClass:u.d}],imports:[[rt,wn,u.b,T,Sn.a,On.c,En]]}),t})();Object(r.R)(),et().bootstrapModule(xn).catch(t=>console.error(t))},zn8P:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"},zx2A:function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return a}),n.d(e,"c",function(){return l});var r=n("7o/Q"),s=n("HDdC"),i=n("SeVD");class o extends r.a{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class a extends r.a{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function l(t,e){if(!e.closed)return t instanceof s.a?t.subscribe(e):Object(i.a)(t)(e)}}},[[0,0]]]); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/main-es5.34df3fe33df29b5354fb.js b/classifai-core/src/main/resources/webroot/main-es5.34df3fe33df29b5354fb.js deleted file mode 100644 index b31acddd4..000000000 --- a/classifai-core/src/main/resources/webroot/main-es5.34df3fe33df29b5354fb.js +++ /dev/null @@ -1 +0,0 @@ -!function(){function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||a(e,t)||function(){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 n(e){var t="function"==typeof Map?new Map:void 0;return(n=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return r(e,arguments,g(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),f(i,e)})(e)}function r(e,t,n){return(r=y()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f(i,n.prototype),i}).apply(null,arguments)}function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||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 a(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this}},{key:"requestAsyncId",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(e.flush.bind(e,this),n)}},{key:"recycleAsyncId",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)}},{key:"execute",value:function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r}},{key:"_unsubscribe",value:function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}]),n}(function(e){h(n,e);var t=d(n);function n(e,r){return m(this,n),t.call(this)}return l(n,[{key:"schedule",value:function(e){return this}}]),n}(n("quSY").a))},"3Pt+":function(e,t,n){"use strict";n.d(t,"a",function(){return b}),n.d(t,"b",function(){return Me}),n.d(t,"c",function(){return Le}),n.d(t,"d",function(){return Re}),n.d(t,"e",function(){return Fe}),n.d(t,"f",function(){return U}),n.d(t,"g",function(){return q}),n.d(t,"h",function(){return Te}),n.d(t,"i",function(){return je}),n.d(t,"j",function(){return $}),n.d(t,"k",function(){return He}),n.d(t,"l",function(){return E}),n.d(t,"m",function(){return re}),n.d(t,"n",function(){return Pe});var r=n("fXoL"),a=n("ofXK"),s=n("cp0P"),u=n("Cfvw"),c=n("lJxs"),f=new r.q("NgValueAccessor"),v={provide:f,useExisting:Object(r.S)(function(){return p}),multi:!0},p=function(){var e=function(){function e(t,n){m(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return l(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"checked",e)}},{key:"registerOnChange",value:function(e){this.onChange=e}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(r.D),r.Hb(r.l))},e.\u0275dir=r.Cb({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,t){1&e&&r.Tb("change",function(e){return t.onChange(e.target.checked)})("blur",function(){return t.onTouched()})},features:[r.wb([v])]}),e}(),y={provide:f,useExisting:Object(r.S)(function(){return b}),multi:!0},g=new r.q("CompositionEventMode"),b=function(){var e=function(){function e(t,n,r){var i;m(this,e),this._renderer=t,this._elementRef=n,this._compositionMode=r,this.onChange=function(e){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(i=Object(a.s)()?Object(a.s)().getUserAgent():"",!/android (\d+)/.test(i.toLowerCase())))}return l(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}},{key:"registerOnChange",value:function(e){this.onChange=e}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_handleInput",value:function(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}},{key:"_compositionStart",value:function(){this._composing=!0}},{key:"_compositionEnd",value:function(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(r.D),r.Hb(r.l),r.Hb(g,8))},e.\u0275dir=r.Cb({type:e,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(e,t){1&e&&r.Tb("input",function(e){return t._handleInput(e.target.value)})("blur",function(){return t.onTouched()})("compositionstart",function(){return t._compositionStart()})("compositionend",function(e){return t._compositionEnd(e.target.value)})},features:[r.wb([y])]}),e}();function _(e){return null==e||0===e.length}function k(e){return null!=e&&"number"==typeof e.length}var w=new r.q("NgValidators"),C=new r.q("NgAsyncValidators"),S=/^(?=.{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])?)*$/,E=function(){function e(){m(this,e)}return l(e,null,[{key:"min",value:function(e){return function(t){if(_(t.value)||_(e))return null;var n=parseFloat(t.value);return!isNaN(n)&&ne?{max:{max:e,actual:t.value}}:null}}},{key:"required",value:function(e){return _(e.value)?{required:!0}:null}},{key:"requiredTrue",value:function(e){return!0===e.value?null:{required:!0}}},{key:"email",value:function(e){return _(e.value)||S.test(e.value)?null:{email:!0}}},{key:"minLength",value:function(e){return function(t){return _(t.value)||!k(t.value)?null:t.value.lengthe?{maxlength:{requiredLength:e,actualLength:t.value.length}}:null}}},{key:"pattern",value:function(t){return t?("string"==typeof t?(r="","^"!==t.charAt(0)&&(r+="^"),r+=t,"$"!==t.charAt(t.length-1)&&(r+="$"),n=new RegExp(r)):(r=t.toString(),n=t),function(e){if(_(e.value))return null;var t=e.value;return n.test(t)?null:{pattern:{requiredPattern:r,actualValue:t}}}):e.nullValidator;var n,r}},{key:"nullValidator",value:function(e){return null}},{key:"compose",value:function(e){if(!e)return null;var t=e.filter(O);return 0==t.length?null:function(e){return x(A(e,t))}}},{key:"composeAsync",value:function(e){if(!e)return null;var t=e.filter(O);return 0==t.length?null:function(e){var n=A(e,t).map(T);return Object(s.a)(n).pipe(Object(c.a)(x))}}}]),e}();function O(e){return null!=e}function T(e){var t=Object(r.pb)(e)?Object(u.a)(e):e;return Object(r.ob)(t),t}function x(e){var t={};return e.forEach(function(e){t=null!=e?Object.assign(Object.assign({},t),e):t}),0===Object.keys(t).length?null:t}function A(e,t){return t.map(function(t){return t(e)})}function j(e){return e.map(function(e){return function(e){return!e.validate}(e)?e:function(t){return e.validate(t)}})}function P(e){return null!=e?E.compose(j(e)):null}function I(e){return null!=e?E.composeAsync(j(e)):null}function D(e,t){return null===e?[t]:Array.isArray(e)?[].concat(o(e),[t]):[e,t]}function R(e){return e._rawValidators}function N(e){return e._rawAsyncValidators}var L=function(){var e=function(){function e(){m(this,e),this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}return l(e,[{key:"_setValidators",value:function(e){this._rawValidators=e||[],this._composedValidatorFn=P(this._rawValidators)}},{key:"_setAsyncValidators",value:function(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=I(this._rawAsyncValidators)}},{key:"_registerOnDestroy",value:function(e){this._onDestroyCallbacks.push(e)}},{key:"_invokeOnDestroyCallbacks",value:function(){this._onDestroyCallbacks.forEach(function(e){return e()}),this._onDestroyCallbacks=[]}},{key:"reset",value:function(e){this.control&&this.control.reset(e)}},{key:"hasError",value:function(e,t){return!!this.control&&this.control.hasError(e,t)}},{key:"getError",value:function(e,t){return this.control?this.control.getError(e,t):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}},{key:"validator",get:function(){return this._composedValidatorFn||null}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn||null}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=r.Cb({type:e}),e}(),V=function(){var e=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(L);return e.\u0275fac=function(t){return M(t||e)},e.\u0275dir=r.Cb({type:e,features:[r.ub]}),e}(),M=r.Ob(V),F=function(e){h(n,e);var t=d(n);function n(){var e;return m(this,n),(e=t.apply(this,arguments))._parent=null,e.name=null,e.valueAccessor=null,e}return n}(L),H=function(){function e(t){m(this,e),this._cd=t}return l(e,[{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}}]),e}(),U=function(){var e=function(e){h(n,e);var t=d(n);function n(e){return m(this,n),t.call(this,e)}return n}(H);return e.\u0275fac=function(t){return new(t||e)(r.Hb(F,2))},e.\u0275dir=r.Cb({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,t){2&e&&r.zb("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[r.ub]}),e}(),q=function(){var e=function(e){h(n,e);var t=d(n);function n(e){return m(this,n),t.call(this,e)}return n}(H);return e.\u0275fac=function(t){return new(t||e)(r.Hb(V,2))},e.\u0275dir=r.Cb({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(e,t){2&e&&r.zb("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[r.ub]}),e}(),z={provide:f,useExisting:Object(r.S)(function(){return B}),multi:!0},B=function(){var e=function(){function e(t,n){m(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return l(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}},{key:"registerOnChange",value:function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(r.D),r.Hb(r.l))},e.\u0275dir=r.Cb({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,t){1&e&&r.Tb("input",function(e){return t.onChange(e.target.value)})("blur",function(){return t.onTouched()})},features:[r.wb([z])]}),e}(),Q={provide:f,useExisting:Object(r.S)(function(){return K}),multi:!0},W=function(){var e=function(){function e(){m(this,e),this._accessors=[]}return l(e,[{key:"add",value:function(e,t){this._accessors.push([e,t])}},{key:"remove",value:function(e){for(var t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)}},{key:"select",value:function(e){var t=this;this._accessors.forEach(function(n){t._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})}},{key:"_isSameGroup",value:function(e,t){return!!e[0].control&&e[0]._parent===t._control._parent&&e[1].name===t.name}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Db({token:e,factory:e.\u0275fac}),e}(),K=function(){var e=function(){function e(t,n,r,i){m(this,e),this._renderer=t,this._elementRef=n,this._registry=r,this._injector=i,this.onChange=function(){},this.onTouched=function(){}}return l(e,[{key:"ngOnInit",value:function(){this._control=this._injector.get(F),this._checkName(),this._registry.add(this._control,this)}},{key:"ngOnDestroy",value:function(){this._registry.remove(this)}},{key:"writeValue",value:function(e){this._state=e===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}},{key:"registerOnChange",value:function(e){var t=this;this._fn=e,this.onChange=function(){e(t.value),t._registry.select(t)}}},{key:"fireUncheck",value:function(e){this.writeValue(e)}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_checkName",value:function(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(r.D),r.Hb(r.l),r.Hb(W),r.Hb(r.r))},e.\u0275dir=r.Cb({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,t){1&e&&r.Tb("change",function(){return t.onChange()})("blur",function(){return t.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[r.wb([Q])]}),e}(),G={provide:f,useExisting:Object(r.S)(function(){return Z}),multi:!0},Z=function(){var e=function(){function e(t,n){m(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return l(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(e))}},{key:"registerOnChange",value:function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(r.D),r.Hb(r.l))},e.\u0275dir=r.Cb({type:e,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,t){1&e&&r.Tb("change",function(e){return t.onChange(e.target.value)})("input",function(e){return t.onChange(e.target.value)})("blur",function(){return t.onTouched()})},features:[r.wb([G])]}),e}(),X={provide:f,useExisting:Object(r.S)(function(){return Y}),multi:!0};function J(e,t){return null==e?""+t:(t&&"object"==typeof t&&(t="Object"),"".concat(e,": ").concat(t).slice(0,50))}var Y=function(){var e=function(){function e(t,n){m(this,e),this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=Object.is}return l(e,[{key:"writeValue",value:function(e){this.value=e;var t=this._getOptionId(e);null==t&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=J(t,e);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}},{key:"registerOnChange",value:function(e){var t=this;this.onChange=function(n){t.value=t._getOptionValue(n),e(t.value)}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_registerOption",value:function(){return(this._idCounter++).toString()}},{key:"_getOptionId",value:function(e){for(var t=0,n=Array.from(this._optionMap.keys());t-1)}}else t=function(e,t){e._setSelected(!1)};this._optionMap.forEach(t)}},{key:"registerOnChange",value:function(e){var t=this;this.onChange=function(n){var r=[];if(void 0!==n.selectedOptions)for(var i=n.selectedOptions,o=0;o0&&e.setValidators(r.filter(function(e){return e!==t.validator}))}if(null!==t.asyncValidator){var i=N(e);Array.isArray(i)&&i.length>0&&e.setAsyncValidators(i.filter(function(e){return e!==t.asyncValidator}))}}if(n){var o=function(){};ae(t._rawValidators,o),ae(t._rawAsyncValidators,o)}}function le(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function ce(e,t){se(e,t,!1)}function he(e,t){if(!e.hasOwnProperty("model"))return!1;var n=e.model;return!!n.isFirstChange()||!Object.is(t,n.currentValue)}var fe=[p,Z,B,Y,ne,K];function de(e,t){e._syncPendingControls(),t.forEach(function(e){var t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function ve(e,t){if(!t)return null;Array.isArray(t);var n=void 0,r=void 0,i=void 0;return t.forEach(function(e){var t;e.constructor===b?n=e:(t=e,fe.some(function(e){return t.constructor===e})?r=e:i=e)}),i||r||n||null}function pe(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}function ye(e){return(_e(e)?e.validators:e)||null}function ge(e){return Array.isArray(e)?P(e):e||null}function me(e,t){return(_e(t)?t.asyncValidators:e)||null}function be(e){return Array.isArray(e)?I(e):e||null}function _e(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var ke=function(){function e(t,n){m(this,e),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=n,this._composedValidatorFn=ge(this._rawValidators),this._composedAsyncValidatorFn=be(this._rawAsyncValidators)}return l(e,[{key:"setValidators",value:function(e){this._rawValidators=e,this._composedValidatorFn=ge(e)}},{key:"setAsyncValidators",value:function(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=be(e)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild(function(e){return e.markAllAsTouched()})}},{key:"markAsUntouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(e){e.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}},{key:"markAsDirty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}},{key:"markAsPristine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(e){e.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}},{key:"markAsPending",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status="PENDING",!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}},{key:"disable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._parentMarkedDirty(e.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(function(t){t.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(function(e){return e(!0)})}},{key:"enable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._parentMarkedDirty(e.onlySelf);this.status="VALID",this._forEachChild(function(t){t.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(function(e){return e(!1)})}},{key:"_updateAncestors",value:function(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(e){this._parent=e}},{key:"updateValueAndValidity",value:function(){var e=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(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}},{key:"_updateTreeValidity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild(function(t){return t._updateTreeValidity(e)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.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(e){var t=this;if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;var n=T(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){t._hasOwnPendingAsyncValidator=!1,t.setErrors(n,{emitEvent:e})})}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{key:"setErrors",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}},{key:"get",value:function(e){return function(e,t,n){if(null==t)return null;if(Array.isArray(t)||(t=t.split(".")),Array.isArray(t)&&0===t.length)return null;var r=e;return t.forEach(function(e){r=r instanceof Ce?r.controls.hasOwnProperty(e)?r.controls[e]:null:r instanceof Se&&r.at(e)||null}),r}(this,e)}},{key:"getError",value:function(e,t){var n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}},{key:"hasError",value:function(e,t){return!!this.getError(e,t)}},{key:"_updateControlsErrors",value:function(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}},{key:"_initObservables",value:function(){this.valueChanges=new r.n,this.statusChanges=new r.n}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}},{key:"_anyControlsHaveStatus",value:function(e){return this._anyControls(function(t){return t.status===e})}},{key:"_anyControlsDirty",value:function(){return this._anyControls(function(e){return e.dirty})}},{key:"_anyControlsTouched",value:function(){return this._anyControls(function(e){return e.touched})}},{key:"_updatePristine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}},{key:"_updateTouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}},{key:"_isBoxedValue",value:function(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}},{key:"_registerOnCollectionChange",value:function(e){this._onCollectionChange=e}},{key:"_setUpdateStrategy",value:function(e){_e(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}},{key:"_parentMarkedDirty",value:function(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}},{key:"validator",get:function(){return this._composedValidatorFn},set:function(e){this._rawValidators=this._composedValidatorFn=e}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}},{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 e=this;e._parent;)e=e._parent;return e}}]),e}(),we=function(e){h(n,e);var t=d(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;return m(this,n),(e=t.call(this,ye(i),me(o,i)))._onChange=[],e._applyFormState(r),e._setUpdateStrategy(i),e._initObservables(),e.updateValueAndValidity({onlySelf:!0,emitEvent:!!o}),e}return l(n,[{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=e,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(function(e){return e(t.value,!1!==n.emitViewToModelChange)}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(e,t)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(e){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(e){this._onChange.push(e)}},{key:"_unregisterOnChange",value:function(e){pe(this._onChange,e)}},{key:"registerOnDisabledChange",value:function(e){this._onDisabledChange.push(e)}},{key:"_unregisterOnDisabledChange",value:function(e){pe(this._onDisabledChange,e)}},{key:"_forEachChild",value:function(e){}},{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(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}]),n}(ke),Ce=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,ye(r),me(i,r))).controls=e,o._initObservables(),o._setUpdateStrategy(r),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!!i}),o}return l(n,[{key:"registerControl",value:function(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}},{key:"addControl",value:function(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"removeControl",value:function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setControl",value:function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"contains",value:function(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(e),Object.keys(e).forEach(function(r){t._throwIfControlMissing(r),t.controls[r].setValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(e).forEach(function(r){t.controls[r]&&t.controls[r].patchValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,r){n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}},{key:"getRawValue",value:function(){return this._reduceChildren({},function(e,t,n){return e[n]=t instanceof we?t.value:t.getRawValue(),e})}},{key:"_syncPendingControls",value:function(){var e=this._reduceChildren(!1,function(e,t){return!!t._syncPendingControls()||e});return e&&this.updateValueAndValidity({onlySelf:!0}),e}},{key:"_throwIfControlMissing",value:function(e){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[e])throw new Error("Cannot find form control with name: ".concat(e,"."))}},{key:"_forEachChild",value:function(e){var t=this;Object.keys(this.controls).forEach(function(n){return e(t.controls[n],n)})}},{key:"_setUpControls",value:function(){var e=this;this._forEachChild(function(t){t.setParent(e),t._registerOnCollectionChange(e._onCollectionChange)})}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(e){for(var t=0,n=Object.keys(this.controls);t0||this.disabled}},{key:"_checkAllValuesPresent",value:function(e){this._forEachChild(function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control with name: '".concat(n,"'."))})}}]),n}(ke),Se=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,ye(r),me(i,r))).controls=e,o._initObservables(),o._setUpdateStrategy(r),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!!i}),o}return l(n,[{key:"at",value:function(e){return this.controls[e]}},{key:"push",value:function(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"insert",value:function(e,t){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity()}},{key:"removeAt",value:function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),this.updateValueAndValidity()}},{key:"setControl",value:function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(e),e.forEach(function(e,r){t._throwIfControlMissing(r),t.at(r).setValue(e,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(function(e,r){t.at(r)&&t.at(r).patchValue(e,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,r){n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}},{key:"getRawValue",value:function(){return this.controls.map(function(e){return e instanceof we?e.value:e.getRawValue()})}},{key:"clear",value:function(){this.controls.length<1||(this._forEachChild(function(e){return e._registerOnCollectionChange(function(){})}),this.controls.splice(0),this.updateValueAndValidity())}},{key:"_syncPendingControls",value:function(){var e=this.controls.reduce(function(e,t){return!!t._syncPendingControls()||e},!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}},{key:"_throwIfControlMissing",value:function(e){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(e))throw new Error("Cannot find form control at index "+e)}},{key:"_forEachChild",value:function(e){this.controls.forEach(function(t,n){e(t,n)})}},{key:"_updateValue",value:function(){var e=this;this.value=this.controls.filter(function(t){return t.enabled||e.disabled}).map(function(e){return e.value})}},{key:"_anyControls",value:function(e){return this.controls.some(function(t){return t.enabled&&e(t)})}},{key:"_setUpControls",value:function(){var e=this;this._forEachChild(function(t){return e._registerControl(t)})}},{key:"_checkAllValuesPresent",value:function(e){this._forEachChild(function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control at index: ".concat(n,"."))})}},{key:"_allControlsDisabled",value:function(){var e,t=i(this.controls);try{for(t.s();!(e=t.n()).done;){if(e.value.enabled)return!1}}catch(n){t.e(n)}finally{t.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}},{key:"length",get:function(){return this.controls.length}}]),n}(ke),Ee={provide:V,useExisting:Object(r.S)(function(){return Te})},Oe=Promise.resolve(null),Te=function(){var e=function(e){h(n,e);var t=d(n);function n(e,i){var o;return m(this,n),(o=t.call(this)).submitted=!1,o._directives=[],o.ngSubmit=new r.n,o.form=new Ce({},P(e),I(i)),o}return l(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"addControl",value:function(e){var t=this;Oe.then(function(){var n=t._findContainer(e.path);e.control=n.registerControl(e.name,e.control),oe(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),t._directives.push(e)})}},{key:"getControl",value:function(e){return this.form.get(e.path)}},{key:"removeControl",value:function(e){var t=this;Oe.then(function(){var n=t._findContainer(e.path);n&&n.removeControl(e.name),pe(t._directives,e)})}},{key:"addFormGroup",value:function(e){var t=this;Oe.then(function(){var n=t._findContainer(e.path),r=new Ce({});ce(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}},{key:"removeFormGroup",value:function(e){var t=this;Oe.then(function(){var n=t._findContainer(e.path);n&&n.removeControl(e.name)})}},{key:"getFormGroup",value:function(e){return this.form.get(e.path)}},{key:"updateModel",value:function(e,t){var n=this;Oe.then(function(){n.form.get(e.path).setValue(t)})}},{key:"setValue",value:function(e){this.control.setValue(e)}},{key:"onSubmit",value:function(e){return this.submitted=!0,de(this.form,this._directives),this.ngSubmit.emit(e),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(e){this.form.reset(e),this.submitted=!1}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}},{key:"_findContainer",value:function(e){return e.pop(),e.length?this.form.get(e):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}(V);return e.\u0275fac=function(t){return new(t||e)(r.Hb(w,10),r.Hb(C,10))},e.\u0275dir=r.Cb({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,t){1&e&&r.Tb("submit",function(e){return t.onSubmit(e)})("reset",function(){return t.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.wb([Ee]),r.ub]}),e}(),xe={provide:F,useExisting:Object(r.S)(function(){return je})},Ae=Promise.resolve(null),je=function(){var e=function(e){h(n,e);var t=d(n);function n(e,i,o,a){var s;return m(this,n),(s=t.call(this)).control=new we,s._registered=!1,s.update=new r.n,s._parent=e,s._setValidators(i),s._setAsyncValidators(o),s.valueAccessor=ve(0,a),s}return l(n,[{key:"ngOnChanges",value:function(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),he(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(e){this.viewModel=e,this.update.emit(e)}},{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(){oe(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}},{key:"_checkForErrors",value:function(){this._isStandalone()||this._checkParentType(),this._checkName()}},{key:"_checkParentType",value:function(){}},{key:"_checkName",value:function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}},{key:"_updateValue",value:function(e){var t=this;Ae.then(function(){t.control.setValue(e,{emitViewToModelChange:!1})})}},{key:"_updateDisabled",value:function(e){var t=this,n=e.isDisabled.currentValue,r=""===n||n&&"false"!==n;Ae.then(function(){r&&!t.control.disabled?t.control.disable():!r&&t.control.disabled&&t.control.enable()})}},{key:"path",get:function(){return this._parent?ie(this.name,this._parent):[this.name]}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}}]),n}(F);return e.\u0275fac=function(t){return new(t||e)(r.Hb(V,9),r.Hb(w,10),r.Hb(C,10),r.Hb(f,10))},e.\u0275dir=r.Cb({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[r.wb([xe]),r.ub,r.vb]}),e}(),Pe=function(){var e=function e(){m(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=r.Cb({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),e}(),Ie=new r.q("NgModelWithFormControlWarning"),De={provide:V,useExisting:Object(r.S)(function(){return Re})},Re=function(){var e=function(e){h(n,e);var t=d(n);function n(e,i){var o;return m(this,n),(o=t.call(this)).validators=e,o.asyncValidators=i,o.submitted=!1,o.directives=[],o.form=null,o.ngSubmit=new r.n,o._setValidators(e),o._setAsyncValidators(i),o}return l(n,[{key:"ngOnChanges",value:function(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}},{key:"addControl",value:function(e){var t=this.form.get(e.path);return oe(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}},{key:"getControl",value:function(e){return this.form.get(e.path)}},{key:"removeControl",value:function(e){pe(this.directives,e)}},{key:"addFormGroup",value:function(e){var t=this.form.get(e.path);ce(t,e),t.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormGroup",value:function(e){}},{key:"getFormGroup",value:function(e){return this.form.get(e.path)}},{key:"addFormArray",value:function(e){var t=this.form.get(e.path);ce(t,e),t.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormArray",value:function(e){}},{key:"getFormArray",value:function(e){return this.form.get(e.path)}},{key:"updateModel",value:function(e,t){this.form.get(e.path).setValue(t)}},{key:"onSubmit",value:function(e){return this.submitted=!0,de(this.form,this.directives),this.ngSubmit.emit(e),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(e){this.form.reset(e),this.submitted=!1}},{key:"_updateDomValue",value:function(){var e=this;this.directives.forEach(function(t){var n=e.form.get(t.path);t.control!==n&&(function(e,t){var n=function(){};t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n),ue(e,t,!0),e&&(t._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(function(){}))}(t.control||null,t),n&&oe(n,t),t.control=n)}),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_updateRegistrations",value:function(){var e=this;this.form._registerOnCollectionChange(function(){return e._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){})}},{key:"_updateValidators",value:function(){se(this.form,this,!1),this._oldForm&&ue(this._oldForm,this,!1)}},{key:"_checkFormPresent",value:function(){}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}}]),n}(V);return e.\u0275fac=function(t){return new(t||e)(r.Hb(w,10),r.Hb(C,10))},e.\u0275dir=r.Cb({type:e,selectors:[["","formGroup",""]],hostBindings:function(e,t){1&e&&r.Tb("submit",function(e){return t.onSubmit(e)})("reset",function(){return t.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.wb([De]),r.ub,r.vb]}),e}(),Ne={provide:F,useExisting:Object(r.S)(function(){return Le})},Le=function(){var e=function(e){h(n,e);var t=d(n);function n(e,i,o,a,s){var u;return m(this,n),(u=t.call(this))._ngModelWarningConfig=s,u._added=!1,u.update=new r.n,u._ngModelWarningSent=!1,u._parent=e,u._setValidators(i),u._setAsyncValidators(o),u.valueAccessor=ve(0,a),u}return l(n,[{key:"ngOnChanges",value:function(e){var t,i;this._added||this._setUpControl(),he(e,this.viewModel)&&(t=n,i=this._ngModelWarningConfig,Object(r.T)()&&"never"!==i&&((null!==i&&"once"!==i||t._ngModelWarningSentOnce)&&("always"!==i||this._ngModelWarningSent)||(t._ngModelWarningSentOnce=!0,this._ngModelWarningSent=!0)),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(e){this.viewModel=e,this.update.emit(e)}},{key:"_checkParentType",value:function(){}},{key:"_setUpControl",value:function(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}},{key:"isDisabled",set:function(e){}},{key:"path",get:function(){return ie(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}}]),n}(F);return e.\u0275fac=function(t){return new(t||e)(r.Hb(V,13),r.Hb(w,10),r.Hb(C,10),r.Hb(f,10),r.Hb(Ie,8))},e.\u0275dir=r.Cb({type:e,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[r.wb([Ne]),r.ub,r.vb]}),e._ngModelWarningSentOnce=!1,e}(),Ve=function(){var e=function e(){m(this,e)};return e.\u0275mod=r.Fb({type:e}),e.\u0275inj=r.Eb({factory:function(t){return new(t||e)}}),e}(),Me=function(){var e=function(){function e(){m(this,e)}return l(e,[{key:"group",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this._reduceControls(e),r=null,i=null,o=void 0;return null!=t&&(function(e){return void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn}(t)?(r=null!=t.validators?t.validators:null,i=null!=t.asyncValidators?t.asyncValidators:null,o=null!=t.updateOn?t.updateOn:void 0):(r=null!=t.validator?t.validator:null,i=null!=t.asyncValidator?t.asyncValidator:null)),new Ce(n,{asyncValidators:i,updateOn:o,validators:r})}},{key:"control",value:function(e,t,n){return new we(e,t,n)}},{key:"array",value:function(e,t,n){var r=this,i=e.map(function(e){return r._createControl(e)});return new Se(i,t,n)}},{key:"_reduceControls",value:function(e){var t=this,n={};return Object.keys(e).forEach(function(r){n[r]=t._createControl(e[r])}),n}},{key:"_createControl",value:function(e){return e instanceof we||e instanceof Ce||e instanceof Se?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Db({token:e,factory:e.\u0275fac}),e}(),Fe=function(){var e=function e(){m(this,e)};return e.\u0275mod=r.Fb({type:e}),e.\u0275inj=r.Eb({factory:function(t){return new(t||e)},providers:[W],imports:[Ve]}),e}(),He=function(){var e=function(){function e(){m(this,e)}return l(e,null,[{key:"withConfig",value:function(t){return{ngModule:e,providers:[{provide:Ie,useValue:t.warnOnNgModelWithFormControl}]}}}]),e}();return e.\u0275mod=r.Fb({type:e}),e.\u0275inj=r.Eb({factory:function(t){return new(t||e)},providers:[Me,W],imports:[Ve]}),e}()},"44N4":function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r=n("fXoL"),i=n("1F7/"),o=n("ofXK"),a=function(e){return{"font-size":e}};function s(e,t){if(1&e){var n=r.Nb();r.Mb(0,"div",4),r.Mb(1,"label",5),r.oc(2),r.Lb(),r.Mb(3,"button",6),r.Tb("click",function(){return r.hc(n),r.Vb().close()}),r.oc(4,"\u2716"),r.Lb(),r.Lb()}if(2&e){var i=r.Vb();r.xb(1),r.ac("ngStyle",r.dc(2,a,i.modalTitle.length>20?"2.2vh":"3vh")),r.xb(1),r.pc(i.modalTitle)}}var u=function(e){return{"z-index":e}},c=["*"],h=function(){var e=function(){function e(t,n){var r=this;m(this,e),this._modalService=t,this._el=n,this.id="",this.modalTitle="",this.showHeader=!0,this.scrollable=!0,this.zIndex=1,this.applyStyling=function(){return"".concat(!r.modalBodyStyle&&"modal-body-height modal-body-width modal-body-margin"," ").concat(r.scrollable&&"scroll")},this.keyDownEvent=function(e){var t=e.key;"modal-create-project"!==r.id&&"modal-import-project"!==r.id&&"Escape"===t&&r.close()},this.element=this._el.nativeElement}return l(e,[{key:"ngOnInit",value:function(){1!==this.zIndex&&(this.modalBodyStyle.zIndex=(2e3*this.zIndex).toString()),this.id?(this._modalService.add(this),this.close()):console.error("modal must have an id")}},{key:"ngOnDestroy",value:function(){this._modalService.remove(this.id),this.element.remove()}},{key:"open",value:function(){this.element.style.display="block",document.body.classList.add("modal-open")}},{key:"close",value:function(){this.element.style.display="none",document.body.classList.remove("modal-open")}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(i.a),r.Hb(r.l))},e.\u0275cmp=r.Bb({type:e,selectors:[["modal"]],hostBindings:function(e,t){1&e&&r.Tb("keydown",function(e){return t.keyDownEvent(e)},!1,r.gc)},inputs:{id:"id",modalBodyStyle:"modalBodyStyle",modalTitle:"modalTitle",showHeader:"showHeader",scrollable:"scrollable",zIndex:"zIndex"},ngContentSelectors:c,decls:5,vars:6,consts:[[1,"modal"],[1,"modal-body",3,"ngStyle","ngClass"],["class","modal-header-container",4,"ngIf"],[1,"modal-background",3,"ngStyle","click"],[1,"modal-header-container"],[2,"text-indent","0.5vw","padding-left","0.2vw",3,"ngStyle"],[1,"modal-button","close-button","float-right",3,"click"]],template:function(e,t){1&e&&(r.Zb(),r.Mb(0,"div",0),r.Mb(1,"div",1),r.mc(2,s,5,4,"div",2),r.Yb(3),r.Lb(),r.Lb(),r.Mb(4,"div",3),r.Tb("click",function(){return t.close()}),r.Lb()),2&e&&(r.xb(1),r.ac("ngStyle",t.modalBodyStyle)("ngClass",t.applyStyling()),r.xb(1),r.ac("ngIf",t.showHeader),r.xb(2),r.ac("ngStyle",r.dc(4,u,1e3*t.zIndex)))},directives:[o.l,o.i,o.k],styles:[".modal{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.modal-body{border-radius:1vw;padding:1.5vw;background:#262a2e;color:#fff;position:absolute;z-index:2000}.modal-body-height{min-height:75%;max-height:80%}.modal-body-width{min-width:50%;max-width:50%}.modal-header-container{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;align-items:center}.modal-button,.modal-header-container{font-size:1vw;padding:.5vw;background:#262a2e;color:azure}.modal-button{line-height:1vh}.close-button{border:none;cursor:pointer}.float-right{float:right}.modal-body-margin{left:25%;top:10%}.scroll{overflow-y:auto}.scroll::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px}.scroll::-webkit-scrollbar{width:.5vw}.scroll::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.modal-background{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.75}body.modal-open{overflow:hidden}"],encapsulation:2}),e}()},"4I5i":function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},"5+tZ":function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n("lJxs"),i=n("Cfvw"),o=n("zx2A");function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof t?function(o){return o.pipe(a(function(n,o){return Object(i.a)(e(n,o)).pipe(Object(r.a)(function(e,r){return t(n,e,o,r)}))},n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new s(e,n))})}var s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;m(this,e),this.project=t,this.concurrent=n}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new u(e,this.project,this.concurrent))}}]),e}(),u=function(e){h(n,e);var t=d(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return m(this,n),(i=t.call(this,e)).project=r,i.concurrent=o,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return l(n,[{key:"_next",value:function(e){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(o.b)},"7o/Q":function(e,t,n){"use strict";n.d(t,"a",function(){return f});var r=n("n6bG"),i=n("gRHU"),o=n("quSY"),a=n("2QA8"),s=n("2fFW"),u=n("NJ4a"),f=function(e){h(n,e);var t=d(n);function n(e,r,o){var a;switch(m(this,n),(a=t.call(this)).syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=i.a;break;case 1:if(!e){a.destination=i.a;break}if("object"==typeof e){e instanceof n?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(p(a))):(a.syncErrorThrowable=!0,a.destination=new v(p(a),e));break}default:a.syncErrorThrowable=!0,a.destination=new v(p(a),e,r,o)}return a}return l(n,[{key:a.a,value:function(){return this}},{key:"next",value:function(e){this.isStopped||this._next(e)}},{key:"error",value:function(e){this.isStopped||(this.isStopped=!0,this._error(e))}},{key:"complete",value:function(){this.isStopped||(this.isStopped=!0,this._complete())}},{key:"unsubscribe",value:function(){this.closed||(this.isStopped=!0,c(g(n.prototype),"unsubscribe",this).call(this))}},{key:"_next",value:function(e){this.destination.next(e)}},{key:"_error",value:function(e){this.destination.error(e),this.unsubscribe()}},{key:"_complete",value:function(){this.destination.complete(),this.unsubscribe()}},{key:"_unsubscribeAndRecycle",value:function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}],[{key:"create",value:function(e,t,r){var i=new n(e,t,r);return i.syncErrorThrowable=!1,i}}]),n}(o.a),v=function(e){h(n,e);var t=d(n);function n(e,o,a,s){var u,l;m(this,n),(u=t.call(this))._parentSubscriber=e;var c=p(u);return Object(r.a)(o)?l=o:o&&(l=o.next,a=o.error,s=o.complete,o!==i.a&&(c=Object.create(o),Object(r.a)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(p(u)))),u._context=c,u._next=l,u._error=a,u._complete=s,u}return l(n,[{key:"next",value:function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;s.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}},{key:"error",value:function(e){if(!this.isStopped){var t=this._parentSubscriber,n=s.a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):Object(u.a)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;Object(u.a)(e)}}}},{key:"complete",value:function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};s.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}},{key:"__tryOrUnsub",value:function(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),s.a.useDeprecatedSynchronousErrorHandling)throw n;Object(u.a)(n)}}},{key:"__tryOrSetError",value:function(e,t,n){if(!s.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(r){return s.a.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=r,e.syncErrorThrown=!0,!0):(Object(u.a)(r),!0)}return!1}},{key:"_unsubscribe",value:function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}]),n}(f)},"9ppp":function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},Cfvw:function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r=n("HDdC"),i=n("SeVD"),o=n("quSY"),a=n("kJWO"),s=n("jZKg"),u=n("Lhse"),l=n("c2HN"),c=n("I55L");function h(e,t){return t?function(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[a.a]}(e))return function(e,t){return new r.a(function(n){var r=new o.a;return r.add(t.schedule(function(){var i=e[a.a]();r.add(i.subscribe({next:function(e){r.add(t.schedule(function(){return n.next(e)}))},error:function(e){r.add(t.schedule(function(){return n.error(e)}))},complete:function(){r.add(t.schedule(function(){return n.complete()}))}}))})),r})}(e,t);if(Object(l.a)(e))return function(e,t){return new r.a(function(n){var r=new o.a;return r.add(t.schedule(function(){return e.then(function(e){r.add(t.schedule(function(){n.next(e),r.add(t.schedule(function(){return n.complete()}))}))},function(e){r.add(t.schedule(function(){return n.error(e)}))})})),r})}(e,t);if(Object(c.a)(e))return Object(s.a)(e,t);if(function(e){return e&&"function"==typeof e[u.a]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.a(function(n){var r,i=new o.a;return i.add(function(){r&&"function"==typeof r.return&&r.return()}),i.add(t.schedule(function(){r=e[u.a](),i.add(t.schedule(function(){if(!n.closed){var e,t;try{var i=r.next();e=i.value,t=i.done}catch(o){return void n.error(o)}t?n.complete():(n.next(e),this.schedule())}}))})),i})}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}(e,t):e instanceof r.a?e:new r.a(Object(i.a)(e))}},DH7j:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=Array.isArray||function(e){return e&&"number"==typeof e.length}},EY2u:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o});var r=n("HDdC"),i=new r.a(function(e){return e.complete()});function o(e){return e?function(e){return new r.a(function(t){return e.schedule(function(){return t.complete()})})}(e):i}},F7l1:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("2Vo4"),i=n("fXoL"),o=function(){var e=function(){function e(){m(this,e),this.toggleSpinnerSubject=new r.a(!1)}return l(e,[{key:"returnAsObservable",value:function(){return this.toggleSpinnerSubject.asObservable()}},{key:"showSpinner",value:function(){this.toggleSpinnerSubject.next(!0)}},{key:"hideSpinner",value:function(){this.toggleSpinnerSubject.next(!1)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},GyhO:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("LRne"),i=n("0EUg");function o(){return Object(i.a)()(Object(r.a).apply(void 0,arguments))}},HDdC:function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r,i=n("7o/Q"),o=n("2QA8"),a=n("gRHU"),s=n("kJWO"),u=n("SpAZ"),c=n("2fFW"),h=((r=function(){function e(t){m(this,e),this._isScalar=!1,t&&(this._subscribe=t)}return l(e,[{key:"lift",value:function(t){var n=new e;return n.source=this,n.operator=t,n}},{key:"subscribe",value:function(e,t,n){var r=this.operator,s=function(e,t,n){if(e){if(e instanceof i.a)return e;if(e[o.a])return e[o.a]()}return e||t||n?new i.a(e,t,n):new i.a(a.a)}(e,t,n);if(s.add(r?r.call(s,this.source):this.source||c.a.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),c.a.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}},{key:"_trySubscribe",value:function(e){try{return this._subscribe(e)}catch(t){c.a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&r instanceof i.a?r:null}return!0}(e)?e.error(t):console.warn(t)}}},{key:"forEach",value:function(e,t){var n=this;return new(t=f(t))(function(t,r){var i;i=n.subscribe(function(t){try{e(t)}catch(n){r(n),i&&i.unsubscribe()}},r,t)})}},{key:"_subscribe",value:function(e){var t=this.source;return t&&t.subscribe(e)}},{key:s.a,value:function(){return this}},{key:"pipe",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n2?e.slice(-2):e;this.languageSubject.next(t),localStorage.setItem("language",t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(o.Qb(a.d))},e.\u0275prov=o.Db({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},IjjT:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=function(){var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.now;m(this,e),this.SchedulerAction=t,this.now=n}return l(e,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,e).schedule(n,t)}}]),e}();return e.now=function(){return Date.now()},e}(),i=function(e){h(n,e);var t=d(n);function n(e){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.now;return m(this,n),(i=t.call(this,e,function(){return n.delegate&&n.delegate!==p(i)?n.delegate.now():o()})).actions=[],i.active=!1,i.scheduled=void 0,i}return l(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(e,t,r):c(g(n.prototype),"schedule",this).call(this,e,t,r)}},{key:"flush",value:function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}}}]),n}(r)},IzEk:function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n("7o/Q"),i=n("4I5i"),o=n("EY2u");function a(e){return function(t){return 0===e?Object(o.b)():t.lift(new s(e))}}var s=function(){function e(t){if(m(this,e),this.total=t,this.total<0)throw new i.a}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new u(e,this.total))}}]),e}(),u=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).total=r,i.count=0,i}return l(n,[{key:"_next",value:function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))}}]),n}(r.a)},"KZX/":function(e,t,n){"use strict";n.d(t,"a",function(){return x});var r,i,o,a,s,u,c=n("ofXK"),h=n("sYmb"),f=n("RKnZ"),d=n("fXoL"),v=((o=function e(){m(this,e)}).\u0275mod=d.Fb({type:o}),o.\u0275inj=d.Eb({factory:function(e){return new(e||o)},imports:[[c.b,h.b,f.a]]}),o),p=((i=function e(){m(this,e)}).\u0275mod=d.Fb({type:i}),i.\u0275inj=d.Eb({factory:function(e){return new(e||i)},imports:[[c.b]]}),i),y=((r=function(){function e(){m(this,e)}return l(e,[{key:"intercept",value:function(e,t){var n=e.clone({setHeaders:{"Cache-Control":"no-cache",Pragma:"no-cache"}});return t.handle(n)}}]),e}()).\u0275fac=function(e){return new(e||r)},r.\u0275prov=d.Db({token:r,factory:r.\u0275fac}),r),g=n("3Pt+"),b=n("tk/3"),_=n("I7yr"),k=n("vkgz"),w=n("F7l1"),C=((a=function(){function e(t){m(this,e),this._spinner=t,this.pendingRequestsCount=0}return l(e,[{key:"intercept",value:function(e,t){var n=this;return this.pendingRequestsCount++,this._spinner.showSpinner(),t.handle(e).pipe(Object(k.a)(function(e){if(e instanceof b.e){n.pendingRequestsCount--;var t=e.url?e.url.toString().split("/"):"";0===n.pendingRequestsCount&&"importstatus"!==t[t.length-1]&&"folders"!==t[t.length-1]&&"labelfiles"!==t[t.length-1]&&n._spinner.hideSpinner()}},function(e){e instanceof b.d&&(n.pendingRequestsCount--,n._spinner.hideSpinner())}))}}]),e}()).\u0275fac=function(e){return new(e||a)(d.Qb(w.a))},a.\u0275prov=d.Db({token:a,factory:a.\u0275fac}),a),S=n("O+1G"),E=((s=function e(){m(this,e)}).\u0275mod=d.Fb({type:s}),s.\u0275inj=d.Eb({factory:function(e){return new(e||s)},imports:[[c.b]]}),s),O=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/assets/i18n/",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".json";m(this,e),this.http=t,this.prefix=n,this.suffix=r}return l(e,[{key:"getTranslation",value:function(e){return this.http.get("".concat(this.prefix).concat(e).concat(this.suffix))}}]),e}(),T=function(e){return new O(e,"../assets/i18n/",".json")},x=((u=function e(){m(this,e)}).\u0275mod=d.Fb({type:u}),u.\u0275inj=d.Eb({factory:function(e){return new(e||u)},providers:[_.a,{provide:b.a,useClass:y,multi:!0},{provide:b.a,useClass:C,multi:!0}],imports:[[c.b,g.e,g.k,f.a,v,E,p,S.a,h.b.forRoot({loader:{provide:h.a,useFactory:T,deps:[b.b]}})],f.a,v,E,p,S.a,g.e,g.k,h.b]}),u)},LRne:function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n("z+Ro"),i=n("yCtX"),o=n("jZKg");function a(){for(var e=arguments.length,t=new Array(e),n=0;n=2;return function(l){return l.pipe(e?Object(i.a)(function(t,n){return e(t,n,l)}):u.a,Object(o.a)(1),n?Object(a.a)(t):Object(s.a)(function(){return new r.a}))}}},XDbj:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("sVev"),i=n("7o/Q");function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u;return function(t){return t.lift(new a(e))}}var a=function(){function e(t){m(this,e),this.errorFactory=t}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new s(e,this.errorFactory))}}]),e}(),s=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).errorFactory=r,i.hasValue=!1,i}return l(n,[{key:"_next",value:function(e){this.hasValue=!0,this.destination.next(e)}},{key:"_complete",value:function(){if(this.hasValue)return this.destination.complete();var e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}]),n}(i.a);function u(){return new r.a}},XNiG:function(e,t,n){"use strict";n.d(t,"b",function(){return f}),n.d(t,"a",function(){return v});var r=n("HDdC"),i=n("7o/Q"),o=n("quSY"),a=n("9ppp"),s=n("Ylt2"),u=n("2QA8"),f=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this,e)).destination=e,r}return n}(i.a),v=function(){var e=function(e){h(n,e);var t=d(n);function n(){var e;return m(this,n),(e=t.call(this)).observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return l(n,[{key:u.a,value:function(){return new f(this)}},{key:"lift",value:function(e){var t=new p(this,this);return t.operator=e,t}},{key:"next",value:function(e){if(this.closed)throw new a.a;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return Object(r.a)(i.a,e)}},bOdf:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n("5+tZ");function i(e,t){return Object(r.a)(e,t,1)}},c2HN:function(e,t,n){"use strict";function r(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}n.d(t,"a",function(){return r})},cp0P:function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n("HDdC"),i=n("DH7j"),a=n("lJxs"),s=n("XoHu"),u=n("Cfvw");function l(){for(var e=arguments.length,t=new Array(e),n=0;n1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null}}]),n}(k.a),O=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this)).source=e,i.subjectFactory=r,i._refCount=0,i._isComplete=!1,i}return l(n,[{key:"_subscribe",value:function(e){return this.getSubject().subscribe(e)}},{key:"getSubject",value:function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject}},{key:"connect",value:function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new f.a).add(this.source.subscribe(new x(this.getSubject(),this))),e.closed&&(this._connection=null,e=f.a.EMPTY)),e}},{key:"refCount",value:function(){return w()(this)}}]),n}(v.a),T={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(C=O.prototype)._subscribe},_isComplete:{value:C._isComplete,writable:!0},getSubject:{value:C.getSubject},connect:{value:C.connect},refCount:{value:C.refCount}},x=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).connectable=r,i}return l(n,[{key:"_error",value:function(e){this._unsubscribe(),c(g(n.prototype),"_error",this).call(this,e)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),c(g(n.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}]),n}(u.b);function A(){return new u.a}function j(e){return{toString:e}.toString()}function P(e,t,n){return j(function(){var i=function(e){return function(){if(e){var t=e.apply(void 0,arguments);for(var n in t)this[n]=t[n]}}}(t);function o(){for(var e=arguments.length,t=new Array(e),n=0;n=e.length?e.push(n):e.splice(t,0,n)}function he(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function fe(e,t){for(var n=[],r=0;r=0?e[1|r]=n:function(e,t,n,r){var i=e.length;if(i==t)e.push(n,r);else if(1===i)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;)e[i]=e[i-2],i--;e[t]=n,e[t+1]=r}}(e,r=~r,t,n),r}function ve(e,t){var n=pe(e,t);if(n>=0)return e[1|n]}function pe(e,t){return function(e,t,n){for(var r=0,i=e.length>>1;i!==r;){var o=r+(i-r>>1),a=e[o<<1];if(t===a)return o<<1;a>t?i=o:r=o+1}return~(i<<1)}(e,t)}var ye,ge=((ye={})[ye.Emulated=0]="Emulated",ye[ye.None=2]="None",ye[ye.ShadowDom=3]="ShadowDom",ye),me={},be=[],_e=M({"\u0275cmp":M}),ke=M({"\u0275dir":M}),we=M({"\u0275pipe":M}),Ce=M({"\u0275mod":M}),Se=M({"\u0275loc":M}),Ee=M({"\u0275fac":M}),Oe=M({__NG_ELEMENT_ID__:M}),Te=0;function xe(e){return j(function(){var t={},n={type:e.type,providersResolver:null,decls:e.decls,vars:e.vars,factory:null,template:e.template||null,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:e.exportAs||null,onPush:e.changeDetection===J.OnPush,directiveDefs:null,pipeDefs:null,selectors:e.selectors||be,viewQuery:e.viewQuery||null,features:e.features||null,data:e.data||{},encapsulation:e.encapsulation||ge.Emulated,id:"c",styles:e.styles||be,_:null,setInput:null,schemas:e.schemas||null,tView:null},r=e.directives,i=e.features,o=e.pipes;return n.id+=Te++,n.inputs=Re(e.inputs,t),n.outputs=Re(e.outputs),i&&i.forEach(function(e){return e(n)}),n.directiveDefs=r?function(){return("function"==typeof r?r():r).map(Ae)}:null,n.pipeDefs=o?function(){return("function"==typeof o?o():o).map(je)}:null,n})}function Ae(e){return Ve(e)||function(e){return e[ke]||null}(e)}function je(e){return function(e){return e[we]||null}(e)}var Pe={};function Ie(e){var t={type:e.type,bootstrap:e.bootstrap||be,declarations:e.declarations||be,imports:e.imports||be,exports:e.exports||be,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null};return null!=e.id&&j(function(){Pe[e.id]=e.type}),t}function De(e,t){return j(function(){var n=Me(e,!0);n.declarations=t.declarations||be,n.imports=t.imports||be,n.exports=t.exports||be})}function Re(e,t){if(null==e)return me;var n={};for(var r in e)if(e.hasOwnProperty(r)){var i=e[r],o=i;Array.isArray(i)&&(o=i[1],i=i[0]),n[i]=r,t&&(t[i]=o)}return n}var Ne=xe;function Le(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,onDestroy:e.type.prototype.ngOnDestroy||null}}function Ve(e){return e[_e]||null}function Me(e,t){var n=e[Ce]||null;if(!n&&!0===t)throw new Error("Type ".concat(L(e)," does not have '\u0275mod' property."));return n}function Fe(e){return"string"==typeof e?e:null==e?"":""+e}function He(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():Fe(e)}var Ue,qe=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}({});function ze(e){var t=Ue;return Ue=e,t}function Be(e,t,n){var r=q(e);if(r&&"root"==r.providedIn)return void 0===r.value?r.value=r.factory():r.value;if(n&qe.Optional)return null;if(void 0!==t)return t;throw new Error("Injector: NOT_FOUND [".concat(L(e),"]"))}var Qe={},We=/\n/gm,Ke=M({provide:String,useValue:M}),Ge=void 0;function Ze(e){var t=Ge;return Ge=e,t}function Xe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qe.Default;if(void 0===Ge)throw new Error("inject() must be called from an injection context");return null===Ge?Be(e,void 0,t):Ge.get(e,t&qe.Optional?null:void 0,t)}function Je(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qe.Default;return(Ue||Xe)(oe(e),t)}function Ye(e){for(var t=[],n=0;n"),!0}},{key:"endElement",value:function(e){var t=e.nodeName.toLowerCase();Pn.hasOwnProperty(t)&&!Tn.hasOwnProperty(t)&&(this.buf.push(""))}},{key:"chars",value:function(e){this.buf.push(Fn(e))}},{key:"checkClobberedElement",value:function(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t}}]),e}(),Vn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Mn=/([^\#-~ |!])/g;function Fn(e){return e.replace(/&/g,"&").replace(Vn,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(Mn,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}function Hn(e,t){var n=null;try{On=On||function(e){return function(){try{return!!(new window.DOMParser).parseFromString($t(""),"text/html")}catch(e){return!1}}()?new bn:new _n(e)}(e);var r=t?String(t):"";n=On.getInertBodyElement(r);var i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=On.getInertBodyElement(r)}while(r!==o);var a=new Ln,s=a.sanitizeChildren(Un(n)||n);return gn()&&a.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),s}finally{if(n)for(var u=Un(n)||n;u.firstChild;)u.removeChild(u.firstChild)}}function Un(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var qn=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}({});function zn(e){var t=Qn();return t?t.sanitize(qn.HTML,e)||"":un(e,"HTML")?sn(e):Hn(tt(),Fe(e))}function Bn(e){var t=Qn();return t?t.sanitize(qn.URL,e)||"":un(e,"URL")?sn(e):Cn(Fe(e))}function Qn(){var e=St();return e&&e[12]}function Wn(e,t){return e.hasOwnProperty(Ee)?e[Ee]:null}var Kn=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,function(e,t){return"".concat(e?"NG0".concat(e,": "):"").concat(t)}(e,r))).code=e,i}return n}(n(Error));function Gn(e,t){var n=t?" in "+t:"";throw new Kn("201","No provider for ".concat(He(e)," found").concat(n))}var Zn=function(){function e(t,n,r){m(this,e),this.previousValue=t,this.currentValue=n,this.firstChange=r}return l(e,[{key:"isFirstChange",value:function(){return this.firstChange}}]),e}();function Xn(){return Jn}function Jn(e){return e.type.prototype.ngOnChanges&&(e.setInput=$n),Yn}function Yn(){var e=er(this),t=null==e?void 0:e.current;if(t){var n=e.previous;if(n===me)e.previous=t;else for(var r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function $n(e,t,n,r){var i=er(e)||function(e,t){return e.__ngSimpleChanges__=t}(e,{previous:me,current:null}),o=i.current||(i.current={}),a=i.previous,s=this.declaredInputs[n],u=a[s];o[s]=new Zn(u&&u.currentValue,t,a===me),e[r]=t}function er(e){return e.__ngSimpleChanges__||null}function tr(e,t){for(var n=t.directiveStart,r=t.directiveEnd;n=r)break}else t[a]<0&&(e[18]+=65536),(o>11>16&&(3&e[2])===t&&(e[2]+=2048,o.call(a)):o.call(a)}Xn.ngInherit=!0;var sr=function e(t,n,r){m(this,e),this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r};function ur(e,t,n){for(var r=ut(e),i=0;it){a=o-1;break}}}for(;o>16,r=t;n>0;)r=r[15],n--;return r}var yr=!0;function gr(e){var t=yr;return yr=e,t}var mr=0;function br(e,t){var n=kr(e,t);if(-1!==n)return n;var r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,_r(r.data,e),_r(t,null),_r(r.blueprint,null));var i=wr(e,t),o=e.injectorIndex;if(dr(i))for(var a=vr(i),s=pr(i,t),u=s[1].data,l=0;l<8;l++)t[o+l]=s[a+l]|u[a+l];return t[o+8]=i,o}function _r(e,t){e.push(0,0,0,0,0,0,0,0,t)}function kr(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function wr(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;for(var n=0,r=null,i=t;null!==i;){var o=i[1],a=o.type;if(null===(r=2===a?o.declTNode:1===a?i[6]:null))return-1;if(n++,i=i[15],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return-1}function Cr(e,t,n){!function(e,t,n){var r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(Oe)&&(r=n[Oe]),null==r&&(r=n[Oe]=mr++);var i=255&r,o=1<3&&void 0!==arguments[3]?arguments[3]:qe.Default,i=arguments.length>4?arguments[4]:void 0;if(null!==e){var o=function(e){if("string"==typeof e)return e.charCodeAt(0)||0;var t=e.hasOwnProperty(Oe)?e[Oe]:void 0;return"number"==typeof t?t>=0?255&t:xr:t}(n);if("function"==typeof o){if(!qt(t,e,r))return r&qe.Host?Sr(i,n,r):Er(t,n,r,i);try{var a=o();if(null!=a||r&qe.Optional)return a;Gn(n)}finally{Gt()}}else if("number"==typeof o){var s=null,u=kr(e,t),l=-1,c=r&qe.Host?t[16][6]:null;for((-1===u||r&qe.SkipSelf)&&(-1!==(l=-1===u?wr(e,t):t[u+8])&&Dr(r,!1)?(s=t[1],u=vr(l),t=pr(l,t)):u=-1);-1!==u;){var h=t[1];if(Ir(o,u,h.data)){var f=Ar(u,t,n,s,r,c);if(f!==Tr)return f}-1!==(l=t[u+8])&&Dr(r,t[1].data[u+8]===c)&&Ir(o,u,t)?(s=h,u=vr(l),t=pr(l,t)):u=-1}}}return Er(t,n,r,i)}var Tr={};function xr(){return new Rr(Tt(),St())}function Ar(e,t,n,r,i,o){var a=t[1],s=a.data[e+8],u=jr(s,a,n,null==r?ot(s)&&yr:r!=a&&0!=(3&s.type),i&qe.Host&&o===s);return null!==u?Pr(t,a,u,s):Tr}function jr(e,t,n,r,i){for(var o=e.providerIndexes,a=t.data,s=1048575&o,u=e.directiveStart,l=o>>20,c=i?s+l:e.directiveEnd,h=r?s:s+l;h=u&&f.type===n)return h}if(i){var d=a[u];if(d&&st(d)&&d.type===n)return u}return null}function Pr(e,t,n,r){var i=e[n],o=t.data;if(i instanceof sr){var a=i;a.resolving&&function(e,t){throw new Kn("200","Circular dependency in DI detected for "+e)}(He(o[n]));var s=gr(a.canSeeViewProviders);a.resolving=!0;var u=a.injectImpl?ze(a.injectImpl):null;qt(e,r,qe.Default);try{i=e[n]=a.factory(void 0,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&function(e,t,n){var r=t.type.prototype,i=r.ngOnChanges,o=r.ngOnInit,a=r.ngDoCheck;if(i){var s=Jn(t);(n.preOrderHooks||(n.preOrderHooks=[])).push(e,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,s)}o&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-e,o),a&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e,a),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,a))}(n,o[n],t)}finally{null!==u&&ze(u),gr(s),a.resolving=!1,Gt()}}return i}function Ir(e,t,n){var r=64&e,i=32&e;return!!((128&e?r?i?n[t+7]:n[t+6]:i?n[t+5]:n[t+4]:r?i?n[t+3]:n[t+2]:i?n[t+1]:n[t])&1<1?t-1:0),r=1;r0&&(e[r-1][4]=i[4]);var a=he(e,10+t);vi(i[1],n=i,n[11],2,null,null),n[0]=null,n[6]=null;var s=a[19];null!==s&&s.detachView(a[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}}function ti(e,t){if(!(256&t[2])){var n=t[11];ut(n)&&n.destroyNode&&vi(e,t,n,3,null,null),function(e){var t=e[13];if(!t)return ni(e[1],e);for(;t;){var n=null;if(nt(t))n=t[13];else{var r=t[10];r&&(n=r)}if(!n){for(;t&&!t[4]&&t!==e;)nt(t)&&ni(t[1],t),t=t[3];null===t&&(t=e),nt(t)&&ni(t[1],t),n=t&&t[4]}t=n}}(t)}}function ni(e,t){if(!(256&t[2])){t[2]&=-129,t[2]|=256,function(e,t){var n;if(null!=e&&null!=(n=e.destroyHooks))for(var r=0;r=0?r[u]():r[-u].unsubscribe(),i+=2}else n[i].call(r[n[i+1]]);t[7]=null}}(e,t),1===t[1].type&&ut(t[11])&&t[11].destroy();var n=t[17];if(null!==n&&rt(t[3])){n!==t[3]&&$r(n,t);var r=t[19];null!==r&&r.detachView(e)}}}function ri(e,t,n){return function(e,t,n){for(var r=t;null!==r&&40&r.type;)r=(t=r).parent;if(null===r)return n[0];if(2&r.flags){var i=e.data[r.directiveStart].encapsulation;if(i===ge.None||i===ge.Emulated)return null}return ft(r,n)}(e,t.parent,n)}function ii(e,t,n,r,i){ut(e)?e.insertBefore(t,n,r,i):t.insertBefore(n,r,i)}function oi(e,t,n){ut(e)?e.appendChild(t,n):t.appendChild(n)}function ai(e,t,n,r,i){null!==r?ii(e,t,n,r,i):oi(e,t,n)}function si(e,t){return ut(e)?e.parentNode(t):t.parentNode}function ui(e,t,n){return li(e,t,n)}var li=function(e,t,n){return 40&e.type?ft(e,n):null};function ci(e,t,n,r){var i=ri(e,r,t),o=t[11],a=ui(r.parent||t[6],r,t);if(null!=i)if(Array.isArray(n))for(var s=0;so?"":i[c+1].toLowerCase();var f=8&r?h:null;if(f&&-1!==mi(f,l,0)||2&r&&l!==h){if(Ci(r))return!1;a=!0}}}}else{if(!a&&!Ci(r)&&!Ci(u))return!1;if(a&&Ci(u))continue;a=!1,r=u|1&r}}return Ci(r)||a}function Ci(e){return 0==(1&e)}function Si(e,t,n,r){if(null===t)return-1;var i=0;if(r||!n){for(var o=!1;i-1)for(n++;n2&&void 0!==arguments[2]&&arguments[2],r=0;r0?'="'+s+'"':"")+"]"}else 8&r?i+="."+a:4&r&&(i+=" "+a);else""===i||Ci(a)||(t+=Ti(o,i),i=""),r=a,o=o||!Ci(r);n++}return""!==i&&(t+=Ti(o,i)),t}var Ai={};function ji(e){Pi(Et(),St(),Xt()+e,It())}function Pi(e,t,n,r){if(!r)if(3==(3&t[2])){var i=e.preOrderCheckHooks;null!==i&&nr(t,i,n)}else{var o=e.preOrderHooks;null!==o&&rr(t,o,0,n)}Jt(n)}function Ii(e,t){return e<<17|t<<2}function Di(e){return e>>17&32767}function Ri(e){return 2|e}function Ni(e){return(131068&e)>>2}function Li(e,t){return-131069&e|t<<2}function Vi(e){return 1|e}function Mi(e,t){var n=e.contentQueries;if(null!==n)for(var r=0;r20&&Pi(e,t,20,It()),n(r,i)}finally{Jt(o)}}function Wi(e,t,n){if(it(t))for(var r=t.directiveEnd,i=t.directiveStart;i2&&void 0!==arguments[2]?arguments[2]:ft,r=t.localNames;if(null!==r)for(var i=t.index+1,o=0;o0;){var n=e[--t];if("number"==typeof n&&n<0)return n}return 0})(s)!=u&&s.push(u),s.push(r,i,a)}}function no(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function ro(e,t){t.flags|=2,(e.components||(e.components=[])).push(t.index)}function io(e,t,n){if(n){if(t.exportAs)for(var r=0;r0&&fo(n)}}function fo(e){for(var t=Gr(e);null!==t;t=Zr(t))for(var n=10;n0&&fo(r)}var o=e[1].components;if(null!==o)for(var a=0;a0&&fo(s)}}function vo(e,t){var n=pt(t,e),r=n[1];!function(e,t){for(var n=t.length;n1&&void 0!==arguments[1]?arguments[1]:Qe;if(t===Qe){var n=new Error("NullInjectorError: No provider for ".concat(L(e),"!"));throw n.name="NullInjectorError",n}return t}}]),e}(),xo=new Z("Set Injector scope."),Ao={},jo={},Po=[],Io=void 0;function Do(){return void 0===Io&&(Io=new To),Io}function Ro(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return new No(e,n,t||Do(),r)}var No=function(){function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;m(this,e),this.parent=r,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var a=[];n&&le(n,function(e){return i.processProvider(e,t,n)}),le([t],function(e){return i.processInjectorType(e,[],a)}),this.records.set(Oo,Mo(void 0,this));var s=this.records.get(xo);this.scope=null!=s?s.value:null,this.source=o||("object"==typeof t?null:L(t))}return l(e,[{key:"destroy",value:function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(function(e){return e.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qe,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:qe.Default;this.assertNotDestroyed();var r,i=Ze(this);try{if(!(n&qe.SkipSelf)){var o=this.records.get(e);if(void 0===o){var a=("function"==typeof(r=e)||"object"==typeof r&&r instanceof Z)&&q(e);o=a&&this.injectableDefInScope(a)?Mo(Lo(e),Ao):null,this.records.set(e,o)}if(null!=o)return this.hydrate(e,o)}return(n&qe.Self?Do():this.parent).get(e,t=n&qe.Optional&&t===Qe?null:t)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(L(e)),i)throw s;return function(e,t,n,r){var i=e.ngTempTokenPath;throw t.__source&&i.unshift(t.__source),e.message=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.substr(2):e;var i=L(t);if(Array.isArray(t))i=t.map(L).join(" -> ");else if("object"==typeof t){var o=[];for(var a in t)if(t.hasOwnProperty(a)){var s=t[a];o.push(a+":"+("string"==typeof s?JSON.stringify(s):L(s)))}i="{".concat(o.join(", "),"}")}return"".concat(n).concat(r?"("+r+")":"","[").concat(i,"]: ").concat(e.replace(We,"\n "))}("\n"+e.message,i,"R3InjectorError",r),e.ngTokenPath=i,e.ngTempTokenPath=null,e}(s,e,0,this.source)}throw s}finally{Ze(i)}}},{key:"_resolveInjectorDefTypes",value:function(){var e=this;this.injectorDefTypes.forEach(function(t){return e.get(t)})}},{key:"toString",value:function(){var e=[];return this.records.forEach(function(t,n){return e.push(L(n))}),"R3Injector[".concat(e.join(", "),"]")}},{key:"assertNotDestroyed",value:function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}},{key:"processInjectorType",value:function(e,t,n){var r=this;if(!(e=oe(e)))return!1;var i=B(e),o=null==i&&e.ngModule||void 0,a=void 0===o?e:o,s=-1!==n.indexOf(a);if(void 0!==o&&(i=B(o)),null==i)return!1;if(null!=i.imports&&!s){var u;n.push(a);try{le(i.imports,function(e){r.processInjectorType(e,t,n)&&(void 0===u&&(u=[]),u.push(e))})}finally{}if(void 0!==u)for(var l=function(e){var t=u[e],n=t.ngModule,i=t.providers;le(i,function(e){return r.processProvider(e,n,i||Po)})},c=0;c0){var n=fe(t,"?");throw new Error("Can't resolve all parameters for ".concat(L(e),": (").concat(n.join(", "),")."))}var r=function(e){var t=e&&(e[Q]||e[K]);if(t){var n=function(e){if(e.hasOwnProperty("name"))return e.name;var t=(""+e).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(e);return console.warn('DEPRECATED: DI is instantiating a token "'.concat(n,'" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "').concat(n,'" class.')),t}return null}(e);return null!==r?function(){return r.factory(e)}:function(){return new e}}(e);throw new Error("unreachable")}function Vo(e,t,n){var i,a=void 0;if(Ho(e)){var s=oe(e);return Wn(s)||Lo(s)}if(Fo(e))a=function(){return oe(e.useValue)};else if((i=e)&&i.useFactory)a=function(){return e.useFactory.apply(e,o(Ye(e.deps||[])))};else if(function(e){return!(!e||!e.useExisting)}(e))a=function(){return Je(oe(e.useExisting))};else{var u=oe(e&&(e.useClass||e.provide));if(!function(e){return!!e.deps}(e))return Wn(u)||Lo(u);a=function(){return r(u,o(Ye(e.deps)))}}return a}function Mo(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:e,value:t,multi:n?[]:void 0}}function Fo(e){return null!==e&&"object"==typeof e&&Ke in e}function Ho(e){return"function"==typeof e}var Uo=function(e,t,n){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0,i=Ro(e,t,n,r);return i._resolveInjectorDefTypes(),i}({name:n},t,e,n)},qo=function(){var e=function(){function e(){m(this,e)}return l(e,null,[{key:"create",value:function(e,t){return Array.isArray(e)?Uo(e,t,""):Uo(e.providers,e.parent,e.name||"")}}]),e}();return e.THROW_IF_NOT_FOUND=Qe,e.NULL=new To,e.\u0275prov=H({token:e,providedIn:"any",factory:function(){return Je(Oo)}}),e.__NG_ELEMENT_ID__=-1,e}();function zo(e,t){tr(yt(e)[1],Tt())}function Bo(e){for(var t=Object.getPrototypeOf(e.type.prototype).constructor,n=!0,r=[e];t;){var i=void 0;if(st(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Error("Directives cannot inherit Components");i=t.\u0275dir}if(i){if(n){r.push(i);var o=e;o.inputs=Qo(e.inputs),o.declaredInputs=Qo(e.declaredInputs),o.outputs=Qo(e.outputs);var a=i.hostBindings;a&&Go(e,a);var s=i.viewQuery,u=i.contentQueries;if(s&&Wo(e,s),u&&Ko(e,u),F(e.inputs,i.inputs),F(e.declaredInputs,i.declaredInputs),F(e.outputs,i.outputs),st(i)&&i.data.animation){var l=e.data;l.animation=(l.animation||[]).concat(i.data.animation)}}var c=i.features;if(c)for(var h=0;h=0;r--){var i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=hr(i.hostAttrs,n=hr(n,i.hostAttrs))}}(r)}function Qo(e){return e===me?{}:e===be?[]:e}function Wo(e,t){var n=e.viewQuery;e.viewQuery=n?function(e,r){t(e,r),n(e,r)}:t}function Ko(e,t){var n=e.contentQueries;e.contentQueries=n?function(e,r,i){t(e,r,i),n(e,r,i)}:t}function Go(e,t){var n=e.hostBindings;e.hostBindings=n?function(e,r){t(e,r),n(e,r)}:t}var Zo=null;function Xo(){if(!Zo){var e=ne.Symbol;if(e&&e.iterator)Zo=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n1&&void 0!==arguments[1]?arguments[1]:qe.Default,n=St();return null===n?Je(e,t):Or(Tt(),n,oe(e),t)}function ua(e){return function(e,t){if("class"===t)return e.classes;if("style"===t)return e.styles;var n=e.attrs;if(n)for(var r=n.length,i=0;i2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=St(),o=Et(),a=Tt();return function(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0,u=at(r),l=e.firstCreatePass&&(e.cleanup||(e.cleanup=[])),c=ko(t),h=!0;if(3&r.type){var f=ft(r,t),d=s?s(f):me,v=d.target||f,p=c.length,y=s?function(e){return s(ct(e[r.index])).target}:r.index;if(ut(n)){var g=null;if(!s&&u&&(g=function(e,t,n,r){var i=e.cleanup;if(null!=i)for(var o=0;ou?s[u]:null}"string"==typeof a&&(o+=2)}return null}(e,t,i,r.index)),null!==g)(g.__ngLastListenerFn__||g).__ngNextListenerFn__=o,g.__ngLastListenerFn__=o,h=!1;else{o=ka(r,t,o,!1);var m=n.listen(d.name||v,i,o);c.push(o,m),l&&l.push(i,y,p,p+1)}}else o=ka(r,t,o,!0),v.addEventListener(i,o,a),c.push(o),l&&l.push(i,y,p,a)}var b,_=r.outputs;if(h&&null!==_&&(b=_[i])){var k=b.length;if(k)for(var w=0;w0&&void 0!==arguments[0]?arguments[0]:1;return function(e){return(wt.lFrame.contextLView=function(e,t){for(;e>0;)t=t[15],e--;return t}(e,wt.lFrame.contextLView))[8]}(e)}function Ca(e,t){for(var n=null,r=function(e){var t=e.attrs;if(null!=t){var n=t.indexOf(5);if(0==(1&n))return t[n+1]}return null}(e),i=0;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=St(),i=Et(),o=Hi(i,20+e,16,null,n||null);null===o.projection&&(o.projection=t),Pt(),64!=(64&o.flags)&&function(e,t,n){pi(t[11],0,t,n,ri(e,n,t),ui(n.parent||t[6],n,t))}(i,r,o)}function Oa(e,t,n){return Ta(e,"",t,"",n),Oa}function Ta(e,t,n,r,i){var o=St(),a=ia(o,t,n,r);return a!==Ai&&$i(Et(),Yt(),o,e,a,o[11],i,!1),Ta}var xa=[];function Aa(e,t,n,r,i){for(var o=e[n+1],a=null===t,s=r?Di(o):Ni(o),u=!1;0!==s&&(!1===u||a);){var l=e[s+1];ja(e[s],t)&&(u=!0,e[s+1]=r?Vi(l):Ri(l)),s=r?Di(l):Ni(l)}u&&(e[n+1]=r?Ri(o):Vi(o))}function ja(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&pe(e,t)>=0}var Pa={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Ia(e){return e.substring(Pa.key,Pa.keyEnd)}function Da(e){return e.substring(Pa.value,Pa.valueEnd)}function Ra(e,t){var n=Pa.textEnd,r=Pa.key=Na(e,t,n);return n===r?-1:(r=Pa.keyEnd=function(e,t,n){for(var r;t=65&&(-33&r)<=90||r>=48&&r<=57);)t++;return t}(e,r,n),r=La(e,r,n),r=Pa.value=Na(e,r,n),r=Pa.valueEnd=function(e,t,n){for(var r=-1,i=-1,o=-1,a=t,s=a;a32&&(s=a),o=i,i=r,r=-33&u}return s}(e,r,n),La(e,r,n))}function Na(e,t,n){for(;t=0;n=Ra(t,n))Qa(e,Ia(t),Da(t))}function Ua(e,t){return t>=e.expandoStartIndex}function qa(e,t,n,r){var i=e.data;if(null===i[n+1]){var o=i[Xt()],a=Ua(e,n);Za(o,r)&&null===t&&!a&&(t=!1),t=function(e,t,n,r){var i=function(e){var t=wt.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}(e),o=r?t.residualClasses:t.residualStyles;if(null===i)0===(r?t.classBindings:t.styleBindings)&&(n=Ba(n=za(null,e,t,n,r),t.attrs,r),o=null);else{var a=t.directiveStylingLast;if(-1===a||e[a]!==i)if(n=za(i,e,t,n,r),null===o){var s=function(e,t,n){var r=n?t.classBindings:t.styleBindings;if(0!==Ni(r))return e[Di(r)]}(e,t,r);void 0!==s&&Array.isArray(s)&&function(e,t,n,r){e[Di(n?t.classBindings:t.styleBindings)]=r}(e,t,r,s=Ba(s=za(null,e,t,s[1],r),t.attrs,r))}else o=function(e,t,n){for(var r=void 0,i=t.directiveEnd,o=1+t.directiveStylingLast;o0)&&(c=!0)}else l=n;if(i)if(0!==u){var f=Di(e[s+1]);e[r+1]=Ii(f,s),0!==f&&(e[f+1]=Li(e[f+1],r)),e[s+1]=131071&e[s+1]|r<<17}else e[r+1]=Ii(s,0),0!==s&&(e[s+1]=Li(e[s+1],r)),s=r;else e[r+1]=Ii(u,0),0===s?s=r:e[u+1]=Li(e[u+1],r),u=r;c&&(e[r+1]=Ri(e[r+1])),Aa(e,l,r,!0),Aa(e,l,r,!1),function(e,t,n,r,i){var o=i?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof t&&pe(o,t)>=0&&(n[r+1]=Vi(n[r+1]))}(t,l,e,r,o),a=Ii(s,u),o?t.classBindings=a:t.styleBindings=a}(i,o,t,n,a,r)}}function za(e,t,n,r,i){var o=null,a=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s0;){var u=e[i],l=Array.isArray(u),c=l?u[1]:u,h=null===c,f=n[i+1];f===Ai&&(f=h?xa:void 0);var d=h?ve(f,r):c===r?f:void 0;if(l&&!Ga(d)&&(d=ve(u,r)),Ga(d)&&(s=d,a))return s;var v=e[i+1];i=a?Di(v):Ni(v)}if(null!==t){var p=o?t.residualClasses:t.residualStyles;null!=p&&(s=ve(p,r))}return s}function Ga(e){return void 0!==e}function Za(e,t){return 0!=(e.flags&(t?16:32))}function Xa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=St(),r=Et(),i=e+20,o=r.firstCreatePass?Hi(r,i,1,t,null):r.data[i],a=n[i]=function(e,t){return ut(e)?e.createText(t):e.createTextNode(t)}(n[11],t);ci(r,n,a,o),At(o,!1)}function Ja(e){return Ya("",e,""),Ja}function Ya(e,t,n){var r=St(),i=ia(r,e,t,n);return i!==Ai&&So(r,Xt(),i),Ya}function $a(e,t,n,r,i){var o=St(),a=function(e,t,n,r,i,o){var a=na(e,Nt(),n,i);return Vt(2),a?t+Fe(n)+r+Fe(i)+o:Ai}(o,e,t,n,r,i);return a!==Ai&&So(o,Xt(),a),$a}function es(e,t,n,r,i,o,a){var s=St(),u=function(e,t,n,r,i,o,a,s){var u=function(e,t,n,r,i){var o=na(e,t,n,r);return ta(e,t+2,i)||o}(e,Nt(),n,i,a);return Vt(3),u?t+Fe(n)+r+Fe(i)+o+Fe(a)+s:Ai}(s,e,t,n,r,i,o,a);return u!==Ai&&So(s,Xt(),u),es}function ts(e,t,n){var r=St();return ta(r,Lt(),t)&&$i(Et(),Yt(),r,e,t,r[11],n,!0),ts}var ns=void 0,rs=["en",[["a","p"],["AM","PM"],ns],[["AM","PM"],ns,ns],[["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"]],ns,[["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"]],ns,[["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}",ns,"{1} 'at' {0}",ns],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}],is={};function os(e,t,n){"string"!=typeof t&&(n=t,t=e[cs.LocaleId]),t=t.toLowerCase().replace(/_/g,"-"),is[t]=e,n&&(is[t][cs.ExtraData]=n)}function as(e){var t=function(e){return e.toLowerCase().replace(/_/g,"-")}(e),n=ls(t);if(n)return n;var r=t.split("-")[0];if(n=ls(r))return n;if("en"===r)return rs;throw new Error('Missing locale data for the locale "'.concat(e,'".'))}function ss(e){return as(e)[cs.CurrencyCode]||null}function us(e){return as(e)[cs.PluralCase]}function ls(e){return e in is||(is[e]=ne.ng&&ne.ng.common&&ne.ng.common.locales&&ne.ng.common.locales[e]),is[e]}var cs=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}({});function hs(e){var t;null==(t=e)&&function(e,t,n,r){throw new Error("ASSERTION ERROR: Expected localeId to be defined"+" [Expected=> null != ".concat(t," <=Actual]"))}(0,t),"string"==typeof e&&e.toLowerCase().replace(/_/g,"-")}function fs(e,t,n,r,i){if(e=oe(e),Array.isArray(e))for(var o=0;o>20;if(Ho(e)||!e.multi){var v=new sr(l,i,sa),p=ps(u,t,i?h:h+d,f);-1===p?(Cr(br(c,s),a,u),ds(a,e,t.length),t.push(u),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),n.push(v),s.push(v)):(n[p]=v,s[p]=v)}else{var y=ps(u,t,h+d,f),g=ps(u,t,h,h+d),m=y>=0&&n[y],b=g>=0&&n[g];if(i&&!b||!i&&!m){Cr(br(c,s),a,u);var _=function(e,t,n,r,i){var o=new sr(e,n,sa);return o.multi=[],o.index=t,o.componentProviders=0,vs(o,i,r&&!n),o}(i?gs:ys,n.length,i,r,l);!i&&b&&(n[g].providerFactory=_),ds(a,e,t.length,0),t.push(u),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),n.push(_),s.push(_)}else ds(a,e,y>-1?y:g,vs(n[i?g:y],l,!i&&r));!i&&r&&b&&n[g].componentProviders++}}}function ds(e,t,n,r){var i=Ho(t);if(i||t.useClass){var o=(t.useClass||t).prototype.ngOnDestroy;if(o){var a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){var s=a.indexOf(n);-1===s?a.push(n,[r,o]):a[s+1].push(r,o)}else a.push(n,o)}}}function vs(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function ps(e,t,n,r){for(var i=n;i1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,r){return function(e,t,n){var r=Et();if(r.firstCreatePass){var i=st(e);fs(n,r.data,r.blueprint,i,!0),fs(t,r.data,r.blueprint,i,!1)}}(n,r?r(e):e,t)}}}var _s=function e(){m(this,e)},ks=function(){function e(){m(this,e)}return l(e,[{key:"resolveComponentFactory",value:function(e){throw function(e){var t=Error("No component factory found for ".concat(L(e),". Did you add it to @NgModule.entryComponents?"));return t.ngComponent=e,t}(e)}}]),e}(),ws=function(){var e=function e(){m(this,e)};return e.NULL=new ks,e}();function Cs(){}function Ss(e,t){return new Os(ft(e,t))}var Es=function(){return Ss(Tt(),St())},Os=function(){var e=function e(t){m(this,e),this.nativeElement=t};return e.__NG_ELEMENT_ID__=Es,e}(),Ts=function e(){m(this,e)},xs=function(){var e=function e(){m(this,e)};return e.__NG_ELEMENT_ID__=function(){return As()},e}(),As=function(){var e=St(),t=pt(Tt().index,e);return function(e){return e[11]}(nt(t)?t:e)},js=function(){var e=function e(){m(this,e)};return e.\u0275prov=H({token:e,providedIn:"root",factory:function(){return null}}),e}(),Ps=function e(t){m(this,e),this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")},Is=new Ps("11.0.2"),Ds=function(){function e(){m(this,e)}return l(e,[{key:"supports",value:function(e){return Yo(e)}},{key:"create",value:function(e){return new Ns(e)}}]),e}(),Rs=function(e,t){return t},Ns=function(){function e(t){m(this,e),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=t||Rs}return l(e,[{key:"forEachItem",value:function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)}},{key:"forEachOperation",value:function(e){for(var t=this._itHead,n=this._removalsHead,r=0,i=null;t||n;){var o=!n||t&&t.currentIndex4&&void 0!==arguments[4]&&arguments[4];null!==n;){var a=t[n.index];if(null!==a&&r.push(ct(a)),rt(a))for(var s=10;s-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}ti(this._lView[1],this._lView)}},{key:"onDestroy",value:function(e){Ji(this._lView[1],this._lView,null,e)}},{key:"markForCheck",value:function(){yo(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){go(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(e,t,n){Dt(!0);try{go(e,t,n)}finally{Dt(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e}},{key:"detachFromAppRef",value:function(){var e;this._appRef=null,vi(this._lView[1],e=this._lView,e[11],2,null,null)}},{key:"attachToAppRef",value:function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}},{key:"rootNodes",get:function(){var e=this._lView,t=e[1];return Qs(t,e,t.firstChild,[])}},{key:"context",get:function(){return this._lView[8]}},{key:"destroyed",get:function(){return 256==(256&this._lView[2])}}]),e}(),Ks=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this,e))._view=e,r}return l(n,[{key:"detectChanges",value:function(){mo(this._view)}},{key:"checkNoChanges",value:function(){!function(e){Dt(!0);try{mo(e)}finally{Dt(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(Ws),Gs=Xs,Zs=function(){var e=function e(){m(this,e)};return e.__NG_ELEMENT_ID__=Gs,e.__ChangeDetectorRef__=!0,e}();function Xs(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(e,t,n){if(!n&&ot(e)){var r=pt(e.index,t);return new Ws(r,r)}return 47&e.type?new Ws(t[16],t):null}(Tt(),St(),e)}var Js=[new Hs],Ys=new zs([new Ds]),$s=new Bs(Js),eu=function(){return ru(Tt(),St())},tu=function(){var e=function e(){m(this,e)};return e.__NG_ELEMENT_ID__=eu,e}(),nu=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this))._declarationLView=e,o._declarationTContainer=r,o.elementRef=i,o}return l(n,[{key:"createEmbeddedView",value:function(e){var t=this._declarationTContainer.tViews,n=Fi(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];var r=this._declarationLView[19];return null!==r&&(n[19]=r.createEmbeddedView(t)),qi(t,n,e),new Ws(n)}}]),n}(tu);function ru(e,t){return 4&e.type?new nu(t,e,Ss(e,t)):null}var iu=function e(){m(this,e)},ou=function e(){m(this,e)},au=function(){return hu(Tt(),St())},su=function(){var e=function e(){m(this,e)};return e.__NG_ELEMENT_ID__=au,e}(),uu=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this))._lContainer=e,o._hostTNode=r,o._hostLView=i,o}return l(n,[{key:"clear",value:function(){for(;this.length>0;)this.remove(this.length-1)}},{key:"get",value:function(e){var t=lu(this._lContainer);return null!==t&&t[e]||null}},{key:"createEmbeddedView",value:function(e,t,n){var r=e.createEmbeddedView(t||{});return this.insert(r,n),r}},{key:"createComponent",value:function(e,t,n,r,i){var o=n||this.parentInjector;if(!i&&null==e.ngModule&&o){var a=o.get(iu,null);a&&(i=a)}var s=e.create(o,r,void 0,i);return this.insert(s.hostView,t),s}},{key:"insert",value:function(e,t){var r=e._lView,i=r[1];if(rt(r[3])){var o=this.indexOf(e);if(-1!==o)this.detach(o);else{var a=r[3],s=new n(a,a[6],a[3]);s.detach(s.indexOf(e))}}var u=this._adjustIndex(t),l=this._lContainer;!function(e,t,n,r){var i=10+r,o=n.length;r>0&&(n[i-1][4]=t),r1&&void 0!==arguments[1]?arguments[1]:0;return null==e?this.length+t:e}},{key:"element",get:function(){return Ss(this._hostTNode,this._hostLView)}},{key:"injector",get:function(){return new Rr(this._hostTNode,this._hostLView)}},{key:"parentInjector",get:function(){var e=wr(this._hostTNode,this._hostLView);if(dr(e)){var t=pr(e,this._hostLView),n=vr(e);return new Rr(t[1].data[n+8],t)}return new Rr(null,this._hostLView)}},{key:"length",get:function(){return this._lContainer.length-10}}]),n}(su);function lu(e){return e[8]}function cu(e){return e[8]||(e[8]=[])}function hu(e,t){var n,r=t[e.index];if(rt(r))n=r;else{var i;if(8&e.type)i=ct(r);else{var o=t[11];i=o.createComment("");var a=ft(e,t);ii(o,si(o,a),i,function(e,t){return ut(e)?e.nextSibling(t):t.nextSibling}(o,a),!1)}t[e.index]=n=co(r,t,i,e),po(t,n)}return new uu(n,e,t)}var fu={},du=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this)).ngModule=e,r}return l(n,[{key:"resolveComponentFactory",value:function(e){var t=Ve(e);return new yu(t,this.ngModule)}}]),n}(ws);function vu(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}var pu=new Z("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return qr}}),yu=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this)).componentDef=e,i.ngModule=r,i.componentType=e.type,i.selector=e.selectors.map(xi).join(","),i.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],i.isBoundToModule=!!r,i}return l(n,[{key:"create",value:function(e,t,n,r){var i,o,a=(r=r||this.ngModule)?function(e,t){return{get:function(n,r,i){var o=e.get(n,fu,i);return o!==fu||r===fu?o:t.get(n,r,i)}}}(e,r.injector):e,s=a.get(Ts,lt),u=a.get(js,null),l=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",h=n?function(e,t,n){if(ut(e))return e.selectRootElement(t,n===ge.ShadowDom);var r="string"==typeof t?e.querySelector(t):t;return r.textContent="",r}(l,n,this.componentDef.encapsulation):Yr(s.createRenderer(null,this.componentDef),c,function(e){var t=e.toLowerCase();return"svg"===t?"http://www.w3.org/2000/svg":"math"===t?"http://www.w3.org/1998/MathML/":null}(c)),f=this.componentDef.onPush?576:528,d={components:[],scheduler:qr,clean:_o,playerHandler:null,flags:0},v=Xi(0,null,null,1,0,null,null,null,null,null),p=Fi(null,v,d,f,null,null,s,l,u,a);zt(p);try{var y=function(e,t,n,r,i,o){var a=n[1];n[20]=e;var s=Hi(a,20,2,"#host",null),u=s.mergedAttrs=t.hostAttrs;null!==u&&(Eo(s,u,!0),null!==e&&(ur(i,e,u),null!==s.classes&&gi(i,e,s.classes),null!==s.styles&&yi(i,e,s.styles)));var l=r.createRenderer(e,t),c=Fi(n,Zi(t),null,t.onPush?64:16,n[20],s,r,l,null,null);return a.firstCreatePass&&(Cr(br(s,n),a,t.type),ro(a,s),oo(s,n.length,1)),po(n,c),n[20]=c}(h,this.componentDef,p,s,l);if(h)if(n)ur(l,h,["ng-version",Is.full]);else{var g=function(e){for(var t=[],n=[],r=1,i=2;r0&&gi(l,h,b.join(" "))}if(o=dt(v,20),void 0!==t)for(var _=o.projection=[],k=0;k1&&void 0!==arguments[1]?arguments[1]:qo.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:qe.Default;return e===qo||e===iu||e===Oo?this:this._r3Injector.get(e,t,n)}},{key:"destroy",value:function(){var e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(function(e){return e()}),this.destroyCbs=null}},{key:"onDestroy",value:function(e){this.destroyCbs.push(e)}}]),n}(iu),_u=function(e){h(n,e);var t=d(n);function n(e){var r,o,a;return m(this,n),(r=t.call(this)).moduleType=e,null!==Me(e)&&(o=e,a=new Set,function e(t){var n=Me(t,!0),r=n.id;null!==r&&(function(e,t,n){if(t&&t!==n)throw new Error("Duplicate module registered for ".concat(e," - ").concat(L(t)," vs ").concat(L(t.name)))}(r,mu.get(r),t),mu.set(r,t));var o,s=i(Br(n.imports));try{for(s.s();!(o=s.n()).done;){var u=o.value;a.has(u)||(a.add(u),e(u))}}catch(l){s.e(l)}finally{s.f()}}(o)),r}return l(n,[{key:"create",value:function(e){return new bu(this.moduleType,e)}}]),n}(ou);function ku(e,t,n){var r=Rt()+e,i=St();return i[r]===Ai?ea(i,r,n?t.call(n):t()):function(e,t){return e[t]}(i,r)}function wu(e,t,n,r){return Cu(St(),Rt(),e,t,n,r)}function Cu(e,t,n,r,i,o){var a=t+n;return ta(e,a,i)?ea(e,a+1,o?r.call(o,i):r(i)):function(e,t){var n=e[t];return n===Ai?void 0:n}(e,a+1)}function Su(e,t){var n,r=Et(),i=e+20;r.firstCreatePass?(n=function(e,t){if(t)for(var n=t.length-1;n>=0;n--){var r=t[n];if(e===r.name)return r}throw new Kn("302","The pipe '".concat(e,"' could not be found!"))}(t,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks||(r.destroyHooks=[])).push(i,n.onDestroy)):n=r.data[i];var o=n.factory||(n.factory=Wn(n.type)),a=ze(sa);try{var s=gr(!1),u=o();return gr(s),function(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}(r,St(),i,u),u}finally{ze(a)}}function Eu(e,t,n){var r=e+20,i=St(),o=vt(i,r);return function(e,t){return Jo.isWrapped(t)&&(t=Jo.unwrap(t),e[Nt()]=Ai),t}(i,function(e,t){return e[1].data[t].pure}(i,r)?Cu(i,Rt(),t,o.transform,n,o):o.transform(n))}var Ou=function(e){h(n,e);var t=d(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return m(this,n),(e=t.call(this)).__isAsync=r,e}return l(n,[{key:"emit",value:function(e){c(g(n.prototype),"next",this).call(this,e)}},{key:"subscribe",value:function(e,t,r){var i,o=function(e){return null},a=function(){return null};e&&"object"==typeof e?(i=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(o=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(a=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(i=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},t&&(o=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)}),r&&(a=this.__isAsync?function(){setTimeout(function(){return r()})}:function(){r()}));var s=c(g(n.prototype),"subscribe",this).call(this,i,o,a);return e instanceof f.a&&e.add(s),s}}]),n}(u.a);function Tu(){return this._results[Xo()]()}var xu=function(){function e(){m(this,e),this.dirty=!0,this._results=[],this.changes=new Ou,this.length=0;var t=Xo(),n=e.prototype;n[t]||(n[t]=Tu)}return l(e,[{key:"map",value:function(e){return this._results.map(e)}},{key:"filter",value:function(e){return this._results.filter(e)}},{key:"find",value:function(e){return this._results.find(e)}},{key:"reduce",value:function(e,t){return this._results.reduce(e,t)}},{key:"forEach",value:function(e){this._results.forEach(e)}},{key:"some",value:function(e){return this._results.some(e)}},{key:"toArray",value:function(){return this._results.slice()}},{key:"toString",value:function(){return this._results.toString()}},{key:"reset",value:function(e){this._results=ue(e),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()}}]),e}(),Au=function(){function e(t){m(this,e),this.queryList=t,this.matches=null}return l(e,[{key:"clone",value:function(){return new e(this.queryList)}},{key:"setDirty",value:function(){this.queryList.setDirty()}}]),e}(),ju=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];m(this,e),this.queries=t}return l(e,[{key:"createEmbeddedView",value:function(t){var n=t.queries;if(null!==n){for(var r=null!==t.contentQueries?t.contentQueries[0]:n.length,i=[],o=0;o3&&void 0!==arguments[3]?arguments[3]:null;m(this,e),this.predicate=t,this.descendants=n,this.isStatic=r,this.read=i},Iu=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];m(this,e),this.queries=t}return l(e,[{key:"elementStart",value:function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:-1;m(this,e),this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return l(e,[{key:"elementStart",value:function(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}},{key:"elementEnd",value:function(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}},{key:"template",value:function(e,t){this.elementStart(e,t)}},{key:"embeddedTView",value:function(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new e(this.metadata)):null}},{key:"isApplyingToNode",value:function(e){if(this._appliesToNextNode&&!1===this.metadata.descendants){for(var t=this._declarationNodeIndex,n=e.parent;null!==n&&8&n.type&&n.index!==t;)n=n.parent;return t===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(e,t){var n=this.metadata.predicate;if(Array.isArray(n))for(var r=0;r0)r.push(a[s/2]);else{for(var l=o[s+1],c=t[-u],h=10;h0&&void 0!==arguments[0]?arguments[0]:qe.Default,t=Xs(!0);if(null!=t||e&qe.Optional)return t;Gn("ChangeDetectorRef")}var Ku=new Z("Application Initializer"),Gu=function(){var e=function(){function e(t){var n=this;m(this,e),this.appInits=t,this.resolve=Cs,this.reject=Cs,this.initialized=!1,this.done=!1,this.donePromise=new Promise(function(e,t){n.resolve=e,n.reject=t})}return l(e,[{key:"runInitializers",value:function(){var e=this;if(!this.initialized){var t=[],n=function(){e.done=!0,e.resolve()};if(this.appInits)for(var r=0;r0&&(i=setTimeout(function(){r._callbacks=r._callbacks.filter(function(e){return e.timeoutId!==i}),e(r._didWork,r.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:n})}},{key:"whenStable",value:function(e,t,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(e,t,n),this._runCallbacksIfReady()}},{key:"getPendingRequestCount",value:function(){return this._pendingCount}},{key:"findProviders",value:function(e,t,n){return[]}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Je(vl))},e.\u0275prov=H({token:e,factory:e.\u0275fac}),e}(),Cl=function(){var e=function(){function e(){m(this,e),this._applications=new Map,Ol.addToWindow(this)}return l(e,[{key:"registerApplication",value:function(e,t){this._applications.set(e,t)}},{key:"unregisterApplication",value:function(e){this._applications.delete(e)}},{key:"unregisterAllApplications",value:function(){this._applications.clear()}},{key:"getTestability",value:function(e){return this._applications.get(e)||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(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Ol.findTestabilityInTree(this,e,t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac}),e}();function Sl(e){Ol=e}var El,Ol=new(function(){function e(){m(this,e)}return l(e,[{key:"addToWindow",value:function(e){}},{key:"findTestabilityInTree",value:function(e,t,n){return null}}]),e}()),Tl=new Z("AllowMultipleToken"),xl=function e(t,n){m(this,e),this.name=t,this.token=n};function Al(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r="Platform: "+t,i=new Z(r);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=jl();if(!o||o.injector.get(Tl,!1))if(e)e(n.concat(t).concat({provide:i,useValue:!0}));else{var a=n.concat(t).concat({provide:i,useValue:!0},{provide:xo,useValue:"platform"});!function(e){if(El&&!El.destroyed&&!El.injector.get(Tl,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");El=e.get(Pl);var t=e.get(Yu,null);t&&t.forEach(function(e){return e()})}(qo.create({providers:a,name:r}))}return function(e){var t=jl();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(i)}}function jl(){return El&&!El.destroyed?El:null}var Pl=function(){var e=function(){function e(t){m(this,e),this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return l(e,[{key:"bootstrapModuleFactory",value:function(e,t){var n,r,i=this,o=(n=t?t.ngZone:void 0,r=t&&t.ngZoneEventCoalescing||!1,"noop"===n?new kl:("zone.js"===n?void 0:n)||new vl({enableLongStackTrace:gn(),shouldCoalesceEventChangeDetection:r})),a=[{provide:vl,useValue:o}];return o.run(function(){var t=qo.create({providers:a,parent:i.injector,name:e.moduleType.name}),n=e.create(t),r=n.injector.get(Hr,null);if(!r)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return Nl(i._modules,n)}),o.runOutsideAngular(function(){return o.onError.subscribe({next:function(e){r.handleError(e)}})}),function(e,t,r){try{var o=((a=n.injector.get(Gu)).runInitializers(),a.donePromise.then(function(){return hs(n.injector.get(nl,"en-US")||"en-US"),i._moduleDoBootstrap(n),n}));return ga(o)?o.catch(function(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}):o}catch(s){throw t.runOutsideAngular(function(){return e.handleError(s)}),s}var a}(r,o)})}},{key:"bootstrapModule",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Il({},n);return function(e,t,n){var r=new _u(n);return Promise.resolve(r)}(0,0,e).then(function(e){return t.bootstrapModuleFactory(e,r)})}},{key:"_moduleDoBootstrap",value:function(e){var t=e.injector.get(Rl);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module ".concat(L(e.instance.constructor),' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.'));e.instance.ngDoBootstrap(t)}this._modules.push(e)}},{key:"onDestroy",value:function(e){this._destroyListeners.push(e)}},{key:"destroy",value:function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0}},{key:"injector",get:function(){return this._injector}},{key:"destroyed",get:function(){return this._destroyed}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Je(qo))},e.\u0275prov=H({token:e,factory:e.\u0275fac}),e}();function Il(e,t){return Array.isArray(t)?t.reduce(Il,e):Object.assign(Object.assign({},e),t)}var Dl,Rl=((Dl=function(){function e(t,n,r,i,o,a){var s=this;m(this,e),this._zone=t,this._console=n,this._injector=r,this._exceptionHandler=i,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=gn(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var u=new v.a(function(e){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){e.next(s._stable),e.complete()})}),l=new v.a(function(e){var t;s._zone.runOutsideAngular(function(){t=s._zone.onStable.subscribe(function(){vl.assertNotInAngularZone(),dl(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,e.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){vl.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&"number"==typeof t[t.length-1]&&(r=t.pop())):"number"==typeof o&&(r=t.pop()),null===i&&1===t.length&&t[0]instanceof v.a?t[0]:Object(b.a)(r)(Object(_.a)(t,i))}(u,l.pipe(function(e){return w()((t=A,function(e){var n;n="function"==typeof t?t:function(){return t};var r=Object.create(e,T);return r.source=e,r.subjectFactory=n,r})(e));var t}))}return l(e,[{key:"bootstrap",value:function(e,t){var n,r=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=e instanceof _s?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var i=n.isBoundToModule?void 0:this._injector.get(iu),o=n.create(qo.NULL,[],t||n.selector,i);o.onDestroy(function(){r._unloadComponent(o)});var a=o.injector.get(wl,null);return a&&o.injector.get(Cl).registerApplication(o.location.nativeElement,a),this._loadComponent(o),gn()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),o}},{key:"tick",value:function(){var e=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;var t,n=i(this._views);try{for(n.s();!(t=n.n()).done;)t.value.detectChanges()}catch(a){n.e(a)}finally{n.f()}if(this._enforceNoNewChanges){var r,o=i(this._views);try{for(o.s();!(r=o.n()).done;)r.value.checkNoChanges()}catch(a){o.e(a)}finally{o.f()}}}catch(s){this._zone.runOutsideAngular(function(){return e._exceptionHandler.handleError(s)})}finally{this._runningTick=!1}}},{key:"attachView",value:function(e){var t=e;this._views.push(t),t.attachToAppRef(this)}},{key:"detachView",value:function(e){var t=e;Nl(this._views,t),t.detachFromAppRef()}},{key:"_loadComponent",value:function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(el,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})}},{key:"_unloadComponent",value:function(e){this.detachView(e.hostView),Nl(this.components,e)}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach(function(e){return e.destroy()})}},{key:"viewCount",get:function(){return this._views.length}}]),e}()).\u0275fac=function(e){return new(e||Dl)(Je(vl),Je(tl),Je(qo),Je(Hr),Je(ws),Je(Gu))},Dl.\u0275prov=H({token:Dl,factory:Dl.\u0275fac}),Dl);function Nl(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Ll=function e(){m(this,e)},Vl=function e(){m(this,e)},Ml={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},Fl=function(){var e=function(){function e(t,n){m(this,e),this._compiler=t,this._config=n||Ml}return l(e,[{key:"load",value:function(e){return this.loadAndCompile(e)}},{key:"loadAndCompile",value:function(e){var n=this,r=t(e.split("#"),2),i=r[0],o=r[1];return void 0===o&&(o="default"),s("zn8P")(i).then(function(e){return e[o]}).then(function(e){return Hl(e,i,o)}).then(function(e){return n._compiler.compileModuleAsync(e)})}},{key:"loadFactory",value:function(e){var n=t(e.split("#"),2),r=n[0],i=n[1],o="NgFactory";return void 0===i&&(i="default",o=""),s("zn8P")(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(function(e){return e[i+o]}).then(function(e){return Hl(e,r,i)})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Je(hl),Je(Vl,8))},e.\u0275prov=H({token:e,factory:e.\u0275fac}),e}();function Hl(e,t,n){if(!e)throw new Error("Cannot find '".concat(n,"' in '").concat(t,"'"));return e}var Ul=function(e){return null},ql=Al(null,"core",[{provide:$u,useValue:"unknown"},{provide:Pl,deps:[qo]},{provide:Cl,deps:[]},{provide:tl,deps:[]}]),zl=[{provide:Rl,useClass:Rl,deps:[vl,tl,qo,Hr,ws,Gu]},{provide:pu,deps:[vl],useFactory:function(e){var t=[];return e.onStable.subscribe(function(){for(;t.length;)t.pop()()}),function(e){t.push(e)}}},{provide:Gu,useClass:Gu,deps:[[new D,Ku]]},{provide:hl,useClass:hl,deps:[]},Xu,{provide:zs,useFactory:function(){return Ys},deps:[]},{provide:Bs,useFactory:function(){return $s},deps:[]},{provide:nl,useFactory:function(e){return hs(e=e||"undefined"!=typeof $localize&&$localize.locale||"en-US"),e},deps:[[new I(nl),new D,new N]]},{provide:rl,useValue:"USD"}],Bl=function(){var e=function e(t){m(this,e)};return e.\u0275mod=Ie({type:e}),e.\u0275inj=U({factory:function(t){return new(t||e)(Je(Rl))},providers:zl}),e}()},gRHU:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("2fFW"),i=n("NJ4a"),o={closed:!0,next:function(e){},error:function(e){if(r.a.useDeprecatedSynchronousErrorHandling)throw e;Object(i.a)(e)},complete:function(){}}},jZKg:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("HDdC"),i=n("quSY");function o(e,t){return new r.a(function(n){var r=new i.a,o=0;return r.add(t.schedule(function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()})),r})}},kJWO:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},lJxs:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n("7o/Q");function i(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new o(e,t))}}var o=function(){function e(t,n){m(this,e),this.project=t,this.thisArg=n}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new a(e,this.project,this.thisArg))}}]),e}(),a=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,e)).project=r,o.count=0,o.thisArg=i||p(o),o}return l(n,[{key:"_next",value:function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}]),n}(r.a)},n6bG:function(e,t,n){"use strict";function r(e){return"function"==typeof e}n.d(t,"a",function(){return r})},ngJS:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(e){return function(t){for(var n=0,r=e.length;n0&&void 0!==arguments[0]&&arguments[0],t=this._platformLocation.pathname+S(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?"".concat(t).concat(n):t}},{key:"pushState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+S(r));this._platformLocation.pushState(e,t,i)}},{key:"replaceState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+S(r));this._platformLocation.replaceState(e,t,i)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(E);return e.\u0275fac=function(t){return new(t||e)(o.Qb(p),o.Qb(T,8))},e.\u0275prov=o.Db({token:e,factory:e.\u0275fac}),e}(),A=function(){var e=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this))._platformLocation=e,i._baseHref="",null!=r&&(i._baseHref=r),i}return l(n,[{key:"onPopState",value:function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"path",value:function(){var e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}},{key:"prepareExternalUrl",value:function(e){var t=w(this._baseHref,e);return t.length>0?"#"+t:t}},{key:"pushState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+S(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(e,t,i)}},{key:"replaceState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+S(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,i)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(E);return e.\u0275fac=function(t){return new(t||e)(o.Qb(p),o.Qb(T,8))},e.\u0275prov=o.Db({token:e,factory:e.\u0275fac}),e}(),j=function(){var e=function(){function e(t,n){var r=this;m(this,e),this._subject=new o.n,this._urlChangeListeners=[],this._platformStrategy=t;var i=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=C(I(i)),this._platformStrategy.onPopState(function(e){r._subject.emit({url:r.path(!0),pop:!0,state:e.state,type:e.type})})}return l(e,[{key:"path",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.normalize(this._platformStrategy.path(e))}},{key:"getState",value:function(){return this._platformLocation.getState()}},{key:"isCurrentPathEqualTo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.path()==this.normalize(e+S(t))}},{key:"normalize",value:function(t){return e.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,I(t)))}},{key:"prepareExternalUrl",value:function(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}},{key:"go",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+S(t)),n)}},{key:"replaceState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+S(t)),n)}},{key:"forward",value:function(){this._platformStrategy.forward()}},{key:"back",value:function(){this._platformStrategy.back()}},{key:"onUrlChange",value:function(e){var t=this;this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(function(e){t._notifyUrlChangeListeners(e.url,e.state)}))}},{key:"_notifyUrlChangeListeners",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;this._urlChangeListeners.forEach(function(n){return n(e,t)})}},{key:"subscribe",value:function(e,t,n){return this._subject.subscribe({next:e,error:t,complete:n})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(o.Qb(E),o.Qb(p))},e.normalizeQueryParams=S,e.joinWithSlash=w,e.stripTrailingSlash=C,e.\u0275prov=Object(o.Db)({factory:P,token:e,providedIn:"root"}),e}();function P(){return new j(Object(o.Qb)(E),Object(o.Qb)(p))}function I(e){return e.replace(/\/index.html$/,"")}var D=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}({}),R=o.kb,N=function e(){m(this,e)},L=function(){var e=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this)).locale=e,r}return l(n,[{key:"getPluralCategory",value:function(e,t){switch(R(t||this.locale)(e)){case D.Zero:return"zero";case D.One:return"one";case D.Two:return"two";case D.Few:return"few";case D.Many:return"many";default:return"other"}}}]),n}(N);return e.\u0275fac=function(t){return new(t||e)(o.Qb(o.u))},e.\u0275prov=o.Db({token:e,factory:e.\u0275fac}),e}();function V(e,n){n=encodeURIComponent(n);var r,o=i(e.split(";"));try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.indexOf("="),u=t(-1==s?[a,""]:[a.slice(0,s),a.slice(s+1)],2),l=u[0],c=u[1];if(l.trim()===n)return decodeURIComponent(c)}}catch(h){o.e(h)}finally{o.f()}return null}var M=function(){var e=function(){function e(t,n,r,i){m(this,e),this._iterableDiffers=t,this._keyValueDiffers=n,this._ngEl=r,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return l(e,[{key:"ngDoCheck",value:function(){if(this._iterableDiffer){var e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){var t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}},{key:"_applyKeyValueChanges",value:function(e){var t=this;e.forEachAddedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachChangedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){e.previousValue&&t._toggleClass(e.key,!1)})}},{key:"_applyIterableChanges",value:function(e){var t=this;e.forEachAddedItem(function(e){if("string"!=typeof e.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Object(o.sb)(e.item));t._toggleClass(e.item,!0)}),e.forEachRemovedItem(function(e){return t._toggleClass(e.item,!1)})}},{key:"_applyClasses",value:function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach(function(e){return t._toggleClass(e,!0)}):Object.keys(e).forEach(function(n){return t._toggleClass(n,!!e[n])}))}},{key:"_removeClasses",value:function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach(function(e){return t._toggleClass(e,!1)}):Object.keys(e).forEach(function(e){return t._toggleClass(e,!1)}))}},{key:"_toggleClass",value:function(e,t){var n=this;(e=e.trim())&&e.split(/\s+/g).forEach(function(e){t?n._renderer.addClass(n._ngEl.nativeElement,e):n._renderer.removeClass(n._ngEl.nativeElement,e)})}},{key:"klass",set:function(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}},{key:"ngClass",set:function(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(Object(o.nb)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}}]),e}();return e.\u0275fac=function(t){return new(t||e)(o.Hb(o.s),o.Hb(o.t),o.Hb(o.l),o.Hb(o.D))},e.\u0275dir=o.Cb({type:e,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),e}(),F=function(){function e(t,n,r,i){m(this,e),this.$implicit=t,this.ngForOf=n,this.index=r,this.count=i}return l(e,[{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}}]),e}(),H=function(){var e=function(){function e(t,n,r){m(this,e),this._viewContainer=t,this._template=n,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return l(e,[{key:"ngDoCheck",value:function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var e=this._ngForOf;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(r){throw new Error("Cannot find a differ supporting object '".concat(e,"' of type '").concat((t=e).name||typeof t,"'. NgFor only supports binding to Iterables such as Arrays."))}}var t;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}},{key:"_applyChanges",value:function(e){var t=this,n=[];e.forEachOperation(function(e,r,i){if(null==e.previousIndex){var o=t._viewContainer.createEmbeddedView(t._template,new F(null,t._ngForOf,-1,-1),null===i?void 0:i),a=new U(e,o);n.push(a)}else if(null==i)t._viewContainer.remove(null===r?void 0:r);else if(null!==r){var s=t._viewContainer.get(r);t._viewContainer.move(s,i);var u=new U(e,s);n.push(u)}});for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:0;return t>0?c(g(n.prototype),"schedule",this).call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}},{key:"execute",value:function(e,t){return t>0||this.closed?c(g(n.prototype),"execute",this).call(this,e,t):this._execute(e,t)}},{key:"requestAsyncId",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==r&&r>0||null===r&&this.delay>0?c(g(n.prototype),"requestAsyncId",this).call(this,e,t,r):e.flush(this)}}]),n}(r("3N8a").a),w=new(function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return n}(r("IjjT").a))(k),C=r("quSY"),S=r("7o/Q"),E=r("EY2u"),O=r("z6cu"),T=((f=function(){function e(t,n,r){m(this,e),this.kind=t,this.value=n,this.error=r,this.hasValue="N"===t}return l(e,[{key:"observe",value:function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}},{key:"do",value:function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}}},{key:"accept",value:function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)}},{key:"toObservable",value:function(){switch(this.kind){case"N":return Object(a.a)(this.value);case"E":return Object(O.a)(this.error);case"C":return Object(E.b)()}throw new Error("unexpected notification kind value")}}],[{key:"createNext",value:function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification}},{key:"createError",value:function(t){return new e("E",void 0,t)}},{key:"createComplete",value:function(){return e.completeNotification}}]),e}()).completeNotification=new f("C"),f.undefinedValueNotification=new f("N",void 0),f),x=function(e){h(n,e);var t=d(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return m(this,n),(i=t.call(this,e)).scheduler=r,i.delay=o,i}return l(n,[{key:"scheduleMessage",value:function(e){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new A(e,this.destination)))}},{key:"_next",value:function(e){this.scheduleMessage(T.createNext(e))}},{key:"_error",value:function(e){this.scheduleMessage(T.createError(e)),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleMessage(T.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()}}]),n}(S.a),A=function e(t,n){m(this,e),this.notification=t,this.destination=n},j=r("9ppp"),P=r("Ylt2"),I=function(e){h(n,e);var t=d(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,o=arguments.length>2?arguments[2]:void 0;return m(this,n),(e=t.call(this)).scheduler=o,e._events=[],e._infiniteTimeWindow=!1,e._bufferSize=r<1?1:r,e._windowTime=i<1?1:i,i===Number.POSITIVE_INFINITY?(e._infiniteTimeWindow=!0,e.next=e.nextInfiniteTimeWindow):e.next=e.nextTimeWindow,e}return l(n,[{key:"nextInfiniteTimeWindow",value:function(e){if(!this.isStopped){var t=this._events;t.push(e),t.length>this._bufferSize&&t.shift()}c(g(n.prototype),"next",this).call(this,e)}},{key:"nextTimeWindow",value:function(e){this.isStopped||(this._events.push(new D(this._getNow(),e)),this._trimBufferThenGetEvents()),c(g(n.prototype),"next",this).call(this,e)}},{key:"_subscribe",value:function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new j.a;if(this.isStopped||this.hasError?t=C.a.EMPTY:(this.observers.push(e),t=new P.a(this,e)),i&&e.add(e=new x(e,i)),n)for(var a=0;at&&(o=Math.max(o,i-t)),o>0&&r.splice(0,o),r}}]),n}(_.a),D=function e(t,n){m(this,e),this.time=t,this.value=n};function R(e,t,n){var r;return r=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:n},function(e){return e.lift(function(e){var t,n,r=e.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=e.windowTime,a=void 0===o?Number.POSITIVE_INFINITY:o,s=e.refCount,u=e.scheduler,l=0,c=!1,h=!1;return function(e){var r;l++,!t||c?(c=!1,t=new I(i,a,u),r=t.subscribe(this),n=e.subscribe({next:function(e){t.next(e)},error:function(e){c=!0,t.error(e)},complete:function(){h=!0,n=void 0,t.complete()}})):r=t.subscribe(this),this.add(function(){l--,r.unsubscribe(),n&&!h&&s&&0===l&&(n.unsubscribe(),n=void 0,t=void 0)})}}(r))}}var N,L,V=r("lJxs"),M=r("bOdf"),F=r("eIep"),H=function e(){m(this,e)},U=((N=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"getTranslation",value:function(e){return Object(a.a)({})}}]),n}(H)).\u0275fac=function(e){return q(e||N)},N.\u0275prov=o.Db({token:N,factory:N.\u0275fac}),N),q=o.Ob(U),z=function e(){m(this,e)},B=((L=function(){function e(){m(this,e)}return l(e,[{key:"handle",value:function(e){return e.key}}]),e}()).\u0275fac=function(e){return new(e||L)},L.\u0275prov=o.Db({token:L,factory:L.\u0275fac}),L);function Q(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n,r,i,o=typeof e;if(o==typeof t&&"object"==o){if(!Array.isArray(e)){if(Array.isArray(t))return!1;for(r in i=Object.create(null),e){if(!Q(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i)&&void 0!==t[r])return!1;return!0}if(!Array.isArray(t))return!1;if((n=e.length)==t.length){for(r=0;r5&&void 0!==arguments[5])||arguments[5],u=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=arguments.length>8?arguments[8]:void 0;m(this,e),this.store=t,this.currentLoader=n,this.compiler=r,this.parser=i,this.missingTranslationHandler=a,this.useDefaultLang=s,this.isolate=u,this.extend=l,this.pending=!1,this._onTranslationChange=new o.n,this._onLangChange=new o.n,this._onDefaultLangChange=new o.n,this._langs=[],this._translations={},this._translationRequests={},c&&this.setDefaultLang(c)}return l(e,[{key:"setDefaultLang",value:function(e){var t=this;if(e!==this.defaultLang){var n=this.retrieveTranslations(e);void 0!==n?(null==this.defaultLang&&(this.defaultLang=e),n.pipe(Object(b.a)(1)).subscribe(function(n){t.changeDefaultLang(e)})):this.changeDefaultLang(e)}}},{key:"getDefaultLang",value:function(){return this.defaultLang}},{key:"use",value:function(e){var t=this;if(e===this.currentLang)return Object(a.a)(this.translations[e]);var n=this.retrieveTranslations(e);return void 0!==n?(this.currentLang||(this.currentLang=e),n.pipe(Object(b.a)(1)).subscribe(function(n){t.changeLang(e)}),n):(this.changeLang(e),Object(a.a)(this.translations[e]))}},{key:"retrieveTranslations",value:function(e){var t;return(void 0===this.translations[e]||this.extend)&&(this._translationRequests[e]=this._translationRequests[e]||this.getTranslation(e),t=this._translationRequests[e]),t}},{key:"getTranslation",value:function(e){var t=this;this.pending=!0;var n=this.currentLoader.getTranslation(e).pipe(R(1),Object(b.a)(1));return this.loadingTranslations=n.pipe(Object(V.a)(function(n){return t.compiler.compileTranslations(n,e)}),R(1),Object(b.a)(1)),this.loadingTranslations.subscribe({next:function(n){t.translations[e]=t.extend&&t.translations[e]?Object.assign(Object.assign({},n),t.translations[e]):n,t.updateLangs(),t.pending=!1},error:function(e){t.pending=!1}}),n}},{key:"setTranslation",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=this.compiler.compileTranslations(t,e),this.translations[e]=(n||this.extend)&&this.translations[e]?G(this.translations[e],t):t,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}},{key:"getLangs",value:function(){return this.langs}},{key:"addLangs",value:function(e){var t=this;e.forEach(function(e){-1===t.langs.indexOf(e)&&t.langs.push(e)})}},{key:"updateLangs",value:function(){this.addLangs(Object.keys(this.translations))}},{key:"getParsedResult",value:function(e,t,n){var r;if(t instanceof Array){var o,s={},l=!1,c=i(t);try{for(c.s();!(o=c.n()).done;){var h=o.value;s[h]=this.getParsedResult(e,h,n),u(s[h])&&(l=!0)}}catch(p){c.e(p)}finally{c.f()}if(l){var f=t.map(function(e){return u(s[e])?s[e]:Object(a.a)(s[e])});return Object(v.a)(f).pipe(Object(V.a)(function(e){var n={};return e.forEach(function(e,r){n[t[r]]=e}),n}))}return s}if(e&&(r=this.parser.interpolate(this.parser.getValue(e,t),n)),void 0===r&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],t),n)),void 0===r){var d={key:t,translateService:this};void 0!==n&&(d.interpolateParams=n),r=this.missingTranslationHandler.handle(d)}return void 0!==r?r:t}},{key:"get",value:function(e,t){var n=this;if(!W(e)||!e.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(Object(M.a)(function(r){return u(r=n.getParsedResult(r,e,t))?r:Object(a.a)(r)}));var r=this.getParsedResult(this.translations[this.currentLang],e,t);return u(r)?r:Object(a.a)(r)}},{key:"getStreamOnTranslationChange",value:function(e,t){var n=this;if(!W(e)||!e.length)throw new Error('Parameter "key" required');return Object(p.a)(Object(y.a)(function(){return n.get(e,t)}),this.onTranslationChange.pipe(Object(F.a)(function(r){var i=n.getParsedResult(r.translations,e,t);return"function"==typeof i.subscribe?i:Object(a.a)(i)})))}},{key:"stream",value:function(e,t){var n=this;if(!W(e)||!e.length)throw new Error('Parameter "key" required');return Object(p.a)(Object(y.a)(function(){return n.get(e,t)}),this.onLangChange.pipe(Object(F.a)(function(r){var i=n.getParsedResult(r.translations,e,t);return u(i)?i:Object(a.a)(i)})))}},{key:"instant",value:function(e,t){if(!W(e)||!e.length)throw new Error('Parameter "key" required');var n=this.getParsedResult(this.translations[this.currentLang],e,t);if(u(n)){if(e instanceof Array){var r={};return e.forEach(function(t,n){r[e[n]]=e[n]}),r}return e}return n}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.currentLang;this.translations[n][e]=this.compiler.compile(t,n),this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}},{key:"changeLang",value:function(e){this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),null==this.defaultLang&&this.changeDefaultLang(e)}},{key:"changeDefaultLang",value:function(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}},{key:"reloadLang",value:function(e){return this.resetLang(e),this.getTranslation(e)}},{key:"resetLang",value:function(e){this._translationRequests[e]=void 0,this.translations[e]=void 0}},{key:"getBrowserLang",value:function(){if("undefined"!=typeof window&&void 0!==window.navigator){var e=window.navigator.languages?window.navigator.languages[0]:null;return void 0!==(e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage)?(-1!==e.indexOf("-")&&(e=e.split("-")[0]),-1!==e.indexOf("_")&&(e=e.split("_")[0]),e):void 0}}},{key:"getBrowserCultureLang",value:function(){if("undefined"!=typeof window&&void 0!==window.navigator){var e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}}},{key:"onTranslationChange",get:function(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}},{key:"onLangChange",get:function(){return this.isolate?this._onLangChange:this.store.onLangChange}},{key:"onDefaultLangChange",get:function(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}},{key:"defaultLang",get:function(){return this.isolate?this._defaultLang:this.store.defaultLang},set:function(e){this.isolate?this._defaultLang=e:this.store.defaultLang=e}},{key:"currentLang",get:function(){return this.isolate?this._currentLang:this.store.currentLang},set:function(e){this.isolate?this._currentLang=e:this.store.currentLang=e}},{key:"langs",get:function(){return this.isolate?this._langs:this.store.langs},set:function(e){this.isolate?this._langs=e:this.store.langs=e}},{key:"translations",get:function(){return this.isolate?this._translations:this.store.translations},set:function(e){this.isolate?this._translations=e:this.store.translations=e}}]),e}()).\u0275fac=function(e){return new(e||$)(o.Qb(ae),o.Qb(H),o.Qb(re),o.Qb(ee),o.Qb(z),o.Qb(ue),o.Qb(se),o.Qb(ce),o.Qb(le))},$.\u0275prov=o.Db({token:$,factory:$.\u0275fac}),$),fe=((Y=function(){function e(t,n){m(this,e),this.translate=t,this._ref=n,this.value=""}return l(e,[{key:"updateValue",value:function(e,t,n){var r=this,i=function(t){r.value=void 0!==t?t:e,r.lastKey=e,r._ref.markForCheck()};if(n){var o=this.translate.getParsedResult(n,e,t);u(o.subscribe)?o.subscribe(i):i(o)}this.translate.get(e,t).subscribe(i)}},{key:"transform",value:function(e){var t,n=this;if(!e||!e.length)return e;for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.loader||{provide:H,useClass:U},t.compiler||{provide:re,useClass:ie},t.parser||{provide:ee,useClass:te},t.missingTranslationHandler||{provide:z,useClass:B},ae,{provide:se,useValue:t.isolate},{provide:ue,useValue:t.useDefaultLang},{provide:ce,useValue:t.extend},{provide:le,useValue:t.defaultLanguage},he]}}},{key:"forChild",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.loader||{provide:H,useClass:U},t.compiler||{provide:re,useClass:ie},t.parser||{provide:ee,useClass:te},t.missingTranslationHandler||{provide:z,useClass:B},{provide:se,useValue:t.isolate},{provide:ue,useValue:t.useDefaultLang},{provide:ce,useValue:t.extend},{provide:le,useValue:t.defaultLanguage},he]}}}]),e}()).\u0275mod=o.Fb({type:J}),J.\u0275inj=o.Eb({factory:function(e){return new(e||J)}}),J)},"tk/3":function(e,n,r){"use strict";r.d(n,"a",function(){return R}),r.d(n,"b",function(){return I}),r.d(n,"c",function(){return K}),r.d(n,"d",function(){return j}),r.d(n,"e",function(){return A});var i=r("fXoL"),a=r("LRne"),s=r("HDdC"),u=r("bOdf"),c=r("pLZG"),f=r("lJxs"),v=r("ofXK"),p=function e(){m(this,e)},y=function e(){m(this,e)},g=function(){function e(t){var n=this;m(this,e),this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?function(){n.headers=new Map,t.split("\n").forEach(function(e){var t=e.indexOf(":");if(t>0){var r=e.slice(0,t),i=r.toLowerCase(),o=e.slice(t+1).trim();n.maybeSetNormalizedName(r,i),n.headers.has(i)?n.headers.get(i).push(o):n.headers.set(i,[o])}})}:function(){n.headers=new Map,Object.keys(t).forEach(function(e){var r=t[e],i=e.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(n.headers.set(i,r),n.maybeSetNormalizedName(e,i))})}:this.headers=new Map}return l(e,[{key:"has",value:function(e){return this.init(),this.headers.has(e.toLowerCase())}},{key:"get",value:function(e){this.init();var t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}},{key:"keys",value:function(){return this.init(),Array.from(this.normalizedNames.values())}},{key:"getAll",value:function(e){return this.init(),this.headers.get(e.toLowerCase())||null}},{key:"append",value:function(e,t){return this.clone({name:e,value:t,op:"a"})}},{key:"set",value:function(e,t){return this.clone({name:e,value:t,op:"s"})}},{key:"delete",value:function(e,t){return this.clone({name:e,value:t,op:"d"})}},{key:"maybeSetNormalizedName",value:function(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}},{key:"init",value:function(){var t=this;this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(e){return t.applyUpdate(e)}),this.lazyUpdate=null))}},{key:"copyFrom",value:function(e){var t=this;e.init(),Array.from(e.headers.keys()).forEach(function(n){t.headers.set(n,e.headers.get(n)),t.normalizedNames.set(n,e.normalizedNames.get(n))})}},{key:"clone",value:function(t){var n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}},{key:"applyUpdate",value:function(e){var t=e.name.toLowerCase();switch(e.op){case"a":case"s":var n=e.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(e.name,t);var r=("a"===e.op?this.headers.get(t):void 0)||[];r.push.apply(r,o(n)),this.headers.set(t,r);break;case"d":var i=e.value;if(i){var a=this.headers.get(t);if(!a)return;0===(a=a.filter(function(e){return-1===i.indexOf(e)})).length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,a)}else this.headers.delete(t),this.normalizedNames.delete(t)}}},{key:"forEach",value:function(e){var t=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return e(t.normalizedNames.get(n),t.headers.get(n))})}}]),e}(),b=function(){function e(){m(this,e)}return l(e,[{key:"encodeKey",value:function(e){return _(e)}},{key:"encodeValue",value:function(e){return _(e)}},{key:"decodeKey",value:function(e){return decodeURIComponent(e)}},{key:"decodeValue",value:function(e){return decodeURIComponent(e)}}]),e}();function _(e){return encodeURIComponent(e).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 k=function(){function e(){var n,r,i,o=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(m(this,e),this.updates=null,this.cloneFrom=null,this.encoder=a.encoder||new b,a.fromString){if(a.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=(n=a.fromString,r=this.encoder,i=new Map,n.length>0&&n.split("&").forEach(function(e){var n=e.indexOf("="),o=t(-1==n?[r.decodeKey(e),""]:[r.decodeKey(e.slice(0,n)),r.decodeValue(e.slice(n+1))],2),a=o[0],s=o[1],u=i.get(a)||[];u.push(s),i.set(a,u)}),i)}else a.fromObject?(this.map=new Map,Object.keys(a.fromObject).forEach(function(e){var t=a.fromObject[e];o.map.set(e,Array.isArray(t)?t:[t])})):this.map=null}return l(e,[{key:"has",value:function(e){return this.init(),this.map.has(e)}},{key:"get",value:function(e){this.init();var t=this.map.get(e);return t?t[0]:null}},{key:"getAll",value:function(e){return this.init(),this.map.get(e)||null}},{key:"keys",value:function(){return this.init(),Array.from(this.map.keys())}},{key:"append",value:function(e,t){return this.clone({param:e,value:t,op:"a"})}},{key:"set",value:function(e,t){return this.clone({param:e,value:t,op:"s"})}},{key:"delete",value:function(e,t){return this.clone({param:e,value:t,op:"d"})}},{key:"toString",value:function(){var e=this;return this.init(),this.keys().map(function(t){var n=e.encoder.encodeKey(t);return e.map.get(t).map(function(t){return n+"="+e.encoder.encodeValue(t)}).join("&")}).filter(function(e){return""!==e}).join("&")}},{key:"clone",value:function(t){var n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([t]),n}},{key:"init",value:function(){var e=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(t){return e.map.set(t,e.cloneFrom.map.get(t))}),this.updates.forEach(function(t){switch(t.op){case"a":case"s":var n=("a"===t.op?e.map.get(t.param):void 0)||[];n.push(t.value),e.map.set(t.param,n);break;case"d":if(void 0===t.value){e.map.delete(t.param);break}var r=e.map.get(t.param)||[],i=r.indexOf(t.value);-1!==i&&r.splice(i,1),r.length>0?e.map.set(t.param,r):e.map.delete(t.param)}}),this.cloneFrom=this.updates=null)}}]),e}();function w(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function C(e){return"undefined"!=typeof Blob&&e instanceof Blob}function S(e){return"undefined"!=typeof FormData&&e instanceof FormData}var E=function(){function e(t,n,r,i){var o;if(m(this,e),this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==r?r:null,o=i):o=r,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 g),this.params){var a=this.params.toString();if(0===a.length)this.urlWithParams=n;else{var s=n.indexOf("?");this.urlWithParams=n+(-1===s?"?":s0&&void 0!==arguments[0]?arguments[0]:{},n=t.method||this.method,r=t.url||this.url,i=t.responseType||this.responseType,o=void 0!==t.body?t.body:this.body,a=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,s=void 0!==t.reportProgress?t.reportProgress:this.reportProgress,u=t.headers||this.headers,l=t.params||this.params;return void 0!==t.setHeaders&&(u=Object.keys(t.setHeaders).reduce(function(e,n){return e.set(n,t.setHeaders[n])},u)),t.setParams&&(l=Object.keys(t.setParams).reduce(function(e,n){return e.set(n,t.setParams[n])},l)),new e(n,r,o,{params:l,headers:u,reportProgress:s,responseType:i,withCredentials:a})}}]),e}(),O=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}({}),T=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";m(this,e),this.headers=t.headers||new g,this.status=void 0!==t.status?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.ok=this.status>=200&&this.status<300},x=function(e){h(n,e);var t=d(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m(this,n),(e=t.call(this,r)).type=O.ResponseHeader,e}return l(n,[{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}]),n}(T),A=function(e){h(n,e);var t=d(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m(this,n),(e=t.call(this,r)).type=O.Response,e.body=void 0!==r.body?r.body:null,e}return l(n,[{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}]),n}(T),j=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this,e,0,"Unknown Error")).name="HttpErrorResponse",r.ok=!1,r.message=r.status>=200&&r.status<300?"Http failure during parsing for "+(e.url||"(unknown url)"):"Http failure response for ".concat(e.url||"(unknown url)",": ").concat(e.status," ").concat(e.statusText),r.error=e.error||null,r}return n}(T);function P(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}var I=function(){var e=function(){function e(t){m(this,e),this.handler=t}return l(e,[{key:"request",value:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof E)n=e;else{var o=void 0;o=i.headers instanceof g?i.headers:new g(i.headers);var s=void 0;i.params&&(s=i.params instanceof k?i.params:new k({fromObject:i.params})),n=new E(e,t,void 0!==i.body?i.body:null,{headers:o,params:s,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials})}var l=Object(a.a)(n).pipe(Object(u.a)(function(e){return r.handler.handle(e)}));if(e instanceof E||"events"===i.observe)return l;var h=l.pipe(Object(c.a)(function(e){return e instanceof A}));switch(i.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return h.pipe(Object(f.a)(function(e){if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body}));case"blob":return h.pipe(Object(f.a)(function(e){if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body}));case"text":return h.pipe(Object(f.a)(function(e){if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body}));case"json":default:return h.pipe(Object(f.a)(function(e){return e.body}))}case"response":return h;default:throw new Error("Unreachable: unhandled observe type ".concat(i.observe,"}"))}}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("DELETE",e,t)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("GET",e,t)}},{key:"head",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("HEAD",e,t)}},{key:"jsonp",value:function(e,t){return this.request("JSONP",e,{params:(new k).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}},{key:"options",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("OPTIONS",e,t)}},{key:"patch",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PATCH",e,P(n,t))}},{key:"post",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",e,P(n,t))}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",e,P(n,t))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Qb(p))},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),D=function(){function e(t,n){m(this,e),this.next=t,this.interceptor=n}return l(e,[{key:"handle",value:function(e){return this.interceptor.intercept(e,this.next)}}]),e}(),R=new i.q("HTTP_INTERCEPTORS"),N=function(){var e=function(){function e(){m(this,e)}return l(e,[{key:"intercept",value:function(e,t){return t.handle(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),L=/^\)\]\}',?\n/,V=function e(){m(this,e)},M=function(){var e=function(){function e(){m(this,e)}return l(e,[{key:"build",value:function(){return new XMLHttpRequest}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),F=function(){var e=function(){function e(t){m(this,e),this.xhrFactory=t}return l(e,[{key:"handle",value:function(e){var t=this;if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new s.a(function(n){var r=t.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach(function(e,t){return r.setRequestHeader(e,t.join(","))}),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){var i=e.detectContentTypeHeader();null!==i&&r.setRequestHeader("Content-Type",i)}if(e.responseType){var o=e.responseType.toLowerCase();r.responseType="json"!==o?o:"text"}var a=e.serializeBody(),s=null,u=function(){if(null!==s)return s;var t=1223===r.status?204:r.status,n=r.statusText||"OK",i=new g(r.getAllResponseHeaders()),o=function(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new x({headers:i,status:t,statusText:n,url:o})},l=function(){var t=u(),i=t.headers,o=t.status,a=t.statusText,s=t.url,l=null;204!==o&&(l=void 0===r.response?r.responseText:r.response),0===o&&(o=l?200:0);var c=o>=200&&o<300;if("json"===e.responseType&&"string"==typeof l){var h=l;l=l.replace(L,"");try{l=""!==l?JSON.parse(l):null}catch(f){l=h,c&&(c=!1,l={error:f,text:l})}}c?(n.next(new A({body:l,headers:i,status:o,statusText:a,url:s||void 0})),n.complete()):n.error(new j({error:l,headers:i,status:o,statusText:a,url:s||void 0}))},c=function(e){var t=u().url,i=new j({error:e,status:r.status||0,statusText:r.statusText||"Unknown Error",url:t||void 0});n.error(i)},h=!1,f=function(t){h||(n.next(u()),h=!0);var i={type:O.DownloadProgress,loaded:t.loaded};t.lengthComputable&&(i.total=t.total),"text"===e.responseType&&r.responseText&&(i.partialText=r.responseText),n.next(i)},d=function(e){var t={type:O.UploadProgress,loaded:e.loaded};e.lengthComputable&&(t.total=e.total),n.next(t)};return r.addEventListener("load",l),r.addEventListener("error",c),e.reportProgress&&(r.addEventListener("progress",f),null!==a&&r.upload&&r.upload.addEventListener("progress",d)),r.send(a),n.next({type:O.Sent}),function(){r.removeEventListener("error",c),r.removeEventListener("load",l),e.reportProgress&&(r.removeEventListener("progress",f),null!==a&&r.upload&&r.upload.removeEventListener("progress",d)),r.readyState!==r.DONE&&r.abort()}})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Qb(V))},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),H=new i.q("XSRF_COOKIE_NAME"),U=new i.q("XSRF_HEADER_NAME"),q=function e(){m(this,e)},z=function(){var e=function(){function e(t,n,r){m(this,e),this.doc=t,this.platform=n,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return l(e,[{key:"getToken",value:function(){if("server"===this.platform)return null;var e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Object(v.t)(e,this.cookieName),this.lastCookieString=e),this.lastToken}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Qb(v.c),i.Qb(i.B),i.Qb(H))},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),B=function(){var e=function(){function e(t,n){m(this,e),this.tokenService=t,this.headerName=n}return l(e,[{key:"intercept",value:function(e,t){var n=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t.handle(e);var r=this.tokenService.getToken();return null===r||e.headers.has(this.headerName)||(e=e.clone({headers:e.headers.set(this.headerName,r)})),t.handle(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Qb(q),i.Qb(U))},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),Q=function(){var e=function(){function e(t,n){m(this,e),this.backend=t,this.injector=n,this.chain=null}return l(e,[{key:"handle",value:function(e){if(null===this.chain){var t=this.injector.get(R,[]);this.chain=t.reduceRight(function(e,t){return new D(e,t)},this.backend)}return this.chain.handle(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Qb(y),i.Qb(i.r))},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),W=function(){var e=function(){function e(){m(this,e)}return l(e,null,[{key:"disable",value:function(){return{ngModule:e,providers:[{provide:B,useClass:N}]}}},{key:"withOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.cookieName?{provide:H,useValue:t.cookieName}:[],t.headerName?{provide:U,useValue:t.headerName}:[]]}}}]),e}();return e.\u0275mod=i.Fb({type:e}),e.\u0275inj=i.Eb({factory:function(t){return new(t||e)},providers:[B,{provide:R,useExisting:B,multi:!0},{provide:q,useClass:z},{provide:H,useValue:"XSRF-TOKEN"},{provide:U,useValue:"X-XSRF-TOKEN"}]}),e}(),K=function(){var e=function e(){m(this,e)};return e.\u0275mod=i.Fb({type:e}),e.\u0275inj=i.Eb({factory:function(t){return new(t||e)},providers:[I,{provide:p,useClass:Q},F,{provide:y,useExisting:F},M,{provide:V,useExisting:M}],imports:[[W.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),e}()},tyNb:function(e,n,r){"use strict";r.d(n,"a",function(){return Ln}),r.d(n,"b",function(){return Bn}),r.d(n,"c",function(){return Mn}),r.d(n,"d",function(){return nr}),r.d(n,"e",function(){return Qn});var a=r("ofXK"),s=r("fXoL"),u=r("LRne"),f=r("Cfvw"),v=r("2Vo4"),y=r("z+Ro"),b=r("DH7j"),_=r("7o/Q"),k=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"notifyNext",value:function(e,t,n,r,i){this.destination.next(t)}},{key:"notifyError",value:function(e,t){this.destination.error(e)}},{key:"notifyComplete",value:function(e){this.destination.complete()}}]),n}(_.a),w=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this)).parent=e,o.outerValue=r,o.outerIndex=i,o.index=0,o}return l(n,[{key:"_next",value:function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}},{key:"_error",value:function(e){this.parent.notifyError(e,this),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(this),this.unsubscribe()}}]),n}(_.a),C=r("SeVD"),S=r("HDdC");function E(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new w(e,n,r);if(!i.closed)return t instanceof S.a?t.subscribe(i):Object(C.a)(t)(i)}var O=r("yCtX"),T={},x=function(){function e(t){m(this,e),this.resultSelector=t}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new A(e,this.resultSelector))}}]),e}(),A=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).resultSelector=r,i.active=0,i.values=[],i.observables=[],i}return l(n,[{key:"_next",value:function(e){this.values.push(T),this.observables.push(e)}},{key:"_complete",value:function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i2&&void 0!==arguments[2]&&arguments[2];m(this,e),this.accumulator=t,this.seed=n,this.hasSeed=r}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new G(e,this.accumulator,this.seed,this.hasSeed))}}]),e}(),G=function(e){h(n,e);var t=d(n);function n(e,r,i,o){var a;return m(this,n),(a=t.call(this,e)).accumulator=r,a._seed=i,a.hasSeed=o,a.index=0,a}return l(n,[{key:"_next",value:function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}},{key:"_tryNext",value:function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(r){this.destination.error(r)}this.seed=t,this.destination.next(t)}},{key:"seed",get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e}}]),n}(_.a),Z=r("zx2A");function X(e){return function(t){var n=new J(e),r=t.lift(n);return n.caught=r}}var J=function(){function e(t){m(this,e),this.selector=t}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new Y(e,this.selector,this.caught))}}]),e}(),Y=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,e)).selector=r,o.caught=i,o}return l(n,[{key:"error",value:function(e){if(!this.isStopped){var t;try{t=this.selector(e,this.caught)}catch(o){return void c(g(n.prototype),"error",this).call(this,o)}this._unsubscribeAndRecycle();var r=new Z.a(this);this.add(r);var i=Object(Z.c)(t,r);i!==r&&this.add(i)}}}]),n}(Z.b),$=r("bOdf"),ee=r("SxV6"),te=r("5+tZ"),ne=r("vkgz"),re=r("quSY"),ie=function(){function e(t){m(this,e),this.callback=t}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new oe(e,this.callback))}}]),e}(),oe=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).add(new re.a(r)),i}return n}(_.a),ae=r("bHdf"),se=function e(t,n){m(this,e),this.id=t,this.url=n},ue=function(e){h(n,e);var t=d(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"imperative",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return m(this,n),(i=t.call(this,e,r)).navigationTrigger=o,i.restoredState=a,i}return l(n,[{key:"toString",value:function(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(se),le=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,e,r)).urlAfterRedirects=i,o}return l(n,[{key:"toString",value:function(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}}]),n}(se),ce=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,e,r)).reason=i,o}return l(n,[{key:"toString",value:function(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(se),he=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,e,r)).error=i,o}return l(n,[{key:"toString",value:function(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}}]),n}(se),fe=function(e){h(n,e);var t=d(n);function n(e,r,i,o){var a;return m(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return l(n,[{key:"toString",value:function(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(se),de=function(e){h(n,e);var t=d(n);function n(e,r,i,o){var a;return m(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return l(n,[{key:"toString",value:function(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(se),ve=function(e){h(n,e);var t=d(n);function n(e,r,i,o,a){var s;return m(this,n),(s=t.call(this,e,r)).urlAfterRedirects=i,s.state=o,s.shouldActivate=a,s}return l(n,[{key:"toString",value:function(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}}]),n}(se),pe=function(e){h(n,e);var t=d(n);function n(e,r,i,o){var a;return m(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return l(n,[{key:"toString",value:function(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(se),ye=function(e){h(n,e);var t=d(n);function n(e,r,i,o){var a;return m(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return l(n,[{key:"toString",value:function(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(se),ge=function(){function e(t){m(this,e),this.route=t}return l(e,[{key:"toString",value:function(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}}]),e}(),me=function(){function e(t){m(this,e),this.route=t}return l(e,[{key:"toString",value:function(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}}]),e}(),be=function(){function e(t){m(this,e),this.snapshot=t}return l(e,[{key:"toString",value:function(){return"ChildActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),_e=function(){function e(t){m(this,e),this.snapshot=t}return l(e,[{key:"toString",value:function(){return"ChildActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),ke=function(){function e(t){m(this,e),this.snapshot=t}return l(e,[{key:"toString",value:function(){return"ActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),we=function(){function e(t){m(this,e),this.snapshot=t}return l(e,[{key:"toString",value:function(){return"ActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),Ce=function(){function e(t,n,r){m(this,e),this.routerEvent=t,this.position=n,this.anchor=r}return l(e,[{key:"toString",value:function(){return"Scroll(anchor: '".concat(this.anchor,"', position: '").concat(this.position?"".concat(this.position[0],", ").concat(this.position[1]):null,"')")}}]),e}(),Se=function(){function e(t){m(this,e),this.params=t||{}}return l(e,[{key:"has",value:function(e){return Object.prototype.hasOwnProperty.call(this.params,e)}},{key:"get",value:function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t[0]:t}return null}},{key:"getAll",value:function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t:[t]}return[]}},{key:"keys",get:function(){return Object.keys(this.params)}}]),e}();function Ee(e){return new Se(e)}function Oe(e){var t=Error("NavigationCancelingError: "+e);return t.ngNavigationCancelingError=!0,t}function Te(e,t,n){var r=n.path.split("/");if(r.length>e.length)return null;if("full"===n.pathMatch&&(t.hasChildren()||r.length0?e[e.length-1]:null}function Ie(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function De(e){return Object(s.ob)(e)?e:Object(s.pb)(e)?Object(f.a)(Promise.resolve(e)):Object(u.a)(e)}function Re(e,t,n){return n?function(e,t){return xe(e,t)}(e.queryParams,t.queryParams)&&Ne(e.root,t.root):function(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(function(n){return Ae(e[n],t[n])})}(e.queryParams,t.queryParams)&&Le(e.root,t.root)}function Ne(e,t){if(!Ue(e.segments,t.segments))return!1;if(e.numberOfChildren!==t.numberOfChildren)return!1;for(var n in t.children){if(!e.children[n])return!1;if(!Ne(e.children[n],t.children[n]))return!1}return!0}function Le(e,t){return Ve(e,t,t.segments)}function Ve(e,t,n){if(e.segments.length>n.length)return!!Ue(e.segments.slice(0,n.length),n)&&!t.hasChildren();if(e.segments.length===n.length){if(!Ue(e.segments,n))return!1;for(var r in t.children){if(!e.children[r])return!1;if(!Le(e.children[r],t.children[r]))return!1}return!0}var i=n.slice(0,e.segments.length),o=n.slice(e.segments.length);return!!Ue(e.segments,i)&&!!e.children.primary&&Ve(e.children.primary,t,o)}var Me=function(){function e(t,n,r){m(this,e),this.root=t,this.queryParams=n,this.fragment=r}return l(e,[{key:"toString",value:function(){return Qe.serialize(this)}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Ee(this.queryParams)),this._queryParamMap}}]),e}(),Fe=function(){function e(t,n){var r=this;m(this,e),this.segments=t,this.children=n,this.parent=null,Ie(n,function(e,t){return e.parent=r})}return l(e,[{key:"hasChildren",value:function(){return this.numberOfChildren>0}},{key:"toString",value:function(){return We(this)}},{key:"numberOfChildren",get:function(){return Object.keys(this.children).length}}]),e}(),He=function(){function e(t,n){m(this,e),this.path=t,this.parameters=n}return l(e,[{key:"toString",value:function(){return $e(this)}},{key:"parameterMap",get:function(){return this._parameterMap||(this._parameterMap=Ee(this.parameters)),this._parameterMap}}]),e}();function Ue(e,t){return e.length===t.length&&e.every(function(e,n){return e.path===t[n].path})}function qe(e,t){var n=[];return Ie(e.children,function(e,r){"primary"===r&&(n=n.concat(t(e,r)))}),Ie(e.children,function(e,r){"primary"!==r&&(n=n.concat(t(e,r)))}),n}var ze=function e(){m(this,e)},Be=function(){function e(){m(this,e)}return l(e,[{key:"parse",value:function(e){var t=new it(e);return new Me(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}},{key:"serialize",value:function(e){return"".concat("/"+Ke(e.root,!0)).concat((t=e.queryParams,n=Object.keys(t).map(function(e){var n=t[e];return Array.isArray(n)?n.map(function(t){return"".concat(Ze(e),"=").concat(Ze(t))}).join("&"):"".concat(Ze(e),"=").concat(Ze(n))}),n.length?"?"+n.join("&"):"")).concat("string"==typeof e.fragment?"#"+encodeURI(e.fragment):"");var t,n}}]),e}(),Qe=new Be;function We(e){return e.segments.map(function(e){return $e(e)}).join("/")}function Ke(e,t){if(!e.hasChildren())return We(e);if(t){var n=e.children.primary?Ke(e.children.primary,!1):"",r=[];return Ie(e.children,function(e,t){"primary"!==t&&r.push("".concat(t,":").concat(Ke(e,!1)))}),r.length>0?"".concat(n,"(").concat(r.join("//"),")"):n}var i=qe(e,function(t,n){return"primary"===n?[Ke(e.children.primary,!1)]:["".concat(n,":").concat(Ke(t,!1))]});return 1===Object.keys(e.children).length&&null!=e.children.primary?"".concat(We(e),"/").concat(i[0]):"".concat(We(e),"/(").concat(i.join("//"),")")}function Ge(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Ze(e){return Ge(e).replace(/%3B/gi,";")}function Xe(e){return Ge(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Je(e){return decodeURIComponent(e)}function Ye(e){return Je(e.replace(/\+/g,"%20"))}function $e(e){return"".concat(Xe(e.path)).concat((t=e.parameters,Object.keys(t).map(function(e){return";".concat(Xe(e),"=").concat(Xe(t[e]))}).join("")));var t}var et=/^[^\/()?;=#]+/;function tt(e){var t=e.match(et);return t?t[0]:""}var nt=/^[^=?&#]+/,rt=/^[^?&#]+/,it=function(){function e(t){m(this,e),this.url=t,this.remaining=t}return l(e,[{key:"parseRootSegment",value:function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Fe([],{}):new Fe([],this.parseChildren())}},{key:"parseQueryParams",value:function(){var e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}},{key:"parseFragment",value:function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}},{key:"parseChildren",value:function(){if(""===this.remaining)return{};this.consumeOptional("/");var e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());var t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n.primary=new Fe(e,t)),n}},{key:"parseSegment",value:function(){var e=tt(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '".concat(this.remaining,"'."));return this.capture(e),new He(Je(e),this.parseMatrixParams())}},{key:"parseMatrixParams",value:function(){for(var e={};this.consumeOptional(";");)this.parseParam(e);return e}},{key:"parseParam",value:function(e){var t=tt(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var r=tt(this.remaining);r&&(n=r,this.capture(n))}e[Je(t)]=Je(n)}}},{key:"parseQueryParam",value:function(e){var t=function(e){var t=e.match(nt);return t?t[0]:""}(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var r=function(e){var t=e.match(rt);return t?t[0]:""}(this.remaining);r&&(n=r,this.capture(n))}var i=Ye(t),o=Ye(n);if(e.hasOwnProperty(i)){var a=e[i];Array.isArray(a)||(a=[a],e[i]=a),a.push(o)}else e[i]=o}}},{key:"parseParens",value:function(e){var t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=tt(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error("Cannot parse url '".concat(this.url,"'"));var i=void 0;n.indexOf(":")>-1?(i=n.substr(0,n.indexOf(":")),this.capture(i),this.capture(":")):e&&(i="primary");var o=this.parseChildren();t[i]=1===Object.keys(o).length?o.primary:new Fe([],o),this.consumeOptional("//")}return t}},{key:"peekStartsWith",value:function(e){return this.remaining.startsWith(e)}},{key:"consumeOptional",value:function(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}},{key:"capture",value:function(e){if(!this.consumeOptional(e))throw new Error('Expected "'.concat(e,'".'))}}]),e}(),ot=function(){function e(t){m(this,e),this._root=t}return l(e,[{key:"parent",value:function(e){var t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}},{key:"children",value:function(e){var t=at(e,this._root);return t?t.children.map(function(e){return e.value}):[]}},{key:"firstChild",value:function(e){var t=at(e,this._root);return t&&t.children.length>0?t.children[0].value:null}},{key:"siblings",value:function(e){var t=st(e,this._root);return t.length<2?[]:t[t.length-2].children.map(function(e){return e.value}).filter(function(t){return t!==e})}},{key:"pathFromRoot",value:function(e){return st(e,this._root).map(function(e){return e.value})}},{key:"root",get:function(){return this._root.value}}]),e}();function at(e,t){if(e===t.value)return t;var n,r=i(t.children);try{for(r.s();!(n=r.n()).done;){var o=at(e,n.value);if(o)return o}}catch(a){r.e(a)}finally{r.f()}return null}function st(e,t){if(e===t.value)return[t];var n,r=i(t.children);try{for(r.s();!(n=r.n()).done;){var o=st(e,n.value);if(o.length)return o.unshift(t),o}}catch(a){r.e(a)}finally{r.f()}return[]}var ut=function(){function e(t,n){m(this,e),this.value=t,this.children=n}return l(e,[{key:"toString",value:function(){return"TreeNode(".concat(this.value,")")}}]),e}();function lt(e){var t={};return e&&e.children.forEach(function(e){return t[e.value.outlet]=e}),t}var ct=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).snapshot=r,yt(p(i),e),i}return l(n,[{key:"toString",value:function(){return this.snapshot.toString()}}]),n}(ot);function ht(e,t){var n=function(e,t){var n=new vt([],{},{},"",{},"primary",t,null,e.root,-1,{});return new pt("",new ut(n,[]))}(e,t),r=new v.a([new He("",{})]),i=new v.a({}),o=new v.a({}),a=new v.a({}),s=new v.a(""),u=new ft(r,i,a,s,o,"primary",t,n.root);return u.snapshot=n.root,new ct(new ut(u,[]),n)}var ft=function(){function e(t,n,r,i,o,a,s,u){m(this,e),this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=a,this.component=s,this._futureSnapshot=u}return l(e,[{key:"toString",value:function(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}},{key:"routeConfig",get:function(){return this._futureSnapshot.routeConfig}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=this.params.pipe(Object(R.a)(function(e){return Ee(e)}))),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Object(R.a)(function(e){return Ee(e)}))),this._queryParamMap}}]),e}();function dt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"emptyOnly",n=e.pathFromRoot,r=0;if("always"!==t)for(r=n.length-1;r>=1;){var i=n[r],o=n[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(o.component)break;r--}}return function(e){return e.reduce(function(e,t){return{params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}},{params:{},data:{},resolve:{}})}(n.slice(r))}var vt=function(){function e(t,n,r,i,o,a,s,u,l,c,h){m(this,e),this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=a,this.component=s,this.routeConfig=u,this._urlSegment=l,this._lastPathIndex=c,this._resolve=h}return l(e,[{key:"toString",value:function(){return"Route(url:'".concat(this.url.map(function(e){return e.toString()}).join("/"),"', path:'").concat(this.routeConfig?this.routeConfig.path:"","')")}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=Ee(this.params)),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Ee(this.queryParams)),this._queryParamMap}}]),e}(),pt=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,r)).url=e,yt(p(i),r),i}return l(n,[{key:"toString",value:function(){return gt(this._root)}}]),n}(ot);function yt(e,t){t.value._routerState=e,t.children.forEach(function(t){return yt(e,t)})}function gt(e){var t=e.children.length>0?" { ".concat(e.children.map(gt).join(", ")," } "):"";return"".concat(e.value).concat(t)}function mt(e){if(e.snapshot){var t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,xe(t.queryParams,n.queryParams)||e.queryParams.next(n.queryParams),t.fragment!==n.fragment&&e.fragment.next(n.fragment),xe(t.params,n.params)||e.params.next(n.params),function(e,t){if(e.length!==t.length)return!1;for(var n=0;n0&&wt(r[0]))throw new Error("Root segment cannot have matrix parameters");var i=r.find(Ct);if(i&&i!==Pe(r))throw new Error("{outlets:{}} has to be the last command")}return l(e,[{key:"toRoot",value:function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}]),e}(),Tt=function e(t,n,r){m(this,e),this.segmentGroup=t,this.processChildren=n,this.index=r};function xt(e,t,n){if(e||(e=new Fe([],{})),0===e.segments.length&&e.hasChildren())return At(e,t,n);var r=function(e,t,n){for(var r=0,i=t,o={match:!1,pathIndex:0,commandIndex:0};i=n.length)return o;var a=e.segments[i],s=n[r];if(Ct(s))break;var u=""+s,l=r0&&void 0===u)break;if(u&&l&&"object"==typeof l&&void 0===l.outlets){if(!Dt(u,l,a))return o;r+=2}else{if(!Dt(u,{},a))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(e,t,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex=2&&(n=!0),function(r){return r.lift(new K(e,t,n))}}(function(e,t){var n=!1;return t.reduce(function(e,r,i){if(e!==Ft)return e;if(r===Ft&&(n=!0),!n){if(!1===r)return r;if(i===t.length-1||Mt(r))return r}return e},e)},Ft),Object(L.a)(function(e){return e!==Ft}),Object(R.a)(function(e){return Mt(e)?e:!0===e}),Object(Q.a)(1))})}var Ut,qt=((Ut=function e(){m(this,e)}).\u0275fac=function(e){return new(e||Ut)},Ut.\u0275cmp=s.Bb({type:Ut,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,t){1&e&&s.Ib(0,"router-outlet")},directives:function(){return[Qn]},encapsulation:2}),Ut);function zt(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n0?new Fe([],{primary:e}):e;return new Me(r,t,n)}},{key:"expandSegmentGroup",value:function(e,t,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(e,t,n).pipe(Object(R.a)(function(e){return new Fe([],e)})):this.expandSegment(e,n,t,n.segments,r,!0)}},{key:"expandChildren",value:function(e,t,n){var r=this;return function(n,i){if(0===Object.keys(n).length)return Object(u.a)({});var o=[],a=[],s={};return Ie(n,function(n,i){var u,l,c=(u=i,l=n,r.expandSegmentGroup(e,t,l,u)).pipe(Object(R.a)(function(e){return s[i]=e}));"primary"===i?o.push(c):a.push(c)}),u.a.apply(null,o.concat(a)).pipe(Object(N.a)(),function(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Object(L.a)(function(t,n){return e(t,n,r)}):z.a,M(1),n?Object(q.a)(t):Object(U.a)(function(){return new j.a}))}}(),Object(R.a)(function(){return s}))}(n.children)}},{key:"expandSegment",value:function(e,n,r,i,o,a){var s=this,l=function(e){return e.reduce(function(e,t){var n=Kt(t);return e.has(n)?e.get(n).push(t):e.set(n,[t]),e},new Map)}(r);l.has(o)||l.set(o,[]);var c=Array.from(l.entries()).map(function(r){var l=t(r,2),c=l[0],h=function(t){return Object(f.a)(t).pipe(Object($.a)(function(r){return s.expandSegmentAgainstRoute(e,n,t,r,i,o,a).pipe(X(function(e){if(e instanceof Gt)return Object(u.a)(null);throw e}))}),Object(ee.a)(function(e){return null!==e}),X(function(e){if(e instanceof j.a||"EmptyError"===e.name){if(s.noLeftoversInUrl(n,i,o))return Object(u.a)(new Fe([],{}));throw new Gt(n)}throw e}))}(l[1]);return c===o?h:h.pipe(Object(R.a)(function(){return null}),X(function(){return Object(u.a)(null)}))});return Object(f.a)(c).pipe(function(e){return e.lift(new x(void 0))},Object(ee.a)(),Object(R.a)(function(e){return e.find(function(e){return null!==e})}))}},{key:"noLeftoversInUrl",value:function(e,t,n){return 0===t.length&&!e.children[n]}},{key:"expandSegmentAgainstRoute",value:function(e,t,n,r,i,o,a){return Kt(r)!==o&&""!==r.path?Xt(t):void 0===r.redirectTo?this.matchSegmentAgainstRoute(e,t,r,i):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,n,r,i,o):Xt(t)}},{key:"expandSegmentAgainstRouteUsingRedirect",value:function(e,t,n,r,i,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,n,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,r,i,o)}},{key:"expandWildCardWithParamsAgainstRouteUsingRedirect",value:function(e,t,n,r){var i=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Jt(o):this.lineralizeSegments(n,o).pipe(Object(te.a)(function(n){var o=new Fe(n,{});return i.expandSegment(e,o,t,n,r,!1)}))}},{key:"expandRegularSegmentAgainstRouteUsingRedirect",value:function(e,t,n,r,i,o){var a=this,s=en(t,r,i),u=s.matched,l=s.consumedSegments,c=s.lastChild,h=s.positionalParamSegments;if(!u)return Xt(t);var f=this.applyRedirectCommands(l,r.redirectTo,h);return r.redirectTo.startsWith("/")?Jt(f):this.lineralizeSegments(r,f).pipe(Object(te.a)(function(r){return a.expandSegment(e,t,n,r.concat(i.slice(c)),o,!1)}))}},{key:"matchSegmentAgainstRoute",value:function(e,t,n,r){var o=this;if("**"===n.path)return n.loadChildren?this.configLoader.load(e.injector,n).pipe(Object(R.a)(function(e){return n._loadedConfig=e,new Fe(r,{})})):Object(u.a)(new Fe(r,{}));var a=en(t,n,r),s=a.matched,l=a.consumedSegments,c=a.lastChild;if(!s)return Xt(t);var h=r.slice(c);return this.getChildConfig(e,n,r).pipe(Object(te.a)(function(e){var n=e.module,r=e.routes,a=function(e,t,n,r){return n.length>0&&function(e,t,n){return n.some(function(n){return nn(e,t,n)&&"primary"!==Kt(n)})}(e,n,r)?{segmentGroup:tn(new Fe(t,function(e,t){var n={};n.primary=t;var r,o=i(e);try{for(o.s();!(r=o.n()).done;){var a=r.value;""===a.path&&"primary"!==Kt(a)&&(n[Kt(a)]=new Fe([],{}))}}catch(s){o.e(s)}finally{o.f()}return n}(r,new Fe(n,e.children)))),slicedSegments:[]}:0===n.length&&function(e,t,n){return n.some(function(n){return nn(e,t,n)})}(e,n,r)?{segmentGroup:tn(new Fe(e.segments,function(e,t,n,r){var o,a={},s=i(n);try{for(s.s();!(o=s.n()).done;){var u=o.value;nn(e,t,u)&&!r[Kt(u)]&&(a[Kt(u)]=new Fe([],{}))}}catch(l){s.e(l)}finally{s.f()}return Object.assign(Object.assign({},r),a)}(e,n,r,e.children))),slicedSegments:n}:{segmentGroup:e,slicedSegments:n}}(t,l,h,r),s=a.segmentGroup,c=a.slicedSegments;return 0===c.length&&s.hasChildren()?o.expandChildren(n,r,s).pipe(Object(R.a)(function(e){return new Fe(l,e)})):0===r.length&&0===c.length?Object(u.a)(new Fe(l,{})):o.expandSegment(n,s,r,c,"primary",!0).pipe(Object(R.a)(function(e){return new Fe(l.concat(e.segments),e.children)}))}))}},{key:"getChildConfig",value:function(e,t,n){var r=this;return t.children?Object(u.a)(new Lt(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?Object(u.a)(t._loadedConfig):this.runCanLoadGuards(e.injector,t,n).pipe(Object(te.a)(function(n){return n?r.configLoader.load(e.injector,t).pipe(Object(R.a)(function(e){return t._loadedConfig=e,e})):function(e){return new S.a(function(t){return t.error(Oe("Cannot load children because the guard of the route \"path: '".concat(e.path,"'\" returned false")))})}(t)})):Object(u.a)(new Lt([],e))}},{key:"runCanLoadGuards",value:function(e,t,n){var r=this,i=t.canLoad;if(!i||0===i.length)return Object(u.a)(!0);var o=i.map(function(r){var i,o=e.get(r);if(function(e){return e&&Vt(e.canLoad)}(o))i=o.canLoad(t,n);else{if(!Vt(o))throw new Error("Invalid CanLoad guard");i=o(t,n)}return De(i)});return Object(u.a)(o).pipe(Ht(),Object(ne.a)(function(e){if(Mt(e)){var t=Oe('Redirecting to "'.concat(r.urlSerializer.serialize(e),'"'));throw t.url=e,t}}),Object(R.a)(function(e){return!0===e}))}},{key:"lineralizeSegments",value:function(e,t){for(var n=[],r=t.root;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return Object(u.a)(n);if(r.numberOfChildren>1||!r.children.primary)return Yt(e.redirectTo);r=r.children.primary}}},{key:"applyRedirectCommands",value:function(e,t,n){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,n)}},{key:"applyRedirectCreatreUrlTree",value:function(e,t,n,r){var i=this.createSegmentGroup(e,t.root,n,r);return new Me(i,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}},{key:"createQueryParams",value:function(e,t){var n={};return Ie(e,function(e,r){if("string"==typeof e&&e.startsWith(":")){var i=e.substring(1);n[r]=t[i]}else n[r]=e}),n}},{key:"createSegmentGroup",value:function(e,t,n,r){var i=this,o=this.createSegments(e,t.segments,n,r),a={};return Ie(t.children,function(t,o){a[o]=i.createSegmentGroup(e,t,n,r)}),new Fe(o,a)}},{key:"createSegments",value:function(e,t,n,r){var i=this;return t.map(function(t){return t.path.startsWith(":")?i.findPosParam(e,t,r):i.findOrReturn(t,n)})}},{key:"findPosParam",value:function(e,t,n){var r=n[t.path.substring(1)];if(!r)throw new Error("Cannot redirect to '".concat(e,"'. Cannot find '").concat(t.path,"'."));return r}},{key:"findOrReturn",value:function(e,t){var n,r=0,o=i(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.path===e.path)return t.splice(r),a;r++}}catch(s){o.e(s)}finally{o.f()}return e}}]),e}();function en(e,t,n){if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var r=(t.matcher||Te)(n,e,t);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function tn(e){if(1===e.numberOfChildren&&e.children.primary){var t=e.children.primary;return new Fe(e.segments.concat(t.segments),t.children)}return e}function nn(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}var rn=function e(t){m(this,e),this.path=t,this.route=this.path[this.path.length-1]},on=function e(t,n){m(this,e),this.component=t,this.route=n};function an(e,t,n){var r=e._root;return un(r,t?t._root:null,n,[r.value])}function sn(e,t,n){var r=function(e){if(!e)return null;for(var t=e.parent;t;t=t.parent){var n=t.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(t);return(r?r.module.injector:n).get(e)}function un(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=lt(t);return e.children.forEach(function(e){!function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=e.value,a=t?t.value:null,s=n?n.getContext(e.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){var u=function(e,t,n){if("function"==typeof n)return n(e,t);switch(n){case"pathParamsChange":return!Ue(e.url,t.url);case"pathParamsOrQueryParamsChange":return!Ue(e.url,t.url)||!xe(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!bt(e,t)||!xe(e.queryParams,t.queryParams);case"paramsChange":default:return!bt(e,t)}}(a,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new rn(r)):(o.data=a.data,o._resolvedData=a._resolvedData),un(e,t,o.component?s?s.children:null:n,r,i),u&&s&&s.outlet&&s.outlet.isActivated&&i.canDeactivateChecks.push(new on(s.outlet.component,a))}else a&&ln(t,s,i),i.canActivateChecks.push(new rn(r)),un(e,null,o.component?s?s.children:null:n,r,i)}(e,o[e.value.outlet],n,r.concat([e.value]),i),delete o[e.value.outlet]}),Ie(o,function(e,t){return ln(e,n.getContext(t),i)}),i}function ln(e,t,n){var r=lt(e),i=e.value;Ie(r,function(e,r){ln(e,i.component?t?t.children.getContext(r):null:t,n)}),n.canDeactivateChecks.push(new on(i.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,i))}function cn(e,t){return null!==e&&t&&t(new ke(e)),Object(u.a)(!0)}function hn(e,t){return null!==e&&t&&t(new be(e)),Object(u.a)(!0)}function fn(e,t,n){var r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||0===r.length)return Object(u.a)(!0);var i=r.map(function(r){return Object(P.a)(function(){var i,o=sn(r,t,n);if(function(e){return e&&Vt(e.canActivate)}(o))i=De(o.canActivate(t,e));else{if(!Vt(o))throw new Error("Invalid CanActivate guard");i=De(o(t,e))}return i.pipe(Object(ee.a)())})});return Object(u.a)(i).pipe(Ht())}function dn(e,t,n){var r=t[t.length-1],i=t.slice(0,t.length-1).reverse().map(function(e){return function(e){var t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(e)}).filter(function(e){return null!==e}).map(function(t){return Object(P.a)(function(){var i=t.guards.map(function(i){var o,a=sn(i,t.node,n);if(function(e){return e&&Vt(e.canActivateChild)}(a))o=De(a.canActivateChild(r,e));else{if(!Vt(a))throw new Error("Invalid CanActivateChild guard");o=De(a(r,e))}return o.pipe(Object(ee.a)())});return Object(u.a)(i).pipe(Ht())})});return Object(u.a)(i).pipe(Ht())}var vn=function e(){m(this,e)},pn=function(){function e(t,n,r,i,o,a){m(this,e),this.rootComponentType=t,this.config=n,this.urlTree=r,this.url=i,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=a}return l(e,[{key:"recognize",value:function(){try{var e=mn(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,"primary"),n=new vt([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),r=new ut(n,t),i=new pt(this.url,r);return this.inheritParamsAndData(i._root),Object(u.a)(i)}catch(o){return new S.a(function(e){return e.error(o)})}}},{key:"inheritParamsAndData",value:function(e){var t=this,n=e.value,r=dt(n,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),e.children.forEach(function(e){return t.inheritParamsAndData(e)})}},{key:"processSegmentGroup",value:function(e,t,n){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,n)}},{key:"processChildren",value:function(e,t){var n,r=this,i=qe(t,function(t,n){return r.processSegmentGroup(e,t,n)});return n={},i.forEach(function(e){var t=n[e.value.outlet];if(t){var r=t.url.map(function(e){return e.toString()}).join("/"),i=e.value.url.map(function(e){return e.toString()}).join("/");throw new Error("Two segments cannot have the same outlet name: '".concat(r,"' and '").concat(i,"'."))}n[e.value.outlet]=e.value}),i.sort(function(e,t){return"primary"===e.value.outlet?-1:"primary"===t.value.outlet?1:e.value.outlet.localeCompare(t.value.outlet)}),i}},{key:"processSegment",value:function(e,t,n,r){var o,a=i(e);try{for(a.s();!(o=a.n()).done;){var s=o.value;try{return this.processSegmentAgainstRoute(s,t,n,r)}catch(u){if(!(u instanceof vn))throw u}}}catch(l){a.e(l)}finally{a.f()}if(this.noLeftoversInUrl(t,n,r))return[];throw new vn}},{key:"noLeftoversInUrl",value:function(e,t,n){return 0===t.length&&!e.children[n]}},{key:"processSegmentAgainstRoute",value:function(e,t,n,r){if(e.redirectTo)throw new vn;if((e.outlet||"primary")!==r)throw new vn;var i,o=[],a=[];if("**"===e.path){var s=n.length>0?Pe(n).parameters:{};i=new vt(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,kn(e),r,e.component,e,yn(t),gn(t)+n.length,wn(e))}else{var u=function(e,t,n){if(""===t.path){if("full"===t.pathMatch&&(e.hasChildren()||n.length>0))throw new vn;return{consumedSegments:[],lastChild:0,parameters:{}}}var r=(t.matcher||Te)(n,e,t);if(!r)throw new vn;var i={};Ie(r.posParams,function(e,t){i[t]=e.path});var o=r.consumed.length>0?Object.assign(Object.assign({},i),r.consumed[r.consumed.length-1].parameters):i;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:o}}(t,e,n);o=u.consumedSegments,a=n.slice(u.lastChild),i=new vt(o,u.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,kn(e),r,e.component,e,yn(t),gn(t)+o.length,wn(e))}var l=function(e){return e.children?e.children:e.loadChildren?e._loadedConfig.routes:[]}(e),c=mn(t,o,a,l,this.relativeLinkResolution),h=c.segmentGroup,f=c.slicedSegments;if(0===f.length&&h.hasChildren()){var d=this.processChildren(l,h);return[new ut(i,d)]}if(0===l.length&&0===f.length)return[new ut(i,[])];var v=this.processSegment(l,h,f,"primary");return[new ut(i,v)]}}]),e}();function yn(e){for(var t=e;t._sourceSegment;)t=t._sourceSegment;return t}function gn(e){for(var t=e,n=t._segmentIndexShift?t._segmentIndexShift:0;t._sourceSegment;)n+=(t=t._sourceSegment)._segmentIndexShift?t._segmentIndexShift:0;return n-1}function mn(e,t,n,r,o){if(n.length>0&&function(e,t,n){return n.some(function(n){return bn(e,t,n)&&"primary"!==_n(n)})}(e,n,r)){var a=new Fe(t,function(e,t,n,r){var o={};o.primary=r,r._sourceSegment=e,r._segmentIndexShift=t.length;var a,s=i(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(""===u.path&&"primary"!==_n(u)){var l=new Fe([],{});l._sourceSegment=e,l._segmentIndexShift=t.length,o[_n(u)]=l}}}catch(c){s.e(c)}finally{s.f()}return o}(e,t,r,new Fe(n,e.children)));return a._sourceSegment=e,a._segmentIndexShift=t.length,{segmentGroup:a,slicedSegments:[]}}if(0===n.length&&function(e,t,n){return n.some(function(n){return bn(e,t,n)})}(e,n,r)){var s=new Fe(e.segments,function(e,t,n,r,o,a){var s,u={},l=i(r);try{for(l.s();!(s=l.n()).done;){var c=s.value;if(bn(e,n,c)&&!o[_n(c)]){var h=new Fe([],{});h._sourceSegment=e,h._segmentIndexShift="legacy"===a?e.segments.length:t.length,u[_n(c)]=h}}}catch(f){l.e(f)}finally{l.f()}return Object.assign(Object.assign({},o),u)}(e,t,n,r,e.children,o));return s._sourceSegment=e,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:n}}var u=new Fe(e.segments,e.children);return u._sourceSegment=e,u._segmentIndexShift=t.length,{segmentGroup:u,slicedSegments:n}}function bn(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function _n(e){return e.outlet||"primary"}function kn(e){return e.data||{}}function wn(e){return e.resolve||{}}function Cn(e){return function(t){return t.pipe(Object(B.a)(function(t){var n=e(t);return n?Object(f.a)(n).pipe(Object(R.a)(function(){return t})):Object(f.a)([t])}))}}var Sn=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return n}(function(){function e(){m(this,e)}return l(e,[{key:"shouldDetach",value:function(e){return!1}},{key:"store",value:function(e,t){}},{key:"shouldAttach",value:function(e){return!1}},{key:"retrieve",value:function(e){return null}},{key:"shouldReuseRoute",value:function(e,t){return e.routeConfig===t.routeConfig}}]),e}()),En=new s.q("ROUTES"),On=function(){function e(t,n,r,i){m(this,e),this.loader=t,this.compiler=n,this.onLoadStartListener=r,this.onLoadEndListener=i}return l(e,[{key:"load",value:function(e,t){var n=this;return this.onLoadStartListener&&this.onLoadStartListener(t),this.loadModuleFactory(t.loadChildren).pipe(Object(R.a)(function(r){n.onLoadEndListener&&n.onLoadEndListener(t);var i=r.create(e);return new Lt(je(i.injector.get(En)).map(Wt),i)}))}},{key:"loadModuleFactory",value:function(e){var t=this;return"string"==typeof e?Object(f.a)(this.loader.load(e)):De(e()).pipe(Object(te.a)(function(e){return e instanceof s.v?Object(u.a)(e):Object(f.a)(t.compiler.compileModuleAsync(e))}))}}]),e}(),Tn=function e(){m(this,e),this.outlet=null,this.route=null,this.resolver=null,this.children=new xn,this.attachRef=null},xn=function(){function e(){m(this,e),this.contexts=new Map}return l(e,[{key:"onChildOutletCreated",value:function(e,t){var n=this.getOrCreateContext(e);n.outlet=t,this.contexts.set(e,n)}},{key:"onChildOutletDestroyed",value:function(e){var t=this.getContext(e);t&&(t.outlet=null)}},{key:"onOutletDeactivated",value:function(){var e=this.contexts;return this.contexts=new Map,e}},{key:"onOutletReAttached",value:function(e){this.contexts=e}},{key:"getOrCreateContext",value:function(e){var t=this.getContext(e);return t||(t=new Tn,this.contexts.set(e,t)),t}},{key:"getContext",value:function(e){return this.contexts.get(e)||null}}]),e}(),An=function(){function e(){m(this,e)}return l(e,[{key:"shouldProcessUrl",value:function(e){return!0}},{key:"extract",value:function(e){return e}},{key:"merge",value:function(e,t){return e}}]),e}();function jn(e){throw e}function Pn(e,t,n){return t.parse("/")}function In(e,t){return Object(u.a)(null)}var Dn,Rn,Nn,Ln=((Nn=function(){function e(t,n,r,i,o,a,u,l){var c=this;m(this,e),this.rootComponentType=t,this.urlSerializer=n,this.rootContexts=r,this.location=i,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new D.a,this.errorHandler=jn,this.malformedUriErrorHandler=Pn,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:In,afterPreactivation:In},this.urlHandlingStrategy=new An,this.routeReuseStrategy=new Sn,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=o.get(s.x),this.console=o.get(s.W);var h=o.get(s.z);this.isNgZoneEnabled=h instanceof s.z,this.resetConfig(l),this.currentUrlTree=new Me(new Fe([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new On(a,u,function(e){return c.triggerEvent(new ge(e))},function(e){return c.triggerEvent(new me(e))}),this.routerState=ht(this.currentUrlTree,this.rootComponentType),this.transitions=new v.a({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return l(e,[{key:"setupNavigations",value:function(e){var t=this,n=this.events;return e.pipe(Object(L.a)(function(e){return 0!==e.id}),Object(R.a)(function(e){return Object.assign(Object.assign({},e),{extractedUrl:t.urlHandlingStrategy.extract(e.rawUrl)})}),Object(B.a)(function(e){var r,i,o,a,s=!1,l=!1;return Object(u.a)(e).pipe(Object(ne.a)(function(e){t.currentNavigation={id:e.id,initialUrl:e.currentRawUrl,extractedUrl:e.extractedUrl,trigger:e.source,extras:e.extras,previousNavigation:t.lastSuccessfulNavigation?Object.assign(Object.assign({},t.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Object(B.a)(function(e){var r,i,o,a,s=!t.navigated||e.extractedUrl.toString()!==t.browserUrlTree.toString();if(("reload"===t.onSameUrlNavigation||s)&&t.urlHandlingStrategy.shouldProcessUrl(e.rawUrl))return Object(u.a)(e).pipe(Object(B.a)(function(e){var r=t.transitions.getValue();return n.next(new ue(e.id,t.serializeUrl(e.extractedUrl),e.source,e.restoredState)),r!==t.transitions.getValue()?I.a:[e]}),Object(B.a)(function(e){return Promise.resolve(e)}),(r=t.ngModule.injector,i=t.configLoader,o=t.urlSerializer,a=t.config,function(e){return e.pipe(Object(B.a)(function(e){return function(e,t,n,r,i){return new $t(e,t,n,r,i).apply()}(r,i,o,e.extractedUrl,a).pipe(Object(R.a)(function(t){return Object.assign(Object.assign({},e),{urlAfterRedirects:t})}))}))}),Object(ne.a)(function(e){t.currentNavigation=Object.assign(Object.assign({},t.currentNavigation),{finalUrl:e.urlAfterRedirects})}),function(e,n,r,i,o){return function(r){return r.pipe(Object(te.a)(function(r){return function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"emptyOnly",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"legacy";return new pn(e,t,n,r,i,o).recognize()}(e,n,r.urlAfterRedirects,(a=r.urlAfterRedirects,t.serializeUrl(a)),i,o).pipe(Object(R.a)(function(e){return Object.assign(Object.assign({},r),{targetSnapshot:e})}));var a}))}}(t.rootComponentType,t.config,0,t.paramsInheritanceStrategy,t.relativeLinkResolution),Object(ne.a)(function(e){"eager"===t.urlUpdateStrategy&&(e.extras.skipLocationChange||t.setBrowserUrl(e.urlAfterRedirects,!!e.extras.replaceUrl,e.id,e.extras.state),t.browserUrlTree=e.urlAfterRedirects)}),Object(ne.a)(function(e){var r=new fe(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);n.next(r)}));if(s&&t.rawUrlTree&&t.urlHandlingStrategy.shouldProcessUrl(t.rawUrlTree)){var l=e.id,c=e.extractedUrl,h=e.source,f=e.restoredState,d=e.extras,v=new ue(l,t.serializeUrl(c),h,f);n.next(v);var p=ht(c,t.rootComponentType).snapshot;return Object(u.a)(Object.assign(Object.assign({},e),{targetSnapshot:p,urlAfterRedirects:c,extras:Object.assign(Object.assign({},d),{skipLocationChange:!1,replaceUrl:!1})}))}return t.rawUrlTree=e.rawUrl,t.browserUrlTree=e.urlAfterRedirects,e.resolve(null),I.a}),Cn(function(e){var n=e.targetSnapshot,r=e.id,i=e.extractedUrl,o=e.rawUrl,a=e.extras,s=a.skipLocationChange,u=a.replaceUrl;return t.hooks.beforePreactivation(n,{navigationId:r,appliedUrlTree:i,rawUrlTree:o,skipLocationChange:!!s,replaceUrl:!!u})}),Object(ne.a)(function(e){var n=new de(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)}),Object(R.a)(function(e){return Object.assign(Object.assign({},e),{guards:an(e.targetSnapshot,e.currentSnapshot,t.rootContexts)})}),function(e,t){return function(n){return n.pipe(Object(te.a)(function(n){var r=n.targetSnapshot,i=n.currentSnapshot,o=n.guards,a=o.canActivateChecks,s=o.canDeactivateChecks;return 0===s.length&&0===a.length?Object(u.a)(Object.assign(Object.assign({},n),{guardsResult:!0})):function(e,t,n,r){return Object(f.a)(e).pipe(Object(te.a)(function(e){return function(e,t,n,r,i){var o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||0===o.length)return Object(u.a)(!0);var a=o.map(function(o){var a,s=sn(o,t,i);if(function(e){return e&&Vt(e.canDeactivate)}(s))a=De(s.canDeactivate(e,t,n,r));else{if(!Vt(s))throw new Error("Invalid CanDeactivate guard");a=De(s(e,t,n,r))}return a.pipe(Object(ee.a)())});return Object(u.a)(a).pipe(Ht())}(e.component,e.route,n,t,r)}),Object(ee.a)(function(e){return!0!==e},!0))}(s,r,i,e).pipe(Object(te.a)(function(n){return n&&"boolean"==typeof n?function(e,t,n,r){return Object(f.a)(t).pipe(Object($.a)(function(t){return Object(f.a)([hn(t.route.parent,r),cn(t.route,r),dn(e,t.path,n),fn(e,t.route,n)]).pipe(Object(N.a)(),Object(ee.a)(function(e){return!0!==e},!0))}),Object(ee.a)(function(e){return!0!==e},!0))}(r,a,e,t):Object(u.a)(n)}),Object(R.a)(function(e){return Object.assign(Object.assign({},n),{guardsResult:e})}))}))}}(t.ngModule.injector,function(e){return t.triggerEvent(e)}),Object(ne.a)(function(e){if(Mt(e.guardsResult)){var n=Oe('Redirecting to "'.concat(t.serializeUrl(e.guardsResult),'"'));throw n.url=e.guardsResult,n}}),Object(ne.a)(function(e){var n=new ve(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot,!!e.guardsResult);t.triggerEvent(n)}),Object(L.a)(function(e){if(!e.guardsResult){t.resetUrlToCurrentUrlTree();var r=new ce(e.id,t.serializeUrl(e.extractedUrl),"");return n.next(r),e.resolve(!1),!1}return!0}),Cn(function(e){if(e.guards.canActivateChecks.length)return Object(u.a)(e).pipe(Object(ne.a)(function(e){var n=new pe(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)}),Object(B.a)(function(e){var r,i,o=!1;return Object(u.a)(e).pipe((r=t.paramsInheritanceStrategy,i=t.ngModule.injector,function(e){return e.pipe(Object(te.a)(function(e){var t=e.targetSnapshot,n=e.guards.canActivateChecks;if(!n.length)return Object(u.a)(e);var o=0;return Object(f.a)(n).pipe(Object($.a)(function(e){return function(e,t,n,r){return function(e,t,n,r){var i=Object.keys(e);if(0===i.length)return Object(u.a)({});var o={};return Object(f.a)(i).pipe(Object(te.a)(function(i){return function(e,t,n,r){var i=sn(e,t,r);return De(i.resolve?i.resolve(t,n):i(t,n))}(e[i],t,n,r).pipe(Object(ne.a)(function(e){o[i]=e}))}),M(1),Object(te.a)(function(){return Object.keys(o).length===i.length?Object(u.a)(o):I.a}))}(e._resolve,e,t,r).pipe(Object(R.a)(function(t){return e._resolvedData=t,e.data=Object.assign(Object.assign({},e.data),dt(e,n).resolve),null}))}(e.route,t,r,i)}),Object(ne.a)(function(){return o++}),M(1),Object(te.a)(function(t){return o===n.length?Object(u.a)(e):I.a}))}))}),Object(ne.a)({next:function(){return o=!0},complete:function(){if(!o){var r=new ce(e.id,t.serializeUrl(e.extractedUrl),"At least one route resolver didn't emit any value.");n.next(r),e.resolve(!1)}}}))}),Object(ne.a)(function(e){var n=new ye(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)}))}),Cn(function(e){var n=e.targetSnapshot,r=e.id,i=e.extractedUrl,o=e.rawUrl,a=e.extras,s=a.skipLocationChange,u=a.replaceUrl;return t.hooks.afterPreactivation(n,{navigationId:r,appliedUrlTree:i,rawUrlTree:o,skipLocationChange:!!s,replaceUrl:!!u})}),Object(R.a)(function(e){var n=function(e,t,n){var r=_t(e,t._root,n?n._root:void 0);return new ct(r,t)}(t.routeReuseStrategy,e.targetSnapshot,e.currentRouterState);return Object.assign(Object.assign({},e),{targetRouterState:n})}),Object(ne.a)(function(e){t.currentUrlTree=e.urlAfterRedirects,t.rawUrlTree=t.urlHandlingStrategy.merge(t.currentUrlTree,e.rawUrl),t.routerState=e.targetRouterState,"deferred"===t.urlUpdateStrategy&&(e.extras.skipLocationChange||t.setBrowserUrl(t.rawUrlTree,!!e.extras.replaceUrl,e.id,e.extras.state),t.browserUrlTree=e.urlAfterRedirects)}),(i=t.rootContexts,o=t.routeReuseStrategy,a=function(e){return t.triggerEvent(e)},Object(R.a)(function(e){return new Rt(o,e.targetRouterState,e.currentRouterState,a).activate(i),e})),Object(ne.a)({next:function(){s=!0},complete:function(){s=!0}}),(r=function(){if(!s&&!l){t.resetUrlToCurrentUrlTree();var r=new ce(e.id,t.serializeUrl(e.extractedUrl),"Navigation ID ".concat(e.id," is not equal to the current navigation id ").concat(t.navigationId));n.next(r),e.resolve(!1)}t.currentNavigation=null},function(e){return e.lift(new ie(r))}),X(function(r){if(l=!0,(s=r)&&s.ngNavigationCancelingError){var i=Mt(r.url);i||(t.navigated=!0,t.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl));var o=new ce(e.id,t.serializeUrl(e.extractedUrl),r.message);n.next(o),i?setTimeout(function(){var n=t.urlHandlingStrategy.merge(r.url,t.rawUrlTree);return t.scheduleNavigation(n,"imperative",null,{skipLocationChange:e.extras.skipLocationChange,replaceUrl:"eager"===t.urlUpdateStrategy},{resolve:e.resolve,reject:e.reject,promise:e.promise})},0):e.resolve(!1)}else{t.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl);var a=new he(e.id,t.serializeUrl(e.extractedUrl),r);n.next(a);try{e.resolve(t.errorHandler(r))}catch(u){e.reject(u)}}var s;return I.a}))}))}},{key:"resetRootComponentType",value:function(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}},{key:"getTransition",value:function(){var e=this.transitions.value;return e.urlAfterRedirects=this.browserUrlTree,e}},{key:"setTransition",value:function(e){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),e))}},{key:"initialNavigation",value:function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}},{key:"setUpLocationChangeListener",value:function(){var e=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(t){var n=e.extractLocationChangeInfoFromEvent(t);e.shouldScheduleNavigation(e.lastLocationChangeInfo,n)&&setTimeout(function(){var t=n.source,r=n.state,i=n.urlTree,o={replaceUrl:!0};if(r){var a=Object.assign({},r);delete a.navigationId,0!==Object.keys(a).length&&(o.state=a)}e.scheduleNavigation(i,t,r,o)},0),e.lastLocationChangeInfo=n}))}},{key:"extractLocationChangeInfoFromEvent",value:function(e){var t;return{source:"popstate"===e.type?"popstate":"hashchange",urlTree:this.parseUrl(e.url),state:(null===(t=e.state)||void 0===t?void 0:t.navigationId)?e.state:null,transitionId:this.getTransition().id}}},{key:"shouldScheduleNavigation",value:function(e,t){if(!e)return!0;var n=t.urlTree.toString()===e.urlTree.toString();return!(t.transitionId===e.transitionId&&n&&("hashchange"===t.source&&"popstate"===e.source||"popstate"===t.source&&"hashchange"===e.source))}},{key:"getCurrentNavigation",value:function(){return this.currentNavigation}},{key:"triggerEvent",value:function(e){this.events.next(e)}},{key:"resetConfig",value:function(e){zt(e),this.config=e.map(Wt),this.navigated=!1,this.lastSuccessfulId=-1}},{key:"ngOnDestroy",value:function(){this.dispose()}},{key:"dispose",value:function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}},{key:"createUrlTree",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.relativeTo,r=t.queryParams,i=t.fragment,a=t.queryParamsHandling,s=t.preserveFragment,u=n||this.routerState.root,l=s?this.currentUrlTree.fragment:i,c=null;switch(a){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=r||null}return null!==c&&(c=this.removeEmptyProps(c)),function(e,t,n,r,i){if(0===n.length)return St(t.root,t.root,t,r,i);var a=function(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new Ot(!0,0,e);var t=0,n=!1,r=e.reduce(function(e,r,i){if("object"==typeof r&&null!=r){if(r.outlets){var a={};return Ie(r.outlets,function(e,t){a[t]="string"==typeof e?e.split("/"):e}),[].concat(o(e),[{outlets:a}])}if(r.segmentPath)return[].concat(o(e),[r.segmentPath])}return"string"!=typeof r?[].concat(o(e),[r]):0===i?(r.split("/").forEach(function(r,i){0==i&&"."===r||(0==i&&""===r?n=!0:".."===r?t++:""!=r&&e.push(r))}),e):[].concat(o(e),[r])},[]);return new Ot(n,t,r)}(n);if(a.toRoot())return St(t.root,new Fe([],{}),t,r,i);var s=function(e,t,n){if(e.isAbsolute)return new Tt(t.root,!0,0);if(-1===n.snapshot._lastPathIndex){var r=n.snapshot._urlSegment;return new Tt(r,r===t.root,0)}var i=wt(e.commands[0])?0:1;return function(e,t,n){for(var r=e,i=t,o=n;o>i;){if(o-=i,!(r=r.parent))throw new Error("Invalid number of '../'");i=r.segments.length}return new Tt(r,!1,i-o)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,e.numberOfDoubleDots)}(a,t,e),u=s.processChildren?At(s.segmentGroup,s.index,a.commands):xt(s.segmentGroup,s.index,a.commands);return St(s.segmentGroup,u,t,r,i)}(u,this.currentUrlTree,e,c,l)}},{key:"navigateByUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1},n=Mt(e)?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,t)}},{key:"navigate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};return function(e){for(var t=0;t2&&void 0!==arguments[2]?arguments[2]:{};m(this,e),this.router=t,this.viewportScroller=n,this.options=r,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},r.scrollPositionRestoration=r.scrollPositionRestoration||"disabled",r.anchorScrolling=r.anchorScrolling||"disabled"}return l(e,[{key:"init",value:function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}},{key:"createScrollEvents",value:function(){var e=this;return this.router.events.subscribe(function(t){t instanceof ue?(e.store[e.lastId]=e.viewportScroller.getScrollPosition(),e.lastSource=t.navigationTrigger,e.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof le&&(e.lastId=t.id,e.scheduleScrollEvent(t,e.router.parseUrl(t.urlAfterRedirects).fragment))})}},{key:"consumeScrollEvents",value:function(){var e=this;return this.router.events.subscribe(function(t){t instanceof Ce&&(t.position?"top"===e.options.scrollPositionRestoration?e.viewportScroller.scrollToPosition([0,0]):"enabled"===e.options.scrollPositionRestoration&&e.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===e.options.anchorScrolling?e.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==e.options.scrollPositionRestoration&&e.viewportScroller.scrollToPosition([0,0]))})}},{key:"scheduleScrollEvent",value:function(e,t){this.router.triggerEvent(new Ce(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,t))}},{key:"ngOnDestroy",value:function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||qn)(s.Qb(Ln),s.Qb(a.p),s.Qb(void 0))},qn.\u0275prov=s.Db({token:qn,factory:qn.\u0275fac}),qn),Jn=new s.q("ROUTER_CONFIGURATION"),Yn=new s.q("ROUTER_FORROOT_GUARD"),$n=[a.g,{provide:ze,useClass:Be},{provide:Ln,useFactory:function(e,t,n,r,i,o,s){var u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0,h=new Ln(null,e,t,n,r,i,o,je(s));if(l&&(h.urlHandlingStrategy=l),c&&(h.routeReuseStrategy=c),function(e,t){e.errorHandler&&(t.errorHandler=e.errorHandler),e.malformedUriErrorHandler&&(t.malformedUriErrorHandler=e.malformedUriErrorHandler),e.onSameUrlNavigation&&(t.onSameUrlNavigation=e.onSameUrlNavigation),e.paramsInheritanceStrategy&&(t.paramsInheritanceStrategy=e.paramsInheritanceStrategy),e.relativeLinkResolution&&(t.relativeLinkResolution=e.relativeLinkResolution),e.urlUpdateStrategy&&(t.urlUpdateStrategy=e.urlUpdateStrategy)}(u,h),u.enableTracing){var f=Object(a.s)();h.events.subscribe(function(e){f.logGroup("Router Event: "+e.constructor.name),f.log(e.toString()),f.log(e),f.logGroupEnd()})}return h},deps:[ze,xn,a.g,s.r,s.w,s.i,En,Jn,[function(){return function e(){m(this,e)}}(),new s.A],[function(){return function e(){m(this,e)}}(),new s.A]]},xn,{provide:ft,useFactory:function(e){return e.routerState.root},deps:[Ln]},{provide:s.w,useClass:s.J},Zn,Gn,function(){function e(){m(this,e)}return l(e,[{key:"preload",value:function(e,t){return t().pipe(X(function(){return Object(u.a)(null)}))}}]),e}(),{provide:Jn,useValue:{enableTracing:!1}}];function er(){return new s.y("Router",Ln)}var tr,nr=((tr=function(){function e(t,n){m(this,e)}return l(e,null,[{key:"forRoot",value:function(t,n){return{ngModule:e,providers:[$n,ar(t),{provide:Yn,useFactory:or,deps:[[Ln,new s.A,new s.I]]},{provide:Jn,useValue:n||{}},{provide:a.h,useFactory:ir,deps:[a.o,[new s.p(a.a),new s.A],Jn]},{provide:Xn,useFactory:rr,deps:[Ln,a.p,Jn]},{provide:Kn,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:Gn},{provide:s.y,multi:!0,useFactory:er},[ur,{provide:s.d,multi:!0,useFactory:lr,deps:[ur]},{provide:hr,useFactory:cr,deps:[ur]},{provide:s.b,multi:!0,useExisting:hr}]]}}},{key:"forChild",value:function(t){return{ngModule:e,providers:[ar(t)]}}}]),e}()).\u0275mod=s.Fb({type:tr}),tr.\u0275inj=s.Eb({factory:function(e){return new(e||tr)(s.Qb(Yn,8),s.Qb(Ln,8))}}),tr);function rr(e,t,n){return n.scrollOffset&&t.setOffset(n.scrollOffset),new Xn(e,t,n)}function ir(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.useHash?new a.d(e,t):new a.n(e,t)}function or(e){return"guarded"}function ar(e){return[{provide:s.a,multi:!0,useValue:e},{provide:En,multi:!0,useValue:e}]}var sr,ur=((sr=function(){function e(t){m(this,e),this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new D.a}return l(e,[{key:"appInitializer",value:function(){var e=this;return this.injector.get(a.f,Promise.resolve(null)).then(function(){var t=null,n=new Promise(function(e){return t=e}),r=e.injector.get(Ln),i=e.injector.get(Jn);return"disabled"===i.initialNavigation?(r.setUpLocationChangeListener(),t(!0)):"enabled"===i.initialNavigation||"enabledBlocking"===i.initialNavigation?(r.hooks.afterPreactivation=function(){return e.initNavigation?Object(u.a)(null):(e.initNavigation=!0,t(!0),e.resultOfPreactivationDone)},r.initialNavigation()):t(!0),n})}},{key:"bootstrapListener",value:function(e){var t=this.injector.get(Jn),n=this.injector.get(Zn),r=this.injector.get(Xn),i=this.injector.get(Ln),o=this.injector.get(s.g);e===o.components[0]&&("enabledNonBlocking"!==t.initialNavigation&&void 0!==t.initialNavigation||i.initialNavigation(),n.setUpPreloading(),r.init(),i.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}]),e}()).\u0275fac=function(e){return new(e||sr)(s.Qb(s.r))},sr.\u0275prov=s.Db({token:sr,factory:sr.\u0275fac}),sr);function lr(e){return e.appInitializer.bind(e)}function cr(e){return e.bootstrapListener.bind(e)}var hr=new s.q("Router Initializer")},vkgz:function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n("7o/Q");function i(){}var o=n("n6bG");function a(e,t,n){return function(r){return r.lift(new s(e,t,n))}}var s=function(){function e(t,n,r){m(this,e),this.nextOrObserver=t,this.error=n,this.complete=r}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))}}]),e}(),u=function(e){h(n,e);var t=d(n);function n(e,r,a,s){var u;return m(this,n),(u=t.call(this,e))._tapNext=i,u._tapError=i,u._tapComplete=i,u._tapError=a||i,u._tapComplete=s||i,Object(o.a)(r)?(u._context=p(u),u._tapNext=r):r&&(u._context=r,u._tapNext=r.next||i,u._tapError=r.error||i,u._tapComplete=r.complete||i),u}return l(n,[{key:"_next",value:function(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}},{key:"_error",value:function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)}},{key:"_complete",value:function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}]),n}(r.a)},xbPD:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n("7o/Q");function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t.lift(new o(e))}}var o=function(){function e(t){m(this,e),this.defaultValue=t}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new a(e,this.defaultValue))}}]),e}(),a=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).defaultValue=r,i.isEmpty=!0,i}return l(n,[{key:"_next",value:function(e){this.isEmpty=!1,this.destination.next(e)}},{key:"_complete",value:function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}]),n}(r.a)},yCtX:function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n("HDdC"),i=n("ngJS"),o=n("jZKg");function a(e,t){return t?Object(o.a)(e,t):new r.a(Object(i.a)(e))}},"z+Ro":function(e,t,n){"use strict";function r(e){return e&&"function"==typeof e.schedule}n.d(t,"a",function(){return r})},z6cu:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n("HDdC");function i(e,t){return new r.a(t?function(n){return t.schedule(o,0,{error:e,subscriber:n})}:function(t){return t.error(e)})}function o(e){var t=e.error;e.subscriber.error(t)}},zUnb:function(e,n,r){"use strict";r.r(n);var a,s,u=r("fXoL"),f=r("tyNb"),v=((a=function(){function e(){m(this,e),this.favIcon=document.querySelector("#favIcon"),this.lightIcon="../assets/classifai_dark.ico",this.favIcon.href=this.lightIcon}return l(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||a)},a.\u0275cmp=u.Bb({type:a,selectors:[["app-root"]],decls:1,vars:0,template:function(e,t){1&e&&u.Ib(0,"router-outlet")},directives:[f.e],styles:[""]}),a),p=r("1F7/"),y=r("14na"),b=r("I7yr"),_=r("sYmb"),k=r("ofXK"),w=((s=function(){function e(){m(this,e)}return l(e,[{key:"transform",value:function(e){var t="";switch(e.slice(-2)){case"en":t="EN";break;case"cn":t="CN";break;case"ms":t="MS"}return t}}]),e}()).\u0275fac=function(e){return new(e||s)},s.\u0275pipe=u.Gb({name:"languageSlice",type:s,pure:!0}),s),C=["languages"];function S(e,t){if(1&e){var n=u.Nb();u.Mb(0,"li",9,10),u.Tb("click",function(){u.hc(n);var e=u.Vb().$implicit,t=u.Vb();return t.setLanguage(e),t.hideLangOpts()}),u.oc(2),u.Wb(3,"languageSlice"),u.Lb()}if(2&e){var r=u.Vb().$implicit;u.xb(2),u.qc(" ",u.Xb(3,1,r)," ")}}function E(e,t){if(1&e&&(u.Mb(0,"div"),u.mc(1,S,4,3,"li",8),u.Lb()),2&e){var n=t.$implicit,r=u.Vb();u.xb(1),u.ac("ngIf",n!==r._translate.currentLang)}}var O,T=((O=function(){function e(t,n){m(this,e),this._translate=t,this._languageService=n,this.languageArr=[],this.headerImage="../../assets/landing-page/Classifai_Community_Logo.png";var r=["landing-page-en","landing-page-cn","landing-page-ms"];this._languageService.initializeLanguage("landing-page",r),this.languageArr=this._languageService.filterLanguageList(r,"landing-page")}return l(e,[{key:"ngOnInit",value:function(){}},{key:"setLanguage",value:function(e){try{e?(this._languageService.setLanguageState(e),this._translate.use(e)):this._languageService.setLanguageState("en")}catch(t){console.log("setLanguage(language: string) ----\x3e ",t.name+": ",t.message)}}},{key:"showLangOpts",value:function(){this.languages.forEach(function(e,t){e.nativeElement.style.visibility="visible",e.nativeElement.style.opacity="100%",e.nativeElement.style.left=(-112*(t+1)).toString()+"%",e.nativeElement.style.transition=(.15*(1+t)).toString()+"s"})}},{key:"hideLangOpts",value:function(){this.languages.forEach(function(e,t){e.nativeElement.style.visibility="hidden",e.nativeElement.style.opacity="0%",e.nativeElement.style.left="0%",e.nativeElement.style.transition=(.15*(3-t)).toString()+"s"})}}]),e}()).\u0275fac=function(e){return new(e||O)(u.Hb(_.d),u.Hb(b.a))},O.\u0275cmp=u.Bb({type:O,selectors:[["home-header"]],viewQuery:function(e,t){var n;1&e&&u.tc(C,!0),2&e&&u.ec(n=u.Ub())&&(t.languages=n)},decls:13,vars:5,consts:[[1,"flex-header","header-container"],[1,"div-header-container"],[1,"header-img",3,"src"],[1,"version-container"],[1,"version-text"],[1,"share",3,"mouseenter","mouseleave"],[1,"toggle"],[4,"ngFor","ngForOf"],[3,"click",4,"ngIf"],[3,"click"],["languages",""]],template:function(e,t){1&e&&(u.Mb(0,"header",0),u.Mb(1,"div",1),u.Ib(2,"img",2),u.Lb(),u.Lb(),u.Mb(3,"div",3),u.Mb(4,"div",4),u.Mb(5,"p"),u.oc(6,"Version: 2.0.0 alpha1"),u.Lb(),u.Lb(),u.Lb(),u.Mb(7,"div",5),u.Tb("mouseenter",function(){return t.showLangOpts()})("mouseleave",function(){return t.hideLangOpts()}),u.Mb(8,"ul"),u.Mb(9,"div",6),u.oc(10),u.Wb(11,"languageSlice"),u.Lb(),u.mc(12,E,2,1,"div",7),u.Lb(),u.Lb()),2&e&&(u.xb(2),u.ac("src",t.headerImage,u.jc),u.xb(8),u.pc(u.Xb(11,3,t._translate.currentLang)),u.xb(2),u.ac("ngForOf",t.languageArr))},directives:[k.j,k.k],pipes:[w],styles:[".flex-header[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center}.header-container[_ngcontent-%COMP%]{background:#262a2e;color:snow;height:21vh}.div-header-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:space-around;justify-content:space-around;width:90vw;-webkit-align-items:center;align-items:center}.flex-grow[_ngcontent-%COMP%]{-webkit-flex-grow:1;flex-grow:1}.header-img[_ngcontent-%COMP%]{height:10vh;-webkit-user-select:none;user-select:none}.header[_ngcontent-%COMP%]{text-shadow:0 0 1.875rem #888}.sub-header[_ngcontent-%COMP%]{font-size:1rem;margin:0 0 0 5rem}.absolute[_ngcontent-%COMP%]{position:absolute;right:5rem}select[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none}.select-padding[_ngcontent-%COMP%]{position:absolute;height:4vh;font-size:1.5vh;top:10%;right:3%;border-radius:3vh;width:8vh;margin:0;text-align-last:center;background:#3c4044;color:#fff;border:2px solid #a7a7a7}.select-padding[_ngcontent-%COMP%]:hover{border:2px solid #fff}.select-padding[_ngcontent-%COMP%]:active{border:2px solid #fff}.share[_ngcontent-%COMP%]{position:absolute;top:8%;right:2%;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%);width:8vh;height:4vh;border-radius:3vh;margin:0;z-index:1;text-align:center;vertical-align:middle;line-height:4vh}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{position:relative;margin:0;padding:0;width:100%;height:100%}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style:none;border:.5px solid #a7a7a7;-webkit-transform:scale(.95);border-radius:3vh;visibility:hidden;opacity:0;-webkit-transform:translateZ(0)}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .toggle[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background:#3c4044;color:#fff;font-size:1.5vh;overflow:hidden;transform:scale(.95);cursor:pointer}.toggle[_ngcontent-%COMP%]{border:.0325vh solid #a7a7a7;-webkit-transform:scale(.95);border-radius:3vh}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover, .toggle[_ngcontent-%COMP%]:hover{background:#464a4e;border:.0625vh solid #fff}.version-container[_ngcontent-%COMP%]{position:absolute;top:8%;left:6%;-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%);width:20vh;height:4vh;border-radius:3vh;margin:0;z-index:1;text-align:center;vertical-align:middle;line-height:4vh}.version-text[_ngcontent-%COMP%]{color:snow;font-size:1.7vh}"]}),O);function x(e,t){if(1&e&&(u.Kb(0),u.Mb(1,"span",9),u.oc(2),u.Wb(3,"translate"),u.Lb(),u.Jb()),2&e){var n=u.Vb(),r=n.$implicit,i=n.index,o=u.Vb();u.xb(1),u.ac("ngClass",r.hoverLabel?null:"label-hidden"),u.xb(1),u.qc(" ",u.Xb(3,2,o.conditionalHoverPlaceholder(i,r.hoverLabel))," ")}}function A(e,t){if(1&e){var n=u.Nb();u.Kb(0),u.Mb(1,"div",4),u.Tb("mouseover",function(e){u.hc(n);var r=t.index;return u.Vb().mouseEventCapture(e,r)})("mouseleave",function(e){u.hc(n);var r=t.index;return u.Vb().mouseEventCapture(e,r)})("click",function(){u.hc(n);var e=t.$implicit;return u.Vb().emitParentUrl(e.enabled,e.urlPath)}),u.Mb(2,"div",5),u.Ib(3,"img",6),u.mc(4,x,4,4,"ng-container",7),u.Lb(),u.Mb(5,"div",8),u.Mb(6,"p"),u.oc(7),u.Wb(8,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Jb()}if(2&e){var r=t.$implicit,i=t.index,o=u.Vb();u.xb(1),u.ac("ngStyle",o.hoverStyling(i,o.hover,r.hoverLabel,r.imgPath)),u.yb("data-index",i),u.xb(2),u.ac("src",r.logoPath,u.jc)("alt",r.logoAlt),u.xb(1),u.ac("ngIf",o.hover),u.xb(3),u.pc(u.Xb(8,6,r.title))}}var j,P,I,D=((I=function(){function e(){var t=this;m(this,e),this._onThumbnailClick=new u.n,this.hoverStyling=function(e,n,r,i){return e===t.hoverIndex&&n?{"background-image":"url("+i+")",opacity:"1.0",cursor:r?"not-allowed":"pointer"}:{"background-image":"url("+i+")",opacity:"0.5"}},this.conditionalHoverPlaceholder=function(e,n){return e===t.hoverIndex&&n?n:""}}return l(e,[{key:"ngOnInit",value:function(){}},{key:"mouseEventCapture",value:function(e,t){var n=e.type;this.hover="mouseover"===n,this.hoverIndex=t}},{key:"emitParentUrl",value:function(e,t){e&&this._onThumbnailClick.emit(t)}}]),e}()).\u0275fac=function(e){return new(e||I)},I.\u0275cmp=u.Bb({type:I,selectors:[["home-card"]],inputs:{_jsonSchema:"_jsonSchema"},outputs:{_onThumbnailClick:"_onThumbnailClick"},decls:7,vars:1,consts:[[1,"flex-container"],[4,"ngFor","ngForOf"],[1,"copyright-container"],[1,"copyright-text"],[1,"card-container",3,"ngStyle","mouseover","mouseleave","click"],[1,"header-container"],[1,"logo",3,"src","alt"],[4,"ngIf"],[1,"banner"],[3,"ngClass"]],template:function(e,t){1&e&&(u.Mb(0,"div",0),u.mc(1,A,9,8,"ng-container",1),u.Mb(2,"div",2),u.Mb(3,"div",3),u.oc(4," Copyright \xa9 2020-2021 classifai. All rights reserved. "),u.Ib(5,"br"),u.oc(6," Classifai and the Classifai logo are trademarks of Skymind registered in Malaysia. "),u.Lb(),u.Lb(),u.Lb()),2&e&&(u.xb(1),u.ac("ngForOf",t._jsonSchema.fields))},directives:[k.j,k.l,k.k,k.i],pipes:[_.c],styles:[".flex-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:baseline;align-items:baseline;overflow:hidden}.card-container[_ngcontent-%COMP%]{display:table;background-repeat:no-repeat;background-size:cover;position:relative;height:74.5vh;width:25vw;object-fit:contain;border:.01vh solid #000}.flex-center[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.header-container[_ngcontent-%COMP%]{color:#fff;padding:10vh;font-size:xxx-large;display:grid;justify-items:center;height:58.7vh;line-height:10vh;font-size:2.5vh;text-align:center;white-space:nowrap}.label-hidden[_ngcontent-%COMP%]{visibility:hidden}.img[_ngcontent-%COMP%]{position:absolute}.image-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center}.logo[_ngcontent-%COMP%]{position:relative;height:15vh;margin-top:10vh}.banner[_ngcontent-%COMP%]{position:absolute;background:#fff;opacity:.9;width:inherit;display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;bottom:5vh;font-size:2.5vh;height:10vh;min-height:10vh;line-height:5vh}.copyright-container[_ngcontent-%COMP%]{position:absolute;bottom:1vh;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.copyright-text[_ngcontent-%COMP%]{opacity:.5;text-align:center;color:#fff;font-size:1vh}"]}),I),R=((P=function(){function e(){m(this,e),this._navigate=new u.n,this.languageArr=[],this.jsonSchema={fields:[{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"tabular",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Tabular.jpg",imgAlt:"tabular",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_CSV.png",logoAlt:"CSV"},{enabled:!0,urlPath:"/dataset",title:"image",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Image.jpg",imgAlt:"image",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_JPEG.png",logoAlt:"image"},{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"video",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Video.jpg",imgAlt:"video",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_MP4.png",logoAlt:"Video"},{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"voice",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Voice.jpg",imgAlt:"voice",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_MP3.png",logoAlt:"voice"}]}}return l(e,[{key:"ngOnInit",value:function(){}},{key:"onThumbnailClick",value:function(e){this._navigate.emit(e)}}]),e}()).\u0275fac=function(e){return new(e||P)},P.\u0275cmp=u.Bb({type:P,selectors:[["home-content"]],outputs:{_navigate:"_navigate"},decls:1,vars:1,consts:[[3,"_jsonSchema","_onThumbnailClick"]],template:function(e,t){1&e&&(u.Mb(0,"home-card",0),u.Tb("_onThumbnailClick",function(e){return t.onThumbnailClick(e)}),u.Lb()),2&e&&u.ac("_jsonSchema",t.jsonSchema)},directives:[D],styles:[""]}),P),N=((j=function(){function e(){m(this,e)}return l(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||j)},j.\u0275cmp=u.Bb({type:j,selectors:[["home-footer"]],decls:0,vars:0,template:function(e,t){},styles:[".footer-container[_ngcontent-%COMP%]{background:#262a2e}.copyright-text[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;align-items:center;color:snow;text-align:center;font-size:10px}"]}),j),L=r("44N4");function V(e,t){if(1&e&&(u.Kb(0),u.Mb(1,"div"),u.Mb(2,"span",8),u.oc(3),u.Wb(4,"translate"),u.Lb(),u.Lb(),u.Mb(5,"div",9),u.Mb(6,"span",8),u.oc(7),u.Wb(8,"translate"),u.Lb(),u.Lb(),u.Jb()),2&e){var n=u.Vb(),r=n.$implicit,i=n.index,o=u.Vb();u.xb(2),u.ac("ngClass",r.title?null:"label-hidden"),u.xb(1),u.qc(" ",u.Xb(4,4,o.conditionalHoverPlaceholder(i,r.title))," "),u.xb(3),u.ac("ngClass",r.hoverLabel?null:"label-hidden"),u.xb(1),u.qc(" ",u.Xb(8,6,o.conditionalHoverPlaceholder(i,r.hoverLabel))," ")}}function M(e,t){if(1&e){var n=u.Nb();u.Kb(0),u.Mb(1,"div",4),u.Tb("mouseover",function(e){u.hc(n);var r=t.index;return u.Vb().mouseEventCapture(e,r)})("mouseleave",function(e){u.hc(n);var r=t.index;return u.Vb().mouseEventCapture(e,r)}),u.Mb(2,"div",5),u.Tb("click",function(){u.hc(n);var e=t.$implicit,r=u.Vb();return r.onCloseModal(r.modalIdImgLbl,e.enabled,e.urlPath)}),u.Ib(3,"img",6),u.mc(4,V,9,8,"ng-container",7),u.Lb(),u.Lb(),u.Jb()}if(2&e){var r=t.$implicit,i=t.index,o=u.Vb();u.xb(1),u.yb("data-index",i),u.xb(1),u.ac("ngStyle",o.hoverStyling(i,o.hover,r.enabled)),u.xb(1),u.ac("src",r.imgPath,u.jc)("alt",r.imgAlt),u.xb(1),u.ac("ngIf",o.hover)}}var F,H,U,q,z,B,Q,W,K=((H=function(){function e(t,n,r,i){var o=this;m(this,e),this._modalService=t,this._router=n,this._imgLblMode=r,this._languageService=i,this.navigateUrl="",this.modalBodyStyle={minHeight:"37vh",maxHeight:"37vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.cardSchema={fields:[{enabled:!0,title:"imageOpt.boundingBoxes",urlPath:"boundingbox",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Band_Labeling.jpg",imgAlt:"Bounding Box"},{enabled:!1,title:"imageOpt.polygons",urlPath:"segmentation",hoverLabel:"comingSoon",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Band_Segmentation.jpg",imgAlt:"Segmentation"}]},this.modalIdImgLbl="modal-home-image-labelling",this.hover=!1,this.hoverIndex=-1,this.onDisplayModal=function(e){o._modalService.open(e)},this.onCloseModal=function(e,t,n){t&&(n&&(o._imgLblMode.setState("boundingbox"===n?"bndbox":"seg"),o._router.navigate([o.navigateUrl])),o._modalService.close(e))},this.hoverStyling=function(e,t,n){return e===o.hoverIndex&&t?{opacity:"1.0",cursor:n?"pointer":"not-allowed"}:{opacity:"0.5"}},this.conditionalHoverPlaceholder=function(e,t){return e===o.hoverIndex&&t?t:""},this._languageService.initializeLanguage("landing-page",["landing-page-en","landing-page-cn","landing-page-ms"])}return l(e,[{key:"ngOnInit",value:function(){}},{key:"navigate",value:function(e){this.navigateUrl=e,this.onDisplayModal(this.modalIdImgLbl)}},{key:"mouseEventCapture",value:function(e,t){var n=e.type;this.hover="mouseover"===n,this.hoverIndex=t}}]),e}()).\u0275fac=function(e){return new(e||H)(u.Hb(p.a),u.Hb(f.a),u.Hb(y.a),u.Hb(b.a))},H.\u0275cmp=u.Bb({type:H,selectors:[["home-layout"]],decls:7,vars:7,consts:[[3,"_navigate"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"modal-body-container"],[4,"ngFor","ngForOf"],[1,"card-container",3,"mouseover","mouseleave"],[1,"img-container",3,"ngStyle","click"],[1,"card-image",3,"src","alt"],[4,"ngIf"],[3,"ngClass"],[1,"centered"]],template:function(e,t){1&e&&(u.Ib(0,"home-header"),u.Mb(1,"home-content",0),u.Tb("_navigate",function(e){return t.navigate(e)}),u.Lb(),u.Ib(2,"home-footer"),u.Mb(3,"modal",1),u.Wb(4,"translate"),u.Mb(5,"div",2),u.mc(6,M,5,5,"ng-container",3),u.Lb(),u.Lb()),2&e&&(u.xb(3),u.ac("id",t.modalIdImgLbl)("modalBodyStyle",t.modalBodyStyle)("modalTitle",u.Xb(4,5,"imageOpt.selection"))("scrollable",!1),u.xb(3),u.ac("ngForOf",t.cardSchema.fields))},directives:[T,R,N,L.a,k.j,k.l,k.k,k.i],pipes:[_.c],styles:[".modal-button[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw}.float-right[_ngcontent-%COMP%]{float:right}.label-hidden[_ngcontent-%COMP%]{visibility:hidden}.modal-header-container[_ngcontent-%COMP%]{-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-items:center;align-items:center;line-height:1vh;font-size:1vw;padding:.5vw}.modal-body-container[_ngcontent-%COMP%], .modal-header-container[_ngcontent-%COMP%]{display:-webkit-flex;display:flex;-webkit-flex-direction:row;flex-direction:row}.modal-body-container[_ngcontent-%COMP%]{-webkit-justify-content:space-around;justify-content:space-around}.card-container[_ngcontent-%COMP%]{position:relative;text-align:center;font-weight:700;line-height:1vh;font-size:1vw;padding:.5vw}.card-image[_ngcontent-%COMP%]{max-width:14vw;min-width:14vw;min-height:25vh;max-height:25vh;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s;padding-bottom:3vh}.card-image[_ngcontent-%COMP%]:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.img-container[_ngcontent-%COMP%]{position:relative;text-align:center;color:#fff}.centered[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}"]}),H),G=((F=function(){function e(){m(this,e),this.errorTitle="404",this.errorSubTitle="Page not found",this.errorMessage="Sorry, but the page you are looking for is not found. Please, make sure you have typed the current URL."}return l(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||F)},F.\u0275cmp=u.Bb({type:F,selectors:[["app-page-not-found"]],decls:6,vars:3,template:function(e,t){1&e&&(u.Mb(0,"h1"),u.oc(1),u.Lb(),u.Mb(2,"h2"),u.oc(3),u.Lb(),u.Mb(4,"p"),u.oc(5),u.Lb()),2&e&&(u.xb(1),u.pc(t.errorTitle),u.xb(2),u.pc(t.errorSubTitle),u.xb(2),u.pc(t.errorMessage))},styles:["h2[_ngcontent-%COMP%]{font-size:4em}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%]{font-weight:700;text-align:center;color:#fff}h1[_ngcontent-%COMP%]{margin-top:10%;font-size:10em}p[_ngcontent-%COMP%]{font-weight:700;font-size:1em;text-align:center;color:#fff}"]}),F),Z=[{path:"",component:K},{path:"dataset",loadChildren:function(){return Promise.all([r.e(1),r.e(7)]).then(r.bind(null,"RN8A")).then(function(e){return e.DataSetLayoutModule})}},{path:"imglabel/bndbox",loadChildren:function(){return Promise.all([r.e(1),r.e(2)]).then(r.bind(null,"i5u5")).then(function(e){return e.ImageLabellingLayoutModule})}},{path:"imglabel/seg",loadChildren:function(){return Promise.all([r.e(1),r.e(2)]).then(r.bind(null,"i5u5")).then(function(e){return e.ImageLabellingLayoutModule})}},{path:"500",component:(U=function(){function e(){m(this,e),this.errorMessage="Server Probably is Down, Please Contact Administrator!"}return l(e,[{key:"ngOnInit",value:function(){}}]),e}(),U.\u0275fac=function(e){return new(e||U)},U.\u0275cmp=u.Bb({type:U,selectors:[["server-error"]],decls:4,vars:1,template:function(e,t){1&e&&(u.Mb(0,"h1"),u.oc(1,"500 Internal Server Error!"),u.Lb(),u.Mb(2,"p"),u.oc(3),u.Lb()),2&e&&(u.xb(3),u.qc(" ",t.errorMessage,"\n"))},styles:["p[_ngcontent-%COMP%]{font-size:2em}h1[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{font-weight:700;text-align:center;color:#000}h1[_ngcontent-%COMP%]{margin-top:15%;font-size:6em}"]}),U)},{path:"**",component:G}],X=((q=function e(){m(this,e)}).\u0275mod=u.Fb({type:q}),q.\u0275inj=u.Eb({factory:function(e){return new(e||q)},imports:[[f.d.forRoot(Z,{relativeLinkResolution:"legacy"})],f.d]}),q),J=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"getProperty",value:function(e,t){return e[t]}},{key:"log",value:function(e){window.console&&window.console.log&&window.console.log(e)}},{key:"logGroup",value:function(e){window.console&&window.console.group&&window.console.group(e)}},{key:"logGroupEnd",value:function(){window.console&&window.console.groupEnd&&window.console.groupEnd()}},{key:"onAndCancel",value:function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}}},{key:"dispatchEvent",value:function(e,t){e.dispatchEvent(t)}},{key:"remove",value:function(e){return e.parentNode&&e.parentNode.removeChild(e),e}},{key:"getValue",value:function(e){return e.value}},{key:"createElement",value:function(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}},{key:"createHtmlDocument",value:function(){return document.implementation.createHTMLDocument("fakeTitle")}},{key:"getDefaultDocument",value:function(){return document}},{key:"isElementNode",value:function(e){return e.nodeType===Node.ELEMENT_NODE}},{key:"isShadowRoot",value:function(e){return e instanceof DocumentFragment}},{key:"getGlobalEventTarget",value:function(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}},{key:"getHistory",value:function(){return window.history}},{key:"getLocation",value:function(){return window.location}},{key:"getBaseHref",value:function(e){var t,n=Y||(Y=document.querySelector("base"))?Y.getAttribute("href"):null;return null==n?null:(t=n,z||(z=document.createElement("a")),z.setAttribute("href",t),"/"===z.pathname.charAt(0)?z.pathname:"/"+z.pathname)}},{key:"resetBaseElement",value:function(){Y=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(e){return Object(k.t)(document.cookie,e)}}],[{key:"makeCurrent",value:function(){Object(k.u)(new n)}}]),n}(function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.call(this)}return l(n,[{key:"supportsDOMEvents",value:function(){return!0}}]),n}(k.q)),Y=null,$=new u.q("TRANSITION_ID"),ee=[{provide:u.d,useFactory:function(e,t,n){return function(){n.get(u.e).donePromise.then(function(){var n=Object(k.s)();Array.prototype.slice.apply(t.querySelectorAll("style[ng-transition]")).filter(function(t){return t.getAttribute("ng-transition")===e}).forEach(function(e){return n.remove(e)})})}},deps:[$,k.c,u.r],multi:!0}],te=function(){function e(){m(this,e)}return l(e,[{key:"addToWindow",value:function(e){u.mb.getAngularTestability=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.findTestabilityInTree(t,n);if(null==r)throw new Error("Could not find testability for element.");return r},u.mb.getAllAngularTestabilities=function(){return e.getAllTestabilities()},u.mb.getAllAngularRootElements=function(){return e.getAllRootElements()},u.mb.frameworkStabilizers||(u.mb.frameworkStabilizers=[]),u.mb.frameworkStabilizers.push(function(e){var t=u.mb.getAllAngularTestabilities(),n=t.length,r=!1,i=function(t){r=r||t,0==--n&&e(r)};t.forEach(function(e){e.whenStable(i)})})}},{key:"findTestabilityInTree",value:function(e,t,n){if(null==t)return null;var r=e.getTestability(t);return null!=r?r:n?Object(k.s)().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}],[{key:"init",value:function(){Object(u.V)(new e)}}]),e}(),ne=new u.q("EventManagerPlugins"),re=((B=function(){function e(t,n){var r=this;m(this,e),this._zone=n,this._eventNameToPlugin=new Map,t.forEach(function(e){return e.manager=r}),this._plugins=t.slice().reverse()}return l(e,[{key:"addEventListener",value:function(e,t,n){return this._findPluginFor(t).addEventListener(e,t,n)}},{key:"addGlobalEventListener",value:function(e,t,n){return this._findPluginFor(t).addGlobalEventListener(e,t,n)}},{key:"getZone",value:function(){return this._zone}},{key:"_findPluginFor",value:function(e){var t=this._eventNameToPlugin.get(e);if(t)return t;for(var n=this._plugins,r=0;r-1&&(t.splice(n,1),o+=e+".")}),o+=i,0!=t.length||0===i.length)return null;var a={};return a.domEventName=r,a.fullKey=o,a}},{key:"getEventFullKey",value:function(e){var t="",n=function(e){var t=e.key;if(null==t){if(null==(t=e.keyIdentifier))return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===e.location&&we.hasOwnProperty(t)&&(t=we[t]))}return ke[t]||t}(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),_e.forEach(function(r){r!=n&&(0,Ce[r])(e)&&(t+=r+".")}),t+=n}},{key:"eventCallback",value:function(e,t,r){return function(i){n.getEventFullKey(i)===e&&r.runGuarded(function(){return t(i)})}}},{key:"_normalizeKey",value:function(e){switch(e){case"esc":return"escape";default:return e}}}]),n}(ie)).\u0275fac=function(e){return new(e||de)(u.Qb(k.c))},de.\u0275prov=u.Db({token:de,factory:de.\u0275fac}),de),Ee=[{provide:u.B,useValue:k.r},{provide:u.C,useValue:function(){J.makeCurrent(),te.init()},multi:!0},{provide:k.c,useFactory:function(){return Object(u.rb)(document),document},deps:[]}],Oe=Object(u.Q)(u.U,"browser",Ee),Te=[[],{provide:u.X,useValue:"root"},{provide:u.m,useFactory:function(){return new u.m},deps:[]},{provide:ne,useClass:be,multi:!0,deps:[k.c,u.z,u.B]},{provide:ne,useClass:Se,multi:!0,deps:[k.c]},[],{provide:pe,useClass:pe,deps:[re,ae,u.c]},{provide:u.E,useExisting:pe},{provide:oe,useExisting:ae},{provide:ae,useClass:ae,deps:[k.c]},{provide:u.L,useClass:u.L,deps:[u.z]},{provide:re,useClass:re,deps:[ne,u.z]},[]],xe=((ve=function(){function e(t){if(m(this,e),t)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 l(e,null,[{key:"withServerTransition",value:function(t){return{ngModule:e,providers:[{provide:u.c,useValue:t.appId},{provide:$,useExisting:u.c},ee]}}}]),e}()).\u0275mod=u.Fb({type:ve}),ve.\u0275inj=u.Eb({factory:function(e){return new(e||ve)(u.Qb(ve,12))},providers:Te,imports:[k.b,u.f]}),ve);"undefined"!=typeof window&&window;var Ae=function e(){m(this,e)};function je(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:e,options:t}}function Pe(e){return{type:6,styles:e,offset:null}}function Ie(e){Promise.resolve(null).then(e)}var De=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;m(this,e),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+n}return l(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{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 e=this;Ie(function(){return e._onFinish()})}},{key:"_onStart",value:function(){this._onStartFns.forEach(function(e){return e()}),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(e){return e()}),this._onDestroyFns=[])}},{key:"reset",value:function(){}},{key:"setPosition",value:function(e){}},{key:"getPosition",value:function(){return 0}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}}]),e}(),Re=function(){function e(t){var n=this;m(this,e),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;var r=0,i=0,o=0,a=this.players.length;0==a?Ie(function(){return n._onFinish()}):this.players.forEach(function(e){e.onDone(function(){++r==a&&n._onFinish()}),e.onDestroy(function(){++i==a&&n._onDestroy()}),e.onStart(function(){++o==a&&n._onStart()})}),this.totalTime=this.players.reduce(function(e,t){return Math.max(e,t.totalTime)},0)}return l(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach(function(e){return e.init()})}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[])}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(e){return e.play()})}},{key:"pause",value:function(){this.players.forEach(function(e){return e.pause()})}},{key:"restart",value:function(){this.players.forEach(function(e){return e.restart()})}},{key:"finish",value:function(){this._onFinish(),this.players.forEach(function(e){return e.finish()})}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(e){return e.destroy()}),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach(function(e){return e.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(e){var t=e*this.totalTime;this.players.forEach(function(e){var n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}},{key:"getPosition",value:function(){var e=0;return this.players.forEach(function(t){var n=t.getPosition();e=Math.min(n,e)}),e}},{key:"beforeDestroy",value:function(){this.players.forEach(function(e){e.beforeDestroy&&e.beforeDestroy()})}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}}]),e}();function Ne(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Le(e){switch(e.length){case 0:return new De;case 1:return e[0];default:return new Re(e)}}function Ve(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=[],s=[],u=-1,l=null;if(r.forEach(function(e){var n=e.offset,r=n==u,c=r&&l||{};Object.keys(e).forEach(function(n){var r=n,s=e[n];if("offset"!==n)switch(r=t.normalizePropertyName(r,a),s){case"!":s=i[n];break;case"*":s=o[n];break;default:s=t.normalizeStyleValue(n,r,s,a)}c[r]=s}),r||s.push(c),l=c,u=n}),a.length){var c="\n - ";throw new Error("Unable to animate due to the following errors:".concat(c).concat(a.join(c)))}return s}function Me(e,t,n,r){switch(t){case"start":e.onStart(function(){return r(n&&Fe(n,"start",e))});break;case"done":e.onDone(function(){return r(n&&Fe(n,"done",e))});break;case"destroy":e.onDestroy(function(){return r(n&&Fe(n,"destroy",e))})}}function Fe(e,t,n){var r=n.totalTime,i=He(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,null==r?e.totalTime:r,!!n.disabled),o=e._data;return null!=o&&(i._data=o),i}function He(e,t,n,r){var i=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:e,triggerName:t,fromState:n,toState:r,phaseName:i,totalTime:o,disabled:!!a}}function Ue(e,t,n){var r;return e instanceof Map?(r=e.get(t))||e.set(t,r=n):(r=e[t])||(r=e[t]=n),r}function qe(e){var t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}var ze=function(e,t){return!1},Be=function(e,t){return!1},Qe=function(e,t,n){return[]},We=Ne();(We||"undefined"!=typeof Element)&&(ze=function(e,t){return e.contains(t)},Be=function(){if(We||Element.prototype.matches)return function(e,t){return e.matches(t)};var e=Element.prototype,t=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;return t?function(e,n){return t.apply(e,[n])}:Be}(),Qe=function(e,t,n){var r=[];if(n)r.push.apply(r,o(e.querySelectorAll(t)));else{var i=e.querySelector(t);i&&r.push(i)}return r});var Ke=null,Ge=!1;function Ze(e){Ke||(Ke=("undefined"!=typeof document?document.body:null)||{},Ge=!!Ke.style&&"WebkitAppearance"in Ke.style);var t=!0;return Ke.style&&!function(e){return"ebkit"==e.substring(1,6)}(e)&&(!(t=e in Ke.style)&&Ge)&&(t="Webkit"+e.charAt(0).toUpperCase()+e.substr(1)in Ke.style),t}var Xe=Be,Je=ze,Ye=Qe;function $e(e){var t={};return Object.keys(e).forEach(function(n){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2");t[r]=e[n]}),t}var et,tt=((et=function(){function e(){m(this,e)}return l(e,[{key:"validateStyleProperty",value:function(e){return Ze(e)}},{key:"matchesElement",value:function(e,t){return Xe(e,t)}},{key:"containsElement",value:function(e,t){return Je(e,t)}},{key:"query",value:function(e,t,n){return Ye(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return n||""}},{key:"animate",value:function(e,t,n,r,i){return new De(n,r)}}]),e}()).\u0275fac=function(e){return new(e||et)},et.\u0275prov=u.Db({token:et,factory:et.\u0275fac}),et),nt=function(){var e=function e(){m(this,e)};return e.NOOP=new tt,e}();function rt(e){if("number"==typeof e)return e;var t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:it(parseFloat(t[1]),t[2])}function it(e,t){switch(t){case"s":return 1e3*e;default:return e}}function ot(e,t,n){return e.hasOwnProperty("duration")?e:function(e,t,n){var r,i=0,o="";if("string"==typeof e){var a=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push('The provided timing value "'.concat(e,'" is invalid.')),{duration:0,delay:0,easing:""};r=it(parseFloat(a[1]),a[2]);var s=a[3];null!=s&&(i=it(parseFloat(s),a[4]));var u=a[5];u&&(o=u)}else r=e;if(!n){var l=!1,c=t.length;r<0&&(t.push("Duration values below 0 are not allowed for this animation step."),l=!0),i<0&&(t.push("Delay values below 0 are not allowed for this animation step."),l=!0),l&&t.splice(c,0,'The provided timing value "'.concat(e,'" is invalid.'))}return{duration:r,delay:i,easing:o}}(e,t,n)}function at(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function st(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t)for(var r in e)n[r]=e[r];else at(e,n);return n}function ut(e,t,n){return n?t+":"+n+";":""}function lt(e){for(var t="",n=0;n *";case":leave":return"* => void";case":increment":return function(e,t){return parseFloat(t)>parseFloat(e)};case":decrement":return function(e,t){return parseFloat(t) *"}}(e,n);if("function"==typeof r)return void t.push(r);e=r}var i=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push('The provided transition expression "'.concat(e,'" is not supported')),t;var o=i[1],a=i[2],s=i[3];t.push(Et(o,s)),"<"!=a[0]||"*"==o&&"*"==s||t.push(Et(s,o))}(e,i,r)}):i.push(n),i),animation:o,queryCount:t.queryCount,depCount:t.depCount,options:Pt(e.options)}}},{key:"visitSequence",value:function(e,t){var n=this;return{type:2,steps:e.steps.map(function(e){return kt(n,e,t)}),options:Pt(e.options)}}},{key:"visitGroup",value:function(e,t){var n=this,r=t.currentTime,i=0,o=e.steps.map(function(e){t.currentTime=r;var o=kt(n,e,t);return i=Math.max(i,t.currentTime),o});return t.currentTime=i,{type:3,steps:o,options:Pt(e.options)}}},{key:"visitAnimate",value:function(e,t){var n,r=function(e,t){var n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return It(ot(e,t).duration,0,"");var r=e;if(r.split(/\s+/).some(function(e){return"{"==e.charAt(0)&&"{"==e.charAt(1)})){var i=It(0,0,"");return i.dynamic=!0,i.strValue=r,i}return It((n=n||ot(r,t)).duration,n.delay,n.easing)}(e.timings,t.errors);t.currentAnimateTimings=r;var i=e.styles?e.styles:Pe({});if(5==i.type)n=this.visitKeyframes(i,t);else{var o=e.styles,a=!1;if(!o){a=!0;var s={};r.easing&&(s.easing=r.easing),o=Pe(s)}t.currentTime+=r.duration+r.delay;var u=this.visitStyle(o,t);u.isEmptyStep=a,n=u}return t.currentAnimateTimings=null,{type:4,timings:r,style:n,options:null}}},{key:"visitStyle",value:function(e,t){var n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}},{key:"_makeStyleAst",value:function(e,t){var n=[];Array.isArray(e.styles)?e.styles.forEach(function(e){"string"==typeof e?"*"==e?n.push(e):t.errors.push("The provided style string value ".concat(e," is not allowed.")):n.push(e)}):n.push(e.styles);var r=!1,i=null;return n.forEach(function(e){if(jt(e)){var t=e,n=t.easing;if(n&&(i=n,delete t.easing),!r)for(var o in t)if(t[o].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:n,easing:i,offset:e.offset,containsDynamicStyles:r,options:null}}},{key:"_validateStyleAst",value:function(e,t){var n=this,r=t.currentAnimateTimings,i=t.currentTime,o=t.currentTime;r&&o>0&&(o-=r.duration+r.delay),e.styles.forEach(function(e){"string"!=typeof e&&Object.keys(e).forEach(function(r){if(n._driver.validateStyleProperty(r)){var a,s,u,l,c,h=t.collectedStyles[t.currentQuerySelector],f=h[r],d=!0;f&&(o!=i&&o>=f.startTime&&i<=f.endTime&&(t.errors.push('The CSS property "'.concat(r,'" 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(i,'ms"')),d=!1),o=f.startTime),d&&(h[r]={startTime:o,endTime:i}),t.options&&(a=e[r],s=t.options,u=t.errors,l=s.params||{},(c=vt(a)).length&&c.forEach(function(e){l.hasOwnProperty(e)||u.push("Unable to resolve the local animation param ".concat(e," in the given list of values"))}))}else t.errors.push('The provided animation property "'.concat(r,'" is not a supported CSS property for animations'))})})}},{key:"visitKeyframes",value:function(e,t){var n=this,r={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),r;var i=0,o=[],a=!1,s=!1,u=0,l=e.steps.map(function(e){var r=n._makeStyleAst(e,t),l=null!=r.offset?r.offset:function(e){if("string"==typeof e)return null;var t=null;if(Array.isArray(e))e.forEach(function(e){if(jt(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}});else if(jt(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}return t}(r.styles),c=0;return null!=l&&(i++,c=r.offset=l),s=s||c<0||c>1,a=a||c0&&i0?i==f?1:h*i:o[i],s=a*p;t.currentTime=d+v.delay+s,v.duration=s,n._validateStyleAst(e,t),e.offset=a,r.styles.push(e)}),r}},{key:"visitReference",value:function(e,t){return{type:8,animation:kt(this,ft(e.animation),t),options:Pt(e.options)}}},{key:"visitAnimateChild",value:function(e,t){return t.depCount++,{type:9,options:Pt(e.options)}}},{key:"visitAnimateRef",value:function(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:Pt(e.options)}}},{key:"visitQuery",value:function(e,n){var r=n.currentQuerySelector,i=e.options||{};n.queryCount++,n.currentQuery=e;var o=t(function(e){var t=!!e.split(/\s*,\s*/).find(function(e){return":self"==e});return t&&(e=e.replace(Ot,"")),[e=e.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,function(e){return".ng-trigger-"+e.substr(1)}).replace(/:animating/g,".ng-animating"),t]}(e.selector),2),a=o[0],s=o[1];n.currentQuerySelector=r.length?r+" "+a:a,Ue(n.collectedStyles,n.currentQuerySelector,{});var u=kt(this,ft(e.animation),n);return n.currentQuery=null,n.currentQuerySelector=r,{type:11,selector:a,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:u,originalSelector:e.selector,options:Pt(e.options)}}},{key:"visitStagger",value:function(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");var n="full"===e.timings?{duration:0,delay:0,easing:"full"}:ot(e.timings,t.errors,!0);return{type:12,animation:kt(this,ft(e.animation),t),timings:n,options:null}}}]),e}(),At=function e(t){m(this,e),this.errors=t,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 jt(e){return!Array.isArray(e)&&"object"==typeof e}function Pt(e){var t;return e?(e=at(e)).params&&(e.params=(t=e.params)?at(t):null):e={},e}function It(e,t,n){return{duration:e,delay:t,easing:n}}function Dt(e,t,n,r,i,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:e,keyframes:t,preStyleProps:n,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:a,subTimeline:s}}var Rt=function(){function e(){m(this,e),this._map=new Map}return l(e,[{key:"consume",value:function(e){var t=this._map.get(e);return t?this._map.delete(e):t=[],t}},{key:"append",value:function(e,t){var n,r=this._map.get(e);r||this._map.set(e,r=[]),(n=r).push.apply(n,o(t))}},{key:"has",value:function(e){return this._map.has(e)}},{key:"clear",value:function(){this._map.clear()}}]),e}(),Nt=new RegExp(":enter","g"),Lt=new RegExp(":leave","g");function Vt(e,t,n,r,i){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,u=arguments.length>8?arguments[8]:void 0,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new Mt).buildKeyframes(e,t,n,r,i,o,a,s,u,l)}var Mt=function(){function e(){m(this,e)}return l(e,[{key:"buildKeyframes",value:function(e,t,n,r,i,o,a,s,u){var l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];u=u||new Rt;var c=new Ht(e,t,u,r,i,l,[]);c.options=s,c.currentTimeline.setStyles([o],null,c.errors,s),kt(this,n,c);var h=c.timelines.filter(function(e){return e.containsAnimation()});if(h.length&&Object.keys(a).length){var f=h[h.length-1];f.allowOnlyTimelineStyles()||f.setStyles([a],null,c.errors,s)}return h.length?h.map(function(e){return e.buildKeyframes()}):[Dt(t,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(e,t){}},{key:"visitState",value:function(e,t){}},{key:"visitTransition",value:function(e,t){}},{key:"visitAnimateChild",value:function(e,t){var n=t.subInstructions.consume(t.element);if(n){var r=t.createSubContext(e.options),i=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);i!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}},{key:"visitAnimateRef",value:function(e,t){var n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}},{key:"_visitSubInstructions",value:function(e,t,n){var r=t.currentTimeline.currentTime,i=null!=n.duration?rt(n.duration):null,o=null!=n.delay?rt(n.delay):null;return 0!==i&&e.forEach(function(e){var n=t.appendInstructionToTimeline(e,i,o);r=Math.max(r,n.duration+n.delay)}),r}},{key:"visitReference",value:function(e,t){t.updateOptions(e.options,!0),kt(this,e.animation,t),t.previousNode=e}},{key:"visitSequence",value:function(e,t){var n=this,r=t.subContextCount,i=t,o=e.options;if(o&&(o.params||o.delay)&&((i=t.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Ft);var a=rt(o.delay);i.delayNextStep(a)}e.steps.length&&(e.steps.forEach(function(e){return kt(n,e,i)}),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),t.previousNode=e}},{key:"visitGroup",value:function(e,t){var n=this,r=[],i=t.currentTimeline.currentTime,o=e.options&&e.options.delay?rt(e.options.delay):0;e.steps.forEach(function(a){var s=t.createSubContext(e.options);o&&s.delayNextStep(o),kt(n,a,s),i=Math.max(i,s.currentTimeline.currentTime),r.push(s.currentTimeline)}),r.forEach(function(e){return t.currentTimeline.mergeTimelineCollectedStyles(e)}),t.transformIntoNewTimeline(i),t.previousNode=e}},{key:"_visitTiming",value:function(e,t){if(e.dynamic){var n=e.strValue;return ot(t.params?pt(n,t.params,t.errors):n,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}},{key:"visitAnimate",value:function(e,t){var n=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());var i=e.style;5==i.type?this.visitKeyframes(i,t):(t.incrementTime(n.duration),this.visitStyle(i,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}},{key:"visitStyle",value:function(e,t){var n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();var i=r&&r.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(i):n.setStyles(e.styles,i,t.errors,t.options),t.previousNode=e}},{key:"visitKeyframes",value:function(e,t){var n=t.currentAnimateTimings,r=t.currentTimeline.duration,i=n.duration,o=t.createSubContext().currentTimeline;o.easing=n.easing,e.styles.forEach(function(e){o.forwardTime((e.offset||0)*i),o.setStyles(e.styles,e.easing,t.errors,t.options),o.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(r+i),t.previousNode=e}},{key:"visitQuery",value:function(e,t){var n=this,r=t.currentTimeline.currentTime,i=e.options||{},o=i.delay?rt(i.delay):0;o&&(6===t.previousNode.type||0==r&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Ft);var a=r,s=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=s.length;var u=null;s.forEach(function(r,i){t.currentQueryIndex=i;var s=t.createSubContext(e.options,r);o&&s.delayNextStep(o),r===t.element&&(u=s.currentTimeline),kt(n,e.animation,s),s.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,s.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),u&&(t.currentTimeline.mergeTimelineCollectedStyles(u),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}},{key:"visitStagger",value:function(e,t){var n=t.parentContext,r=t.currentTimeline,i=e.timings,o=Math.abs(i.duration),a=o*(t.currentQueryTotal-1),s=o*t.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":s=a-s;break;case"full":s=n.currentStaggerTime}var u=t.currentTimeline;s&&u.delayNextStep(s);var l=u.currentTime;kt(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-l+(r.startTime-n.currentTimeline.startTime)}}]),e}(),Ft={},Ht=function(){function e(t,n,r,i,o,a,s,u){m(this,e),this._driver=t,this.element=n,this.subInstructions=r,this._enterClassName=i,this._leaveClassName=o,this.errors=a,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Ft,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=u||new Ut(this._driver,n,0),s.push(this.currentTimeline)}return l(e,[{key:"updateOptions",value:function(e,t){var n=this;if(e){var r=e,i=this.options;null!=r.duration&&(i.duration=rt(r.duration)),null!=r.delay&&(i.delay=rt(r.delay));var o=r.params;if(o){var a=i.params;a||(a=this.options.params={}),Object.keys(o).forEach(function(e){t&&a.hasOwnProperty(e)||(a[e]=pt(o[e],a,n.errors))})}}}},{key:"_copyOptions",value:function(){var e={};if(this.options){var t=this.options.params;if(t){var n=e.params={};Object.keys(t).forEach(function(e){n[e]=t[e]})}}return e}},{key:"createSubContext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=n||this.element,o=new e(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}},{key:"transformIntoNewTimeline",value:function(e){return this.previousNode=Ft,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(e,t,n){var r={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+e.delay,easing:""},i=new qt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(i),r}},{key:"incrementTime",value:function(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}},{key:"delayNextStep",value:function(e){e>0&&this.currentTimeline.delayNextStep(e)}},{key:"invokeQuery",value:function(e,t,n,r,i,a){var s=[];if(r&&s.push(this.element),e.length>0){e=(e=e.replace(Nt,"."+this._enterClassName)).replace(Lt,"."+this._leaveClassName);var u=this._driver.query(this.element,e,1!=n);0!==n&&(u=n<0?u.slice(u.length+n,u.length):u.slice(0,n)),s.push.apply(s,o(u))}return i||0!=s.length||a.push('`query("'.concat(t,'")` returned zero elements. (Use `query("').concat(t,'", { optional: true })` if you wish to allow this.)')),s}},{key:"params",get:function(){return this.options.params}}]),e}(),Ut=function(){function e(t,n,r,i){m(this,e),this._driver=t,this.element=n,this.startTime=r,this._elementTimelineStylesLookup=i,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 l(e,[{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(e){var t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}},{key:"fork",value:function(t,n){return this.applyStylesToKeyframe(),new e(this._driver,t,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(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}},{key:"_updateStyle",value:function(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(e){var t=this;e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach(function(e){t._backFill[e]=t._globalTimelineStyles[e]||"*",t._currentKeyframe[e]="*"}),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(e,t,n,r){var i=this;t&&(this._previousKeyframe.easing=t);var o=r&&r.params||{},a=function(e,t){var n,r={};return e.forEach(function(e){"*"===e?(n=n||Object.keys(t)).forEach(function(e){r[e]="*"}):st(e,!1,r)}),r}(e,this._globalTimelineStyles);Object.keys(a).forEach(function(e){var t=pt(a[e],o,n);i._pendingStyles[e]=t,i._localTimelineStyles.hasOwnProperty(e)||(i._backFill[e]=i._globalTimelineStyles.hasOwnProperty(e)?i._globalTimelineStyles[e]:"*"),i._updateStyle(e,t)})}},{key:"applyStylesToKeyframe",value:function(){var e=this,t=this._pendingStyles,n=Object.keys(t);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){e._currentKeyframe[n]=t[n]}),Object.keys(this._localTimelineStyles).forEach(function(t){e._currentKeyframe.hasOwnProperty(t)||(e._currentKeyframe[t]=e._localTimelineStyles[t])}))}},{key:"snapshotCurrentStyles",value:function(){var e=this;Object.keys(this._localTimelineStyles).forEach(function(t){var n=e._localTimelineStyles[t];e._pendingStyles[t]=n,e._updateStyle(t,n)})}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"mergeTimelineCollectedStyles",value:function(e){var t=this;Object.keys(e._styleSummary).forEach(function(n){var r=t._styleSummary[n],i=e._styleSummary[n];(!r||i.time>r.time)&&t._updateStyle(n,i.value)})}},{key:"buildKeyframes",value:function(){var e=this;this.applyStylesToKeyframe();var t=new Set,n=new Set,r=1===this._keyframes.size&&0===this.duration,i=[];this._keyframes.forEach(function(o,a){var s=st(o,!0);Object.keys(s).forEach(function(e){var r=s[e];"!"==r?t.add(e):"*"==r&&n.add(e)}),r||(s.offset=a/e.duration),i.push(s)});var o=t.size?yt(t.values()):[],a=n.size?yt(n.values()):[];if(r){var s=i[0],u=at(s);s.offset=0,u.offset=1,i=[s,u]}return Dt(this.element,i,o,a,this.duration,this.startTime,this.easing,!1)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"properties",get:function(){var e=[];for(var t in this._currentKeyframe)e.push(t);return e}}]),e}(),qt=function(e){h(n,e);var t=d(n);function n(e,r,i,o,a,s){var u,l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return m(this,n),(u=t.call(this,e,r,s.delay)).element=r,u.keyframes=i,u.preStyleProps=o,u.postStyleProps=a,u._stretchStartingKeyframe=l,u.timings={duration:s.duration,delay:s.delay,easing:s.easing},u}return l(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var e=this.keyframes,t=this.timings,n=t.delay,r=t.duration,i=t.easing;if(this._stretchStartingKeyframe&&n){var o=[],a=r+n,s=n/a,u=st(e[0],!1);u.offset=0,o.push(u);var l=st(e[0],!1);l.offset=zt(s),o.push(l);for(var c=e.length-1,h=1;h<=c;h++){var f=st(e[h],!1);f.offset=zt((n+f.offset*r)/a),o.push(f)}r=a,n=0,i="",e=o}return Dt(this.element,e,this.preStyleProps,this.postStyleProps,r,n,i,!0)}}]),n}(Ut);function zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Math.pow(10,t-1);return Math.round(e*n)/n}var Bt,Qt,Wt=function e(){m(this,e)},Kt=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"normalizePropertyName",value:function(e,t){return mt(e)}},{key:"normalizeStyleValue",value:function(e,t,n,r){var i="",o=n.toString().trim();if(Gt[t]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{var a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push("Please provide a CSS unit value for ".concat(e,":").concat(n))}return o+i}}]),n}(Wt),Gt=(Bt="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(","),Qt={},Bt.forEach(function(e){return Qt[e]=!0}),Qt);function Zt(e,t,n,r,i,o,a,s,u,l,c,h,f){return{type:0,element:e,triggerName:t,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:a,timelines:s,queriedElements:u,preStyleProps:l,postStyleProps:c,totalTime:h,errors:f}}var Xt={},Jt=function(){function e(t,n,r){m(this,e),this._triggerName=t,this.ast=n,this._stateStyles=r}return l(e,[{key:"match",value:function(e,t,n,r){return function(e,t,n,r,i){return e.some(function(e){return e(t,n,r,i)})}(this.ast.matchers,e,t,n,r)}},{key:"buildStyles",value:function(e,t,n){var r=this._stateStyles["*"],i=this._stateStyles[e],o=r?r.buildStyles(t,n):{};return i?i.buildStyles(t,n):o}},{key:"build",value:function(e,t,n,r,i,o,a,s,u,l){var c=[],h=this.ast.options&&this.ast.options.params||Xt,f=this.buildStyles(n,a&&a.params||Xt,c),d=s&&s.params||Xt,v=this.buildStyles(r,d,c),p=new Set,y=new Map,g=new Map,m="void"===r,b={params:Object.assign(Object.assign({},h),d)},_=l?[]:Vt(e,t,this.ast.animation,i,o,f,v,b,u,c),k=0;if(_.forEach(function(e){k=Math.max(e.duration+e.delay,k)}),c.length)return Zt(t,this._triggerName,n,r,m,f,v,[],[],y,g,k,c);_.forEach(function(e){var n=e.element,r=Ue(y,n,{});e.preStyleProps.forEach(function(e){return r[e]=!0});var i=Ue(g,n,{});e.postStyleProps.forEach(function(e){return i[e]=!0}),n!==t&&p.add(n)});var w=yt(p.values());return Zt(t,this._triggerName,n,r,m,f,v,_,w,y,g,k)}}]),e}(),Yt=function(){function e(t,n){m(this,e),this.styles=t,this.defaultParams=n}return l(e,[{key:"buildStyles",value:function(e,t){var n={},r=at(this.defaultParams);return Object.keys(e).forEach(function(t){var n=e[t];null!=n&&(r[t]=n)}),this.styles.styles.forEach(function(e){if("string"!=typeof e){var i=e;Object.keys(i).forEach(function(e){var o=i[e];o.length>1&&(o=pt(o,r,t)),n[e]=o})}}),n}}]),e}(),$t=function(){function e(t,n){var r=this;m(this,e),this.name=t,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach(function(e){r.states[e.name]=new Yt(e.style,e.options&&e.options.params||{})}),en(this.states,"true","1"),en(this.states,"false","0"),n.transitions.forEach(function(e){r.transitionFactories.push(new Jt(t,e,r.states))}),this.fallbackTransition=new Jt(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(e,t){return!0}],options:null,queryCount:0,depCount:0},this.states)}return l(e,[{key:"matchTransition",value:function(e,t,n,r){return this.transitionFactories.find(function(i){return i.match(e,t,n,r)})||null}},{key:"matchStyles",value:function(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}},{key:"containsQueries",get:function(){return this.ast.queryCount>0}}]),e}();function en(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}var tn=new Rt,nn=function(){function e(t,n,r){m(this,e),this.bodyNode=t,this._driver=n,this._normalizer=r,this._animations={},this._playersById={},this.players=[]}return l(e,[{key:"register",value:function(e,t){var n=[],r=Tt(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[e]=r}},{key:"_buildPlayer",value:function(e,t,n){var r=e.element,i=Ve(0,this._normalizer,0,e.keyframes,t,n);return this._driver.animate(r,i,e.duration,e.delay,e.easing,[],!0)}},{key:"create",value:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[],a=this._animations[e],s=new Map;if(a?(n=Vt(this._driver,t,a,"ng-enter","ng-leave",{},{},i,tn,o)).forEach(function(e){var t=Ue(s,e.element,{});e.postStyleProps.forEach(function(e){return t[e]=null})}):(o.push("The requested animation doesn't exist or has already been destroyed"),n=[]),o.length)throw new Error("Unable to create the animation due to the following errors: "+o.join("\n"));s.forEach(function(e,t){Object.keys(e).forEach(function(n){e[n]=r._driver.computeStyle(t,n,"*")})});var u=Le(n.map(function(e){var t=s.get(e.element);return r._buildPlayer(e,{},t)}));return this._playersById[e]=u,u.onDestroy(function(){return r.destroy(e)}),this.players.push(u),u}},{key:"destroy",value:function(e){var t=this._getPlayer(e);t.destroy(),delete this._playersById[e];var n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}},{key:"_getPlayer",value:function(e){var t=this._playersById[e];if(!t)throw new Error("Unable to find the timeline player referenced by "+e);return t}},{key:"listen",value:function(e,t,n,r){var i=He(t,"","","");return Me(this._getPlayer(e),n,i,r),function(){}}},{key:"command",value:function(e,t,n,r){if("register"!=n)if("create"!=n){var i=this._getPlayer(e);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}else this.create(e,t,r[0]||{});else this.register(e,r[0])}}]),e}(),rn=[],on={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},an={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},sn=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";m(this,e),this.namespaceId=n;var r,i=t&&t.hasOwnProperty("value");if(this.value=null!=(r=i?t.value:t)?r:null,i){var o=at(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}return l(e,[{key:"absorbOptions",value:function(e){var t=e.params;if(t){var n=this.options.params;Object.keys(t).forEach(function(e){null==n[e]&&(n[e]=t[e])})}}},{key:"params",get:function(){return this.options.params}}]),e}(),un=new sn("void"),ln=function(){function e(t,n,r){m(this,e),this.id=t,this.hostElement=n,this._engine=r,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,yn(n,this._hostClassName)}return l(e,[{key:"listen",value:function(e,t,n,r){var i,o=this;if(!this._triggers.hasOwnProperty(t))throw new Error('Unable to listen on the animation trigger event "'.concat(n,'" because the animation trigger "').concat(t,"\" doesn't exist!"));if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'.concat(t,'" because the provided event is undefined!'));if("start"!=(i=n)&&"done"!=i)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(t,'" is not supported!'));var a=Ue(this._elementListeners,e,[]),s={name:t,phase:n,callback:r};a.push(s);var u=Ue(this._engine.statesByElement,e,{});return u.hasOwnProperty(t)||(yn(e,"ng-trigger"),yn(e,"ng-trigger-"+t),u[t]=un),function(){o._engine.afterFlush(function(){var e=a.indexOf(s);e>=0&&a.splice(e,1),o._triggers[t]||delete u[t]})}}},{key:"register",value:function(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)}},{key:"_getTrigger",value:function(e){var t=this._triggers[e];if(!t)throw new Error('The provided animation trigger "'.concat(e,'" has not been registered!'));return t}},{key:"trigger",value:function(e,t,n){var r=this,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this._getTrigger(t),a=new hn(this.id,t,e),s=this._engine.statesByElement.get(e);s||(yn(e,"ng-trigger"),yn(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,s={}));var u=s[t],l=new sn(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&u&&l.absorbOptions(u.options),s[t]=l,u||(u=un),"void"===l.value||u.value!==l.value){var c=Ue(this._engine.playersByElement,e,[]);c.forEach(function(e){e.namespaceId==r.id&&e.triggerName==t&&e.queued&&e.destroy()});var h=o.matchTransition(u.value,l.value,e,l.params),f=!1;if(!h){if(!i)return;h=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:h,fromState:u,toState:l,player:a,isFallbackTransition:f}),f||(yn(e,"ng-animate-queued"),a.onStart(function(){gn(e,"ng-animate-queued")})),a.onDone(function(){var t=r.players.indexOf(a);t>=0&&r.players.splice(t,1);var n=r._engine.playersByElement.get(e);if(n){var i=n.indexOf(a);i>=0&&n.splice(i,1)}}),this.players.push(a),c.push(a),a}if(!function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(var i=0;i=0){for(var r=!1,i=n;i>=0;i--)if(this.driver.containsElement(this._namespaceList[i].hostElement,t)){this._namespaceList.splice(i+1,0,e),r=!0;break}r||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e}},{key:"register",value:function(e,t){var n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}},{key:"registerTrigger",value:function(e,t,n){var r=this._namespaceLookup[e];r&&r.register(t,n)&&this.totalAnimations++}},{key:"destroy",value:function(e,t){var n=this;if(e){var r=this._fetchNamespace(e);this.afterFlush(function(){n.namespacesByHostElement.delete(r.hostElement),delete n._namespaceLookup[e];var t=n._namespaceList.indexOf(r);t>=0&&n._namespaceList.splice(t,1)}),this.afterFlushAnimationsDone(function(){return r.destroy(t)})}}},{key:"_fetchNamespace",value:function(e){return this._namespaceLookup[e]}},{key:"fetchNamespacesByElement",value:function(e){var t=new Set,n=this.statesByElement.get(e);if(n)for(var r=Object.keys(n),i=0;i=0&&this.collectedLeaveElements.splice(o,1)}if(e){var a=this._fetchNamespace(e);a&&a.insertNode(t,n)}r&&this.collectEnterElement(t)}}},{key:"collectEnterElement",value:function(e){this.collectedEnterElements.push(e)}},{key:"markElementAsDisabled",value:function(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),yn(e,"ng-animate-disabled")):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),gn(e,"ng-animate-disabled"))}},{key:"removeNode",value:function(e,t,n,r){if(fn(t)){var i=e?this._fetchNamespace(e):null;if(i?i.removeNode(t,r):this.markElementAsRemoved(e,t,!1,r),n){var o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,r)}}else this._onRemovalComplete(t,r)}},{key:"markElementAsRemoved",value:function(e,t,n,r){this.collectedLeaveElements.push(t),t.__ng_removed={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(e,t,n,r,i){return fn(t)?this._fetchNamespace(e).listen(t,n,r,i):function(){}}},{key:"_buildInstruction",value:function(e,t,n,r,i){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t,i)}},{key:"destroyInnerAnimations",value:function(e){var t=this,n=this.driver.query(e,".ng-trigger",!0);n.forEach(function(e){return t.destroyActiveAnimationsForElement(e)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(e,".ng-animating",!0)).forEach(function(e){return t.finishActiveQueriedAnimationOnElement(e)})}},{key:"destroyActiveAnimationsForElement",value:function(e){var t=this.playersByElement.get(e);t&&t.forEach(function(e){e.queued?e.markedForDestroy=!0:e.destroy()})}},{key:"finishActiveQueriedAnimationOnElement",value:function(e){var t=this.playersByQueriedElement.get(e);t&&t.forEach(function(e){return e.finish()})}},{key:"whenRenderingDone",value:function(){var e=this;return new Promise(function(t){if(e.players.length)return Le(e.players).onDone(function(){return t()});t()})}},{key:"processLeaveNode",value:function(e){var t=this,n=e.__ng_removed;if(n&&n.setForRemoval){if(e.__ng_removed=on,n.namespaceId){this.destroyInnerAnimations(e);var r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}this.driver.matchesElement(e,".ng-animate-disabled")&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(function(e){t.markElementAsDisabled(e,!1)})}},{key:"flush",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(t,n){return e._balanceNamespaceList(t,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var r=0;r=0;T--)this._namespaceList[T].drainQueuedTransitions(t).forEach(function(e){var t=e.player,o=e.element;if(E.push(t),n.collectedEnterElements.length){var a=o.__ng_removed;if(a&&a.setForMove)return void t.destroy()}var h=!f||!n.driver.containsElement(f,o),d=C.get(o),v=p.get(o),y=n._buildInstruction(e,r,v,d,h);if(y.errors&&y.errors.length)O.push(y);else{if(h)return t.onStart(function(){return ht(o,y.fromStyles)}),t.onDestroy(function(){return ct(o,y.toStyles)}),void i.push(t);if(e.isFallbackTransition)return t.onStart(function(){return ht(o,y.fromStyles)}),t.onDestroy(function(){return ct(o,y.toStyles)}),void i.push(t);y.timelines.forEach(function(e){return e.stretchStartingKeyframe=!0}),r.append(o,y.timelines),s.push({instruction:y,player:t,element:o}),y.queriedElements.forEach(function(e){return Ue(u,e,[]).push(t)}),y.preStyleProps.forEach(function(e,t){var n=Object.keys(e);if(n.length){var r=l.get(t);r||l.set(t,r=new Set),n.forEach(function(e){return r.add(e)})}}),y.postStyleProps.forEach(function(e,t){var n=Object.keys(e),r=c.get(t);r||c.set(t,r=new Set),n.forEach(function(e){return r.add(e)})})}});if(O.length){var x=[];O.forEach(function(e){x.push("@".concat(e.triggerName," has failed due to:\n")),e.errors.forEach(function(e){return x.push("- ".concat(e,"\n"))})}),E.forEach(function(e){return e.destroy()}),this.reportError(x)}var A=new Map,j=new Map;s.forEach(function(e){var t=e.element;r.has(t)&&(j.set(t,t),n._beforeAnimationBuild(e.player.namespaceId,e.instruction,A))}),i.forEach(function(e){var t=e.element;n._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(function(e){Ue(A,t,[]).push(e),e.destroy()})});var P=g.filter(function(e){return _n(e,l,c)}),I=new Map;vn(I,this.driver,b,c,"*").forEach(function(e){_n(e,l,c)&&P.push(e)});var D=new Map;v.forEach(function(e,t){vn(D,n.driver,new Set(e),l,"!")}),P.forEach(function(e){var t=I.get(e),n=D.get(e);I.set(e,Object.assign(Object.assign({},t),n))});var R=[],N=[],L={};s.forEach(function(e){var t=e.element,o=e.player,s=e.instruction;if(r.has(t)){if(h.has(t))return o.onDestroy(function(){return ct(t,s.toStyles)}),o.disabled=!0,o.overrideTotalTime(s.totalTime),void i.push(o);var u=L;if(j.size>1){for(var l=t,c=[];l=l.parentNode;){var f=j.get(l);if(f){u=f;break}c.push(l)}c.forEach(function(e){return j.set(e,u)})}var d=n._buildAnimation(o.namespaceId,s,A,a,D,I);if(o.setRealPlayer(d),u===L)R.push(o);else{var v=n.playersByElement.get(u);v&&v.length&&(o.parentPlayer=Le(v)),i.push(o)}}else ht(t,s.fromStyles),o.onDestroy(function(){return ct(t,s.toStyles)}),N.push(o),h.has(t)&&i.push(o)}),N.forEach(function(e){var t=a.get(e.element);if(t&&t.length){var n=Le(t);e.setRealPlayer(n)}}),i.forEach(function(e){e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()});for(var V=0;V0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new De(e.duration,e.delay)}},{key:"queuedPlayers",get:function(){var e=[];return this._namespaceList.forEach(function(t){t.players.forEach(function(t){t.queued&&e.push(t)})}),e}}]),e}(),hn=function(){function e(t,n,r){m(this,e),this.namespaceId=t,this.triggerName=n,this.element=r,this._player=new De,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return l(e,[{key:"setRealPlayer",value:function(e){var t=this;this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach(function(n){t._queuedCallbacks[n].forEach(function(t){return Me(e,n,void 0,t)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(e){this.totalTime=e}},{key:"syncPlayerEvents",value:function(e){var t=this,n=this._player;n.triggerCallback&&e.onStart(function(){return n.triggerCallback("start")}),e.onDone(function(){return t.finish()}),e.onDestroy(function(){return t.destroy()})}},{key:"_queueEvent",value:function(e,t){Ue(this._queuedCallbacks,e,[]).push(t)}},{key:"onDone",value:function(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}},{key:"onStart",value:function(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}},{key:"onDestroy",value:function(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}},{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(e){this.queued||this._player.setPosition(e)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(e){var t=this._player;t.triggerCallback&&t.triggerCallback(e)}}]),e}();function fn(e){return e&&1===e.nodeType}function dn(e,t){var n=e.style.display;return e.style.display=null!=t?t:"none",n}function vn(e,t,n,r,i){var o=[];n.forEach(function(e){return o.push(dn(e))});var a=[];r.forEach(function(n,r){var o={};n.forEach(function(e){var n=o[e]=t.computeStyle(r,e,i);n&&0!=n.length||(r.__ng_removed=an,a.push(r))}),e.set(r,o)});var s=0;return n.forEach(function(e){return dn(e,o[s++])}),a}function pn(e,t){var n=new Map;if(e.forEach(function(e){return n.set(e,[])}),0==t.length)return n;var r=new Set(t),i=new Map;function o(e){if(!e)return 1;var t=i.get(e);if(t)return t;var a=e.parentNode;return t=n.has(a)?a:r.has(a)?1:o(a),i.set(e,t),t}return t.forEach(function(e){var t=o(e);1!==t&&n.get(t).push(e)}),n}function yn(e,t){if(e.classList)e.classList.add(t);else{var n=e.$$classes;n||(n=e.$$classes={}),n[t]=!0}}function gn(e,t){if(e.classList)e.classList.remove(t);else{var n=e.$$classes;n&&delete n[t]}}function mn(e,t,n){Le(n).onDone(function(){return e.processLeaveNode(t)})}function bn(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(e)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}}]),e}();function wn(e,t){var n=null,r=null;return Array.isArray(t)&&t.length?(n=Sn(t[0]),t.length>1&&(r=Sn(t[t.length-1]))):t&&(n=Sn(t)),n||r?new Cn(e,n,r):null}var Cn=function(){var e=function(){function e(t,n,r){m(this,e),this._element=t,this._startStyles=n,this._endStyles=r,this._state=0;var i=e.initialStylesByElement.get(t);i||e.initialStylesByElement.set(t,i={}),this._initialStyles=i}return l(e,[{key:"start",value:function(){this._state<1&&(this._startStyles&&ct(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(ct(this._element,this._initialStyles),this._endStyles&&(ct(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(ht(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ht(this._element,this._endStyles),this._endStyles=null),ct(this._element,this._initialStyles),this._state=3)}}]),e}();return e.initialStylesByElement=new WeakMap,e}();function Sn(e){for(var t=null,n=Object.keys(e),r=0;r=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),jn(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var e,t,n,r;this._destroyed||(this._destroyed=!0,this.finish(),e=this._element,t=this._name,n=In(e,"").split(","),(r=An(n,t))>=0&&(n.splice(r,1),Pn(e,"",n.join(","))))}}]),e}();function Tn(e,t,n){Pn(e,"PlayState",n,xn(e,t))}function xn(e,t){var n=In(e,"");return n.indexOf(",")>0?An(n.split(","),t):An([n],t)}function An(e,t){for(var n=0;n=0)return n;return-1}function jn(e,t,n){n?e.removeEventListener("animationend",t):e.addEventListener("animationend",t)}function Pn(e,t,n,r){var i="animation"+t;if(null!=r){var o=e.style[i];if(o.length){var a=o.split(",");a[r]=n,n=a.join(",")}}e.style[i]=n}function In(e,t){return e.style["animation"+t]}var Dn=function(){function e(t,n,r,i,o,a,s,u){m(this,e),this.element=t,this.keyframes=n,this.animationName=r,this._duration=i,this._delay=o,this._finalStyles=s,this._specialStyles=u,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=a||"linear",this.totalTime=i+o,this._buildStyler()}return l(e,[{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{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(e){return e()}),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach(function(e){return e()}),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(e){this._styler.setPosition(e)}},{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 e=this;this._styler=new On(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return e.finish()})}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}},{key:"beforeDestroy",value:function(){var e=this;this.init();var t={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(r){"offset"!=r&&(t[r]=n?e._finalStyles[r]:wt(e.element,r))})}this.currentSnapshot=t}}]),e}(),Rn=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this)).element=e,i._startingStyles={},i.__initialized=!1,i._styles=$e(r),i}return l(n,[{key:"init",value:function(){var e=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(t){e._startingStyles[t]=e.element.style[t]}),c(g(n.prototype),"init",this).call(this))}},{key:"play",value:function(){var e=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(t){return e.element.style.setProperty(t,e._styles[t])}),c(g(n.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var e=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(t){var n=e._startingStyles[t];n?e.element.style.setProperty(t,n):e.element.style.removeProperty(t)}),this._startingStyles=null,c(g(n.prototype),"destroy",this).call(this))}}]),n}(De),Nn=function(){function e(){m(this,e),this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return l(e,[{key:"validateStyleProperty",value:function(e){return Ze(e)}},{key:"matchesElement",value:function(e,t){return Xe(e,t)}},{key:"containsElement",value:function(e,t){return Je(e,t)}},{key:"query",value:function(e,t,n){return Ye(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return window.getComputedStyle(e)[t]}},{key:"buildKeyframeElement",value:function(e,t,n){n=n.map(function(e){return $e(e)});var r="@keyframes ".concat(t," {\n"),i="";n.forEach(function(e){i=" ";var t=parseFloat(e.offset);r+="".concat(i).concat(100*t,"% {\n"),i+=" ",Object.keys(e).forEach(function(t){var n=e[t];switch(t){case"offset":return;case"easing":return void(n&&(r+="".concat(i,"animation-timing-function: ").concat(n,";\n")));default:return void(r+="".concat(i).concat(t,": ").concat(n,";\n"))}}),r+=i+"}\n"}),r+="}\n";var o=document.createElement("style");return o.textContent=r,o}},{key:"animate",value:function(e,t,n,r,i){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(e){return e instanceof Dn}),u={};bt(n,r)&&s.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return u[e]=t[e]})});var l=function(e){var t={};return e&&(Array.isArray(e)?e:[e]).forEach(function(e){Object.keys(e).forEach(function(n){"offset"!=n&&"easing"!=n&&(t[n]=e[n])})}),t}(t=_t(e,t,u));if(0==n)return new Rn(e,l);var c="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(e,c,t);document.querySelector("head").appendChild(h);var f=wn(e,t),d=new Dn(e,t,c,n,r,i,l,f);return d.onDestroy(function(){var e;(e=h).parentNode.removeChild(e)}),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)}}]),e}(),Ln=function(){function e(t,n,r,i){m(this,e),this.element=t,this.keyframes=n,this.options=r,this._specialStyles=i,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=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}return l(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var e=this;if(!this._initialized){this._initialized=!0;var t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",function(){return e._onFinish()})}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(e,t,n){return e.animate(t,n)}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),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(e){return e()}),this._onDestroyFns=[])}},{key:"setPosition",value:function(e){this.domPlayer.currentTime=e*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"beforeDestroy",value:function(){var e=this,t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(t[n]=e._finished?e._finalKeyframe[n]:wt(e.element,n))}),this.currentSnapshot=t}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}},{key:"totalTime",get:function(){return this._delay+this._duration}}]),e}(),Vn=function(){function e(){m(this,e),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Mn().toString()),this._cssKeyframesDriver=new Nn}return l(e,[{key:"validateStyleProperty",value:function(e){return Ze(e)}},{key:"matchesElement",value:function(e,t){return Xe(e,t)}},{key:"containsElement",value:function(e,t){return Je(e,t)}},{key:"query",value:function(e,t,n){return Ye(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return window.getComputedStyle(e)[t]}},{key:"overrideWebAnimationsSupport",value:function(e){this._isNativeImpl=e}},{key:"animate",value:function(e,t,n,r,i){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(e,t,n,r,i,o);var s={duration:n,delay:r,fill:0==r?"both":"forwards"};i&&(s.easing=i);var u={},l=o.filter(function(e){return e instanceof Ln});bt(n,r)&&l.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return u[e]=t[e]})});var c=wn(e,t=_t(e,t=t.map(function(e){return st(e,!1)}),u));return new Ln(e,t,s,c)}}]),e}();function Mn(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var Fn,Hn=((Fn=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this))._nextAnimationId=0,i._renderer=e.createRenderer(r.body,{id:"0",encapsulation:u.P.None,styles:[],data:{animation:[]}}),i}return l(n,[{key:"build",value:function(e){var t=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(e)?je(e):e;return zn(this._renderer,null,t,"register",[n]),new Un(t,this._renderer)}}]),n}(Ae)).\u0275fac=function(e){return new(e||Fn)(u.Qb(u.E),u.Qb(k.c))},Fn.\u0275prov=u.Db({token:Fn,factory:Fn.\u0275fac}),Fn),Un=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this))._id=e,i._renderer=r,i}return l(n,[{key:"create",value:function(e,t){return new qn(this._id,e,t||{},this._renderer)}}]),n}(function(){return function e(){m(this,e)}}()),qn=function(){function e(t,n,r,i){m(this,e),this.id=t,this.element=n,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",r)}return l(e,[{key:"_listen",value:function(e,t){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(e),t)}},{key:"_command",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0&&e3&&void 0!==arguments[3])||arguments[3];this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,r)}},{key:"removeChild",value:function(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate,n)}},{key:"selectRootElement",value:function(e,t){return this.delegate.selectRootElement(e,t)}},{key:"parentNode",value:function(e){return this.delegate.parentNode(e)}},{key:"nextSibling",value:function(e){return this.delegate.nextSibling(e)}},{key:"setAttribute",value:function(e,t,n,r){this.delegate.setAttribute(e,t,n,r)}},{key:"removeAttribute",value:function(e,t,n){this.delegate.removeAttribute(e,t,n)}},{key:"addClass",value:function(e,t){this.delegate.addClass(e,t)}},{key:"removeClass",value:function(e,t){this.delegate.removeClass(e,t)}},{key:"setStyle",value:function(e,t,n,r){this.delegate.setStyle(e,t,n,r)}},{key:"removeStyle",value:function(e,t,n){this.delegate.removeStyle(e,t,n)}},{key:"setProperty",value:function(e,t,n){"@"==t.charAt(0)&&"@.disabled"==t?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}},{key:"setValue",value:function(e,t){this.delegate.setValue(e,t)}},{key:"listen",value:function(e,t,n){return this.delegate.listen(e,t,n)}},{key:"disableAnimations",value:function(e,t){this.engine.disableAnimations(e,t)}},{key:"data",get:function(){return this.delegate.data}}]),e}(),Jn=function(e){h(r,e);var n=d(r);function r(e,t,i,o){var a;return m(this,r),(a=n.call(this,t,i,o)).factory=e,a.namespaceId=t,a}return l(r,[{key:"setProperty",value:function(e,t,n){"@"==t.charAt(0)?"."==t.charAt(1)&&"@.disabled"==t?this.disableAnimations(e,n=void 0===n||!!n):this.engine.process(this.namespaceId,e,t.substr(1),n):this.delegate.setProperty(e,t,n)}},{key:"listen",value:function(e,n,r){var i,o,a=this;if("@"==n.charAt(0)){var s,u=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(e),l=n.substr(1),c="";return"@"!=l.charAt(0)&&(o=(i=l).indexOf("."),l=(s=t([i.substring(0,o),i.substr(o+1)],2))[0],c=s[1]),this.engine.listen(this.namespaceId,u,l,c,function(e){a.factory.scheduleListenerCallback(e._data||-1,r,e)})}return this.delegate.listen(e,n,r)}}]),r}(Xn),Yn=((Qn=function(e){h(n,e);var t=d(n);function n(e,r,i){return m(this,n),t.call(this,e.body,r,i)}return n}(kn)).\u0275fac=function(e){return new(e||Qn)(u.Qb(k.c),u.Qb(nt),u.Qb(Wt))},Qn.\u0275prov=u.Db({token:Qn,factory:Qn.\u0275fac}),Qn),$n=[{provide:nt,useFactory:function(){return"function"==typeof Mn()?new Vn:new Nn}},{provide:new u.q("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:Ae,useClass:Hn},{provide:Wt,useFactory:function(){return new Kt}},{provide:kn,useClass:Yn},{provide:u.E,useFactory:function(e,t,n){return new Zn(e,t,n)},deps:[pe,kn,u.z]}],er=((Wn=function e(){m(this,e)}).\u0275mod=u.Fb({type:Wn}),Wn.\u0275inj=u.Eb({factory:function(e){return new(e||Wn)},providers:$n,imports:[xe]}),Wn),tr=r("RKnZ"),nr=r("KZX/"),rr=((Kn=function e(){m(this,e)}).\u0275mod=u.Fb({type:Kn}),Kn.\u0275inj=u.Eb({factory:function(e){return new(e||Kn)},imports:[[k.b,nr.a,_.b,tr.a,f.d]]}),Kn),ir=r("tk/3"),or=((Gn=function e(){m(this,e)}).\u0275mod=u.Fb({type:Gn,bootstrap:[v]}),Gn.\u0275inj=u.Eb({factory:function(e){return new(e||Gn)},providers:[b.a,{provide:k.h,useClass:k.d}],imports:[[xe,er,k.b,X,nr.a,ir.c,rr]]}),Gn);Object(u.R)(),Oe().bootstrapModule(or).catch(function(e){return console.error(e)})},zn8P:function(e,t){function n(e){return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="zn8P"},zx2A:function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return s}),n.d(t,"c",function(){return u});var r=n("7o/Q"),i=n("HDdC"),o=n("SeVD"),a=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this)).parent=e,r}return l(n,[{key:"_next",value:function(e){this.parent.notifyNext(e)}},{key:"_error",value:function(e){this.parent.notifyError(e),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(),this.unsubscribe()}}]),n}(r.a),s=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"notifyNext",value:function(e){this.destination.next(e)}},{key:"notifyError",value:function(e){this.destination.error(e)}},{key:"notifyComplete",value:function(){this.destination.complete()}}]),n}(r.a);function u(e,t){if(!t.closed)return e instanceof i.a?e.subscribe(t):Object(o.a)(e)(t)}}},[[0,0]]])}(); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/main-es5.82494a37001f1781a756.js b/classifai-core/src/main/resources/webroot/main-es5.82494a37001f1781a756.js new file mode 100644 index 000000000..59c3e144f --- /dev/null +++ b/classifai-core/src/main/resources/webroot/main-es5.82494a37001f1781a756.js @@ -0,0 +1 @@ +!function(){function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||a(e,t)||function(){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 n(e){var t="function"==typeof Map?new Map:void 0;return(n=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return r(e,arguments,g(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),f(i,e)})(e)}function r(e,t,n){return(r=y()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f(i,n.prototype),i}).apply(null,arguments)}function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}}function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||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 a(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this}},{key:"requestAsyncId",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(e.flush.bind(e,this),n)}},{key:"recycleAsyncId",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)}},{key:"execute",value:function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r}},{key:"_unsubscribe",value:function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}]),n}(function(e){h(n,e);var t=d(n);function n(e,r){return m(this,n),t.call(this)}return l(n,[{key:"schedule",value:function(e){return this}}]),n}(n("quSY").a))},"3Pt+":function(e,t,n){"use strict";n.d(t,"a",function(){return b}),n.d(t,"b",function(){return Me}),n.d(t,"c",function(){return Le}),n.d(t,"d",function(){return Re}),n.d(t,"e",function(){return Fe}),n.d(t,"f",function(){return U}),n.d(t,"g",function(){return q}),n.d(t,"h",function(){return Te}),n.d(t,"i",function(){return je}),n.d(t,"j",function(){return $}),n.d(t,"k",function(){return He}),n.d(t,"l",function(){return E}),n.d(t,"m",function(){return re}),n.d(t,"n",function(){return Pe});var r=n("fXoL"),a=n("ofXK"),s=n("cp0P"),u=n("Cfvw"),c=n("lJxs"),f=new r.q("NgValueAccessor"),v={provide:f,useExisting:Object(r.S)(function(){return p}),multi:!0},p=function(){var e=function(){function e(t,n){m(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return l(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"checked",e)}},{key:"registerOnChange",value:function(e){this.onChange=e}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(r.D),r.Hb(r.l))},e.\u0275dir=r.Cb({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,t){1&e&&r.Tb("change",function(e){return t.onChange(e.target.checked)})("blur",function(){return t.onTouched()})},features:[r.wb([v])]}),e}(),y={provide:f,useExisting:Object(r.S)(function(){return b}),multi:!0},g=new r.q("CompositionEventMode"),b=function(){var e=function(){function e(t,n,r){var i;m(this,e),this._renderer=t,this._elementRef=n,this._compositionMode=r,this.onChange=function(e){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(i=Object(a.s)()?Object(a.s)().getUserAgent():"",!/android (\d+)/.test(i.toLowerCase())))}return l(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}},{key:"registerOnChange",value:function(e){this.onChange=e}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_handleInput",value:function(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}},{key:"_compositionStart",value:function(){this._composing=!0}},{key:"_compositionEnd",value:function(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(r.D),r.Hb(r.l),r.Hb(g,8))},e.\u0275dir=r.Cb({type:e,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(e,t){1&e&&r.Tb("input",function(e){return t._handleInput(e.target.value)})("blur",function(){return t.onTouched()})("compositionstart",function(){return t._compositionStart()})("compositionend",function(e){return t._compositionEnd(e.target.value)})},features:[r.wb([y])]}),e}();function _(e){return null==e||0===e.length}function k(e){return null!=e&&"number"==typeof e.length}var w=new r.q("NgValidators"),C=new r.q("NgAsyncValidators"),S=/^(?=.{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])?)*$/,E=function(){function e(){m(this,e)}return l(e,null,[{key:"min",value:function(e){return function(t){if(_(t.value)||_(e))return null;var n=parseFloat(t.value);return!isNaN(n)&&ne?{max:{max:e,actual:t.value}}:null}}},{key:"required",value:function(e){return _(e.value)?{required:!0}:null}},{key:"requiredTrue",value:function(e){return!0===e.value?null:{required:!0}}},{key:"email",value:function(e){return _(e.value)||S.test(e.value)?null:{email:!0}}},{key:"minLength",value:function(e){return function(t){return _(t.value)||!k(t.value)?null:t.value.lengthe?{maxlength:{requiredLength:e,actualLength:t.value.length}}:null}}},{key:"pattern",value:function(t){return t?("string"==typeof t?(r="","^"!==t.charAt(0)&&(r+="^"),r+=t,"$"!==t.charAt(t.length-1)&&(r+="$"),n=new RegExp(r)):(r=t.toString(),n=t),function(e){if(_(e.value))return null;var t=e.value;return n.test(t)?null:{pattern:{requiredPattern:r,actualValue:t}}}):e.nullValidator;var n,r}},{key:"nullValidator",value:function(e){return null}},{key:"compose",value:function(e){if(!e)return null;var t=e.filter(O);return 0==t.length?null:function(e){return x(A(e,t))}}},{key:"composeAsync",value:function(e){if(!e)return null;var t=e.filter(O);return 0==t.length?null:function(e){var n=A(e,t).map(T);return Object(s.a)(n).pipe(Object(c.a)(x))}}}]),e}();function O(e){return null!=e}function T(e){var t=Object(r.pb)(e)?Object(u.a)(e):e;return Object(r.ob)(t),t}function x(e){var t={};return e.forEach(function(e){t=null!=e?Object.assign(Object.assign({},t),e):t}),0===Object.keys(t).length?null:t}function A(e,t){return t.map(function(t){return t(e)})}function j(e){return e.map(function(e){return function(e){return!e.validate}(e)?e:function(t){return e.validate(t)}})}function P(e){return null!=e?E.compose(j(e)):null}function I(e){return null!=e?E.composeAsync(j(e)):null}function D(e,t){return null===e?[t]:Array.isArray(e)?[].concat(o(e),[t]):[e,t]}function R(e){return e._rawValidators}function N(e){return e._rawAsyncValidators}var L=function(){var e=function(){function e(){m(this,e),this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}return l(e,[{key:"_setValidators",value:function(e){this._rawValidators=e||[],this._composedValidatorFn=P(this._rawValidators)}},{key:"_setAsyncValidators",value:function(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=I(this._rawAsyncValidators)}},{key:"_registerOnDestroy",value:function(e){this._onDestroyCallbacks.push(e)}},{key:"_invokeOnDestroyCallbacks",value:function(){this._onDestroyCallbacks.forEach(function(e){return e()}),this._onDestroyCallbacks=[]}},{key:"reset",value:function(e){this.control&&this.control.reset(e)}},{key:"hasError",value:function(e,t){return!!this.control&&this.control.hasError(e,t)}},{key:"getError",value:function(e,t){return this.control?this.control.getError(e,t):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}},{key:"validator",get:function(){return this._composedValidatorFn||null}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn||null}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=r.Cb({type:e}),e}(),V=function(){var e=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(L);return e.\u0275fac=function(t){return M(t||e)},e.\u0275dir=r.Cb({type:e,features:[r.ub]}),e}(),M=r.Ob(V),F=function(e){h(n,e);var t=d(n);function n(){var e;return m(this,n),(e=t.apply(this,arguments))._parent=null,e.name=null,e.valueAccessor=null,e}return n}(L),H=function(){function e(t){m(this,e),this._cd=t}return l(e,[{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}}]),e}(),U=function(){var e=function(e){h(n,e);var t=d(n);function n(e){return m(this,n),t.call(this,e)}return n}(H);return e.\u0275fac=function(t){return new(t||e)(r.Hb(F,2))},e.\u0275dir=r.Cb({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,t){2&e&&r.zb("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[r.ub]}),e}(),q=function(){var e=function(e){h(n,e);var t=d(n);function n(e){return m(this,n),t.call(this,e)}return n}(H);return e.\u0275fac=function(t){return new(t||e)(r.Hb(V,2))},e.\u0275dir=r.Cb({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(e,t){2&e&&r.zb("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[r.ub]}),e}(),z={provide:f,useExisting:Object(r.S)(function(){return B}),multi:!0},B=function(){var e=function(){function e(t,n){m(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return l(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}},{key:"registerOnChange",value:function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(r.D),r.Hb(r.l))},e.\u0275dir=r.Cb({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,t){1&e&&r.Tb("input",function(e){return t.onChange(e.target.value)})("blur",function(){return t.onTouched()})},features:[r.wb([z])]}),e}(),Q={provide:f,useExisting:Object(r.S)(function(){return K}),multi:!0},W=function(){var e=function(){function e(){m(this,e),this._accessors=[]}return l(e,[{key:"add",value:function(e,t){this._accessors.push([e,t])}},{key:"remove",value:function(e){for(var t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)}},{key:"select",value:function(e){var t=this;this._accessors.forEach(function(n){t._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})}},{key:"_isSameGroup",value:function(e,t){return!!e[0].control&&e[0]._parent===t._control._parent&&e[1].name===t.name}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Db({token:e,factory:e.\u0275fac}),e}(),K=function(){var e=function(){function e(t,n,r,i){m(this,e),this._renderer=t,this._elementRef=n,this._registry=r,this._injector=i,this.onChange=function(){},this.onTouched=function(){}}return l(e,[{key:"ngOnInit",value:function(){this._control=this._injector.get(F),this._checkName(),this._registry.add(this._control,this)}},{key:"ngOnDestroy",value:function(){this._registry.remove(this)}},{key:"writeValue",value:function(e){this._state=e===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}},{key:"registerOnChange",value:function(e){var t=this;this._fn=e,this.onChange=function(){e(t.value),t._registry.select(t)}}},{key:"fireUncheck",value:function(e){this.writeValue(e)}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_checkName",value:function(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(r.D),r.Hb(r.l),r.Hb(W),r.Hb(r.r))},e.\u0275dir=r.Cb({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,t){1&e&&r.Tb("change",function(){return t.onChange()})("blur",function(){return t.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[r.wb([Q])]}),e}(),G={provide:f,useExisting:Object(r.S)(function(){return Z}),multi:!0},Z=function(){var e=function(){function e(t,n){m(this,e),this._renderer=t,this._elementRef=n,this.onChange=function(e){},this.onTouched=function(){}}return l(e,[{key:"writeValue",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(e))}},{key:"registerOnChange",value:function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(r.D),r.Hb(r.l))},e.\u0275dir=r.Cb({type:e,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,t){1&e&&r.Tb("change",function(e){return t.onChange(e.target.value)})("input",function(e){return t.onChange(e.target.value)})("blur",function(){return t.onTouched()})},features:[r.wb([G])]}),e}(),X={provide:f,useExisting:Object(r.S)(function(){return Y}),multi:!0};function J(e,t){return null==e?""+t:(t&&"object"==typeof t&&(t="Object"),"".concat(e,": ").concat(t).slice(0,50))}var Y=function(){var e=function(){function e(t,n){m(this,e),this._renderer=t,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=Object.is}return l(e,[{key:"writeValue",value:function(e){this.value=e;var t=this._getOptionId(e);null==t&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=J(t,e);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}},{key:"registerOnChange",value:function(e){var t=this;this.onChange=function(n){t.value=t._getOptionValue(n),e(t.value)}}},{key:"registerOnTouched",value:function(e){this.onTouched=e}},{key:"setDisabledState",value:function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}},{key:"_registerOption",value:function(){return(this._idCounter++).toString()}},{key:"_getOptionId",value:function(e){for(var t=0,n=Array.from(this._optionMap.keys());t-1)}}else t=function(e,t){e._setSelected(!1)};this._optionMap.forEach(t)}},{key:"registerOnChange",value:function(e){var t=this;this.onChange=function(n){var r=[];if(void 0!==n.selectedOptions)for(var i=n.selectedOptions,o=0;o0&&e.setValidators(r.filter(function(e){return e!==t.validator}))}if(null!==t.asyncValidator){var i=N(e);Array.isArray(i)&&i.length>0&&e.setAsyncValidators(i.filter(function(e){return e!==t.asyncValidator}))}}if(n){var o=function(){};ae(t._rawValidators,o),ae(t._rawAsyncValidators,o)}}function le(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function ce(e,t){se(e,t,!1)}function he(e,t){if(!e.hasOwnProperty("model"))return!1;var n=e.model;return!!n.isFirstChange()||!Object.is(t,n.currentValue)}var fe=[p,Z,B,Y,ne,K];function de(e,t){e._syncPendingControls(),t.forEach(function(e){var t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function ve(e,t){if(!t)return null;Array.isArray(t);var n=void 0,r=void 0,i=void 0;return t.forEach(function(e){var t;e.constructor===b?n=e:(t=e,fe.some(function(e){return t.constructor===e})?r=e:i=e)}),i||r||n||null}function pe(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}function ye(e){return(_e(e)?e.validators:e)||null}function ge(e){return Array.isArray(e)?P(e):e||null}function me(e,t){return(_e(t)?t.asyncValidators:e)||null}function be(e){return Array.isArray(e)?I(e):e||null}function _e(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var ke=function(){function e(t,n){m(this,e),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=n,this._composedValidatorFn=ge(this._rawValidators),this._composedAsyncValidatorFn=be(this._rawAsyncValidators)}return l(e,[{key:"setValidators",value:function(e){this._rawValidators=e,this._composedValidatorFn=ge(e)}},{key:"setAsyncValidators",value:function(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=be(e)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild(function(e){return e.markAllAsTouched()})}},{key:"markAsUntouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(e){e.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}},{key:"markAsDirty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}},{key:"markAsPristine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(e){e.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}},{key:"markAsPending",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status="PENDING",!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}},{key:"disable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._parentMarkedDirty(e.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(function(t){t.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(function(e){return e(!0)})}},{key:"enable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._parentMarkedDirty(e.onlySelf);this.status="VALID",this._forEachChild(function(t){t.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(function(e){return e(!1)})}},{key:"_updateAncestors",value:function(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(e){this._parent=e}},{key:"updateValueAndValidity",value:function(){var e=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(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}},{key:"_updateTreeValidity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild(function(t){return t._updateTreeValidity(e)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.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(e){var t=this;if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;var n=T(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){t._hasOwnPendingAsyncValidator=!1,t.setErrors(n,{emitEvent:e})})}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{key:"setErrors",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}},{key:"get",value:function(e){return function(e,t,n){if(null==t)return null;if(Array.isArray(t)||(t=t.split(".")),Array.isArray(t)&&0===t.length)return null;var r=e;return t.forEach(function(e){r=r instanceof Ce?r.controls.hasOwnProperty(e)?r.controls[e]:null:r instanceof Se&&r.at(e)||null}),r}(this,e)}},{key:"getError",value:function(e,t){var n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}},{key:"hasError",value:function(e,t){return!!this.getError(e,t)}},{key:"_updateControlsErrors",value:function(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}},{key:"_initObservables",value:function(){this.valueChanges=new r.n,this.statusChanges=new r.n}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}},{key:"_anyControlsHaveStatus",value:function(e){return this._anyControls(function(t){return t.status===e})}},{key:"_anyControlsDirty",value:function(){return this._anyControls(function(e){return e.dirty})}},{key:"_anyControlsTouched",value:function(){return this._anyControls(function(e){return e.touched})}},{key:"_updatePristine",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}},{key:"_updateTouched",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}},{key:"_isBoxedValue",value:function(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}},{key:"_registerOnCollectionChange",value:function(e){this._onCollectionChange=e}},{key:"_setUpdateStrategy",value:function(e){_e(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}},{key:"_parentMarkedDirty",value:function(e){return!e&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}},{key:"validator",get:function(){return this._composedValidatorFn},set:function(e){this._rawValidators=this._composedValidatorFn=e}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}},{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 e=this;e._parent;)e=e._parent;return e}}]),e}(),we=function(e){h(n,e);var t=d(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;return m(this,n),(e=t.call(this,ye(i),me(o,i)))._onChange=[],e._applyFormState(r),e._setUpdateStrategy(i),e._initObservables(),e.updateValueAndValidity({onlySelf:!0,emitEvent:!!o}),e}return l(n,[{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=e,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(function(e){return e(t.value,!1!==n.emitViewToModelChange)}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(e,t)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(e){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(e){this._onChange.push(e)}},{key:"_unregisterOnChange",value:function(e){pe(this._onChange,e)}},{key:"registerOnDisabledChange",value:function(e){this._onDisabledChange.push(e)}},{key:"_unregisterOnDisabledChange",value:function(e){pe(this._onDisabledChange,e)}},{key:"_forEachChild",value:function(e){}},{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(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}]),n}(ke),Ce=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,ye(r),me(i,r))).controls=e,o._initObservables(),o._setUpdateStrategy(r),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!!i}),o}return l(n,[{key:"registerControl",value:function(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}},{key:"addControl",value:function(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"removeControl",value:function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setControl",value:function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"contains",value:function(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(e),Object.keys(e).forEach(function(r){t._throwIfControlMissing(r),t.controls[r].setValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(e).forEach(function(r){t.controls[r]&&t.controls[r].patchValue(e[r],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,r){n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}},{key:"getRawValue",value:function(){return this._reduceChildren({},function(e,t,n){return e[n]=t instanceof we?t.value:t.getRawValue(),e})}},{key:"_syncPendingControls",value:function(){var e=this._reduceChildren(!1,function(e,t){return!!t._syncPendingControls()||e});return e&&this.updateValueAndValidity({onlySelf:!0}),e}},{key:"_throwIfControlMissing",value:function(e){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[e])throw new Error("Cannot find form control with name: ".concat(e,"."))}},{key:"_forEachChild",value:function(e){var t=this;Object.keys(this.controls).forEach(function(n){return e(t.controls[n],n)})}},{key:"_setUpControls",value:function(){var e=this;this._forEachChild(function(t){t.setParent(e),t._registerOnCollectionChange(e._onCollectionChange)})}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(e){for(var t=0,n=Object.keys(this.controls);t0||this.disabled}},{key:"_checkAllValuesPresent",value:function(e){this._forEachChild(function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control with name: '".concat(n,"'."))})}}]),n}(ke),Se=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,ye(r),me(i,r))).controls=e,o._initObservables(),o._setUpdateStrategy(r),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!!i}),o}return l(n,[{key:"at",value:function(e){return this.controls[e]}},{key:"push",value:function(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"insert",value:function(e,t){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity()}},{key:"removeAt",value:function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),this.updateValueAndValidity()}},{key:"setControl",value:function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(e),e.forEach(function(e,r){t._throwIfControlMissing(r),t.at(r).setValue(e,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(function(e,r){t.at(r)&&t.at(r).patchValue(e,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,r){n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}},{key:"getRawValue",value:function(){return this.controls.map(function(e){return e instanceof we?e.value:e.getRawValue()})}},{key:"clear",value:function(){this.controls.length<1||(this._forEachChild(function(e){return e._registerOnCollectionChange(function(){})}),this.controls.splice(0),this.updateValueAndValidity())}},{key:"_syncPendingControls",value:function(){var e=this.controls.reduce(function(e,t){return!!t._syncPendingControls()||e},!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}},{key:"_throwIfControlMissing",value:function(e){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(e))throw new Error("Cannot find form control at index "+e)}},{key:"_forEachChild",value:function(e){this.controls.forEach(function(t,n){e(t,n)})}},{key:"_updateValue",value:function(){var e=this;this.value=this.controls.filter(function(t){return t.enabled||e.disabled}).map(function(e){return e.value})}},{key:"_anyControls",value:function(e){return this.controls.some(function(t){return t.enabled&&e(t)})}},{key:"_setUpControls",value:function(){var e=this;this._forEachChild(function(t){return e._registerControl(t)})}},{key:"_checkAllValuesPresent",value:function(e){this._forEachChild(function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control at index: ".concat(n,"."))})}},{key:"_allControlsDisabled",value:function(){var e,t=i(this.controls);try{for(t.s();!(e=t.n()).done;){if(e.value.enabled)return!1}}catch(n){t.e(n)}finally{t.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}},{key:"length",get:function(){return this.controls.length}}]),n}(ke),Ee={provide:V,useExisting:Object(r.S)(function(){return Te})},Oe=Promise.resolve(null),Te=function(){var e=function(e){h(n,e);var t=d(n);function n(e,i){var o;return m(this,n),(o=t.call(this)).submitted=!1,o._directives=[],o.ngSubmit=new r.n,o.form=new Ce({},P(e),I(i)),o}return l(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"addControl",value:function(e){var t=this;Oe.then(function(){var n=t._findContainer(e.path);e.control=n.registerControl(e.name,e.control),oe(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),t._directives.push(e)})}},{key:"getControl",value:function(e){return this.form.get(e.path)}},{key:"removeControl",value:function(e){var t=this;Oe.then(function(){var n=t._findContainer(e.path);n&&n.removeControl(e.name),pe(t._directives,e)})}},{key:"addFormGroup",value:function(e){var t=this;Oe.then(function(){var n=t._findContainer(e.path),r=new Ce({});ce(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}},{key:"removeFormGroup",value:function(e){var t=this;Oe.then(function(){var n=t._findContainer(e.path);n&&n.removeControl(e.name)})}},{key:"getFormGroup",value:function(e){return this.form.get(e.path)}},{key:"updateModel",value:function(e,t){var n=this;Oe.then(function(){n.form.get(e.path).setValue(t)})}},{key:"setValue",value:function(e){this.control.setValue(e)}},{key:"onSubmit",value:function(e){return this.submitted=!0,de(this.form,this._directives),this.ngSubmit.emit(e),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(e){this.form.reset(e),this.submitted=!1}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}},{key:"_findContainer",value:function(e){return e.pop(),e.length?this.form.get(e):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}(V);return e.\u0275fac=function(t){return new(t||e)(r.Hb(w,10),r.Hb(C,10))},e.\u0275dir=r.Cb({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,t){1&e&&r.Tb("submit",function(e){return t.onSubmit(e)})("reset",function(){return t.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.wb([Ee]),r.ub]}),e}(),xe={provide:F,useExisting:Object(r.S)(function(){return je})},Ae=Promise.resolve(null),je=function(){var e=function(e){h(n,e);var t=d(n);function n(e,i,o,a){var s;return m(this,n),(s=t.call(this)).control=new we,s._registered=!1,s.update=new r.n,s._parent=e,s._setValidators(i),s._setAsyncValidators(o),s.valueAccessor=ve(0,a),s}return l(n,[{key:"ngOnChanges",value:function(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),he(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(e){this.viewModel=e,this.update.emit(e)}},{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(){oe(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}},{key:"_checkForErrors",value:function(){this._isStandalone()||this._checkParentType(),this._checkName()}},{key:"_checkParentType",value:function(){}},{key:"_checkName",value:function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}},{key:"_updateValue",value:function(e){var t=this;Ae.then(function(){t.control.setValue(e,{emitViewToModelChange:!1})})}},{key:"_updateDisabled",value:function(e){var t=this,n=e.isDisabled.currentValue,r=""===n||n&&"false"!==n;Ae.then(function(){r&&!t.control.disabled?t.control.disable():!r&&t.control.disabled&&t.control.enable()})}},{key:"path",get:function(){return this._parent?ie(this.name,this._parent):[this.name]}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}}]),n}(F);return e.\u0275fac=function(t){return new(t||e)(r.Hb(V,9),r.Hb(w,10),r.Hb(C,10),r.Hb(f,10))},e.\u0275dir=r.Cb({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[r.wb([xe]),r.ub,r.vb]}),e}(),Pe=function(){var e=function e(){m(this,e)};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=r.Cb({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),e}(),Ie=new r.q("NgModelWithFormControlWarning"),De={provide:V,useExisting:Object(r.S)(function(){return Re})},Re=function(){var e=function(e){h(n,e);var t=d(n);function n(e,i){var o;return m(this,n),(o=t.call(this)).validators=e,o.asyncValidators=i,o.submitted=!1,o.directives=[],o.form=null,o.ngSubmit=new r.n,o._setValidators(e),o._setAsyncValidators(i),o}return l(n,[{key:"ngOnChanges",value:function(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}},{key:"addControl",value:function(e){var t=this.form.get(e.path);return oe(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}},{key:"getControl",value:function(e){return this.form.get(e.path)}},{key:"removeControl",value:function(e){pe(this.directives,e)}},{key:"addFormGroup",value:function(e){var t=this.form.get(e.path);ce(t,e),t.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormGroup",value:function(e){}},{key:"getFormGroup",value:function(e){return this.form.get(e.path)}},{key:"addFormArray",value:function(e){var t=this.form.get(e.path);ce(t,e),t.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormArray",value:function(e){}},{key:"getFormArray",value:function(e){return this.form.get(e.path)}},{key:"updateModel",value:function(e,t){this.form.get(e.path).setValue(t)}},{key:"onSubmit",value:function(e){return this.submitted=!0,de(this.form,this.directives),this.ngSubmit.emit(e),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(e){this.form.reset(e),this.submitted=!1}},{key:"_updateDomValue",value:function(){var e=this;this.directives.forEach(function(t){var n=e.form.get(t.path);t.control!==n&&(function(e,t){var n=function(){};t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n),ue(e,t,!0),e&&(t._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(function(){}))}(t.control||null,t),n&&oe(n,t),t.control=n)}),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_updateRegistrations",value:function(){var e=this;this.form._registerOnCollectionChange(function(){return e._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){})}},{key:"_updateValidators",value:function(){se(this.form,this,!1),this._oldForm&&ue(this._oldForm,this,!1)}},{key:"_checkFormPresent",value:function(){}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}}]),n}(V);return e.\u0275fac=function(t){return new(t||e)(r.Hb(w,10),r.Hb(C,10))},e.\u0275dir=r.Cb({type:e,selectors:[["","formGroup",""]],hostBindings:function(e,t){1&e&&r.Tb("submit",function(e){return t.onSubmit(e)})("reset",function(){return t.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[r.wb([De]),r.ub,r.vb]}),e}(),Ne={provide:F,useExisting:Object(r.S)(function(){return Le})},Le=function(){var e=function(e){h(n,e);var t=d(n);function n(e,i,o,a,s){var u;return m(this,n),(u=t.call(this))._ngModelWarningConfig=s,u._added=!1,u.update=new r.n,u._ngModelWarningSent=!1,u._parent=e,u._setValidators(i),u._setAsyncValidators(o),u.valueAccessor=ve(0,a),u}return l(n,[{key:"ngOnChanges",value:function(e){var t,i;this._added||this._setUpControl(),he(e,this.viewModel)&&(t=n,i=this._ngModelWarningConfig,Object(r.T)()&&"never"!==i&&((null!==i&&"once"!==i||t._ngModelWarningSentOnce)&&("always"!==i||this._ngModelWarningSent)||(t._ngModelWarningSentOnce=!0,this._ngModelWarningSent=!0)),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(e){this.viewModel=e,this.update.emit(e)}},{key:"_checkParentType",value:function(){}},{key:"_setUpControl",value:function(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}},{key:"isDisabled",set:function(e){}},{key:"path",get:function(){return ie(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}}]),n}(F);return e.\u0275fac=function(t){return new(t||e)(r.Hb(V,13),r.Hb(w,10),r.Hb(C,10),r.Hb(f,10),r.Hb(Ie,8))},e.\u0275dir=r.Cb({type:e,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[r.wb([Ne]),r.ub,r.vb]}),e._ngModelWarningSentOnce=!1,e}(),Ve=function(){var e=function e(){m(this,e)};return e.\u0275mod=r.Fb({type:e}),e.\u0275inj=r.Eb({factory:function(t){return new(t||e)}}),e}(),Me=function(){var e=function(){function e(){m(this,e)}return l(e,[{key:"group",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this._reduceControls(e),r=null,i=null,o=void 0;return null!=t&&(function(e){return void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn}(t)?(r=null!=t.validators?t.validators:null,i=null!=t.asyncValidators?t.asyncValidators:null,o=null!=t.updateOn?t.updateOn:void 0):(r=null!=t.validator?t.validator:null,i=null!=t.asyncValidator?t.asyncValidator:null)),new Ce(n,{asyncValidators:i,updateOn:o,validators:r})}},{key:"control",value:function(e,t,n){return new we(e,t,n)}},{key:"array",value:function(e,t,n){var r=this,i=e.map(function(e){return r._createControl(e)});return new Se(i,t,n)}},{key:"_reduceControls",value:function(e){var t=this,n={};return Object.keys(e).forEach(function(r){n[r]=t._createControl(e[r])}),n}},{key:"_createControl",value:function(e){return e instanceof we||e instanceof Ce||e instanceof Se?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Db({token:e,factory:e.\u0275fac}),e}(),Fe=function(){var e=function e(){m(this,e)};return e.\u0275mod=r.Fb({type:e}),e.\u0275inj=r.Eb({factory:function(t){return new(t||e)},providers:[W],imports:[Ve]}),e}(),He=function(){var e=function(){function e(){m(this,e)}return l(e,null,[{key:"withConfig",value:function(t){return{ngModule:e,providers:[{provide:Ie,useValue:t.warnOnNgModelWithFormControl}]}}}]),e}();return e.\u0275mod=r.Fb({type:e}),e.\u0275inj=r.Eb({factory:function(t){return new(t||e)},providers:[Me,W],imports:[Ve]}),e}()},"44N4":function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r=n("fXoL"),i=n("1F7/"),o=n("ofXK"),a=function(e){return{"font-size":e}};function s(e,t){if(1&e){var n=r.Nb();r.Mb(0,"div",4),r.Mb(1,"label",5),r.oc(2),r.Lb(),r.Mb(3,"button",6),r.Tb("click",function(){return r.hc(n),r.Vb().close()}),r.oc(4,"\u2716"),r.Lb(),r.Lb()}if(2&e){var i=r.Vb();r.xb(1),r.ac("ngStyle",r.dc(2,a,i.modalTitle.length>20?"2.2vh":"3vh")),r.xb(1),r.pc(i.modalTitle)}}var u=function(e){return{"z-index":e}},c=["*"],h=function(){var e=function(){function e(t,n){var r=this;m(this,e),this._modalService=t,this._el=n,this.id="",this.modalTitle="",this.showHeader=!0,this.scrollable=!0,this.zIndex=1,this.applyStyling=function(){return"".concat(!r.modalBodyStyle&&"modal-body-height modal-body-width modal-body-margin"," ").concat(r.scrollable&&"scroll")},this.keyDownEvent=function(e){var t=e.key;"modal-create-project"!==r.id&&"modal-import-project"!==r.id&&"Escape"===t&&r.close()},this.element=this._el.nativeElement}return l(e,[{key:"ngOnInit",value:function(){1!==this.zIndex&&(this.modalBodyStyle.zIndex=(2e3*this.zIndex).toString()),this.id?(this._modalService.add(this),this.close()):console.error("modal must have an id")}},{key:"ngOnDestroy",value:function(){this._modalService.remove(this.id),this.element.remove()}},{key:"open",value:function(){this.element.style.display="block",document.body.classList.add("modal-open")}},{key:"close",value:function(){this.element.style.display="none",document.body.classList.remove("modal-open")}}]),e}();return e.\u0275fac=function(t){return new(t||e)(r.Hb(i.a),r.Hb(r.l))},e.\u0275cmp=r.Bb({type:e,selectors:[["modal"]],hostBindings:function(e,t){1&e&&r.Tb("keydown",function(e){return t.keyDownEvent(e)},!1,r.gc)},inputs:{id:"id",modalBodyStyle:"modalBodyStyle",modalTitle:"modalTitle",showHeader:"showHeader",scrollable:"scrollable",zIndex:"zIndex"},ngContentSelectors:c,decls:5,vars:6,consts:[[1,"modal"],[1,"modal-body",3,"ngStyle","ngClass"],["class","modal-header-container",4,"ngIf"],[1,"modal-background",3,"ngStyle","click"],[1,"modal-header-container"],[2,"text-indent","0.5vw","padding-left","0.2vw",3,"ngStyle"],[1,"modal-button","close-button","float-right",3,"click"]],template:function(e,t){1&e&&(r.Zb(),r.Mb(0,"div",0),r.Mb(1,"div",1),r.mc(2,s,5,4,"div",2),r.Yb(3),r.Lb(),r.Lb(),r.Mb(4,"div",3),r.Tb("click",function(){return t.close()}),r.Lb()),2&e&&(r.xb(1),r.ac("ngStyle",t.modalBodyStyle)("ngClass",t.applyStyling()),r.xb(1),r.ac("ngIf",t.showHeader),r.xb(2),r.ac("ngStyle",r.dc(4,u,1e3*t.zIndex)))},directives:[o.l,o.i,o.k],styles:[".modal{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;display:flex;justify-content:center}.modal-body{border-radius:1vw;padding:1.5vw;background:#262a2e;color:#fff;position:absolute;z-index:2000}.modal-body-height{min-height:75%;max-height:80%}.modal-body-width{min-width:50%;max-width:50%}.modal-header-container{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.modal-button,.modal-header-container{font-size:1vw;padding:.5vw;background:#262a2e;color:azure}.modal-button{line-height:1vh}.close-button{border:none;cursor:pointer}.float-right{float:right}.modal-body-margin{left:25%;top:10%}.scroll{overflow-y:auto}.scroll::-webkit-scrollbar-track{box-shadow:inset 0 0 6px rgba(0,0,0,.3);border-radius:10px}.scroll::-webkit-scrollbar{width:.5vw}.scroll::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:#525353}.modal-background{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.75}body.modal-open{overflow:hidden}"],encapsulation:2}),e}()},"4I5i":function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}()},"5+tZ":function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n("lJxs"),i=n("Cfvw"),o=n("zx2A");function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof t?function(o){return o.pipe(a(function(n,o){return Object(i.a)(e(n,o)).pipe(Object(r.a)(function(e,r){return t(n,e,o,r)}))},n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new s(e,n))})}var s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;m(this,e),this.project=t,this.concurrent=n}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new u(e,this.project,this.concurrent))}}]),e}(),u=function(e){h(n,e);var t=d(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return m(this,n),(i=t.call(this,e)).project=r,i.concurrent=o,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return l(n,[{key:"_next",value:function(e){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(o.b)},"7o/Q":function(e,t,n){"use strict";n.d(t,"a",function(){return f});var r=n("n6bG"),i=n("gRHU"),o=n("quSY"),a=n("2QA8"),s=n("2fFW"),u=n("NJ4a"),f=function(e){h(n,e);var t=d(n);function n(e,r,o){var a;switch(m(this,n),(a=t.call(this)).syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=i.a;break;case 1:if(!e){a.destination=i.a;break}if("object"==typeof e){e instanceof n?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(p(a))):(a.syncErrorThrowable=!0,a.destination=new v(p(a),e));break}default:a.syncErrorThrowable=!0,a.destination=new v(p(a),e,r,o)}return a}return l(n,[{key:a.a,value:function(){return this}},{key:"next",value:function(e){this.isStopped||this._next(e)}},{key:"error",value:function(e){this.isStopped||(this.isStopped=!0,this._error(e))}},{key:"complete",value:function(){this.isStopped||(this.isStopped=!0,this._complete())}},{key:"unsubscribe",value:function(){this.closed||(this.isStopped=!0,c(g(n.prototype),"unsubscribe",this).call(this))}},{key:"_next",value:function(e){this.destination.next(e)}},{key:"_error",value:function(e){this.destination.error(e),this.unsubscribe()}},{key:"_complete",value:function(){this.destination.complete(),this.unsubscribe()}},{key:"_unsubscribeAndRecycle",value:function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}],[{key:"create",value:function(e,t,r){var i=new n(e,t,r);return i.syncErrorThrowable=!1,i}}]),n}(o.a),v=function(e){h(n,e);var t=d(n);function n(e,o,a,s){var u,l;m(this,n),(u=t.call(this))._parentSubscriber=e;var c=p(u);return Object(r.a)(o)?l=o:o&&(l=o.next,a=o.error,s=o.complete,o!==i.a&&(c=Object.create(o),Object(r.a)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(p(u)))),u._context=c,u._next=l,u._error=a,u._complete=s,u}return l(n,[{key:"next",value:function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;s.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}},{key:"error",value:function(e){if(!this.isStopped){var t=this._parentSubscriber,n=s.a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):Object(u.a)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;Object(u.a)(e)}}}},{key:"complete",value:function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};s.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}},{key:"__tryOrUnsub",value:function(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),s.a.useDeprecatedSynchronousErrorHandling)throw n;Object(u.a)(n)}}},{key:"__tryOrSetError",value:function(e,t,n){if(!s.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(r){return s.a.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=r,e.syncErrorThrown=!0,!0):(Object(u.a)(r),!0)}return!1}},{key:"_unsubscribe",value:function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}]),n}(f)},"9ppp":function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}()},Cfvw:function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r=n("HDdC"),i=n("SeVD"),o=n("quSY"),a=n("kJWO"),s=n("jZKg"),u=n("Lhse"),l=n("c2HN"),c=n("I55L");function h(e,t){return t?function(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[a.a]}(e))return function(e,t){return new r.a(function(n){var r=new o.a;return r.add(t.schedule(function(){var i=e[a.a]();r.add(i.subscribe({next:function(e){r.add(t.schedule(function(){return n.next(e)}))},error:function(e){r.add(t.schedule(function(){return n.error(e)}))},complete:function(){r.add(t.schedule(function(){return n.complete()}))}}))})),r})}(e,t);if(Object(l.a)(e))return function(e,t){return new r.a(function(n){var r=new o.a;return r.add(t.schedule(function(){return e.then(function(e){r.add(t.schedule(function(){n.next(e),r.add(t.schedule(function(){return n.complete()}))}))},function(e){r.add(t.schedule(function(){return n.error(e)}))})})),r})}(e,t);if(Object(c.a)(e))return Object(s.a)(e,t);if(function(e){return e&&"function"==typeof e[u.a]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new r.a(function(n){var r,i=new o.a;return i.add(function(){r&&"function"==typeof r.return&&r.return()}),i.add(t.schedule(function(){r=e[u.a](),i.add(t.schedule(function(){if(!n.closed){var e,t;try{var i=r.next();e=i.value,t=i.done}catch(o){return void n.error(o)}t?n.complete():(n.next(e),this.schedule())}}))})),i})}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}(e,t):e instanceof r.a?e:new r.a(Object(i.a)(e))}},DH7j:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=Array.isArray||function(e){return e&&"number"==typeof e.length}},EY2u:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o});var r=n("HDdC"),i=new r.a(function(e){return e.complete()});function o(e){return e?function(e){return new r.a(function(t){return e.schedule(function(){return t.complete()})})}(e):i}},F7l1:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("2Vo4"),i=n("fXoL"),o=function(){var e=function(){function e(){m(this,e),this.toggleSpinnerSubject=new r.a(!1)}return l(e,[{key:"returnAsObservable",value:function(){return this.toggleSpinnerSubject.asObservable()}},{key:"showSpinner",value:function(){this.toggleSpinnerSubject.next(!0)}},{key:"hideSpinner",value:function(){this.toggleSpinnerSubject.next(!1)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},GyhO:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("LRne"),i=n("0EUg");function o(){return Object(i.a)()(Object(r.a).apply(void 0,arguments))}},HDdC:function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r,i=n("7o/Q"),o=n("2QA8"),a=n("gRHU"),s=n("kJWO"),u=n("SpAZ"),c=n("2fFW"),h=((r=function(){function e(t){m(this,e),this._isScalar=!1,t&&(this._subscribe=t)}return l(e,[{key:"lift",value:function(t){var n=new e;return n.source=this,n.operator=t,n}},{key:"subscribe",value:function(e,t,n){var r=this.operator,s=function(e,t,n){if(e){if(e instanceof i.a)return e;if(e[o.a])return e[o.a]()}return e||t||n?new i.a(e,t,n):new i.a(a.a)}(e,t,n);if(s.add(r?r.call(s,this.source):this.source||c.a.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),c.a.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}},{key:"_trySubscribe",value:function(e){try{return this._subscribe(e)}catch(t){c.a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&r instanceof i.a?r:null}return!0}(e)?e.error(t):console.warn(t)}}},{key:"forEach",value:function(e,t){var n=this;return new(t=f(t))(function(t,r){var i;i=n.subscribe(function(t){try{e(t)}catch(n){r(n),i&&i.unsubscribe()}},r,t)})}},{key:"_subscribe",value:function(e){var t=this.source;return t&&t.subscribe(e)}},{key:s.a,value:function(){return this}},{key:"pipe",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n2?e.slice(-2):e;this.languageSubject.next(t),localStorage.setItem("language",t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(o.Qb(a.d))},e.\u0275prov=o.Db({token:e,factory:e.\u0275fac,providedIn:"root"}),e}()},IjjT:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=function(){var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.now;m(this,e),this.SchedulerAction=t,this.now=n}return l(e,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,e).schedule(n,t)}}]),e}();return e.now=function(){return Date.now()},e}(),i=function(e){h(n,e);var t=d(n);function n(e){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.now;return m(this,n),(i=t.call(this,e,function(){return n.delegate&&n.delegate!==p(i)?n.delegate.now():o()})).actions=[],i.active=!1,i.scheduled=void 0,i}return l(n,[{key:"schedule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(e,t,r):c(g(n.prototype),"schedule",this).call(this,e,t,r)}},{key:"flush",value:function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}}}]),n}(r)},IzEk:function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n("7o/Q"),i=n("4I5i"),o=n("EY2u");function a(e){return function(t){return 0===e?Object(o.b)():t.lift(new s(e))}}var s=function(){function e(t){if(m(this,e),this.total=t,this.total<0)throw new i.a}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new u(e,this.total))}}]),e}(),u=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).total=r,i.count=0,i}return l(n,[{key:"_next",value:function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))}}]),n}(r.a)},"KZX/":function(e,t,n){"use strict";n.d(t,"a",function(){return x});var r,i,o,a,s,u,c=n("ofXK"),h=n("sYmb"),f=n("RKnZ"),d=n("fXoL"),v=((o=function e(){m(this,e)}).\u0275mod=d.Fb({type:o}),o.\u0275inj=d.Eb({factory:function(e){return new(e||o)},imports:[[c.b,h.b,f.a]]}),o),p=((i=function e(){m(this,e)}).\u0275mod=d.Fb({type:i}),i.\u0275inj=d.Eb({factory:function(e){return new(e||i)},imports:[[c.b]]}),i),y=((r=function(){function e(){m(this,e)}return l(e,[{key:"intercept",value:function(e,t){var n=e.clone({setHeaders:{"Cache-Control":"no-cache",Pragma:"no-cache"}});return t.handle(n)}}]),e}()).\u0275fac=function(e){return new(e||r)},r.\u0275prov=d.Db({token:r,factory:r.\u0275fac}),r),g=n("3Pt+"),b=n("tk/3"),_=n("I7yr"),k=n("vkgz"),w=n("F7l1"),C=((a=function(){function e(t){m(this,e),this._spinner=t,this.pendingRequestsCount=0}return l(e,[{key:"intercept",value:function(e,t){var n=this;return this.pendingRequestsCount++,this._spinner.showSpinner(),t.handle(e).pipe(Object(k.a)(function(e){if(e instanceof b.e){n.pendingRequestsCount--;var t=e.url?e.url.toString().split("/"):"";0===n.pendingRequestsCount&&"importstatus"!==t[t.length-1]&&"folders"!==t[t.length-1]&&"labelfiles"!==t[t.length-1]&&n._spinner.hideSpinner()}},function(e){e instanceof b.d&&(n.pendingRequestsCount--,n._spinner.hideSpinner())}))}}]),e}()).\u0275fac=function(e){return new(e||a)(d.Qb(w.a))},a.\u0275prov=d.Db({token:a,factory:a.\u0275fac}),a),S=n("O+1G"),E=((s=function e(){m(this,e)}).\u0275mod=d.Fb({type:s}),s.\u0275inj=d.Eb({factory:function(e){return new(e||s)},imports:[[c.b]]}),s),O=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/assets/i18n/",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".json";m(this,e),this.http=t,this.prefix=n,this.suffix=r}return l(e,[{key:"getTranslation",value:function(e){return this.http.get("".concat(this.prefix).concat(e).concat(this.suffix))}}]),e}(),T=function(e){return new O(e,"../assets/i18n/",".json")},x=((u=function e(){m(this,e)}).\u0275mod=d.Fb({type:u}),u.\u0275inj=d.Eb({factory:function(e){return new(e||u)},providers:[_.a,{provide:b.a,useClass:y,multi:!0},{provide:b.a,useClass:C,multi:!0}],imports:[[c.b,g.e,g.k,f.a,v,E,p,S.a,h.b.forRoot({loader:{provide:h.a,useFactory:T,deps:[b.b]}})],f.a,v,E,p,S.a,g.e,g.k,h.b]}),u)},LRne:function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n("z+Ro"),i=n("yCtX"),o=n("jZKg");function a(){for(var e=arguments.length,t=new Array(e),n=0;n=2;return function(l){return l.pipe(e?Object(i.a)(function(t,n){return e(t,n,l)}):u.a,Object(o.a)(1),n?Object(a.a)(t):Object(s.a)(function(){return new r.a}))}}},XDbj:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("sVev"),i=n("7o/Q");function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u;return function(t){return t.lift(new a(e))}}var a=function(){function e(t){m(this,e),this.errorFactory=t}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new s(e,this.errorFactory))}}]),e}(),s=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).errorFactory=r,i.hasValue=!1,i}return l(n,[{key:"_next",value:function(e){this.hasValue=!0,this.destination.next(e)}},{key:"_complete",value:function(){if(this.hasValue)return this.destination.complete();var e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}]),n}(i.a);function u(){return new r.a}},XNiG:function(e,t,n){"use strict";n.d(t,"b",function(){return f}),n.d(t,"a",function(){return v});var r=n("HDdC"),i=n("7o/Q"),o=n("quSY"),a=n("9ppp"),s=n("Ylt2"),u=n("2QA8"),f=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this,e)).destination=e,r}return n}(i.a),v=function(){var e=function(e){h(n,e);var t=d(n);function n(){var e;return m(this,n),(e=t.call(this)).observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return l(n,[{key:u.a,value:function(){return new f(this)}},{key:"lift",value:function(e){var t=new p(this,this);return t.operator=e,t}},{key:"next",value:function(e){if(this.closed)throw new a.a;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return Object(r.a)(i.a,e)}},bOdf:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n("5+tZ");function i(e,t){return Object(r.a)(e,t,1)}},c2HN:function(e,t,n){"use strict";function r(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}n.d(t,"a",function(){return r})},cp0P:function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n("HDdC"),i=n("DH7j"),a=n("lJxs"),s=n("XoHu"),u=n("Cfvw");function l(){for(var e=arguments.length,t=new Array(e),n=0;n1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null}}]),n}(k.a),O=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this)).source=e,i.subjectFactory=r,i._refCount=0,i._isComplete=!1,i}return l(n,[{key:"_subscribe",value:function(e){return this.getSubject().subscribe(e)}},{key:"getSubject",value:function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject}},{key:"connect",value:function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new f.a).add(this.source.subscribe(new x(this.getSubject(),this))),e.closed&&(this._connection=null,e=f.a.EMPTY)),e}},{key:"refCount",value:function(){return w()(this)}}]),n}(v.a),T={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:(C=O.prototype)._subscribe},_isComplete:{value:C._isComplete,writable:!0},getSubject:{value:C.getSubject},connect:{value:C.connect},refCount:{value:C.refCount}},x=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).connectable=r,i}return l(n,[{key:"_error",value:function(e){this._unsubscribe(),c(g(n.prototype),"_error",this).call(this,e)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),c(g(n.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}]),n}(u.b);function A(){return new u.a}function j(e){return{toString:e}.toString()}function P(e,t,n){return j(function(){var i=function(e){return function(){if(e){var t=e.apply(void 0,arguments);for(var n in t)this[n]=t[n]}}}(t);function o(){for(var e=arguments.length,t=new Array(e),n=0;n=e.length?e.push(n):e.splice(t,0,n)}function he(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function fe(e,t){for(var n=[],r=0;r=0?e[1|r]=n:function(e,t,n,r){var i=e.length;if(i==t)e.push(n,r);else if(1===i)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;)e[i]=e[i-2],i--;e[t]=n,e[t+1]=r}}(e,r=~r,t,n),r}function ve(e,t){var n=pe(e,t);if(n>=0)return e[1|n]}function pe(e,t){return function(e,t,n){for(var r=0,i=e.length>>1;i!==r;){var o=r+(i-r>>1),a=e[o<<1];if(t===a)return o<<1;a>t?i=o:r=o+1}return~(i<<1)}(e,t)}var ye,ge=((ye={})[ye.Emulated=0]="Emulated",ye[ye.None=2]="None",ye[ye.ShadowDom=3]="ShadowDom",ye),me={},be=[],_e=M({"\u0275cmp":M}),ke=M({"\u0275dir":M}),we=M({"\u0275pipe":M}),Ce=M({"\u0275mod":M}),Se=M({"\u0275loc":M}),Ee=M({"\u0275fac":M}),Oe=M({__NG_ELEMENT_ID__:M}),Te=0;function xe(e){return j(function(){var t={},n={type:e.type,providersResolver:null,decls:e.decls,vars:e.vars,factory:null,template:e.template||null,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:e.exportAs||null,onPush:e.changeDetection===J.OnPush,directiveDefs:null,pipeDefs:null,selectors:e.selectors||be,viewQuery:e.viewQuery||null,features:e.features||null,data:e.data||{},encapsulation:e.encapsulation||ge.Emulated,id:"c",styles:e.styles||be,_:null,setInput:null,schemas:e.schemas||null,tView:null},r=e.directives,i=e.features,o=e.pipes;return n.id+=Te++,n.inputs=Re(e.inputs,t),n.outputs=Re(e.outputs),i&&i.forEach(function(e){return e(n)}),n.directiveDefs=r?function(){return("function"==typeof r?r():r).map(Ae)}:null,n.pipeDefs=o?function(){return("function"==typeof o?o():o).map(je)}:null,n})}function Ae(e){return Ve(e)||function(e){return e[ke]||null}(e)}function je(e){return function(e){return e[we]||null}(e)}var Pe={};function Ie(e){var t={type:e.type,bootstrap:e.bootstrap||be,declarations:e.declarations||be,imports:e.imports||be,exports:e.exports||be,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null};return null!=e.id&&j(function(){Pe[e.id]=e.type}),t}function De(e,t){return j(function(){var n=Me(e,!0);n.declarations=t.declarations||be,n.imports=t.imports||be,n.exports=t.exports||be})}function Re(e,t){if(null==e)return me;var n={};for(var r in e)if(e.hasOwnProperty(r)){var i=e[r],o=i;Array.isArray(i)&&(o=i[1],i=i[0]),n[i]=r,t&&(t[i]=o)}return n}var Ne=xe;function Le(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,onDestroy:e.type.prototype.ngOnDestroy||null}}function Ve(e){return e[_e]||null}function Me(e,t){var n=e[Ce]||null;if(!n&&!0===t)throw new Error("Type ".concat(L(e)," does not have '\u0275mod' property."));return n}function Fe(e){return"string"==typeof e?e:null==e?"":""+e}function He(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():Fe(e)}var Ue,qe=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}({});function ze(e){var t=Ue;return Ue=e,t}function Be(e,t,n){var r=q(e);if(r&&"root"==r.providedIn)return void 0===r.value?r.value=r.factory():r.value;if(n&qe.Optional)return null;if(void 0!==t)return t;throw new Error("Injector: NOT_FOUND [".concat(L(e),"]"))}var Qe={},We=/\n/gm,Ke=M({provide:String,useValue:M}),Ge=void 0;function Ze(e){var t=Ge;return Ge=e,t}function Xe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qe.Default;if(void 0===Ge)throw new Error("inject() must be called from an injection context");return null===Ge?Be(e,void 0,t):Ge.get(e,t&qe.Optional?null:void 0,t)}function Je(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:qe.Default;return(Ue||Xe)(oe(e),t)}function Ye(e){for(var t=[],n=0;n"),!0}},{key:"endElement",value:function(e){var t=e.nodeName.toLowerCase();Pn.hasOwnProperty(t)&&!Tn.hasOwnProperty(t)&&(this.buf.push(""))}},{key:"chars",value:function(e){this.buf.push(Fn(e))}},{key:"checkClobberedElement",value:function(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t}}]),e}(),Vn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Mn=/([^\#-~ |!])/g;function Fn(e){return e.replace(/&/g,"&").replace(Vn,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(Mn,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}function Hn(e,t){var n=null;try{On=On||function(e){return function(){try{return!!(new window.DOMParser).parseFromString($t(""),"text/html")}catch(e){return!1}}()?new bn:new _n(e)}(e);var r=t?String(t):"";n=On.getInertBodyElement(r);var i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=On.getInertBodyElement(r)}while(r!==o);var a=new Ln,s=a.sanitizeChildren(Un(n)||n);return gn()&&a.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),s}finally{if(n)for(var u=Un(n)||n;u.firstChild;)u.removeChild(u.firstChild)}}function Un(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var qn=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}({});function zn(e){var t=Qn();return t?t.sanitize(qn.HTML,e)||"":un(e,"HTML")?sn(e):Hn(tt(),Fe(e))}function Bn(e){var t=Qn();return t?t.sanitize(qn.URL,e)||"":un(e,"URL")?sn(e):Cn(Fe(e))}function Qn(){var e=St();return e&&e[12]}function Wn(e,t){return e.hasOwnProperty(Ee)?e[Ee]:null}var Kn=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,function(e,t){return"".concat(e?"NG0".concat(e,": "):"").concat(t)}(e,r))).code=e,i}return n}(n(Error));function Gn(e,t){var n=t?" in "+t:"";throw new Kn("201","No provider for ".concat(He(e)," found").concat(n))}var Zn=function(){function e(t,n,r){m(this,e),this.previousValue=t,this.currentValue=n,this.firstChange=r}return l(e,[{key:"isFirstChange",value:function(){return this.firstChange}}]),e}();function Xn(){return Jn}function Jn(e){return e.type.prototype.ngOnChanges&&(e.setInput=$n),Yn}function Yn(){var e=er(this),t=null==e?void 0:e.current;if(t){var n=e.previous;if(n===me)e.previous=t;else for(var r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function $n(e,t,n,r){var i=er(e)||function(e,t){return e.__ngSimpleChanges__=t}(e,{previous:me,current:null}),o=i.current||(i.current={}),a=i.previous,s=this.declaredInputs[n],u=a[s];o[s]=new Zn(u&&u.currentValue,t,a===me),e[r]=t}function er(e){return e.__ngSimpleChanges__||null}function tr(e,t){for(var n=t.directiveStart,r=t.directiveEnd;n=r)break}else t[a]<0&&(e[18]+=65536),(o>11>16&&(3&e[2])===t&&(e[2]+=2048,o.call(a)):o.call(a)}Xn.ngInherit=!0;var sr=function e(t,n,r){m(this,e),this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r};function ur(e,t,n){for(var r=ut(e),i=0;it){a=o-1;break}}}for(;o>16,r=t;n>0;)r=r[15],n--;return r}var yr=!0;function gr(e){var t=yr;return yr=e,t}var mr=0;function br(e,t){var n=kr(e,t);if(-1!==n)return n;var r=t[1];r.firstCreatePass&&(e.injectorIndex=t.length,_r(r.data,e),_r(t,null),_r(r.blueprint,null));var i=wr(e,t),o=e.injectorIndex;if(dr(i))for(var a=vr(i),s=pr(i,t),u=s[1].data,l=0;l<8;l++)t[o+l]=s[a+l]|u[a+l];return t[o+8]=i,o}function _r(e,t){e.push(0,0,0,0,0,0,0,0,t)}function kr(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function wr(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;for(var n=0,r=null,i=t;null!==i;){var o=i[1],a=o.type;if(null===(r=2===a?o.declTNode:1===a?i[6]:null))return-1;if(n++,i=i[15],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return-1}function Cr(e,t,n){!function(e,t,n){var r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(Oe)&&(r=n[Oe]),null==r&&(r=n[Oe]=mr++);var i=255&r,o=1<3&&void 0!==arguments[3]?arguments[3]:qe.Default,i=arguments.length>4?arguments[4]:void 0;if(null!==e){var o=function(e){if("string"==typeof e)return e.charCodeAt(0)||0;var t=e.hasOwnProperty(Oe)?e[Oe]:void 0;return"number"==typeof t?t>=0?255&t:xr:t}(n);if("function"==typeof o){if(!qt(t,e,r))return r&qe.Host?Sr(i,n,r):Er(t,n,r,i);try{var a=o();if(null!=a||r&qe.Optional)return a;Gn(n)}finally{Gt()}}else if("number"==typeof o){var s=null,u=kr(e,t),l=-1,c=r&qe.Host?t[16][6]:null;for((-1===u||r&qe.SkipSelf)&&(-1!==(l=-1===u?wr(e,t):t[u+8])&&Dr(r,!1)?(s=t[1],u=vr(l),t=pr(l,t)):u=-1);-1!==u;){var h=t[1];if(Ir(o,u,h.data)){var f=Ar(u,t,n,s,r,c);if(f!==Tr)return f}-1!==(l=t[u+8])&&Dr(r,t[1].data[u+8]===c)&&Ir(o,u,t)?(s=h,u=vr(l),t=pr(l,t)):u=-1}}}return Er(t,n,r,i)}var Tr={};function xr(){return new Rr(Tt(),St())}function Ar(e,t,n,r,i,o){var a=t[1],s=a.data[e+8],u=jr(s,a,n,null==r?ot(s)&&yr:r!=a&&0!=(3&s.type),i&qe.Host&&o===s);return null!==u?Pr(t,a,u,s):Tr}function jr(e,t,n,r,i){for(var o=e.providerIndexes,a=t.data,s=1048575&o,u=e.directiveStart,l=o>>20,c=i?s+l:e.directiveEnd,h=r?s:s+l;h=u&&f.type===n)return h}if(i){var d=a[u];if(d&&st(d)&&d.type===n)return u}return null}function Pr(e,t,n,r){var i=e[n],o=t.data;if(i instanceof sr){var a=i;a.resolving&&function(e,t){throw new Kn("200","Circular dependency in DI detected for "+e)}(He(o[n]));var s=gr(a.canSeeViewProviders);a.resolving=!0;var u=a.injectImpl?ze(a.injectImpl):null;qt(e,r,qe.Default);try{i=e[n]=a.factory(void 0,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&function(e,t,n){var r=t.type.prototype,i=r.ngOnChanges,o=r.ngOnInit,a=r.ngDoCheck;if(i){var s=Jn(t);(n.preOrderHooks||(n.preOrderHooks=[])).push(e,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,s)}o&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-e,o),a&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e,a),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,a))}(n,o[n],t)}finally{null!==u&&ze(u),gr(s),a.resolving=!1,Gt()}}return i}function Ir(e,t,n){var r=64&e,i=32&e;return!!((128&e?r?i?n[t+7]:n[t+6]:i?n[t+5]:n[t+4]:r?i?n[t+3]:n[t+2]:i?n[t+1]:n[t])&1<1?t-1:0),r=1;r0&&(e[r-1][4]=i[4]);var a=he(e,10+t);vi(i[1],n=i,n[11],2,null,null),n[0]=null,n[6]=null;var s=a[19];null!==s&&s.detachView(a[1]),i[3]=null,i[4]=null,i[2]&=-129}return i}}function ti(e,t){if(!(256&t[2])){var n=t[11];ut(n)&&n.destroyNode&&vi(e,t,n,3,null,null),function(e){var t=e[13];if(!t)return ni(e[1],e);for(;t;){var n=null;if(nt(t))n=t[13];else{var r=t[10];r&&(n=r)}if(!n){for(;t&&!t[4]&&t!==e;)nt(t)&&ni(t[1],t),t=t[3];null===t&&(t=e),nt(t)&&ni(t[1],t),n=t&&t[4]}t=n}}(t)}}function ni(e,t){if(!(256&t[2])){t[2]&=-129,t[2]|=256,function(e,t){var n;if(null!=e&&null!=(n=e.destroyHooks))for(var r=0;r=0?r[u]():r[-u].unsubscribe(),i+=2}else n[i].call(r[n[i+1]]);t[7]=null}}(e,t),1===t[1].type&&ut(t[11])&&t[11].destroy();var n=t[17];if(null!==n&&rt(t[3])){n!==t[3]&&$r(n,t);var r=t[19];null!==r&&r.detachView(e)}}}function ri(e,t,n){return function(e,t,n){for(var r=t;null!==r&&40&r.type;)r=(t=r).parent;if(null===r)return n[0];if(2&r.flags){var i=e.data[r.directiveStart].encapsulation;if(i===ge.None||i===ge.Emulated)return null}return ft(r,n)}(e,t.parent,n)}function ii(e,t,n,r,i){ut(e)?e.insertBefore(t,n,r,i):t.insertBefore(n,r,i)}function oi(e,t,n){ut(e)?e.appendChild(t,n):t.appendChild(n)}function ai(e,t,n,r,i){null!==r?ii(e,t,n,r,i):oi(e,t,n)}function si(e,t){return ut(e)?e.parentNode(t):t.parentNode}function ui(e,t,n){return li(e,t,n)}var li=function(e,t,n){return 40&e.type?ft(e,n):null};function ci(e,t,n,r){var i=ri(e,r,t),o=t[11],a=ui(r.parent||t[6],r,t);if(null!=i)if(Array.isArray(n))for(var s=0;so?"":i[c+1].toLowerCase();var f=8&r?h:null;if(f&&-1!==mi(f,l,0)||2&r&&l!==h){if(Ci(r))return!1;a=!0}}}}else{if(!a&&!Ci(r)&&!Ci(u))return!1;if(a&&Ci(u))continue;a=!1,r=u|1&r}}return Ci(r)||a}function Ci(e){return 0==(1&e)}function Si(e,t,n,r){if(null===t)return-1;var i=0;if(r||!n){for(var o=!1;i-1)for(n++;n2&&void 0!==arguments[2]&&arguments[2],r=0;r0?'="'+s+'"':"")+"]"}else 8&r?i+="."+a:4&r&&(i+=" "+a);else""===i||Ci(a)||(t+=Ti(o,i),i=""),r=a,o=o||!Ci(r);n++}return""!==i&&(t+=Ti(o,i)),t}var Ai={};function ji(e){Pi(Et(),St(),Xt()+e,It())}function Pi(e,t,n,r){if(!r)if(3==(3&t[2])){var i=e.preOrderCheckHooks;null!==i&&nr(t,i,n)}else{var o=e.preOrderHooks;null!==o&&rr(t,o,0,n)}Jt(n)}function Ii(e,t){return e<<17|t<<2}function Di(e){return e>>17&32767}function Ri(e){return 2|e}function Ni(e){return(131068&e)>>2}function Li(e,t){return-131069&e|t<<2}function Vi(e){return 1|e}function Mi(e,t){var n=e.contentQueries;if(null!==n)for(var r=0;r20&&Pi(e,t,20,It()),n(r,i)}finally{Jt(o)}}function Wi(e,t,n){if(it(t))for(var r=t.directiveEnd,i=t.directiveStart;i2&&void 0!==arguments[2]?arguments[2]:ft,r=t.localNames;if(null!==r)for(var i=t.index+1,o=0;o0;){var n=e[--t];if("number"==typeof n&&n<0)return n}return 0})(s)!=u&&s.push(u),s.push(r,i,a)}}function no(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function ro(e,t){t.flags|=2,(e.components||(e.components=[])).push(t.index)}function io(e,t,n){if(n){if(t.exportAs)for(var r=0;r0&&fo(n)}}function fo(e){for(var t=Gr(e);null!==t;t=Zr(t))for(var n=10;n0&&fo(r)}var o=e[1].components;if(null!==o)for(var a=0;a0&&fo(s)}}function vo(e,t){var n=pt(t,e),r=n[1];!function(e,t){for(var n=t.length;n1&&void 0!==arguments[1]?arguments[1]:Qe;if(t===Qe){var n=new Error("NullInjectorError: No provider for ".concat(L(e),"!"));throw n.name="NullInjectorError",n}return t}}]),e}(),xo=new Z("Set Injector scope."),Ao={},jo={},Po=[],Io=void 0;function Do(){return void 0===Io&&(Io=new To),Io}function Ro(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return new No(e,n,t||Do(),r)}var No=function(){function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;m(this,e),this.parent=r,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var a=[];n&&le(n,function(e){return i.processProvider(e,t,n)}),le([t],function(e){return i.processInjectorType(e,[],a)}),this.records.set(Oo,Mo(void 0,this));var s=this.records.get(xo);this.scope=null!=s?s.value:null,this.source=o||("object"==typeof t?null:L(t))}return l(e,[{key:"destroy",value:function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(function(e){return e.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qe,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:qe.Default;this.assertNotDestroyed();var r,i=Ze(this);try{if(!(n&qe.SkipSelf)){var o=this.records.get(e);if(void 0===o){var a=("function"==typeof(r=e)||"object"==typeof r&&r instanceof Z)&&q(e);o=a&&this.injectableDefInScope(a)?Mo(Lo(e),Ao):null,this.records.set(e,o)}if(null!=o)return this.hydrate(e,o)}return(n&qe.Self?Do():this.parent).get(e,t=n&qe.Optional&&t===Qe?null:t)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(L(e)),i)throw s;return function(e,t,n,r){var i=e.ngTempTokenPath;throw t.__source&&i.unshift(t.__source),e.message=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.substr(2):e;var i=L(t);if(Array.isArray(t))i=t.map(L).join(" -> ");else if("object"==typeof t){var o=[];for(var a in t)if(t.hasOwnProperty(a)){var s=t[a];o.push(a+":"+("string"==typeof s?JSON.stringify(s):L(s)))}i="{".concat(o.join(", "),"}")}return"".concat(n).concat(r?"("+r+")":"","[").concat(i,"]: ").concat(e.replace(We,"\n "))}("\n"+e.message,i,"R3InjectorError",r),e.ngTokenPath=i,e.ngTempTokenPath=null,e}(s,e,0,this.source)}throw s}finally{Ze(i)}}},{key:"_resolveInjectorDefTypes",value:function(){var e=this;this.injectorDefTypes.forEach(function(t){return e.get(t)})}},{key:"toString",value:function(){var e=[];return this.records.forEach(function(t,n){return e.push(L(n))}),"R3Injector[".concat(e.join(", "),"]")}},{key:"assertNotDestroyed",value:function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}},{key:"processInjectorType",value:function(e,t,n){var r=this;if(!(e=oe(e)))return!1;var i=B(e),o=null==i&&e.ngModule||void 0,a=void 0===o?e:o,s=-1!==n.indexOf(a);if(void 0!==o&&(i=B(o)),null==i)return!1;if(null!=i.imports&&!s){var u;n.push(a);try{le(i.imports,function(e){r.processInjectorType(e,t,n)&&(void 0===u&&(u=[]),u.push(e))})}finally{}if(void 0!==u)for(var l=function(e){var t=u[e],n=t.ngModule,i=t.providers;le(i,function(e){return r.processProvider(e,n,i||Po)})},c=0;c0){var n=fe(t,"?");throw new Error("Can't resolve all parameters for ".concat(L(e),": (").concat(n.join(", "),")."))}var r=function(e){var t=e&&(e[Q]||e[K]);if(t){var n=function(e){if(e.hasOwnProperty("name"))return e.name;var t=(""+e).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(e);return console.warn('DEPRECATED: DI is instantiating a token "'.concat(n,'" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "').concat(n,'" class.')),t}return null}(e);return null!==r?function(){return r.factory(e)}:function(){return new e}}(e);throw new Error("unreachable")}function Vo(e,t,n){var i,a=void 0;if(Ho(e)){var s=oe(e);return Wn(s)||Lo(s)}if(Fo(e))a=function(){return oe(e.useValue)};else if((i=e)&&i.useFactory)a=function(){return e.useFactory.apply(e,o(Ye(e.deps||[])))};else if(function(e){return!(!e||!e.useExisting)}(e))a=function(){return Je(oe(e.useExisting))};else{var u=oe(e&&(e.useClass||e.provide));if(!function(e){return!!e.deps}(e))return Wn(u)||Lo(u);a=function(){return r(u,o(Ye(e.deps)))}}return a}function Mo(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:e,value:t,multi:n?[]:void 0}}function Fo(e){return null!==e&&"object"==typeof e&&Ke in e}function Ho(e){return"function"==typeof e}var Uo=function(e,t,n){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0,i=Ro(e,t,n,r);return i._resolveInjectorDefTypes(),i}({name:n},t,e,n)},qo=function(){var e=function(){function e(){m(this,e)}return l(e,null,[{key:"create",value:function(e,t){return Array.isArray(e)?Uo(e,t,""):Uo(e.providers,e.parent,e.name||"")}}]),e}();return e.THROW_IF_NOT_FOUND=Qe,e.NULL=new To,e.\u0275prov=H({token:e,providedIn:"any",factory:function(){return Je(Oo)}}),e.__NG_ELEMENT_ID__=-1,e}();function zo(e,t){tr(yt(e)[1],Tt())}function Bo(e){for(var t=Object.getPrototypeOf(e.type.prototype).constructor,n=!0,r=[e];t;){var i=void 0;if(st(e))i=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Error("Directives cannot inherit Components");i=t.\u0275dir}if(i){if(n){r.push(i);var o=e;o.inputs=Qo(e.inputs),o.declaredInputs=Qo(e.declaredInputs),o.outputs=Qo(e.outputs);var a=i.hostBindings;a&&Go(e,a);var s=i.viewQuery,u=i.contentQueries;if(s&&Wo(e,s),u&&Ko(e,u),F(e.inputs,i.inputs),F(e.declaredInputs,i.declaredInputs),F(e.outputs,i.outputs),st(i)&&i.data.animation){var l=e.data;l.animation=(l.animation||[]).concat(i.data.animation)}}var c=i.features;if(c)for(var h=0;h=0;r--){var i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=hr(i.hostAttrs,n=hr(n,i.hostAttrs))}}(r)}function Qo(e){return e===me?{}:e===be?[]:e}function Wo(e,t){var n=e.viewQuery;e.viewQuery=n?function(e,r){t(e,r),n(e,r)}:t}function Ko(e,t){var n=e.contentQueries;e.contentQueries=n?function(e,r,i){t(e,r,i),n(e,r,i)}:t}function Go(e,t){var n=e.hostBindings;e.hostBindings=n?function(e,r){t(e,r),n(e,r)}:t}var Zo=null;function Xo(){if(!Zo){var e=ne.Symbol;if(e&&e.iterator)Zo=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n1&&void 0!==arguments[1]?arguments[1]:qe.Default,n=St();return null===n?Je(e,t):Or(Tt(),n,oe(e),t)}function ua(e){return function(e,t){if("class"===t)return e.classes;if("style"===t)return e.styles;var n=e.attrs;if(n)for(var r=n.length,i=0;i2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0,i=St(),o=Et(),a=Tt();return function(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0,u=at(r),l=e.firstCreatePass&&(e.cleanup||(e.cleanup=[])),c=ko(t),h=!0;if(3&r.type){var f=ft(r,t),d=s?s(f):me,v=d.target||f,p=c.length,y=s?function(e){return s(ct(e[r.index])).target}:r.index;if(ut(n)){var g=null;if(!s&&u&&(g=function(e,t,n,r){var i=e.cleanup;if(null!=i)for(var o=0;ou?s[u]:null}"string"==typeof a&&(o+=2)}return null}(e,t,i,r.index)),null!==g)(g.__ngLastListenerFn__||g).__ngNextListenerFn__=o,g.__ngLastListenerFn__=o,h=!1;else{o=ka(r,t,o,!1);var m=n.listen(d.name||v,i,o);c.push(o,m),l&&l.push(i,y,p,p+1)}}else o=ka(r,t,o,!0),v.addEventListener(i,o,a),c.push(o),l&&l.push(i,y,p,a)}var b,_=r.outputs;if(h&&null!==_&&(b=_[i])){var k=b.length;if(k)for(var w=0;w0&&void 0!==arguments[0]?arguments[0]:1;return function(e){return(wt.lFrame.contextLView=function(e,t){for(;e>0;)t=t[15],e--;return t}(e,wt.lFrame.contextLView))[8]}(e)}function Ca(e,t){for(var n=null,r=function(e){var t=e.attrs;if(null!=t){var n=t.indexOf(5);if(0==(1&n))return t[n+1]}return null}(e),i=0;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=St(),i=Et(),o=Hi(i,20+e,16,null,n||null);null===o.projection&&(o.projection=t),Pt(),64!=(64&o.flags)&&function(e,t,n){pi(t[11],0,t,n,ri(e,n,t),ui(n.parent||t[6],n,t))}(i,r,o)}function Oa(e,t,n){return Ta(e,"",t,"",n),Oa}function Ta(e,t,n,r,i){var o=St(),a=ia(o,t,n,r);return a!==Ai&&$i(Et(),Yt(),o,e,a,o[11],i,!1),Ta}var xa=[];function Aa(e,t,n,r,i){for(var o=e[n+1],a=null===t,s=r?Di(o):Ni(o),u=!1;0!==s&&(!1===u||a);){var l=e[s+1];ja(e[s],t)&&(u=!0,e[s+1]=r?Vi(l):Ri(l)),s=r?Di(l):Ni(l)}u&&(e[n+1]=r?Ri(o):Vi(o))}function ja(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&pe(e,t)>=0}var Pa={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Ia(e){return e.substring(Pa.key,Pa.keyEnd)}function Da(e){return e.substring(Pa.value,Pa.valueEnd)}function Ra(e,t){var n=Pa.textEnd,r=Pa.key=Na(e,t,n);return n===r?-1:(r=Pa.keyEnd=function(e,t,n){for(var r;t=65&&(-33&r)<=90||r>=48&&r<=57);)t++;return t}(e,r,n),r=La(e,r,n),r=Pa.value=Na(e,r,n),r=Pa.valueEnd=function(e,t,n){for(var r=-1,i=-1,o=-1,a=t,s=a;a32&&(s=a),o=i,i=r,r=-33&u}return s}(e,r,n),La(e,r,n))}function Na(e,t,n){for(;t=0;n=Ra(t,n))Qa(e,Ia(t),Da(t))}function Ua(e,t){return t>=e.expandoStartIndex}function qa(e,t,n,r){var i=e.data;if(null===i[n+1]){var o=i[Xt()],a=Ua(e,n);Za(o,r)&&null===t&&!a&&(t=!1),t=function(e,t,n,r){var i=function(e){var t=wt.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}(e),o=r?t.residualClasses:t.residualStyles;if(null===i)0===(r?t.classBindings:t.styleBindings)&&(n=Ba(n=za(null,e,t,n,r),t.attrs,r),o=null);else{var a=t.directiveStylingLast;if(-1===a||e[a]!==i)if(n=za(i,e,t,n,r),null===o){var s=function(e,t,n){var r=n?t.classBindings:t.styleBindings;if(0!==Ni(r))return e[Di(r)]}(e,t,r);void 0!==s&&Array.isArray(s)&&function(e,t,n,r){e[Di(n?t.classBindings:t.styleBindings)]=r}(e,t,r,s=Ba(s=za(null,e,t,s[1],r),t.attrs,r))}else o=function(e,t,n){for(var r=void 0,i=t.directiveEnd,o=1+t.directiveStylingLast;o0)&&(c=!0)}else l=n;if(i)if(0!==u){var f=Di(e[s+1]);e[r+1]=Ii(f,s),0!==f&&(e[f+1]=Li(e[f+1],r)),e[s+1]=131071&e[s+1]|r<<17}else e[r+1]=Ii(s,0),0!==s&&(e[s+1]=Li(e[s+1],r)),s=r;else e[r+1]=Ii(u,0),0===s?s=r:e[u+1]=Li(e[u+1],r),u=r;c&&(e[r+1]=Ri(e[r+1])),Aa(e,l,r,!0),Aa(e,l,r,!1),function(e,t,n,r,i){var o=i?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof t&&pe(o,t)>=0&&(n[r+1]=Vi(n[r+1]))}(t,l,e,r,o),a=Ii(s,u),o?t.classBindings=a:t.styleBindings=a}(i,o,t,n,a,r)}}function za(e,t,n,r,i){var o=null,a=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s0;){var u=e[i],l=Array.isArray(u),c=l?u[1]:u,h=null===c,f=n[i+1];f===Ai&&(f=h?xa:void 0);var d=h?ve(f,r):c===r?f:void 0;if(l&&!Ga(d)&&(d=ve(u,r)),Ga(d)&&(s=d,a))return s;var v=e[i+1];i=a?Di(v):Ni(v)}if(null!==t){var p=o?t.residualClasses:t.residualStyles;null!=p&&(s=ve(p,r))}return s}function Ga(e){return void 0!==e}function Za(e,t){return 0!=(e.flags&(t?16:32))}function Xa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=St(),r=Et(),i=e+20,o=r.firstCreatePass?Hi(r,i,1,t,null):r.data[i],a=n[i]=function(e,t){return ut(e)?e.createText(t):e.createTextNode(t)}(n[11],t);ci(r,n,a,o),At(o,!1)}function Ja(e){return Ya("",e,""),Ja}function Ya(e,t,n){var r=St(),i=ia(r,e,t,n);return i!==Ai&&So(r,Xt(),i),Ya}function $a(e,t,n,r,i){var o=St(),a=function(e,t,n,r,i,o){var a=na(e,Nt(),n,i);return Vt(2),a?t+Fe(n)+r+Fe(i)+o:Ai}(o,e,t,n,r,i);return a!==Ai&&So(o,Xt(),a),$a}function es(e,t,n,r,i,o,a){var s=St(),u=function(e,t,n,r,i,o,a,s){var u=function(e,t,n,r,i){var o=na(e,t,n,r);return ta(e,t+2,i)||o}(e,Nt(),n,i,a);return Vt(3),u?t+Fe(n)+r+Fe(i)+o+Fe(a)+s:Ai}(s,e,t,n,r,i,o,a);return u!==Ai&&So(s,Xt(),u),es}function ts(e,t,n){var r=St();return ta(r,Lt(),t)&&$i(Et(),Yt(),r,e,t,r[11],n,!0),ts}var ns=void 0,rs=["en",[["a","p"],["AM","PM"],ns],[["AM","PM"],ns,ns],[["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"]],ns,[["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"]],ns,[["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}",ns,"{1} 'at' {0}",ns],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}],is={};function os(e,t,n){"string"!=typeof t&&(n=t,t=e[cs.LocaleId]),t=t.toLowerCase().replace(/_/g,"-"),is[t]=e,n&&(is[t][cs.ExtraData]=n)}function as(e){var t=function(e){return e.toLowerCase().replace(/_/g,"-")}(e),n=ls(t);if(n)return n;var r=t.split("-")[0];if(n=ls(r))return n;if("en"===r)return rs;throw new Error('Missing locale data for the locale "'.concat(e,'".'))}function ss(e){return as(e)[cs.CurrencyCode]||null}function us(e){return as(e)[cs.PluralCase]}function ls(e){return e in is||(is[e]=ne.ng&&ne.ng.common&&ne.ng.common.locales&&ne.ng.common.locales[e]),is[e]}var cs=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}({});function hs(e){var t;null==(t=e)&&function(e,t,n,r){throw new Error("ASSERTION ERROR: Expected localeId to be defined"+" [Expected=> null != ".concat(t," <=Actual]"))}(0,t),"string"==typeof e&&e.toLowerCase().replace(/_/g,"-")}function fs(e,t,n,r,i){if(e=oe(e),Array.isArray(e))for(var o=0;o>20;if(Ho(e)||!e.multi){var v=new sr(l,i,sa),p=ps(u,t,i?h:h+d,f);-1===p?(Cr(br(c,s),a,u),ds(a,e,t.length),t.push(u),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),n.push(v),s.push(v)):(n[p]=v,s[p]=v)}else{var y=ps(u,t,h+d,f),g=ps(u,t,h,h+d),m=y>=0&&n[y],b=g>=0&&n[g];if(i&&!b||!i&&!m){Cr(br(c,s),a,u);var _=function(e,t,n,r,i){var o=new sr(e,n,sa);return o.multi=[],o.index=t,o.componentProviders=0,vs(o,i,r&&!n),o}(i?gs:ys,n.length,i,r,l);!i&&b&&(n[g].providerFactory=_),ds(a,e,t.length,0),t.push(u),c.directiveStart++,c.directiveEnd++,i&&(c.providerIndexes+=1048576),n.push(_),s.push(_)}else ds(a,e,y>-1?y:g,vs(n[i?g:y],l,!i&&r));!i&&r&&b&&n[g].componentProviders++}}}function ds(e,t,n,r){var i=Ho(t);if(i||t.useClass){var o=(t.useClass||t).prototype.ngOnDestroy;if(o){var a=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){var s=a.indexOf(n);-1===s?a.push(n,[r,o]):a[s+1].push(r,o)}else a.push(n,o)}}}function vs(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function ps(e,t,n,r){for(var i=n;i1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,r){return function(e,t,n){var r=Et();if(r.firstCreatePass){var i=st(e);fs(n,r.data,r.blueprint,i,!0),fs(t,r.data,r.blueprint,i,!1)}}(n,r?r(e):e,t)}}}var _s=function e(){m(this,e)},ks=function(){function e(){m(this,e)}return l(e,[{key:"resolveComponentFactory",value:function(e){throw function(e){var t=Error("No component factory found for ".concat(L(e),". Did you add it to @NgModule.entryComponents?"));return t.ngComponent=e,t}(e)}}]),e}(),ws=function(){var e=function e(){m(this,e)};return e.NULL=new ks,e}();function Cs(){}function Ss(e,t){return new Os(ft(e,t))}var Es=function(){return Ss(Tt(),St())},Os=function(){var e=function e(t){m(this,e),this.nativeElement=t};return e.__NG_ELEMENT_ID__=Es,e}(),Ts=function e(){m(this,e)},xs=function(){var e=function e(){m(this,e)};return e.__NG_ELEMENT_ID__=function(){return As()},e}(),As=function(){var e=St(),t=pt(Tt().index,e);return function(e){return e[11]}(nt(t)?t:e)},js=function(){var e=function e(){m(this,e)};return e.\u0275prov=H({token:e,providedIn:"root",factory:function(){return null}}),e}(),Ps=function e(t){m(this,e),this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")},Is=new Ps("11.0.2"),Ds=function(){function e(){m(this,e)}return l(e,[{key:"supports",value:function(e){return Yo(e)}},{key:"create",value:function(e){return new Ns(e)}}]),e}(),Rs=function(e,t){return t},Ns=function(){function e(t){m(this,e),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=t||Rs}return l(e,[{key:"forEachItem",value:function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)}},{key:"forEachOperation",value:function(e){for(var t=this._itHead,n=this._removalsHead,r=0,i=null;t||n;){var o=!n||t&&t.currentIndex4&&void 0!==arguments[4]&&arguments[4];null!==n;){var a=t[n.index];if(null!==a&&r.push(ct(a)),rt(a))for(var s=10;s-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}ti(this._lView[1],this._lView)}},{key:"onDestroy",value:function(e){Ji(this._lView[1],this._lView,null,e)}},{key:"markForCheck",value:function(){yo(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){go(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(e,t,n){Dt(!0);try{go(e,t,n)}finally{Dt(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e}},{key:"detachFromAppRef",value:function(){var e;this._appRef=null,vi(this._lView[1],e=this._lView,e[11],2,null,null)}},{key:"attachToAppRef",value:function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}},{key:"rootNodes",get:function(){var e=this._lView,t=e[1];return Qs(t,e,t.firstChild,[])}},{key:"context",get:function(){return this._lView[8]}},{key:"destroyed",get:function(){return 256==(256&this._lView[2])}}]),e}(),Ks=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this,e))._view=e,r}return l(n,[{key:"detectChanges",value:function(){mo(this._view)}},{key:"checkNoChanges",value:function(){!function(e){Dt(!0);try{mo(e)}finally{Dt(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(Ws),Gs=Xs,Zs=function(){var e=function e(){m(this,e)};return e.__NG_ELEMENT_ID__=Gs,e.__ChangeDetectorRef__=!0,e}();function Xs(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(e,t,n){if(!n&&ot(e)){var r=pt(e.index,t);return new Ws(r,r)}return 47&e.type?new Ws(t[16],t):null}(Tt(),St(),e)}var Js=[new Hs],Ys=new zs([new Ds]),$s=new Bs(Js),eu=function(){return ru(Tt(),St())},tu=function(){var e=function e(){m(this,e)};return e.__NG_ELEMENT_ID__=eu,e}(),nu=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this))._declarationLView=e,o._declarationTContainer=r,o.elementRef=i,o}return l(n,[{key:"createEmbeddedView",value:function(e){var t=this._declarationTContainer.tViews,n=Fi(this._declarationLView,t,e,16,null,t.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];var r=this._declarationLView[19];return null!==r&&(n[19]=r.createEmbeddedView(t)),qi(t,n,e),new Ws(n)}}]),n}(tu);function ru(e,t){return 4&e.type?new nu(t,e,Ss(e,t)):null}var iu=function e(){m(this,e)},ou=function e(){m(this,e)},au=function(){return hu(Tt(),St())},su=function(){var e=function e(){m(this,e)};return e.__NG_ELEMENT_ID__=au,e}(),uu=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this))._lContainer=e,o._hostTNode=r,o._hostLView=i,o}return l(n,[{key:"clear",value:function(){for(;this.length>0;)this.remove(this.length-1)}},{key:"get",value:function(e){var t=lu(this._lContainer);return null!==t&&t[e]||null}},{key:"createEmbeddedView",value:function(e,t,n){var r=e.createEmbeddedView(t||{});return this.insert(r,n),r}},{key:"createComponent",value:function(e,t,n,r,i){var o=n||this.parentInjector;if(!i&&null==e.ngModule&&o){var a=o.get(iu,null);a&&(i=a)}var s=e.create(o,r,void 0,i);return this.insert(s.hostView,t),s}},{key:"insert",value:function(e,t){var r=e._lView,i=r[1];if(rt(r[3])){var o=this.indexOf(e);if(-1!==o)this.detach(o);else{var a=r[3],s=new n(a,a[6],a[3]);s.detach(s.indexOf(e))}}var u=this._adjustIndex(t),l=this._lContainer;!function(e,t,n,r){var i=10+r,o=n.length;r>0&&(n[i-1][4]=t),r1&&void 0!==arguments[1]?arguments[1]:0;return null==e?this.length+t:e}},{key:"element",get:function(){return Ss(this._hostTNode,this._hostLView)}},{key:"injector",get:function(){return new Rr(this._hostTNode,this._hostLView)}},{key:"parentInjector",get:function(){var e=wr(this._hostTNode,this._hostLView);if(dr(e)){var t=pr(e,this._hostLView),n=vr(e);return new Rr(t[1].data[n+8],t)}return new Rr(null,this._hostLView)}},{key:"length",get:function(){return this._lContainer.length-10}}]),n}(su);function lu(e){return e[8]}function cu(e){return e[8]||(e[8]=[])}function hu(e,t){var n,r=t[e.index];if(rt(r))n=r;else{var i;if(8&e.type)i=ct(r);else{var o=t[11];i=o.createComment("");var a=ft(e,t);ii(o,si(o,a),i,function(e,t){return ut(e)?e.nextSibling(t):t.nextSibling}(o,a),!1)}t[e.index]=n=co(r,t,i,e),po(t,n)}return new uu(n,e,t)}var fu={},du=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this)).ngModule=e,r}return l(n,[{key:"resolveComponentFactory",value:function(e){var t=Ve(e);return new yu(t,this.ngModule)}}]),n}(ws);function vu(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}var pu=new Z("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return qr}}),yu=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this)).componentDef=e,i.ngModule=r,i.componentType=e.type,i.selector=e.selectors.map(xi).join(","),i.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],i.isBoundToModule=!!r,i}return l(n,[{key:"create",value:function(e,t,n,r){var i,o,a=(r=r||this.ngModule)?function(e,t){return{get:function(n,r,i){var o=e.get(n,fu,i);return o!==fu||r===fu?o:t.get(n,r,i)}}}(e,r.injector):e,s=a.get(Ts,lt),u=a.get(js,null),l=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",h=n?function(e,t,n){if(ut(e))return e.selectRootElement(t,n===ge.ShadowDom);var r="string"==typeof t?e.querySelector(t):t;return r.textContent="",r}(l,n,this.componentDef.encapsulation):Yr(s.createRenderer(null,this.componentDef),c,function(e){var t=e.toLowerCase();return"svg"===t?"http://www.w3.org/2000/svg":"math"===t?"http://www.w3.org/1998/MathML/":null}(c)),f=this.componentDef.onPush?576:528,d={components:[],scheduler:qr,clean:_o,playerHandler:null,flags:0},v=Xi(0,null,null,1,0,null,null,null,null,null),p=Fi(null,v,d,f,null,null,s,l,u,a);zt(p);try{var y=function(e,t,n,r,i,o){var a=n[1];n[20]=e;var s=Hi(a,20,2,"#host",null),u=s.mergedAttrs=t.hostAttrs;null!==u&&(Eo(s,u,!0),null!==e&&(ur(i,e,u),null!==s.classes&&gi(i,e,s.classes),null!==s.styles&&yi(i,e,s.styles)));var l=r.createRenderer(e,t),c=Fi(n,Zi(t),null,t.onPush?64:16,n[20],s,r,l,null,null);return a.firstCreatePass&&(Cr(br(s,n),a,t.type),ro(a,s),oo(s,n.length,1)),po(n,c),n[20]=c}(h,this.componentDef,p,s,l);if(h)if(n)ur(l,h,["ng-version",Is.full]);else{var g=function(e){for(var t=[],n=[],r=1,i=2;r0&&gi(l,h,b.join(" "))}if(o=dt(v,20),void 0!==t)for(var _=o.projection=[],k=0;k1&&void 0!==arguments[1]?arguments[1]:qo.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:qe.Default;return e===qo||e===iu||e===Oo?this:this._r3Injector.get(e,t,n)}},{key:"destroy",value:function(){var e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(function(e){return e()}),this.destroyCbs=null}},{key:"onDestroy",value:function(e){this.destroyCbs.push(e)}}]),n}(iu),_u=function(e){h(n,e);var t=d(n);function n(e){var r,o,a;return m(this,n),(r=t.call(this)).moduleType=e,null!==Me(e)&&(o=e,a=new Set,function e(t){var n=Me(t,!0),r=n.id;null!==r&&(function(e,t,n){if(t&&t!==n)throw new Error("Duplicate module registered for ".concat(e," - ").concat(L(t)," vs ").concat(L(t.name)))}(r,mu.get(r),t),mu.set(r,t));var o,s=i(Br(n.imports));try{for(s.s();!(o=s.n()).done;){var u=o.value;a.has(u)||(a.add(u),e(u))}}catch(l){s.e(l)}finally{s.f()}}(o)),r}return l(n,[{key:"create",value:function(e){return new bu(this.moduleType,e)}}]),n}(ou);function ku(e,t,n){var r=Rt()+e,i=St();return i[r]===Ai?ea(i,r,n?t.call(n):t()):function(e,t){return e[t]}(i,r)}function wu(e,t,n,r){return Cu(St(),Rt(),e,t,n,r)}function Cu(e,t,n,r,i,o){var a=t+n;return ta(e,a,i)?ea(e,a+1,o?r.call(o,i):r(i)):function(e,t){var n=e[t];return n===Ai?void 0:n}(e,a+1)}function Su(e,t){var n,r=Et(),i=e+20;r.firstCreatePass?(n=function(e,t){if(t)for(var n=t.length-1;n>=0;n--){var r=t[n];if(e===r.name)return r}throw new Kn("302","The pipe '".concat(e,"' could not be found!"))}(t,r.pipeRegistry),r.data[i]=n,n.onDestroy&&(r.destroyHooks||(r.destroyHooks=[])).push(i,n.onDestroy)):n=r.data[i];var o=n.factory||(n.factory=Wn(n.type)),a=ze(sa);try{var s=gr(!1),u=o();return gr(s),function(e,t,n,r){n>=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}(r,St(),i,u),u}finally{ze(a)}}function Eu(e,t,n){var r=e+20,i=St(),o=vt(i,r);return function(e,t){return Jo.isWrapped(t)&&(t=Jo.unwrap(t),e[Nt()]=Ai),t}(i,function(e,t){return e[1].data[t].pure}(i,r)?Cu(i,Rt(),t,o.transform,n,o):o.transform(n))}var Ou=function(e){h(n,e);var t=d(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return m(this,n),(e=t.call(this)).__isAsync=r,e}return l(n,[{key:"emit",value:function(e){c(g(n.prototype),"next",this).call(this,e)}},{key:"subscribe",value:function(e,t,r){var i,o=function(e){return null},a=function(){return null};e&&"object"==typeof e?(i=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(o=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(a=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(i=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},t&&(o=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)}),r&&(a=this.__isAsync?function(){setTimeout(function(){return r()})}:function(){r()}));var s=c(g(n.prototype),"subscribe",this).call(this,i,o,a);return e instanceof f.a&&e.add(s),s}}]),n}(u.a);function Tu(){return this._results[Xo()]()}var xu=function(){function e(){m(this,e),this.dirty=!0,this._results=[],this.changes=new Ou,this.length=0;var t=Xo(),n=e.prototype;n[t]||(n[t]=Tu)}return l(e,[{key:"map",value:function(e){return this._results.map(e)}},{key:"filter",value:function(e){return this._results.filter(e)}},{key:"find",value:function(e){return this._results.find(e)}},{key:"reduce",value:function(e,t){return this._results.reduce(e,t)}},{key:"forEach",value:function(e){this._results.forEach(e)}},{key:"some",value:function(e){return this._results.some(e)}},{key:"toArray",value:function(){return this._results.slice()}},{key:"toString",value:function(){return this._results.toString()}},{key:"reset",value:function(e){this._results=ue(e),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()}}]),e}(),Au=function(){function e(t){m(this,e),this.queryList=t,this.matches=null}return l(e,[{key:"clone",value:function(){return new e(this.queryList)}},{key:"setDirty",value:function(){this.queryList.setDirty()}}]),e}(),ju=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];m(this,e),this.queries=t}return l(e,[{key:"createEmbeddedView",value:function(t){var n=t.queries;if(null!==n){for(var r=null!==t.contentQueries?t.contentQueries[0]:n.length,i=[],o=0;o3&&void 0!==arguments[3]?arguments[3]:null;m(this,e),this.predicate=t,this.descendants=n,this.isStatic=r,this.read=i},Iu=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];m(this,e),this.queries=t}return l(e,[{key:"elementStart",value:function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:-1;m(this,e),this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return l(e,[{key:"elementStart",value:function(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}},{key:"elementEnd",value:function(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}},{key:"template",value:function(e,t){this.elementStart(e,t)}},{key:"embeddedTView",value:function(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new e(this.metadata)):null}},{key:"isApplyingToNode",value:function(e){if(this._appliesToNextNode&&!1===this.metadata.descendants){for(var t=this._declarationNodeIndex,n=e.parent;null!==n&&8&n.type&&n.index!==t;)n=n.parent;return t===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(e,t){var n=this.metadata.predicate;if(Array.isArray(n))for(var r=0;r0)r.push(a[s/2]);else{for(var l=o[s+1],c=t[-u],h=10;h0&&void 0!==arguments[0]?arguments[0]:qe.Default,t=Xs(!0);if(null!=t||e&qe.Optional)return t;Gn("ChangeDetectorRef")}var Ku=new Z("Application Initializer"),Gu=function(){var e=function(){function e(t){var n=this;m(this,e),this.appInits=t,this.resolve=Cs,this.reject=Cs,this.initialized=!1,this.done=!1,this.donePromise=new Promise(function(e,t){n.resolve=e,n.reject=t})}return l(e,[{key:"runInitializers",value:function(){var e=this;if(!this.initialized){var t=[],n=function(){e.done=!0,e.resolve()};if(this.appInits)for(var r=0;r0&&(i=setTimeout(function(){r._callbacks=r._callbacks.filter(function(e){return e.timeoutId!==i}),e(r._didWork,r.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:n})}},{key:"whenStable",value:function(e,t,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(e,t,n),this._runCallbacksIfReady()}},{key:"getPendingRequestCount",value:function(){return this._pendingCount}},{key:"findProviders",value:function(e,t,n){return[]}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Je(vl))},e.\u0275prov=H({token:e,factory:e.\u0275fac}),e}(),Cl=function(){var e=function(){function e(){m(this,e),this._applications=new Map,Ol.addToWindow(this)}return l(e,[{key:"registerApplication",value:function(e,t){this._applications.set(e,t)}},{key:"unregisterApplication",value:function(e){this._applications.delete(e)}},{key:"unregisterAllApplications",value:function(){this._applications.clear()}},{key:"getTestability",value:function(e){return this._applications.get(e)||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(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Ol.findTestabilityInTree(this,e,t)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=H({token:e,factory:e.\u0275fac}),e}();function Sl(e){Ol=e}var El,Ol=new(function(){function e(){m(this,e)}return l(e,[{key:"addToWindow",value:function(e){}},{key:"findTestabilityInTree",value:function(e,t,n){return null}}]),e}()),Tl=new Z("AllowMultipleToken"),xl=function e(t,n){m(this,e),this.name=t,this.token=n};function Al(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r="Platform: "+t,i=new Z(r);return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=jl();if(!o||o.injector.get(Tl,!1))if(e)e(n.concat(t).concat({provide:i,useValue:!0}));else{var a=n.concat(t).concat({provide:i,useValue:!0},{provide:xo,useValue:"platform"});!function(e){if(El&&!El.destroyed&&!El.injector.get(Tl,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");El=e.get(Pl);var t=e.get(Yu,null);t&&t.forEach(function(e){return e()})}(qo.create({providers:a,name:r}))}return function(e){var t=jl();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(i)}}function jl(){return El&&!El.destroyed?El:null}var Pl=function(){var e=function(){function e(t){m(this,e),this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return l(e,[{key:"bootstrapModuleFactory",value:function(e,t){var n,r,i=this,o=(n=t?t.ngZone:void 0,r=t&&t.ngZoneEventCoalescing||!1,"noop"===n?new kl:("zone.js"===n?void 0:n)||new vl({enableLongStackTrace:gn(),shouldCoalesceEventChangeDetection:r})),a=[{provide:vl,useValue:o}];return o.run(function(){var t=qo.create({providers:a,parent:i.injector,name:e.moduleType.name}),n=e.create(t),r=n.injector.get(Hr,null);if(!r)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return Nl(i._modules,n)}),o.runOutsideAngular(function(){return o.onError.subscribe({next:function(e){r.handleError(e)}})}),function(e,t,r){try{var o=((a=n.injector.get(Gu)).runInitializers(),a.donePromise.then(function(){return hs(n.injector.get(nl,"en-US")||"en-US"),i._moduleDoBootstrap(n),n}));return ga(o)?o.catch(function(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}):o}catch(s){throw t.runOutsideAngular(function(){return e.handleError(s)}),s}var a}(r,o)})}},{key:"bootstrapModule",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Il({},n);return function(e,t,n){var r=new _u(n);return Promise.resolve(r)}(0,0,e).then(function(e){return t.bootstrapModuleFactory(e,r)})}},{key:"_moduleDoBootstrap",value:function(e){var t=e.injector.get(Rl);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module ".concat(L(e.instance.constructor),' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.'));e.instance.ngDoBootstrap(t)}this._modules.push(e)}},{key:"onDestroy",value:function(e){this._destroyListeners.push(e)}},{key:"destroy",value:function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0}},{key:"injector",get:function(){return this._injector}},{key:"destroyed",get:function(){return this._destroyed}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Je(qo))},e.\u0275prov=H({token:e,factory:e.\u0275fac}),e}();function Il(e,t){return Array.isArray(t)?t.reduce(Il,e):Object.assign(Object.assign({},e),t)}var Dl,Rl=((Dl=function(){function e(t,n,r,i,o,a){var s=this;m(this,e),this._zone=t,this._console=n,this._injector=r,this._exceptionHandler=i,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=gn(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var u=new v.a(function(e){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){e.next(s._stable),e.complete()})}),l=new v.a(function(e){var t;s._zone.runOutsideAngular(function(){t=s._zone.onStable.subscribe(function(){vl.assertNotInAngularZone(),dl(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,e.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){vl.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&"number"==typeof t[t.length-1]&&(r=t.pop())):"number"==typeof o&&(r=t.pop()),null===i&&1===t.length&&t[0]instanceof v.a?t[0]:Object(b.a)(r)(Object(_.a)(t,i))}(u,l.pipe(function(e){return w()((t=A,function(e){var n;n="function"==typeof t?t:function(){return t};var r=Object.create(e,T);return r.source=e,r.subjectFactory=n,r})(e));var t}))}return l(e,[{key:"bootstrap",value:function(e,t){var n,r=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=e instanceof _s?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var i=n.isBoundToModule?void 0:this._injector.get(iu),o=n.create(qo.NULL,[],t||n.selector,i);o.onDestroy(function(){r._unloadComponent(o)});var a=o.injector.get(wl,null);return a&&o.injector.get(Cl).registerApplication(o.location.nativeElement,a),this._loadComponent(o),gn()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),o}},{key:"tick",value:function(){var e=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;var t,n=i(this._views);try{for(n.s();!(t=n.n()).done;)t.value.detectChanges()}catch(a){n.e(a)}finally{n.f()}if(this._enforceNoNewChanges){var r,o=i(this._views);try{for(o.s();!(r=o.n()).done;)r.value.checkNoChanges()}catch(a){o.e(a)}finally{o.f()}}}catch(s){this._zone.runOutsideAngular(function(){return e._exceptionHandler.handleError(s)})}finally{this._runningTick=!1}}},{key:"attachView",value:function(e){var t=e;this._views.push(t),t.attachToAppRef(this)}},{key:"detachView",value:function(e){var t=e;Nl(this._views,t),t.detachFromAppRef()}},{key:"_loadComponent",value:function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(el,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})}},{key:"_unloadComponent",value:function(e){this.detachView(e.hostView),Nl(this.components,e)}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach(function(e){return e.destroy()})}},{key:"viewCount",get:function(){return this._views.length}}]),e}()).\u0275fac=function(e){return new(e||Dl)(Je(vl),Je(tl),Je(qo),Je(Hr),Je(ws),Je(Gu))},Dl.\u0275prov=H({token:Dl,factory:Dl.\u0275fac}),Dl);function Nl(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Ll=function e(){m(this,e)},Vl=function e(){m(this,e)},Ml={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},Fl=function(){var e=function(){function e(t,n){m(this,e),this._compiler=t,this._config=n||Ml}return l(e,[{key:"load",value:function(e){return this.loadAndCompile(e)}},{key:"loadAndCompile",value:function(e){var n=this,r=t(e.split("#"),2),i=r[0],o=r[1];return void 0===o&&(o="default"),s("zn8P")(i).then(function(e){return e[o]}).then(function(e){return Hl(e,i,o)}).then(function(e){return n._compiler.compileModuleAsync(e)})}},{key:"loadFactory",value:function(e){var n=t(e.split("#"),2),r=n[0],i=n[1],o="NgFactory";return void 0===i&&(i="default",o=""),s("zn8P")(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(function(e){return e[i+o]}).then(function(e){return Hl(e,r,i)})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(Je(hl),Je(Vl,8))},e.\u0275prov=H({token:e,factory:e.\u0275fac}),e}();function Hl(e,t,n){if(!e)throw new Error("Cannot find '".concat(n,"' in '").concat(t,"'"));return e}var Ul=function(e){return null},ql=Al(null,"core",[{provide:$u,useValue:"unknown"},{provide:Pl,deps:[qo]},{provide:Cl,deps:[]},{provide:tl,deps:[]}]),zl=[{provide:Rl,useClass:Rl,deps:[vl,tl,qo,Hr,ws,Gu]},{provide:pu,deps:[vl],useFactory:function(e){var t=[];return e.onStable.subscribe(function(){for(;t.length;)t.pop()()}),function(e){t.push(e)}}},{provide:Gu,useClass:Gu,deps:[[new D,Ku]]},{provide:hl,useClass:hl,deps:[]},Xu,{provide:zs,useFactory:function(){return Ys},deps:[]},{provide:Bs,useFactory:function(){return $s},deps:[]},{provide:nl,useFactory:function(e){return hs(e=e||"undefined"!=typeof $localize&&$localize.locale||"en-US"),e},deps:[[new I(nl),new D,new N]]},{provide:rl,useValue:"USD"}],Bl=function(){var e=function e(t){m(this,e)};return e.\u0275mod=Ie({type:e}),e.\u0275inj=U({factory:function(t){return new(t||e)(Je(Rl))},providers:zl}),e}()},gRHU:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("2fFW"),i=n("NJ4a"),o={closed:!0,next:function(e){},error:function(e){if(r.a.useDeprecatedSynchronousErrorHandling)throw e;Object(i.a)(e)},complete:function(){}}},jZKg:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("HDdC"),i=n("quSY");function o(e,t){return new r.a(function(n){var r=new i.a,o=0;return r.add(t.schedule(function(){o!==e.length?(n.next(e[o++]),n.closed||r.add(this.schedule())):n.complete()})),r})}},kJWO:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},lJxs:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n("7o/Q");function i(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new o(e,t))}}var o=function(){function e(t,n){m(this,e),this.project=t,this.thisArg=n}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new a(e,this.project,this.thisArg))}}]),e}(),a=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,e)).project=r,o.count=0,o.thisArg=i||p(o),o}return l(n,[{key:"_next",value:function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}]),n}(r.a)},n6bG:function(e,t,n){"use strict";function r(e){return"function"==typeof e}n.d(t,"a",function(){return r})},ngJS:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(e){return function(t){for(var n=0,r=e.length;n0&&void 0!==arguments[0]&&arguments[0],t=this._platformLocation.pathname+S(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?"".concat(t).concat(n):t}},{key:"pushState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+S(r));this._platformLocation.pushState(e,t,i)}},{key:"replaceState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+S(r));this._platformLocation.replaceState(e,t,i)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(E);return e.\u0275fac=function(t){return new(t||e)(o.Qb(p),o.Qb(T,8))},e.\u0275prov=o.Db({token:e,factory:e.\u0275fac}),e}(),A=function(){var e=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this))._platformLocation=e,i._baseHref="",null!=r&&(i._baseHref=r),i}return l(n,[{key:"onPopState",value:function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"path",value:function(){var e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}},{key:"prepareExternalUrl",value:function(e){var t=w(this._baseHref,e);return t.length>0?"#"+t:t}},{key:"pushState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+S(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(e,t,i)}},{key:"replaceState",value:function(e,t,n,r){var i=this.prepareExternalUrl(n+S(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,i)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(E);return e.\u0275fac=function(t){return new(t||e)(o.Qb(p),o.Qb(T,8))},e.\u0275prov=o.Db({token:e,factory:e.\u0275fac}),e}(),j=function(){var e=function(){function e(t,n){var r=this;m(this,e),this._subject=new o.n,this._urlChangeListeners=[],this._platformStrategy=t;var i=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=C(I(i)),this._platformStrategy.onPopState(function(e){r._subject.emit({url:r.path(!0),pop:!0,state:e.state,type:e.type})})}return l(e,[{key:"path",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.normalize(this._platformStrategy.path(e))}},{key:"getState",value:function(){return this._platformLocation.getState()}},{key:"isCurrentPathEqualTo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.path()==this.normalize(e+S(t))}},{key:"normalize",value:function(t){return e.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,I(t)))}},{key:"prepareExternalUrl",value:function(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}},{key:"go",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+S(t)),n)}},{key:"replaceState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+S(t)),n)}},{key:"forward",value:function(){this._platformStrategy.forward()}},{key:"back",value:function(){this._platformStrategy.back()}},{key:"onUrlChange",value:function(e){var t=this;this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(function(e){t._notifyUrlChangeListeners(e.url,e.state)}))}},{key:"_notifyUrlChangeListeners",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;this._urlChangeListeners.forEach(function(n){return n(e,t)})}},{key:"subscribe",value:function(e,t,n){return this._subject.subscribe({next:e,error:t,complete:n})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(o.Qb(E),o.Qb(p))},e.normalizeQueryParams=S,e.joinWithSlash=w,e.stripTrailingSlash=C,e.\u0275prov=Object(o.Db)({factory:P,token:e,providedIn:"root"}),e}();function P(){return new j(Object(o.Qb)(E),Object(o.Qb)(p))}function I(e){return e.replace(/\/index.html$/,"")}var D=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}({}),R=o.kb,N=function e(){m(this,e)},L=function(){var e=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this)).locale=e,r}return l(n,[{key:"getPluralCategory",value:function(e,t){switch(R(t||this.locale)(e)){case D.Zero:return"zero";case D.One:return"one";case D.Two:return"two";case D.Few:return"few";case D.Many:return"many";default:return"other"}}}]),n}(N);return e.\u0275fac=function(t){return new(t||e)(o.Qb(o.u))},e.\u0275prov=o.Db({token:e,factory:e.\u0275fac}),e}();function V(e,n){n=encodeURIComponent(n);var r,o=i(e.split(";"));try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.indexOf("="),u=t(-1==s?[a,""]:[a.slice(0,s),a.slice(s+1)],2),l=u[0],c=u[1];if(l.trim()===n)return decodeURIComponent(c)}}catch(h){o.e(h)}finally{o.f()}return null}var M=function(){var e=function(){function e(t,n,r,i){m(this,e),this._iterableDiffers=t,this._keyValueDiffers=n,this._ngEl=r,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return l(e,[{key:"ngDoCheck",value:function(){if(this._iterableDiffer){var e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){var t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}},{key:"_applyKeyValueChanges",value:function(e){var t=this;e.forEachAddedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachChangedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){e.previousValue&&t._toggleClass(e.key,!1)})}},{key:"_applyIterableChanges",value:function(e){var t=this;e.forEachAddedItem(function(e){if("string"!=typeof e.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Object(o.sb)(e.item));t._toggleClass(e.item,!0)}),e.forEachRemovedItem(function(e){return t._toggleClass(e.item,!1)})}},{key:"_applyClasses",value:function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach(function(e){return t._toggleClass(e,!0)}):Object.keys(e).forEach(function(n){return t._toggleClass(n,!!e[n])}))}},{key:"_removeClasses",value:function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach(function(e){return t._toggleClass(e,!1)}):Object.keys(e).forEach(function(e){return t._toggleClass(e,!1)}))}},{key:"_toggleClass",value:function(e,t){var n=this;(e=e.trim())&&e.split(/\s+/g).forEach(function(e){t?n._renderer.addClass(n._ngEl.nativeElement,e):n._renderer.removeClass(n._ngEl.nativeElement,e)})}},{key:"klass",set:function(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}},{key:"ngClass",set:function(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(Object(o.nb)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}}]),e}();return e.\u0275fac=function(t){return new(t||e)(o.Hb(o.s),o.Hb(o.t),o.Hb(o.l),o.Hb(o.D))},e.\u0275dir=o.Cb({type:e,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),e}(),F=function(){function e(t,n,r,i){m(this,e),this.$implicit=t,this.ngForOf=n,this.index=r,this.count=i}return l(e,[{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}}]),e}(),H=function(){var e=function(){function e(t,n,r){m(this,e),this._viewContainer=t,this._template=n,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return l(e,[{key:"ngDoCheck",value:function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var e=this._ngForOf;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(r){throw new Error("Cannot find a differ supporting object '".concat(e,"' of type '").concat((t=e).name||typeof t,"'. NgFor only supports binding to Iterables such as Arrays."))}}var t;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}},{key:"_applyChanges",value:function(e){var t=this,n=[];e.forEachOperation(function(e,r,i){if(null==e.previousIndex){var o=t._viewContainer.createEmbeddedView(t._template,new F(null,t._ngForOf,-1,-1),null===i?void 0:i),a=new U(e,o);n.push(a)}else if(null==i)t._viewContainer.remove(null===r?void 0:r);else if(null!==r){var s=t._viewContainer.get(r);t._viewContainer.move(s,i);var u=new U(e,s);n.push(u)}});for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:0;return t>0?c(g(n.prototype),"schedule",this).call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}},{key:"execute",value:function(e,t){return t>0||this.closed?c(g(n.prototype),"execute",this).call(this,e,t):this._execute(e,t)}},{key:"requestAsyncId",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==r&&r>0||null===r&&this.delay>0?c(g(n.prototype),"requestAsyncId",this).call(this,e,t,r):e.flush(this)}}]),n}(r("3N8a").a),w=new(function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return n}(r("IjjT").a))(k),C=r("quSY"),S=r("7o/Q"),E=r("EY2u"),O=r("z6cu"),T=((f=function(){function e(t,n,r){m(this,e),this.kind=t,this.value=n,this.error=r,this.hasValue="N"===t}return l(e,[{key:"observe",value:function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}},{key:"do",value:function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}}},{key:"accept",value:function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)}},{key:"toObservable",value:function(){switch(this.kind){case"N":return Object(a.a)(this.value);case"E":return Object(O.a)(this.error);case"C":return Object(E.b)()}throw new Error("unexpected notification kind value")}}],[{key:"createNext",value:function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification}},{key:"createError",value:function(t){return new e("E",void 0,t)}},{key:"createComplete",value:function(){return e.completeNotification}}]),e}()).completeNotification=new f("C"),f.undefinedValueNotification=new f("N",void 0),f),x=function(e){h(n,e);var t=d(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return m(this,n),(i=t.call(this,e)).scheduler=r,i.delay=o,i}return l(n,[{key:"scheduleMessage",value:function(e){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new A(e,this.destination)))}},{key:"_next",value:function(e){this.scheduleMessage(T.createNext(e))}},{key:"_error",value:function(e){this.scheduleMessage(T.createError(e)),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleMessage(T.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(e){var t=e.notification,n=e.destination;t.observe(n),this.unsubscribe()}}]),n}(S.a),A=function e(t,n){m(this,e),this.notification=t,this.destination=n},j=r("9ppp"),P=r("Ylt2"),I=function(e){h(n,e);var t=d(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,o=arguments.length>2?arguments[2]:void 0;return m(this,n),(e=t.call(this)).scheduler=o,e._events=[],e._infiniteTimeWindow=!1,e._bufferSize=r<1?1:r,e._windowTime=i<1?1:i,i===Number.POSITIVE_INFINITY?(e._infiniteTimeWindow=!0,e.next=e.nextInfiniteTimeWindow):e.next=e.nextTimeWindow,e}return l(n,[{key:"nextInfiniteTimeWindow",value:function(e){if(!this.isStopped){var t=this._events;t.push(e),t.length>this._bufferSize&&t.shift()}c(g(n.prototype),"next",this).call(this,e)}},{key:"nextTimeWindow",value:function(e){this.isStopped||(this._events.push(new D(this._getNow(),e)),this._trimBufferThenGetEvents()),c(g(n.prototype),"next",this).call(this,e)}},{key:"_subscribe",value:function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new j.a;if(this.isStopped||this.hasError?t=C.a.EMPTY:(this.observers.push(e),t=new P.a(this,e)),i&&e.add(e=new x(e,i)),n)for(var a=0;at&&(o=Math.max(o,i-t)),o>0&&r.splice(0,o),r}}]),n}(_.a),D=function e(t,n){m(this,e),this.time=t,this.value=n};function R(e,t,n){var r;return r=e&&"object"==typeof e?e:{bufferSize:e,windowTime:t,refCount:!1,scheduler:n},function(e){return e.lift(function(e){var t,n,r=e.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=e.windowTime,a=void 0===o?Number.POSITIVE_INFINITY:o,s=e.refCount,u=e.scheduler,l=0,c=!1,h=!1;return function(e){var r;l++,!t||c?(c=!1,t=new I(i,a,u),r=t.subscribe(this),n=e.subscribe({next:function(e){t.next(e)},error:function(e){c=!0,t.error(e)},complete:function(){h=!0,n=void 0,t.complete()}})):r=t.subscribe(this),this.add(function(){l--,r.unsubscribe(),n&&!h&&s&&0===l&&(n.unsubscribe(),n=void 0,t=void 0)})}}(r))}}var N,L,V=r("lJxs"),M=r("bOdf"),F=r("eIep"),H=function e(){m(this,e)},U=((N=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"getTranslation",value:function(e){return Object(a.a)({})}}]),n}(H)).\u0275fac=function(e){return q(e||N)},N.\u0275prov=o.Db({token:N,factory:N.\u0275fac}),N),q=o.Ob(U),z=function e(){m(this,e)},B=((L=function(){function e(){m(this,e)}return l(e,[{key:"handle",value:function(e){return e.key}}]),e}()).\u0275fac=function(e){return new(e||L)},L.\u0275prov=o.Db({token:L,factory:L.\u0275fac}),L);function Q(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n,r,i,o=typeof e;if(o==typeof t&&"object"==o){if(!Array.isArray(e)){if(Array.isArray(t))return!1;for(r in i=Object.create(null),e){if(!Q(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i)&&void 0!==t[r])return!1;return!0}if(!Array.isArray(t))return!1;if((n=e.length)==t.length){for(r=0;r5&&void 0!==arguments[5])||arguments[5],u=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=arguments.length>8?arguments[8]:void 0;m(this,e),this.store=t,this.currentLoader=n,this.compiler=r,this.parser=i,this.missingTranslationHandler=a,this.useDefaultLang=s,this.isolate=u,this.extend=l,this.pending=!1,this._onTranslationChange=new o.n,this._onLangChange=new o.n,this._onDefaultLangChange=new o.n,this._langs=[],this._translations={},this._translationRequests={},c&&this.setDefaultLang(c)}return l(e,[{key:"setDefaultLang",value:function(e){var t=this;if(e!==this.defaultLang){var n=this.retrieveTranslations(e);void 0!==n?(null==this.defaultLang&&(this.defaultLang=e),n.pipe(Object(b.a)(1)).subscribe(function(n){t.changeDefaultLang(e)})):this.changeDefaultLang(e)}}},{key:"getDefaultLang",value:function(){return this.defaultLang}},{key:"use",value:function(e){var t=this;if(e===this.currentLang)return Object(a.a)(this.translations[e]);var n=this.retrieveTranslations(e);return void 0!==n?(this.currentLang||(this.currentLang=e),n.pipe(Object(b.a)(1)).subscribe(function(n){t.changeLang(e)}),n):(this.changeLang(e),Object(a.a)(this.translations[e]))}},{key:"retrieveTranslations",value:function(e){var t;return(void 0===this.translations[e]||this.extend)&&(this._translationRequests[e]=this._translationRequests[e]||this.getTranslation(e),t=this._translationRequests[e]),t}},{key:"getTranslation",value:function(e){var t=this;this.pending=!0;var n=this.currentLoader.getTranslation(e).pipe(R(1),Object(b.a)(1));return this.loadingTranslations=n.pipe(Object(V.a)(function(n){return t.compiler.compileTranslations(n,e)}),R(1),Object(b.a)(1)),this.loadingTranslations.subscribe({next:function(n){t.translations[e]=t.extend&&t.translations[e]?Object.assign(Object.assign({},n),t.translations[e]):n,t.updateLangs(),t.pending=!1},error:function(e){t.pending=!1}}),n}},{key:"setTranslation",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=this.compiler.compileTranslations(t,e),this.translations[e]=(n||this.extend)&&this.translations[e]?G(this.translations[e],t):t,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}},{key:"getLangs",value:function(){return this.langs}},{key:"addLangs",value:function(e){var t=this;e.forEach(function(e){-1===t.langs.indexOf(e)&&t.langs.push(e)})}},{key:"updateLangs",value:function(){this.addLangs(Object.keys(this.translations))}},{key:"getParsedResult",value:function(e,t,n){var r;if(t instanceof Array){var o,s={},l=!1,c=i(t);try{for(c.s();!(o=c.n()).done;){var h=o.value;s[h]=this.getParsedResult(e,h,n),u(s[h])&&(l=!0)}}catch(p){c.e(p)}finally{c.f()}if(l){var f=t.map(function(e){return u(s[e])?s[e]:Object(a.a)(s[e])});return Object(v.a)(f).pipe(Object(V.a)(function(e){var n={};return e.forEach(function(e,r){n[t[r]]=e}),n}))}return s}if(e&&(r=this.parser.interpolate(this.parser.getValue(e,t),n)),void 0===r&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],t),n)),void 0===r){var d={key:t,translateService:this};void 0!==n&&(d.interpolateParams=n),r=this.missingTranslationHandler.handle(d)}return void 0!==r?r:t}},{key:"get",value:function(e,t){var n=this;if(!W(e)||!e.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(Object(M.a)(function(r){return u(r=n.getParsedResult(r,e,t))?r:Object(a.a)(r)}));var r=this.getParsedResult(this.translations[this.currentLang],e,t);return u(r)?r:Object(a.a)(r)}},{key:"getStreamOnTranslationChange",value:function(e,t){var n=this;if(!W(e)||!e.length)throw new Error('Parameter "key" required');return Object(p.a)(Object(y.a)(function(){return n.get(e,t)}),this.onTranslationChange.pipe(Object(F.a)(function(r){var i=n.getParsedResult(r.translations,e,t);return"function"==typeof i.subscribe?i:Object(a.a)(i)})))}},{key:"stream",value:function(e,t){var n=this;if(!W(e)||!e.length)throw new Error('Parameter "key" required');return Object(p.a)(Object(y.a)(function(){return n.get(e,t)}),this.onLangChange.pipe(Object(F.a)(function(r){var i=n.getParsedResult(r.translations,e,t);return u(i)?i:Object(a.a)(i)})))}},{key:"instant",value:function(e,t){if(!W(e)||!e.length)throw new Error('Parameter "key" required');var n=this.getParsedResult(this.translations[this.currentLang],e,t);if(u(n)){if(e instanceof Array){var r={};return e.forEach(function(t,n){r[e[n]]=e[n]}),r}return e}return n}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.currentLang;this.translations[n][e]=this.compiler.compile(t,n),this.updateLangs(),this.onTranslationChange.emit({lang:n,translations:this.translations[n]})}},{key:"changeLang",value:function(e){this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),null==this.defaultLang&&this.changeDefaultLang(e)}},{key:"changeDefaultLang",value:function(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}},{key:"reloadLang",value:function(e){return this.resetLang(e),this.getTranslation(e)}},{key:"resetLang",value:function(e){this._translationRequests[e]=void 0,this.translations[e]=void 0}},{key:"getBrowserLang",value:function(){if("undefined"!=typeof window&&void 0!==window.navigator){var e=window.navigator.languages?window.navigator.languages[0]:null;return void 0!==(e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage)?(-1!==e.indexOf("-")&&(e=e.split("-")[0]),-1!==e.indexOf("_")&&(e=e.split("_")[0]),e):void 0}}},{key:"getBrowserCultureLang",value:function(){if("undefined"!=typeof window&&void 0!==window.navigator){var e=window.navigator.languages?window.navigator.languages[0]:null;return e=e||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}}},{key:"onTranslationChange",get:function(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}},{key:"onLangChange",get:function(){return this.isolate?this._onLangChange:this.store.onLangChange}},{key:"onDefaultLangChange",get:function(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}},{key:"defaultLang",get:function(){return this.isolate?this._defaultLang:this.store.defaultLang},set:function(e){this.isolate?this._defaultLang=e:this.store.defaultLang=e}},{key:"currentLang",get:function(){return this.isolate?this._currentLang:this.store.currentLang},set:function(e){this.isolate?this._currentLang=e:this.store.currentLang=e}},{key:"langs",get:function(){return this.isolate?this._langs:this.store.langs},set:function(e){this.isolate?this._langs=e:this.store.langs=e}},{key:"translations",get:function(){return this.isolate?this._translations:this.store.translations},set:function(e){this.isolate?this._translations=e:this.store.translations=e}}]),e}()).\u0275fac=function(e){return new(e||$)(o.Qb(ae),o.Qb(H),o.Qb(re),o.Qb(ee),o.Qb(z),o.Qb(ue),o.Qb(se),o.Qb(ce),o.Qb(le))},$.\u0275prov=o.Db({token:$,factory:$.\u0275fac}),$),fe=((Y=function(){function e(t,n){m(this,e),this.translate=t,this._ref=n,this.value=""}return l(e,[{key:"updateValue",value:function(e,t,n){var r=this,i=function(t){r.value=void 0!==t?t:e,r.lastKey=e,r._ref.markForCheck()};if(n){var o=this.translate.getParsedResult(n,e,t);u(o.subscribe)?o.subscribe(i):i(o)}this.translate.get(e,t).subscribe(i)}},{key:"transform",value:function(e){var t,n=this;if(!e||!e.length)return e;for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.loader||{provide:H,useClass:U},t.compiler||{provide:re,useClass:ie},t.parser||{provide:ee,useClass:te},t.missingTranslationHandler||{provide:z,useClass:B},ae,{provide:se,useValue:t.isolate},{provide:ue,useValue:t.useDefaultLang},{provide:ce,useValue:t.extend},{provide:le,useValue:t.defaultLanguage},he]}}},{key:"forChild",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.loader||{provide:H,useClass:U},t.compiler||{provide:re,useClass:ie},t.parser||{provide:ee,useClass:te},t.missingTranslationHandler||{provide:z,useClass:B},{provide:se,useValue:t.isolate},{provide:ue,useValue:t.useDefaultLang},{provide:ce,useValue:t.extend},{provide:le,useValue:t.defaultLanguage},he]}}}]),e}()).\u0275mod=o.Fb({type:J}),J.\u0275inj=o.Eb({factory:function(e){return new(e||J)}}),J)},"tk/3":function(e,n,r){"use strict";r.d(n,"a",function(){return R}),r.d(n,"b",function(){return I}),r.d(n,"c",function(){return K}),r.d(n,"d",function(){return j}),r.d(n,"e",function(){return A});var i=r("fXoL"),a=r("LRne"),s=r("HDdC"),u=r("bOdf"),c=r("pLZG"),f=r("lJxs"),v=r("ofXK"),p=function e(){m(this,e)},y=function e(){m(this,e)},g=function(){function e(t){var n=this;m(this,e),this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?function(){n.headers=new Map,t.split("\n").forEach(function(e){var t=e.indexOf(":");if(t>0){var r=e.slice(0,t),i=r.toLowerCase(),o=e.slice(t+1).trim();n.maybeSetNormalizedName(r,i),n.headers.has(i)?n.headers.get(i).push(o):n.headers.set(i,[o])}})}:function(){n.headers=new Map,Object.keys(t).forEach(function(e){var r=t[e],i=e.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(n.headers.set(i,r),n.maybeSetNormalizedName(e,i))})}:this.headers=new Map}return l(e,[{key:"has",value:function(e){return this.init(),this.headers.has(e.toLowerCase())}},{key:"get",value:function(e){this.init();var t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}},{key:"keys",value:function(){return this.init(),Array.from(this.normalizedNames.values())}},{key:"getAll",value:function(e){return this.init(),this.headers.get(e.toLowerCase())||null}},{key:"append",value:function(e,t){return this.clone({name:e,value:t,op:"a"})}},{key:"set",value:function(e,t){return this.clone({name:e,value:t,op:"s"})}},{key:"delete",value:function(e,t){return this.clone({name:e,value:t,op:"d"})}},{key:"maybeSetNormalizedName",value:function(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}},{key:"init",value:function(){var t=this;this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(e){return t.applyUpdate(e)}),this.lazyUpdate=null))}},{key:"copyFrom",value:function(e){var t=this;e.init(),Array.from(e.headers.keys()).forEach(function(n){t.headers.set(n,e.headers.get(n)),t.normalizedNames.set(n,e.normalizedNames.get(n))})}},{key:"clone",value:function(t){var n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}},{key:"applyUpdate",value:function(e){var t=e.name.toLowerCase();switch(e.op){case"a":case"s":var n=e.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(e.name,t);var r=("a"===e.op?this.headers.get(t):void 0)||[];r.push.apply(r,o(n)),this.headers.set(t,r);break;case"d":var i=e.value;if(i){var a=this.headers.get(t);if(!a)return;0===(a=a.filter(function(e){return-1===i.indexOf(e)})).length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,a)}else this.headers.delete(t),this.normalizedNames.delete(t)}}},{key:"forEach",value:function(e){var t=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return e(t.normalizedNames.get(n),t.headers.get(n))})}}]),e}(),b=function(){function e(){m(this,e)}return l(e,[{key:"encodeKey",value:function(e){return _(e)}},{key:"encodeValue",value:function(e){return _(e)}},{key:"decodeKey",value:function(e){return decodeURIComponent(e)}},{key:"decodeValue",value:function(e){return decodeURIComponent(e)}}]),e}();function _(e){return encodeURIComponent(e).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 k=function(){function e(){var n,r,i,o=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(m(this,e),this.updates=null,this.cloneFrom=null,this.encoder=a.encoder||new b,a.fromString){if(a.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=(n=a.fromString,r=this.encoder,i=new Map,n.length>0&&n.split("&").forEach(function(e){var n=e.indexOf("="),o=t(-1==n?[r.decodeKey(e),""]:[r.decodeKey(e.slice(0,n)),r.decodeValue(e.slice(n+1))],2),a=o[0],s=o[1],u=i.get(a)||[];u.push(s),i.set(a,u)}),i)}else a.fromObject?(this.map=new Map,Object.keys(a.fromObject).forEach(function(e){var t=a.fromObject[e];o.map.set(e,Array.isArray(t)?t:[t])})):this.map=null}return l(e,[{key:"has",value:function(e){return this.init(),this.map.has(e)}},{key:"get",value:function(e){this.init();var t=this.map.get(e);return t?t[0]:null}},{key:"getAll",value:function(e){return this.init(),this.map.get(e)||null}},{key:"keys",value:function(){return this.init(),Array.from(this.map.keys())}},{key:"append",value:function(e,t){return this.clone({param:e,value:t,op:"a"})}},{key:"set",value:function(e,t){return this.clone({param:e,value:t,op:"s"})}},{key:"delete",value:function(e,t){return this.clone({param:e,value:t,op:"d"})}},{key:"toString",value:function(){var e=this;return this.init(),this.keys().map(function(t){var n=e.encoder.encodeKey(t);return e.map.get(t).map(function(t){return n+"="+e.encoder.encodeValue(t)}).join("&")}).filter(function(e){return""!==e}).join("&")}},{key:"clone",value:function(t){var n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([t]),n}},{key:"init",value:function(){var e=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(t){return e.map.set(t,e.cloneFrom.map.get(t))}),this.updates.forEach(function(t){switch(t.op){case"a":case"s":var n=("a"===t.op?e.map.get(t.param):void 0)||[];n.push(t.value),e.map.set(t.param,n);break;case"d":if(void 0===t.value){e.map.delete(t.param);break}var r=e.map.get(t.param)||[],i=r.indexOf(t.value);-1!==i&&r.splice(i,1),r.length>0?e.map.set(t.param,r):e.map.delete(t.param)}}),this.cloneFrom=this.updates=null)}}]),e}();function w(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function C(e){return"undefined"!=typeof Blob&&e instanceof Blob}function S(e){return"undefined"!=typeof FormData&&e instanceof FormData}var E=function(){function e(t,n,r,i){var o;if(m(this,e),this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==r?r:null,o=i):o=r,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 g),this.params){var a=this.params.toString();if(0===a.length)this.urlWithParams=n;else{var s=n.indexOf("?");this.urlWithParams=n+(-1===s?"?":s0&&void 0!==arguments[0]?arguments[0]:{},n=t.method||this.method,r=t.url||this.url,i=t.responseType||this.responseType,o=void 0!==t.body?t.body:this.body,a=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,s=void 0!==t.reportProgress?t.reportProgress:this.reportProgress,u=t.headers||this.headers,l=t.params||this.params;return void 0!==t.setHeaders&&(u=Object.keys(t.setHeaders).reduce(function(e,n){return e.set(n,t.setHeaders[n])},u)),t.setParams&&(l=Object.keys(t.setParams).reduce(function(e,n){return e.set(n,t.setParams[n])},l)),new e(n,r,o,{params:l,headers:u,reportProgress:s,responseType:i,withCredentials:a})}}]),e}(),O=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}({}),T=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";m(this,e),this.headers=t.headers||new g,this.status=void 0!==t.status?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.ok=this.status>=200&&this.status<300},x=function(e){h(n,e);var t=d(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m(this,n),(e=t.call(this,r)).type=O.ResponseHeader,e}return l(n,[{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}]),n}(T),A=function(e){h(n,e);var t=d(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m(this,n),(e=t.call(this,r)).type=O.Response,e.body=void 0!==r.body?r.body:null,e}return l(n,[{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}]),n}(T),j=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this,e,0,"Unknown Error")).name="HttpErrorResponse",r.ok=!1,r.message=r.status>=200&&r.status<300?"Http failure during parsing for "+(e.url||"(unknown url)"):"Http failure response for ".concat(e.url||"(unknown url)",": ").concat(e.status," ").concat(e.statusText),r.error=e.error||null,r}return n}(T);function P(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}var I=function(){var e=function(){function e(t){m(this,e),this.handler=t}return l(e,[{key:"request",value:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof E)n=e;else{var o=void 0;o=i.headers instanceof g?i.headers:new g(i.headers);var s=void 0;i.params&&(s=i.params instanceof k?i.params:new k({fromObject:i.params})),n=new E(e,t,void 0!==i.body?i.body:null,{headers:o,params:s,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials})}var l=Object(a.a)(n).pipe(Object(u.a)(function(e){return r.handler.handle(e)}));if(e instanceof E||"events"===i.observe)return l;var h=l.pipe(Object(c.a)(function(e){return e instanceof A}));switch(i.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return h.pipe(Object(f.a)(function(e){if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body}));case"blob":return h.pipe(Object(f.a)(function(e){if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body}));case"text":return h.pipe(Object(f.a)(function(e){if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body}));case"json":default:return h.pipe(Object(f.a)(function(e){return e.body}))}case"response":return h;default:throw new Error("Unreachable: unhandled observe type ".concat(i.observe,"}"))}}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("DELETE",e,t)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("GET",e,t)}},{key:"head",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("HEAD",e,t)}},{key:"jsonp",value:function(e,t){return this.request("JSONP",e,{params:(new k).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}},{key:"options",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("OPTIONS",e,t)}},{key:"patch",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PATCH",e,P(n,t))}},{key:"post",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",e,P(n,t))}},{key:"put",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",e,P(n,t))}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Qb(p))},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),D=function(){function e(t,n){m(this,e),this.next=t,this.interceptor=n}return l(e,[{key:"handle",value:function(e){return this.interceptor.intercept(e,this.next)}}]),e}(),R=new i.q("HTTP_INTERCEPTORS"),N=function(){var e=function(){function e(){m(this,e)}return l(e,[{key:"intercept",value:function(e,t){return t.handle(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),L=/^\)\]\}',?\n/,V=function e(){m(this,e)},M=function(){var e=function(){function e(){m(this,e)}return l(e,[{key:"build",value:function(){return new XMLHttpRequest}}]),e}();return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),F=function(){var e=function(){function e(t){m(this,e),this.xhrFactory=t}return l(e,[{key:"handle",value:function(e){var t=this;if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new s.a(function(n){var r=t.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach(function(e,t){return r.setRequestHeader(e,t.join(","))}),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){var i=e.detectContentTypeHeader();null!==i&&r.setRequestHeader("Content-Type",i)}if(e.responseType){var o=e.responseType.toLowerCase();r.responseType="json"!==o?o:"text"}var a=e.serializeBody(),s=null,u=function(){if(null!==s)return s;var t=1223===r.status?204:r.status,n=r.statusText||"OK",i=new g(r.getAllResponseHeaders()),o=function(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new x({headers:i,status:t,statusText:n,url:o})},l=function(){var t=u(),i=t.headers,o=t.status,a=t.statusText,s=t.url,l=null;204!==o&&(l=void 0===r.response?r.responseText:r.response),0===o&&(o=l?200:0);var c=o>=200&&o<300;if("json"===e.responseType&&"string"==typeof l){var h=l;l=l.replace(L,"");try{l=""!==l?JSON.parse(l):null}catch(f){l=h,c&&(c=!1,l={error:f,text:l})}}c?(n.next(new A({body:l,headers:i,status:o,statusText:a,url:s||void 0})),n.complete()):n.error(new j({error:l,headers:i,status:o,statusText:a,url:s||void 0}))},c=function(e){var t=u().url,i=new j({error:e,status:r.status||0,statusText:r.statusText||"Unknown Error",url:t||void 0});n.error(i)},h=!1,f=function(t){h||(n.next(u()),h=!0);var i={type:O.DownloadProgress,loaded:t.loaded};t.lengthComputable&&(i.total=t.total),"text"===e.responseType&&r.responseText&&(i.partialText=r.responseText),n.next(i)},d=function(e){var t={type:O.UploadProgress,loaded:e.loaded};e.lengthComputable&&(t.total=e.total),n.next(t)};return r.addEventListener("load",l),r.addEventListener("error",c),e.reportProgress&&(r.addEventListener("progress",f),null!==a&&r.upload&&r.upload.addEventListener("progress",d)),r.send(a),n.next({type:O.Sent}),function(){r.removeEventListener("error",c),r.removeEventListener("load",l),e.reportProgress&&(r.removeEventListener("progress",f),null!==a&&r.upload&&r.upload.removeEventListener("progress",d)),r.readyState!==r.DONE&&r.abort()}})}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Qb(V))},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),H=new i.q("XSRF_COOKIE_NAME"),U=new i.q("XSRF_HEADER_NAME"),q=function e(){m(this,e)},z=function(){var e=function(){function e(t,n,r){m(this,e),this.doc=t,this.platform=n,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return l(e,[{key:"getToken",value:function(){if("server"===this.platform)return null;var e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Object(v.t)(e,this.cookieName),this.lastCookieString=e),this.lastToken}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Qb(v.c),i.Qb(i.B),i.Qb(H))},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),B=function(){var e=function(){function e(t,n){m(this,e),this.tokenService=t,this.headerName=n}return l(e,[{key:"intercept",value:function(e,t){var n=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t.handle(e);var r=this.tokenService.getToken();return null===r||e.headers.has(this.headerName)||(e=e.clone({headers:e.headers.set(this.headerName,r)})),t.handle(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Qb(q),i.Qb(U))},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),Q=function(){var e=function(){function e(t,n){m(this,e),this.backend=t,this.injector=n,this.chain=null}return l(e,[{key:"handle",value:function(e){if(null===this.chain){var t=this.injector.get(R,[]);this.chain=t.reduceRight(function(e,t){return new D(e,t)},this.backend)}return this.chain.handle(e)}}]),e}();return e.\u0275fac=function(t){return new(t||e)(i.Qb(y),i.Qb(i.r))},e.\u0275prov=i.Db({token:e,factory:e.\u0275fac}),e}(),W=function(){var e=function(){function e(){m(this,e)}return l(e,null,[{key:"disable",value:function(){return{ngModule:e,providers:[{provide:B,useClass:N}]}}},{key:"withOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:e,providers:[t.cookieName?{provide:H,useValue:t.cookieName}:[],t.headerName?{provide:U,useValue:t.headerName}:[]]}}}]),e}();return e.\u0275mod=i.Fb({type:e}),e.\u0275inj=i.Eb({factory:function(t){return new(t||e)},providers:[B,{provide:R,useExisting:B,multi:!0},{provide:q,useClass:z},{provide:H,useValue:"XSRF-TOKEN"},{provide:U,useValue:"X-XSRF-TOKEN"}]}),e}(),K=function(){var e=function e(){m(this,e)};return e.\u0275mod=i.Fb({type:e}),e.\u0275inj=i.Eb({factory:function(t){return new(t||e)},providers:[I,{provide:p,useClass:Q},F,{provide:y,useExisting:F},M,{provide:V,useExisting:M}],imports:[[W.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),e}()},tyNb:function(e,n,r){"use strict";r.d(n,"a",function(){return Ln}),r.d(n,"b",function(){return Bn}),r.d(n,"c",function(){return Mn}),r.d(n,"d",function(){return nr}),r.d(n,"e",function(){return Qn});var a=r("ofXK"),s=r("fXoL"),u=r("LRne"),f=r("Cfvw"),v=r("2Vo4"),y=r("z+Ro"),b=r("DH7j"),_=r("7o/Q"),k=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"notifyNext",value:function(e,t,n,r,i){this.destination.next(t)}},{key:"notifyError",value:function(e,t){this.destination.error(e)}},{key:"notifyComplete",value:function(e){this.destination.complete()}}]),n}(_.a),w=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this)).parent=e,o.outerValue=r,o.outerIndex=i,o.index=0,o}return l(n,[{key:"_next",value:function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}},{key:"_error",value:function(e){this.parent.notifyError(e,this),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(this),this.unsubscribe()}}]),n}(_.a),C=r("SeVD"),S=r("HDdC");function E(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new w(e,n,r);if(!i.closed)return t instanceof S.a?t.subscribe(i):Object(C.a)(t)(i)}var O=r("yCtX"),T={},x=function(){function e(t){m(this,e),this.resultSelector=t}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new A(e,this.resultSelector))}}]),e}(),A=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).resultSelector=r,i.active=0,i.values=[],i.observables=[],i}return l(n,[{key:"_next",value:function(e){this.values.push(T),this.observables.push(e)}},{key:"_complete",value:function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i2&&void 0!==arguments[2]&&arguments[2];m(this,e),this.accumulator=t,this.seed=n,this.hasSeed=r}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new G(e,this.accumulator,this.seed,this.hasSeed))}}]),e}(),G=function(e){h(n,e);var t=d(n);function n(e,r,i,o){var a;return m(this,n),(a=t.call(this,e)).accumulator=r,a._seed=i,a.hasSeed=o,a.index=0,a}return l(n,[{key:"_next",value:function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}},{key:"_tryNext",value:function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(r){this.destination.error(r)}this.seed=t,this.destination.next(t)}},{key:"seed",get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e}}]),n}(_.a),Z=r("zx2A");function X(e){return function(t){var n=new J(e),r=t.lift(n);return n.caught=r}}var J=function(){function e(t){m(this,e),this.selector=t}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new Y(e,this.selector,this.caught))}}]),e}(),Y=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,e)).selector=r,o.caught=i,o}return l(n,[{key:"error",value:function(e){if(!this.isStopped){var t;try{t=this.selector(e,this.caught)}catch(o){return void c(g(n.prototype),"error",this).call(this,o)}this._unsubscribeAndRecycle();var r=new Z.a(this);this.add(r);var i=Object(Z.c)(t,r);i!==r&&this.add(i)}}}]),n}(Z.b),$=r("bOdf"),ee=r("SxV6"),te=r("5+tZ"),ne=r("vkgz"),re=r("quSY"),ie=function(){function e(t){m(this,e),this.callback=t}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new oe(e,this.callback))}}]),e}(),oe=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).add(new re.a(r)),i}return n}(_.a),ae=r("bHdf"),se=function e(t,n){m(this,e),this.id=t,this.url=n},ue=function(e){h(n,e);var t=d(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"imperative",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return m(this,n),(i=t.call(this,e,r)).navigationTrigger=o,i.restoredState=a,i}return l(n,[{key:"toString",value:function(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(se),le=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,e,r)).urlAfterRedirects=i,o}return l(n,[{key:"toString",value:function(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}}]),n}(se),ce=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,e,r)).reason=i,o}return l(n,[{key:"toString",value:function(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(se),he=function(e){h(n,e);var t=d(n);function n(e,r,i){var o;return m(this,n),(o=t.call(this,e,r)).error=i,o}return l(n,[{key:"toString",value:function(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}}]),n}(se),fe=function(e){h(n,e);var t=d(n);function n(e,r,i,o){var a;return m(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return l(n,[{key:"toString",value:function(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(se),de=function(e){h(n,e);var t=d(n);function n(e,r,i,o){var a;return m(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return l(n,[{key:"toString",value:function(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(se),ve=function(e){h(n,e);var t=d(n);function n(e,r,i,o,a){var s;return m(this,n),(s=t.call(this,e,r)).urlAfterRedirects=i,s.state=o,s.shouldActivate=a,s}return l(n,[{key:"toString",value:function(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}}]),n}(se),pe=function(e){h(n,e);var t=d(n);function n(e,r,i,o){var a;return m(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return l(n,[{key:"toString",value:function(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(se),ye=function(e){h(n,e);var t=d(n);function n(e,r,i,o){var a;return m(this,n),(a=t.call(this,e,r)).urlAfterRedirects=i,a.state=o,a}return l(n,[{key:"toString",value:function(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(se),ge=function(){function e(t){m(this,e),this.route=t}return l(e,[{key:"toString",value:function(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}}]),e}(),me=function(){function e(t){m(this,e),this.route=t}return l(e,[{key:"toString",value:function(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}}]),e}(),be=function(){function e(t){m(this,e),this.snapshot=t}return l(e,[{key:"toString",value:function(){return"ChildActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),_e=function(){function e(t){m(this,e),this.snapshot=t}return l(e,[{key:"toString",value:function(){return"ChildActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),ke=function(){function e(t){m(this,e),this.snapshot=t}return l(e,[{key:"toString",value:function(){return"ActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),we=function(){function e(t){m(this,e),this.snapshot=t}return l(e,[{key:"toString",value:function(){return"ActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),e}(),Ce=function(){function e(t,n,r){m(this,e),this.routerEvent=t,this.position=n,this.anchor=r}return l(e,[{key:"toString",value:function(){return"Scroll(anchor: '".concat(this.anchor,"', position: '").concat(this.position?"".concat(this.position[0],", ").concat(this.position[1]):null,"')")}}]),e}(),Se=function(){function e(t){m(this,e),this.params=t||{}}return l(e,[{key:"has",value:function(e){return Object.prototype.hasOwnProperty.call(this.params,e)}},{key:"get",value:function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t[0]:t}return null}},{key:"getAll",value:function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t:[t]}return[]}},{key:"keys",get:function(){return Object.keys(this.params)}}]),e}();function Ee(e){return new Se(e)}function Oe(e){var t=Error("NavigationCancelingError: "+e);return t.ngNavigationCancelingError=!0,t}function Te(e,t,n){var r=n.path.split("/");if(r.length>e.length)return null;if("full"===n.pathMatch&&(t.hasChildren()||r.length0?e[e.length-1]:null}function Ie(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function De(e){return Object(s.ob)(e)?e:Object(s.pb)(e)?Object(f.a)(Promise.resolve(e)):Object(u.a)(e)}function Re(e,t,n){return n?function(e,t){return xe(e,t)}(e.queryParams,t.queryParams)&&Ne(e.root,t.root):function(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(function(n){return Ae(e[n],t[n])})}(e.queryParams,t.queryParams)&&Le(e.root,t.root)}function Ne(e,t){if(!Ue(e.segments,t.segments))return!1;if(e.numberOfChildren!==t.numberOfChildren)return!1;for(var n in t.children){if(!e.children[n])return!1;if(!Ne(e.children[n],t.children[n]))return!1}return!0}function Le(e,t){return Ve(e,t,t.segments)}function Ve(e,t,n){if(e.segments.length>n.length)return!!Ue(e.segments.slice(0,n.length),n)&&!t.hasChildren();if(e.segments.length===n.length){if(!Ue(e.segments,n))return!1;for(var r in t.children){if(!e.children[r])return!1;if(!Le(e.children[r],t.children[r]))return!1}return!0}var i=n.slice(0,e.segments.length),o=n.slice(e.segments.length);return!!Ue(e.segments,i)&&!!e.children.primary&&Ve(e.children.primary,t,o)}var Me=function(){function e(t,n,r){m(this,e),this.root=t,this.queryParams=n,this.fragment=r}return l(e,[{key:"toString",value:function(){return Qe.serialize(this)}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Ee(this.queryParams)),this._queryParamMap}}]),e}(),Fe=function(){function e(t,n){var r=this;m(this,e),this.segments=t,this.children=n,this.parent=null,Ie(n,function(e,t){return e.parent=r})}return l(e,[{key:"hasChildren",value:function(){return this.numberOfChildren>0}},{key:"toString",value:function(){return We(this)}},{key:"numberOfChildren",get:function(){return Object.keys(this.children).length}}]),e}(),He=function(){function e(t,n){m(this,e),this.path=t,this.parameters=n}return l(e,[{key:"toString",value:function(){return $e(this)}},{key:"parameterMap",get:function(){return this._parameterMap||(this._parameterMap=Ee(this.parameters)),this._parameterMap}}]),e}();function Ue(e,t){return e.length===t.length&&e.every(function(e,n){return e.path===t[n].path})}function qe(e,t){var n=[];return Ie(e.children,function(e,r){"primary"===r&&(n=n.concat(t(e,r)))}),Ie(e.children,function(e,r){"primary"!==r&&(n=n.concat(t(e,r)))}),n}var ze=function e(){m(this,e)},Be=function(){function e(){m(this,e)}return l(e,[{key:"parse",value:function(e){var t=new it(e);return new Me(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}},{key:"serialize",value:function(e){return"".concat("/"+Ke(e.root,!0)).concat((t=e.queryParams,n=Object.keys(t).map(function(e){var n=t[e];return Array.isArray(n)?n.map(function(t){return"".concat(Ze(e),"=").concat(Ze(t))}).join("&"):"".concat(Ze(e),"=").concat(Ze(n))}),n.length?"?"+n.join("&"):"")).concat("string"==typeof e.fragment?"#"+encodeURI(e.fragment):"");var t,n}}]),e}(),Qe=new Be;function We(e){return e.segments.map(function(e){return $e(e)}).join("/")}function Ke(e,t){if(!e.hasChildren())return We(e);if(t){var n=e.children.primary?Ke(e.children.primary,!1):"",r=[];return Ie(e.children,function(e,t){"primary"!==t&&r.push("".concat(t,":").concat(Ke(e,!1)))}),r.length>0?"".concat(n,"(").concat(r.join("//"),")"):n}var i=qe(e,function(t,n){return"primary"===n?[Ke(e.children.primary,!1)]:["".concat(n,":").concat(Ke(t,!1))]});return 1===Object.keys(e.children).length&&null!=e.children.primary?"".concat(We(e),"/").concat(i[0]):"".concat(We(e),"/(").concat(i.join("//"),")")}function Ge(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Ze(e){return Ge(e).replace(/%3B/gi,";")}function Xe(e){return Ge(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Je(e){return decodeURIComponent(e)}function Ye(e){return Je(e.replace(/\+/g,"%20"))}function $e(e){return"".concat(Xe(e.path)).concat((t=e.parameters,Object.keys(t).map(function(e){return";".concat(Xe(e),"=").concat(Xe(t[e]))}).join("")));var t}var et=/^[^\/()?;=#]+/;function tt(e){var t=e.match(et);return t?t[0]:""}var nt=/^[^=?&#]+/,rt=/^[^?&#]+/,it=function(){function e(t){m(this,e),this.url=t,this.remaining=t}return l(e,[{key:"parseRootSegment",value:function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Fe([],{}):new Fe([],this.parseChildren())}},{key:"parseQueryParams",value:function(){var e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}},{key:"parseFragment",value:function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}},{key:"parseChildren",value:function(){if(""===this.remaining)return{};this.consumeOptional("/");var e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());var t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n.primary=new Fe(e,t)),n}},{key:"parseSegment",value:function(){var e=tt(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '".concat(this.remaining,"'."));return this.capture(e),new He(Je(e),this.parseMatrixParams())}},{key:"parseMatrixParams",value:function(){for(var e={};this.consumeOptional(";");)this.parseParam(e);return e}},{key:"parseParam",value:function(e){var t=tt(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var r=tt(this.remaining);r&&(n=r,this.capture(n))}e[Je(t)]=Je(n)}}},{key:"parseQueryParam",value:function(e){var t=function(e){var t=e.match(nt);return t?t[0]:""}(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var r=function(e){var t=e.match(rt);return t?t[0]:""}(this.remaining);r&&(n=r,this.capture(n))}var i=Ye(t),o=Ye(n);if(e.hasOwnProperty(i)){var a=e[i];Array.isArray(a)||(a=[a],e[i]=a),a.push(o)}else e[i]=o}}},{key:"parseParens",value:function(e){var t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=tt(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error("Cannot parse url '".concat(this.url,"'"));var i=void 0;n.indexOf(":")>-1?(i=n.substr(0,n.indexOf(":")),this.capture(i),this.capture(":")):e&&(i="primary");var o=this.parseChildren();t[i]=1===Object.keys(o).length?o.primary:new Fe([],o),this.consumeOptional("//")}return t}},{key:"peekStartsWith",value:function(e){return this.remaining.startsWith(e)}},{key:"consumeOptional",value:function(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}},{key:"capture",value:function(e){if(!this.consumeOptional(e))throw new Error('Expected "'.concat(e,'".'))}}]),e}(),ot=function(){function e(t){m(this,e),this._root=t}return l(e,[{key:"parent",value:function(e){var t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}},{key:"children",value:function(e){var t=at(e,this._root);return t?t.children.map(function(e){return e.value}):[]}},{key:"firstChild",value:function(e){var t=at(e,this._root);return t&&t.children.length>0?t.children[0].value:null}},{key:"siblings",value:function(e){var t=st(e,this._root);return t.length<2?[]:t[t.length-2].children.map(function(e){return e.value}).filter(function(t){return t!==e})}},{key:"pathFromRoot",value:function(e){return st(e,this._root).map(function(e){return e.value})}},{key:"root",get:function(){return this._root.value}}]),e}();function at(e,t){if(e===t.value)return t;var n,r=i(t.children);try{for(r.s();!(n=r.n()).done;){var o=at(e,n.value);if(o)return o}}catch(a){r.e(a)}finally{r.f()}return null}function st(e,t){if(e===t.value)return[t];var n,r=i(t.children);try{for(r.s();!(n=r.n()).done;){var o=st(e,n.value);if(o.length)return o.unshift(t),o}}catch(a){r.e(a)}finally{r.f()}return[]}var ut=function(){function e(t,n){m(this,e),this.value=t,this.children=n}return l(e,[{key:"toString",value:function(){return"TreeNode(".concat(this.value,")")}}]),e}();function lt(e){var t={};return e&&e.children.forEach(function(e){return t[e.value.outlet]=e}),t}var ct=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).snapshot=r,yt(p(i),e),i}return l(n,[{key:"toString",value:function(){return this.snapshot.toString()}}]),n}(ot);function ht(e,t){var n=function(e,t){var n=new vt([],{},{},"",{},"primary",t,null,e.root,-1,{});return new pt("",new ut(n,[]))}(e,t),r=new v.a([new He("",{})]),i=new v.a({}),o=new v.a({}),a=new v.a({}),s=new v.a(""),u=new ft(r,i,a,s,o,"primary",t,n.root);return u.snapshot=n.root,new ct(new ut(u,[]),n)}var ft=function(){function e(t,n,r,i,o,a,s,u){m(this,e),this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=a,this.component=s,this._futureSnapshot=u}return l(e,[{key:"toString",value:function(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}},{key:"routeConfig",get:function(){return this._futureSnapshot.routeConfig}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=this.params.pipe(Object(R.a)(function(e){return Ee(e)}))),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Object(R.a)(function(e){return Ee(e)}))),this._queryParamMap}}]),e}();function dt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"emptyOnly",n=e.pathFromRoot,r=0;if("always"!==t)for(r=n.length-1;r>=1;){var i=n[r],o=n[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(o.component)break;r--}}return function(e){return e.reduce(function(e,t){return{params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}},{params:{},data:{},resolve:{}})}(n.slice(r))}var vt=function(){function e(t,n,r,i,o,a,s,u,l,c,h){m(this,e),this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=a,this.component=s,this.routeConfig=u,this._urlSegment=l,this._lastPathIndex=c,this._resolve=h}return l(e,[{key:"toString",value:function(){return"Route(url:'".concat(this.url.map(function(e){return e.toString()}).join("/"),"', path:'").concat(this.routeConfig?this.routeConfig.path:"","')")}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=Ee(this.params)),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Ee(this.queryParams)),this._queryParamMap}}]),e}(),pt=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,r)).url=e,yt(p(i),r),i}return l(n,[{key:"toString",value:function(){return gt(this._root)}}]),n}(ot);function yt(e,t){t.value._routerState=e,t.children.forEach(function(t){return yt(e,t)})}function gt(e){var t=e.children.length>0?" { ".concat(e.children.map(gt).join(", ")," } "):"";return"".concat(e.value).concat(t)}function mt(e){if(e.snapshot){var t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,xe(t.queryParams,n.queryParams)||e.queryParams.next(n.queryParams),t.fragment!==n.fragment&&e.fragment.next(n.fragment),xe(t.params,n.params)||e.params.next(n.params),function(e,t){if(e.length!==t.length)return!1;for(var n=0;n0&&wt(r[0]))throw new Error("Root segment cannot have matrix parameters");var i=r.find(Ct);if(i&&i!==Pe(r))throw new Error("{outlets:{}} has to be the last command")}return l(e,[{key:"toRoot",value:function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}]),e}(),Tt=function e(t,n,r){m(this,e),this.segmentGroup=t,this.processChildren=n,this.index=r};function xt(e,t,n){if(e||(e=new Fe([],{})),0===e.segments.length&&e.hasChildren())return At(e,t,n);var r=function(e,t,n){for(var r=0,i=t,o={match:!1,pathIndex:0,commandIndex:0};i=n.length)return o;var a=e.segments[i],s=n[r];if(Ct(s))break;var u=""+s,l=r0&&void 0===u)break;if(u&&l&&"object"==typeof l&&void 0===l.outlets){if(!Dt(u,l,a))return o;r+=2}else{if(!Dt(u,{},a))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(e,t,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex=2&&(n=!0),function(r){return r.lift(new K(e,t,n))}}(function(e,t){var n=!1;return t.reduce(function(e,r,i){if(e!==Ft)return e;if(r===Ft&&(n=!0),!n){if(!1===r)return r;if(i===t.length-1||Mt(r))return r}return e},e)},Ft),Object(L.a)(function(e){return e!==Ft}),Object(R.a)(function(e){return Mt(e)?e:!0===e}),Object(Q.a)(1))})}var Ut,qt=((Ut=function e(){m(this,e)}).\u0275fac=function(e){return new(e||Ut)},Ut.\u0275cmp=s.Bb({type:Ut,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,t){1&e&&s.Ib(0,"router-outlet")},directives:function(){return[Qn]},encapsulation:2}),Ut);function zt(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=0;n0?new Fe([],{primary:e}):e;return new Me(r,t,n)}},{key:"expandSegmentGroup",value:function(e,t,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(e,t,n).pipe(Object(R.a)(function(e){return new Fe([],e)})):this.expandSegment(e,n,t,n.segments,r,!0)}},{key:"expandChildren",value:function(e,t,n){var r=this;return function(n,i){if(0===Object.keys(n).length)return Object(u.a)({});var o=[],a=[],s={};return Ie(n,function(n,i){var u,l,c=(u=i,l=n,r.expandSegmentGroup(e,t,l,u)).pipe(Object(R.a)(function(e){return s[i]=e}));"primary"===i?o.push(c):a.push(c)}),u.a.apply(null,o.concat(a)).pipe(Object(N.a)(),function(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Object(L.a)(function(t,n){return e(t,n,r)}):z.a,M(1),n?Object(q.a)(t):Object(U.a)(function(){return new j.a}))}}(),Object(R.a)(function(){return s}))}(n.children)}},{key:"expandSegment",value:function(e,n,r,i,o,a){var s=this,l=function(e){return e.reduce(function(e,t){var n=Kt(t);return e.has(n)?e.get(n).push(t):e.set(n,[t]),e},new Map)}(r);l.has(o)||l.set(o,[]);var c=Array.from(l.entries()).map(function(r){var l=t(r,2),c=l[0],h=function(t){return Object(f.a)(t).pipe(Object($.a)(function(r){return s.expandSegmentAgainstRoute(e,n,t,r,i,o,a).pipe(X(function(e){if(e instanceof Gt)return Object(u.a)(null);throw e}))}),Object(ee.a)(function(e){return null!==e}),X(function(e){if(e instanceof j.a||"EmptyError"===e.name){if(s.noLeftoversInUrl(n,i,o))return Object(u.a)(new Fe([],{}));throw new Gt(n)}throw e}))}(l[1]);return c===o?h:h.pipe(Object(R.a)(function(){return null}),X(function(){return Object(u.a)(null)}))});return Object(f.a)(c).pipe(function(e){return e.lift(new x(void 0))},Object(ee.a)(),Object(R.a)(function(e){return e.find(function(e){return null!==e})}))}},{key:"noLeftoversInUrl",value:function(e,t,n){return 0===t.length&&!e.children[n]}},{key:"expandSegmentAgainstRoute",value:function(e,t,n,r,i,o,a){return Kt(r)!==o&&""!==r.path?Xt(t):void 0===r.redirectTo?this.matchSegmentAgainstRoute(e,t,r,i):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,n,r,i,o):Xt(t)}},{key:"expandSegmentAgainstRouteUsingRedirect",value:function(e,t,n,r,i,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,n,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,r,i,o)}},{key:"expandWildCardWithParamsAgainstRouteUsingRedirect",value:function(e,t,n,r){var i=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Jt(o):this.lineralizeSegments(n,o).pipe(Object(te.a)(function(n){var o=new Fe(n,{});return i.expandSegment(e,o,t,n,r,!1)}))}},{key:"expandRegularSegmentAgainstRouteUsingRedirect",value:function(e,t,n,r,i,o){var a=this,s=en(t,r,i),u=s.matched,l=s.consumedSegments,c=s.lastChild,h=s.positionalParamSegments;if(!u)return Xt(t);var f=this.applyRedirectCommands(l,r.redirectTo,h);return r.redirectTo.startsWith("/")?Jt(f):this.lineralizeSegments(r,f).pipe(Object(te.a)(function(r){return a.expandSegment(e,t,n,r.concat(i.slice(c)),o,!1)}))}},{key:"matchSegmentAgainstRoute",value:function(e,t,n,r){var o=this;if("**"===n.path)return n.loadChildren?this.configLoader.load(e.injector,n).pipe(Object(R.a)(function(e){return n._loadedConfig=e,new Fe(r,{})})):Object(u.a)(new Fe(r,{}));var a=en(t,n,r),s=a.matched,l=a.consumedSegments,c=a.lastChild;if(!s)return Xt(t);var h=r.slice(c);return this.getChildConfig(e,n,r).pipe(Object(te.a)(function(e){var n=e.module,r=e.routes,a=function(e,t,n,r){return n.length>0&&function(e,t,n){return n.some(function(n){return nn(e,t,n)&&"primary"!==Kt(n)})}(e,n,r)?{segmentGroup:tn(new Fe(t,function(e,t){var n={};n.primary=t;var r,o=i(e);try{for(o.s();!(r=o.n()).done;){var a=r.value;""===a.path&&"primary"!==Kt(a)&&(n[Kt(a)]=new Fe([],{}))}}catch(s){o.e(s)}finally{o.f()}return n}(r,new Fe(n,e.children)))),slicedSegments:[]}:0===n.length&&function(e,t,n){return n.some(function(n){return nn(e,t,n)})}(e,n,r)?{segmentGroup:tn(new Fe(e.segments,function(e,t,n,r){var o,a={},s=i(n);try{for(s.s();!(o=s.n()).done;){var u=o.value;nn(e,t,u)&&!r[Kt(u)]&&(a[Kt(u)]=new Fe([],{}))}}catch(l){s.e(l)}finally{s.f()}return Object.assign(Object.assign({},r),a)}(e,n,r,e.children))),slicedSegments:n}:{segmentGroup:e,slicedSegments:n}}(t,l,h,r),s=a.segmentGroup,c=a.slicedSegments;return 0===c.length&&s.hasChildren()?o.expandChildren(n,r,s).pipe(Object(R.a)(function(e){return new Fe(l,e)})):0===r.length&&0===c.length?Object(u.a)(new Fe(l,{})):o.expandSegment(n,s,r,c,"primary",!0).pipe(Object(R.a)(function(e){return new Fe(l.concat(e.segments),e.children)}))}))}},{key:"getChildConfig",value:function(e,t,n){var r=this;return t.children?Object(u.a)(new Lt(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?Object(u.a)(t._loadedConfig):this.runCanLoadGuards(e.injector,t,n).pipe(Object(te.a)(function(n){return n?r.configLoader.load(e.injector,t).pipe(Object(R.a)(function(e){return t._loadedConfig=e,e})):function(e){return new S.a(function(t){return t.error(Oe("Cannot load children because the guard of the route \"path: '".concat(e.path,"'\" returned false")))})}(t)})):Object(u.a)(new Lt([],e))}},{key:"runCanLoadGuards",value:function(e,t,n){var r=this,i=t.canLoad;if(!i||0===i.length)return Object(u.a)(!0);var o=i.map(function(r){var i,o=e.get(r);if(function(e){return e&&Vt(e.canLoad)}(o))i=o.canLoad(t,n);else{if(!Vt(o))throw new Error("Invalid CanLoad guard");i=o(t,n)}return De(i)});return Object(u.a)(o).pipe(Ht(),Object(ne.a)(function(e){if(Mt(e)){var t=Oe('Redirecting to "'.concat(r.urlSerializer.serialize(e),'"'));throw t.url=e,t}}),Object(R.a)(function(e){return!0===e}))}},{key:"lineralizeSegments",value:function(e,t){for(var n=[],r=t.root;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return Object(u.a)(n);if(r.numberOfChildren>1||!r.children.primary)return Yt(e.redirectTo);r=r.children.primary}}},{key:"applyRedirectCommands",value:function(e,t,n){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,n)}},{key:"applyRedirectCreatreUrlTree",value:function(e,t,n,r){var i=this.createSegmentGroup(e,t.root,n,r);return new Me(i,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}},{key:"createQueryParams",value:function(e,t){var n={};return Ie(e,function(e,r){if("string"==typeof e&&e.startsWith(":")){var i=e.substring(1);n[r]=t[i]}else n[r]=e}),n}},{key:"createSegmentGroup",value:function(e,t,n,r){var i=this,o=this.createSegments(e,t.segments,n,r),a={};return Ie(t.children,function(t,o){a[o]=i.createSegmentGroup(e,t,n,r)}),new Fe(o,a)}},{key:"createSegments",value:function(e,t,n,r){var i=this;return t.map(function(t){return t.path.startsWith(":")?i.findPosParam(e,t,r):i.findOrReturn(t,n)})}},{key:"findPosParam",value:function(e,t,n){var r=n[t.path.substring(1)];if(!r)throw new Error("Cannot redirect to '".concat(e,"'. Cannot find '").concat(t.path,"'."));return r}},{key:"findOrReturn",value:function(e,t){var n,r=0,o=i(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.path===e.path)return t.splice(r),a;r++}}catch(s){o.e(s)}finally{o.f()}return e}}]),e}();function en(e,t,n){if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var r=(t.matcher||Te)(n,e,t);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function tn(e){if(1===e.numberOfChildren&&e.children.primary){var t=e.children.primary;return new Fe(e.segments.concat(t.segments),t.children)}return e}function nn(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}var rn=function e(t){m(this,e),this.path=t,this.route=this.path[this.path.length-1]},on=function e(t,n){m(this,e),this.component=t,this.route=n};function an(e,t,n){var r=e._root;return un(r,t?t._root:null,n,[r.value])}function sn(e,t,n){var r=function(e){if(!e)return null;for(var t=e.parent;t;t=t.parent){var n=t.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(t);return(r?r.module.injector:n).get(e)}function un(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=lt(t);return e.children.forEach(function(e){!function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=e.value,a=t?t.value:null,s=n?n.getContext(e.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){var u=function(e,t,n){if("function"==typeof n)return n(e,t);switch(n){case"pathParamsChange":return!Ue(e.url,t.url);case"pathParamsOrQueryParamsChange":return!Ue(e.url,t.url)||!xe(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!bt(e,t)||!xe(e.queryParams,t.queryParams);case"paramsChange":default:return!bt(e,t)}}(a,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new rn(r)):(o.data=a.data,o._resolvedData=a._resolvedData),un(e,t,o.component?s?s.children:null:n,r,i),u&&s&&s.outlet&&s.outlet.isActivated&&i.canDeactivateChecks.push(new on(s.outlet.component,a))}else a&&ln(t,s,i),i.canActivateChecks.push(new rn(r)),un(e,null,o.component?s?s.children:null:n,r,i)}(e,o[e.value.outlet],n,r.concat([e.value]),i),delete o[e.value.outlet]}),Ie(o,function(e,t){return ln(e,n.getContext(t),i)}),i}function ln(e,t,n){var r=lt(e),i=e.value;Ie(r,function(e,r){ln(e,i.component?t?t.children.getContext(r):null:t,n)}),n.canDeactivateChecks.push(new on(i.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,i))}function cn(e,t){return null!==e&&t&&t(new ke(e)),Object(u.a)(!0)}function hn(e,t){return null!==e&&t&&t(new be(e)),Object(u.a)(!0)}function fn(e,t,n){var r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||0===r.length)return Object(u.a)(!0);var i=r.map(function(r){return Object(P.a)(function(){var i,o=sn(r,t,n);if(function(e){return e&&Vt(e.canActivate)}(o))i=De(o.canActivate(t,e));else{if(!Vt(o))throw new Error("Invalid CanActivate guard");i=De(o(t,e))}return i.pipe(Object(ee.a)())})});return Object(u.a)(i).pipe(Ht())}function dn(e,t,n){var r=t[t.length-1],i=t.slice(0,t.length-1).reverse().map(function(e){return function(e){var t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(e)}).filter(function(e){return null!==e}).map(function(t){return Object(P.a)(function(){var i=t.guards.map(function(i){var o,a=sn(i,t.node,n);if(function(e){return e&&Vt(e.canActivateChild)}(a))o=De(a.canActivateChild(r,e));else{if(!Vt(a))throw new Error("Invalid CanActivateChild guard");o=De(a(r,e))}return o.pipe(Object(ee.a)())});return Object(u.a)(i).pipe(Ht())})});return Object(u.a)(i).pipe(Ht())}var vn=function e(){m(this,e)},pn=function(){function e(t,n,r,i,o,a){m(this,e),this.rootComponentType=t,this.config=n,this.urlTree=r,this.url=i,this.paramsInheritanceStrategy=o,this.relativeLinkResolution=a}return l(e,[{key:"recognize",value:function(){try{var e=mn(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,"primary"),n=new vt([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),r=new ut(n,t),i=new pt(this.url,r);return this.inheritParamsAndData(i._root),Object(u.a)(i)}catch(o){return new S.a(function(e){return e.error(o)})}}},{key:"inheritParamsAndData",value:function(e){var t=this,n=e.value,r=dt(n,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),e.children.forEach(function(e){return t.inheritParamsAndData(e)})}},{key:"processSegmentGroup",value:function(e,t,n){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,n)}},{key:"processChildren",value:function(e,t){var n,r=this,i=qe(t,function(t,n){return r.processSegmentGroup(e,t,n)});return n={},i.forEach(function(e){var t=n[e.value.outlet];if(t){var r=t.url.map(function(e){return e.toString()}).join("/"),i=e.value.url.map(function(e){return e.toString()}).join("/");throw new Error("Two segments cannot have the same outlet name: '".concat(r,"' and '").concat(i,"'."))}n[e.value.outlet]=e.value}),i.sort(function(e,t){return"primary"===e.value.outlet?-1:"primary"===t.value.outlet?1:e.value.outlet.localeCompare(t.value.outlet)}),i}},{key:"processSegment",value:function(e,t,n,r){var o,a=i(e);try{for(a.s();!(o=a.n()).done;){var s=o.value;try{return this.processSegmentAgainstRoute(s,t,n,r)}catch(u){if(!(u instanceof vn))throw u}}}catch(l){a.e(l)}finally{a.f()}if(this.noLeftoversInUrl(t,n,r))return[];throw new vn}},{key:"noLeftoversInUrl",value:function(e,t,n){return 0===t.length&&!e.children[n]}},{key:"processSegmentAgainstRoute",value:function(e,t,n,r){if(e.redirectTo)throw new vn;if((e.outlet||"primary")!==r)throw new vn;var i,o=[],a=[];if("**"===e.path){var s=n.length>0?Pe(n).parameters:{};i=new vt(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,kn(e),r,e.component,e,yn(t),gn(t)+n.length,wn(e))}else{var u=function(e,t,n){if(""===t.path){if("full"===t.pathMatch&&(e.hasChildren()||n.length>0))throw new vn;return{consumedSegments:[],lastChild:0,parameters:{}}}var r=(t.matcher||Te)(n,e,t);if(!r)throw new vn;var i={};Ie(r.posParams,function(e,t){i[t]=e.path});var o=r.consumed.length>0?Object.assign(Object.assign({},i),r.consumed[r.consumed.length-1].parameters):i;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:o}}(t,e,n);o=u.consumedSegments,a=n.slice(u.lastChild),i=new vt(o,u.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,kn(e),r,e.component,e,yn(t),gn(t)+o.length,wn(e))}var l=function(e){return e.children?e.children:e.loadChildren?e._loadedConfig.routes:[]}(e),c=mn(t,o,a,l,this.relativeLinkResolution),h=c.segmentGroup,f=c.slicedSegments;if(0===f.length&&h.hasChildren()){var d=this.processChildren(l,h);return[new ut(i,d)]}if(0===l.length&&0===f.length)return[new ut(i,[])];var v=this.processSegment(l,h,f,"primary");return[new ut(i,v)]}}]),e}();function yn(e){for(var t=e;t._sourceSegment;)t=t._sourceSegment;return t}function gn(e){for(var t=e,n=t._segmentIndexShift?t._segmentIndexShift:0;t._sourceSegment;)n+=(t=t._sourceSegment)._segmentIndexShift?t._segmentIndexShift:0;return n-1}function mn(e,t,n,r,o){if(n.length>0&&function(e,t,n){return n.some(function(n){return bn(e,t,n)&&"primary"!==_n(n)})}(e,n,r)){var a=new Fe(t,function(e,t,n,r){var o={};o.primary=r,r._sourceSegment=e,r._segmentIndexShift=t.length;var a,s=i(n);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(""===u.path&&"primary"!==_n(u)){var l=new Fe([],{});l._sourceSegment=e,l._segmentIndexShift=t.length,o[_n(u)]=l}}}catch(c){s.e(c)}finally{s.f()}return o}(e,t,r,new Fe(n,e.children)));return a._sourceSegment=e,a._segmentIndexShift=t.length,{segmentGroup:a,slicedSegments:[]}}if(0===n.length&&function(e,t,n){return n.some(function(n){return bn(e,t,n)})}(e,n,r)){var s=new Fe(e.segments,function(e,t,n,r,o,a){var s,u={},l=i(r);try{for(l.s();!(s=l.n()).done;){var c=s.value;if(bn(e,n,c)&&!o[_n(c)]){var h=new Fe([],{});h._sourceSegment=e,h._segmentIndexShift="legacy"===a?e.segments.length:t.length,u[_n(c)]=h}}}catch(f){l.e(f)}finally{l.f()}return Object.assign(Object.assign({},o),u)}(e,t,n,r,e.children,o));return s._sourceSegment=e,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:n}}var u=new Fe(e.segments,e.children);return u._sourceSegment=e,u._segmentIndexShift=t.length,{segmentGroup:u,slicedSegments:n}}function bn(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function _n(e){return e.outlet||"primary"}function kn(e){return e.data||{}}function wn(e){return e.resolve||{}}function Cn(e){return function(t){return t.pipe(Object(B.a)(function(t){var n=e(t);return n?Object(f.a)(n).pipe(Object(R.a)(function(){return t})):Object(f.a)([t])}))}}var Sn=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return n}(function(){function e(){m(this,e)}return l(e,[{key:"shouldDetach",value:function(e){return!1}},{key:"store",value:function(e,t){}},{key:"shouldAttach",value:function(e){return!1}},{key:"retrieve",value:function(e){return null}},{key:"shouldReuseRoute",value:function(e,t){return e.routeConfig===t.routeConfig}}]),e}()),En=new s.q("ROUTES"),On=function(){function e(t,n,r,i){m(this,e),this.loader=t,this.compiler=n,this.onLoadStartListener=r,this.onLoadEndListener=i}return l(e,[{key:"load",value:function(e,t){var n=this;return this.onLoadStartListener&&this.onLoadStartListener(t),this.loadModuleFactory(t.loadChildren).pipe(Object(R.a)(function(r){n.onLoadEndListener&&n.onLoadEndListener(t);var i=r.create(e);return new Lt(je(i.injector.get(En)).map(Wt),i)}))}},{key:"loadModuleFactory",value:function(e){var t=this;return"string"==typeof e?Object(f.a)(this.loader.load(e)):De(e()).pipe(Object(te.a)(function(e){return e instanceof s.v?Object(u.a)(e):Object(f.a)(t.compiler.compileModuleAsync(e))}))}}]),e}(),Tn=function e(){m(this,e),this.outlet=null,this.route=null,this.resolver=null,this.children=new xn,this.attachRef=null},xn=function(){function e(){m(this,e),this.contexts=new Map}return l(e,[{key:"onChildOutletCreated",value:function(e,t){var n=this.getOrCreateContext(e);n.outlet=t,this.contexts.set(e,n)}},{key:"onChildOutletDestroyed",value:function(e){var t=this.getContext(e);t&&(t.outlet=null)}},{key:"onOutletDeactivated",value:function(){var e=this.contexts;return this.contexts=new Map,e}},{key:"onOutletReAttached",value:function(e){this.contexts=e}},{key:"getOrCreateContext",value:function(e){var t=this.getContext(e);return t||(t=new Tn,this.contexts.set(e,t)),t}},{key:"getContext",value:function(e){return this.contexts.get(e)||null}}]),e}(),An=function(){function e(){m(this,e)}return l(e,[{key:"shouldProcessUrl",value:function(e){return!0}},{key:"extract",value:function(e){return e}},{key:"merge",value:function(e,t){return e}}]),e}();function jn(e){throw e}function Pn(e,t,n){return t.parse("/")}function In(e,t){return Object(u.a)(null)}var Dn,Rn,Nn,Ln=((Nn=function(){function e(t,n,r,i,o,a,u,l){var c=this;m(this,e),this.rootComponentType=t,this.urlSerializer=n,this.rootContexts=r,this.location=i,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new D.a,this.errorHandler=jn,this.malformedUriErrorHandler=Pn,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:In,afterPreactivation:In},this.urlHandlingStrategy=new An,this.routeReuseStrategy=new Sn,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=o.get(s.x),this.console=o.get(s.W);var h=o.get(s.z);this.isNgZoneEnabled=h instanceof s.z,this.resetConfig(l),this.currentUrlTree=new Me(new Fe([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new On(a,u,function(e){return c.triggerEvent(new ge(e))},function(e){return c.triggerEvent(new me(e))}),this.routerState=ht(this.currentUrlTree,this.rootComponentType),this.transitions=new v.a({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return l(e,[{key:"setupNavigations",value:function(e){var t=this,n=this.events;return e.pipe(Object(L.a)(function(e){return 0!==e.id}),Object(R.a)(function(e){return Object.assign(Object.assign({},e),{extractedUrl:t.urlHandlingStrategy.extract(e.rawUrl)})}),Object(B.a)(function(e){var r,i,o,a,s=!1,l=!1;return Object(u.a)(e).pipe(Object(ne.a)(function(e){t.currentNavigation={id:e.id,initialUrl:e.currentRawUrl,extractedUrl:e.extractedUrl,trigger:e.source,extras:e.extras,previousNavigation:t.lastSuccessfulNavigation?Object.assign(Object.assign({},t.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Object(B.a)(function(e){var r,i,o,a,s=!t.navigated||e.extractedUrl.toString()!==t.browserUrlTree.toString();if(("reload"===t.onSameUrlNavigation||s)&&t.urlHandlingStrategy.shouldProcessUrl(e.rawUrl))return Object(u.a)(e).pipe(Object(B.a)(function(e){var r=t.transitions.getValue();return n.next(new ue(e.id,t.serializeUrl(e.extractedUrl),e.source,e.restoredState)),r!==t.transitions.getValue()?I.a:[e]}),Object(B.a)(function(e){return Promise.resolve(e)}),(r=t.ngModule.injector,i=t.configLoader,o=t.urlSerializer,a=t.config,function(e){return e.pipe(Object(B.a)(function(e){return function(e,t,n,r,i){return new $t(e,t,n,r,i).apply()}(r,i,o,e.extractedUrl,a).pipe(Object(R.a)(function(t){return Object.assign(Object.assign({},e),{urlAfterRedirects:t})}))}))}),Object(ne.a)(function(e){t.currentNavigation=Object.assign(Object.assign({},t.currentNavigation),{finalUrl:e.urlAfterRedirects})}),function(e,n,r,i,o){return function(r){return r.pipe(Object(te.a)(function(r){return function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"emptyOnly",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"legacy";return new pn(e,t,n,r,i,o).recognize()}(e,n,r.urlAfterRedirects,(a=r.urlAfterRedirects,t.serializeUrl(a)),i,o).pipe(Object(R.a)(function(e){return Object.assign(Object.assign({},r),{targetSnapshot:e})}));var a}))}}(t.rootComponentType,t.config,0,t.paramsInheritanceStrategy,t.relativeLinkResolution),Object(ne.a)(function(e){"eager"===t.urlUpdateStrategy&&(e.extras.skipLocationChange||t.setBrowserUrl(e.urlAfterRedirects,!!e.extras.replaceUrl,e.id,e.extras.state),t.browserUrlTree=e.urlAfterRedirects)}),Object(ne.a)(function(e){var r=new fe(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);n.next(r)}));if(s&&t.rawUrlTree&&t.urlHandlingStrategy.shouldProcessUrl(t.rawUrlTree)){var l=e.id,c=e.extractedUrl,h=e.source,f=e.restoredState,d=e.extras,v=new ue(l,t.serializeUrl(c),h,f);n.next(v);var p=ht(c,t.rootComponentType).snapshot;return Object(u.a)(Object.assign(Object.assign({},e),{targetSnapshot:p,urlAfterRedirects:c,extras:Object.assign(Object.assign({},d),{skipLocationChange:!1,replaceUrl:!1})}))}return t.rawUrlTree=e.rawUrl,t.browserUrlTree=e.urlAfterRedirects,e.resolve(null),I.a}),Cn(function(e){var n=e.targetSnapshot,r=e.id,i=e.extractedUrl,o=e.rawUrl,a=e.extras,s=a.skipLocationChange,u=a.replaceUrl;return t.hooks.beforePreactivation(n,{navigationId:r,appliedUrlTree:i,rawUrlTree:o,skipLocationChange:!!s,replaceUrl:!!u})}),Object(ne.a)(function(e){var n=new de(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)}),Object(R.a)(function(e){return Object.assign(Object.assign({},e),{guards:an(e.targetSnapshot,e.currentSnapshot,t.rootContexts)})}),function(e,t){return function(n){return n.pipe(Object(te.a)(function(n){var r=n.targetSnapshot,i=n.currentSnapshot,o=n.guards,a=o.canActivateChecks,s=o.canDeactivateChecks;return 0===s.length&&0===a.length?Object(u.a)(Object.assign(Object.assign({},n),{guardsResult:!0})):function(e,t,n,r){return Object(f.a)(e).pipe(Object(te.a)(function(e){return function(e,t,n,r,i){var o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||0===o.length)return Object(u.a)(!0);var a=o.map(function(o){var a,s=sn(o,t,i);if(function(e){return e&&Vt(e.canDeactivate)}(s))a=De(s.canDeactivate(e,t,n,r));else{if(!Vt(s))throw new Error("Invalid CanDeactivate guard");a=De(s(e,t,n,r))}return a.pipe(Object(ee.a)())});return Object(u.a)(a).pipe(Ht())}(e.component,e.route,n,t,r)}),Object(ee.a)(function(e){return!0!==e},!0))}(s,r,i,e).pipe(Object(te.a)(function(n){return n&&"boolean"==typeof n?function(e,t,n,r){return Object(f.a)(t).pipe(Object($.a)(function(t){return Object(f.a)([hn(t.route.parent,r),cn(t.route,r),dn(e,t.path,n),fn(e,t.route,n)]).pipe(Object(N.a)(),Object(ee.a)(function(e){return!0!==e},!0))}),Object(ee.a)(function(e){return!0!==e},!0))}(r,a,e,t):Object(u.a)(n)}),Object(R.a)(function(e){return Object.assign(Object.assign({},n),{guardsResult:e})}))}))}}(t.ngModule.injector,function(e){return t.triggerEvent(e)}),Object(ne.a)(function(e){if(Mt(e.guardsResult)){var n=Oe('Redirecting to "'.concat(t.serializeUrl(e.guardsResult),'"'));throw n.url=e.guardsResult,n}}),Object(ne.a)(function(e){var n=new ve(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot,!!e.guardsResult);t.triggerEvent(n)}),Object(L.a)(function(e){if(!e.guardsResult){t.resetUrlToCurrentUrlTree();var r=new ce(e.id,t.serializeUrl(e.extractedUrl),"");return n.next(r),e.resolve(!1),!1}return!0}),Cn(function(e){if(e.guards.canActivateChecks.length)return Object(u.a)(e).pipe(Object(ne.a)(function(e){var n=new pe(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)}),Object(B.a)(function(e){var r,i,o=!1;return Object(u.a)(e).pipe((r=t.paramsInheritanceStrategy,i=t.ngModule.injector,function(e){return e.pipe(Object(te.a)(function(e){var t=e.targetSnapshot,n=e.guards.canActivateChecks;if(!n.length)return Object(u.a)(e);var o=0;return Object(f.a)(n).pipe(Object($.a)(function(e){return function(e,t,n,r){return function(e,t,n,r){var i=Object.keys(e);if(0===i.length)return Object(u.a)({});var o={};return Object(f.a)(i).pipe(Object(te.a)(function(i){return function(e,t,n,r){var i=sn(e,t,r);return De(i.resolve?i.resolve(t,n):i(t,n))}(e[i],t,n,r).pipe(Object(ne.a)(function(e){o[i]=e}))}),M(1),Object(te.a)(function(){return Object.keys(o).length===i.length?Object(u.a)(o):I.a}))}(e._resolve,e,t,r).pipe(Object(R.a)(function(t){return e._resolvedData=t,e.data=Object.assign(Object.assign({},e.data),dt(e,n).resolve),null}))}(e.route,t,r,i)}),Object(ne.a)(function(){return o++}),M(1),Object(te.a)(function(t){return o===n.length?Object(u.a)(e):I.a}))}))}),Object(ne.a)({next:function(){return o=!0},complete:function(){if(!o){var r=new ce(e.id,t.serializeUrl(e.extractedUrl),"At least one route resolver didn't emit any value.");n.next(r),e.resolve(!1)}}}))}),Object(ne.a)(function(e){var n=new ye(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.triggerEvent(n)}))}),Cn(function(e){var n=e.targetSnapshot,r=e.id,i=e.extractedUrl,o=e.rawUrl,a=e.extras,s=a.skipLocationChange,u=a.replaceUrl;return t.hooks.afterPreactivation(n,{navigationId:r,appliedUrlTree:i,rawUrlTree:o,skipLocationChange:!!s,replaceUrl:!!u})}),Object(R.a)(function(e){var n=function(e,t,n){var r=_t(e,t._root,n?n._root:void 0);return new ct(r,t)}(t.routeReuseStrategy,e.targetSnapshot,e.currentRouterState);return Object.assign(Object.assign({},e),{targetRouterState:n})}),Object(ne.a)(function(e){t.currentUrlTree=e.urlAfterRedirects,t.rawUrlTree=t.urlHandlingStrategy.merge(t.currentUrlTree,e.rawUrl),t.routerState=e.targetRouterState,"deferred"===t.urlUpdateStrategy&&(e.extras.skipLocationChange||t.setBrowserUrl(t.rawUrlTree,!!e.extras.replaceUrl,e.id,e.extras.state),t.browserUrlTree=e.urlAfterRedirects)}),(i=t.rootContexts,o=t.routeReuseStrategy,a=function(e){return t.triggerEvent(e)},Object(R.a)(function(e){return new Rt(o,e.targetRouterState,e.currentRouterState,a).activate(i),e})),Object(ne.a)({next:function(){s=!0},complete:function(){s=!0}}),(r=function(){if(!s&&!l){t.resetUrlToCurrentUrlTree();var r=new ce(e.id,t.serializeUrl(e.extractedUrl),"Navigation ID ".concat(e.id," is not equal to the current navigation id ").concat(t.navigationId));n.next(r),e.resolve(!1)}t.currentNavigation=null},function(e){return e.lift(new ie(r))}),X(function(r){if(l=!0,(s=r)&&s.ngNavigationCancelingError){var i=Mt(r.url);i||(t.navigated=!0,t.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl));var o=new ce(e.id,t.serializeUrl(e.extractedUrl),r.message);n.next(o),i?setTimeout(function(){var n=t.urlHandlingStrategy.merge(r.url,t.rawUrlTree);return t.scheduleNavigation(n,"imperative",null,{skipLocationChange:e.extras.skipLocationChange,replaceUrl:"eager"===t.urlUpdateStrategy},{resolve:e.resolve,reject:e.reject,promise:e.promise})},0):e.resolve(!1)}else{t.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl);var a=new he(e.id,t.serializeUrl(e.extractedUrl),r);n.next(a);try{e.resolve(t.errorHandler(r))}catch(u){e.reject(u)}}var s;return I.a}))}))}},{key:"resetRootComponentType",value:function(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}},{key:"getTransition",value:function(){var e=this.transitions.value;return e.urlAfterRedirects=this.browserUrlTree,e}},{key:"setTransition",value:function(e){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),e))}},{key:"initialNavigation",value:function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}},{key:"setUpLocationChangeListener",value:function(){var e=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(t){var n=e.extractLocationChangeInfoFromEvent(t);e.shouldScheduleNavigation(e.lastLocationChangeInfo,n)&&setTimeout(function(){var t=n.source,r=n.state,i=n.urlTree,o={replaceUrl:!0};if(r){var a=Object.assign({},r);delete a.navigationId,0!==Object.keys(a).length&&(o.state=a)}e.scheduleNavigation(i,t,r,o)},0),e.lastLocationChangeInfo=n}))}},{key:"extractLocationChangeInfoFromEvent",value:function(e){var t;return{source:"popstate"===e.type?"popstate":"hashchange",urlTree:this.parseUrl(e.url),state:(null===(t=e.state)||void 0===t?void 0:t.navigationId)?e.state:null,transitionId:this.getTransition().id}}},{key:"shouldScheduleNavigation",value:function(e,t){if(!e)return!0;var n=t.urlTree.toString()===e.urlTree.toString();return!(t.transitionId===e.transitionId&&n&&("hashchange"===t.source&&"popstate"===e.source||"popstate"===t.source&&"hashchange"===e.source))}},{key:"getCurrentNavigation",value:function(){return this.currentNavigation}},{key:"triggerEvent",value:function(e){this.events.next(e)}},{key:"resetConfig",value:function(e){zt(e),this.config=e.map(Wt),this.navigated=!1,this.lastSuccessfulId=-1}},{key:"ngOnDestroy",value:function(){this.dispose()}},{key:"dispose",value:function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}},{key:"createUrlTree",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.relativeTo,r=t.queryParams,i=t.fragment,a=t.queryParamsHandling,s=t.preserveFragment,u=n||this.routerState.root,l=s?this.currentUrlTree.fragment:i,c=null;switch(a){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),r);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=r||null}return null!==c&&(c=this.removeEmptyProps(c)),function(e,t,n,r,i){if(0===n.length)return St(t.root,t.root,t,r,i);var a=function(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new Ot(!0,0,e);var t=0,n=!1,r=e.reduce(function(e,r,i){if("object"==typeof r&&null!=r){if(r.outlets){var a={};return Ie(r.outlets,function(e,t){a[t]="string"==typeof e?e.split("/"):e}),[].concat(o(e),[{outlets:a}])}if(r.segmentPath)return[].concat(o(e),[r.segmentPath])}return"string"!=typeof r?[].concat(o(e),[r]):0===i?(r.split("/").forEach(function(r,i){0==i&&"."===r||(0==i&&""===r?n=!0:".."===r?t++:""!=r&&e.push(r))}),e):[].concat(o(e),[r])},[]);return new Ot(n,t,r)}(n);if(a.toRoot())return St(t.root,new Fe([],{}),t,r,i);var s=function(e,t,n){if(e.isAbsolute)return new Tt(t.root,!0,0);if(-1===n.snapshot._lastPathIndex){var r=n.snapshot._urlSegment;return new Tt(r,r===t.root,0)}var i=wt(e.commands[0])?0:1;return function(e,t,n){for(var r=e,i=t,o=n;o>i;){if(o-=i,!(r=r.parent))throw new Error("Invalid number of '../'");i=r.segments.length}return new Tt(r,!1,i-o)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,e.numberOfDoubleDots)}(a,t,e),u=s.processChildren?At(s.segmentGroup,s.index,a.commands):xt(s.segmentGroup,s.index,a.commands);return St(s.segmentGroup,u,t,r,i)}(u,this.currentUrlTree,e,c,l)}},{key:"navigateByUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1},n=Mt(e)?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,t)}},{key:"navigate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};return function(e){for(var t=0;t2&&void 0!==arguments[2]?arguments[2]:{};m(this,e),this.router=t,this.viewportScroller=n,this.options=r,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},r.scrollPositionRestoration=r.scrollPositionRestoration||"disabled",r.anchorScrolling=r.anchorScrolling||"disabled"}return l(e,[{key:"init",value:function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}},{key:"createScrollEvents",value:function(){var e=this;return this.router.events.subscribe(function(t){t instanceof ue?(e.store[e.lastId]=e.viewportScroller.getScrollPosition(),e.lastSource=t.navigationTrigger,e.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof le&&(e.lastId=t.id,e.scheduleScrollEvent(t,e.router.parseUrl(t.urlAfterRedirects).fragment))})}},{key:"consumeScrollEvents",value:function(){var e=this;return this.router.events.subscribe(function(t){t instanceof Ce&&(t.position?"top"===e.options.scrollPositionRestoration?e.viewportScroller.scrollToPosition([0,0]):"enabled"===e.options.scrollPositionRestoration&&e.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===e.options.anchorScrolling?e.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==e.options.scrollPositionRestoration&&e.viewportScroller.scrollToPosition([0,0]))})}},{key:"scheduleScrollEvent",value:function(e,t){this.router.triggerEvent(new Ce(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,t))}},{key:"ngOnDestroy",value:function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}]),e}()).\u0275fac=function(e){return new(e||qn)(s.Qb(Ln),s.Qb(a.p),s.Qb(void 0))},qn.\u0275prov=s.Db({token:qn,factory:qn.\u0275fac}),qn),Jn=new s.q("ROUTER_CONFIGURATION"),Yn=new s.q("ROUTER_FORROOT_GUARD"),$n=[a.g,{provide:ze,useClass:Be},{provide:Ln,useFactory:function(e,t,n,r,i,o,s){var u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0,h=new Ln(null,e,t,n,r,i,o,je(s));if(l&&(h.urlHandlingStrategy=l),c&&(h.routeReuseStrategy=c),function(e,t){e.errorHandler&&(t.errorHandler=e.errorHandler),e.malformedUriErrorHandler&&(t.malformedUriErrorHandler=e.malformedUriErrorHandler),e.onSameUrlNavigation&&(t.onSameUrlNavigation=e.onSameUrlNavigation),e.paramsInheritanceStrategy&&(t.paramsInheritanceStrategy=e.paramsInheritanceStrategy),e.relativeLinkResolution&&(t.relativeLinkResolution=e.relativeLinkResolution),e.urlUpdateStrategy&&(t.urlUpdateStrategy=e.urlUpdateStrategy)}(u,h),u.enableTracing){var f=Object(a.s)();h.events.subscribe(function(e){f.logGroup("Router Event: "+e.constructor.name),f.log(e.toString()),f.log(e),f.logGroupEnd()})}return h},deps:[ze,xn,a.g,s.r,s.w,s.i,En,Jn,[function(){return function e(){m(this,e)}}(),new s.A],[function(){return function e(){m(this,e)}}(),new s.A]]},xn,{provide:ft,useFactory:function(e){return e.routerState.root},deps:[Ln]},{provide:s.w,useClass:s.J},Zn,Gn,function(){function e(){m(this,e)}return l(e,[{key:"preload",value:function(e,t){return t().pipe(X(function(){return Object(u.a)(null)}))}}]),e}(),{provide:Jn,useValue:{enableTracing:!1}}];function er(){return new s.y("Router",Ln)}var tr,nr=((tr=function(){function e(t,n){m(this,e)}return l(e,null,[{key:"forRoot",value:function(t,n){return{ngModule:e,providers:[$n,ar(t),{provide:Yn,useFactory:or,deps:[[Ln,new s.A,new s.I]]},{provide:Jn,useValue:n||{}},{provide:a.h,useFactory:ir,deps:[a.o,[new s.p(a.a),new s.A],Jn]},{provide:Xn,useFactory:rr,deps:[Ln,a.p,Jn]},{provide:Kn,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:Gn},{provide:s.y,multi:!0,useFactory:er},[ur,{provide:s.d,multi:!0,useFactory:lr,deps:[ur]},{provide:hr,useFactory:cr,deps:[ur]},{provide:s.b,multi:!0,useExisting:hr}]]}}},{key:"forChild",value:function(t){return{ngModule:e,providers:[ar(t)]}}}]),e}()).\u0275mod=s.Fb({type:tr}),tr.\u0275inj=s.Eb({factory:function(e){return new(e||tr)(s.Qb(Yn,8),s.Qb(Ln,8))}}),tr);function rr(e,t,n){return n.scrollOffset&&t.setOffset(n.scrollOffset),new Xn(e,t,n)}function ir(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.useHash?new a.d(e,t):new a.n(e,t)}function or(e){return"guarded"}function ar(e){return[{provide:s.a,multi:!0,useValue:e},{provide:En,multi:!0,useValue:e}]}var sr,ur=((sr=function(){function e(t){m(this,e),this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new D.a}return l(e,[{key:"appInitializer",value:function(){var e=this;return this.injector.get(a.f,Promise.resolve(null)).then(function(){var t=null,n=new Promise(function(e){return t=e}),r=e.injector.get(Ln),i=e.injector.get(Jn);return"disabled"===i.initialNavigation?(r.setUpLocationChangeListener(),t(!0)):"enabled"===i.initialNavigation||"enabledBlocking"===i.initialNavigation?(r.hooks.afterPreactivation=function(){return e.initNavigation?Object(u.a)(null):(e.initNavigation=!0,t(!0),e.resultOfPreactivationDone)},r.initialNavigation()):t(!0),n})}},{key:"bootstrapListener",value:function(e){var t=this.injector.get(Jn),n=this.injector.get(Zn),r=this.injector.get(Xn),i=this.injector.get(Ln),o=this.injector.get(s.g);e===o.components[0]&&("enabledNonBlocking"!==t.initialNavigation&&void 0!==t.initialNavigation||i.initialNavigation(),n.setUpPreloading(),r.init(),i.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}]),e}()).\u0275fac=function(e){return new(e||sr)(s.Qb(s.r))},sr.\u0275prov=s.Db({token:sr,factory:sr.\u0275fac}),sr);function lr(e){return e.appInitializer.bind(e)}function cr(e){return e.bootstrapListener.bind(e)}var hr=new s.q("Router Initializer")},vkgz:function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n("7o/Q");function i(){}var o=n("n6bG");function a(e,t,n){return function(r){return r.lift(new s(e,t,n))}}var s=function(){function e(t,n,r){m(this,e),this.nextOrObserver=t,this.error=n,this.complete=r}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new u(e,this.nextOrObserver,this.error,this.complete))}}]),e}(),u=function(e){h(n,e);var t=d(n);function n(e,r,a,s){var u;return m(this,n),(u=t.call(this,e))._tapNext=i,u._tapError=i,u._tapComplete=i,u._tapError=a||i,u._tapComplete=s||i,Object(o.a)(r)?(u._context=p(u),u._tapNext=r):r&&(u._context=r,u._tapNext=r.next||i,u._tapError=r.error||i,u._tapComplete=r.complete||i),u}return l(n,[{key:"_next",value:function(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}},{key:"_error",value:function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)}},{key:"_complete",value:function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}]),n}(r.a)},xbPD:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n("7o/Q");function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){return t.lift(new o(e))}}var o=function(){function e(t){m(this,e),this.defaultValue=t}return l(e,[{key:"call",value:function(e,t){return t.subscribe(new a(e,this.defaultValue))}}]),e}(),a=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this,e)).defaultValue=r,i.isEmpty=!0,i}return l(n,[{key:"_next",value:function(e){this.isEmpty=!1,this.destination.next(e)}},{key:"_complete",value:function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}]),n}(r.a)},yCtX:function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n("HDdC"),i=n("ngJS"),o=n("jZKg");function a(e,t){return t?Object(o.a)(e,t):new r.a(Object(i.a)(e))}},"z+Ro":function(e,t,n){"use strict";function r(e){return e&&"function"==typeof e.schedule}n.d(t,"a",function(){return r})},z6cu:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n("HDdC");function i(e,t){return new r.a(t?function(n){return t.schedule(o,0,{error:e,subscriber:n})}:function(t){return t.error(e)})}function o(e){var t=e.error;e.subscriber.error(t)}},zUnb:function(e,n,r){"use strict";r.r(n);var a,s,u=r("fXoL"),f=r("tyNb"),v=((a=function(){function e(){m(this,e),this.favIcon=document.querySelector("#favIcon"),this.lightIcon="../assets/classifai_dark.ico",this.favIcon.href=this.lightIcon}return l(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||a)},a.\u0275cmp=u.Bb({type:a,selectors:[["app-root"]],decls:1,vars:0,template:function(e,t){1&e&&u.Ib(0,"router-outlet")},directives:[f.e],styles:[""]}),a),p=r("1F7/"),y=r("14na"),b=r("I7yr"),_=r("sYmb"),k=r("ofXK"),w=((s=function(){function e(){m(this,e)}return l(e,[{key:"transform",value:function(e){var t="";switch(e.slice(-2)){case"en":t="EN";break;case"cn":t="CN";break;case"ms":t="MS"}return t}}]),e}()).\u0275fac=function(e){return new(e||s)},s.\u0275pipe=u.Gb({name:"languageSlice",type:s,pure:!0}),s),C=["languages"];function S(e,t){if(1&e){var n=u.Nb();u.Mb(0,"li",9,10),u.Tb("click",function(){u.hc(n);var e=u.Vb().$implicit,t=u.Vb();return t.setLanguage(e),t.hideLangOpts()}),u.oc(2),u.Wb(3,"languageSlice"),u.Lb()}if(2&e){var r=u.Vb().$implicit;u.xb(2),u.qc(" ",u.Xb(3,1,r)," ")}}function E(e,t){if(1&e&&(u.Mb(0,"div"),u.mc(1,S,4,3,"li",8),u.Lb()),2&e){var n=t.$implicit,r=u.Vb();u.xb(1),u.ac("ngIf",n!==r._translate.currentLang)}}var O,T=((O=function(){function e(t,n){m(this,e),this._translate=t,this._languageService=n,this.languageArr=[],this.headerImage="../../assets/landing-page/Classifai_Community_Logo.png";var r=["landing-page-en","landing-page-cn","landing-page-ms"];this._languageService.initializeLanguage("landing-page",r),this.languageArr=this._languageService.filterLanguageList(r,"landing-page")}return l(e,[{key:"ngOnInit",value:function(){}},{key:"setLanguage",value:function(e){try{e?(this._languageService.setLanguageState(e),this._translate.use(e)):this._languageService.setLanguageState("en")}catch(t){console.log("setLanguage(language: string) ----\x3e ",t.name+": ",t.message)}}},{key:"showLangOpts",value:function(){this.languages.forEach(function(e,t){e.nativeElement.style.visibility="visible",e.nativeElement.style.opacity="100%",e.nativeElement.style.left=(-112*(t+1)).toString()+"%",e.nativeElement.style.transition=(.15*(1+t)).toString()+"s"})}},{key:"hideLangOpts",value:function(){this.languages.forEach(function(e,t){e.nativeElement.style.visibility="hidden",e.nativeElement.style.opacity="0%",e.nativeElement.style.left="0%",e.nativeElement.style.transition=(.15*(3-t)).toString()+"s"})}}]),e}()).\u0275fac=function(e){return new(e||O)(u.Hb(_.d),u.Hb(b.a))},O.\u0275cmp=u.Bb({type:O,selectors:[["home-header"]],viewQuery:function(e,t){var n;1&e&&u.tc(C,!0),2&e&&u.ec(n=u.Ub())&&(t.languages=n)},decls:13,vars:5,consts:[[1,"flex-header","header-container"],[1,"div-header-container"],[1,"header-img",3,"src"],[1,"version-container"],[1,"version-text"],[1,"share",3,"mouseenter","mouseleave"],[1,"toggle"],[4,"ngFor","ngForOf"],[3,"click",4,"ngIf"],[3,"click"],["languages",""]],template:function(e,t){1&e&&(u.Mb(0,"header",0),u.Mb(1,"div",1),u.Ib(2,"img",2),u.Lb(),u.Lb(),u.Mb(3,"div",3),u.Mb(4,"div",4),u.Mb(5,"p"),u.oc(6,"Version: 2.0.0 alpha1"),u.Lb(),u.Lb(),u.Lb(),u.Mb(7,"div",5),u.Tb("mouseenter",function(){return t.showLangOpts()})("mouseleave",function(){return t.hideLangOpts()}),u.Mb(8,"ul"),u.Mb(9,"div",6),u.oc(10),u.Wb(11,"languageSlice"),u.Lb(),u.mc(12,E,2,1,"div",7),u.Lb(),u.Lb()),2&e&&(u.xb(2),u.ac("src",t.headerImage,u.jc),u.xb(8),u.pc(u.Xb(11,3,t._translate.currentLang)),u.xb(2),u.ac("ngForOf",t.languageArr))},directives:[k.j,k.k],pipes:[w],styles:[".flex-header[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.header-container[_ngcontent-%COMP%]{background:#262a2e;color:snow;height:21vh}.div-header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-around;width:90vw;align-items:center}.flex-grow[_ngcontent-%COMP%]{flex-grow:1}.header-img[_ngcontent-%COMP%]{height:10vh;-webkit-user-select:none;-moz-user-select:none;user-select:none}.header[_ngcontent-%COMP%]{text-shadow:0 0 1.875rem #888}.sub-header[_ngcontent-%COMP%]{font-size:1rem;margin:0 0 0 5rem}.absolute[_ngcontent-%COMP%]{position:absolute;right:5rem}select[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none}.select-padding[_ngcontent-%COMP%]{position:absolute;height:4vh;font-size:1.5vh;top:10%;right:3%;border-radius:3vh;width:8vh;margin:0;-moz-text-align-last:center;text-align-last:center;background:#3c4044;color:#fff;border:2px solid #a7a7a7}.select-padding[_ngcontent-%COMP%]:hover{border:2px solid #fff}.select-padding[_ngcontent-%COMP%]:active{border:2px solid #fff}.share[_ngcontent-%COMP%]{position:absolute;top:8%;right:2%;transform:translate(-50%,50%);width:8vh;height:4vh;border-radius:3vh;margin:0;z-index:1;text-align:center;vertical-align:middle;line-height:4vh}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{position:relative;margin:0;padding:0;width:100%;height:100%}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style:none;border:.5px solid #a7a7a7;border-radius:3vh;visibility:hidden;opacity:0;-webkit-transform:translateZ(0)}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .toggle[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background:#3c4044;color:#fff;font-size:1.5vh;overflow:hidden;transform:scale(.95);cursor:pointer}.toggle[_ngcontent-%COMP%]{border:.0325vh solid #a7a7a7;border-radius:3vh}.share[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover, .toggle[_ngcontent-%COMP%]:hover{background:#464a4e;border:.0625vh solid #fff}.version-container[_ngcontent-%COMP%]{position:absolute;top:8%;left:6%;transform:translate(-50%,50%);width:20vh;height:4vh;border-radius:3vh;margin:0;z-index:1;text-align:center;vertical-align:middle;line-height:4vh}.version-text[_ngcontent-%COMP%]{color:snow;font-size:1.7vh}"]}),O);function x(e,t){if(1&e&&(u.Kb(0),u.Mb(1,"span",9),u.oc(2),u.Wb(3,"translate"),u.Lb(),u.Jb()),2&e){var n=u.Vb(),r=n.$implicit,i=n.index,o=u.Vb();u.xb(1),u.ac("ngClass",r.hoverLabel?null:"label-hidden"),u.xb(1),u.qc(" ",u.Xb(3,2,o.conditionalHoverPlaceholder(i,r.hoverLabel))," ")}}function A(e,t){if(1&e){var n=u.Nb();u.Kb(0),u.Mb(1,"div",4),u.Tb("mouseover",function(e){u.hc(n);var r=t.index;return u.Vb().mouseEventCapture(e,r)})("mouseleave",function(e){u.hc(n);var r=t.index;return u.Vb().mouseEventCapture(e,r)})("click",function(){u.hc(n);var e=t.$implicit;return u.Vb().emitParentUrl(e.enabled,e.urlPath)}),u.Mb(2,"div",5),u.Ib(3,"img",6),u.mc(4,x,4,4,"ng-container",7),u.Lb(),u.Mb(5,"div",8),u.Mb(6,"p"),u.oc(7),u.Wb(8,"translate"),u.Lb(),u.Lb(),u.Lb(),u.Jb()}if(2&e){var r=t.$implicit,i=t.index,o=u.Vb();u.xb(1),u.ac("ngStyle",o.hoverStyling(i,o.hover,r.hoverLabel,r.imgPath)),u.yb("data-index",i),u.xb(2),u.ac("src",r.logoPath,u.jc)("alt",r.logoAlt),u.xb(1),u.ac("ngIf",o.hover),u.xb(3),u.pc(u.Xb(8,6,r.title))}}var j,P,I,D=((I=function(){function e(){var t=this;m(this,e),this._onThumbnailClick=new u.n,this.hoverStyling=function(e,n,r,i){return e===t.hoverIndex&&n?{"background-image":"url("+i+")",opacity:"1.0",cursor:r?"not-allowed":"pointer"}:{"background-image":"url("+i+")",opacity:"0.5"}},this.conditionalHoverPlaceholder=function(e,n){return e===t.hoverIndex&&n?n:""}}return l(e,[{key:"ngOnInit",value:function(){}},{key:"mouseEventCapture",value:function(e,t){var n=e.type;this.hover="mouseover"===n,this.hoverIndex=t}},{key:"emitParentUrl",value:function(e,t){e&&this._onThumbnailClick.emit(t)}}]),e}()).\u0275fac=function(e){return new(e||I)},I.\u0275cmp=u.Bb({type:I,selectors:[["home-card"]],inputs:{_jsonSchema:"_jsonSchema"},outputs:{_onThumbnailClick:"_onThumbnailClick"},decls:7,vars:1,consts:[[1,"flex-container"],[4,"ngFor","ngForOf"],[1,"copyright-container"],[1,"copyright-text"],[1,"card-container",3,"ngStyle","mouseover","mouseleave","click"],[1,"header-container"],[1,"logo",3,"src","alt"],[4,"ngIf"],[1,"banner"],[3,"ngClass"]],template:function(e,t){1&e&&(u.Mb(0,"div",0),u.mc(1,A,9,8,"ng-container",1),u.Mb(2,"div",2),u.Mb(3,"div",3),u.oc(4," Copyright \xa9 2020-2021 classifai. All rights reserved. "),u.Ib(5,"br"),u.oc(6," Classifai and the Classifai logo are trademarks of Skymind registered in Malaysia. "),u.Lb(),u.Lb(),u.Lb()),2&e&&(u.xb(1),u.ac("ngForOf",t._jsonSchema.fields))},directives:[k.j,k.l,k.k,k.i],pipes:[_.c],styles:[".flex-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;overflow:hidden}.card-container[_ngcontent-%COMP%]{display:table;background-repeat:no-repeat;background-size:cover;position:relative;height:74.5vh;width:25vw;-o-object-fit:contain;object-fit:contain;border:.01vh solid #000}.flex-center[_ngcontent-%COMP%]{display:flex;justify-content:center}.header-container[_ngcontent-%COMP%]{color:#fff;padding:10vh;font-size:xxx-large;display:grid;justify-items:center;height:58.7vh;line-height:10vh;font-size:2.5vh;text-align:center;white-space:nowrap}.label-hidden[_ngcontent-%COMP%]{visibility:hidden}.img[_ngcontent-%COMP%]{position:absolute}.image-container[_ngcontent-%COMP%]{display:flex;justify-content:center}.logo[_ngcontent-%COMP%]{position:relative;height:15vh;margin-top:10vh}.banner[_ngcontent-%COMP%]{position:absolute;background:#fff;opacity:.9;width:inherit;display:flex;justify-content:center;bottom:5vh;font-size:2.5vh;height:10vh;min-height:10vh;line-height:5vh}.copyright-container[_ngcontent-%COMP%]{position:absolute;bottom:1vh;left:50%;transform:translate(-50%,-50%)}.copyright-text[_ngcontent-%COMP%]{opacity:.5;text-align:center;color:#fff;font-size:1vh}"]}),I),R=((P=function(){function e(){m(this,e),this._navigate=new u.n,this.languageArr=[],this.jsonSchema={fields:[{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"tabular",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Tabular.jpg",imgAlt:"tabular",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_CSV.png",logoAlt:"CSV"},{enabled:!0,urlPath:"/dataset",title:"image",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Image.jpg",imgAlt:"image",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_JPEG.png",logoAlt:"image"},{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"video",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Video.jpg",imgAlt:"video",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_MP4.png",logoAlt:"Video"},{enabled:!1,urlPath:"",hoverLabel:"comingSoon",title:"voice",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Voice.jpg",imgAlt:"voice",logoPath:"../../assets/landing-page/ClassifaiThumbnail_Icon_MP3.png",logoAlt:"voice"}]}}return l(e,[{key:"ngOnInit",value:function(){}},{key:"onThumbnailClick",value:function(e){this._navigate.emit(e)}}]),e}()).\u0275fac=function(e){return new(e||P)},P.\u0275cmp=u.Bb({type:P,selectors:[["home-content"]],outputs:{_navigate:"_navigate"},decls:1,vars:1,consts:[[3,"_jsonSchema","_onThumbnailClick"]],template:function(e,t){1&e&&(u.Mb(0,"home-card",0),u.Tb("_onThumbnailClick",function(e){return t.onThumbnailClick(e)}),u.Lb()),2&e&&u.ac("_jsonSchema",t.jsonSchema)},directives:[D],styles:[""]}),P),N=((j=function(){function e(){m(this,e)}return l(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||j)},j.\u0275cmp=u.Bb({type:j,selectors:[["home-footer"]],decls:0,vars:0,template:function(e,t){},styles:[".footer-container[_ngcontent-%COMP%]{background:#262a2e}.copyright-text[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;color:snow;text-align:center;font-size:10px}"]}),j),L=r("44N4");function V(e,t){if(1&e&&(u.Kb(0),u.Mb(1,"div"),u.Mb(2,"span",8),u.oc(3),u.Wb(4,"translate"),u.Lb(),u.Lb(),u.Mb(5,"div",9),u.Mb(6,"span",8),u.oc(7),u.Wb(8,"translate"),u.Lb(),u.Lb(),u.Jb()),2&e){var n=u.Vb(),r=n.$implicit,i=n.index,o=u.Vb();u.xb(2),u.ac("ngClass",r.title?null:"label-hidden"),u.xb(1),u.qc(" ",u.Xb(4,4,o.conditionalHoverPlaceholder(i,r.title))," "),u.xb(3),u.ac("ngClass",r.hoverLabel?null:"label-hidden"),u.xb(1),u.qc(" ",u.Xb(8,6,o.conditionalHoverPlaceholder(i,r.hoverLabel))," ")}}function M(e,t){if(1&e){var n=u.Nb();u.Kb(0),u.Mb(1,"div",4),u.Tb("mouseover",function(e){u.hc(n);var r=t.index;return u.Vb().mouseEventCapture(e,r)})("mouseleave",function(e){u.hc(n);var r=t.index;return u.Vb().mouseEventCapture(e,r)}),u.Mb(2,"div",5),u.Tb("click",function(){u.hc(n);var e=t.$implicit,r=u.Vb();return r.onCloseModal(r.modalIdImgLbl,e.enabled,e.urlPath)}),u.Ib(3,"img",6),u.mc(4,V,9,8,"ng-container",7),u.Lb(),u.Lb(),u.Jb()}if(2&e){var r=t.$implicit,i=t.index,o=u.Vb();u.xb(1),u.yb("data-index",i),u.xb(1),u.ac("ngStyle",o.hoverStyling(i,o.hover,r.enabled)),u.xb(1),u.ac("src",r.imgPath,u.jc)("alt",r.imgAlt),u.xb(1),u.ac("ngIf",o.hover)}}var F,H,U,q,z,B,Q,W,K=((H=function(){function e(t,n,r,i){var o=this;m(this,e),this._modalService=t,this._router=n,this._imgLblMode=r,this._languageService=i,this.navigateUrl="",this.modalBodyStyle={minHeight:"37vh",maxHeight:"37vh",minWidth:"31vw",maxWidth:"31vw",margin:"15vw 71vh",overflow:"none"},this.cardSchema={fields:[{enabled:!0,title:"imageOpt.boundingBoxes",urlPath:"boundingbox",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Band_Labeling.jpg",imgAlt:"Bounding Box"},{enabled:!1,title:"imageOpt.polygons",urlPath:"segmentation",hoverLabel:"comingSoon",imgPath:"../../assets/landing-page/Classifai_Thumbnail_Band_Segmentation.jpg",imgAlt:"Segmentation"}]},this.modalIdImgLbl="modal-home-image-labelling",this.hover=!1,this.hoverIndex=-1,this.onDisplayModal=function(e){o._modalService.open(e)},this.onCloseModal=function(e,t,n){t&&(n&&(o._imgLblMode.setState("boundingbox"===n?"bndbox":"seg"),o._router.navigate([o.navigateUrl])),o._modalService.close(e))},this.hoverStyling=function(e,t,n){return e===o.hoverIndex&&t?{opacity:"1.0",cursor:n?"pointer":"not-allowed"}:{opacity:"0.5"}},this.conditionalHoverPlaceholder=function(e,t){return e===o.hoverIndex&&t?t:""},this._languageService.initializeLanguage("landing-page",["landing-page-en","landing-page-cn","landing-page-ms"])}return l(e,[{key:"ngOnInit",value:function(){}},{key:"navigate",value:function(e){this.navigateUrl=e,this.onDisplayModal(this.modalIdImgLbl)}},{key:"mouseEventCapture",value:function(e,t){var n=e.type;this.hover="mouseover"===n,this.hoverIndex=t}}]),e}()).\u0275fac=function(e){return new(e||H)(u.Hb(p.a),u.Hb(f.a),u.Hb(y.a),u.Hb(b.a))},H.\u0275cmp=u.Bb({type:H,selectors:[["home-layout"]],decls:7,vars:7,consts:[[3,"_navigate"],[3,"id","modalBodyStyle","modalTitle","scrollable"],[1,"modal-body-container"],[4,"ngFor","ngForOf"],[1,"card-container",3,"mouseover","mouseleave"],[1,"img-container",3,"ngStyle","click"],[1,"card-image",3,"src","alt"],[4,"ngIf"],[3,"ngClass"],[1,"centered"]],template:function(e,t){1&e&&(u.Ib(0,"home-header"),u.Mb(1,"home-content",0),u.Tb("_navigate",function(e){return t.navigate(e)}),u.Lb(),u.Ib(2,"home-footer"),u.Mb(3,"modal",1),u.Wb(4,"translate"),u.Mb(5,"div",2),u.mc(6,M,5,5,"ng-container",3),u.Lb(),u.Lb()),2&e&&(u.xb(3),u.ac("id",t.modalIdImgLbl)("modalBodyStyle",t.modalBodyStyle)("modalTitle",u.Xb(4,5,"imageOpt.selection"))("scrollable",!1),u.xb(3),u.ac("ngForOf",t.cardSchema.fields))},directives:[T,R,N,L.a,k.j,k.l,k.k,k.i],pipes:[_.c],styles:[".modal-button[_ngcontent-%COMP%]{line-height:1vh;font-size:1vw;padding:.5vw}.float-right[_ngcontent-%COMP%]{float:right}.label-hidden[_ngcontent-%COMP%]{visibility:hidden}.modal-header-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;line-height:1vh;font-size:1vw;padding:.5vw}.modal-body-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-around}.card-container[_ngcontent-%COMP%]{position:relative;text-align:center;font-weight:700;line-height:1vh;font-size:1vw;padding:.5vw}.card-image[_ngcontent-%COMP%]{max-width:14vw;min-width:14vw;min-height:25vh;max-height:25vh;transition:transform .2s;padding-bottom:3vh}.card-image[_ngcontent-%COMP%]:hover{transform:scale(1.1)}.img-container[_ngcontent-%COMP%]{position:relative;text-align:center;color:#fff}.centered[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}"]}),H),G=((F=function(){function e(){m(this,e),this.errorTitle="404",this.errorSubTitle="Page not found",this.errorMessage="Sorry, but the page you are looking for is not found. Please, make sure you have typed the current URL."}return l(e,[{key:"ngOnInit",value:function(){}}]),e}()).\u0275fac=function(e){return new(e||F)},F.\u0275cmp=u.Bb({type:F,selectors:[["app-page-not-found"]],decls:6,vars:3,template:function(e,t){1&e&&(u.Mb(0,"h1"),u.oc(1),u.Lb(),u.Mb(2,"h2"),u.oc(3),u.Lb(),u.Mb(4,"p"),u.oc(5),u.Lb()),2&e&&(u.xb(1),u.pc(t.errorTitle),u.xb(2),u.pc(t.errorSubTitle),u.xb(2),u.pc(t.errorMessage))},styles:["h2[_ngcontent-%COMP%]{font-size:4em}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%]{font-weight:700;text-align:center;color:#fff}h1[_ngcontent-%COMP%]{margin-top:10%;font-size:10em}p[_ngcontent-%COMP%]{font-weight:700;font-size:1em;text-align:center;color:#fff}"]}),F),Z=[{path:"",component:K},{path:"dataset",loadChildren:function(){return Promise.all([r.e(1),r.e(7)]).then(r.bind(null,"RN8A")).then(function(e){return e.DataSetLayoutModule})}},{path:"imglabel/bndbox",loadChildren:function(){return Promise.all([r.e(1),r.e(2)]).then(r.bind(null,"i5u5")).then(function(e){return e.ImageLabellingLayoutModule})}},{path:"imglabel/seg",loadChildren:function(){return Promise.all([r.e(1),r.e(2)]).then(r.bind(null,"i5u5")).then(function(e){return e.ImageLabellingLayoutModule})}},{path:"500",component:(U=function(){function e(){m(this,e),this.errorMessage="Server Probably is Down, Please Contact Administrator!"}return l(e,[{key:"ngOnInit",value:function(){}}]),e}(),U.\u0275fac=function(e){return new(e||U)},U.\u0275cmp=u.Bb({type:U,selectors:[["server-error"]],decls:4,vars:1,template:function(e,t){1&e&&(u.Mb(0,"h1"),u.oc(1,"500 Internal Server Error!"),u.Lb(),u.Mb(2,"p"),u.oc(3),u.Lb()),2&e&&(u.xb(3),u.qc(" ",t.errorMessage,"\n"))},styles:["p[_ngcontent-%COMP%]{font-size:2em}h1[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{font-weight:700;text-align:center;color:#000}h1[_ngcontent-%COMP%]{margin-top:15%;font-size:6em}"]}),U)},{path:"**",component:G}],X=((q=function e(){m(this,e)}).\u0275mod=u.Fb({type:q}),q.\u0275inj=u.Eb({factory:function(e){return new(e||q)},imports:[[f.d.forRoot(Z,{relativeLinkResolution:"legacy"})],f.d]}),q),J=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"getProperty",value:function(e,t){return e[t]}},{key:"log",value:function(e){window.console&&window.console.log&&window.console.log(e)}},{key:"logGroup",value:function(e){window.console&&window.console.group&&window.console.group(e)}},{key:"logGroupEnd",value:function(){window.console&&window.console.groupEnd&&window.console.groupEnd()}},{key:"onAndCancel",value:function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}}},{key:"dispatchEvent",value:function(e,t){e.dispatchEvent(t)}},{key:"remove",value:function(e){return e.parentNode&&e.parentNode.removeChild(e),e}},{key:"getValue",value:function(e){return e.value}},{key:"createElement",value:function(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}},{key:"createHtmlDocument",value:function(){return document.implementation.createHTMLDocument("fakeTitle")}},{key:"getDefaultDocument",value:function(){return document}},{key:"isElementNode",value:function(e){return e.nodeType===Node.ELEMENT_NODE}},{key:"isShadowRoot",value:function(e){return e instanceof DocumentFragment}},{key:"getGlobalEventTarget",value:function(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}},{key:"getHistory",value:function(){return window.history}},{key:"getLocation",value:function(){return window.location}},{key:"getBaseHref",value:function(e){var t,n=Y||(Y=document.querySelector("base"))?Y.getAttribute("href"):null;return null==n?null:(t=n,z||(z=document.createElement("a")),z.setAttribute("href",t),"/"===z.pathname.charAt(0)?z.pathname:"/"+z.pathname)}},{key:"resetBaseElement",value:function(){Y=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(e){return Object(k.t)(document.cookie,e)}}],[{key:"makeCurrent",value:function(){Object(k.u)(new n)}}]),n}(function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.call(this)}return l(n,[{key:"supportsDOMEvents",value:function(){return!0}}]),n}(k.q)),Y=null,$=new u.q("TRANSITION_ID"),ee=[{provide:u.d,useFactory:function(e,t,n){return function(){n.get(u.e).donePromise.then(function(){var n=Object(k.s)();Array.prototype.slice.apply(t.querySelectorAll("style[ng-transition]")).filter(function(t){return t.getAttribute("ng-transition")===e}).forEach(function(e){return n.remove(e)})})}},deps:[$,k.c,u.r],multi:!0}],te=function(){function e(){m(this,e)}return l(e,[{key:"addToWindow",value:function(e){u.mb.getAngularTestability=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.findTestabilityInTree(t,n);if(null==r)throw new Error("Could not find testability for element.");return r},u.mb.getAllAngularTestabilities=function(){return e.getAllTestabilities()},u.mb.getAllAngularRootElements=function(){return e.getAllRootElements()},u.mb.frameworkStabilizers||(u.mb.frameworkStabilizers=[]),u.mb.frameworkStabilizers.push(function(e){var t=u.mb.getAllAngularTestabilities(),n=t.length,r=!1,i=function(t){r=r||t,0==--n&&e(r)};t.forEach(function(e){e.whenStable(i)})})}},{key:"findTestabilityInTree",value:function(e,t,n){if(null==t)return null;var r=e.getTestability(t);return null!=r?r:n?Object(k.s)().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}],[{key:"init",value:function(){Object(u.V)(new e)}}]),e}(),ne=new u.q("EventManagerPlugins"),re=((B=function(){function e(t,n){var r=this;m(this,e),this._zone=n,this._eventNameToPlugin=new Map,t.forEach(function(e){return e.manager=r}),this._plugins=t.slice().reverse()}return l(e,[{key:"addEventListener",value:function(e,t,n){return this._findPluginFor(t).addEventListener(e,t,n)}},{key:"addGlobalEventListener",value:function(e,t,n){return this._findPluginFor(t).addGlobalEventListener(e,t,n)}},{key:"getZone",value:function(){return this._zone}},{key:"_findPluginFor",value:function(e){var t=this._eventNameToPlugin.get(e);if(t)return t;for(var n=this._plugins,r=0;r-1&&(t.splice(n,1),o+=e+".")}),o+=i,0!=t.length||0===i.length)return null;var a={};return a.domEventName=r,a.fullKey=o,a}},{key:"getEventFullKey",value:function(e){var t="",n=function(e){var t=e.key;if(null==t){if(null==(t=e.keyIdentifier))return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===e.location&&we.hasOwnProperty(t)&&(t=we[t]))}return ke[t]||t}(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),_e.forEach(function(r){r!=n&&(0,Ce[r])(e)&&(t+=r+".")}),t+=n}},{key:"eventCallback",value:function(e,t,r){return function(i){n.getEventFullKey(i)===e&&r.runGuarded(function(){return t(i)})}}},{key:"_normalizeKey",value:function(e){switch(e){case"esc":return"escape";default:return e}}}]),n}(ie)).\u0275fac=function(e){return new(e||de)(u.Qb(k.c))},de.\u0275prov=u.Db({token:de,factory:de.\u0275fac}),de),Ee=[{provide:u.B,useValue:k.r},{provide:u.C,useValue:function(){J.makeCurrent(),te.init()},multi:!0},{provide:k.c,useFactory:function(){return Object(u.rb)(document),document},deps:[]}],Oe=Object(u.Q)(u.U,"browser",Ee),Te=[[],{provide:u.X,useValue:"root"},{provide:u.m,useFactory:function(){return new u.m},deps:[]},{provide:ne,useClass:be,multi:!0,deps:[k.c,u.z,u.B]},{provide:ne,useClass:Se,multi:!0,deps:[k.c]},[],{provide:pe,useClass:pe,deps:[re,ae,u.c]},{provide:u.E,useExisting:pe},{provide:oe,useExisting:ae},{provide:ae,useClass:ae,deps:[k.c]},{provide:u.L,useClass:u.L,deps:[u.z]},{provide:re,useClass:re,deps:[ne,u.z]},[]],xe=((ve=function(){function e(t){if(m(this,e),t)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 l(e,null,[{key:"withServerTransition",value:function(t){return{ngModule:e,providers:[{provide:u.c,useValue:t.appId},{provide:$,useExisting:u.c},ee]}}}]),e}()).\u0275mod=u.Fb({type:ve}),ve.\u0275inj=u.Eb({factory:function(e){return new(e||ve)(u.Qb(ve,12))},providers:Te,imports:[k.b,u.f]}),ve);"undefined"!=typeof window&&window;var Ae=function e(){m(this,e)};function je(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:e,options:t}}function Pe(e){return{type:6,styles:e,offset:null}}function Ie(e){Promise.resolve(null).then(e)}var De=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;m(this,e),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+n}return l(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{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 e=this;Ie(function(){return e._onFinish()})}},{key:"_onStart",value:function(){this._onStartFns.forEach(function(e){return e()}),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(e){return e()}),this._onDestroyFns=[])}},{key:"reset",value:function(){}},{key:"setPosition",value:function(e){}},{key:"getPosition",value:function(){return 0}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}}]),e}(),Re=function(){function e(t){var n=this;m(this,e),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;var r=0,i=0,o=0,a=this.players.length;0==a?Ie(function(){return n._onFinish()}):this.players.forEach(function(e){e.onDone(function(){++r==a&&n._onFinish()}),e.onDestroy(function(){++i==a&&n._onDestroy()}),e.onStart(function(){++o==a&&n._onStart()})}),this.totalTime=this.players.reduce(function(e,t){return Math.max(e,t.totalTime)},0)}return l(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach(function(e){return e.init()})}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(e){return e()}),this._onStartFns=[])}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(e){return e.play()})}},{key:"pause",value:function(){this.players.forEach(function(e){return e.pause()})}},{key:"restart",value:function(){this.players.forEach(function(e){return e.restart()})}},{key:"finish",value:function(){this._onFinish(),this.players.forEach(function(e){return e.finish()})}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(e){return e.destroy()}),this._onDestroyFns.forEach(function(e){return e()}),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach(function(e){return e.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(e){var t=e*this.totalTime;this.players.forEach(function(e){var n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}},{key:"getPosition",value:function(){var e=0;return this.players.forEach(function(t){var n=t.getPosition();e=Math.min(n,e)}),e}},{key:"beforeDestroy",value:function(){this.players.forEach(function(e){e.beforeDestroy&&e.beforeDestroy()})}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}}]),e}();function Ne(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Le(e){switch(e.length){case 0:return new De;case 1:return e[0];default:return new Re(e)}}function Ve(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=[],s=[],u=-1,l=null;if(r.forEach(function(e){var n=e.offset,r=n==u,c=r&&l||{};Object.keys(e).forEach(function(n){var r=n,s=e[n];if("offset"!==n)switch(r=t.normalizePropertyName(r,a),s){case"!":s=i[n];break;case"*":s=o[n];break;default:s=t.normalizeStyleValue(n,r,s,a)}c[r]=s}),r||s.push(c),l=c,u=n}),a.length){var c="\n - ";throw new Error("Unable to animate due to the following errors:".concat(c).concat(a.join(c)))}return s}function Me(e,t,n,r){switch(t){case"start":e.onStart(function(){return r(n&&Fe(n,"start",e))});break;case"done":e.onDone(function(){return r(n&&Fe(n,"done",e))});break;case"destroy":e.onDestroy(function(){return r(n&&Fe(n,"destroy",e))})}}function Fe(e,t,n){var r=n.totalTime,i=He(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,null==r?e.totalTime:r,!!n.disabled),o=e._data;return null!=o&&(i._data=o),i}function He(e,t,n,r){var i=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:e,triggerName:t,fromState:n,toState:r,phaseName:i,totalTime:o,disabled:!!a}}function Ue(e,t,n){var r;return e instanceof Map?(r=e.get(t))||e.set(t,r=n):(r=e[t])||(r=e[t]=n),r}function qe(e){var t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}var ze=function(e,t){return!1},Be=function(e,t){return!1},Qe=function(e,t,n){return[]},We=Ne();(We||"undefined"!=typeof Element)&&(ze=function(e,t){return e.contains(t)},Be=function(){if(We||Element.prototype.matches)return function(e,t){return e.matches(t)};var e=Element.prototype,t=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;return t?function(e,n){return t.apply(e,[n])}:Be}(),Qe=function(e,t,n){var r=[];if(n)r.push.apply(r,o(e.querySelectorAll(t)));else{var i=e.querySelector(t);i&&r.push(i)}return r});var Ke=null,Ge=!1;function Ze(e){Ke||(Ke=("undefined"!=typeof document?document.body:null)||{},Ge=!!Ke.style&&"WebkitAppearance"in Ke.style);var t=!0;return Ke.style&&!function(e){return"ebkit"==e.substring(1,6)}(e)&&(!(t=e in Ke.style)&&Ge)&&(t="Webkit"+e.charAt(0).toUpperCase()+e.substr(1)in Ke.style),t}var Xe=Be,Je=ze,Ye=Qe;function $e(e){var t={};return Object.keys(e).forEach(function(n){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2");t[r]=e[n]}),t}var et,tt=((et=function(){function e(){m(this,e)}return l(e,[{key:"validateStyleProperty",value:function(e){return Ze(e)}},{key:"matchesElement",value:function(e,t){return Xe(e,t)}},{key:"containsElement",value:function(e,t){return Je(e,t)}},{key:"query",value:function(e,t,n){return Ye(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return n||""}},{key:"animate",value:function(e,t,n,r,i){return new De(n,r)}}]),e}()).\u0275fac=function(e){return new(e||et)},et.\u0275prov=u.Db({token:et,factory:et.\u0275fac}),et),nt=function(){var e=function e(){m(this,e)};return e.NOOP=new tt,e}();function rt(e){if("number"==typeof e)return e;var t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:it(parseFloat(t[1]),t[2])}function it(e,t){switch(t){case"s":return 1e3*e;default:return e}}function ot(e,t,n){return e.hasOwnProperty("duration")?e:function(e,t,n){var r,i=0,o="";if("string"==typeof e){var a=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push('The provided timing value "'.concat(e,'" is invalid.')),{duration:0,delay:0,easing:""};r=it(parseFloat(a[1]),a[2]);var s=a[3];null!=s&&(i=it(parseFloat(s),a[4]));var u=a[5];u&&(o=u)}else r=e;if(!n){var l=!1,c=t.length;r<0&&(t.push("Duration values below 0 are not allowed for this animation step."),l=!0),i<0&&(t.push("Delay values below 0 are not allowed for this animation step."),l=!0),l&&t.splice(c,0,'The provided timing value "'.concat(e,'" is invalid.'))}return{duration:r,delay:i,easing:o}}(e,t,n)}function at(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function st(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t)for(var r in e)n[r]=e[r];else at(e,n);return n}function ut(e,t,n){return n?t+":"+n+";":""}function lt(e){for(var t="",n=0;n *";case":leave":return"* => void";case":increment":return function(e,t){return parseFloat(t)>parseFloat(e)};case":decrement":return function(e,t){return parseFloat(t) *"}}(e,n);if("function"==typeof r)return void t.push(r);e=r}var i=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push('The provided transition expression "'.concat(e,'" is not supported')),t;var o=i[1],a=i[2],s=i[3];t.push(Et(o,s)),"<"!=a[0]||"*"==o&&"*"==s||t.push(Et(s,o))}(e,i,r)}):i.push(n),i),animation:o,queryCount:t.queryCount,depCount:t.depCount,options:Pt(e.options)}}},{key:"visitSequence",value:function(e,t){var n=this;return{type:2,steps:e.steps.map(function(e){return kt(n,e,t)}),options:Pt(e.options)}}},{key:"visitGroup",value:function(e,t){var n=this,r=t.currentTime,i=0,o=e.steps.map(function(e){t.currentTime=r;var o=kt(n,e,t);return i=Math.max(i,t.currentTime),o});return t.currentTime=i,{type:3,steps:o,options:Pt(e.options)}}},{key:"visitAnimate",value:function(e,t){var n,r=function(e,t){var n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return It(ot(e,t).duration,0,"");var r=e;if(r.split(/\s+/).some(function(e){return"{"==e.charAt(0)&&"{"==e.charAt(1)})){var i=It(0,0,"");return i.dynamic=!0,i.strValue=r,i}return It((n=n||ot(r,t)).duration,n.delay,n.easing)}(e.timings,t.errors);t.currentAnimateTimings=r;var i=e.styles?e.styles:Pe({});if(5==i.type)n=this.visitKeyframes(i,t);else{var o=e.styles,a=!1;if(!o){a=!0;var s={};r.easing&&(s.easing=r.easing),o=Pe(s)}t.currentTime+=r.duration+r.delay;var u=this.visitStyle(o,t);u.isEmptyStep=a,n=u}return t.currentAnimateTimings=null,{type:4,timings:r,style:n,options:null}}},{key:"visitStyle",value:function(e,t){var n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}},{key:"_makeStyleAst",value:function(e,t){var n=[];Array.isArray(e.styles)?e.styles.forEach(function(e){"string"==typeof e?"*"==e?n.push(e):t.errors.push("The provided style string value ".concat(e," is not allowed.")):n.push(e)}):n.push(e.styles);var r=!1,i=null;return n.forEach(function(e){if(jt(e)){var t=e,n=t.easing;if(n&&(i=n,delete t.easing),!r)for(var o in t)if(t[o].toString().indexOf("{{")>=0){r=!0;break}}}),{type:6,styles:n,easing:i,offset:e.offset,containsDynamicStyles:r,options:null}}},{key:"_validateStyleAst",value:function(e,t){var n=this,r=t.currentAnimateTimings,i=t.currentTime,o=t.currentTime;r&&o>0&&(o-=r.duration+r.delay),e.styles.forEach(function(e){"string"!=typeof e&&Object.keys(e).forEach(function(r){if(n._driver.validateStyleProperty(r)){var a,s,u,l,c,h=t.collectedStyles[t.currentQuerySelector],f=h[r],d=!0;f&&(o!=i&&o>=f.startTime&&i<=f.endTime&&(t.errors.push('The CSS property "'.concat(r,'" 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(i,'ms"')),d=!1),o=f.startTime),d&&(h[r]={startTime:o,endTime:i}),t.options&&(a=e[r],s=t.options,u=t.errors,l=s.params||{},(c=vt(a)).length&&c.forEach(function(e){l.hasOwnProperty(e)||u.push("Unable to resolve the local animation param ".concat(e," in the given list of values"))}))}else t.errors.push('The provided animation property "'.concat(r,'" is not a supported CSS property for animations'))})})}},{key:"visitKeyframes",value:function(e,t){var n=this,r={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),r;var i=0,o=[],a=!1,s=!1,u=0,l=e.steps.map(function(e){var r=n._makeStyleAst(e,t),l=null!=r.offset?r.offset:function(e){if("string"==typeof e)return null;var t=null;if(Array.isArray(e))e.forEach(function(e){if(jt(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}});else if(jt(e)&&e.hasOwnProperty("offset")){var n=e;t=parseFloat(n.offset),delete n.offset}return t}(r.styles),c=0;return null!=l&&(i++,c=r.offset=l),s=s||c<0||c>1,a=a||c0&&i0?i==f?1:h*i:o[i],s=a*p;t.currentTime=d+v.delay+s,v.duration=s,n._validateStyleAst(e,t),e.offset=a,r.styles.push(e)}),r}},{key:"visitReference",value:function(e,t){return{type:8,animation:kt(this,ft(e.animation),t),options:Pt(e.options)}}},{key:"visitAnimateChild",value:function(e,t){return t.depCount++,{type:9,options:Pt(e.options)}}},{key:"visitAnimateRef",value:function(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:Pt(e.options)}}},{key:"visitQuery",value:function(e,n){var r=n.currentQuerySelector,i=e.options||{};n.queryCount++,n.currentQuery=e;var o=t(function(e){var t=!!e.split(/\s*,\s*/).find(function(e){return":self"==e});return t&&(e=e.replace(Ot,"")),[e=e.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,function(e){return".ng-trigger-"+e.substr(1)}).replace(/:animating/g,".ng-animating"),t]}(e.selector),2),a=o[0],s=o[1];n.currentQuerySelector=r.length?r+" "+a:a,Ue(n.collectedStyles,n.currentQuerySelector,{});var u=kt(this,ft(e.animation),n);return n.currentQuery=null,n.currentQuerySelector=r,{type:11,selector:a,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:u,originalSelector:e.selector,options:Pt(e.options)}}},{key:"visitStagger",value:function(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");var n="full"===e.timings?{duration:0,delay:0,easing:"full"}:ot(e.timings,t.errors,!0);return{type:12,animation:kt(this,ft(e.animation),t),timings:n,options:null}}}]),e}(),At=function e(t){m(this,e),this.errors=t,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 jt(e){return!Array.isArray(e)&&"object"==typeof e}function Pt(e){var t;return e?(e=at(e)).params&&(e.params=(t=e.params)?at(t):null):e={},e}function It(e,t,n){return{duration:e,delay:t,easing:n}}function Dt(e,t,n,r,i,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:e,keyframes:t,preStyleProps:n,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:a,subTimeline:s}}var Rt=function(){function e(){m(this,e),this._map=new Map}return l(e,[{key:"consume",value:function(e){var t=this._map.get(e);return t?this._map.delete(e):t=[],t}},{key:"append",value:function(e,t){var n,r=this._map.get(e);r||this._map.set(e,r=[]),(n=r).push.apply(n,o(t))}},{key:"has",value:function(e){return this._map.has(e)}},{key:"clear",value:function(){this._map.clear()}}]),e}(),Nt=new RegExp(":enter","g"),Lt=new RegExp(":leave","g");function Vt(e,t,n,r,i){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,u=arguments.length>8?arguments[8]:void 0,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new Mt).buildKeyframes(e,t,n,r,i,o,a,s,u,l)}var Mt=function(){function e(){m(this,e)}return l(e,[{key:"buildKeyframes",value:function(e,t,n,r,i,o,a,s,u){var l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];u=u||new Rt;var c=new Ht(e,t,u,r,i,l,[]);c.options=s,c.currentTimeline.setStyles([o],null,c.errors,s),kt(this,n,c);var h=c.timelines.filter(function(e){return e.containsAnimation()});if(h.length&&Object.keys(a).length){var f=h[h.length-1];f.allowOnlyTimelineStyles()||f.setStyles([a],null,c.errors,s)}return h.length?h.map(function(e){return e.buildKeyframes()}):[Dt(t,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(e,t){}},{key:"visitState",value:function(e,t){}},{key:"visitTransition",value:function(e,t){}},{key:"visitAnimateChild",value:function(e,t){var n=t.subInstructions.consume(t.element);if(n){var r=t.createSubContext(e.options),i=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);i!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}},{key:"visitAnimateRef",value:function(e,t){var n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}},{key:"_visitSubInstructions",value:function(e,t,n){var r=t.currentTimeline.currentTime,i=null!=n.duration?rt(n.duration):null,o=null!=n.delay?rt(n.delay):null;return 0!==i&&e.forEach(function(e){var n=t.appendInstructionToTimeline(e,i,o);r=Math.max(r,n.duration+n.delay)}),r}},{key:"visitReference",value:function(e,t){t.updateOptions(e.options,!0),kt(this,e.animation,t),t.previousNode=e}},{key:"visitSequence",value:function(e,t){var n=this,r=t.subContextCount,i=t,o=e.options;if(o&&(o.params||o.delay)&&((i=t.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Ft);var a=rt(o.delay);i.delayNextStep(a)}e.steps.length&&(e.steps.forEach(function(e){return kt(n,e,i)}),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),t.previousNode=e}},{key:"visitGroup",value:function(e,t){var n=this,r=[],i=t.currentTimeline.currentTime,o=e.options&&e.options.delay?rt(e.options.delay):0;e.steps.forEach(function(a){var s=t.createSubContext(e.options);o&&s.delayNextStep(o),kt(n,a,s),i=Math.max(i,s.currentTimeline.currentTime),r.push(s.currentTimeline)}),r.forEach(function(e){return t.currentTimeline.mergeTimelineCollectedStyles(e)}),t.transformIntoNewTimeline(i),t.previousNode=e}},{key:"_visitTiming",value:function(e,t){if(e.dynamic){var n=e.strValue;return ot(t.params?pt(n,t.params,t.errors):n,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}},{key:"visitAnimate",value:function(e,t){var n=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());var i=e.style;5==i.type?this.visitKeyframes(i,t):(t.incrementTime(n.duration),this.visitStyle(i,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}},{key:"visitStyle",value:function(e,t){var n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.getCurrentStyleProperties().length&&n.forwardFrame();var i=r&&r.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(i):n.setStyles(e.styles,i,t.errors,t.options),t.previousNode=e}},{key:"visitKeyframes",value:function(e,t){var n=t.currentAnimateTimings,r=t.currentTimeline.duration,i=n.duration,o=t.createSubContext().currentTimeline;o.easing=n.easing,e.styles.forEach(function(e){o.forwardTime((e.offset||0)*i),o.setStyles(e.styles,e.easing,t.errors,t.options),o.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(r+i),t.previousNode=e}},{key:"visitQuery",value:function(e,t){var n=this,r=t.currentTimeline.currentTime,i=e.options||{},o=i.delay?rt(i.delay):0;o&&(6===t.previousNode.type||0==r&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Ft);var a=r,s=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=s.length;var u=null;s.forEach(function(r,i){t.currentQueryIndex=i;var s=t.createSubContext(e.options,r);o&&s.delayNextStep(o),r===t.element&&(u=s.currentTimeline),kt(n,e.animation,s),s.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,s.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),u&&(t.currentTimeline.mergeTimelineCollectedStyles(u),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}},{key:"visitStagger",value:function(e,t){var n=t.parentContext,r=t.currentTimeline,i=e.timings,o=Math.abs(i.duration),a=o*(t.currentQueryTotal-1),s=o*t.currentQueryIndex;switch(i.duration<0?"reverse":i.easing){case"reverse":s=a-s;break;case"full":s=n.currentStaggerTime}var u=t.currentTimeline;s&&u.delayNextStep(s);var l=u.currentTime;kt(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-l+(r.startTime-n.currentTimeline.startTime)}}]),e}(),Ft={},Ht=function(){function e(t,n,r,i,o,a,s,u){m(this,e),this._driver=t,this.element=n,this.subInstructions=r,this._enterClassName=i,this._leaveClassName=o,this.errors=a,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Ft,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=u||new Ut(this._driver,n,0),s.push(this.currentTimeline)}return l(e,[{key:"updateOptions",value:function(e,t){var n=this;if(e){var r=e,i=this.options;null!=r.duration&&(i.duration=rt(r.duration)),null!=r.delay&&(i.delay=rt(r.delay));var o=r.params;if(o){var a=i.params;a||(a=this.options.params={}),Object.keys(o).forEach(function(e){t&&a.hasOwnProperty(e)||(a[e]=pt(o[e],a,n.errors))})}}}},{key:"_copyOptions",value:function(){var e={};if(this.options){var t=this.options.params;if(t){var n=e.params={};Object.keys(t).forEach(function(e){n[e]=t[e]})}}return e}},{key:"createSubContext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=n||this.element,o=new e(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}},{key:"transformIntoNewTimeline",value:function(e){return this.previousNode=Ft,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(e,t,n){var r={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+e.delay,easing:""},i=new qt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(i),r}},{key:"incrementTime",value:function(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}},{key:"delayNextStep",value:function(e){e>0&&this.currentTimeline.delayNextStep(e)}},{key:"invokeQuery",value:function(e,t,n,r,i,a){var s=[];if(r&&s.push(this.element),e.length>0){e=(e=e.replace(Nt,"."+this._enterClassName)).replace(Lt,"."+this._leaveClassName);var u=this._driver.query(this.element,e,1!=n);0!==n&&(u=n<0?u.slice(u.length+n,u.length):u.slice(0,n)),s.push.apply(s,o(u))}return i||0!=s.length||a.push('`query("'.concat(t,'")` returned zero elements. (Use `query("').concat(t,'", { optional: true })` if you wish to allow this.)')),s}},{key:"params",get:function(){return this.options.params}}]),e}(),Ut=function(){function e(t,n,r,i){m(this,e),this._driver=t,this.element=n,this.startTime=r,this._elementTimelineStylesLookup=i,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 l(e,[{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(e){var t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}},{key:"fork",value:function(t,n){return this.applyStylesToKeyframe(),new e(this._driver,t,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(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}},{key:"_updateStyle",value:function(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(e){var t=this;e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach(function(e){t._backFill[e]=t._globalTimelineStyles[e]||"*",t._currentKeyframe[e]="*"}),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(e,t,n,r){var i=this;t&&(this._previousKeyframe.easing=t);var o=r&&r.params||{},a=function(e,t){var n,r={};return e.forEach(function(e){"*"===e?(n=n||Object.keys(t)).forEach(function(e){r[e]="*"}):st(e,!1,r)}),r}(e,this._globalTimelineStyles);Object.keys(a).forEach(function(e){var t=pt(a[e],o,n);i._pendingStyles[e]=t,i._localTimelineStyles.hasOwnProperty(e)||(i._backFill[e]=i._globalTimelineStyles.hasOwnProperty(e)?i._globalTimelineStyles[e]:"*"),i._updateStyle(e,t)})}},{key:"applyStylesToKeyframe",value:function(){var e=this,t=this._pendingStyles,n=Object.keys(t);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){e._currentKeyframe[n]=t[n]}),Object.keys(this._localTimelineStyles).forEach(function(t){e._currentKeyframe.hasOwnProperty(t)||(e._currentKeyframe[t]=e._localTimelineStyles[t])}))}},{key:"snapshotCurrentStyles",value:function(){var e=this;Object.keys(this._localTimelineStyles).forEach(function(t){var n=e._localTimelineStyles[t];e._pendingStyles[t]=n,e._updateStyle(t,n)})}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"mergeTimelineCollectedStyles",value:function(e){var t=this;Object.keys(e._styleSummary).forEach(function(n){var r=t._styleSummary[n],i=e._styleSummary[n];(!r||i.time>r.time)&&t._updateStyle(n,i.value)})}},{key:"buildKeyframes",value:function(){var e=this;this.applyStylesToKeyframe();var t=new Set,n=new Set,r=1===this._keyframes.size&&0===this.duration,i=[];this._keyframes.forEach(function(o,a){var s=st(o,!0);Object.keys(s).forEach(function(e){var r=s[e];"!"==r?t.add(e):"*"==r&&n.add(e)}),r||(s.offset=a/e.duration),i.push(s)});var o=t.size?yt(t.values()):[],a=n.size?yt(n.values()):[];if(r){var s=i[0],u=at(s);s.offset=0,u.offset=1,i=[s,u]}return Dt(this.element,i,o,a,this.duration,this.startTime,this.easing,!1)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"properties",get:function(){var e=[];for(var t in this._currentKeyframe)e.push(t);return e}}]),e}(),qt=function(e){h(n,e);var t=d(n);function n(e,r,i,o,a,s){var u,l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return m(this,n),(u=t.call(this,e,r,s.delay)).element=r,u.keyframes=i,u.preStyleProps=o,u.postStyleProps=a,u._stretchStartingKeyframe=l,u.timings={duration:s.duration,delay:s.delay,easing:s.easing},u}return l(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var e=this.keyframes,t=this.timings,n=t.delay,r=t.duration,i=t.easing;if(this._stretchStartingKeyframe&&n){var o=[],a=r+n,s=n/a,u=st(e[0],!1);u.offset=0,o.push(u);var l=st(e[0],!1);l.offset=zt(s),o.push(l);for(var c=e.length-1,h=1;h<=c;h++){var f=st(e[h],!1);f.offset=zt((n+f.offset*r)/a),o.push(f)}r=a,n=0,i="",e=o}return Dt(this.element,e,this.preStyleProps,this.postStyleProps,r,n,i,!0)}}]),n}(Ut);function zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Math.pow(10,t-1);return Math.round(e*n)/n}var Bt,Qt,Wt=function e(){m(this,e)},Kt=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"normalizePropertyName",value:function(e,t){return mt(e)}},{key:"normalizeStyleValue",value:function(e,t,n,r){var i="",o=n.toString().trim();if(Gt[t]&&0!==n&&"0"!==n)if("number"==typeof n)i="px";else{var a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push("Please provide a CSS unit value for ".concat(e,":").concat(n))}return o+i}}]),n}(Wt),Gt=(Bt="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(","),Qt={},Bt.forEach(function(e){return Qt[e]=!0}),Qt);function Zt(e,t,n,r,i,o,a,s,u,l,c,h,f){return{type:0,element:e,triggerName:t,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:a,timelines:s,queriedElements:u,preStyleProps:l,postStyleProps:c,totalTime:h,errors:f}}var Xt={},Jt=function(){function e(t,n,r){m(this,e),this._triggerName=t,this.ast=n,this._stateStyles=r}return l(e,[{key:"match",value:function(e,t,n,r){return function(e,t,n,r,i){return e.some(function(e){return e(t,n,r,i)})}(this.ast.matchers,e,t,n,r)}},{key:"buildStyles",value:function(e,t,n){var r=this._stateStyles["*"],i=this._stateStyles[e],o=r?r.buildStyles(t,n):{};return i?i.buildStyles(t,n):o}},{key:"build",value:function(e,t,n,r,i,o,a,s,u,l){var c=[],h=this.ast.options&&this.ast.options.params||Xt,f=this.buildStyles(n,a&&a.params||Xt,c),d=s&&s.params||Xt,v=this.buildStyles(r,d,c),p=new Set,y=new Map,g=new Map,m="void"===r,b={params:Object.assign(Object.assign({},h),d)},_=l?[]:Vt(e,t,this.ast.animation,i,o,f,v,b,u,c),k=0;if(_.forEach(function(e){k=Math.max(e.duration+e.delay,k)}),c.length)return Zt(t,this._triggerName,n,r,m,f,v,[],[],y,g,k,c);_.forEach(function(e){var n=e.element,r=Ue(y,n,{});e.preStyleProps.forEach(function(e){return r[e]=!0});var i=Ue(g,n,{});e.postStyleProps.forEach(function(e){return i[e]=!0}),n!==t&&p.add(n)});var w=yt(p.values());return Zt(t,this._triggerName,n,r,m,f,v,_,w,y,g,k)}}]),e}(),Yt=function(){function e(t,n){m(this,e),this.styles=t,this.defaultParams=n}return l(e,[{key:"buildStyles",value:function(e,t){var n={},r=at(this.defaultParams);return Object.keys(e).forEach(function(t){var n=e[t];null!=n&&(r[t]=n)}),this.styles.styles.forEach(function(e){if("string"!=typeof e){var i=e;Object.keys(i).forEach(function(e){var o=i[e];o.length>1&&(o=pt(o,r,t)),n[e]=o})}}),n}}]),e}(),$t=function(){function e(t,n){var r=this;m(this,e),this.name=t,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach(function(e){r.states[e.name]=new Yt(e.style,e.options&&e.options.params||{})}),en(this.states,"true","1"),en(this.states,"false","0"),n.transitions.forEach(function(e){r.transitionFactories.push(new Jt(t,e,r.states))}),this.fallbackTransition=new Jt(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(e,t){return!0}],options:null,queryCount:0,depCount:0},this.states)}return l(e,[{key:"matchTransition",value:function(e,t,n,r){return this.transitionFactories.find(function(i){return i.match(e,t,n,r)})||null}},{key:"matchStyles",value:function(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}},{key:"containsQueries",get:function(){return this.ast.queryCount>0}}]),e}();function en(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}var tn=new Rt,nn=function(){function e(t,n,r){m(this,e),this.bodyNode=t,this._driver=n,this._normalizer=r,this._animations={},this._playersById={},this.players=[]}return l(e,[{key:"register",value:function(e,t){var n=[],r=Tt(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[e]=r}},{key:"_buildPlayer",value:function(e,t,n){var r=e.element,i=Ve(0,this._normalizer,0,e.keyframes,t,n);return this._driver.animate(r,i,e.duration,e.delay,e.easing,[],!0)}},{key:"create",value:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[],a=this._animations[e],s=new Map;if(a?(n=Vt(this._driver,t,a,"ng-enter","ng-leave",{},{},i,tn,o)).forEach(function(e){var t=Ue(s,e.element,{});e.postStyleProps.forEach(function(e){return t[e]=null})}):(o.push("The requested animation doesn't exist or has already been destroyed"),n=[]),o.length)throw new Error("Unable to create the animation due to the following errors: "+o.join("\n"));s.forEach(function(e,t){Object.keys(e).forEach(function(n){e[n]=r._driver.computeStyle(t,n,"*")})});var u=Le(n.map(function(e){var t=s.get(e.element);return r._buildPlayer(e,{},t)}));return this._playersById[e]=u,u.onDestroy(function(){return r.destroy(e)}),this.players.push(u),u}},{key:"destroy",value:function(e){var t=this._getPlayer(e);t.destroy(),delete this._playersById[e];var n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}},{key:"_getPlayer",value:function(e){var t=this._playersById[e];if(!t)throw new Error("Unable to find the timeline player referenced by "+e);return t}},{key:"listen",value:function(e,t,n,r){var i=He(t,"","","");return Me(this._getPlayer(e),n,i,r),function(){}}},{key:"command",value:function(e,t,n,r){if("register"!=n)if("create"!=n){var i=this._getPlayer(e);switch(n){case"play":i.play();break;case"pause":i.pause();break;case"reset":i.reset();break;case"restart":i.restart();break;case"finish":i.finish();break;case"init":i.init();break;case"setPosition":i.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e)}}else this.create(e,t,r[0]||{});else this.register(e,r[0])}}]),e}(),rn=[],on={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},an={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},sn=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";m(this,e),this.namespaceId=n;var r,i=t&&t.hasOwnProperty("value");if(this.value=null!=(r=i?t.value:t)?r:null,i){var o=at(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}return l(e,[{key:"absorbOptions",value:function(e){var t=e.params;if(t){var n=this.options.params;Object.keys(t).forEach(function(e){null==n[e]&&(n[e]=t[e])})}}},{key:"params",get:function(){return this.options.params}}]),e}(),un=new sn("void"),ln=function(){function e(t,n,r){m(this,e),this.id=t,this.hostElement=n,this._engine=r,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,yn(n,this._hostClassName)}return l(e,[{key:"listen",value:function(e,t,n,r){var i,o=this;if(!this._triggers.hasOwnProperty(t))throw new Error('Unable to listen on the animation trigger event "'.concat(n,'" because the animation trigger "').concat(t,"\" doesn't exist!"));if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'.concat(t,'" because the provided event is undefined!'));if("start"!=(i=n)&&"done"!=i)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(t,'" is not supported!'));var a=Ue(this._elementListeners,e,[]),s={name:t,phase:n,callback:r};a.push(s);var u=Ue(this._engine.statesByElement,e,{});return u.hasOwnProperty(t)||(yn(e,"ng-trigger"),yn(e,"ng-trigger-"+t),u[t]=un),function(){o._engine.afterFlush(function(){var e=a.indexOf(s);e>=0&&a.splice(e,1),o._triggers[t]||delete u[t]})}}},{key:"register",value:function(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)}},{key:"_getTrigger",value:function(e){var t=this._triggers[e];if(!t)throw new Error('The provided animation trigger "'.concat(e,'" has not been registered!'));return t}},{key:"trigger",value:function(e,t,n){var r=this,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this._getTrigger(t),a=new hn(this.id,t,e),s=this._engine.statesByElement.get(e);s||(yn(e,"ng-trigger"),yn(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,s={}));var u=s[t],l=new sn(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&u&&l.absorbOptions(u.options),s[t]=l,u||(u=un),"void"===l.value||u.value!==l.value){var c=Ue(this._engine.playersByElement,e,[]);c.forEach(function(e){e.namespaceId==r.id&&e.triggerName==t&&e.queued&&e.destroy()});var h=o.matchTransition(u.value,l.value,e,l.params),f=!1;if(!h){if(!i)return;h=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:h,fromState:u,toState:l,player:a,isFallbackTransition:f}),f||(yn(e,"ng-animate-queued"),a.onStart(function(){gn(e,"ng-animate-queued")})),a.onDone(function(){var t=r.players.indexOf(a);t>=0&&r.players.splice(t,1);var n=r._engine.playersByElement.get(e);if(n){var i=n.indexOf(a);i>=0&&n.splice(i,1)}}),this.players.push(a),c.push(a),a}if(!function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(var i=0;i=0){for(var r=!1,i=n;i>=0;i--)if(this.driver.containsElement(this._namespaceList[i].hostElement,t)){this._namespaceList.splice(i+1,0,e),r=!0;break}r||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e}},{key:"register",value:function(e,t){var n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}},{key:"registerTrigger",value:function(e,t,n){var r=this._namespaceLookup[e];r&&r.register(t,n)&&this.totalAnimations++}},{key:"destroy",value:function(e,t){var n=this;if(e){var r=this._fetchNamespace(e);this.afterFlush(function(){n.namespacesByHostElement.delete(r.hostElement),delete n._namespaceLookup[e];var t=n._namespaceList.indexOf(r);t>=0&&n._namespaceList.splice(t,1)}),this.afterFlushAnimationsDone(function(){return r.destroy(t)})}}},{key:"_fetchNamespace",value:function(e){return this._namespaceLookup[e]}},{key:"fetchNamespacesByElement",value:function(e){var t=new Set,n=this.statesByElement.get(e);if(n)for(var r=Object.keys(n),i=0;i=0&&this.collectedLeaveElements.splice(o,1)}if(e){var a=this._fetchNamespace(e);a&&a.insertNode(t,n)}r&&this.collectEnterElement(t)}}},{key:"collectEnterElement",value:function(e){this.collectedEnterElements.push(e)}},{key:"markElementAsDisabled",value:function(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),yn(e,"ng-animate-disabled")):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),gn(e,"ng-animate-disabled"))}},{key:"removeNode",value:function(e,t,n,r){if(fn(t)){var i=e?this._fetchNamespace(e):null;if(i?i.removeNode(t,r):this.markElementAsRemoved(e,t,!1,r),n){var o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,r)}}else this._onRemovalComplete(t,r)}},{key:"markElementAsRemoved",value:function(e,t,n,r){this.collectedLeaveElements.push(t),t.__ng_removed={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(e,t,n,r,i){return fn(t)?this._fetchNamespace(e).listen(t,n,r,i):function(){}}},{key:"_buildInstruction",value:function(e,t,n,r,i){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t,i)}},{key:"destroyInnerAnimations",value:function(e){var t=this,n=this.driver.query(e,".ng-trigger",!0);n.forEach(function(e){return t.destroyActiveAnimationsForElement(e)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(e,".ng-animating",!0)).forEach(function(e){return t.finishActiveQueriedAnimationOnElement(e)})}},{key:"destroyActiveAnimationsForElement",value:function(e){var t=this.playersByElement.get(e);t&&t.forEach(function(e){e.queued?e.markedForDestroy=!0:e.destroy()})}},{key:"finishActiveQueriedAnimationOnElement",value:function(e){var t=this.playersByQueriedElement.get(e);t&&t.forEach(function(e){return e.finish()})}},{key:"whenRenderingDone",value:function(){var e=this;return new Promise(function(t){if(e.players.length)return Le(e.players).onDone(function(){return t()});t()})}},{key:"processLeaveNode",value:function(e){var t=this,n=e.__ng_removed;if(n&&n.setForRemoval){if(e.__ng_removed=on,n.namespaceId){this.destroyInnerAnimations(e);var r=this._fetchNamespace(n.namespaceId);r&&r.clearElementCache(e)}this._onRemovalComplete(e,n.setForRemoval)}this.driver.matchesElement(e,".ng-animate-disabled")&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEach(function(e){t.markElementAsDisabled(e,!1)})}},{key:"flush",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(t,n){return e._balanceNamespaceList(t,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var r=0;r=0;T--)this._namespaceList[T].drainQueuedTransitions(t).forEach(function(e){var t=e.player,o=e.element;if(E.push(t),n.collectedEnterElements.length){var a=o.__ng_removed;if(a&&a.setForMove)return void t.destroy()}var h=!f||!n.driver.containsElement(f,o),d=C.get(o),v=p.get(o),y=n._buildInstruction(e,r,v,d,h);if(y.errors&&y.errors.length)O.push(y);else{if(h)return t.onStart(function(){return ht(o,y.fromStyles)}),t.onDestroy(function(){return ct(o,y.toStyles)}),void i.push(t);if(e.isFallbackTransition)return t.onStart(function(){return ht(o,y.fromStyles)}),t.onDestroy(function(){return ct(o,y.toStyles)}),void i.push(t);y.timelines.forEach(function(e){return e.stretchStartingKeyframe=!0}),r.append(o,y.timelines),s.push({instruction:y,player:t,element:o}),y.queriedElements.forEach(function(e){return Ue(u,e,[]).push(t)}),y.preStyleProps.forEach(function(e,t){var n=Object.keys(e);if(n.length){var r=l.get(t);r||l.set(t,r=new Set),n.forEach(function(e){return r.add(e)})}}),y.postStyleProps.forEach(function(e,t){var n=Object.keys(e),r=c.get(t);r||c.set(t,r=new Set),n.forEach(function(e){return r.add(e)})})}});if(O.length){var x=[];O.forEach(function(e){x.push("@".concat(e.triggerName," has failed due to:\n")),e.errors.forEach(function(e){return x.push("- ".concat(e,"\n"))})}),E.forEach(function(e){return e.destroy()}),this.reportError(x)}var A=new Map,j=new Map;s.forEach(function(e){var t=e.element;r.has(t)&&(j.set(t,t),n._beforeAnimationBuild(e.player.namespaceId,e.instruction,A))}),i.forEach(function(e){var t=e.element;n._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(function(e){Ue(A,t,[]).push(e),e.destroy()})});var P=g.filter(function(e){return _n(e,l,c)}),I=new Map;vn(I,this.driver,b,c,"*").forEach(function(e){_n(e,l,c)&&P.push(e)});var D=new Map;v.forEach(function(e,t){vn(D,n.driver,new Set(e),l,"!")}),P.forEach(function(e){var t=I.get(e),n=D.get(e);I.set(e,Object.assign(Object.assign({},t),n))});var R=[],N=[],L={};s.forEach(function(e){var t=e.element,o=e.player,s=e.instruction;if(r.has(t)){if(h.has(t))return o.onDestroy(function(){return ct(t,s.toStyles)}),o.disabled=!0,o.overrideTotalTime(s.totalTime),void i.push(o);var u=L;if(j.size>1){for(var l=t,c=[];l=l.parentNode;){var f=j.get(l);if(f){u=f;break}c.push(l)}c.forEach(function(e){return j.set(e,u)})}var d=n._buildAnimation(o.namespaceId,s,A,a,D,I);if(o.setRealPlayer(d),u===L)R.push(o);else{var v=n.playersByElement.get(u);v&&v.length&&(o.parentPlayer=Le(v)),i.push(o)}}else ht(t,s.fromStyles),o.onDestroy(function(){return ct(t,s.toStyles)}),N.push(o),h.has(t)&&i.push(o)}),N.forEach(function(e){var t=a.get(e.element);if(t&&t.length){var n=Le(t);e.setRealPlayer(n)}}),i.forEach(function(e){e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()});for(var V=0;V0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new De(e.duration,e.delay)}},{key:"queuedPlayers",get:function(){var e=[];return this._namespaceList.forEach(function(t){t.players.forEach(function(t){t.queued&&e.push(t)})}),e}}]),e}(),hn=function(){function e(t,n,r){m(this,e),this.namespaceId=t,this.triggerName=n,this.element=r,this._player=new De,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return l(e,[{key:"setRealPlayer",value:function(e){var t=this;this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach(function(n){t._queuedCallbacks[n].forEach(function(t){return Me(e,n,void 0,t)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(e){this.totalTime=e}},{key:"syncPlayerEvents",value:function(e){var t=this,n=this._player;n.triggerCallback&&e.onStart(function(){return n.triggerCallback("start")}),e.onDone(function(){return t.finish()}),e.onDestroy(function(){return t.destroy()})}},{key:"_queueEvent",value:function(e,t){Ue(this._queuedCallbacks,e,[]).push(t)}},{key:"onDone",value:function(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}},{key:"onStart",value:function(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}},{key:"onDestroy",value:function(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}},{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(e){this.queued||this._player.setPosition(e)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(e){var t=this._player;t.triggerCallback&&t.triggerCallback(e)}}]),e}();function fn(e){return e&&1===e.nodeType}function dn(e,t){var n=e.style.display;return e.style.display=null!=t?t:"none",n}function vn(e,t,n,r,i){var o=[];n.forEach(function(e){return o.push(dn(e))});var a=[];r.forEach(function(n,r){var o={};n.forEach(function(e){var n=o[e]=t.computeStyle(r,e,i);n&&0!=n.length||(r.__ng_removed=an,a.push(r))}),e.set(r,o)});var s=0;return n.forEach(function(e){return dn(e,o[s++])}),a}function pn(e,t){var n=new Map;if(e.forEach(function(e){return n.set(e,[])}),0==t.length)return n;var r=new Set(t),i=new Map;function o(e){if(!e)return 1;var t=i.get(e);if(t)return t;var a=e.parentNode;return t=n.has(a)?a:r.has(a)?1:o(a),i.set(e,t),t}return t.forEach(function(e){var t=o(e);1!==t&&n.get(t).push(e)}),n}function yn(e,t){if(e.classList)e.classList.add(t);else{var n=e.$$classes;n||(n=e.$$classes={}),n[t]=!0}}function gn(e,t){if(e.classList)e.classList.remove(t);else{var n=e.$$classes;n&&delete n[t]}}function mn(e,t,n){Le(n).onDone(function(){return e.processLeaveNode(t)})}function bn(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(e)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}}]),e}();function wn(e,t){var n=null,r=null;return Array.isArray(t)&&t.length?(n=Sn(t[0]),t.length>1&&(r=Sn(t[t.length-1]))):t&&(n=Sn(t)),n||r?new Cn(e,n,r):null}var Cn=function(){var e=function(){function e(t,n,r){m(this,e),this._element=t,this._startStyles=n,this._endStyles=r,this._state=0;var i=e.initialStylesByElement.get(t);i||e.initialStylesByElement.set(t,i={}),this._initialStyles=i}return l(e,[{key:"start",value:function(){this._state<1&&(this._startStyles&&ct(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(ct(this._element,this._initialStyles),this._endStyles&&(ct(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(ht(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ht(this._element,this._endStyles),this._endStyles=null),ct(this._element,this._initialStyles),this._state=3)}}]),e}();return e.initialStylesByElement=new WeakMap,e}();function Sn(e){for(var t=null,n=Object.keys(e),r=0;r=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),jn(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var e,t,n,r;this._destroyed||(this._destroyed=!0,this.finish(),e=this._element,t=this._name,n=In(e,"").split(","),(r=An(n,t))>=0&&(n.splice(r,1),Pn(e,"",n.join(","))))}}]),e}();function Tn(e,t,n){Pn(e,"PlayState",n,xn(e,t))}function xn(e,t){var n=In(e,"");return n.indexOf(",")>0?An(n.split(","),t):An([n],t)}function An(e,t){for(var n=0;n=0)return n;return-1}function jn(e,t,n){n?e.removeEventListener("animationend",t):e.addEventListener("animationend",t)}function Pn(e,t,n,r){var i="animation"+t;if(null!=r){var o=e.style[i];if(o.length){var a=o.split(",");a[r]=n,n=a.join(",")}}e.style[i]=n}function In(e,t){return e.style["animation"+t]}var Dn=function(){function e(t,n,r,i,o,a,s,u){m(this,e),this.element=t,this.keyframes=n,this.animationName=r,this._duration=i,this._delay=o,this._finalStyles=s,this._specialStyles=u,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=a||"linear",this.totalTime=i+o,this._buildStyler()}return l(e,[{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{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(e){return e()}),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach(function(e){return e()}),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(e){this._styler.setPosition(e)}},{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 e=this;this._styler=new On(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return e.finish()})}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}},{key:"beforeDestroy",value:function(){var e=this;this.init();var t={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(r){"offset"!=r&&(t[r]=n?e._finalStyles[r]:wt(e.element,r))})}this.currentSnapshot=t}}]),e}(),Rn=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this)).element=e,i._startingStyles={},i.__initialized=!1,i._styles=$e(r),i}return l(n,[{key:"init",value:function(){var e=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(t){e._startingStyles[t]=e.element.style[t]}),c(g(n.prototype),"init",this).call(this))}},{key:"play",value:function(){var e=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(t){return e.element.style.setProperty(t,e._styles[t])}),c(g(n.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var e=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(t){var n=e._startingStyles[t];n?e.element.style.setProperty(t,n):e.element.style.removeProperty(t)}),this._startingStyles=null,c(g(n.prototype),"destroy",this).call(this))}}]),n}(De),Nn=function(){function e(){m(this,e),this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return l(e,[{key:"validateStyleProperty",value:function(e){return Ze(e)}},{key:"matchesElement",value:function(e,t){return Xe(e,t)}},{key:"containsElement",value:function(e,t){return Je(e,t)}},{key:"query",value:function(e,t,n){return Ye(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return window.getComputedStyle(e)[t]}},{key:"buildKeyframeElement",value:function(e,t,n){n=n.map(function(e){return $e(e)});var r="@keyframes ".concat(t," {\n"),i="";n.forEach(function(e){i=" ";var t=parseFloat(e.offset);r+="".concat(i).concat(100*t,"% {\n"),i+=" ",Object.keys(e).forEach(function(t){var n=e[t];switch(t){case"offset":return;case"easing":return void(n&&(r+="".concat(i,"animation-timing-function: ").concat(n,";\n")));default:return void(r+="".concat(i).concat(t,": ").concat(n,";\n"))}}),r+=i+"}\n"}),r+="}\n";var o=document.createElement("style");return o.textContent=r,o}},{key:"animate",value:function(e,t,n,r,i){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(e){return e instanceof Dn}),u={};bt(n,r)&&s.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return u[e]=t[e]})});var l=function(e){var t={};return e&&(Array.isArray(e)?e:[e]).forEach(function(e){Object.keys(e).forEach(function(n){"offset"!=n&&"easing"!=n&&(t[n]=e[n])})}),t}(t=_t(e,t,u));if(0==n)return new Rn(e,l);var c="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(e,c,t);document.querySelector("head").appendChild(h);var f=wn(e,t),d=new Dn(e,t,c,n,r,i,l,f);return d.onDestroy(function(){var e;(e=h).parentNode.removeChild(e)}),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)}}]),e}(),Ln=function(){function e(t,n,r,i){m(this,e),this.element=t,this.keyframes=n,this.options=r,this._specialStyles=i,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=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}return l(e,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(e){return e()}),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var e=this;if(!this._initialized){this._initialized=!0;var t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",function(){return e._onFinish()})}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(e,t,n){return e.animate(t,n)}},{key:"onStart",value:function(e){this._onStartFns.push(e)}},{key:"onDone",value:function(e){this._onDoneFns.push(e)}},{key:"onDestroy",value:function(e){this._onDestroyFns.push(e)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(e){return e()}),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(e){return e()}),this._onDestroyFns=[])}},{key:"setPosition",value:function(e){this.domPlayer.currentTime=e*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"beforeDestroy",value:function(){var e=this,t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(t[n]=e._finished?e._finalKeyframe[n]:wt(e.element,n))}),this.currentSnapshot=t}},{key:"triggerCallback",value:function(e){var t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(function(e){return e()}),t.length=0}},{key:"totalTime",get:function(){return this._delay+this._duration}}]),e}(),Vn=function(){function e(){m(this,e),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Mn().toString()),this._cssKeyframesDriver=new Nn}return l(e,[{key:"validateStyleProperty",value:function(e){return Ze(e)}},{key:"matchesElement",value:function(e,t){return Xe(e,t)}},{key:"containsElement",value:function(e,t){return Je(e,t)}},{key:"query",value:function(e,t,n){return Ye(e,t,n)}},{key:"computeStyle",value:function(e,t,n){return window.getComputedStyle(e)[t]}},{key:"overrideWebAnimationsSupport",value:function(e){this._isNativeImpl=e}},{key:"animate",value:function(e,t,n,r,i){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(e,t,n,r,i,o);var s={duration:n,delay:r,fill:0==r?"both":"forwards"};i&&(s.easing=i);var u={},l=o.filter(function(e){return e instanceof Ln});bt(n,r)&&l.forEach(function(e){var t=e.currentSnapshot;Object.keys(t).forEach(function(e){return u[e]=t[e]})});var c=wn(e,t=_t(e,t=t.map(function(e){return st(e,!1)}),u));return new Ln(e,t,s,c)}}]),e}();function Mn(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var Fn,Hn=((Fn=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this))._nextAnimationId=0,i._renderer=e.createRenderer(r.body,{id:"0",encapsulation:u.P.None,styles:[],data:{animation:[]}}),i}return l(n,[{key:"build",value:function(e){var t=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(e)?je(e):e;return zn(this._renderer,null,t,"register",[n]),new Un(t,this._renderer)}}]),n}(Ae)).\u0275fac=function(e){return new(e||Fn)(u.Qb(u.E),u.Qb(k.c))},Fn.\u0275prov=u.Db({token:Fn,factory:Fn.\u0275fac}),Fn),Un=function(e){h(n,e);var t=d(n);function n(e,r){var i;return m(this,n),(i=t.call(this))._id=e,i._renderer=r,i}return l(n,[{key:"create",value:function(e,t){return new qn(this._id,e,t||{},this._renderer)}}]),n}(function(){return function e(){m(this,e)}}()),qn=function(){function e(t,n,r,i){m(this,e),this.id=t,this.element=n,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",r)}return l(e,[{key:"_listen",value:function(e,t){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(e),t)}},{key:"_command",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0&&e3&&void 0!==arguments[3])||arguments[3];this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,r)}},{key:"removeChild",value:function(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate,n)}},{key:"selectRootElement",value:function(e,t){return this.delegate.selectRootElement(e,t)}},{key:"parentNode",value:function(e){return this.delegate.parentNode(e)}},{key:"nextSibling",value:function(e){return this.delegate.nextSibling(e)}},{key:"setAttribute",value:function(e,t,n,r){this.delegate.setAttribute(e,t,n,r)}},{key:"removeAttribute",value:function(e,t,n){this.delegate.removeAttribute(e,t,n)}},{key:"addClass",value:function(e,t){this.delegate.addClass(e,t)}},{key:"removeClass",value:function(e,t){this.delegate.removeClass(e,t)}},{key:"setStyle",value:function(e,t,n,r){this.delegate.setStyle(e,t,n,r)}},{key:"removeStyle",value:function(e,t,n){this.delegate.removeStyle(e,t,n)}},{key:"setProperty",value:function(e,t,n){"@"==t.charAt(0)&&"@.disabled"==t?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}},{key:"setValue",value:function(e,t){this.delegate.setValue(e,t)}},{key:"listen",value:function(e,t,n){return this.delegate.listen(e,t,n)}},{key:"disableAnimations",value:function(e,t){this.engine.disableAnimations(e,t)}},{key:"data",get:function(){return this.delegate.data}}]),e}(),Jn=function(e){h(r,e);var n=d(r);function r(e,t,i,o){var a;return m(this,r),(a=n.call(this,t,i,o)).factory=e,a.namespaceId=t,a}return l(r,[{key:"setProperty",value:function(e,t,n){"@"==t.charAt(0)?"."==t.charAt(1)&&"@.disabled"==t?this.disableAnimations(e,n=void 0===n||!!n):this.engine.process(this.namespaceId,e,t.substr(1),n):this.delegate.setProperty(e,t,n)}},{key:"listen",value:function(e,n,r){var i,o,a=this;if("@"==n.charAt(0)){var s,u=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(e),l=n.substr(1),c="";return"@"!=l.charAt(0)&&(o=(i=l).indexOf("."),l=(s=t([i.substring(0,o),i.substr(o+1)],2))[0],c=s[1]),this.engine.listen(this.namespaceId,u,l,c,function(e){a.factory.scheduleListenerCallback(e._data||-1,r,e)})}return this.delegate.listen(e,n,r)}}]),r}(Xn),Yn=((Qn=function(e){h(n,e);var t=d(n);function n(e,r,i){return m(this,n),t.call(this,e.body,r,i)}return n}(kn)).\u0275fac=function(e){return new(e||Qn)(u.Qb(k.c),u.Qb(nt),u.Qb(Wt))},Qn.\u0275prov=u.Db({token:Qn,factory:Qn.\u0275fac}),Qn),$n=[{provide:nt,useFactory:function(){return"function"==typeof Mn()?new Vn:new Nn}},{provide:new u.q("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:Ae,useClass:Hn},{provide:Wt,useFactory:function(){return new Kt}},{provide:kn,useClass:Yn},{provide:u.E,useFactory:function(e,t,n){return new Zn(e,t,n)},deps:[pe,kn,u.z]}],er=((Wn=function e(){m(this,e)}).\u0275mod=u.Fb({type:Wn}),Wn.\u0275inj=u.Eb({factory:function(e){return new(e||Wn)},providers:$n,imports:[xe]}),Wn),tr=r("RKnZ"),nr=r("KZX/"),rr=((Kn=function e(){m(this,e)}).\u0275mod=u.Fb({type:Kn}),Kn.\u0275inj=u.Eb({factory:function(e){return new(e||Kn)},imports:[[k.b,nr.a,_.b,tr.a,f.d]]}),Kn),ir=r("tk/3"),or=((Gn=function e(){m(this,e)}).\u0275mod=u.Fb({type:Gn,bootstrap:[v]}),Gn.\u0275inj=u.Eb({factory:function(e){return new(e||Gn)},providers:[b.a,{provide:k.h,useClass:k.d}],imports:[[xe,er,k.b,X,nr.a,ir.c,rr]]}),Gn);Object(u.R)(),Oe().bootstrapModule(or).catch(function(e){return console.error(e)})},zn8P:function(e,t){function n(e){return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t})}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="zn8P"},zx2A:function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return s}),n.d(t,"c",function(){return u});var r=n("7o/Q"),i=n("HDdC"),o=n("SeVD"),a=function(e){h(n,e);var t=d(n);function n(e){var r;return m(this,n),(r=t.call(this)).parent=e,r}return l(n,[{key:"_next",value:function(e){this.parent.notifyNext(e)}},{key:"_error",value:function(e){this.parent.notifyError(e),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(),this.unsubscribe()}}]),n}(r.a),s=function(e){h(n,e);var t=d(n);function n(){return m(this,n),t.apply(this,arguments)}return l(n,[{key:"notifyNext",value:function(e){this.destination.next(e)}},{key:"notifyError",value:function(e){this.destination.error(e)}},{key:"notifyComplete",value:function(){this.destination.complete()}}]),n}(r.a);function u(e,t){if(!t.closed)return e instanceof i.a?e.subscribe(t):Object(o.a)(e)(t)}}},[[0,0]]])}(); \ No newline at end of file diff --git a/classifai-core/src/main/resources/webroot/polyfills-es2015.369a62f670b8cf057bae.js b/classifai-core/src/main/resources/webroot/polyfills-es2015.59f4ceb238cc6d4419d6.js similarity index 100% rename from classifai-core/src/main/resources/webroot/polyfills-es2015.369a62f670b8cf057bae.js rename to classifai-core/src/main/resources/webroot/polyfills-es2015.59f4ceb238cc6d4419d6.js diff --git a/classifai-core/src/main/resources/webroot/polyfills-es5.8976f9887c76351965db.js b/classifai-core/src/main/resources/webroot/polyfills-es5.967163391b02608d5ea8.js similarity index 100% rename from classifai-core/src/main/resources/webroot/polyfills-es5.8976f9887c76351965db.js rename to classifai-core/src/main/resources/webroot/polyfills-es5.967163391b02608d5ea8.js diff --git a/classifai-core/src/main/resources/webroot/runtime-es2015.2aa3647ab78c53f12400.js b/classifai-core/src/main/resources/webroot/runtime-es2015.fa472a02cd6e6161b3d2.js similarity index 76% rename from classifai-core/src/main/resources/webroot/runtime-es2015.2aa3647ab78c53f12400.js rename to classifai-core/src/main/resources/webroot/runtime-es2015.fa472a02cd6e6161b3d2.js index eaea9c27c..6f51a2a28 100644 --- a/classifai-core/src/main/resources/webroot/runtime-es2015.2aa3647ab78c53f12400.js +++ b/classifai-core/src/main/resources/webroot/runtime-es2015.fa472a02cd6e6161b3d2.js @@ -1 +1 @@ -!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,s=[];p