@colijnit/sharedcomponents 262.1.18 → 262.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -231,7 +231,7 @@ ${e.map((t,n)=>`${n+1}) ${t.toString()}`).join(`
|
|
|
231
231
|
`)}return t},i.prototype.getValidationFieldsErrorString=function(){var e="";return fc.ForOwnProperty(this.fieldValidations,function(t,n){var r=t.getErrorString();r&&(e+=n+": "+r)}),e},i.prototype.createOrGetSubValidationResult=function(e,t){t===void 0&&(t=null);var n=this._getSubValidationResult(e,t);return n||(n=new i,n.objectId=t,this._addSubValidationToValidationResultField(e,n)),n},i.prototype.hasErrorForPropertyWithId=function(e,t){var n=this.getAllErrorMessages();return xGe.ContainsAnElementFoundBy(n,function(r){return r.getParentFieldId()===e&&kGe.IsEqualBoId(r.boId,t)})},i.prototype._getSubValidationResult=function(e,t,n){var r=this;return t===void 0&&(t=null),n===void 0&&(n=null),n===null&&(n=this.fieldValidations),fc.ForOwnProperty(n,function(o,s){for(var a=o.subValidations.length,l=0;l<a;l++){var c=o.subValidations[l];if(c.objectType===e&&(c.objectId===t||t===null))return c;if(c.fieldValidations)return r._getSubValidationResult(e,t,c.fieldValidations)}}),null},i.prototype._addSubValidationToValidationResultField=function(e,t){var n=!1;if(fc.ForOwnProperty(this.fieldValidations,function(o,s){if(s===e)return o.subValidations.push(t),n=!0,!1}),!n){var r=new Lj;r.subValidations.push(t),this.addValidationResultField(e,r)}},i.prototype._mergeValidationResultFieldsObjects=function(e){var t=this;this.fieldValidations&&e&&fc.ForOwnProperty(e,function(n,r){t.fieldValidations[r]=n})},i.prototype._getMessageString=function(e,t){e===void 0&&(e=!0);var n="";if(this.messages)for(var r=this.messages.length,o=0;o<r;o++){var s=this.messages[o];s&&(s.messageType===bfe.Error||!t)&&(e&&!ff.IsNaN(s.code)?n+=s.code+": "+s.message+`
|
|
232
232
|
`:n+=s.message+`
|
|
233
233
|
`)}return n},i})();var MI=(function(){function i(e){this.fieldNames=[],this.pagingParameters=new TGe,this.resultObjects=[],this.validationResult=new wj,this.setData(e)}return Object.defineProperty(i.prototype,"success",{get:function(){return this.validationResult&&this.validationResult.success},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fail",{get:function(){return!this.success},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"validationMessagesAsString",{get:function(){var e=[];return this.validationResult&&this.validationResult.messages&&this.validationResult.messages.forEach(function(t){t&&e.push(t.message)}),e.join(`
|
|
234
|
-
`)},enumerable:!0,configurable:!0}),i.prototype.setData=function(e){e&&(e.fieldNames&&(this.fieldNames=e.fieldNames),e.pagingParameters&&this.pagingParameters.setData(e.pagingParameters),Ro(e.resultObject)&&(this.resultObject=e.resultObject),e.resultObjects&&(this.resultObjects=e.resultObjects),e.validationResult&&this.validationResult.setData(e.validationResult))},i.prototype.getGeneralErrorString=function(){return this.validationResult?this.validationResult.getGeneralErrorString():""},i})();var _c=(function(i){return i.ListPrinters="listAllPrinters",i.PrintOrderConfirmation="printOrderConfirmation",i.EmailOrderConfirmation="emailOrderConfirmation",i.PdfOrderConfirmation="pdfOrderConfirmation",i.TextingReport="textingReport",i.CutReceipt="cutReceipt",i.OpenDrawer="openDrawer",i.GetOrderConfirmationPrintLayouts="getOrderConfirmationPrintLayouts",i.GetOrderConfirmationEmailLayouts="getOrderConfirmationEmailLayouts",i.GetStockStickerEmailLayouts="getStockStickerEmailLayouts",i.GetStockStickerPrintLayouts="getStockStickerPrintLayouts",i.GetPriceTagPrintLayouts="getPriceTagPrintLayouts",i.GetOrderConfirmationDefaultSendMethod="getOrderConfirmationDefaultSendMethod",i.GetPurchaseOrderDefaultSendMethod="getPurchaseOrderDefaultSendMethod",i.GetReminderPurchaseOrderDefaultSendMethod="getReminderPurchaseOrderDefaultSendMethod",i.GetDemandingDeliveryDefaultSendMethod="getDemandingDeliveryDefaultSendMethod",i.GetDeliveryNoteDefaultSendMethod="getDeliveryNoteDefaultSendMethod",i.GetDefaultEmailAddressListForOrderConfirmation="getDefaultEmailAddressListForOrderConfirmation",i.GetPurchaseOrderEmailLayouts="getPurchaseOrderEmailLayouts",i})(_c||{});var Ms=(function(i){return i.Printers="Printers",i.Stock="Stock",i.ReportingDocument="reportingDocuments",i.Report="Report",i.CoReport="CoReport",i.General="General",i.Articles="Articles",i.Config="config",i.Tags="Tags",i})(Ms||{});var Pj=(function(i){return i.GetWarehouses="getWarehouses",i.UpdateLocation="updateLocation",i.UpdateSerie="updateSerie",i.UpdateBatch="updateBatch",i.IsArticleStockAdditionalInfoEditable="isArticleStockAdditionalInfoEditable",i.IsStockEditable="isStockEditable",i.GetArtStockStatus="getArtStockStatus",i.GetArticleStockInformation="getArticleStockInformation",i.GetStockHistory="getStockHistory",i.PrintStockStickers="printStockStickers",i.PrintPriceStickers="printPriceStickers",i})(Pj||{});var Qs=(function(i){return i.SelectSingleObject="selectSingleObject",i.SelectMultipleObjects="selectMultipleObjects",i.UpdateObject="updateObject",i.InsertObject="insertObject",i.DeleteObject="deleteObject",i.ExecuteMethod="executeMethod",i.LockObject="lockObject",i.UnlockObject="unlockObject",i.UpdateMultipleObjects="updateMultipleObjects",i.InsertMultipleObjects="insertMultipleObjects",i.DeleteMultipleObjects="deleteMultipleObjects",i.Commit="commit",i})(Qs||{});var Mj=(function(i){return i.DataService="dataservice",i.LoginService="login",i.ReportService="reportservice",i.WebCallService="webcallservice",i.PublicService="publicservice",i.DatasessionService="datasessionservice",i.PrintingService="printingservice",i})(Mj||{});var Lfe=(function(i){return i.CoDocument="CoDocument",i})(Lfe||{});var wfe=(function(i){return i.SelectDocsByTableKey="selectDocsByTableKey",i})(wfe||{});var Pfe=(function(i){return i.GetDocumentContent="getDocumentContent",i})(Pfe||{});var Mfe=(function(i){return i.StoreSignedDoc="storeSignedDoc",i})(Mfe||{});var kj=(function(i){return i.SubRubric="SubRubric",i.ConfigTreeObject="ConfigTreeObject",i})(kj||{});var Hbt=(function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},i(e,t)};return function(e,t){i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Wbt=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},jbt=function(i,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,r&&(o=c[0]&2?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,r=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(i,t)}catch(d){c=[6,d],r=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},FGe=(function(i){Hbt(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.listAllPrinters=function(t){t===void 0&&(t=!0);var n={moduleName:Ms.ReportingDocument,methodName:_c.ListPrinters,refCursorAsArray:!0};return this._call(Qs.ExecuteMethod,n)},e.prototype.printReport=function(t){var n={printerName:t.printerName,saveDefaultPrinterForUser:t.saveDefaultPrinterForUser,saveDefaultPrinterForAllUsers:t.saveDefaultPrinterForAllUsers,copies:t.copies,transId:t.transId,reportId:t.reportId},r={moduleName:Ms.ReportingDocument,methodName:_c.PrintOrderConfirmation,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getStockStickerEmailLayouts=function(t){var n={moduleName:Ms.ReportingDocument,methodName:_c.GetStockStickerEmailLayouts,refCursorAsArray:!0,parameterValues:t};return this._call(Qs.ExecuteMethod,n)},e.prototype.getStockStickerPrintLayouts=function(t){var n={moduleName:Ms.ReportingDocument,methodName:_c.GetStockStickerPrintLayouts,refCursorAsArray:!0,parameterValues:t};return this._call(Qs.ExecuteMethod,n)},e.prototype.getPriceTagPrintLayouts=function(t){var n={moduleName:Ms.ReportingDocument,methodName:_c.GetPriceTagPrintLayouts,refCursorAsArray:!0,parameterValues:t};return this._call(Qs.ExecuteMethod,n)},e.prototype.emailReport=function(t){var n={moduleName:Ms.ReportingDocument,methodName:_c.EmailOrderConfirmation,refCursorAsArray:!0,parameterValues:t};return this._call(Qs.ExecuteMethod,n)},e.prototype.pdfReport=function(t){var n={moduleName:Ms.ReportingDocument,methodName:_c.PdfOrderConfirmation,refCursorAsArray:!0,parameterValues:t};return this._call(Qs.ExecuteMethod,n)},e.prototype.getPrintStockStickers=function(t){var n={goodId:t.goodId,warehouse:t.warehouse,location:t.location,batch:t.batch,serial:t.serial,amount:t.amount,reportId:t.reportId,printerName:t.printerName},r={moduleName:Ms.Stock,methodName:Pj.PrintStockStickers,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.printPriceStickers=function(t){var n={priceListCode:t.priceListCode,reportId:t.reportId,printerName:t.printerName,goodIds:t.goodIds},r={moduleName:Ms.Articles,methodName:Pj.PrintPriceStickers,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getPrintTemplates=function(t){var n={defaultPrinterName:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetOrderConfirmationPrintLayouts,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getEmailTemplates=function(t){var n={emailSubject:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetOrderConfirmationEmailLayouts,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getOrderConfirmationDefaultSendMethod=function(t){var n={relationId:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetOrderConfirmationDefaultSendMethod,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getPurchaseOrderDefaultSendMethod=function(t){var n={relationId:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetPurchaseOrderDefaultSendMethod,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getReminderPurchaseOrderDefaultSendMethod=function(t){var n={relationId:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetReminderPurchaseOrderDefaultSendMethod,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getDemandingDeliveryDefaultSendMethod=function(t){var n={relationId:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetDemandingDeliveryDefaultSendMethod,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getDeliveryNoteDefaultSendMethod=function(t){var n={relationId:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetDeliveryNoteDefaultSendMethod,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getDefaultEmailAddressListForOrderConfirmation=function(t){var n={transactionUUID:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetDefaultEmailAddressListForOrderConfirmation,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getPurchaseOrderEmailLayouts=function(t){var n={transactionUUID:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetPurchaseOrderEmailLayouts,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.selectDocsByTableKey=function(t,n){var r={table:t,key:n};return this._selectMultiple(Ms.General,Lfe.CoDocument,wfe.SelectDocsByTableKey,r)},e.prototype.getDocumentContent=function(t,n){if(n===void 0&&(n=!0),t==null)return Promise.resolve(new MI);var r={documentId:t,thumbnail:n},o={moduleName:Ms.General,methodName:Pfe.GetDocumentContent,refCursorAsArray:!0,parameterValues:r};return this._call(Qs.ExecuteMethod,o)},e.prototype.storeSignedDoc=function(t,n){var r={docId:t,document:n},o={moduleName:Ms.Report,methodName:Mfe.StoreSignedDoc,refCursorAsArray:!0,parameterValues:r};return this._call(Qs.ExecuteMethod,o)},e.prototype.getConfigSubRubric=function(t,n,r){var o={parentRubricId:t,configId:n,fixedKey:r};return this._selectMultiple(Ms.Config,kj.SubRubric,void 0,o)},e.prototype.getConfigTreeObject=function(t,n){var r={full:t,clientType:n};return this._selectMultiple(Ms.Config,kj.ConfigTreeObject,void 0,r)},e.prototype.commit=function(){return this._call(Qs.Commit,{},Mj.DatasessionService)},e.prototype._selectMultiple=function(t,n,r,o){var s={moduleName:t,objectName:n};return r&&(s.operationName=r),o&&(s.parameterValues=o),this._call(Qs.SelectMultipleObjects,s)},e.prototype._call=function(t,n,r,o){return r===void 0&&(r=Mj.DataService),o===void 0&&(o=!1),Wbt(this,void 0,void 0,function(){return jbt(this,function(s){return[2,this.connector.call(t,n,o,r,this.endPoint)]})})},e})(bj);var VGe=Be(Fy());var UGe=Be(C_());var kfe=(function(i){return i.GetDocumentContent="getDocumentContent",i})(kfe||{});var zbt=(function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},i(e,t)};return function(e,t){i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),xj=function(){return xj=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},xj.apply(this,arguments)},Rl=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ol=function(i,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,r&&(o=c[0]&2?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,r=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(i,t)}catch(d){c=[6,d],r=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},BGe=(function(i){zbt(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.endPoint=UGe.EndPoint.PublicService,t}return e.prototype.listAllPrinters=function(t){return t===void 0&&(t=!0),Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.printReport=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getStockStickerEmailLayouts=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getStockStickerPrintLayouts=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.emailReport=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.pdfReport=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getPrintTemplates=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getEmailTemplates=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getOrderConfirmationDefaultSendMethod=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getPurchaseOrderDefaultSendMethod=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getReminderPurchaseOrderDefaultSendMethod=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getDemandingDeliveryDefaultSendMethod=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getDeliveryNoteDefaultSendMethod=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getDefaultEmailAddressListForOrderConfirmation=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getPurchaseOrderEmailLayouts=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getPrintStockStickers=function(){return Rl(this,void 0,void 0,function(){return Ol(this,function(t){return[2,null]})})},e.prototype.printPriceStickers=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.selectDocsByTableKey=function(t,n){return console.warn("selectDocsByTableKey not implemented"),Promise.resolve(new MI)},e.prototype.getDocumentContent=function(t,n){return n===void 0&&(n=!0),Rl(this,void 0,void 0,function(){var r,o;return Ol(this,function(s){return r={documentId:t,thumbnail:n},o=xj(xj({},this.createServiceRequestData()),{parameterValues:r}),[2,this._call(kfe.GetDocumentContent,o)]})})},e.prototype.storeSignedDoc=function(t,n){return console.warn("storeSignedDoc not implemented"),Promise.resolve(new MI)},e.prototype.getConfigSubRubric=function(t,n,r){return console.warn("getConfigSubRubric not implemented"),Promise.resolve(new MI)},e.prototype.getConfigTreeObject=function(t,n){return console.warn("getConfigTreeObject not implemented"),Promise.resolve(new MI)},e.prototype.commit=function(){return Rl(this,void 0,void 0,function(){return Ol(this,function(t){return[2,null]})})},e.prototype.createServiceRequestData=function(){var t={languageCode:this.languageCode};return t},e.prototype._call=function(t,n,r){return r===void 0&&(r=!1),Rl(this,void 0,void 0,function(){return Ol(this,function(o){return[2,this.connector.call(t,n,r,void 0,this.endPoint)]})})},e})(bj);var Ybt=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Kbt=function(i,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,r&&(o=c[0]&2?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,r=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(i,t)}catch(d){c=[6,d],r=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},GGe=(function(){function i(e){var t=this;this.showLoader=new Jm,this.connectionAborted=new Jm,this.connectionResetInactivity=new Jm,this.useLoginEncryption=!1,this._subs=[],e&&(this.url=e.url?e.url:"",this.version=e.version?e.version:"",this.schema=e.schema?e.schema:"",this.branch=e.branch?e.branch:"",this.languageCode=e.languageCode,this.currencyId=e.hasOwnProperty("currencyId")?e.currencyId:void 0,this.useLoginEncryption=e.hasOwnProperty("useLoginEncryption")?e.useLoginEncryption===!0:!1),this._connector=new VGe.Connector(e),this.sharedapi=i.createConnector(this._connector.isPublicSession(),this._connector.hasSession()),this.sharedapi.connector=this._connector,this.sharedapi.languageCode=this.languageCode,this.sharedapi.branchNr=this.branch,this._subs.push(this.sharedapi.showLoader.subscribe(function(n){return t.showLoader.next(n)}),this.sharedapi.connectionAborted.subscribe(function(){return t.connectionAborted.next()}),this.sharedapi.connectionResetInactivity.subscribe(function(){return t._handleConnectionReset()}))}return i.prototype.connect=function(){return Ybt(this,void 0,void 0,function(){return Kbt(this,function(e){return[2,this._connector.connect()]})})},i.prototype.listAllPrinters=function(e){return e===void 0&&(e=!0),this.sharedapi.listAllPrinters(e)},i.prototype.printReport=function(e){return this.sharedapi.printReport(e)},i.prototype.getStockStickerEmailLayouts=function(e){return this.sharedapi.getStockStickerEmailLayouts(e)},i.prototype.getStockStickerPrintLayouts=function(e){return this.sharedapi.getStockStickerPrintLayouts(e)},i.prototype.emailReport=function(e){return this.sharedapi.emailReport(e)},i.prototype.pdfReport=function(e){return this.sharedapi.pdfReport(e)},i.prototype.getPrintTemplates=function(e){return this.sharedapi.getPrintTemplates(e)},i.prototype.getEmailTemplates=function(e){return this.sharedapi.getEmailTemplates(e)},i.prototype.getOrderConfirmationDefaultSendMethod=function(e){return this.sharedapi.getOrderConfirmationDefaultSendMethod(e)},i.prototype.getPurchaseOrderDefaultSendMethod=function(e){return this.sharedapi.getPurchaseOrderDefaultSendMethod(e)},i.prototype.getReminderPurchaseOrderDefaultSendMethod=function(e){return this.sharedapi.getReminderPurchaseOrderDefaultSendMethod(e)},i.prototype.getDemandingDeliveryDefaultSendMethod=function(e){return this.sharedapi.getDemandingDeliveryDefaultSendMethod(e)},i.prototype.getDeliveryNoteDefaultSendMethod=function(e){return this.sharedapi.getDeliveryNoteDefaultSendMethod(e)},i.prototype.getDefaultEmailAddressListForOrderConfirmation=function(e){return this.sharedapi.getDefaultEmailAddressListForOrderConfirmation(e)},i.prototype.getPurchaseOrderEmailLayouts=function(e){return this.sharedapi.getPurchaseOrderEmailLayouts(e)},i.prototype.getPrintStockStickers=function(e){return this.sharedapi.getPrintStockStickers(e)},i.prototype.printPriceStickers=function(e){return this.sharedapi.printPriceStickers(e)},i.prototype.selectDocsByTableKey=function(e,t){return this.sharedapi.selectDocsByTableKey(e,t)},i.prototype.getDocumentContent=function(e,t){return t===void 0&&(t=!0),this.sharedapi.getDocumentContent(e,t)},i.prototype.storeSignedDoc=function(e,t){return this.sharedapi.storeSignedDoc(e,t)},i.prototype.getConfigSubRubric=function(e,t,n){return this.sharedapi.getConfigSubRubric(e,t,n)},i.prototype.getConfigTreeObject=function(e,t){return this.sharedapi.getConfigTreeObject(e,t)},i.prototype.commit=function(){return this.sharedapi.commit()},i.createConnector=function(e,t){return!e||t?new FGe:new BGe},i.prototype._handleConnectionReset=function(){this.connectionResetInactivity.next()},i})();var HGe=Be(Wi()),Fj=class extends HGe.BusinessObject{};var WGe=Be(Wi()),Uj=class extends WGe.BusinessObject{};var kI=Be(Xa()),jGe=Be(Wi()),zy=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Il=class extends jGe.BusinessObject{};zy([(0,kI.BooleanText)("T")],Il.prototype,"locationItem",void 0);zy([(0,kI.BooleanText)("T")],Il.prototype,"serialNoItem",void 0);zy([(0,kI.BooleanText)("T")],Il.prototype,"batchItem",void 0);zy([(0,kI.BooleanText)("T")],Il.prototype,"trackingStock",void 0);zy([(0,kI.BooleanText)("T")],Il.prototype,"selected",void 0);zy([(0,kI.BooleanText)("T")],Il.prototype,"transactionTransfer",void 0);var zGe=Be(Wi()),Bj=class extends zGe.BusinessObject{};var YGe=Be(Wi()),eE=class extends YGe.BusinessObject{};var KGe=Be(Wi()),Vj=class extends KGe.BusinessObject{};var qGe=Be(Wi()),Gj=class extends qGe.BusinessObject{};var oje=Be(Cz()),sje=Be(n_e()),aje=Be(o7e()),lje=Be(Cl()),sEe=Be(d_e()),cje=Be(MH()),dje=Be(c9e()),uje=Be(_Y()),hje=Be(R9e()),fje=Be(O9e()),_je=Be(CY()),pje=Be(I9e()),VY=Be(z_()),Eje=Be(Z9e()),mje=Be(KI()),gje=Be(J9e()),Aje=Be(Cb()),Tje=Be(Sb()),Sje=Be(QS()),Cje=Be(tje()),Rje=Be(Zx()),GY=Be(BY());var mc=(()=>{let e=class e{constructor(n){this._optionsService=n,this._boFactory=new lje.BusinessObjectFactory}connect(){return B(this,null,function*(){this.sharedConnector=new GGe(this._optionsService.options),yield this.sharedConnector.connect(),this.articleConnector=new Nj(this._optionsService.options),this.mainConnector=new oje.MainApi(this._optionsService.options),this.relationConnector=new dje.RelationApi(this._optionsService.options)})}getConfiguration(n,r){return B(this,null,function*(){let o=yield this.mainConnector.getObjectConfigurations(n,r);if(o&&o.validationResult&&o.validationResult.success)return this._boFactory.makeBOArrayFromRawBackendDataArray(cje.ObjectConfiguration,o.resultObjects)})}getSequenceValue(n){return B(this,null,function*(){let r=yield this.mainConnector.getSequenceValue(n);return r&&r.validationResult&&r.validationResult.success?parseInt(r.resultObject):null})}getAllPrinters(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.listAllPrinters().then(o=>{o.validationResult&&o.validationResult.success?o.resultObject&&n(this._boFactory.makeBOArrayFromRawBackendDataArray(sje.Printer,o.resultObject)):r(o.validationMessagesAsString)}))})}getDefaultPrinter(n,r){return B(this,null,function*(){let o=yield this.mainConnector.getStandardPrinter(n,r);if(o&&o.validationResult&&o.validationResult.success){if(o.resultObject&&o.resultObject?.length>0)return o.resultObject}else return null})}getSendMethods(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.getSendMethods().then(o=>{o.validationResult&&o.validationResult.success?o.resultObject&&o.resultObject.result&&n(this._boFactory.makeBOArrayFromRawBackendDataArray(aje.SendMethod,o.resultObject.result)):r(o.validationMessagesAsString)}))})}getScreenConfigTree(){return B(this,null,function*(){return new Promise((n,r)=>this.sharedConnector.getConfigTreeObject("T","JS").then(o=>{o.validationResult&&o.validationResult.success?o.resultObjects&&n(o.resultObjects):r(o.validationMessagesAsString)}))})}getScreenConfigSubRubric(n,r,o){return B(this,null,function*(){return new Promise((s,a)=>this.sharedConnector.getConfigSubRubric(n,r,o).then(l=>{l.validationResult&&l.validationResult.success?l.resultObjects&&s(l.resultObjects):a(l.validationMessagesAsString)}))})}getTagsFullTree(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getTagsFullTree(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(sEe.TagTreeItem,a.resultObjects)):s(a.validationMessagesAsString)}))})}getComponentActivitiesWithoutRelationFiltering(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getComponentActivitiesWithoutRelationFiltering(n,r).then(a=>{a&&a.validationResult&&a.validationResult.success?o(this._boFactory.makeBOArrayFromRawBackendDataArray(VY.Activity,a.resultObject)):s(a.validationMessagesAsString)}))})}getRelationSmallObject(n){return B(this,null,function*(){return new Promise((r,o)=>this.relationConnector.getRelationSmallObject(n).then(s=>{s&&s.validationResult&&s.validationResult.success?r(this._boFactory.makeWithRawBackendData(mje.RelationSmallObject,s.resultObject)):o(s.validationMessagesAsString)}))})}getWorkflowStatusForActivity(n,r,o){return B(this,null,function*(){return new Promise((s,a)=>this.mainConnector.getWorkflowStatusForActivity(n,r,o).then(l=>B(this,null,function*(){l&&l.validationResult&&l.validationResult.success?s(this._boFactory.makeWithRawBackendData(Cje.ActivityWorkflow,l.resultObject)):a(l.validationMessagesAsString)})))})}insertActivity(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertActivity(n).then(s=>B(this,null,function*(){r(s.validationResult)})))})}insertWork(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertActivity(n).then(s=>B(this,null,function*(){s&&s.validationResult&&s.validationResult.success?r(this._boFactory.makeWithRawBackendData(Aje.Work,s.resultObject)):o(s.validationMessagesAsString)})))})}insertRemark(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertActivity(n).then(s=>B(this,null,function*(){s&&s.validationResult&&s.validationResult.success?r(this._boFactory.makeWithRawBackendData(Tje.Remark,s.resultObject)):o(s.validationMessagesAsString)})))})}insertTask(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertActivity(n).then(s=>B(this,null,function*(){s&&s.validationResult&&s.validationResult.success?r(this._boFactory.makeWithRawBackendData(Sje.Task,s.resultObject)):o(s.validationMessagesAsString)})))})}updateActivity(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.updateActivity(n).then(s=>B(this,null,function*(){r(s.validationResult)})))})}deleteActivity(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.deleteActivity(n).then(s=>B(this,null,function*(){r(s.validationResult)})))})}lockTask(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.lockTask(n).then(s=>B(this,null,function*(){r(s.validationResult)})))})}fireTrigger(n,r,o){return B(this,null,function*(){return new Promise((s,a)=>this.mainConnector.fireTrigger(n,r,o).then(l=>B(this,null,function*(){s(l.validationResult)})))})}fireGenericTrigger(n,r,o){return B(this,null,function*(){return new Promise((s,a)=>this.mainConnector.fireGenericTrigger(n,r,o).then(l=>B(this,null,function*(){s(l.validationResult)})))})}getJoinedTags(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getJoinedTags(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(sEe.TagTreeItem,a.resultObjects)):s(a.validationMessagesAsString)}))})}getDocumentContent(n,r=!0){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getDocumentContent(n,r).then(a=>{a.validationResult&&a.validationResult.success?o(a.resultObject.documentContent):s(a.validationMessagesAsString)}))})}getStockHistory(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getStockHistory(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&s.resultObject.hasOwnProperty("stockHistory")&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Uj,s.resultObject.stockHistory)):o(s.validationMessagesAsString)}))})}getStockInformation(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getStockInformation(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Fj,s.resultObjects)):o(s.validationMessagesAsString)}))})}getArtStockStatus(n,r,o,s){return B(this,null,function*(){return new Promise((a,l)=>this.articleConnector.getArtStockStatus(n,r,o,s).then(c=>{c.validationResult&&c.validationResult.success?c.resultObject&&a(c.resultObject):l(c.validationMessagesAsString)}))})}getArticleFlat(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getArticleFlat(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&r(s.resultObject):o(s.validationMessagesAsString)}))})}searchArticles(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.searchArticles(n,!1).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(eE,s.resultObjects)):o(s.validationMessagesAsString)}))})}getStockManagementWarehouses(){return B(this,null,function*(){return new Promise((n,r)=>this.articleConnector.getStockManagementWarehouses().then(o=>{o.validationResult&&o.validationResult.success?o.resultObjects&&n(this._boFactory.makeBOArrayFromRawBackendDataArray(eE,o.resultObjects)):r(o.validationMessagesAsString)}))})}getStockManagementLocations(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getStockManagementLocations(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Vj,s.resultObjects)):o(s.validationMessagesAsString)}))})}getArticleDetails(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getArticleDetails(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Il,s.resultObjects)):o(s.validationMessagesAsString)}))})}updateArticleDetails(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.updateArticleDetails(n).then(s=>B(this,null,function*(){s.validationResult&&s.validationResult.success?(yield this.commit(),r(!0)):o(s.validationMessagesAsString)})))})}lockArticleDetails(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.lockArticleDetails(n).then(s=>B(this,null,function*(){if(s.validationResult&&s.validationResult.success)return this.commit();o(s.validationMessagesAsString)})))})}getStockStatus(){return B(this,null,function*(){return new Promise((n,r)=>this.articleConnector.getStockState().then(o=>{o.validationResult&&o.validationResult.success?o.resultObjects&&n(this._boFactory.makeBOArrayFromRawBackendDataArray(Bj,o.resultObjects)):r(o.validationMessagesAsString)}))})}getArticleTransaction(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getArticleTransaction(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Gj,s.resultObjects)):o(s.validationMessagesAsString)}))})}getStockPrognose(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.articleConnector.getStockForecast(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(a.resultObjects):s(a.validationMessagesAsString)}))})}getRelationListObjects(n){return B(this,null,function*(){return new Promise((r,o)=>this.relationConnector.getRelationListObjects(n,!1).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(uje.RelationListObject,s.resultObjects)):o(s.validationMessagesAsString)}))})}getTaskCategories(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.getTaskCategories().then(o=>{o.validationResult&&o.validationResult.success?o.resultObjects&&n(this._boFactory.makeBOArrayFromRawBackendDataArray(hje.TaskCategory,o.resultObjects)):r(o.validationMessagesAsString)}))})}getActiveProcessesByTableAndKey(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getActiveProcessesByTableAndKey(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(fje.WorkflowProcess,a.resultObjects)):s(a.validationMessagesAsString)}))})}getDomainCollection(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getDomainCollection(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(_je.CoDomainValue,a.resultObjects)):s(a.validationMessagesAsString)}))})}getRoleEmailAddressesByWorkflowCategoryAndKey(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getRoleEmailAddressesByWorkflowCategoryAndKey(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObject&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(pje.RoleEmailaddress,a.resultObject)):s(a.validationMessagesAsString)}))})}getEmailSenderByWorkflowCategoryAndKey(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getEmailSenderByWorkflowCategoryAndKey(n,r).then(a=>{a.validationResult&&a.validationResult.success?o(a.resultObject):s(a.validationMessagesAsString)}))})}getReportTemplates(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.getReportTemplates(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(gje.Report,s.resultObjects)):o(s.validationMessagesAsString)}))})}emailReport(n){return B(this,null,function*(){let r=yield this.mainConnector.emailReport(n);return r&&r.validationResult&&r.validationResult.success?Promise.resolve(!0):Promise.resolve(!1)})}emailActivity(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.emailActivity(n).then(s=>{s.validationResult&&s.validationResult.success?r(!0):o(s.validationMessagesAsString)}))})}insertEmailHistoryForRemark(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertEmailHistoryForRemark(n).then(s=>{s.validationResult&&s.validationResult.success?r(!0):o(s.validationMessagesAsString)}))})}insertEmailHistoryForWork(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertEmailHistoryForWork(n).then(s=>{s.validationResult&&s.validationResult.success?r(s.resultObject):o(s.validationMessagesAsString)}))})}insertEmailHistoryForTask(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertEmailHistoryForTask(n).then(s=>{s.validationResult&&s.validationResult.success?r(s.resultObject):o(s.validationMessagesAsString)}))})}getWorkflowProcessInfoPerStatus(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.getWorkflowProcessInfoPerStatus(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Eje.WorkflowProcessInfoPerStatus,s.resultObject)):o(s.validationMessagesAsString)}))})}getHistoricActivities(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getHistoricActivities(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObject&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(VY.Activity,a.resultObject)):s(a.validationMessagesAsString)}))})}getComponentActivities(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getComponentActivities(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObject&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(VY.Activity,a.resultObject)):s(a.validationMessagesAsString)}))})}getFormById(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.getFormById(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&r(this._boFactory.makeWithRawBackendData(Rje.Form,s.resultObject)):o(s.validationMessagesAsString)}))})}getAllFormResponsesForTableAndKey(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getAllFormResponsesForTableAndKey(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(GY.FormResponse,a.resultObjects)):s(a.validationMessagesAsString)}))})}insertFormResponse(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertFormResponse(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&r(this._boFactory.makeWithRawBackendData(GY.FormResponse,s.resultObject)):o(s.validationMessagesAsString)}))})}updateFormResponse(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.updateFormResponse(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&r(this._boFactory.makeWithRawBackendData(GY.FormResponse,s.resultObject)):o(s.validationMessagesAsString)}))})}lockFormResponse(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.lockFormResponse(n).then(s=>{s.validationResult&&s.validationResult.success?r(!0):o(s.validationResult.messages[0].message)}))})}unlockFormResponse(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.unlockFormResponse(n).then(s=>{s.validationResult&&s.validationResult.success?r(!0):o(s.validationResult.messages[0].message)}))})}getStockStickerEmailLayouts(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.getStockStickerEmailLayouts().then(o=>{o.validationResult&&o.validationResult.success?n(o.resultObjects):r(o.validationResult.messages[0].message)}))})}getStockStickerPrintLayouts(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.getStockStickerPrintLayouts().then(o=>{o.validationResult&&o.validationResult.success?n(o.resultObject):r(o.validationResult.messages[0].message)}))})}printStockStickers(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.printStockStickers(n).then(s=>{s.validationResult&&s.validationResult.success?r(s.validationResult.success):o(s.validationResult.messages[0].message)}))})}getTransferStickerPrintLayouts(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.getTransferStickerPrintLayouts().then(o=>{o.validationResult&&o.validationResult.success?n(o.resultObject):r(o.validationResult.messages[0].message)}))})}printTransferStickers(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.printTransferStickers(n).then(s=>{s.validationResult&&s.validationResult.success?r(s.validationResult.success):o(s.validationResult.messages[0].message)}))})}commit(){return B(this,null,function*(){let n=yield this.articleConnector.commit();return n&&n.validationResult&&n.validationResult.success?Promise.resolve(!0):Promise.resolve(!1)})}};e.\u0275fac=function(r){return new(r||e)(Ut(_S))},e.\u0275prov=pt({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var bi=(()=>{let e=class e{constructor(n,r,o,s){this.locale=n,this.options=r,this.connector=o,this.dictionary=s}init(n){return B(this,null,function*(){yield this.options.initialize(n),yield this.connector.connect()})}connect(){return B(this,null,function*(){yield this.connector.connect()})}getSequenceValue(n){return this.connector.getSequenceValue(n)}getAllPrinters(){return B(this,null,function*(){return yield this.connector.getAllPrinters()})}getDefaultPrinter(n,r){return B(this,null,function*(){return yield this.connector.getDefaultPrinter(n,r)})}getSendMethods(){return B(this,null,function*(){return yield this.connector.getSendMethods()})}getScreenConfigTree(){return B(this,null,function*(){return yield this.connector.getScreenConfigTree()})}getScreenConfigSubRubric(n,r,o){return B(this,null,function*(){return yield this.connector.getScreenConfigSubRubric(n,r,o)})}getTagsFullTree(n,r=!0){return B(this,null,function*(){return yield this.connector.getTagsFullTree(n,r)})}getJoinedTags(n,r){return B(this,null,function*(){return yield this.connector.getJoinedTags(n,r)})}getDocumentContent(n,r=!0){return B(this,null,function*(){return yield this.connector.getDocumentContent(n,r)})}getComponentActivitiesWithoutRelationFiltering(n,r){return B(this,null,function*(){return yield this.connector.getComponentActivitiesWithoutRelationFiltering(n,r)})}getRelationSmallObject(n){return B(this,null,function*(){return yield this.connector.getRelationSmallObject(n)})}getWorkflowStatusForActivity(n,r,o){return B(this,null,function*(){return yield this.connector.getWorkflowStatusForActivity(n,r,o)})}insertActivity(n){return B(this,null,function*(){return yield this.connector.insertActivity(n)})}insertWork(n){return B(this,null,function*(){return yield this.connector.insertWork(n)})}insertRemark(n){return B(this,null,function*(){return yield this.connector.insertRemark(n)})}insertTask(n){return B(this,null,function*(){return yield this.connector.insertTask(n)})}updateActivity(n){return B(this,null,function*(){return yield this.connector.updateActivity(n)})}deleteActivity(n){return B(this,null,function*(){return yield this.connector.deleteActivity(n)})}lockTask(n){return B(this,null,function*(){return yield this.connector.lockTask(n)})}commit(){return B(this,null,function*(){return this.connector.commit()})}canFireTrigger(n,r){return!0}fireTrigger(n,r,o){return B(this,null,function*(){return yield this.connector.fireTrigger(n,r,o)})}fireGenericTrigger(n,r,o){return B(this,null,function*(){return yield this.connector.fireGenericTrigger(n,r,o)})}getRelationListObjects(n){return B(this,null,function*(){return yield this.connector.getRelationListObjects(n)})}getTaskCategories(){return B(this,null,function*(){return yield this.connector.getTaskCategories()})}getActiveProcessesByTableAndKey(n,r){return B(this,null,function*(){return yield this.connector.getActiveProcessesByTableAndKey(n,r)})}getDomainCollection(n,r){return B(this,null,function*(){return yield this.connector.getDomainCollection(n,r)})}getRoleEmailAddressesByWorkflowCategoryAndKey(n,r){return B(this,null,function*(){return yield this.connector.getRoleEmailAddressesByWorkflowCategoryAndKey(n,r)})}getEmailSenderByWorkflowCategoryAndKey(n,r){return B(this,null,function*(){return yield this.connector.getEmailSenderByWorkflowCategoryAndKey(n,r)})}getDefaultEmailReportTemplatesForBranch(n,r){return B(this,null,function*(){let o=new Oje.SelectReportTemplatesRequest;return o.branchNr=n,o.documentCode=r,o.sendMethod=Ije.SendMethodType.Email,yield this.connector.getReportTemplates(o)})}emailViaTemplate(u,h,f,_){return B(this,arguments,function*(n,r,o,s,a="",l="",c=[],d={}){let p=a.trim(),T=this._createEmailJob(n,r,o,s,p,l,c,d);return this.connector.emailReport(T)})}_createEmailJob(n,r,o,s,a,l,c,d={}){let u=new Nje.EmailJob;return u.emailTo=r,u.emailBcc=o,u.reply=s,u.subject=a,u.message=l,u.attachments=c,u.reportId=n.reportId,u.parameterValues=d,u.locale=this.locale,u}emailActivity(n){return B(this,null,function*(){return yield this.connector.emailActivity(n)})}insertEmailHistoryForRemark(n){return B(this,null,function*(){return yield this.connector.insertEmailHistoryForRemark(n)})}insertEmailHistoryForWork(n){return B(this,null,function*(){return yield this.connector.insertEmailHistoryForWork(n)})}insertEmailHistoryForTask(n){return B(this,null,function*(){return yield this.connector.insertEmailHistoryForTask(n)})}getWorkflowProcessInfoPerStatus(n){return B(this,null,function*(){return yield this.connector.getWorkflowProcessInfoPerStatus(n)})}getActivities(n,r){return B(this,null,function*(){let o=yield this.connector.getComponentActivitiesWithoutRelationFiltering(n,r),s=yield this.connector.getHistoricActivities(n,r),a=[],l=[];return o&&o.length>0&&o.forEach(c=>{a.push(c)}),s&&s.length>0&&s.forEach(c=>{l.push(c)}),a.concat(l)})}};e.\u0275fac=function(r){return new(r||e)(Ut(cl),Ut(_S),Ut(mc),Ut(kn))},e.\u0275prov=pt({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var HY=(()=>{let e=class e{set defaultPrinter(n){this.printerModel=n}showClass(){return!0}constructor(n,r){this.sendMethodService=n,this.iconService=r,this.icons=ot,this.printers=[],this.required=!1}handlePrinterClicked(n){n===void 0?this.sendMethodService.printerNotSet.next(!0):(this.printerModel=n,this.sendMethodService.reportingDocumentPrintSignDocBaseRequest.printerName=n.name,this.sendMethodService.reportingDocumentPrintSignDocBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest),this.sendMethodService.printerNotSet.next(!1))}};e.\u0275fac=function(r){return new(r||e)(Q(uh),Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["co-printer-selection"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-printer-selection",o.showClass)},inputs:{printers:"printers",defaultPrinter:"defaultPrinter",required:"required"},standalone:!1,decls:2,vars:7,consts:[[1,"printers-list",3,"modelChange","displayField","model","label","collection","required"]],template:function(r,o){r&1&&(O(0,"co-list-of-values",0),le(1,"sharedLocalize"),W("modelChange",function(a){return o.handlePrinterClicked(a)}),I()),r&2&&S("displayField","name")("model",o.printerModel)("label",ge(1,5,"PRINTER"))("collection",o.printers)("required",o.required)},dependencies:[ns,kt],encapsulation:2});let i=e;return i})();var APt=["additionalFileButton"];function TPt(i,e){if(i&1){let t=de();O(0,"co-additional-file-button",9,0),W("additionalFileChangeEvent",function(r){F(t);let o=R();return U(o.additionalFileChangeEvent.emit(r))}),I()}if(i&2){let t=R();S("additionalFileContents",t.additionalFileContents)("additionalFileName",t.additionalFileName)}}function SPt(i,e){if(i&1&&j(0,"co-signature-button",6),i&2){let t=R();S("request",t.sendMethodService.reportingDocumentPrintSignDocBaseRequest)}}function CPt(i,e){if(i&1&&(j(0,"span",12),le(1,"sharedLocalize"),j(2,"co-printer-selection",14)),i&2){let t=R(2);S("textContent",ge(1,4,"NETWORK_PRINTERS")),m(2),S("defaultPrinter",t.defaultPrinter)("required",!t.localPrint)("printers",t.printerList)}}function RPt(i,e){if(i&1){let t=de();O(0,"div",8),$(1,CPt,3,6),O(2,"div",10)(3,"div",11),j(4,"span",12),le(5,"sharedLocalize"),O(6,"co-input-number-picker",13),W("modelChange",function(r){F(t);let o=R();return U(o.handleCopiesAmountChange(r))}),I()(),O(7,"co-input-checkbox",7),W("modelChange",function(r){F(t);let o=R();return U(o.handleDefaultPrinterUserChange(r))}),I(),O(8,"co-input-checkbox",7),W("modelChange",function(r){F(t);let o=R();return U(o.handleDefaultPrinterAllUsersChange(r))}),I()()()}if(i&2){let t=R();m(),ee(t.localPrint?-1:1),m(3),S("textContent",ge(5,8,"AMOUNT")),m(2),S("model",t.copiesAmount)("min",1),m(),S("model",t.sendMethodService.reportingDocumentPrintSignDocBaseRequest.saveDefaultPrinterForUser)("label","Koppeling onthouden"),m(),S("model",t.sendMethodService.reportingDocumentPrintSignDocBaseRequest.saveDefaultPrinterForAllUsers)("label","Alle gebruikers")}}var Dje=(()=>{let e=class e{showClass(){return!0}constructor(n,r,o){this.sendMethodService=n,this.iconCacheService=r,this._sharedService=o,this.printerList=[],this.layouts=[],this.isPrinterLayoutsEnabled=!0,this.isAdditionalDocEnabled=!1,this.hideSignatureBtn=!1,this.additionalFileContents="",this.additionalFileName="",this.additionalFileChangeEvent=new re,this.useLocalPrint=new re,this.copiesAmountChange=new re,this.icons=ot,this.localPrint=!1,this.copiesAmount=1}ngOnInit(){this.defaultPrinter||this.updatePrinter(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest)}handleDefaultPrinterUserChange(n){this.sendMethodService.reportingDocumentPrintSignDocBaseRequest.saveDefaultPrinterForUser=n,this.sendMethodService.reportingDocumentPrintSignDocBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest)}handleLocalPrintChange(n){this.localPrint=n,this.useLocalPrint.emit(n)}handleDefaultPrinterAllUsersChange(n){this.sendMethodService.reportingDocumentPrintSignDocBaseRequest.saveDefaultPrinterForAllUsers=n,this.sendMethodService.reportingDocumentPrintSignDocBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest)}openAdditionalFileDialog(){this.additionalFileButtonRef?.openForSave()}isAdditionalFileActive(){return this.additionalFileButtonRef?.isActive??!1}updatePrinter(n){this._sharedService.getDefaultPrinter(n.reportId,this.layoutCode).then(r=>{let o=this.printerList.find(s=>s.name===r);if(o)this.defaultPrinter=o;else{let s=this.printerList.find(a=>a.isDefault);s?this.defaultPrinter=s:this.defaultPrinter=this.printerList[0]}this.defaultPrinter&&this.defaultPrinter.name!==this.sendMethodService.reportingDocumentPrintSignDocBaseRequest.printerName&&(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest.printerName=this.defaultPrinter.name,this.sendMethodService.reportingDocumentPrintSignDocBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest))})}handleCopiesAmountChange(n){this.copiesAmount=n,this.copiesAmountChange.emit(n)}};e.\u0275fac=function(r){return new(r||e)(Q(uh),Q(yt),Q(bi))},e.\u0275cmp=Fe({type:e,selectors:[["co-send-method-printer"]],viewQuery:function(r,o){if(r&1&&qt(APt,5),r&2){let s;xt(s=Ft())&&(o.additionalFileButtonRef=s.first)}},hostVars:2,hostBindings:function(r,o){r&2&&we("co-send-method-printer",o.showClass)},inputs:{printerList:"printerList",layouts:"layouts",isPrinterLayoutsEnabled:"isPrinterLayoutsEnabled",isAdditionalDocEnabled:"isAdditionalDocEnabled",hideSignatureBtn:"hideSignatureBtn",additionalFileContents:"additionalFileContents",additionalFileName:"additionalFileName",layoutCode:"layoutCode"},outputs:{additionalFileChangeEvent:"additionalFileChangeEvent",useLocalPrint:"useLocalPrint",copiesAmountChange:"copiesAmountChange"},standalone:!1,decls:10,vars:14,consts:[["additionalFileButton",""],[1,"send-methods-label",3,"textContent"],[1,"printer-layout-selections-wrapper"],[1,"printer-signature-wrapper"],[3,"requestChange","request","layouts","label","useDefault"],[3,"additionalFileContents","additionalFileName"],[3,"request"],[3,"modelChange","model","label"],[1,"layout-buttons-wrapper"],[3,"additionalFileChangeEvent","additionalFileContents","additionalFileName"],[1,"additional-checks"],[1,"copies-amount-wrapper"],[3,"textContent"],[3,"modelChange","model","min"],[3,"defaultPrinter","required","printers"]],template:function(r,o){r&1&&(j(0,"span",1),le(1,"sharedLocalize"),O(2,"div",2)(3,"div",3)(4,"co-layout-selection",4),vt("requestChange",function(a){return Rt(o.sendMethodService.reportingDocumentPrintSignDocBaseRequest,a)||(o.sendMethodService.reportingDocumentPrintSignDocBaseRequest=a),a}),W("requestChange",function(a){return o.updatePrinter(a)}),I(),$(5,TPt,2,2,"co-additional-file-button",5),$(6,SPt,1,1,"co-signature-button",6),I(),O(7,"co-input-checkbox",7),le(8,"sharedLocalize"),W("modelChange",function(a){return o.handleLocalPrintChange(a)}),I(),$(9,RPt,9,10,"div",8),I()),r&2&&(S("textContent",ge(1,10,"SETTINGS")),m(4),Nt("request",o.sendMethodService.reportingDocumentPrintSignDocBaseRequest),S("layouts",o.layouts)("label","PRINTER_LAYOUT")("useDefault",!1),m(),ee(o.isAdditionalDocEnabled?5:-1),m(),ee(o.hideSignatureBtn?-1:6),m(),S("model",o.localPrint)("label",ge(8,12,"LOCAL_PRINT")),m(2),ee(o.isPrinterLayoutsEnabled?9:-1))},dependencies:[oS,HY,gl,E7,tW,tS,kt],encapsulation:2});let i=e;return i})();var yje=(()=>{let e=class e{showClass(){return!0}constructor(n){this.sendMethodService=n,this.layouts=[],this.showFilePreview=new re,this.loadDefaultPrinterName=new re}};e.\u0275fac=function(r){return new(r||e)(Q(uh))},e.\u0275cmp=Fe({type:e,selectors:[["co-send-method-pdf"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-send-method-pdf",o.showClass)},inputs:{layouts:"layouts"},outputs:{showFilePreview:"showFilePreview",loadDefaultPrinterName:"loadDefaultPrinterName"},standalone:!1,decls:5,vars:6,consts:[[1,"send-methods-label",3,"textContent"],[1,"pdf-layout-selections-wrapper"],[1,"layout-signature-wrapper"],[3,"requestChange","request","layouts","useDefault"]],template:function(r,o){r&1&&(j(0,"span",0),le(1,"sharedLocalize"),O(2,"div",1)(3,"div",2)(4,"co-layout-selection",3),vt("requestChange",function(a){return Rt(o.sendMethodService.reportingDocumentPdfBaseRequest,a)||(o.sendMethodService.reportingDocumentPdfBaseRequest=a),a}),W("requestChange",function(){return o.showFilePreview.emit(o.sendMethodService.reportingDocumentPdfBaseRequest.reportId)}),I()()()),r&2&&(S("textContent",ge(1,4,"SETTINGS")),m(4),Nt("request",o.sendMethodService.reportingDocumentPdfBaseRequest),S("layouts",o.layouts)("useDefault",!1))},dependencies:[oS,kt],encapsulation:2});let i=e;return i})();var aEe=Be($k());var NPt=[[["","extra-content-pass",""]]],vPt=["[extra-content-pass]"];function DPt(i,e){if(i&1){let t=de();O(0,"co-input-checkbox",3),le(1,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R();return U(o.handleLocalPrintChange(r))}),I()}if(i&2){let t=R();S("model",t.localPrint)("label",ge(1,2,"LOCAL_PRINT"))}}function yPt(i,e){if(i&1&&(j(0,"span",12),le(1,"sharedLocalize"),j(2,"co-printer-selection",13)),i&2){let t=R();S("textContent",ge(1,3,"NETWORK_PRINTERS")),m(2),S("defaultPrinter",t.defaultPrinter)("printers",t.printerList)}}function bPt(i,e){if(i&1){let t=de();O(0,"div",9)(1,"co-input-checkbox",3),W("modelChange",function(r){F(t);let o=R();return U(o.handleDefaultPrinterUserChange(r))}),I(),O(2,"co-input-checkbox",3),W("modelChange",function(r){F(t);let o=R();return U(o.handleDefaultPrinterAllUsersChange(r))}),I()()}if(i&2){let t=R();m(),S("model",t.sendMethodService.reportingDocumentCombinedBaseRequest.saveDefaultPrinterForUser)("label","Koppeling onthouden"),m(),S("model",t.sendMethodService.reportingDocumentCombinedBaseRequest.saveDefaultPrinterForAllUsers)("label","Alle gebruikers")}}function LPt(i,e){if(i&1){let t=de();O(0,"div",11)(1,"co-list-of-values",14),le(2,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R();return Rt(o.overruledEmail,r)||(o.overruledEmail=r),U(r)}),W("modelChange",function(r){F(t);let o=R();return U(o.updateEmailOverrule(r))}),I(),O(3,"co-list-of-values",14),le(4,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R();return Rt(o.overruledEdi,r)||(o.overruledEdi=r),U(r)}),W("modelChange",function(r){F(t);let o=R();return U(o.updateEdiOverrule(r))}),I(),O(5,"co-list-of-values",14),le(6,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R();return Rt(o.overruledPrint,r)||(o.overruledPrint=r),U(r)}),W("modelChange",function(r){F(t);let o=R();return U(o.updatePrintOverrule(r))}),I()()}if(i&2){let t=R();m(),S("displayField","description"),Nt("model",t.overruledEmail),S("label",ge(2,12,"OVERRULE_VIA_EMAIL"))("collection",t.overruleOptions),m(2),S("displayField","description"),Nt("model",t.overruledEdi),S("label",ge(4,14,"OVERRULE_VIA_EDI"))("collection",t.overruleOptions),m(2),S("displayField","description"),Nt("model",t.overruledPrint),S("label",ge(6,16,"OVERRULE_VIA_PRINT"))("collection",t.overruleOptions)}}var bje=(()=>{let e=class e{showClass(){return!0}constructor(n,r){this.sendMethodService=n,this._sharedService=r,this.emailLayouts=[],this.printLayouts=[],this.printerList=[],this.pdfDoc="",this.emailUnsignedPossible=!1,this.showFilePreview=new re,this.useLocalPrint=new re,this.localPrint=!1,this.reportForPrinting=new aEe.ReportingDocumentBaseRequest,this.reportForEmailing=new aEe.ReportingDocumentBaseRequest,this.overruleOptions=[{code:1,description:"Print"},{code:2,description:"E-mail"},{code:3,description:"EDI"},{code:8,description:"PDF"}]}ngOnInit(){this.defaultPrinter||this.setDefaultPrinterFromRequest(this.sendMethodService.reportingDocumentCombinedBaseRequest)}setDefaultPrinterFromRequest(n){n&&n.reportIdForPrinting?this._updatePrinterBasedOnReportId(n.reportIdForPrinting):(this.defaultPrinter=this.printerList[0],this._updatePrinterOnRequest()),this._updateRequest()}handleLocalPrintChange(n){this.localPrint=n,this.useLocalPrint.emit(n)}handleDefaultPrinterUserChange(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.saveDefaultPrinterForUser=n,this._updateRequest()}handleDefaultPrinterAllUsersChange(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.saveDefaultPrinterForAllUsers=n,this._updateRequest()}updateReportForPrinting(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.reportIdForPrinting=n.reportId,this._updatePrinterBasedOnReportId(n.reportId),this._updateRequest()}updateReportForEmailing(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.reportIdForEmail=n.reportId,this._updateRequest()}updateUseRelationSpecificReports(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports=n,this._updateRequest()}updateUseRelationSpecificSendMethods(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificSendMethods=n,this._updateRequest()}updateEmailOverrule(n){this.overruledEmail=n,this.sendMethodService.reportingDocumentCombinedBaseRequest.overruleSendMethodForEmail=n.code,this._updateRequest()}updateEdiOverrule(n){this.overruledEdi=n,this.sendMethodService.reportingDocumentCombinedBaseRequest.overruleSendMethodForEDI=n.code,this._updateRequest()}updatePrintOverrule(n){this.overruledPrint=n,this.sendMethodService.reportingDocumentCombinedBaseRequest.overruleSendMethodForPrinting=n.code,this._updateRequest()}_updateRequest(){this.sendMethodService.reportingDocumentCombinedBaseRequestChanged.next(this.sendMethodService.reportingDocumentCombinedBaseRequest)}_updatePrinterBasedOnReportId(n){this._sharedService.getDefaultPrinter(n,this.layoutCode).then(r=>{let o=this.printerList.find(s=>s.name===r);if(o)this.defaultPrinter=o,this._updatePrinterOnRequest();else{let s=this.printerList.find(a=>a.isDefault);s?(this.defaultPrinter=s,this._updatePrinterOnRequest()):(this.defaultPrinter=this.printerList[0],this._updatePrinterOnRequest())}})}_updatePrinterOnRequest(){this.defaultPrinter&&this.defaultPrinter.name&&(this.sendMethodService.reportingDocumentCombinedBaseRequest.printerName=this.defaultPrinter.name,this._updateRequest())}};e.\u0275fac=function(r){return new(r||e)(Q(uh),Q(bi))},e.\u0275cmp=Fe({type:e,selectors:[["co-send-method-combine-print-email"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-send-method-purchase",o.showClass)},inputs:{emailLayouts:"emailLayouts",printLayouts:"printLayouts",printerList:"printerList",pdfDoc:"pdfDoc",emailUnsignedPossible:"emailUnsignedPossible",showAdditionalChecks:"showAdditionalChecks",showLocalPrint:"showLocalPrint",layoutCode:"layoutCode"},outputs:{showFilePreview:"showFilePreview",useLocalPrint:"useLocalPrint"},standalone:!1,ngContentSelectors:vPt,decls:23,vars:29,consts:[[1,"send-methods-label",3,"textContent"],[1,"save-dialog-contents"],[1,"use-default-wrapper"],[3,"modelChange","model","label"],[1,"info",3,"textContent"],[1,"override-selections-wrapper"],[1,"layout-selections"],[3,"requestChange","request","layouts","label","useDefault"],[3,"model","label"],[1,"additional-checks"],[1,"override-methods-wrapper"],[1,"shipping-methods"],[3,"textContent"],[3,"defaultPrinter","printers"],[3,"modelChange","displayField","model","label","collection"]],template:function(r,o){r&1&&(Mc(NPt),j(0,"span",0),le(1,"sharedLocalize"),O(2,"div",1)(3,"div",2)(4,"co-input-checkbox",3),le(5,"sharedLocalize"),vt("modelChange",function(a){return Rt(o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports,a)||(o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports=a),a}),W("modelChange",function(a){return o.updateUseRelationSpecificReports(a)}),I(),j(6,"div",4),le(7,"sharedLocalize"),I(),O(8,"div",5)(9,"div",6)(10,"co-layout-selection",7),vt("requestChange",function(a){return Rt(o.reportForPrinting,a)||(o.reportForPrinting=a),a}),W("requestChange",function(a){return o.updateReportForPrinting(a)}),I(),O(11,"co-layout-selection",7),vt("requestChange",function(a){return Rt(o.reportForEmailing,a)||(o.reportForEmailing=a),a}),W("requestChange",function(a){return o.updateReportForEmailing(a)}),I()(),$(12,DPt,2,4,"co-input-checkbox",8),$(13,yPt,3,5),$(14,bPt,3,4,"div",9),I()(),O(15,"div",10),j(16,"span",0),le(17,"sharedLocalize"),O(18,"div",2)(19,"co-input-checkbox",3),le(20,"sharedLocalize"),vt("modelChange",function(a){return Rt(o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificSendMethods,a)||(o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificSendMethods=a),a}),W("modelChange",function(a){return o.updateUseRelationSpecificSendMethods(a)}),I()(),$(21,LPt,7,18,"div",11),Jl(22),I()),r&2&&(S("textContent",ge(1,19,"SETTINGS")),m(4),Nt("model",o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports),S("label",ge(5,21,"RELATION_LAYOUTS")),m(2),S("textContent",ge(7,23,"RELATION_LAYOUTS_MESSAGE")),m(4),Nt("request",o.reportForPrinting),S("layouts",o.printLayouts)("label","PRINTER_LAYOUT")("useDefault",o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports),m(),Nt("request",o.reportForEmailing),S("layouts",o.emailLayouts)("label","EMAIL_LAYOUT")("useDefault",o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports),m(),ee(o.showLocalPrint?12:-1),m(),ee(o.localPrint?-1:13),m(),ee(o.showAdditionalChecks?14:-1),m(2),S("textContent",ge(17,25,"SHIPPING_METHOD_SETTINGS")),m(3),Nt("model",o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificSendMethods),S("label",ge(20,27,"SHIPPING_METHOD_STANDARD_SETTINGS")),m(2),ee(o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificSendMethods?-1:21))},dependencies:[oS,HY,gl,ns,kt],encapsulation:2});let i=e;return i})();function PPt(i,e){if(i&1){let t=de();O(0,"div",5)(1,"co-button",6),W("click",function(){F(t);let r=R();return U(r.closePDFDialog.emit())}),I(),O(2,"co-button",7),W("click",function(){F(t);let r=R();return U(r.closePDFDialog.emit())}),I()()}if(i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.CheckDuotone)),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CrossSkinny))}}var Lje=(()=>{let e=class e{showClass(){return!0}set pdfDoc(n){this._pdfDoc=n,this._generatePdf()}get pdfDoc(){return this._pdfDoc}constructor(n,r){this.iconCacheService=n,this.sanitizer=r,this.closePDFDialog=new re,this.icons=ot,this._pdfDoc=""}ngOnInit(){this._generatePdf()}_generatePdf(){if(this.pdfDoc){let n=atob(this.pdfDoc),r=new Uint8Array(n.length);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s);let o=new Blob([r],{type:"application/pdf"});this.pdfUrl=URL.createObjectURL(o)}}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(JE))},e.\u0275cmp=Fe({type:e,selectors:[["co-preview-pdf-dialog"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-preview-pdf-dialog",o.showClass)},inputs:{pdfDoc:"pdfDoc"},outputs:{closePDFDialog:"closePDFDialog"},standalone:!1,decls:6,vars:2,consts:[["pdfBody",""],["footerTemplate",""],["id","preview-pdf-dialog",3,"closeClick","footerTemplate"],["id","pdfBody"],["width","100%","height","700px",3,"src"],[1,"co-dialog-footer-button-wrapper"],[1,"save-button",3,"click","iconData"],[1,"close-button",3,"click","iconData"]],template:function(r,o){if(r&1){let s=de();O(0,"co-dialog",2),W("closeClick",function(){return F(s),U(o.closePDFDialog.emit())}),O(1,"div",3,0),j(3,"iframe",4),I(),Yt(4,PPt,3,2,"ng-template",null,1,zi),I()}if(r&2){let s=ln(5);S("footerTemplate",s),m(3),S("src",o.sanitizer.bypassSecurityTrustResourceUrl(o.pdfUrl),kJ)}},dependencies:[qo,Ki],encapsulation:2});let i=e;return i})();var kPt=["navigationItems"],xPt=["faxItems"],FPt=["printItems"],UPt=["emailItems"],BPt=["ediItems"],VPt=["emailTemplateItems"],GPt=["smsItems"],HPt=["webServiceItems"],WPt=["pdfItems"],jPt=["combinePrintAndEmail"],zPt=["printerComponent"],YPt=["emailComponent"],KPt=[[["","extra-content",""]]],qPt=["[extra-content]"];function XPt(i,e){if(i&1){let t=de();O(0,"div",25),W("click",function(){let r=F(t).$implicit,o=R(3);return U(o.handleSendMethodClick(r))}),j(1,"div",26),I()}if(i&2){let t=e.$implicit,n=e.$index,r=R(3);we("selected",r.activeSendMethod?t.code===r.activeSendMethod.code:n===0),m(),S("textContent",t.description)}}function ZPt(i,e){if(i&1&&(O(0,"div",23),Pt(1,XPt,2,3,"div",24,zt),I()),i&2){let t=R(2);m(),Mt(t.sendMethods)}}function QPt(i,e){if(i&1&&(O(0,"div",20),j(1,"co-icon",21)(2,"div",22),I(),$(3,ZPt,3,0,"div",23)),i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.ShareSolid)),m(),S("textContent",t.headerTitle),m(),ee(t.sendMethods.length>1?3:-1)}}function JPt(i,e){if(i&1){let t=de();O(0,"div",18,4)(2,"co-send-method-printer",27,5),W("additionalFileChangeEvent",function(r){F(t);let o=R();return U(o.handleAdditionalFileSaved(r))})("useLocalPrint",function(r){F(t);let o=R();return U(o.handleUseLocalPrint(r))})("copiesAmountChange",function(r){F(t);let o=R();return U(o.handleCopiesAmountChange(r))}),I()()}if(i&2){let t=R();m(2),S("isPrinterLayoutsEnabled",t.isPrinterLayoutsEnabled)("printerList",t.printerList)("layouts",t.printLayouts)("isAdditionalDocEnabled",t.isAdditionalDocEnabled)("additionalFileContents",t.additionalFileContents)("additionalFileName",t.additionalFileName)("layoutCode",t.layoutCode)("hideSignatureBtn",t.hideSignatureBtn)}}function $Pt(i,e){if(i&1){let t=de();O(0,"div",18,6)(2,"co-send-method-email",28,7),W("loadDefaultPrinterName",function(r){F(t);let o=R();return U(o.loadDefaultPrinterName.emit(r))})("additionalFileChangeEvent",function(r){F(t);let o=R();return U(o.handleAdditionalFileSaved(r))}),I()()}if(i&2){let t=R();m(2),S("emailAddresses",t.emailAddresses)("layouts",t.emailLayouts)("emailUnsignedPossible",t.emailUnsignedPossible)("isAdditionalDocEnabled",t.isAdditionalDocEnabled)("additionalFileContents",t.additionalFileContents)("additionalFileName",t.additionalFileName)}}function eMt(i,e){i&1&&j(0,"div",18,8)}function tMt(i,e){i&1&&j(0,"div",18,9)}function iMt(i,e){i&1&&j(0,"div",18,10)}function nMt(i,e){i&1&&j(0,"div",18,11)}function rMt(i,e){if(i&1&&(O(0,"div",18,12),j(2,"co-send-method-pdf",29),I()),i&2){let t=R();m(2),S("layouts",t.printLayouts)}}function oMt(i,e){if(i&1){let t=de();O(0,"div",18,13)(2,"co-send-method-combine-print-email",30),W("useLocalPrint",function(r){F(t);let o=R();return U(o.handleUseLocalPrint(r))}),O(3,"div",31),Jl(4),I()()()}if(i&2){let t=R();m(2),S("emailLayouts",t.emailLayouts)("printLayouts",t.printLayouts)("printerList",t.printerList)("showAdditionalChecks",t.showAdditionalChecks)("showLocalPrint",t.showLocalPrint)}}function sMt(i,e){if(i&1){let t=de();O(0,"co-preview-pdf-dialog",34),W("closePDFDialog",function(){F(t);let r=R(2);return U(r.closePdfPreview())}),I()}if(i&2){let t=R(2);S("pdfDoc",t.pdfDoc)}}function aMt(i,e){if(i&1){let t=de();O(0,"div",19)(1,"div",32),W("click",function(){F(t);let r=R();return U(r.createPdfPreview())}),j(2,"co-icon",21),I(),$(3,sMt,1,1,"co-preview-pdf-dialog",33),I()}if(i&2){let t=R();m(),we("disabled",t.disablePdfPreview),m(),S("iconData",t.iconCacheService.getIcon(t.icons.FileMagnifyingGlass)),m(),ee(t.pdfDoc?3:-1)}}function lMt(i,e){if(i&1){let t=de();O(0,"div",35)(1,"co-button",36),W("click",function(){F(t);let r=R();return U(r.handleOkClick())}),I(),O(2,"co-button",37),W("click",function(){F(t);let r=R();return U(r.handleCancelClick())}),I()()}if(i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.CheckDuotone))("disabled",t.disableOkButton),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CrossSkinny))}}var cMt=[new g_(Lr.SendMethodType.Fax,"Fax",ot.PrintRegular),new g_(Lr.SendMethodType.Print,"Print",ot.PrintSolid),new g_(Lr.SendMethodType.Email,"Email",ot.AtSolid),new g_(Lr.SendMethodType.Edi,"Edi",ot.FileExportSolid),new g_(Lr.SendMethodType.EmailTemplate,"Email template",ot.EnvelopeRegular),new g_(Lr.SendMethodType.Sms,"Sms",ot.MessageSmsSolid),new g_(Lr.SendMethodType.WebService,"Webservice",ot.PrintRegular),new g_(Lr.SendMethodType.Pdf,"Pdf",ot.Pdf),new g_(Lr.SendMethodType.CombinePrintAndEmail,"Combine",ot.Account)],nE=(()=>{let e=class e{showClass(){return!0}constructor(n,r){this.iconCacheService=n,this._sendMethodService=r,this.icons=ot,this.printerList=[],this.emailLayouts=[],this.printLayouts=[],this.emailAddresses=[],this.visibleMethods=[],this.isDocSignEnabled=!1,this.docSign=!1,this.hideSignatureBtn=!1,this.isPrinterLayoutsEnabled=!0,this.isAdditionalDocEnabled=!1,this.additionalFileName="",this.additionalFileContents="",this.pdfDoc="",this.disablePdfPreview=!1,this.emailUnsignedPossible=!1,this.showPDFPreview=!1,this.showAdditionalChecks=!0,this.showLocalPrint=!0,this.layoutCode=wje.LayoutCode.OrderConfirmation,this.reportingDocumentPrintRequestChange=new re,this.reportingDocumentEmailRequestChange=new re,this.reportingDocumentPdfRequestChange=new re,this.reportingDocumentCombinedRequestChange=new re,this.startSignatureClicked=new re,this.closeClick=new re,this.okClick=new re,this.additionalFileChangeEvent=new re,this.showFilePreview=new re,this.loadDefaultPrinterName=new re,this.sendMethods=cMt,this.startUp=!0,this.showFax=!0,this.showPrint=!0,this.showEmail=!0,this.showEdi=!0,this.showSms=!0,this.showEmailTemplate=!0,this.showWebservice=!0,this.showPdf=!0,this.showCombinePrintAndEmail=!0,this.additionalFileHasBeenSaved=!1,this.disableOkButton=!1,this._subscriptions=[],this._localPrint=!1,this._subscriptions.push(this._sendMethodService.reportingDocumentPrintSignDocBaseRequestChanged.subscribe(o=>this.reportingDocumentPrintRequestChange.emit(o)),this._sendMethodService.reportingDocumentEmailSignDocBaseRequestChanged.subscribe(o=>this.reportingDocumentEmailRequestChange.emit(o)),this._sendMethodService.reportingDocumentPdfBaseRequestChanged.subscribe(o=>this.reportingDocumentPdfRequestChange.emit(o)),this._sendMethodService.reportingDocumentCombinedBaseRequestChanged.subscribe(o=>this.reportingDocumentCombinedRequestChange.emit(o)),this._sendMethodService.printerNotSet.subscribe(o=>this.disableOkButton=o))}ngOnInit(){this.reportingDocumentEmailRequest&&(this._sendMethodService.reportingDocumentEmailSignDocBaseRequest=this.reportingDocumentEmailRequest),this.reportingDocumentPrintRequest&&(this._sendMethodService.reportingDocumentPrintSignDocBaseRequest=this.reportingDocumentPrintRequest),this.reportingDocumentPdfRequest&&(this._sendMethodService.reportingDocumentPdfBaseRequest=this.reportingDocumentPdfRequest),this.reportingDocumentCombinedRequest&&(this._sendMethodService.reportingDocumentCombinedBaseRequest=this.reportingDocumentCombinedRequest),this._initDefaultSendMethod(),this._prepareVisibleMethods()}ngOnDestroy(){this._subscriptions.forEach(n=>n.unsubscribe())}handleSignatureStart(){this.docSign=!this.docSign,this.startSignatureClicked.emit()}handleAdditionalFileSaved(n){this.additionalFileHasBeenSaved=!0,this.additionalFileChangeEvent.emit(n),this._continueHandleOkClick()}handleUseLocalPrint(n){this._localPrint=n,n&&(this.disableOkButton=!1)}handleOkClick(){if(this.isAdditionalDocEnabled&&!this.additionalFileHasBeenSaved){if(this.activeSendMethod?.code===Lr.SendMethodType.Print&&this.printerComponentRef?.isAdditionalFileActive()){this.printerComponentRef.openAdditionalFileDialog();return}if(this.activeSendMethod?.code===Lr.SendMethodType.Email&&this.emailComponentRef?.isAdditionalFileActive()){this.emailComponentRef.openAdditionalFileDialog();return}}this._continueHandleOkClick()}handleCancelClick(){this.reportingDocumentEmailRequest&&(this.reportingDocumentEmailRequest.toAddresses=null),this.closeClick.emit()}_continueHandleOkClick(){if(this.activeSendMethod.code===Lr.SendMethodType.Print||this.activeSendMethod.code===Lr.SendMethodType.CombinePrintAndEmail){let r={sendMethode:this.activeSendMethod?this.activeSendMethod.code:Lr.SendMethodType.Fax,localPrint:this._localPrint};this.okClick.emit(r)}else this.okClick.emit(this.activeSendMethod?this.activeSendMethod.code:"0")}handleSendMethodClick(n){this.activeSendMethod=n,n.code===Lr.SendMethodType.Fax&&this.showFax?this.navigationItems.nativeElement.scrollLeft=this.faxItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.Print&&this.showPrint?this.navigationItems.nativeElement.scrollLeft=this.printItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.Email&&this.showEmail?this.navigationItems.nativeElement.scrollLeft=this.emailItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.Edi&&this.showEdi?this.navigationItems.nativeElement.scrollLeft=this.ediItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.EmailTemplate&&this.showEmailTemplate?this.navigationItems.nativeElement.scrollLeft=this.emailTemplateItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.Sms&&this.showSms?this.navigationItems.nativeElement.scrollLeft=this.smsItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.WebService&&this.showWebservice?this.navigationItems.nativeElement.scrollLeft=this.webServiceItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.Pdf&&this.showPdf?this.navigationItems.nativeElement.scrollLeft=this.pdfItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.CombinePrintAndEmail&&this.showCombinePrintAndEmail&&(this.navigationItems.nativeElement.scrollLeft=this.combinePrintAndEmail.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft)}createPdfPreview(){this.activeSendMethod.code===Lr.SendMethodType.Print||this.activeSendMethod.code===Lr.SendMethodType.Pdf?this.showFilePreview.emit(this._sendMethodService.reportingDocumentPrintSignDocBaseRequest.reportId):this.activeSendMethod.code===Lr.SendMethodType.Email||this.activeSendMethod.code===Lr.SendMethodType.EmailTemplate?this.showFilePreview.emit(this._sendMethodService.reportingDocumentEmailSignDocBaseRequest.reportId):this.activeSendMethod.code===Lr.SendMethodType.CombinePrintAndEmail&&this.showFilePreview.emit(this._sendMethodService.reportingDocumentCombinedBaseRequest.reportId)}closePdfPreview(){this.pdfDoc=""}handleCopiesAmountChange(n){this.reportingDocumentPrintRequest.copies=n,this.reportingDocumentPrintRequestChange.emit(this.reportingDocumentPrintRequest)}_initDefaultSendMethod(){this.defaultSendMethod?this._selectDefaultSendMethod():this.visibleMethods&&this.visibleMethods.length>=1&&(this.defaultSendMethod=this.visibleMethods[0],this._selectDefaultSendMethod()),this.startUp=!1}_selectDefaultSendMethod(){let n=this.sendMethods.find(r=>r.code===this.defaultSendMethod);n&&setTimeout(()=>{this.handleSendMethodClick(n),this.startUp=!1})}_prepareVisibleMethods(){this.visibleMethods&&this.visibleMethods.length>0&&(this.sendMethods=this.sendMethods.filter(n=>this.visibleMethods.find(r=>r===n.code))),this.showFax=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Fax)!==void 0,this.showPrint=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Print)!==void 0,this.showEmail=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Email)!==void 0,this.showEdi=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Edi)!==void 0,this.showEmailTemplate=this.sendMethods.find(n=>n.code===Lr.SendMethodType.EmailTemplate)!==void 0,this.showSms=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Sms)!==void 0,this.showWebservice=this.sendMethods.find(n=>n.code===Lr.SendMethodType.WebService)!==void 0,this.showPdf=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Pdf)!==void 0,this.showCombinePrintAndEmail=this.sendMethods.find(n=>n.code===Lr.SendMethodType.CombinePrintAndEmail)!==void 0}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(uh))},e.\u0275cmp=Fe({type:e,selectors:[["co-send-method-dialog"]],viewQuery:function(r,o){if(r&1&&(qt(kPt,5,ti),qt(xPt,5,ti),qt(FPt,5,ti),qt(UPt,5,ti),qt(BPt,5,ti),qt(VPt,5,ti),qt(GPt,5,ti),qt(HPt,5,ti),qt(WPt,5,ti),qt(jPt,5,ti),qt(zPt,5),qt(YPt,5)),r&2){let s;xt(s=Ft())&&(o.navigationItems=s.first),xt(s=Ft())&&(o.faxItems=s.first),xt(s=Ft())&&(o.printItems=s.first),xt(s=Ft())&&(o.emailItems=s.first),xt(s=Ft())&&(o.ediItems=s.first),xt(s=Ft())&&(o.emailTemplateItems=s.first),xt(s=Ft())&&(o.smsItems=s.first),xt(s=Ft())&&(o.webServiceItems=s.first),xt(s=Ft())&&(o.pdfItems=s.first),xt(s=Ft())&&(o.combinePrintAndEmail=s.first),xt(s=Ft())&&(o.printerComponentRef=s.first),xt(s=Ft())&&(o.emailComponentRef=s.first)}},hostVars:2,hostBindings:function(r,o){r&2&&we("co-send-method-dialog",o.showClass)},inputs:{printerList:"printerList",reportingDocumentPrintRequest:"reportingDocumentPrintRequest",reportingDocumentEmailRequest:"reportingDocumentEmailRequest",reportingDocumentPdfRequest:"reportingDocumentPdfRequest",reportingDocumentCombinedRequest:"reportingDocumentCombinedRequest",emailLayouts:"emailLayouts",printLayouts:"printLayouts",headerTitle:"headerTitle",emailAddresses:"emailAddresses",defaultSendMethod:"defaultSendMethod",visibleMethods:"visibleMethods",isDocSignEnabled:"isDocSignEnabled",docSign:"docSign",hideSignatureBtn:"hideSignatureBtn",isPrinterLayoutsEnabled:"isPrinterLayoutsEnabled",isAdditionalDocEnabled:"isAdditionalDocEnabled",additionalFileName:"additionalFileName",additionalFileContents:"additionalFileContents",pdfDoc:"pdfDoc",disablePdfPreview:"disablePdfPreview",emailUnsignedPossible:"emailUnsignedPossible",showPDFPreview:"showPDFPreview",showAdditionalChecks:"showAdditionalChecks",showLocalPrint:"showLocalPrint",layoutCode:"layoutCode"},outputs:{reportingDocumentPrintRequestChange:"reportingDocumentPrintRequestChange",reportingDocumentEmailRequestChange:"reportingDocumentEmailRequestChange",reportingDocumentPdfRequestChange:"reportingDocumentPdfRequestChange",reportingDocumentCombinedRequestChange:"reportingDocumentCombinedRequestChange",startSignatureClicked:"startSignatureClicked",closeClick:"closeClick",okClick:"okClick",additionalFileChangeEvent:"additionalFileChangeEvent",showFilePreview:"showFilePreview",loadDefaultPrinterName:"loadDefaultPrinterName"},standalone:!1,features:[Oi([uh])],ngContentSelectors:qPt,decls:20,vars:13,consts:[["headerTemplate",""],["navigationItems",""],["faxItems",""],["footerTemplate",""],["printItems",""],["printerComponent",""],["emailItems",""],["emailComponent",""],["ediItems",""],["emailTemplateItems",""],["smsItems",""],["webServiceItems",""],["pdfItems",""],["combinePrintAndEmail",""],["id","sendOptionsDialog",3,"closeClick","headerTemplate","footerTemplate"],[1,"dialog-content-wrapper"],[1,"send-methods-wrapper"],[1,"send-method-navigation-wrapper"],[1,"send-method-navigation-content","co-small-scrollbar"],[1,"pdf-preview-wrapper"],[1,"co-dialog-header-title-wrapper"],[3,"iconData"],[1,"co-dialog-header-title",3,"textContent"],[1,"dialog-navigation-wrapper"],[1,"send-button-wrapper",3,"selected"],[1,"send-button-wrapper",3,"click"],[1,"custom-button-title",3,"textContent"],[3,"additionalFileChangeEvent","useLocalPrint","copiesAmountChange","isPrinterLayoutsEnabled","printerList","layouts","isAdditionalDocEnabled","additionalFileContents","additionalFileName","layoutCode","hideSignatureBtn"],[3,"loadDefaultPrinterName","additionalFileChangeEvent","emailAddresses","layouts","emailUnsignedPossible","isAdditionalDocEnabled","additionalFileContents","additionalFileName"],[3,"layouts"],[3,"useLocalPrint","emailLayouts","printLayouts","printerList","showAdditionalChecks","showLocalPrint"],["extra-content-pass",""],[1,"pdf-preview-button",3,"click"],[3,"pdfDoc"],[3,"closePDFDialog","pdfDoc"],[1,"co-dialog-footer-button-wrapper"],[1,"save-button",3,"click","iconData","disabled"],[1,"close-button",3,"click","iconData"]],template:function(r,o){if(r&1){let s=de();Mc(KPt),O(0,"co-dialog",14),W("closeClick",function(){return F(s),U(o.handleCancelClick())}),Yt(1,QPt,4,3,"ng-template",null,0,zi),O(3,"div",15),j(4,"div",16),O(5,"div",17,1),j(7,"div",18,2),$(9,JPt,4,8,"div",18),$(10,$Pt,4,6,"div",18),$(11,eMt,2,0,"div",18),$(12,tMt,2,0,"div",18),$(13,iMt,2,0,"div",18),$(14,nMt,2,0,"div",18),$(15,rMt,3,1,"div",18),$(16,oMt,5,5,"div",18),I(),$(17,aMt,4,4,"div",19),I(),Yt(18,lMt,3,3,"ng-template",null,3,zi),I()}if(r&2){let s=ln(2),a=ln(19);S("headerTemplate",s)("footerTemplate",a),m(5),we("smooth-scrolling",!o.startUp),m(4),ee(o.showPrint?9:-1),m(),ee(o.showEmail?10:-1),m(),ee(o.showEdi?11:-1),m(),ee(o.showEmailTemplate?12:-1),m(),ee(o.showSms?13:-1),m(),ee(o.showWebservice?14:-1),m(),ee(o.showPdf?15:-1),m(),ee(o.showCombinePrintAndEmail?16:-1),m(),ee(o.showPDFPreview?17:-1)}},dependencies:[qo,ri,d4e,Dje,Ki,yje,bje,Lje],encapsulation:2,data:{animation:[ao("slideInOut",[xn("*",on({transform:"translateX(0%)",width:"100%",opacity:"1"})),xn("void",on({transform:"translateX(150%)",opacity:"0"})),qr("void => *",Gr(250))])]}});let i=e;return i})();var wr=(()=>{let e=class e{constructor(n){this._sharedService=n,this.refreshStockInformation=new re}getStockHistory(n){return B(this,null,function*(){return yield this._sharedService.getStockHistory(n)})}getStockInformation(n){return B(this,null,function*(){return yield this._sharedService.getStockInformation(n)})}getArticleDetails(n){return B(this,null,function*(){return yield this._sharedService.getArticleDetails(n)})}updateArticleDetails(n){return B(this,null,function*(){return yield this._sharedService.updateArticleDetails(n)})}getStockState(){return B(this,null,function*(){return yield this._sharedService.getStockStatus()})}getArtStockStatus(n,r,o,s){return B(this,null,function*(){return yield this._sharedService.getArtStockStatus(n,r,o,s)})}getStockManagementWarehouses(){return B(this,null,function*(){return yield this._sharedService.getStockManagementWarehouses()})}getStockManagementLocations(n){return B(this,null,function*(){return yield this._sharedService.getStockManagementLocations(n)})}getArticleTransaction(n){return B(this,null,function*(){return yield this._sharedService.getArticleTransaction(n)})}stockPrognose(n,r){return B(this,null,function*(){return yield this._sharedService.getStockPrognose(n,r)})}lockArticleDetails(n){return B(this,null,function*(){return yield this._sharedService.lockArticleDetails(n)})}getArticleFlat(n){return B(this,null,function*(){return yield this._sharedService.getArticleFlat(n)})}searchArticles(n){return B(this,null,function*(){return yield this._sharedService.searchArticles(n)})}};e.\u0275fac=function(r){return new(r||e)(Ut(mc))},e.\u0275prov=pt({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var ui=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({});let i=e;return i})();var lC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,ii,co,ui]});let i=e;return i})();var yb=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,ii,Qa]});let i=e;return i})();var WY=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ii,Fo,ut,Qi,ui,J3e]});let i=e;return i})();var jY=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,ii,WY]});let i=e;return i})();var Pje=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,Qa,lC,ii,yb,ui,jY]});let i=e;return i})();var zY=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,ii,co,ui]});let i=e;return i})();var Mje=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,ii,lC,zY,Qa,yb,WY,jY,co,ui,KH]});let i=e;return i})();var kje=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,lC,yb,ui]});let i=e;return i})();var xje=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ii,Fo,ut,Qi,ui]});let i=e;return i})();var Fje=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,lC,zY,ui,Qa,co]});let i=e;return i})();var cC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({providers:[wr],imports:[ut,Fo,ii,Pje,Mje,Qi,kje,Fje,ui,xje]});let i=e;return i})();function tF(i){return i+.5|0}var dC=(i,e,t)=>Math.max(Math.min(i,t),e);function $x(i){return dC(tF(i*2.55),0,255)}function uC(i){return dC(tF(i*255),0,255)}function hA(i){return dC(tF(i/2.55)/100,0,1)}function Uje(i){return dC(tF(i*100),0,100)}var Y_={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},cEe=[..."0123456789ABCDEF"],dMt=i=>cEe[i&15],uMt=i=>cEe[(i&240)>>4]+cEe[i&15],YY=i=>(i&240)>>4===(i&15),hMt=i=>YY(i.r)&&YY(i.g)&&YY(i.b)&&YY(i.a);function fMt(i){var e=i.length,t;return i[0]==="#"&&(e===4||e===5?t={r:255&Y_[i[1]]*17,g:255&Y_[i[2]]*17,b:255&Y_[i[3]]*17,a:e===5?Y_[i[4]]*17:255}:(e===7||e===9)&&(t={r:Y_[i[1]]<<4|Y_[i[2]],g:Y_[i[3]]<<4|Y_[i[4]],b:Y_[i[5]]<<4|Y_[i[6]],a:e===9?Y_[i[7]]<<4|Y_[i[8]]:255})),t}var _Mt=(i,e)=>i<255?e(i):"";function pMt(i){var e=hMt(i)?dMt:uMt;return i?"#"+e(i.r)+e(i.g)+e(i.b)+_Mt(i.a,e):void 0}var EMt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Hje(i,e,t){let n=e*Math.min(t,1-t),r=(o,s=(o+i/30)%12)=>t-n*Math.max(Math.min(s-3,9-s,1),-1);return[r(0),r(8),r(4)]}function mMt(i,e,t){let n=(r,o=(r+i/60)%6)=>t-t*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function gMt(i,e,t){let n=Hje(i,1,.5),r;for(e+t>1&&(r=1/(e+t),e*=r,t*=r),r=0;r<3;r++)n[r]*=1-e-t,n[r]+=e;return n}function AMt(i,e,t,n,r){return i===r?(e-t)/n+(e<t?6:0):e===r?(t-i)/n+2:(i-e)/n+4}function dEe(i){let t=i.r/255,n=i.g/255,r=i.b/255,o=Math.max(t,n,r),s=Math.min(t,n,r),a=(o+s)/2,l,c,d;return o!==s&&(d=o-s,c=a>.5?d/(2-o-s):d/(o+s),l=AMt(t,n,r,d,o),l=l*60+.5),[l|0,c||0,a]}function uEe(i,e,t,n){return(Array.isArray(e)?i(e[0],e[1],e[2]):i(e,t,n)).map(uC)}function hEe(i,e,t){return uEe(Hje,i,e,t)}function TMt(i,e,t){return uEe(gMt,i,e,t)}function SMt(i,e,t){return uEe(mMt,i,e,t)}function Wje(i){return(i%360+360)%360}function CMt(i){let e=EMt.exec(i),t=255,n;if(!e)return;e[5]!==n&&(t=e[6]?$x(+e[5]):uC(+e[5]));let r=Wje(+e[2]),o=+e[3]/100,s=+e[4]/100;return e[1]==="hwb"?n=TMt(r,o,s):e[1]==="hsv"?n=SMt(r,o,s):n=hEe(r,o,s),{r:n[0],g:n[1],b:n[2],a:t}}function RMt(i,e){var t=dEe(i);t[0]=Wje(t[0]+e),t=hEe(t),i.r=t[0],i.g=t[1],i.b=t[2]}function OMt(i){if(!i)return;let e=dEe(i),t=e[0],n=Uje(e[1]),r=Uje(e[2]);return i.a<255?`hsla(${t}, ${n}%, ${r}%, ${hA(i.a)})`:`hsl(${t}, ${n}%, ${r}%)`}var Bje={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Vje={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function IMt(){let i={},e=Object.keys(Vje),t=Object.keys(Bje),n,r,o,s,a;for(n=0;n<e.length;n++){for(s=a=e[n],r=0;r<t.length;r++)o=t[r],a=a.replace(o,Bje[o]);o=parseInt(Vje[s],16),i[a]=[o>>16&255,o>>8&255,o&255]}return i}var KY;function NMt(i){KY||(KY=IMt(),KY.transparent=[0,0,0,0]);let e=KY[i.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}var vMt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function DMt(i){let e=vMt.exec(i),t=255,n,r,o;if(e){if(e[7]!==n){let s=+e[7];t=e[8]?$x(s):dC(s*255,0,255)}return n=+e[1],r=+e[3],o=+e[5],n=255&(e[2]?$x(n):dC(n,0,255)),r=255&(e[4]?$x(r):dC(r,0,255)),o=255&(e[6]?$x(o):dC(o,0,255)),{r:n,g:r,b:o,a:t}}}function yMt(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${hA(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var lEe=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,bb=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function bMt(i,e,t){let n=bb(hA(i.r)),r=bb(hA(i.g)),o=bb(hA(i.b));return{r:uC(lEe(n+t*(bb(hA(e.r))-n))),g:uC(lEe(r+t*(bb(hA(e.g))-r))),b:uC(lEe(o+t*(bb(hA(e.b))-o))),a:i.a+t*(e.a-i.a)}}function qY(i,e,t){if(i){let n=dEe(i);n[e]=Math.max(0,Math.min(n[e]+n[e]*t,e===0?360:1)),n=hEe(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function jje(i,e){return i&&Object.assign(e||{},i)}function Gje(i){var e={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(e={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(e.a=uC(i[3]))):(e=jje(i,{r:0,g:0,b:0,a:1}),e.a=uC(e.a)),e}function LMt(i){return i.charAt(0)==="r"?DMt(i):CMt(i)}var eF=class i{constructor(e){if(e instanceof i)return e;let t=typeof e,n;t==="object"?n=Gje(e):t==="string"&&(n=fMt(e)||NMt(e)||LMt(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=jje(this._rgb);return e&&(e.a=hA(e.a)),e}set rgb(e){this._rgb=Gje(e)}rgbString(){return this._valid?yMt(this._rgb):void 0}hexString(){return this._valid?pMt(this._rgb):void 0}hslString(){return this._valid?OMt(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,r=e.rgb,o,s=t===o?.5:t,a=2*s-1,l=n.a-r.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=bMt(this._rgb,e._rgb,t)),this}clone(){return new i(this.rgb)}alpha(e){return this._rgb.a=uC(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb,t=tF(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return qY(this._rgb,2,e),this}darken(e){return qY(this._rgb,2,-e),this}saturate(e){return qY(this._rgb,1,e),this}desaturate(e){return qY(this._rgb,1,-e),this}rotate(e){return RMt(this._rgb,e),this}};var Qje=(()=>{let i=0;return()=>i++})();function pa(i){return i===null||typeof i>"u"}function ya(i){if(Array.isArray&&Array.isArray(i))return!0;let e=Object.prototype.toString.call(i);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Io(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function jl(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function Ah(i,e){return jl(i)?i:e}function Js(i,e){return typeof i>"u"?e:i}var Jje=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/e,EEe=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*e:+i;function Ea(i,e,t){if(i&&typeof i.call=="function")return i.apply(t,e)}function Qc(i,e,t,n){let r,o,s;if(ya(i))if(o=i.length,n)for(r=o-1;r>=0;r--)e.call(t,i[r],r);else for(r=0;r<o;r++)e.call(t,i[r],r);else if(Io(i))for(s=Object.keys(i),o=s.length,r=0;r<o;r++)e.call(t,i[s[r]],s[r])}function mEe(i,e){let t,n,r,o;if(!i||!e||i.length!==e.length)return!1;for(t=0,n=i.length;t<n;++t)if(r=i[t],o=e[t],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function QY(i){if(ya(i))return i.map(QY);if(Io(i)){let e=Object.create(null),t=Object.keys(i),n=t.length,r=0;for(;r<n;++r)e[t[r]]=QY(i[t[r]]);return e}return i}function $je(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function wMt(i,e,t,n){if(!$je(i))return;let r=e[i],o=t[i];Io(r)&&Io(o)?wb(r,o,n):e[i]=QY(o)}function wb(i,e,t){let n=ya(e)?e:[e],r=n.length;if(!Io(i))return i;t=t||{};let o=t.merger||wMt,s;for(let a=0;a<r;++a){if(s=n[a],!Io(s))continue;let l=Object.keys(s);for(let c=0,d=l.length;c<d;++c)o(l[c],i,s,t)}return i}function Pb(i,e){return wb(i,e,{merger:PMt})}function PMt(i,e,t){if(!$je(i))return;let n=e[i],r=t[i];Io(n)&&Io(r)?Pb(n,r):Object.prototype.hasOwnProperty.call(e,i)||(e[i]=QY(r))}var zje={"":i=>i,x:i=>i.x,y:i=>i.y};function MMt(i){let e=i.split("."),t=[],n="";for(let r of e)n+=r,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}function kMt(i){let e=MMt(i);return t=>{for(let n of e){if(n==="")break;t=t&&t[n]}return t}}function Mb(i,e){return(zje[e]||(zje[e]=kMt(e)))(i)}function eK(i){return i.charAt(0).toUpperCase()+i.slice(1)}var rF=i=>typeof i<"u",fA=i=>typeof i=="function",gEe=(i,e)=>{if(i.size!==e.size)return!1;for(let t of i)if(!e.has(t))return!1;return!0};function eze(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var Wl=Math.PI,ba=2*Wl,Gen=ba+Wl,JY=Number.POSITIVE_INFINITY,Hen=Wl/180,Hl=Wl/2,Wen=Wl/4,jen=Wl*2/3,_A=Math.log10,oF=Math.sign;function sF(i,e,t){return Math.abs(i-e)<t}function AEe(i){let e=Math.round(i);i=sF(i,e,i/1e3)?e:i;let t=Math.pow(10,Math.floor(_A(i))),n=i/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function tze(i){let e=[],t=Math.sqrt(i),n;for(n=1;n<t;n++)i%n===0&&(e.push(n),e.push(i/n));return t===(t|0)&&e.push(t),e.sort((r,o)=>r-o).pop(),e}function aF(i){return!isNaN(parseFloat(i))&&isFinite(i)}function ize(i,e){let t=Math.round(i);return t-e<=i&&t+e>=i}function TEe(i,e,t){let n,r,o;for(n=0,r=i.length;n<r;n++)o=i[n][t],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function oE(i){return i*(Wl/180)}function tK(i){return i*(180/Wl)}function SEe(i){if(!jl(i))return;let e=1,t=0;for(;Math.round(i*e)/e!==i;)e*=10,t++;return t}function CEe(i,e){let t=e.x-i.x,n=e.y-i.y,r=Math.sqrt(t*t+n*n),o=Math.atan2(n,t);return o<-.5*Wl&&(o+=ba),{angle:o,distance:r}}function rE(i){return(i%ba+ba)%ba}function lF(i,e,t,n){let r=rE(i),o=rE(e),s=rE(t),a=rE(o-r),l=rE(s-r),c=rE(r-o),d=rE(r-s);return r===o||r===s||n&&o===s||a>l&&c<d}function sE(i,e,t){return Math.max(e,Math.min(t,i))}function nze(i){return sE(i,-32768,32767)}function rze(i,e,t,n=1e-6){return i>=Math.min(e,t)-n&&i<=Math.max(e,t)+n}function iK(i,e,t){t=t||(s=>i[s]<e);let n=i.length-1,r=0,o;for(;n-r>1;)o=r+n>>1,t(o)?r=o:n=o;return{lo:r,hi:n}}var nK=(i,e,t,n)=>iK(i,t,n?r=>{let o=i[r][e];return o<t||o===t&&i[r+1][e]===t}:r=>i[r][e]<t),oze=(i,e,t)=>iK(i,t,n=>i[n][e]>=t);function sze(i,e,t){let n=0,r=i.length;for(;n<r&&i[n]<e;)n++;for(;r>n&&i[r-1]>t;)r--;return n>0||r<i.length?i.slice(n,r):i}var aze=["push","pop","shift","splice","unshift"];function lze(i,e){if(i._chartjs){i._chartjs.listeners.push(e);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),aze.forEach(t=>{let n="_onData"+eK(t),r=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...o){let s=r.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...o)}),s}})})}function REe(i,e){let t=i._chartjs;if(!t)return;let n=t.listeners,r=n.indexOf(e);r!==-1&&n.splice(r,1),!(n.length>0)&&(aze.forEach(o=>{delete i[o]}),delete i._chartjs)}function cze(i){let e=new Set(i);return e.size===i.length?i:Array.from(e)}var OEe=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function IEe(i,e){let t=[],n=!1;return function(...r){t=r,n||(n=!0,OEe.call(window,()=>{n=!1,i.apply(e,t)}))}}function dze(i,e){let t;return function(...n){return e?(clearTimeout(t),t=setTimeout(i,e,n)):i.apply(this,n),e}}var uze=i=>i==="start"?"left":i==="end"?"right":"center",NEe=(i,e,t)=>i==="start"?e:i==="end"?t:(e+t)/2;var XY=i=>i===0||i===1,Yje=(i,e,t)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-e)*ba/t)),Kje=(i,e,t)=>Math.pow(2,-10*i)*Math.sin((i-e)*ba/t)+1,Lb={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*Hl)+1,easeOutSine:i=>Math.sin(i*Hl),easeInOutSine:i=>-.5*(Math.cos(Wl*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>XY(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>XY(i)?i:Yje(i,.075,.3),easeOutElastic:i=>XY(i)?i:Kje(i,.075,.3),easeInOutElastic(i){return XY(i)?i:i<.5?.5*Yje(i*2,.1125,.45):.5+.5*Kje(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let e=1.70158;return(i/=.5)<1?.5*(i*i*(((e*=1.525)+1)*i-e)):.5*((i-=2)*i*(((e*=1.525)+1)*i+e)+2)},easeInBounce:i=>1-Lb.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Lb.easeInBounce(i*2)*.5:Lb.easeOutBounce(i*2-1)*.5+.5};function hze(i){if(i&&typeof i=="object"){let e=i.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function vEe(i){return hze(i)?i:new eF(i)}function fEe(i){return hze(i)?i:new eF(i).saturate(.5).darken(.1).hexString()}var xMt=["x","y","borderWidth","radius","tension"],FMt=["color","borderColor","backgroundColor"];function UMt(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),i.set("animations",{colors:{type:"color",properties:FMt},numbers:{type:"number",properties:xMt}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function BMt(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var qje=new Map;function VMt(i,e){e=e||{};let t=i+JSON.stringify(e),n=qje.get(t);return n||(n=new Intl.NumberFormat(i,e),qje.set(t,n)),n}function cF(i,e,t){return VMt(e,t).format(i)}var fze={values(i){return ya(i)?i:""+i},numeric(i,e,t){if(i===0)return"0";let n=this.chart.options.locale,r,o=i;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),o=GMt(i,t)}let s=_A(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),cF(i,n,l)},logarithmic(i,e,t){if(i===0)return"0";let n=t[e].significand||i/Math.pow(10,Math.floor(_A(i)));return[1,2,3,5,10,15].includes(n)||e>.8*t.length?fze.numeric.call(this,i,e,t):""}};function GMt(i,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&i!==Math.floor(i)&&(t=i-Math.floor(i)),t}var dF={formatters:fze};function HMt(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:dF.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}var hC=Object.create(null),rK=Object.create(null);function iF(i,e){if(!e)return i;let t=e.split(".");for(let n=0,r=t.length;n<r;++n){let o=t[n];i=i[o]||(i[o]=Object.create(null))}return i}function _Ee(i,e,t){return typeof e=="string"?wb(iF(i,e),t):wb(iF(i,""),e)}var pEe=class{constructor(e,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,r)=>fEe(r.backgroundColor),this.hoverBorderColor=(n,r)=>fEe(r.borderColor),this.hoverColor=(n,r)=>fEe(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return _Ee(this,e,t)}get(e){return iF(this,e)}describe(e,t){return _Ee(rK,e,t)}override(e,t){return _Ee(hC,e,t)}route(e,t,n,r){let o=iF(this,e),s=iF(this,n),a="_"+t;Object.defineProperties(o,{[a]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[a],c=s[r];return Io(l)?Object.assign({},c,l):Js(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(t=>t(this))}},La=new pEe({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[UMt,BMt,HMt]);function WMt(i){return!i||pa(i.size)||pa(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function nF(i,e,t,n,r){let o=e[r];return o||(o=e[r]=i.measureText(r).width,t.push(r)),o>n&&(n=o),n}function _ze(i,e,t,n){n=n||{};let r=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),i.save(),i.font=e;let s=0,a=t.length,l,c,d,u,h;for(l=0;l<a;l++)if(u=t[l],u!=null&&!ya(u))s=nF(i,r,o,s,u);else if(ya(u))for(c=0,d=u.length;c<d;c++)h=u[c],h!=null&&!ya(h)&&(s=nF(i,r,o,s,h));i.restore();let f=o.length/2;if(f>t.length){for(l=0;l<f;l++)delete r[o[l]];o.splice(0,f)}return s}function fC(i,e,t){let n=i.currentDevicePixelRatio,r=t!==0?Math.max(t/2,.5):0;return Math.round((e-r)*n)/n+r}function DEe(i,e){e=e||i.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,i.width,i.height),e.restore()}function QI(i,e,t){return t=t||.5,!e||i&&i.x>e.left-t&&i.x<e.right+t&&i.y>e.top-t&&i.y<e.bottom+t}function yEe(i,e){i.save(),i.beginPath(),i.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),i.clip()}function bEe(i){i.restore()}function jMt(i,e){e.translation&&i.translate(e.translation[0],e.translation[1]),pa(e.rotation)||i.rotate(e.rotation),e.color&&(i.fillStyle=e.color),e.textAlign&&(i.textAlign=e.textAlign),e.textBaseline&&(i.textBaseline=e.textBaseline)}function zMt(i,e,t,n,r){if(r.strikethrough||r.underline){let o=i.measureText(n),s=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=t-o.actualBoundingBoxAscent,c=t+o.actualBoundingBoxDescent,d=r.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=r.decorationWidth||2,i.moveTo(s,d),i.lineTo(a,d),i.stroke()}}function YMt(i,e){let t=i.fillStyle;i.fillStyle=e.color,i.fillRect(e.left,e.top,e.width,e.height),i.fillStyle=t}function uF(i,e,t,n,r,o={}){let s=ya(e)?e:[e],a=o.strokeWidth>0&&o.strokeColor!=="",l,c;for(i.save(),i.font=r.string,jMt(i,o),l=0;l<s.length;++l)c=s[l],o.backdrop&&YMt(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),pa(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,t,n,o.maxWidth)),i.fillText(c,t,n,o.maxWidth),zMt(i,t,n,c,o),n+=Number(r.lineHeight);i.restore()}function pze(i,e){let{x:t,y:n,w:r,h:o,radius:s}=e;i.arc(t+s.topLeft,n+s.topLeft,s.topLeft,-Hl,Wl,!0),i.lineTo(t,n+o-s.bottomLeft),i.arc(t+s.bottomLeft,n+o-s.bottomLeft,s.bottomLeft,Wl,Hl,!0),i.lineTo(t+r-s.bottomRight,n+o),i.arc(t+r-s.bottomRight,n+o-s.bottomRight,s.bottomRight,Hl,0,!0),i.lineTo(t+r,n+s.topRight),i.arc(t+r-s.topRight,n+s.topRight,s.topRight,0,-Hl,!0),i.lineTo(t+s.topLeft,n)}var KMt=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,qMt=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function XMt(i,e){let t=(""+i).match(KMt);if(!t||t[1]==="normal")return e*1.2;switch(i=+t[2],t[3]){case"px":return i;case"%":i/=100;break}return e*i}var ZMt=i=>+i||0;function oK(i,e){let t={},n=Io(e),r=n?Object.keys(e):e,o=Io(i)?n?s=>Js(i[s],i[e[s]]):s=>i[s]:()=>i;for(let s of r)t[s]=ZMt(o(s));return t}function Eze(i){return oK(i,{top:"y",right:"x",bottom:"y",left:"x"})}function mze(i){return oK(i,["topLeft","topRight","bottomLeft","bottomRight"])}function sg(i){let e=Eze(i);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function JI(i,e){i=i||{},e=e||La.font;let t=Js(i.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let n=Js(i.style,e.style);n&&!(""+n).match(qMt)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let r={family:Js(i.family,e.family),lineHeight:XMt(Js(i.lineHeight,e.lineHeight),t),size:t,style:n,weight:Js(i.weight,e.weight),string:""};return r.string=WMt(r),r}function hF(i,e,t,n){let r=!0,o,s,a;for(o=0,s=i.length;o<s;++o)if(a=i[o],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),r=!1),t!==void 0&&ya(a)&&(a=a[t%a.length],r=!1),a!==void 0))return n&&!r&&(n.cacheable=!1),a}function gze(i,e,t){let{min:n,max:r}=i,o=EEe(e,(r-n)/2),s=(a,l)=>t&&a===0?0:a+l;return{min:s(n,-Math.abs(o)),max:s(r,o)}}function $I(i,e){return Object.assign(Object.create(i),e)}function sK(i,e=[""],t,n,r=()=>i[0]){let o=t||i;typeof n>"u"&&(n=Sze("_fallback",i));let s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:r,override:a=>sK([a,...i],e,o,n)};return new Proxy(s,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Aze(a,l,()=>rkt(l,e,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return Zje(a).includes(l)},ownKeys(a){return Zje(a)},set(a,l,c){let d=a._storage||(a._storage=r());return a[l]=d[l]=c,delete a._keys,!0}})}function ZI(i,e,t,n){let r={_cacheable:!1,_proxy:i,_context:e,_subProxy:t,_stack:new Set,_descriptors:LEe(i,n),setContext:o=>ZI(i,o,t,n),override:o=>ZI(i.override(o),e,t,n)};return new Proxy(r,{deleteProperty(o,s){return delete o[s],delete i[s],!0},get(o,s,a){return Aze(o,s,()=>JMt(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(i,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,s)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,s){return Reflect.has(i,s)},ownKeys(){return Reflect.ownKeys(i)},set(o,s,a){return i[s]=a,delete o[s],!0}})}function LEe(i,e={scriptable:!0,indexable:!0}){let{_scriptable:t=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=i;return{allKeys:r,scriptable:t,indexable:n,isScriptable:fA(t)?t:()=>t,isIndexable:fA(n)?n:()=>n}}var QMt=(i,e)=>i?i+eK(e):e,wEe=(i,e)=>Io(e)&&i!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Aze(i,e,t){if(Object.prototype.hasOwnProperty.call(i,e))return i[e];let n=t();return i[e]=n,n}function JMt(i,e,t){let{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=i,a=n[e];return fA(a)&&s.isScriptable(e)&&(a=$Mt(e,a,i,t)),ya(a)&&a.length&&(a=ekt(e,a,i,s.isIndexable)),wEe(e,a)&&(a=ZI(a,r,o&&o[e],s)),a}function $Mt(i,e,t,n){let{_proxy:r,_context:o,_subProxy:s,_stack:a}=t;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=e(o,s||n);return a.delete(i),wEe(i,l)&&(l=PEe(r._scopes,r,i,l)),l}function ekt(i,e,t,n){let{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=t;if(typeof o.index<"u"&&n(i))return e[o.index%e.length];if(Io(e[0])){let l=e,c=r._scopes.filter(d=>d!==l);e=[];for(let d of l){let u=PEe(c,r,i,d);e.push(ZI(u,o,s&&s[i],a))}}return e}function Tze(i,e,t){return fA(i)?i(e,t):i}var tkt=(i,e)=>i===!0?e:typeof i=="string"?Mb(e,i):void 0;function ikt(i,e,t,n,r){for(let o of e){let s=tkt(t,o);if(s){i.add(s);let a=Tze(s._fallback,t,r);if(typeof a<"u"&&a!==t&&a!==n)return a}else if(s===!1&&typeof n<"u"&&t!==n)return null}return!1}function PEe(i,e,t,n){let r=e._rootScopes,o=Tze(e._fallback,t,n),s=[...i,...r],a=new Set;a.add(n);let l=Xje(a,s,t,o||t,n);return l===null||typeof o<"u"&&o!==t&&(l=Xje(a,s,o,l,n),l===null)?!1:sK(Array.from(a),[""],r,o,()=>nkt(e,t,n))}function Xje(i,e,t,n,r){for(;t;)t=ikt(i,e,t,n,r);return t}function nkt(i,e,t){let n=i._getTarget();e in n||(n[e]={});let r=n[e];return ya(r)&&Io(t)?t:r||{}}function rkt(i,e,t,n){let r;for(let o of e)if(r=Sze(QMt(o,i),t),typeof r<"u")return wEe(i,r)?PEe(t,n,i,r):r}function Sze(i,e){for(let t of e){if(!t)continue;let n=t[i];if(typeof n<"u")return n}}function Zje(i){let e=i._keys;return e||(e=i._keys=okt(i._scopes)),e}function okt(i){let e=new Set;for(let t of i)for(let n of Object.keys(t).filter(r=>!r.startsWith("_")))e.add(n);return Array.from(e)}var zen=Number.EPSILON||1e-14;function MEe(){return typeof window<"u"&&typeof document<"u"}function aK(i){let e=i.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function $Y(i,e,t){let n;return typeof i=="string"?(n=parseInt(i,10),i.indexOf("%")!==-1&&(n=n/100*e.parentNode[t])):n=i,n}var lK=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function skt(i,e){return lK(i).getPropertyValue(e)}var akt=["top","right","bottom","left"];function XI(i,e,t){let n={};t=t?"-"+t:"";for(let r=0;r<4;r++){let o=akt[r];n[o]=parseFloat(i[e+"-"+o+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}var lkt=(i,e,t)=>(i>0||e>0)&&(!t||!t.shadowRoot);function ckt(i,e){let t=i.touches,n=t&&t.length?t[0]:i,{offsetX:r,offsetY:o}=n,s=!1,a,l;if(lkt(r,o,i.target))a=r,l=o;else{let c=e.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function _C(i,e){if("native"in i)return i;let{canvas:t,currentDevicePixelRatio:n}=e,r=lK(t),o=r.boxSizing==="border-box",s=XI(r,"padding"),a=XI(r,"border","width"),{x:l,y:c,box:d}=ckt(i,t),u=s.left+(d&&a.left),h=s.top+(d&&a.top),{width:f,height:_}=e;return o&&(f-=s.width+a.width,_-=s.height+a.height),{x:Math.round((l-u)/f*t.width/n),y:Math.round((c-h)/_*t.height/n)}}function dkt(i,e,t){let n,r;if(e===void 0||t===void 0){let o=aK(i);if(!o)e=i.clientWidth,t=i.clientHeight;else{let s=o.getBoundingClientRect(),a=lK(o),l=XI(a,"border","width"),c=XI(a,"padding");e=s.width-c.width-l.width,t=s.height-c.height-l.height,n=$Y(a.maxWidth,o,"clientWidth"),r=$Y(a.maxHeight,o,"clientHeight")}}return{width:e,height:t,maxWidth:n||JY,maxHeight:r||JY}}var ZY=i=>Math.round(i*10)/10;function Cze(i,e,t,n){let r=lK(i),o=XI(r,"margin"),s=$Y(r.maxWidth,i,"clientWidth")||JY,a=$Y(r.maxHeight,i,"clientHeight")||JY,l=dkt(i,e,t),{width:c,height:d}=l;if(r.boxSizing==="content-box"){let h=XI(r,"border","width"),f=XI(r,"padding");c-=f.width+h.width,d-=f.height+h.height}return c=Math.max(0,c-o.width),d=Math.max(0,n?c/n:d-o.height),c=ZY(Math.min(c,s,l.maxWidth)),d=ZY(Math.min(d,a,l.maxHeight)),c&&!d&&(d=ZY(c/2)),(e!==void 0||t!==void 0)&&n&&l.height&&d>l.height&&(d=l.height,c=ZY(Math.floor(d*n))),{width:c,height:d}}function kEe(i,e,t){let n=e||1,r=Math.floor(i.height*n),o=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);let s=i.canvas;return s.style&&(t||!s.style.height&&!s.style.width)&&(s.style.height=`${i.height}px`,s.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||s.height!==r||s.width!==o?(i.currentDevicePixelRatio=n,s.height=r,s.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}var Rze=(function(){let i=!1;try{let e={get passive(){return i=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return i})();function xEe(i,e){let t=skt(i,e),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}var HEe=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){let o=t.listeners[r],s=t.duration;o.forEach(a=>a({chart:e,initial:t.initial,numSteps:s,currentStep:Math.min(n-t.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=OEe.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let o=n.items,s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),a=!0):(o[s]=o[o.length-1],o.pop());a&&(r.draw(),this._notify(r,n,e,"progress")),o.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),t+=o.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,r)=>Math.max(n,r._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}},pA=new HEe,Oze="transparent",ukt={boolean(i,e,t){return t>.5?e:i},color(i,e,t){let n=vEe(i||Oze),r=n.valid&&vEe(e||Oze);return r&&r.valid?r.mix(n,t).hexString():e},number(i,e,t){return i+(e-i)*t}},WEe=class{constructor(e,t,n,r){let o=t[n];r=hF([e.to,r,o,e.from]);let s=hF([e.from,o,r]);this._active=!0,this._fn=e.fn||ukt[e.type||typeof s],this._easing=Lb[e.easing]||Lb.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let r=this._target[this._prop],o=n-this._start,s=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=hF([e.to,t,r,e.from]),this._from=hF([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,r=this._prop,o=this._from,s=this._loop,a=this._to,l;if(this._active=o!==a&&(s||t<n),!this._active){this._target[r]=a,this._notify(!0);return}if(t<0){this._target[r]=o;return}l=t/n%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(o,a,l)}wait(){let e=this._promises||(this._promises=[]);return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?"res":"rej",n=this._promises||[];for(let r=0;r<n.length;r++)n[r][t]()}},jEe=class{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Io(e))return;let t=Object.keys(La.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{let o=e[r];if(!Io(o))return;let s={};for(let a of t)s[a]=o[a];(ya(o.properties)&&o.properties||[r]).forEach(a=>{(a===r||!n.has(a))&&n.set(a,s)})})}_animateOptions(e,t){let n=t.options,r=fkt(e,n);if(!r)return[];let o=this._createAnimations(r,n);return n.$shared&&hkt(e.options.$animations,n).then(()=>{e.options=n},()=>{}),o}_createAnimations(e,t){let n=this._properties,r=[],o=e.$animations||(e.$animations={}),s=Object.keys(t),a=Date.now(),l;for(l=s.length-1;l>=0;--l){let c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(e,t));continue}let d=t[c],u=o[c],h=n.get(c);if(u)if(h&&u.active()){u.update(h,d,a);continue}else u.cancel();if(!h||!h.duration){e[c]=d;continue}o[c]=u=new WEe(h,e,c,d),r.push(u)}return r}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return pA.add(this._chart,n),!0}};function hkt(i,e){let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let o=i[n[r]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}function fkt(i,e){if(!e)return;let t=i.options;if(!t){i.options=e;return}return t.$shared&&(i.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function Ize(i,e){let t=i&&i.options||{},n=t.reverse,r=t.min===void 0?e:0,o=t.max===void 0?e:0;return{start:n?o:r,end:n?r:o}}function _kt(i,e,t){if(t===!1)return!1;let n=Ize(i,t),r=Ize(e,t);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}function pkt(i){let e,t,n,r;return Io(i)?(e=i.top,t=i.right,n=i.bottom,r=i.left):e=t=n=r=i,{top:e,right:t,bottom:n,left:r,disabled:i===!1}}function cYe(i,e){let t=[],n=i._getSortedDatasetMetas(e),r,o;for(r=0,o=n.length;r<o;++r)t.push(n[r].index);return t}function Nze(i,e,t,n={}){let r=i.keys,o=n.mode==="single",s,a,l,c;if(e!==null){for(s=0,a=r.length;s<a;++s){if(l=+r[s],l===t){if(n.all)continue;break}c=i.values[l],jl(c)&&(o||e===0||oF(e)===oF(c))&&(e+=c)}return e}}function Ekt(i){let e=Object.keys(i),t=new Array(e.length),n,r,o;for(n=0,r=e.length;n<r;++n)o=e[n],t[n]={x:o,y:i[o]};return t}function vze(i,e){let t=i&&i.options.stacked;return t||t===void 0&&e.stack!==void 0}function mkt(i,e,t){return`${i.id}.${e.id}.${t.stack||t.type}`}function gkt(i){let{min:e,max:t,minDefined:n,maxDefined:r}=i.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?t:Number.POSITIVE_INFINITY}}function Akt(i,e,t){let n=i[e]||(i[e]={});return n[t]||(n[t]={})}function Dze(i,e,t,n){for(let r of e.getMatchingVisibleMetas(n).reverse()){let o=i[r.index];if(t&&o>0||!t&&o<0)return r.index}return null}function yze(i,e){let{chart:t,_cachedMeta:n}=i,r=t._stacks||(t._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,d=mkt(o,s,n),u=e.length,h;for(let f=0;f<u;++f){let _=e[f],{[l]:p,[c]:T}=_,g=_._stacks||(_._stacks={});h=g[c]=Akt(r,d,p),h[a]=T,h._top=Dze(h,s,!0,n.type),h._bottom=Dze(h,s,!1,n.type);let y=h._visualValues||(h._visualValues={});y[a]=T}}function FEe(i,e){let t=i.scales;return Object.keys(t).filter(n=>t[n].axis===e).shift()}function Tkt(i,e){return $I(i,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Skt(i,e,t){return $I(i,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function fF(i,e){let t=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){e=e||i._parsed;for(let r of e){let o=r._stacks;if(!o||o[n]===void 0||o[n][t]===void 0)return;delete o[n][t],o[n]._visualValues!==void 0&&o[n]._visualValues[t]!==void 0&&delete o[n]._visualValues[t]}}}var UEe=i=>i==="reset"||i==="none",bze=(i,e)=>e?i:Object.assign({},i),Ckt=(i,e,t)=>i&&!e.hidden&&e._stacked&&{keys:cYe(t,!0),values:null},dYe=(()=>{class i{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=vze(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&fF(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,n=this._cachedMeta,r=this.getDataset(),o=(h,f,_,p)=>h==="x"?f:h==="r"?p:_,s=n.xAxisID=Js(r.xAxisID,FEe(t,"x")),a=n.yAxisID=Js(r.yAxisID,FEe(t,"y")),l=n.rAxisID=Js(r.rAxisID,FEe(t,"r")),c=n.indexAxis,d=n.iAxisID=o(c,s,a,l),u=n.vAxisID=o(c,a,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&REe(this._data,this),t._stacked&&fF(t)}_dataCheck(){let t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Io(n))this._data=Ekt(n);else if(r!==n){if(r){REe(r,this);let o=this._cachedMeta;fF(o),o._parsed=[]}n&&Object.isExtensible(n)&&lze(n,this),this._syncList=[],this._data=n}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let n=this._cachedMeta,r=this.getDataset(),o=!1;this._dataCheck();let s=n._stacked;n._stacked=vze(n.vScale,n),n.stack!==r.stack&&(o=!0,fF(n),n.stack=r.stack),this._resyncElements(t),(o||s!==n._stacked)&&yze(this,n._parsed)}configure(){let t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){let{_cachedMeta:r,_data:o}=this,{iScale:s,_stacked:a}=r,l=s.axis,c=t===0&&n===o.length?!0:r._sorted,d=t>0&&r._parsed[t-1],u,h,f;if(this._parsing===!1)r._parsed=o,r._sorted=!0,f=o;else{ya(o[t])?f=this.parseArrayData(r,o,t,n):Io(o[t])?f=this.parseObjectData(r,o,t,n):f=this.parsePrimitiveData(r,o,t,n);let _=()=>h[l]===null||d&&h[l]<d[l];for(u=0;u<n;++u)r._parsed[u+t]=h=f[u],c&&(_()&&(c=!1),d=h);r._sorted=c}a&&yze(this,f)}parsePrimitiveData(t,n,r,o){let{iScale:s,vScale:a}=t,l=s.axis,c=a.axis,d=s.getLabels(),u=s===a,h=new Array(o),f,_,p;for(f=0,_=o;f<_;++f)p=f+r,h[f]={[l]:u||s.parse(d[p],p),[c]:a.parse(n[p],p)};return h}parseArrayData(t,n,r,o){let{xScale:s,yScale:a}=t,l=new Array(o),c,d,u,h;for(c=0,d=o;c<d;++c)u=c+r,h=n[u],l[c]={x:s.parse(h[0],u),y:a.parse(h[1],u)};return l}parseObjectData(t,n,r,o){let{xScale:s,yScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(o),u,h,f,_;for(u=0,h=o;u<h;++u)f=u+r,_=n[f],d[u]={x:s.parse(Mb(_,l),f),y:a.parse(Mb(_,c),f)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){let o=this.chart,s=this._cachedMeta,a=n[t.axis],l={keys:cYe(o,!0),values:n._stacks[t.axis]._visualValues};return Nze(l,a,s.index,{mode:r})}updateRangeFromParsed(t,n,r,o){let s=r[n.axis],a=s===null?NaN:s,l=o&&r._stacks[n.axis];o&&l&&(o.values=l,a=Nze(o,s,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){let r=this._cachedMeta,o=r._parsed,s=r._sorted&&t===r.iScale,a=o.length,l=this._getOtherScale(t),c=Ckt(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=gkt(l),f,_;function p(){_=o[f];let T=_[l.axis];return!jl(_[t.axis])||u>T||h<T}for(f=0;f<a&&!(!p()&&(this.updateRangeFromParsed(d,t,_,c),s));++f);if(s){for(f=a-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(d,t,_,c);break}}return d}getAllParsedValues(t){let n=this._cachedMeta._parsed,r=[],o,s,a;for(o=0,s=n.length;o<s;++o)a=n[o][t.axis],jl(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(t){let n=this._cachedMeta,r=n.iScale,o=n.vScale,s=this.getParsed(t);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:o?""+o.getLabelForValue(s[o.axis]):""}}_update(t){let n=this._cachedMeta;this.update(t||"default"),n._clip=pkt(Js(this.options.clip,_kt(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,n=this.chart,r=this._cachedMeta,o=r.data||[],s=n.chartArea,a=[],l=this._drawStart||0,c=this._drawCount||o.length-l,d=this.options.drawActiveElementsOnTop,u;for(r.dataset&&r.dataset.draw(t,s,l,c),u=l;u<l+c;++u){let h=o[u];h.hidden||(h.active&&d?a.push(h):h.draw(t,s))}for(u=0;u<a.length;++u)a[u].draw(t,s)}getStyle(t,n){let r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){let o=this.getDataset(),s;if(t>=0&&t<this._cachedMeta.data.length){let a=this._cachedMeta.data[t];s=a.$context||(a.$context=Skt(this.getContext(),t,a)),s.parsed=this.getParsed(t),s.raw=o.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=Tkt(this.chart.getContext(),this.index)),s.dataset=o,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){let o=n==="active",s=this._cachedDataOpts,a=t+"-"+n,l=s[a],c=this.enableOptionSharing&&rF(r);if(l)return bze(l,c);let d=this.chart.config,u=d.datasetElementScopeKeys(this._type,t),h=o?[`${t}Hover`,"hover",t,""]:[t,""],f=d.getOptionScopes(this.getDataset(),u),_=Object.keys(La.elements[t]),p=()=>this.getContext(r,o,n),T=d.resolveNamedOptions(f,_,p,h);return T.$shared&&(T.$shared=c,s[a]=Object.freeze(bze(T,c))),T}_resolveAnimations(t,n,r){let o=this.chart,s=this._cachedDataOpts,a=`animation-${n}`,l=s[a];if(l)return l;let c;if(o.options.animation!==!1){let u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),h);c=u.createResolver(f,this.getContext(t,r,n))}let d=new jEe(o,c&&c.animations);return c&&c._cacheable&&(s[a]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||UEe(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){let r=this.resolveDataElementOptions(t,n),o=this._sharedOptions,s=this.getSharedOptions(r),a=this.includeOptions(n,s)||s!==o;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:a}}updateElement(t,n,r,o){UEe(o)?Object.assign(t,r):this._resolveAnimations(n,o).update(t,r)}updateSharedOptions(t,n,r){t&&!UEe(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,o){t.active=o;let s=this.getStyle(n,o);this._resolveAnimations(n,r,o).update(t,{options:!o&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let n=this._data,r=this._cachedMeta.data;for(let[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];let o=r.length,s=n.length,a=Math.min(s,o);a&&this.parse(0,a),s>o?this._insertElements(o,s-o,t):s<o&&this._removeElements(s,o-s)}_insertElements(t,n,r=!0){let o=this._cachedMeta,s=o.data,a=t+n,l,c=d=>{for(d.length+=n,l=d.length-1;l>=a;l--)d[l]=d[l-n]};for(c(s),l=t;l<a;++l)s[l]=new this.dataElementType;this._parsing&&c(o._parsed),this.parse(t,n),r&&this.updateElements(s,t,n,"reset")}updateElements(t,n,r,o){}_removeElements(t,n){let r=this._cachedMeta;if(this._parsing){let o=r._parsed.splice(t,n);r._stacked&&fF(r,o)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[n,r,o]=t;this[n](r,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);let r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}return i})();function Rkt(i,e,t){let n=1,r=1,o=0,s=0;if(e<ba){let a=i,l=a+e,c=Math.cos(a),d=Math.sin(a),u=Math.cos(l),h=Math.sin(l),f=(w,L,P)=>lF(w,a,l,!0)?1:Math.max(L,L*t,P,P*t),_=(w,L,P)=>lF(w,a,l,!0)?-1:Math.min(L,L*t,P,P*t),p=f(0,c,u),T=f(Hl,d,h),g=_(Wl,c,u),y=_(Wl+Hl,d,h);n=(p-g)/2,r=(T-y)/2,o=-(p+g)/2,s=-(T+y)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}var uYe=(()=>{class i extends dYe{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:r,color:o}}=t.legend.options;return n.labels.map((s,a)=>{let c=t.getDatasetMeta(0).controller.getStyle(a);return{text:s,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){let r=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=r;else{let s=c=>+r[c];if(Io(r[t])){let{key:c="value"}=this._parsing;s=d=>+Mb(r[d],c)}let a,l;for(a=t,l=t+n;a<l;++a)o._parsed[a]=s(a)}}_getRotation(){return oE(this.options.rotation-90)}_getCircumference(){return oE(this.options.circumference)}_getRotationExtents(){let t=ba,n=-ba;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){let o=this.chart.getDatasetMeta(r).controller,s=o._getRotation(),a=o._getCircumference();t=Math.min(t,s),n=Math.max(n,s+a)}return{rotation:t,circumference:n-t}}update(t){let n=this.chart,{chartArea:r}=n,o=this._cachedMeta,s=o.data,a=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(r.width,r.height)-a)/2,0),c=Math.min(Jje(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:f,ratioY:_,offsetX:p,offsetY:T}=Rkt(h,u,c),g=(r.width-a)/f,y=(r.height-a)/_,w=Math.max(Math.min(g,y)/2,0),L=EEe(this.options.radius,w),P=Math.max(L*c,0),V=(L-P)/this._getVisibleDatasetWeightTotal();this.offsetX=p*L,this.offsetY=T*L,o.total=this.calculateTotal(),this.outerRadius=L-V*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-V*d,0),this.updateElements(s,0,s.length,t)}_circumference(t,n){let r=this.options,o=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||o._parsed[t]===null||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*s/ba)}updateElements(t,n,r,o){let s=o==="reset",a=this.chart,l=a.chartArea,d=a.options.animation,u=(l.left+l.right)/2,h=(l.top+l.bottom)/2,f=s&&d.animateScale,_=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:T,includeOptions:g}=this._getSharedOptions(n,o),y=this._getRotation(),w;for(w=0;w<n;++w)y+=this._circumference(w,s);for(w=n;w<n+r;++w){let L=this._circumference(w,s),P=t[w],V={x:u+this.offsetX,y:h+this.offsetY,startAngle:y,endAngle:y+L,circumference:L,outerRadius:p,innerRadius:_};g&&(V.options=T||this.resolveDataElementOptions(w,P.active?"active":o)),y+=L,this.updateElement(P,w,V,o)}}calculateTotal(){let t=this._cachedMeta,n=t.data,r=0,o;for(o=0;o<n.length;o++){let s=t._parsed[o];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(o)&&!n[o].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(t){let n=this._cachedMeta.total;return n>0&&!isNaN(t)?ba*(Math.abs(t)/n):0}getLabelAndValue(t){let n=this._cachedMeta,r=this.chart,o=r.data.labels||[],s=cF(n._parsed[t],r.options.locale);return{label:o[t]||"",value:s}}getMaxBorderWidth(t){let n=0,r=this.chart,o,s,a,l,c;if(!t){for(o=0,s=r.data.datasets.length;o<s;++o)if(r.isDatasetVisible(o)){a=r.getDatasetMeta(o),t=a.data,l=a.controller;break}}if(!t)return 0;for(o=0,s=t.length;o<s;++o)c=l.resolveDataElementOptions(o),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,o=t.length;r<o;++r){let s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Js(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}return i})();function eN(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var zEe=class i{static override(e){Object.assign(i.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return eN()}parse(){return eN()}format(){return eN()}add(){return eN()}diff(){return eN()}startOf(){return eN()}endOf(){return eN()}},Okt={_date:zEe};function Ikt(i,e,t,n){let{controller:r,data:o,_sorted:s}=i,a=r._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&s&&o.length){let l=a._reversePixels?oze:nK;if(n){if(r._sharedOptions){let c=o[0],d=typeof c.getRange=="function"&&c.getRange(e);if(d){let u=l(o,e,t-d),h=l(o,e,t+d);return{lo:u.lo,hi:h.hi}}}}else return l(o,e,t)}return{lo:0,hi:o.length-1}}function CF(i,e,t,n,r){let o=i.getSortedVisibleDatasetMetas(),s=t[e];for(let a=0,l=o.length;a<l;++a){let{index:c,data:d}=o[a],{lo:u,hi:h}=Ikt(o[a],e,s,r);for(let f=u;f<=h;++f){let _=d[f];_.skip||n(_,c,f)}}}function Nkt(i){let e=i.indexOf("x")!==-1,t=i.indexOf("y")!==-1;return function(n,r){let o=e?Math.abs(n.x-r.x):0,s=t?Math.abs(n.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function BEe(i,e,t,n,r){let o=[];return!r&&!i.isPointInArea(e)||CF(i,t,e,function(a,l,c){!r&&!QI(a,i.chartArea,0)||a.inRange(e.x,e.y,n)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function vkt(i,e,t,n){let r=[];function o(s,a,l){let{startAngle:c,endAngle:d}=s.getProps(["startAngle","endAngle"],n),{angle:u}=CEe(s,{x:e.x,y:e.y});lF(u,c,d)&&r.push({element:s,datasetIndex:a,index:l})}return CF(i,t,e,o),r}function Dkt(i,e,t,n,r,o){let s=[],a=Nkt(t),l=Number.POSITIVE_INFINITY;function c(d,u,h){let f=d.inRange(e.x,e.y,r);if(n&&!f)return;let _=d.getCenterPoint(r);if(!(!!o||i.isPointInArea(_))&&!f)return;let T=a(e,_);T<l?(s=[{element:d,datasetIndex:u,index:h}],l=T):T===l&&s.push({element:d,datasetIndex:u,index:h})}return CF(i,t,e,c),s}function VEe(i,e,t,n,r,o){return!o&&!i.isPointInArea(e)?[]:t==="r"&&!n?vkt(i,e,t,r):Dkt(i,e,t,n,r,o)}function Lze(i,e,t,n,r){let o=[],s=t==="x"?"inXRange":"inYRange",a=!1;return CF(i,t,e,(l,c,d)=>{l[s](e[t],r)&&(o.push({element:l,datasetIndex:c,index:d}),a=a||l.inRange(e.x,e.y,r))}),n&&!a?[]:o}var ykt={evaluateInteractionItems:CF,modes:{index(i,e,t,n){let r=_C(e,i),o=t.axis||"x",s=t.includeInvisible||!1,a=t.intersect?BEe(i,r,o,n,s):VEe(i,r,o,!1,n,s),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let d=a[0].index,u=c.data[d];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:d})}),l):[]},dataset(i,e,t,n){let r=_C(e,i),o=t.axis||"xy",s=t.includeInvisible||!1,a=t.intersect?BEe(i,r,o,n,s):VEe(i,r,o,!1,n,s);if(a.length>0){let l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let d=0;d<c.length;++d)a.push({element:c[d],datasetIndex:l,index:d})}return a},point(i,e,t,n){let r=_C(e,i),o=t.axis||"xy",s=t.includeInvisible||!1;return BEe(i,r,o,n,s)},nearest(i,e,t,n){let r=_C(e,i),o=t.axis||"xy",s=t.includeInvisible||!1;return VEe(i,r,o,t.intersect,n,s)},x(i,e,t,n){let r=_C(e,i);return Lze(i,r,"x",t.intersect,n)},y(i,e,t,n){let r=_C(e,i);return Lze(i,r,"y",t.intersect,n)}}},hYe=["left","top","right","bottom"];function _F(i,e){return i.filter(t=>t.pos===e)}function wze(i,e){return i.filter(t=>hYe.indexOf(t.pos)===-1&&t.box.axis===e)}function pF(i,e){return i.sort((t,n)=>{let r=e?n:t,o=e?t:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight})}function bkt(i){let e=[],t,n,r,o,s,a;for(t=0,n=(i||[]).length;t<n;++t)r=i[t],{position:o,options:{stack:s,stackWeight:a=1}}=r,e.push({index:t,box:r,pos:o,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&o+s,stackWeight:a});return e}function Lkt(i){let e={};for(let t of i){let{stack:n,pos:r,stackWeight:o}=t;if(!n||!hYe.includes(r))continue;let s=e[n]||(e[n]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return e}function wkt(i,e){let t=Lkt(i),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e,o,s,a;for(o=0,s=i.length;o<s;++o){a=i[o];let{fullSize:l}=a.box,c=t[a.stack],d=c&&a.stackWeight/c.weight;a.horizontal?(a.width=d?d*n:l&&e.availableWidth,a.height=r):(a.width=n,a.height=d?d*r:l&&e.availableHeight)}return t}function Pkt(i){let e=bkt(i),t=pF(e.filter(c=>c.box.fullSize),!0),n=pF(_F(e,"left"),!0),r=pF(_F(e,"right")),o=pF(_F(e,"top"),!0),s=pF(_F(e,"bottom")),a=wze(e,"x"),l=wze(e,"y");return{fullSize:t,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:_F(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}function Pze(i,e,t,n){return Math.max(i[t],e[t])+Math.max(i[n],e[n])}function fYe(i,e){i.top=Math.max(i.top,e.top),i.left=Math.max(i.left,e.left),i.bottom=Math.max(i.bottom,e.bottom),i.right=Math.max(i.right,e.right)}function Mkt(i,e,t,n){let{pos:r,box:o}=t,s=i.maxPadding;if(!Io(r)){t.size&&(i[r]-=t.size);let u=n[t.stack]||{size:0,count:1};u.size=Math.max(u.size,t.horizontal?o.height:o.width),t.size=u.size/u.count,i[r]+=t.size}o.getPadding&&fYe(s,o.getPadding());let a=Math.max(0,e.outerWidth-Pze(s,i,"left","right")),l=Math.max(0,e.outerHeight-Pze(s,i,"top","bottom")),c=a!==i.w,d=l!==i.h;return i.w=a,i.h=l,t.horizontal?{same:c,other:d}:{same:d,other:c}}function kkt(i){let e=i.maxPadding;function t(n){let r=Math.max(e[n]-i[n],0);return i[n]+=r,r}i.y+=t("top"),i.x+=t("left"),t("right"),t("bottom")}function xkt(i,e){let t=e.maxPadding;function n(r){let o={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{o[s]=Math.max(e[s],t[s])}),o}return n(i?["left","right"]:["top","bottom"])}function gF(i,e,t,n){let r=[],o,s,a,l,c,d;for(o=0,s=i.length,c=0;o<s;++o){a=i[o],l=a.box,l.update(a.width||e.w,a.height||e.h,xkt(a.horizontal,e));let{same:u,other:h}=Mkt(e,t,a,n);c|=u&&r.length,d=d||h,l.fullSize||r.push(a)}return c&&gF(r,e,t,n)||d}function cK(i,e,t,n,r){i.top=t,i.left=e,i.right=e+n,i.bottom=t+r,i.width=n,i.height=r}function Mze(i,e,t,n){let r=t.padding,{x:o,y:s}=e;for(let a of i){let l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},d=a.stackWeight/c.weight||1;if(a.horizontal){let u=e.w*d,h=c.size||l.height;rF(c.start)&&(s=c.start),l.fullSize?cK(l,r.left,s,t.outerWidth-r.right-r.left,h):cK(l,e.left+c.placed,s,u,h),c.start=s,c.placed+=u,s=l.bottom}else{let u=e.h*d,h=c.size||l.width;rF(c.start)&&(o=c.start),l.fullSize?cK(l,o,r.top,h,t.outerHeight-r.bottom-r.top):cK(l,o,e.top+c.placed,h,u),c.start=o,c.placed+=u,o=l.right}}e.x=o,e.y=s}var dK={addBox(i,e){i.boxes||(i.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},i.boxes.push(e)},removeBox(i,e){let t=i.boxes?i.boxes.indexOf(e):-1;t!==-1&&i.boxes.splice(t,1)},configure(i,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(i,e,t,n){if(!i)return;let r=sg(i.options.layout.padding),o=Math.max(e-r.width,0),s=Math.max(t-r.height,0),a=Pkt(i.boxes),l=a.vertical,c=a.horizontal;Qc(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});let d=l.reduce((p,T)=>T.box.options&&T.box.options.display===!1?p:p+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:t,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/d,hBoxMaxHeight:s/2}),h=Object.assign({},r);fYe(h,sg(n));let f=Object.assign({maxPadding:h,w:o,h:s,x:r.left,y:r.top},r),_=wkt(l.concat(c),u);gF(a.fullSize,f,u,_),gF(l,f,u,_),gF(c,f,u,_)&&gF(l,f,u,_),kkt(f),Mze(a.leftAndTop,f,u,_),f.x+=f.w,f.y+=f.h,Mze(a.rightAndBottom,f,u,_),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Qc(a.chartArea,p=>{let T=p.box;Object.assign(T,i.chartArea),T.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},EK=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}},YEe=class extends EK{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}},_K="$chartjs",Fkt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},kze=i=>i===null||i==="";function Ukt(i,e){let t=i.style,n=i.getAttribute("height"),r=i.getAttribute("width");if(i[_K]={initial:{height:n,width:r,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",kze(r)){let o=xEe(i,"width");o!==void 0&&(i.width=o)}if(kze(n))if(i.style.height==="")i.height=i.width/(e||2);else{let o=xEe(i,"height");o!==void 0&&(i.height=o)}return i}var _Ye=Rze?{passive:!0}:!1;function Bkt(i,e,t){i.addEventListener(e,t,_Ye)}function Vkt(i,e,t){i.canvas.removeEventListener(e,t,_Ye)}function Gkt(i,e){let t=Fkt[i.type]||i.type,{x:n,y:r}=_C(i,e);return{type:t,chart:e,native:i,x:n!==void 0?n:null,y:r!==void 0?r:null}}function mK(i,e){for(let t of i)if(t===e||t.contains(e))return!0}function Hkt(i,e,t){let n=i.canvas,r=new MutationObserver(o=>{let s=!1;for(let a of o)s=s||mK(a.addedNodes,n),s=s&&!mK(a.removedNodes,n);s&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}function Wkt(i,e,t){let n=i.canvas,r=new MutationObserver(o=>{let s=!1;for(let a of o)s=s||mK(a.removedNodes,n),s=s&&!mK(a.addedNodes,n);s&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}var AF=new Map,xze=0;function pYe(){let i=window.devicePixelRatio;i!==xze&&(xze=i,AF.forEach((e,t)=>{t.currentDevicePixelRatio!==i&&e()}))}function jkt(i,e){AF.size||window.addEventListener("resize",pYe),AF.set(i,e)}function zkt(i){AF.delete(i),AF.size||window.removeEventListener("resize",pYe)}function Ykt(i,e,t){let n=i.canvas,r=n&&aK(n);if(!r)return;let o=IEe((a,l)=>{let c=r.clientWidth;t(a,l),c<r.clientWidth&&t()},window),s=new ResizeObserver(a=>{let l=a[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||o(c,d)});return s.observe(r),jkt(i,o),s}function GEe(i,e,t){t&&t.disconnect(),e==="resize"&&zkt(i)}function Kkt(i,e,t){let n=i.canvas,r=IEe(o=>{i.ctx!==null&&t(Gkt(o,i))},i);return Bkt(n,e,r),r}var KEe=class extends EK{acquireContext(e,t){let n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(Ukt(e,t),n):null}releaseContext(e){let t=e.canvas;if(!t[_K])return!1;let n=t[_K].initial;["height","width"].forEach(o=>{let s=n[o];pa(s)?t.removeAttribute(o):t.setAttribute(o,s)});let r=n.style||{};return Object.keys(r).forEach(o=>{t.style[o]=r[o]}),t.width=t.width,delete t[_K],!0}addEventListener(e,t,n){this.removeEventListener(e,t);let r=e.$proxies||(e.$proxies={}),s={attach:Hkt,detach:Wkt,resize:Ykt}[t]||Kkt;r[t]=s(e,t,n)}removeEventListener(e,t){let n=e.$proxies||(e.$proxies={}),r=n[t];if(!r)return;({attach:GEe,detach:GEe,resize:GEe}[t]||Vkt)(e,t,r),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return Cze(e,t,n,r)}isAttached(e){let t=aK(e);return!!(t&&t.isConnected)}};function qkt(i){return!MEe()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?YEe:KEe}var TF=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return aF(this.x)&&aF(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let r={};return e.forEach(o=>{r[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),r}};function Xkt(i,e){let t=i.options.ticks,n=Zkt(i),r=Math.min(t.maxTicksLimit||n,n),o=t.major.enabled?Jkt(e):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>r)return $kt(e,c,o,s/r),c;let d=Qkt(o,e,r);if(s>0){let u,h,f=s>1?Math.round((l-a)/(s-1)):null;for(uK(e,c,d,pa(f)?0:a-f,a),u=0,h=s-1;u<h;u++)uK(e,c,d,o[u],o[u+1]);return uK(e,c,d,l,pa(f)?e.length:l+f),c}return uK(e,c,d),c}function Zkt(i){let e=i.options.offset,t=i._tickSize(),n=i._length/t+(e?0:1),r=i._maxLength/t;return Math.floor(Math.min(n,r))}function Qkt(i,e,t){let n=e3t(i),r=e.length/t;if(!n)return Math.max(r,1);let o=tze(n);for(let s=0,a=o.length-1;s<a;s++){let l=o[s];if(l>r)return l}return Math.max(r,1)}function Jkt(i){let e=[],t,n;for(t=0,n=i.length;t<n;t++)i[t].major&&e.push(t);return e}function $kt(i,e,t,n){let r=0,o=t[0],s;for(n=Math.ceil(n),s=0;s<i.length;s++)s===o&&(e.push(i[s]),r++,o=t[r*n])}function uK(i,e,t,n,r){let o=Js(n,0),s=Math.min(Js(r,i.length),i.length),a=0,l,c,d;for(t=Math.ceil(t),r&&(l=r-n,t=l/Math.floor(l/t)),d=o;d<0;)a++,d=Math.round(o+a*t);for(c=Math.max(o,0);c<s;c++)c===d&&(e.push(i[c]),a++,d=Math.round(o+a*t))}function e3t(i){let e=i.length,t,n;if(e<2)return!1;for(n=i[0],t=1;t<e;++t)if(i[t]-i[t-1]!==n)return!1;return n}var t3t=i=>i==="left"?"right":i==="right"?"left":i,Fze=(i,e,t)=>e==="top"||e==="left"?i[e]+t:i[e]-t,Uze=(i,e)=>Math.min(e||i,i);function Bze(i,e){let t=[],n=i.length/e,r=i.length,o=0;for(;o<r;o+=n)t.push(i[Math.floor(o)]);return t}function i3t(i,e,t){let n=i.ticks.length,r=Math.min(e,n-1),o=i._startPixel,s=i._endPixel,a=1e-6,l=i.getPixelForTick(r),c;if(!(t&&(n===1?c=Math.max(l-o,s-l):e===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(r-1))/2,l+=r<e?c:-c,l<o-a||l>s+a)))return l}function n3t(i,e){Qc(i,t=>{let n=t.gc,r=n.length/2,o;if(r>e){for(o=0;o<r;++o)delete t.data[n[o]];n.splice(0,r)}})}function EF(i){return i.drawTicks?i.tickLength:0}function Vze(i,e){if(!i.display)return 0;let t=JI(i.font,e),n=sg(i.padding);return(ya(i.text)?i.text.length:1)*t.lineHeight+n.height}function r3t(i,e){return $I(i,{scale:e,type:"scale"})}function o3t(i,e,t){return $I(i,{tick:t,index:e,type:"tick"})}function s3t(i,e,t){let n=uze(i);return(t&&e!=="right"||!t&&e==="right")&&(n=t3t(n)),n}function a3t(i,e,t,n){let{top:r,left:o,bottom:s,right:a,chart:l}=i,{chartArea:c,scales:d}=l,u=0,h,f,_,p=s-r,T=a-o;if(i.isHorizontal()){if(f=NEe(n,o,a),Io(t)){let g=Object.keys(t)[0],y=t[g];_=d[g].getPixelForValue(y)+p-e}else t==="center"?_=(c.bottom+c.top)/2+p-e:_=Fze(i,t,e);h=a-o}else{if(Io(t)){let g=Object.keys(t)[0],y=t[g];f=d[g].getPixelForValue(y)-T+e}else t==="center"?f=(c.left+c.right)/2-T+e:f=Fze(i,t,e);_=NEe(n,s,r),u=t==="left"?-Hl:Hl}return{titleX:f,titleY:_,maxWidth:h,rotation:u}}var Fb=class i extends TF{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=Ah(e,Number.POSITIVE_INFINITY),t=Ah(t,Number.NEGATIVE_INFINITY),n=Ah(n,Number.POSITIVE_INFINITY),r=Ah(r,Number.NEGATIVE_INFINITY),{min:Ah(e,n),max:Ah(t,r),minDefined:jl(e),maxDefined:jl(t)}}getMinMax(e){let{min:t,max:n,minDefined:r,maxDefined:o}=this.getUserBounds(),s;if(r&&o)return{min:t,max:n};let a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)s=a[l].controller.getMinMax(this,e),r||(t=Math.min(t,s.min)),o||(n=Math.max(n,s.max));return t=o&&t>n?n:t,n=r&&t>n?t:n,{min:Ah(t,Ah(n,t)),max:Ah(n,Ah(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ea(this.options.beforeUpdate,[this])}update(e,t,n){let{beginAtZero:r,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=gze(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a<this.ticks.length;this._convertTicksToLabels(l?Bze(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=Xkt(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,n;this.isHorizontal()?(t=this.left,n=this.right):(t=this.top,n=this.bottom,e=!e),this._startPixel=t,this._endPixel=n,this._reversePixels=e,this._length=n-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Ea(this.options.afterUpdate,[this])}beforeSetDimensions(){Ea(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Ea(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Ea(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Ea(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){let t=this.options.ticks,n,r,o;for(n=0,r=e.length;n<r;n++)o=e[n],o.label=Ea(t.callback,[o.value,n,e],this)}afterTickToLabelConversion(){Ea(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Ea(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let e=this.options,t=e.ticks,n=Uze(this.ticks.length,e.ticks.maxTicksLimit),r=t.minRotation||0,o=t.maxRotation,s=r,a,l,c;if(!this._isVisible()||!t.display||r>=o||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let d=this._getLabelSizes(),u=d.widest.width,h=d.highest.height,f=sE(this.chart.width-u,0,this.maxWidth);a=e.offset?this.maxWidth/n:f/(n-1),u+6>a&&(a=f/(n-(e.offset?.5:1)),l=this.maxHeight-EF(e.grid)-t.padding-Vze(e.title,this.chart.options.font),c=Math.sqrt(u*u+h*h),s=tK(Math.min(Math.asin(sE((d.highest.height+6)/a,-1,1)),Math.asin(sE(l/c,-1,1))-Math.asin(sE(h/c,-1,1)))),s=Math.max(r,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){Ea(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ea(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){let l=Vze(r,t.options.font);if(a?(e.width=this.maxWidth,e.height=EF(o)+l):(e.height=this.maxHeight,e.width=EF(o)+l),n.display&&this.ticks.length){let{first:c,last:d,widest:u,highest:h}=this._getLabelSizes(),f=n.padding*2,_=oE(this.labelRotation),p=Math.cos(_),T=Math.sin(_);if(a){let g=n.mirror?0:T*u.width+p*h.height;e.height=Math.min(this.maxHeight,e.height+g+f)}else{let g=n.mirror?0:p*u.width+T*h.height;e.width=Math.min(this.maxWidth,e.width+g+f)}this._calculatePadding(c,d,T,p)}}this._handleMargins(),a?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){let{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){let d=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1),h=0,f=0;l?c?(h=r*e.width,f=n*t.height):(h=n*e.height,f=r*t.width):o==="start"?f=t.width:o==="end"?h=e.width:o!=="inner"&&(h=e.width/2,f=t.width/2),this.paddingLeft=Math.max((h-d+s)*this.width/(this.width-d),0),this.paddingRight=Math.max((f-u+s)*this.width/(this.width-u),0)}else{let d=t.height/2,u=e.height/2;o==="start"?(d=0,u=e.height):o==="end"&&(d=t.height,u=0),this.paddingTop=d+s,this.paddingBottom=u+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ea(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,n;for(t=0,n=e.length;t<n;t++)pa(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){let t=this.options.ticks.sampleSize,n=this.ticks;t<n.length&&(n=Bze(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,n){let{ctx:r,_longestTextCache:o}=this,s=[],a=[],l=Math.floor(t/Uze(t,n)),c=0,d=0,u,h,f,_,p,T,g,y,w,L,P;for(u=0;u<t;u+=l){if(_=e[u].label,p=this._resolveTickFontOptions(u),r.font=T=p.string,g=o[T]=o[T]||{data:{},gc:[]},y=p.lineHeight,w=L=0,!pa(_)&&!ya(_))w=nF(r,g.data,g.gc,w,_),L=y;else if(ya(_))for(h=0,f=_.length;h<f;++h)P=_[h],!pa(P)&&!ya(P)&&(w=nF(r,g.data,g.gc,w,P),L+=y);s.push(w),a.push(L),c=Math.max(w,c),d=Math.max(L,d)}n3t(o,t);let V=s.indexOf(c),K=a.indexOf(d),G=z=>({width:s[z]||0,height:a[z]||0});return{first:G(0),last:G(t-1),widest:G(V),highest:G(K),widths:s,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return nze(this._alignToPixels?fC(this.chart,t,0):t)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&e<t.length){let n=t[e];return n.$context||(n.$context=o3t(this.getContext(),e,n))}return this.$context||(this.$context=r3t(this.chart.getContext(),this))}_tickSize(){let e=this.options.ticks,t=oE(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),o=this._getLabelSizes(),s=e.autoSkipPadding||0,a=o?o.widest.width+s:0,l=o?o.highest.height+s:0;return this.isHorizontal()?l*n>a*r?a/n:l/r:l*r<a*n?l/n:a/r}_isVisible(){let e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){let t=this.axis,n=this.chart,r=this.options,{grid:o,position:s,border:a}=r,l=o.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),h=EF(o),f=[],_=a.setContext(this.getContext()),p=_.display?_.width:0,T=p/2,g=function(Ce){return fC(n,Ce,p)},y,w,L,P,V,K,G,z,oe,x,J,fe;if(s==="top")y=g(this.bottom),K=this.bottom-h,z=y-T,x=g(e.top)+T,fe=e.bottom;else if(s==="bottom")y=g(this.top),x=e.top,fe=g(e.bottom)-T,K=y+T,z=this.top+h;else if(s==="left")y=g(this.right),V=this.right-h,G=y-T,oe=g(e.left)+T,J=e.right;else if(s==="right")y=g(this.left),oe=e.left,J=g(e.right)-T,V=y+T,G=this.left+h;else if(t==="x"){if(s==="center")y=g((e.top+e.bottom)/2+.5);else if(Io(s)){let Ce=Object.keys(s)[0],Te=s[Ce];y=g(this.chart.scales[Ce].getPixelForValue(Te))}x=e.top,fe=e.bottom,K=y+T,z=K+h}else if(t==="y"){if(s==="center")y=g((e.left+e.right)/2);else if(Io(s)){let Ce=Object.keys(s)[0],Te=s[Ce];y=g(this.chart.scales[Ce].getPixelForValue(Te))}V=y-T,G=V-h,oe=e.left,J=e.right}let _e=Js(r.ticks.maxTicksLimit,u),be=Math.max(1,Math.ceil(u/_e));for(w=0;w<u;w+=be){let Ce=this.getContext(w),Te=o.setContext(Ce),Le=a.setContext(Ce),ze=Te.lineWidth,lt=Te.color,Ke=Le.dash||[],te=Le.dashOffset,ce=Te.tickWidth,Ie=Te.tickColor,Ge=Te.tickBorderDash||[],Ve=Te.tickBorderDashOffset;L=i3t(this,w,l),L!==void 0&&(P=fC(n,L,ze),c?V=G=oe=J=P:K=z=x=fe=P,f.push({tx1:V,ty1:K,tx2:G,ty2:z,x1:oe,y1:x,x2:J,y2:fe,width:ze,color:lt,borderDash:Ke,borderDashOffset:te,tickWidth:ce,tickColor:Ie,tickBorderDash:Ge,tickBorderDashOffset:Ve}))}return this._ticksLength=u,this._borderValue=y,f}_computeLabelItems(e){let t=this.axis,n=this.options,{position:r,ticks:o}=n,s=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:d,mirror:u}=o,h=EF(n.grid),f=h+d,_=u?-d:f,p=-oE(this.labelRotation),T=[],g,y,w,L,P,V,K,G,z,oe,x,J,fe="middle";if(r==="top")V=this.bottom-_,K=this._getXAxisLabelAlignment();else if(r==="bottom")V=this.top+_,K=this._getXAxisLabelAlignment();else if(r==="left"){let be=this._getYAxisLabelAlignment(h);K=be.textAlign,P=be.x}else if(r==="right"){let be=this._getYAxisLabelAlignment(h);K=be.textAlign,P=be.x}else if(t==="x"){if(r==="center")V=(e.top+e.bottom)/2+f;else if(Io(r)){let be=Object.keys(r)[0],Ce=r[be];V=this.chart.scales[be].getPixelForValue(Ce)+f}K=this._getXAxisLabelAlignment()}else if(t==="y"){if(r==="center")P=(e.left+e.right)/2-f;else if(Io(r)){let be=Object.keys(r)[0],Ce=r[be];P=this.chart.scales[be].getPixelForValue(Ce)}K=this._getYAxisLabelAlignment(h).textAlign}t==="y"&&(l==="start"?fe="top":l==="end"&&(fe="bottom"));let _e=this._getLabelSizes();for(g=0,y=a.length;g<y;++g){w=a[g],L=w.label;let be=o.setContext(this.getContext(g));G=this.getPixelForTick(g)+o.labelOffset,z=this._resolveTickFontOptions(g),oe=z.lineHeight,x=ya(L)?L.length:1;let Ce=x/2,Te=be.color,Le=be.textStrokeColor,ze=be.textStrokeWidth,lt=K;s?(P=G,K==="inner"&&(g===y-1?lt=this.options.reverse?"left":"right":g===0?lt=this.options.reverse?"right":"left":lt="center"),r==="top"?c==="near"||p!==0?J=-x*oe+oe/2:c==="center"?J=-_e.highest.height/2-Ce*oe+oe:J=-_e.highest.height+oe/2:c==="near"||p!==0?J=oe/2:c==="center"?J=_e.highest.height/2-Ce*oe:J=_e.highest.height-x*oe,u&&(J*=-1),p!==0&&!be.showLabelBackdrop&&(P+=oe/2*Math.sin(p))):(V=G,J=(1-x)*oe/2);let Ke;if(be.showLabelBackdrop){let te=sg(be.backdropPadding),ce=_e.heights[g],Ie=_e.widths[g],Ge=J-te.top,Ve=0-te.left;switch(fe){case"middle":Ge-=ce/2;break;case"bottom":Ge-=ce;break}switch(K){case"center":Ve-=Ie/2;break;case"right":Ve-=Ie;break}Ke={left:Ve,top:Ge,width:Ie+te.width,height:ce+te.height,color:be.backdropColor}}T.push({label:L,font:z,textOffset:J,options:{rotation:p,color:Te,strokeColor:Le,strokeWidth:ze,textAlign:lt,textBaseline:fe,translation:[P,V],backdrop:Ke}})}return T}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-oE(this.labelRotation))return e==="top"?"left":"right";let r="center";return t.align==="start"?r="left":t.align==="end"?r="right":t.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(e){let{position:t,ticks:{crossAlign:n,mirror:r,padding:o}}=this.options,s=this._getLabelSizes(),a=e+o,l=s.widest.width,c,d;return t==="left"?r?(d=this.right+o,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-a,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d=this.left)):t==="right"?r?(d=this.left+o,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+a,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:n,top:r,width:o,height:s}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,o,s),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let r=this.ticks.findIndex(o=>o.value===e);return r>=0?t.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){let t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),o,s,a=(l,c,d)=>{!d.width||!d.color||(n.save(),n.lineWidth=d.width,n.strokeStyle=d.color,n.setLineDash(d.borderDash||[]),n.lineDashOffset=d.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(t.display)for(o=0,s=r.length;o<s;++o){let l=r[o];t.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){let{chart:e,ctx:t,options:{border:n,grid:r}}=this,o=n.setContext(this.getContext()),s=n.display?o.width:0;if(!s)return;let a=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,d,u,h;this.isHorizontal()?(c=fC(e,this.left,s)-s/2,d=fC(e,this.right,a)+a/2,u=h=l):(u=fC(e,this.top,s)-s/2,h=fC(e,this.bottom,a)+a/2,c=d=l),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(c,u),t.lineTo(d,h),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;let n=this.ctx,r=this._computeLabelArea();r&&yEe(n,r);let o=this.getLabelItems(e);for(let s of o){let a=s.options,l=s.font,c=s.label,d=s.textOffset;uF(n,c,0,d,l,a)}r&&bEe(n)}drawTitle(){let{ctx:e,options:{position:t,title:n,reverse:r}}=this;if(!n.display)return;let o=JI(n.font),s=sg(n.padding),a=n.align,l=o.lineHeight/2;t==="bottom"||t==="center"||Io(t)?(l+=s.bottom,ya(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=s.top;let{titleX:c,titleY:d,maxWidth:u,rotation:h}=a3t(this,l,t,a);uF(e,n.text,0,0,o,{color:n.color,maxWidth:u,rotation:h,textAlign:s3t(a,t,r),textBaseline:"middle",translation:[c,d]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){let e=this.options,t=e.ticks&&e.ticks.z||0,n=Js(e.grid&&e.grid.z,-1),r=Js(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==i.prototype.draw?[{z:t,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[],o,s;for(o=0,s=t.length;o<s;++o){let a=t[o];a[n]===this.id&&(!e||a.type===e)&&r.push(a)}return r}_resolveTickFontOptions(e){let t=this.options.ticks.setContext(this.getContext(e));return JI(t.font)}_maxDigits(){let e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}},xb=class{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){let t=Object.getPrototypeOf(e),n;d3t(t)&&(n=this.register(t));let r=this.items,o=e.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in r||(r[o]=e,l3t(e,s,n),this.override&&La.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){let t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in La[r]&&(delete La[r][n],this.override&&delete hC[n])}};function l3t(i,e,t){let n=wb(Object.create(null),[t?La.get(t):{},La.get(e),i.defaults]);La.set(e,n),i.defaultRoutes&&c3t(e,i.defaultRoutes),i.descriptors&&La.describe(e,i.descriptors)}function c3t(i,e){Object.keys(e).forEach(t=>{let n=t.split("."),r=n.pop(),o=[i].concat(n).join("."),s=e[t].split("."),a=s.pop(),l=s.join(".");La.route(o,r,l,a)})}function d3t(i){return"id"in i&&"defaults"in i}var qEe=class{constructor(){this.controllers=new xb(dYe,"datasets",!0),this.elements=new xb(TF,"elements"),this.plugins=new xb(Object,"plugins"),this.scales=new xb(Fb,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,n){[...t].forEach(r=>{let o=n||this._getRegistryForType(r);n||o.isForType(r)||o===this.plugins&&r.id?this._exec(e,o,r):Qc(r,s=>{let a=n||this._getRegistryForType(s);this._exec(e,a,s)})})}_exec(e,t,n){let r=eK(e);Ea(n["before"+r],[],n),t[e](n),Ea(n["after"+r],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){let n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){let r=t.get(e);if(r===void 0)throw new Error('"'+e+'" is not a registered '+n+".");return r}},ag=new qEe,XEe=class{constructor(){this._init=[]}notify(e,t,n,r){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));let o=r?this._descriptors(e).filter(r):this._descriptors(e),s=this._notify(o,e,t,n);return t==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),s}_notify(e,t,n,r){r=r||{};for(let o of e){let s=o.plugin,a=s[n],l=[t,r,o.options];if(Ea(a,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){pa(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){let n=e&&e.config,r=Js(n.options&&n.options.plugins,{}),o=u3t(n);return r===!1&&!t?[]:f3t(e,o,r,t)}_notifyStateChanges(e){let t=this._oldCache||[],n=this._cache,r=(o,s)=>o.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(r(t,n),e,"stop"),this._notify(r(n,t),e,"start")}};function u3t(i){let e={},t=[],n=Object.keys(ag.plugins.items);for(let o=0;o<n.length;o++)t.push(ag.getPlugin(n[o]));let r=i.plugins||[];for(let o=0;o<r.length;o++){let s=r[o];t.indexOf(s)===-1&&(t.push(s),e[s.id]=!0)}return{plugins:t,localIds:e}}function h3t(i,e){return!e&&i===!1?null:i===!0?{}:i}function f3t(i,{plugins:e,localIds:t},n,r){let o=[],s=i.getContext();for(let a of e){let l=a.id,c=h3t(n[l],r);c!==null&&o.push({plugin:a,options:_3t(i.config,{plugin:a,local:t[l]},c,s)})}return o}function _3t(i,{plugin:e,local:t},n,r){let o=i.pluginScopeKeys(e),s=i.getOptionScopes(n,o);return t&&e.defaults&&s.push(e.defaults),i.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ZEe(i,e){let t=La.datasets[i]||{};return((e.datasets||{})[i]||{}).indexAxis||e.indexAxis||t.indexAxis||"x"}function p3t(i,e){let t=i;return i==="_index_"?t=e:i==="_value_"&&(t=e==="x"?"y":"x"),t}function E3t(i,e){return i===e?"_index_":"_value_"}function Gze(i){if(i==="x"||i==="y"||i==="r")return i}function m3t(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function QEe(i,...e){if(Gze(i))return i;for(let t of e){let n=t.axis||m3t(t.position)||i.length>1&&Gze(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function Hze(i,e,t){if(t[e+"AxisID"]===i)return{axis:e}}function g3t(i,e){if(e.data&&e.data.datasets){let t=e.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(t.length)return Hze(i,"x",t[0])||Hze(i,"y",t[0])}return{}}function A3t(i,e){let t=hC[i.type]||{scales:{}},n=e.scales||{},r=ZEe(i.type,e),o=Object.create(null);return Object.keys(n).forEach(s=>{let a=n[s];if(!Io(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);let l=QEe(s,a,g3t(s,i),La.scales[a.type]),c=E3t(l,r),d=t.scales||{};o[s]=Pb(Object.create(null),[{axis:l},a,d[l],d[c]])}),i.data.datasets.forEach(s=>{let a=s.type||i.type,l=s.indexAxis||ZEe(a,e),d=(hC[a]||{}).scales||{};Object.keys(d).forEach(u=>{let h=p3t(u,l),f=s[h+"AxisID"]||h;o[f]=o[f]||Object.create(null),Pb(o[f],[{axis:h},n[f],d[u]])})}),Object.keys(o).forEach(s=>{let a=o[s];Pb(a,[La.scales[a.type],La.scale])}),o}function EYe(i){let e=i.options||(i.options={});e.plugins=Js(e.plugins,{}),e.scales=A3t(i,e)}function mYe(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function T3t(i){return i=i||{},i.data=mYe(i.data),EYe(i),i}var Wze=new Map,gYe=new Set;function hK(i,e){let t=Wze.get(i);return t||(t=e(),Wze.set(i,t),gYe.add(t)),t}var mF=(i,e,t)=>{let n=Mb(e,t);n!==void 0&&i.add(n)},JEe=class{constructor(e){this._config=T3t(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=mYe(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),EYe(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return hK(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return hK(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return hK(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){let t=e.id,n=this.type;return hK(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,r=n.get(e);return(!r||t)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){let{options:r,type:o}=this,s=this._cachedScopes(e,n),a=s.get(t);if(a)return a;let l=new Set;t.forEach(d=>{e&&(l.add(e),d.forEach(u=>mF(l,e,u))),d.forEach(u=>mF(l,r,u)),d.forEach(u=>mF(l,hC[o]||{},u)),d.forEach(u=>mF(l,La,u)),d.forEach(u=>mF(l,rK,u))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),gYe.has(t)&&s.set(t,c),c}chartOptionScopes(){let{options:e,type:t}=this;return[e,hC[t]||{},La.datasets[t]||{},{type:t},La,rK]}resolveNamedOptions(e,t,n,r=[""]){let o={$shared:!0},{resolver:s,subPrefixes:a}=jze(this._resolverCache,e,r),l=s;if(C3t(s,t)){o.$shared=!1,n=fA(n)?n():n;let c=this.createResolver(e,n,a);l=ZI(s,n,c)}for(let c of t)o[c]=l[c];return o}createResolver(e,t,n=[""],r){let{resolver:o}=jze(this._resolverCache,e,n);return Io(t)?ZI(o,t,void 0,r):o}};function jze(i,e,t){let n=i.get(e);n||(n=new Map,i.set(e,n));let r=t.join(),o=n.get(r);return o||(o={resolver:sK(e,t),subPrefixes:t.filter(a=>!a.toLowerCase().includes("hover"))},n.set(r,o)),o}var S3t=i=>Io(i)&&Object.getOwnPropertyNames(i).reduce((e,t)=>e||fA(i[t]),!1);function C3t(i,e){let{isScriptable:t,isIndexable:n}=LEe(i);for(let r of e){let o=t(r),s=n(r),a=(s||o)&&i[r];if(o&&(fA(a)||S3t(a))||s&&ya(a))return!0}return!1}var R3t="4.3.0",O3t=["top","bottom","left","right","chartArea"];function zze(i,e){return i==="top"||i==="bottom"||O3t.indexOf(i)===-1&&e==="x"}function Yze(i,e){return function(t,n){return t[i]===n[i]?t[e]-n[e]:t[i]-n[i]}}function Kze(i){let e=i.chart,t=e.options.animation;e.notifyPlugins("afterRender"),Ea(t&&t.onComplete,[i],e)}function I3t(i){let e=i.chart,t=e.options.animation;Ea(t&&t.onProgress,[i],e)}function AYe(i){return MEe()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var pK={},qze=i=>{let e=AYe(i);return Object.values(pK).filter(t=>t.canvas===e).pop()};function N3t(i,e,t){let n=Object.keys(i);for(let r of n){let o=+r;if(o>=e){let s=i[r];delete i[r],(t>0||o>e)&&(i[o+t]=s)}}}function v3t(i,e,t,n){return!t||i.type==="mouseout"?null:n?e:i}function D3t(i){let{xScale:e,yScale:t}=i;if(e&&t)return{left:e.left,right:e.right,top:t.top,bottom:t.bottom}}var TK=(()=>{class i{static defaults=La;static instances=pK;static overrides=hC;static registry=ag;static version=R3t;static getChart=qze;static register(...t){ag.add(...t),Xze()}static unregister(...t){ag.remove(...t),Xze()}constructor(t,n){let r=this.config=new JEe(n),o=AYe(t),s=qze(o);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");let a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||qkt(o)),this.platform.updateConfig(r);let l=this.platform.acquireContext(o,a.aspectRatio),c=l&&l.canvas,d=c&&c.height,u=c&&c.width;if(this.id=Qje(),this.ctx=l,this.canvas=c,this.width=u,this.height=d,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new XEe,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=dze(h=>this.update(h),a.resizeDelay||0),this._dataChanges=[],pK[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}pA.listen(this,"complete",Kze),pA.listen(this,"progress",I3t),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:o,_aspectRatio:s}=this;return pa(t)?n&&s?s:o?r/o:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ag}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():kEe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return DEe(this.canvas,this.ctx),this}stop(){return pA.stop(this),this}resize(t,n){pA.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){let r=this.options,o=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(o,t,n,s),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,kEe(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),Ea(r.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let n=this.options.scales||{};Qc(n,(r,o)=>{r.id=o})}buildOrUpdateScales(){let t=this.options,n=t.scales,r=this.scales,o=Object.keys(r).reduce((a,l)=>(a[l]=!1,a),{}),s=[];n&&(s=s.concat(Object.keys(n).map(a=>{let l=n[a],c=QEe(a,l),d=c==="r",u=c==="x";return{options:l,dposition:d?"chartArea":u?"bottom":"left",dtype:d?"radialLinear":u?"category":"linear"}}))),Qc(s,a=>{let l=a.options,c=l.id,d=QEe(c,l),u=Js(l.type,a.dtype);(l.position===void 0||zze(l.position,d)!==zze(a.dposition))&&(l.position=a.dposition),o[c]=!0;let h=null;if(c in r&&r[c].type===u)h=r[c];else{let f=ag.getScale(u);h=new f({id:c,type:u,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(l,t)}),Qc(o,(a,l)=>{a||delete r[l]}),Qc(r,a=>{dK.configure(this,a,a.options),dK.addBox(this,a)})}_updateMetasets(){let t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((o,s)=>o.index-s.index),r>n){for(let o=n;o<r;++o)this._destroyDatasetMeta(o);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Yze("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,o)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){let t=[],n=this.data.datasets,r,o;for(this._removeUnreferencedMetasets(),r=0,o=n.length;r<o;r++){let s=n[r],a=this.getDatasetMeta(r),l=s.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=l,a.indexAxis=s.indexAxis||ZEe(l,this.options),a.order=s.order||0,a.index=r,a.label=""+s.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{let c=ag.getController(l),{datasetElementType:d,dataElementType:u}=La.datasets[l];Object.assign(c,{dataElementType:ag.getElement(u),datasetElementType:d&&ag.getElement(d)}),a.controller=new c(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Qc(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let n=this.config;n.update();let r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let d=0,u=this.data.datasets.length;d<u;d++){let{controller:h}=this.getDatasetMeta(d),f=!o&&s.indexOf(h)===-1;h.buildOrUpdateElements(f),a=Math.max(+h.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),o||Qc(s,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Yze("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){Qc(this.scales,t=>{dK.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!gEe(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(let{method:r,start:o,count:s}of n){let a=r==="_removeElements"?-s:s;N3t(t,o,a)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let n=this.data.datasets.length,r=s=>new Set(t.filter(a=>a[0]===s).map((a,l)=>l+","+a.splice(1).join(","))),o=r(0);for(let s=1;s<n;s++)if(!gEe(o,r(s)))return;return Array.from(o).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;dK.update(this,this.width,this.height,t);let n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Qc(this.boxes,o=>{r&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,s)=>{o._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,fA(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){let r=this.getDatasetMeta(t),o={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(r.controller._update(n),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(pA.has(this)?this.attached&&!pA.running(this)&&pA.start(this):(this.draw(),Kze({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:r,height:o}=this._resizeBeforeDraw;this._resize(r,o),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let n=this._sortedMetasets,r=[],o,s;for(o=0,s=n.length;o<s;++o){let a=n[o];(!t||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let n=this.ctx,r=t._clip,o=!r.disabled,s=D3t(t)||this.chartArea,a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(o&&yEe(n,{left:r.left===!1?0:s.left-r.left,right:r.right===!1?this.width:s.right+r.right,top:r.top===!1?0:s.top-r.top,bottom:r.bottom===!1?this.height:s.bottom+r.bottom}),t.controller.draw(),o&&bEe(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return QI(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,o){let s=ykt.modes[n];return typeof s=="function"?s(this,t,r,o):[]}getDatasetMeta(t){let n=this.data.datasets[t],r=this._metasets,o=r.filter(s=>s&&s._dataset===n).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(o)),o}getContext(){return this.$context||(this.$context=$I(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let n=this.data.datasets[t];if(!n)return!1;let r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){let r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){let o=r?"show":"hide",s=this.getDatasetMeta(t),a=s.controller._resolveAnimations(void 0,o);rF(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(s,{visible:r}),this.update(l=>l.datasetIndex===t?o:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){let n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),pA.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),DEe(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete pK[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,n=this.platform,r=(s,a)=>{n.addEventListener(this,s,a),t[s]=a},o=(s,a,l)=>{s.offsetX=a,s.offsetY=l,this._eventHandler(s)};Qc(this.options.events,s=>r(s,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,n=this.platform,r=(c,d)=>{n.addEventListener(this,c,d),t[c]=d},o=(c,d)=>{t[c]&&(n.removeEventListener(this,c,d),delete t[c])},s=(c,d)=>{this.canvas&&this.resize(c,d)},a,l=()=>{o("attach",l),this.attached=!0,this.resize(),r("resize",s),r("detach",a)};a=()=>{this.attached=!1,o("resize",s),this._stop(),this._resize(0,0),r("attach",l)},n.isAttached(this.canvas)?l():a()}unbindEvents(){Qc(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Qc(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){let o=r?"set":"remove",s,a,l,c;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+o+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){a=t[l];let d=a&&this.getDatasetMeta(a.datasetIndex).controller;d&&d[o+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let n=this._active||[],r=t.map(({datasetIndex:s,index:a})=>{let l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[a],index:a}});!mEe(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){let o=this.options.hover,s=(c,d)=>c.filter(u=>!d.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),a=s(n,t),l=r?t:s(t,n);a.length&&this.updateHoverStyle(a,o.mode,!1),l.length&&o.mode&&this.updateHoverStyle(l,o.mode,!0)}_eventHandler(t,n){let r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},o=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,o)===!1)return;let s=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,o),(s||r.changed)&&this.render(),this}_handleEvent(t,n,r){let{_active:o=[],options:s}=this,a=n,l=this._getActiveElements(t,o,r,a),c=eze(t),d=v3t(t,this._lastEvent,r,c);r&&(this._lastEvent=null,Ea(s.onHover,[t,l,this],this),c&&Ea(s.onClick,[t,l,this],this));let u=!mEe(l,o);return(u||n)&&(this._active=l,this._updateHoverStyles(l,o,n)),this._lastEvent=d,u}_getActiveElements(t,n,r,o){if(t.type==="mouseout")return[];if(!r)return n;let s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,o)}}return i})();function Xze(){return Qc(TK.instances,i=>i._plugins.invalidate())}function y3t(i,e,t){let{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e,c=r/a;i.beginPath(),i.arc(o,s,a,n-c,t+c),l>r?(c=r/l,i.arc(o,s,l,t+c,n-c,!0)):i.arc(o,s,r,t+Hl,n-Hl),i.closePath(),i.clip()}function b3t(i){return oK(i,["outerStart","outerEnd","innerStart","innerEnd"])}function L3t(i,e,t,n){let r=b3t(i.options.borderRadius),o=(t-e)/2,s=Math.min(o,n*e/2),a=l=>{let c=(t-Math.min(o,l))*n/2;return sE(l,0,Math.min(o,c))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:sE(r.innerStart,0,s),innerEnd:sE(r.innerEnd,0,s)}}function kb(i,e,t,n){return{x:t+i*Math.cos(e),y:n+i*Math.sin(e)}}function gK(i,e,t,n,r,o){let{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:d}=e,u=Math.max(e.outerRadius+n+t-c,0),h=d>0?d+n+t+c:0,f=0,_=r-l;if(n){let be=d>0?d-n:0,Ce=u>0?u-n:0,Te=(be+Ce)/2,Le=Te!==0?_*Te/(Te+n):_;f=(_-Le)/2}let p=Math.max(.001,_*u-t/Wl)/u,T=(_-p)/2,g=l+T+f,y=r-T-f,{outerStart:w,outerEnd:L,innerStart:P,innerEnd:V}=L3t(e,h,u,y-g),K=u-w,G=u-L,z=g+w/K,oe=y-L/G,x=h+P,J=h+V,fe=g+P/x,_e=y-V/J;if(i.beginPath(),o){let be=(z+oe)/2;if(i.arc(s,a,u,z,be),i.arc(s,a,u,be,oe),L>0){let ze=kb(G,oe,s,a);i.arc(ze.x,ze.y,L,oe,y+Hl)}let Ce=kb(J,y,s,a);if(i.lineTo(Ce.x,Ce.y),V>0){let ze=kb(J,_e,s,a);i.arc(ze.x,ze.y,V,y+Hl,_e+Math.PI)}let Te=(y-V/h+(g+P/h))/2;if(i.arc(s,a,h,y-V/h,Te,!0),i.arc(s,a,h,Te,g+P/h,!0),P>0){let ze=kb(x,fe,s,a);i.arc(ze.x,ze.y,P,fe+Math.PI,g-Hl)}let Le=kb(K,g,s,a);if(i.lineTo(Le.x,Le.y),w>0){let ze=kb(K,z,s,a);i.arc(ze.x,ze.y,w,g-Hl,z)}}else{i.moveTo(s,a);let be=Math.cos(z)*u+s,Ce=Math.sin(z)*u+a;i.lineTo(be,Ce);let Te=Math.cos(oe)*u+s,Le=Math.sin(oe)*u+a;i.lineTo(Te,Le)}i.closePath()}function w3t(i,e,t,n,r){let{fullCircles:o,startAngle:s,circumference:a}=e,l=e.endAngle;if(o){gK(i,e,t,n,l,r);for(let c=0;c<o;++c)i.fill();isNaN(a)||(l=s+(a%ba||ba))}return gK(i,e,t,n,l,r),i.fill(),l}function P3t(i,e,t,n,r){let{fullCircles:o,startAngle:s,circumference:a,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:u,borderDashOffset:h}=l,f=l.borderAlign==="inner";if(!c)return;i.setLineDash(u||[]),i.lineDashOffset=h,f?(i.lineWidth=c*2,i.lineJoin=d||"round"):(i.lineWidth=c,i.lineJoin=d||"bevel");let _=e.endAngle;if(o){gK(i,e,t,n,_,r);for(let p=0;p<o;++p)i.stroke();isNaN(a)||(_=s+(a%ba||ba))}f&&y3t(i,e,_),o||(gK(i,e,t,n,_,r),i.stroke())}var AK=class extends TF{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){let r=this.getProps(["x","y"],n),{angle:o,distance:s}=CEe(r,{x:e,y:t}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),h=(this.options.spacing+this.options.borderWidth)/2,_=Js(u,l-a)>=ba||lF(o,a,l),p=rze(s,c+h,d+h);return _&&p}getCenterPoint(e){let{x:t,y:n,startAngle:r,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:c}=this.options,d=(r+o)/2,u=(s+a+c+l)/2;return{x:t+Math.cos(d)*u,y:n+Math.sin(d)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:n}=this,r=(t.offset||0)/4,o=(t.spacing||0)/2,s=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=n>ba?Math.floor(n/ba):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*r,Math.sin(a)*r);let l=1-Math.sin(Math.min(Wl,n||0)),c=r*l;e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,w3t(e,this,c,o,s),P3t(e,this,c,o,s),e.restore()}};function M3t(i,e){let t=[],{bounds:r,step:o,min:s,max:a,precision:l,count:c,maxTicks:d,maxDigits:u,includeBounds:h}=i,f=o||1,_=d-1,{min:p,max:T}=e,g=!pa(s),y=!pa(a),w=!pa(c),L=(T-p)/(u+1),P=AEe((T-p)/_/f)*f,V,K,G,z;if(P<1e-14&&!g&&!y)return[{value:p},{value:T}];z=Math.ceil(T/P)-Math.floor(p/P),z>_&&(P=AEe(z*P/_/f)*f),pa(l)||(V=Math.pow(10,l),P=Math.ceil(P*V)/V),r==="ticks"?(K=Math.floor(p/P)*P,G=Math.ceil(T/P)*P):(K=p,G=T),g&&y&&o&&ize((a-s)/o,P/1e3)?(z=Math.round(Math.min((a-s)/P,d)),P=(a-s)/z,K=s,G=a):w?(K=g?s:K,G=y?a:G,z=c-1,P=(G-K)/z):(z=(G-K)/P,sF(z,Math.round(z),P/1e3)?z=Math.round(z):z=Math.ceil(z));let oe=Math.max(SEe(P),SEe(K));V=Math.pow(10,pa(l)?oe:l),K=Math.round(K*V)/V,G=Math.round(G*V)/V;let x=0;for(g&&(h&&K!==s?(t.push({value:s}),K<s&&x++,sF(Math.round((K+x*P)*V)/V,s,Zze(s,L,i))&&x++):K<s&&x++);x<z;++x){let J=Math.round((K+x*P)*V)/V;if(y&&J>a)break;t.push({value:J})}return y&&h&&G!==a?t.length&&sF(t[t.length-1].value,a,Zze(a,L,i))?t[t.length-1].value=a:t.push({value:a}):(!y||G===a)&&t.push({value:G}),t}function Zze(i,e,{horizontal:t,minRotation:n}){let r=oE(n),o=(t?Math.sin(r):Math.cos(r))||.001,s=.75*e*(""+i).length;return Math.min(e/o,s)}var Ub=class extends Fb{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return pa(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:r,max:o}=this,s=l=>r=t?r:l,a=l=>o=n?o:l;if(e){let l=oF(r),c=oF(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(r===o){let l=o===0?1:Math.abs(o*.05);a(o+l),e||s(r-l)}this.min=r,this.max=o}getTickLimit(){let e=this.options.ticks,{maxTicksLimit:t,stepSize:n}=e,r;return n?(r=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),t=t||11),t&&(r=Math.min(t,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let e=this.options,t=e.ticks,n=this.getTickLimit();n=Math.max(2,n);let r={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},o=this._range||this,s=M3t(r,o);return e.bounds==="ticks"&&TEe(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){let e=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){let r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return cF(e,this.chart.options.locale,this.options.ticks.format)}},Qze=class extends Ub{static id="linear";static defaults={ticks:{callback:dF.formatters.numeric}};determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=jl(e)?e:0,this.max=jl(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),t=e?this.width:this.height,n=oE(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}},SF=i=>Math.floor(_A(i)),tN=(i,e)=>Math.pow(10,SF(i)+e);function Jze(i){return i/Math.pow(10,SF(i))===1}function $ze(i,e,t){let n=Math.pow(10,t),r=Math.floor(i/n);return Math.ceil(e/n)-r}function k3t(i,e){let t=e-i,n=SF(t);for(;$ze(i,e,n)>10;)n++;for(;$ze(i,e,n)<10;)n--;return Math.min(n,SF(i))}function x3t(i,{min:e,max:t}){e=Ah(i.min,e);let n=[],r=SF(e),o=k3t(e,t),s=o<0?Math.pow(10,Math.abs(o)):1,a=Math.pow(10,o),l=r>o?Math.pow(10,r):0,c=Math.round((e-l)*s)/s,d=Math.floor((e-l)/a/10)*a*10,u=Math.floor((c-d)/Math.pow(10,o)),h=Ah(i.min,Math.round((l+d+u*Math.pow(10,o))*s)/s);for(;h<t;)n.push({value:h,major:Jze(h),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(o++,u=2,s=o>=0?1:s),h=Math.round((l+d+u*Math.pow(10,o))*s)/s;let f=Ah(i.max,h);return n.push({value:f,major:Jze(f),significand:u}),n}var eYe=class extends Fb{static id="logarithmic";static defaults={ticks:{callback:dF.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){let n=Ub.prototype.parse.apply(this,[e,t]);if(n===0){this._zero=!0;return}return jl(n)&&n>0?n:null}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=jl(e)?Math.max(0,e):null,this.max=jl(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!jl(this._userMin)&&(this.min=e===tN(this.min,0)?tN(this.min,-1):tN(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),n=this.min,r=this.max,o=a=>n=e?n:a,s=a=>r=t?r:a;n===r&&(n<=0?(o(1),s(10)):(o(tN(n,-1)),s(tN(r,1)))),n<=0&&o(tN(r,-1)),r<=0&&s(tN(n,1)),this.min=n,this.max=r}buildTicks(){let e=this.options,t={min:this._userMin,max:this._userMax},n=x3t(t,this);return e.bounds==="ticks"&&TEe(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return e===void 0?"0":cF(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=_A(e),this._valueRange=_A(this.max)-_A(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(_A(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}};function $Ee(i){let e=i.ticks;if(e.display&&i.display){let t=sg(e.backdropPadding);return Js(e.font&&e.font.size,La.font.size)+t.height}return 0}function F3t(i,e,t){return t=ya(t)?t:[t],{w:_ze(i,e.string,t),h:t.length*e.lineHeight}}function tYe(i,e,t,n,r){return i===n||i===r?{start:e-t/2,end:e+t/2}:i<n||i>r?{start:e-t,end:e}:{start:e,end:e+t}}function U3t(i){let e={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},t=Object.assign({},e),n=[],r=[],o=i._pointLabels.length,s=i.options.pointLabels,a=s.centerPointLabels?Wl/o:0;for(let l=0;l<o;l++){let c=s.setContext(i.getPointLabelContext(l));r[l]=c.padding;let d=i.getPointPosition(l,i.drawingArea+r[l],a),u=JI(c.font),h=F3t(i.ctx,u,i._pointLabels[l]);n[l]=h;let f=rE(i.getIndexAngle(l)+a),_=Math.round(tK(f)),p=tYe(_,d.x,h.w,0,180),T=tYe(_,d.y,h.h,90,270);B3t(t,e,f,p,T)}i.setCenterPoint(e.l-t.l,t.r-e.r,e.t-t.t,t.b-e.b),i._pointLabelItems=H3t(i,n,r)}function B3t(i,e,t,n,r){let o=Math.abs(Math.sin(t)),s=Math.abs(Math.cos(t)),a=0,l=0;n.start<e.l?(a=(e.l-n.start)/o,i.l=Math.min(i.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/o,i.r=Math.max(i.r,e.r+a)),r.start<e.t?(l=(e.t-r.start)/s,i.t=Math.min(i.t,e.t-l)):r.end>e.b&&(l=(r.end-e.b)/s,i.b=Math.max(i.b,e.b+l))}function V3t(i,e,t){let n=i.drawingArea,{extra:r,additionalAngle:o,padding:s,size:a}=t,l=i.getPointPosition(e,n+r+s,o),c=Math.round(tK(rE(l.angle+Hl))),d=z3t(l.y,a.h,c),u=W3t(c),h=j3t(l.x,a.w,u);return{visible:!0,x:l.x,y:d,textAlign:u,left:h,top:d,right:h+a.w,bottom:d+a.h}}function G3t(i,e){if(!e)return!0;let{left:t,top:n,right:r,bottom:o}=i;return!(QI({x:t,y:n},e)||QI({x:t,y:o},e)||QI({x:r,y:n},e)||QI({x:r,y:o},e))}function H3t(i,e,t){let n=[],r=i._pointLabels.length,o=i.options,{centerPointLabels:s,display:a}=o.pointLabels,l={extra:$Ee(o)/2,additionalAngle:s?Wl/r:0},c;for(let d=0;d<r;d++){l.padding=t[d],l.size=e[d];let u=V3t(i,d,l);n.push(u),a==="auto"&&(u.visible=G3t(u,c),u.visible&&(c=u))}return n}function W3t(i){return i===0||i===180?"center":i<180?"left":"right"}function j3t(i,e,t){return t==="right"?i-=e:t==="center"&&(i-=e/2),i}function z3t(i,e,t){return t===90||t===270?i-=e/2:(t>270||t<90)&&(i-=e),i}function Y3t(i,e,t){let{left:n,top:r,right:o,bottom:s}=t,{backdropColor:a}=e;if(!pa(a)){let l=mze(e.borderRadius),c=sg(e.backdropPadding);i.fillStyle=a;let d=n-c.left,u=r-c.top,h=o-n+c.width,f=s-r+c.height;Object.values(l).some(_=>_!==0)?(i.beginPath(),pze(i,{x:d,y:u,w:h,h:f,radius:l}),i.fill()):i.fillRect(d,u,h,f)}}function K3t(i,e){let{ctx:t,options:{pointLabels:n}}=i;for(let r=e-1;r>=0;r--){let o=i._pointLabelItems[r];if(!o.visible)continue;let s=n.setContext(i.getPointLabelContext(r));Y3t(t,s,o);let a=JI(s.font),{x:l,y:c,textAlign:d}=o;uF(t,i._pointLabels[r],l,c+a.lineHeight/2,a,{color:s.color,textAlign:d,textBaseline:"middle"})}}function TYe(i,e,t,n){let{ctx:r}=i;if(t)r.arc(i.xCenter,i.yCenter,e,0,ba);else{let o=i.getPointPosition(0,e);r.moveTo(o.x,o.y);for(let s=1;s<n;s++)o=i.getPointPosition(s,e),r.lineTo(o.x,o.y)}}function q3t(i,e,t,n,r){let o=i.ctx,s=e.circular,{color:a,lineWidth:l}=e;!s&&!n||!a||!l||t<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(r.dash),o.lineDashOffset=r.dashOffset,o.beginPath(),TYe(i,t,s,n),o.closePath(),o.stroke(),o.restore())}function X3t(i,e,t){return $I(i,{label:t,index:e,type:"pointLabel"})}var iYe=class extends Ub{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:dF.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let e=this._padding=sg($Ee(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!1);this.min=jl(e)&&!isNaN(e)?e:0,this.max=jl(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/$Ee(this.options))}generateTickLabels(e){Ub.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,n)=>{let r=Ea(this.options.pointLabels.callback,[t,n],this);return r||r===0?r:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){let e=this.options;e.display&&e.pointLabels.display?U3t(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}getIndexAngle(e){let t=ba/(this._pointLabels.length||1),n=this.options.startAngle||0;return rE(e*t+oE(n))}getDistanceFromCenterForValue(e){if(pa(e))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(pa(e))return NaN;let t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){let t=this._pointLabels||[];if(e>=0&&e<t.length){let n=t[e];return X3t(this.getContext(),e,n)}}getPointPosition(e,t,n=0){let r=this.getIndexAngle(e)-Hl+n;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){let{left:t,top:n,right:r,bottom:o}=this._pointLabelItems[e];return{left:t,top:n,right:r,bottom:o}}drawBackground(){let{backgroundColor:e,grid:{circular:t}}=this.options;if(e){let n=this.ctx;n.save(),n.beginPath(),TYe(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){let e=this.ctx,t=this.options,{angleLines:n,grid:r,border:o}=t,s=this._pointLabels.length,a,l,c;if(t.pointLabels.display&&K3t(this,s),r.display&&this.ticks.forEach((d,u)=>{if(u!==0){l=this.getDistanceFromCenterForValue(d.value);let h=this.getContext(u),f=r.setContext(h),_=o.setContext(h);q3t(this,f,l,s,_)}}),n.display){for(e.save(),a=s-1;a>=0;a--){let d=n.setContext(this.getPointLabelContext(a)),{color:u,lineWidth:h}=d;!h||!u||(e.lineWidth=h,e.strokeStyle=u,e.setLineDash(d.borderDash),e.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let r=this.getIndexAngle(0),o,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!t.reverse)return;let c=n.setContext(this.getContext(l)),d=JI(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=d.string,s=e.measureText(a.label).width,e.fillStyle=c.backdropColor;let u=sg(c.backdropPadding);e.fillRect(-s/2-u.left,-o-d.size/2-u.top,s+u.width,d.size+u.height)}uF(e,a.label,0,-o,d,{color:c.color})}),e.restore()}drawTitle(){}},SK={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Th=Object.keys(SK);function Z3t(i,e){return i-e}function nYe(i,e){if(pa(e))return null;let t=i._adapter,{parser:n,round:r,isoWeekday:o}=i._parseOpts,s=e;return typeof n=="function"&&(s=n(s)),jl(s)||(s=typeof n=="string"?t.parse(s,n):t.parse(s)),s===null?null:(r&&(s=r==="week"&&(aF(o)||o===!0)?t.startOf(s,"isoWeek",o):t.startOf(s,r)),+s)}function rYe(i,e,t,n){let r=Th.length;for(let o=Th.indexOf(i);o<r-1;++o){let s=SK[Th[o]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((t-e)/(a*s.size))<=n)return Th[o]}return Th[r-1]}function Q3t(i,e,t,n,r){for(let o=Th.length-1;o>=Th.indexOf(t);o--){let s=Th[o];if(SK[s].common&&i._adapter.diff(r,n,s)>=e-1)return s}return Th[t?Th.indexOf(t):0]}function J3t(i){for(let e=Th.indexOf(i)+1,t=Th.length;e<t;++e)if(SK[Th[e]].common)return Th[e]}function oYe(i,e,t){if(!t)i[e]=!0;else if(t.length){let{lo:n,hi:r}=iK(t,e),o=t[n]>=e?t[n]:t[r];i[o]=!0}}function $3t(i,e,t,n){let r=i._adapter,o=+r.startOf(e[0].value,n),s=e[e.length-1].value,a,l;for(a=o;a<=s;a=+r.add(a,1,n))l=t[a],l>=0&&(e[l].major=!0);return e}function sYe(i,e,t){let n=[],r={},o=e.length,s,a;for(s=0;s<o;++s)a=e[s],r[a]=s,n.push({value:a,major:!1});return o===0||!t?n:$3t(i,n,r,t)}var aYe=(()=>{class i extends Fb{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){let r=t.time||(t.time={}),o=this._adapter=new Okt._date(t.adapters.date);o.init(n),Pb(r.displayFormats,o.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:nYe(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,n=this._adapter,r=t.time.unit||"day",{min:o,max:s,minDefined:a,maxDefined:l}=this.getUserBounds();function c(d){!a&&!isNaN(d.min)&&(o=Math.min(o,d.min)),!l&&!isNaN(d.max)&&(s=Math.max(s,d.max))}(!a||!l)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),o=jl(o)&&!isNaN(o)?o:+n.startOf(Date.now(),r),s=jl(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(o,s-1),this.max=Math.max(o+1,s)}_getLabelBounds(){let t=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){let t=this.options,n=t.time,r=t.ticks,o=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let s=this.min,a=this.max,l=sze(o,s,a);return this._unit=n.unit||(r.autoSkip?rYe(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):Q3t(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:J3t(this._unit),this.initOffsets(o),t.reverse&&l.reverse(),sYe(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,o,s;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),t.length===1?n=1-o:n=(this.getDecimalForValue(t[1])-o)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?r=s:r=(s-this.getDecimalForValue(t[t.length-2]))/2);let a=t.length<3?.5:.25;n=sE(n,0,a),r=sE(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){let t=this._adapter,n=this.min,r=this.max,o=this.options,s=o.time,a=s.unit||rYe(s.minUnit,n,r,this._getLabelCapacity(n)),l=Js(o.ticks.stepSize,1),c=a==="week"?s.isoWeekday:!1,d=aF(c)||c===!0,u={},h=n,f,_;if(d&&(h=+t.startOf(h,"isoWeek",c)),h=+t.startOf(h,d?"day":a),t.diff(r,n,a)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+a);let p=o.ticks.source==="data"&&this.getDataTimestamps();for(f=h,_=0;f<r;f=+t.add(f,l,a),_++)oYe(u,f,p);return(f===r||o.bounds==="ticks"||_===1)&&oYe(u,f,p),Object.keys(u).sort((T,g)=>T-g).map(T=>+T)}getLabelForValue(t){let n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){let o=this.options.time.displayFormats,s=this._unit,a=n||o[s];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,o){let s=this.options,a=s.ticks.callback;if(a)return Ea(a,[t,n,r],this);let l=s.time.displayFormats,c=this._unit,d=this._majorUnit,u=c&&l[c],h=d&&l[d],f=r[n],_=d&&h&&f&&f.major;return this._adapter.format(t,o||(_?h:u))}generateTickLabels(t){let n,r,o;for(n=0,r=t.length;n<r;++n)o=t[n],o.label=this._tickFormatFunction(o.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){let n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){let n=this.options.ticks,r=this.ctx.measureText(t).width,o=oE(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(o),a=Math.sin(o),l=this._resolveTickFontOptions(0).size;return{w:r*s+l*a,h:r*a+l*s}}_getLabelCapacity(t){let n=this.options.time,r=n.displayFormats,o=r[n.unit]||r.millisecond,s=this._tickFormatFunction(t,0,sYe(this,[t],this._majorUnit),o),a=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,r=o.length;n<r;++n)t=t.concat(o[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],n,r;if(t.length)return t;let o=this.getLabels();for(n=0,r=o.length;n<r;++n)t.push(nYe(this,o[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return cze(t.sort(Z3t))}}return i})();function fK(i,e,t){let n=0,r=i.length-1,o,s,a,l;t?(e>=i[n].pos&&e<=i[r].pos&&({lo:n,hi:r}=nK(i,"pos",e)),{pos:o,time:a}=i[n],{pos:s,time:l}=i[r]):(e>=i[n].time&&e<=i[r].time&&({lo:n,hi:r}=nK(i,"time",e)),{time:o,pos:a}=i[n],{time:s,pos:l}=i[r]);let c=s-o;return c?a+(l-a)*(e-o)/c:a}var lYe=class extends aYe{static id="timeseries";static defaults=aYe.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=fK(t,this.min),this._tableRange=fK(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:t,max:n}=this,r=[],o=[],s,a,l,c,d;for(s=0,a=e.length;s<a;++s)c=e[s],c>=t&&c<=n&&r.push(c);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(s=0,a=r.length;s<a;++s)d=r[s+1],l=r[s-1],c=r[s],Math.round((d+l)/2)!==c&&o.push({time:c,pos:s/(a-1)});return o}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return t.length&&n.length?e=this.normalize(t.concat(n)):e=t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(fK(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return fK(this._table,n*this._tableRange+this._minPos,!0)}};var ext=["doughnutCanvas"];function txt(i,e){if(i&1){let t=de();O(0,"div",4),W("click",function(){let r=F(t).$implicit,o=R();return U(o.handleStatusClicked(r.category?r.category:""))}),O(1,"div",5),j(2,"canvas",6,0)(4,"span",7),I(),j(5,"span",8),I()}if(i&2){let t=e.$implicit;m(4),S("textContent",t.percentage),m(),S("textContent",t.label)}}TK.register(uYe,AK);var pC=(function(i){return i.Disabled="#e7e7e7",i.Lowest="#E0E0E0",i.Low="#fff7b8",i.MediumLow="#ffe367",i.MediumHigh="#ffc15b",i.High="#F88952",i.Highest="#5FDCB3",i})(pC||{}),SYe=(()=>{let e=class e{constructor(){this.statusbarData=[],this.statusClicked=new re,this.showClass=!0,this.doughnutCharts=[]}set content(n){this.doughnutCharts=n.toArray(),this._prepareChartData()}ngOnInit(){this._prepareChartData()}_prepareChartData(){!this.doughnutCharts||this.doughnutCharts.length===0||this.doughnutCharts.forEach((n,r)=>{new TK(n.nativeElement,{type:"doughnut",data:{datasets:[{label:this.statusbarData[r].label,data:this._getDataForChart(this.statusbarData[r].percentage),backgroundColor:[this._getColor(this.statusbarData[r].percentage),this._getColor(-1)],borderWidth:1}]},options:{cutout:"70%"}})})}_getColor(n){if(n==null)return pC.Disabled;if(n<=0)return pC.Lowest;if(n>=1&&n<25)return pC.Low;if(n>=25&&n<50)return pC.MediumLow;if(n>=50&&n<75)return pC.MediumHigh;if(n>=75&&n<100)return pC.High;if(n>=100)return pC.Highest}_getDataForChart(n){return n==null?[100,0]:[Math.max(1e-4,n),100-Math.max(1e-4,n)]}handleStatusClicked(n){this.statusClicked.emit(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["co-statusbar-popup"]],viewQuery:function(r,o){if(r&1&&qt(ext,5,ti),r&2){let s;xt(s=Ft())&&(o.content=s)}},hostVars:2,hostBindings:function(r,o){r&2&&we("co-statusbar-popup",o.showClass)},inputs:{defaultColor:"defaultColor",statusbarData:"statusbarData",parentForOverlay:"parentForOverlay"},outputs:{statusClicked:"statusClicked"},standalone:!1,decls:4,vars:1,consts:[["doughnutCanvas",""],[1,"co-statusbar-popup-wrapper",3,"overlay"],[1,"status-descriptions"],[1,"status-description"],[1,"status-description",3,"click"],[1,"statusbar-canvas-wrapper"],[1,"chart-canvas"],[1,"statusbar-inner-canvas-label",3,"textContent"],[1,"statusbar-description",3,"textContent"]],template:function(r,o){r&1&&(O(0,"div",1)(1,"div",2),Pt(2,txt,6,2,"div",3,zt),I()()),r&2&&(S("overlay",o.parentForOverlay),m(2),Mt(o.statusbarData))},dependencies:[xm],encapsulation:2});let i=e;return i})();function ixt(i,e){if(i&1&&(O(0,"div",2),j(1,"co-linear-gauge",3),I()),i&2){let t=e.$implicit,n=e.$index,r=R(2);m(),we("focused-status",r.focusedStatusIndex!==void 0&&r.focusedStatusIndex===n),S("value",t.percentage)("count",t.count?t.count:void 0)}}function nxt(i,e){if(i&1){let t=de();O(0,"div",0),W("clickOutside",function(){F(t);let r=R();return U(r.handleHidePopup())}),O(1,"div",1),Pt(2,ixt,2,4,"div",2,zt),I()()}if(i&2){let t=R();S("clickOutside",t.popupShowing),m(2),Mt(t.statusbarData)}}var CYe=(()=>{let e=class e{set statusbarData(n){this._statusbarData=n,this.adjustTooHighPercentages()}get statusbarData(){return this._statusbarData}showClass(){return!0}handleClick(n){this.handleShowPopup(n)}constructor(n,r){this._elementRef=n,this._overlayService=r,this.statusbarClick=new re,this.statusClicked=new re,this.popupShowing=!1}handleShowPopup(n){this.popupShowing||(n.preventDefault(),n.stopPropagation(),this._statusbarPopupComponentRef=this._overlayService.createComponent(SYe,{parentForOverlay:this._elementRef,statusbarData:this.statusbarData,defaultColor:this.defaultColor},{statusClicked:r=>this.handleStatusClicked(r)}),this.popupShowing=!0)}handleHidePopup(){this._overlayService.removeComponent(this._statusbarPopupComponentRef),this.popupShowing=!1}adjustTooHighPercentages(){this._statusbarData.forEach(n=>n.percentage>100?n.percentage=100:!1)}handleStatusClicked(n){this.statusClicked.emit(n)}};e.\u0275fac=function(r){return new(r||e)(Q(ti),Q(Ko))},e.\u0275cmp=Fe({type:e,selectors:[["co-statusbar"]],hostVars:2,hostBindings:function(r,o){r&1&&W("click",function(a){return o.handleClick(a)}),r&2&&we("co-statusbar",o.showClass)},inputs:{statusbarData:"statusbarData",defaultColor:"defaultColor",focusedStatusIndex:"focusedStatusIndex"},outputs:{statusbarClick:"statusbarClick",statusClicked:"statusClicked"},standalone:!1,features:[Oi([Ko])],decls:1,vars:1,consts:[[1,"co-statusbar-wrapper",3,"clickOutside"],[1,"statuses"],[1,"status"],[3,"value","count"]],template:function(r,o){r&1&&$(0,nxt,4,1,"div",0),r&2&&ee(o.statusbarData?0:-1)},dependencies:[axe,nf],encapsulation:2,data:{animation:[ao("showHidePopup",[xn("void",on({opacity:0})),xn("*",on({opacity:1})),qr("void <=> *",Gr("250ms ease-in-out"))])]}});let i=e;return i})();var CK=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,QH,sc,oc]});let i=e;return i})();var RYe=(function(){function i(){}return i})();var OYe=Be(Wi()),IYe=Be(Wc()),eme=Be(ic()),NYe=Be(Hc()),vYe=Be(Ad()),RK=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},EC=class extends OYe.BusinessObject{};RK([(0,IYe.ComplexField)(vYe.CoDocument)],EC.prototype,"image",void 0);RK([(0,eme.DateField)()],EC.prototype,"creationDate",void 0);RK([(0,eme.DateField)()],EC.prototype,"deliveryDate",void 0);RK([(0,NYe.NoDbField)()],EC.prototype,"imageData",void 0);var bYe=Be(jc());var DYe=Be(Wi()),OK=Be(Ck()),tme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},iN=class extends DYe.BusinessObject{constructor(){super(...arguments),this.colorCode=null,this.description=null,this.rgbColor=null,this.jsOnly=!1}get hexColor(){let e=this.rgbColor?Number(this.rgbColor).toString(16):"";return e.length<2&&(e="0"+e),"#"+e}getId(){return this.colorCode}};tme([(0,OK.MapProperty)("KLEUR")],iN.prototype,"colorCode",void 0);tme([(0,OK.MapProperty)("OMSCHRIJVING")],iN.prototype,"description",void 0);tme([(0,OK.MapProperty)("RGB_WAARDE")],iN.prototype,"rgbColor",void 0);var LYe=Be(Xa()),yYe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Bb=class extends EC{};yYe([(0,bYe.ComplexArray)(iN)],Bb.prototype,"colours",void 0);yYe([(0,LYe.BooleanText)("T")],Bb.prototype,"isConfigurable",void 0);var RF=class{};var wYe=Be(Fde()),IK=class{constructor(){this.active="?='Y'",this.colourCodes=[],this.paging=new wYe.PagingParameters,this.articleKindList=[]}};var Nu=class{};var mC=(()=>{let e=class e extends dh{constructor(n){super(),this._sharedConnectorService=n,this.screenModuleName="Stock"}loadConfigForModule(n,r){return B(this,null,function*(){let o=yield this._sharedConnectorService.getConfiguration(this.screenModuleName,["ALL"]);return o||Promise.resolve([])})}};e.\u0275fac=function(r){return new(r||e)(Ut(mc))},e.\u0275prov=pt({token:e,factory:e.\u0275fac});let i=e;return i})();function oxt(i,e){if(i&1&&(O(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),j(4,"co-image",4),I()(),O(5,"div",5),j(6,"label",6),le(7,"sharedLocalize"),j(8,"span",7),I()(),O(9,"div",5),j(10,"label",6),le(11,"sharedLocalize"),j(12,"span",7),I(),O(13,"div",5),j(14,"label",6),le(15,"sharedLocalize"),j(16,"span",7),I(),O(17,"div",5),j(18,"label",6),le(19,"sharedLocalize"),j(20,"span",7),I(),O(21,"div",5),j(22,"label",6),le(23,"sharedLocalize"),j(24,"span",7),I(),O(25,"div",5),j(26,"label",6),le(27,"sharedLocalize"),j(28,"span",7),I()()),i&2){let t=R();m(4),S("source",t.article.imageData),m(2),S("textContent",ge(7,13,"DESCRIPTION")),m(2),S("textContent",t.article.description),m(2),S("textContent",ge(11,15,"ARTICLE_NUMBER")),m(2),S("textContent",t.article.articleNumber),m(2),S("textContent",ge(15,17,"AMOUNT_IN_STOCK")),m(2),S("textContent",t.allTechnicalStockInformation),m(2),S("textContent",ge(19,19,"AMOUNT_AVAILABLE")),m(2),S("textContent",t.allAvailableStockInformation),m(2),S("textContent",ge(23,21,"ECONOMICAL_STOCK")),m(2),S("textContent",t.economicalStock),m(2),S("textContent",ge(27,23,"PERCEPTIBLE_STORAGE")),m(2),S("textContent",t.perceptibleStorage)}}var MYe=(()=>{let e=class e{set article(n){this._article=n,this._prepareImage()}get article(){return this._article}constructor(n){this._connectorService=n}_prepareImage(){return B(this,null,function*(){if(this._article&&this._article.image&&this._article.image.documentId){let n=yield this._connectorService.getDocumentContent(this._article.image.documentId);this._article.imageData=`data:${this._article.image.mimeType};base64,${n}`}})}};e.\u0275fac=function(r){return new(r||e)(Q(mc))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-information"]],inputs:{article:"article",articleStockState:"articleStockState",allAvailableStockInformation:"allAvailableStockInformation",allTechnicalStockInformation:"allTechnicalStockInformation",economicalStock:"economicalStock",perceptibleStorage:"perceptibleStorage"},standalone:!1,decls:1,vars:1,consts:[[1,"stock-info"],[1,"stock-info-row"],[1,"stock-info-row-image"],[1,"stock-image"],[1,"stock-image",3,"source"],[1,"stock-status"],[1,"stock-label",3,"textContent"],[1,"stock-span",3,"textContent"]],template:function(r,o){r&1&&$(0,oxt,29,25,"div",0),r&2&&ee(o.article?0:-1)},dependencies:[zH,kt],encapsulation:2});let i=e;return i})();var vu=(function(i){return i.Overview="overview",i.OverviewDetails="overviewDetails",i.StockForecast="stockForecast",i.InventoryForecast="inventoryForecast",i.InventoryDetails="inventoryDetails",i.InOrder="inOrder",i.History="history",i.HistoryStock="historyStock",i.HistoryOrderStock="historyOrderStock",i.HistoryOrderCommission="historyOrderCommission",i.HistoryOrder="historyOrder",i.HistoryAssign="historyAssign",i})(vu||{});function axt(i,e){if(i&1){let t=de();O(0,"co-list-of-values",9),vt("modelChange",function(r){F(t);let o=R();return Rt(o.selectedWarehouse,r)||(o.selectedWarehouse=r),U(r)}),W("modelChange",function(r){F(t);let o=R();return U(o.onSelectWarehouse(r))}),I()}if(i&2){let t=R();S("label",t.wareHouseLabel)("displayField","warehouseDescription")("collection",t.dataWareHouseCode)("multiselect",!1)("required",!1)("readonly",!1)("customCssClass","mini-scrollbar")("searchPlaceholder",t.wareHouseSearchLabel),Nt("model",t.selectedWarehouse)}}function lxt(i,e){if(i&1){let t=de();O(0,"div",7)(1,"co-button",10),W("click",function(){let r=F(t).$implicit,o=R();return U(o.selectTab(r))}),I()()}if(i&2){let t=e.$implicit;m(),we("active",t.active),S("label",t.title)("screenConfigurationObject",t.cfg)}}function cxt(i,e){if(i&1){let t=de();O(0,"co-button",10),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.selectSecondaryTab(r))}),I()}if(i&2){let t=e.$implicit;we("active",t.active),S("label",t.title)("screenConfigurationObject",t.cfg)}}function dxt(i,e){if(i&1&&(O(0,"div",8),Pt(1,cxt,1,4,"co-button",11,zt),I()),i&2){let t=R();m(),Mt(t.secondaryTabs)}}var kYe=(()=>{let e=class e{constructor(n){this._stockService=n,this.tabs=[],this.secondaryTabs=[],this.ActivateSecondaryTabs=!1,this.dataWareHouseCode=[],this.showWarehouseSelection=!1,this.warehouseSelected=new re,this.selectedWarehouse=new eE}selectTab(n){n.clickHandler&&n.clickHandler(),this.tabs.forEach(r=>r.active=!1),n.active=!0}selectSecondaryTab(n){n.clickHandler&&n.clickHandler(),this.secondaryTabs.forEach(r=>r.active=!1),n.active=!0}onSelectWarehouse(n){this.warehouseSelected.emit(n)}};e.\u0275fac=function(r){return new(r||e)(Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-tab-bar"]],inputs:{wareHouseLabel:"wareHouseLabel",wareHouseSearchLabel:"wareHouseSearchLabel",tabs:"tabs",secondaryTabs:"secondaryTabs",ActivateSecondaryTabs:"ActivateSecondaryTabs",dataWareHouseCode:"dataWareHouseCode",article:"article",showWarehouseSelection:"showWarehouseSelection",selectedWarehouse:"selectedWarehouse"},outputs:{warehouseSelected:"warehouseSelected"},standalone:!1,decls:10,vars:2,consts:[[1,"tab-bar-wrapper"],[1,"tab-bar-warehouse-wrapper"],[1,"stock-location-group"],[1,"stock-location-right-group"],[1,"custom-height",3,"label","displayField","collection","multiselect","required","readonly","customCssClass","searchPlaceholder","model"],[1,"tab-bar"],[1,"tab-bar-primary"],[1,"tab-primary"],[1,"secondary-tab-bar"],[1,"custom-height",3,"modelChange","label","displayField","collection","multiselect","required","readonly","customCssClass","searchPlaceholder","model"],[3,"click","label","screenConfigurationObject"],[3,"label","screenConfigurationObject","active"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),$(4,axt,1,9,"co-list-of-values",4),I()()(),O(5,"div",5)(6,"div",6),Pt(7,lxt,2,4,"div",7,zt),I(),$(9,dxt,3,0,"div",8),I()()),r&2&&(m(4),ee(o.showWarehouseSelection?4:-1),m(3),Mt(o.tabs),m(2),ee(o.ActivateSecondaryTabs?9:-1))},dependencies:[ns,ZH,Ki],encapsulation:2});let i=e;return i})();function hxt(i,e){if(i&1&&(O(0,"div",5),j(1,"span",6),I()),i&2){let t=e.row;m(),S("textContent",t.warehouseName)}}var xYe=(()=>{let e=class e{constructor(){this.sharedCfgName=vu,this.SimpleGridColumnTemplateType=Xs,this.articleStockInformation=[],this.locationClicked=new re}onLocationClick(n){this.locationClicked.emit(n.warehouseNo)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-tab"]],inputs:{articleStockInformation:"articleStockInformation"},outputs:{locationClicked:"locationClicked"},standalone:!1,decls:14,vars:33,consts:[[1,"simple-grid",3,"selectRow","data","rowsPerPage"],[3,"width","headerText","field","order"],[3,"headerText","order"],[3,"templateType"],[3,"headerText","field","order"],[1,"double-data","link"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0),W("selectRow",function(a){return o.onLocationClick(a)}),j(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),O(3,"co-simple-grid-column",2),le(4,"sharedLocalize"),Yt(5,hxt,2,1,"ng-template",3),I(),j(6,"co-simple-grid-column",4),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",4),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",4),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",4),le(13,"sharedLocalize"),I()),r&2&&(S("data",o.articleStockInformation)("rowsPerPage",20),m(),S("width",100)("headerText",ge(2,21,"WAREHOUSE"))("field","warehouseNo")("order",10),m(2),S("headerText",ge(4,23,"DESCRIPTION"))("order",11),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(7,25,"STOCK"))("field","technicalStock")("order",12),m(2),S("headerText",ge(9,27,"AVAILABLE_STOCK"))("field","availableStock")("order",13),m(2),S("headerText",ge(11,29,"ECONOMICAL_STOCK"))("field","economicalStock")("order",14),m(2),S("headerText",ge(13,31,"PERCEPTIBLE_STORAGE"))("field","perceptibleStorage")("order",15))},dependencies:[Al,$a,Ja,kt],encapsulation:2});let i=e;return i})();var Ac=(()=>{let e=class e{ngOnInit(){this.getData()}getData(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=rn({type:e,inputs:{goodId:"goodId"}});let i=e;return i})();var nN=class{};function _xt(i,e){if(i&1&&(O(0,"div",7),j(1,"co-icon",8)(2,"div",9),le(3,"sharedLocalize"),I()),i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.Cubes)),m(),S("textContent",ge(3,2,"TRANSFER_STOCK"))}}function pxt(i,e){if(i&1&&(O(0,"div",12),j(1,"span",13),le(2,"sharedLocalize"),j(3,"span",14),I()),i&2){let t=R().$implicit;m(),S("textContent",ge(2,2,"LOCATION")+": "),m(2),S("textContent",t.locationNo)}}function Ext(i,e){if(i&1&&(O(0,"div",12),j(1,"span",13),le(2,"sharedLocalize"),j(3,"span",14),I()),i&2){let t=R().$implicit;m(),S("textContent",ge(2,2,"BATCH_NO")+": "),m(2),S("textContent",t.batchNo)}}function mxt(i,e){if(i&1){let t=de();O(0,"div",11),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.articleToTransfer=r)}),O(1,"div",12),j(2,"span",13),le(3,"sharedLocalize"),j(4,"span",14),I(),$(5,pxt,4,4,"div",12),$(6,Ext,4,4,"div",12),O(7,"div",12),j(8,"span",13),le(9,"sharedLocalize"),j(10,"span",14),I(),O(11,"div",12),j(12,"span",13),le(13,"sharedLocalize"),j(14,"span",14),I()()}if(i&2){let t=e.$implicit,n=R(2);we("selected",n.articleToTransfer===t),m(2),S("textContent",ge(3,10,"STOREROOM")+": "),m(2),S("textContent",t.warehouseDescription),m(),ee(t.locationItem?5:-1),m(),ee(t.batchItem?6:-1),m(2),S("textContent",ge(9,12,"ORDER_RULE")+": "),m(2),S("textContent",t.lineId),m(2),S("textContent",ge(13,14,"AMOUNT")+": "),m(2),S("textContent",t.amountInStock)}}function gxt(i,e){if(i&1&&(O(0,"div",5),Pt(1,mxt,15,16,"div",10,zt),I()),i&2){let t=R();m(),Mt(t.articleDetails)}}function Axt(i,e){if(i&1){let t=de();O(0,"div",15)(1,"div",25)(2,"co-input-number-picker",26),le(3,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R(2);return U(o.handleInputNumberChange(r))}),I()()()}if(i&2){let t=R(2);m(2),S("readonly",t.articleToTransfer.amountTransfer===t.articleTransaction.amountInOrder&&t.articleToTransfer.targetWarehouse&&t.articleToTransfer.targetWarehouse!==t.articleToTransfer.warehouseNo)("model",t.articleToTransfer.amountTransfer)("min",1)("max",t.articleTransaction.amountInOrder)("label",ge(3,5,"QUANTITY"))}}function Txt(i,e){if(i&1){let t=de();O(0,"co-list-of-values",22),le(1,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R(2);return U(o.handleSelectedWarehouse(r))}),I()}if(i&2){let t=R(2);S("collection",t.warehouses)("displayField","warehouseDescription")("label",ge(1,3,"WAREHOUSE"))}}function Sxt(i,e){if(i&1){let t=de();O(0,"div",6),$(1,Axt,4,7,"div",15),O(2,"div",16),j(3,"span",17),O(4,"div",18),j(5,"co-icon",8),I()(),O(6,"div",19)(7,"div",20),$(8,Txt,2,5,"co-list-of-values",21),O(9,"co-list-of-values",22),le(10,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R();return U(o.handleSelectedLocation(r))}),I()(),O(11,"div",20)(12,"co-list-of-values",22),le(13,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R();return U(o.handleSelectedStockState(r))}),I()()(),O(14,"div",23)(15,"co-button",24),le(16,"sharedLocalize"),W("click",function(){F(t);let r=R();return U(r.handleStickerClick())}),I()()()}if(i&2){let t=R();m(),ee(t.articleToTransfer?1:-1),m(4),S("iconData",t.iconCacheService.getIcon(t.icons.ArrowDownRegular)),m(3),ee(t.articleToTransfer.amountTransfer===t.articleTransaction.amountInOrder?8:-1),m(),S("collection",t.stockLocations)("displayField","locationNo")("label",ge(10,11,"LOCATION")),m(3),S("collection",t.stockState)("displayField","stateDescription")("label",ge(13,13,"STOCK_STATE")),m(3),S("label",ge(16,15,"STICKER"))("iconData",t.iconCacheService.getIcon(t.icons.BarcodeReadRegular))}}function Cxt(i,e){if(i&1){let t=de();O(0,"div",27)(1,"co-button",28),W("click",function(){F(t);let r=R();return U(r.handleOkClick(r.articleToTransfer))}),I(),O(2,"co-button",29),W("click",function(){F(t);let r=R();return U(r.onCloseClick())}),I()()}if(i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.CheckDuotone)),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CrossSkinny))}}function Rxt(i,e){if(i&1){let t=de();O(0,"co-send-method-dialog",30),W("closeClick",function(){F(t);let r=R();return U(r.showSendMethodDialog=!1)}),I()}}var FYe=(()=>{let e=class e{constructor(n,r,o,s,a){this._stockService=n,this.iconCacheService=r,this._changeDetector=o,this.dialogService=s,this.dict=a,this.selectedArticleDetailsData=new Il,this.articleDetailsInformation=new Nu,this.articleStockInfo=[],this.stockLocations=[],this.handleClick=new re,this.handleStickerClicked=new re,this.updateGridData=new re,this.showStockTransferChange=new re,this.showSendMethodDialog=!1,this.warehouses=[],this.articleDetails=[],this.transferFull=!1,this.stockState=[],this.locations=[],this.stockStatus=[],this.icons=ot}ngAfterViewInit(){let n=new Nu;n.transId=this.articleTransaction.transId.toString(),n.lineId=this.articleTransaction.lineNr.toString(),this._stockService.getArticleDetails(n).then(r=>{this.articleDetails=r,r.length===1&&(this.articleToTransfer=r[0],this.getStockManagementLocations(r[0].warehouseNo),this._changeDetector.detectChanges(),this.articleToTransfer.amountTransfer=1)}),this.getStockManagementWarehouses(),this.getStockState()}onCloseClick(){this.showStockTransferChange.emit(!1)}handleOkClick(n){this.articleToTransfer.amountTransfer===this.articleTransaction.amountInOrder?(this.articleToTransfer.lineId=this.articleTransaction.lineNr,this.articleToTransfer.transId=this.articleTransaction.transId,n.selected=!0,n.entryDate=new Date,n.targetWarehouse||(n.targetWarehouse=n.warehouseNo),this._stockService.updateArticleDetails(n).then(r=>{this.handleClick.emit(),this.showStockTransferChange.emit(!1),this._stockService.getArticleDetails(this.articleDetailsInformation).then(o=>{this.articleStockInfo=o,this.updateGridData.emit(o),this.showStockTransferChange.emit(!0)})}).catch(r=>{})):this.dialogService.showError(this.dict.get("AMOUNT_TO_TRANSFER_ALLOCATED_NOT_EQUAL"))}handleSelectedWarehouse(n){this.articleToTransfer.targetWarehouse=n.warehouseNo,this.getStockManagementLocations(n.warehouseNo)}handleSelectedLocation(n){this.articleToTransfer.targetLocation=n.locationNo}handleSelectedStockState(n){this.articleToTransfer.stockStateId=n.stockStateId}handleStickerClick(){this.handleStickerClicked.emit(),this.showSendMethodDialog=!0}getStockManagementWarehouses(){this._stockService.getStockManagementWarehouses().then(n=>{this.warehouses=n})}getStockManagementLocations(n){this._stockService.getStockManagementLocations(n).then(r=>{this.stockLocations=r})}getStockState(){this._stockService.getStockState().then(n=>{this.stockState=n})}handleInputNumberChange(n){this.articleToTransfer.targetWarehouse&&this.articleToTransfer.targetWarehouse!==this.articleToTransfer.warehouseNo?this.dialogService.showError("AMOUNT_CANT_BE_CHANGED_WITH_DIFFERING_WAREHOUSES"):this.articleToTransfer.amountTransfer=n}};e.\u0275fac=function(r){return new(r||e)(Q(wr),Q(yt),Q(pn),Q(Uo),Q(kn))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-transfer-allocated"]],inputs:{stockSticker:"stockSticker",article:"article",articleToTransfer:"articleToTransfer",articleTransaction:"articleTransaction",allWarehouses:"allWarehouses",showStockTransfer:"showStockTransfer",selectedArticleDetailsData:"selectedArticleDetailsData",articleFlat:"articleFlat",articleDetailsInformation:"articleDetailsInformation",selectedWarehouse:"selectedWarehouse",selectedLocationNo:"selectedLocationNo",articleStockInfo:"articleStockInfo",stockLocations:"stockLocations"},outputs:{handleClick:"handleClick",handleStickerClicked:"handleStickerClicked",updateGridData:"updateGridData",showStockTransferChange:"showStockTransferChange"},standalone:!1,decls:10,vars:7,consts:[["headerTemplate",""],["footerTemplate",""],[1,"stock-transfer"],[3,"closeClick","showCloseIcon","modal","headerTemplate","footerTemplate"],[1,"dialog-wrapper"],[1,"stock-transfer-allocated-columns"],[1,"stock-transfer-columns"],[1,"co-dialog-header-title-wrapper"],[3,"iconData"],[1,"co-dialog-header-title",3,"textContent"],[1,"stock-transfer-allocated-column",3,"selected"],[1,"stock-transfer-allocated-column",3,"click"],[1,"row"],[1,"bold",3,"textContent"],[3,"textContent"],[1,"stock-transfer-top-column"],[1,"transfer-arrow-wrapper"],[1,"half-circle"],[1,"icon-wrapper"],[1,"stock-transfer-bottom-column"],[1,"transfer-bottom-row"],[3,"collection","displayField","label"],[3,"modelChange","collection","displayField","label"],[1,"transfer-sticker-buttons"],[3,"click","label","iconData"],[1,"transfer-quantity-allocated"],[3,"modelChange","readonly","model","min","max","label"],[1,"button-wrapper","ok-cancel-buttons"],[1,"save-button",3,"click","iconData"],[1,"cancel-button",3,"click","iconData"],[3,"closeClick"]],template:function(r,o){if(r&1){let s=de();O(0,"div",2)(1,"co-dialog",3),W("closeClick",function(){return F(s),U(o.onCloseClick())}),Yt(2,_xt,4,4,"ng-template",null,0,zi),O(4,"div",4),$(5,gxt,3,0,"div",5),$(6,Sxt,17,17,"div",6),I(),Yt(7,Cxt,3,2,"ng-template",null,1,zi),I()(),$(9,Rxt,1,0,"co-send-method-dialog")}if(r&2){let s=ln(3),a=ln(8);m(),S("showCloseIcon",!0)("modal",!0)("headerTemplate",s)("footerTemplate",a),m(4),ee(o.articleToTransfer?5:-1),m(),ee(o.articleToTransfer?6:-1),m(3),ee(o.showSendMethodDialog?9:-1)}},dependencies:[Ki,nE,ri,tS,qo,ns,kt],encapsulation:2});let i=e;return i})();function Ixt(i,e){if(i&1){let t=de();O(0,"co-stock-transfer-allocated",8),W("handleStickerClicked",function(r){F(t);let o=R();return U(o.handleStickerClicked.emit(r))})("showStockTransferChange",function(r){F(t);let o=R();return U(o.onShowStockTransferChange(r))}),I()}if(i&2){let t=R();S("articleToTransfer",t.articleDetails)("allWarehouses",t.allWarehouses)("stockLocations",t.stockLocations)("articleFlat",t.articleFlat)("articleTransaction",t.selectedRow)("showStockTransfer",t.showStockTransfer)}}function Nxt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R();return U(r.handleStockTransferClick())}),I()}if(i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.ArrowRightArrowLeftRegular))}}function vxt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R();return U(r.openSendMethodDialog(r.selectedRow))}),I()}if(i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.SolidBarcodeReadTag))}}function Dxt(i,e){if(i&1&&(O(0,"div",10),j(1,"span",11)(2,"span",11),I()),i&2){let t=e.row;m(),S("textContent",t.warehouseNumber),m(),S("textContent",t.warehouseDescription)}}function yxt(i,e){if(i&1){let t=de();O(0,"div",12)(1,"co-icon",13),W("click",function(r){let o=F(t).row,s=R();return U(s.handleTransactionNavigationClick(r,o.transactionNr.toString()))}),I(),O(2,"span",14),W("click",function(r){let o=F(t).row,s=R();return U(s.handleTransactionNavigationClick(r,o.transactionNr.toString()))}),I()()}if(i&2){let t=e.row,n=R();m(),S("iconData",n.iconCacheService.getIcon(n.icons.DetailView)),m(),S("textContent",t.type+t.transactionNr)}}function bxt(i,e){if(i&1&&(j(0,"span",11),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.transactionDate,"dd-MM-yyyy"))}}function Lxt(i,e){if(i&1&&(j(0,"span",11),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.deliveryDate,"dd-MM-yyyy"))}}function wxt(i,e){if(i&1){let t=de();O(0,"co-send-method-dialog",15),W("closeClick",function(){F(t);let r=R();return U(r.showSendMethodDialog=!1)}),I()}}var UYe=(()=>{let e=class e extends Ac{constructor(n,r,o){super(),this.iconCacheService=n,this._stockService=r,this._changeDetector=o,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.stockLocations=[],this.allWarehouses=[],this.locationClicked=new re,this.transferIconClicked=new re,this.sendMethodDialogClicked=new re,this.handleStickerClicked=new re,this.showStockTransferChange=new re,this.handleTransactionClick=new re,this.data=[],this.selectedRow=null,this.showSendMethodDialog=!1}openSendMethodDialog(n){this.showSendMethodDialog=!0,this.sendMethodDialogClicked.emit(n)}handleStockTransferClick(){this.showStockTransfer=!0}onRowSelected(n){this.selectedRow=n}onShowStockTransferChange(n){n&&this.updateData(),this.showStockTransfer=!1}getData(){return B(this,null,function*(){this.getGridData()})}handleTransactionNavigationClick(n,r){n.stopPropagation(),this.handleTransactionNavigation(r)}updateData(){this.getGridData()}handleTransactionNavigation(n){this.handleTransactionClick.emit(n)}getGridData(){let n=new nN;n.type="V",n.goodId=this.goodId.toString(),this._stockService.getArticleTransaction(n).then(r=>{this.data=r.filter(o=>o.warehouseNumber===this.warehouseNo),this._changeDetector.detectChanges()})}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr),Q(pn))},e.\u0275cmp=Fe({type:e,selectors:[["co-order-tab"]],inputs:{warehouseNo:"warehouseNo",showStockTransfer:"showStockTransfer",allWarehouses:"allWarehouses",articleFlat:"articleFlat"},outputs:{locationClicked:"locationClicked",transferIconClicked:"transferIconClicked",sendMethodDialogClicked:"sendMethodDialogClicked",handleStickerClicked:"handleStickerClicked",showStockTransferChange:"showStockTransferChange",handleTransactionClick:"handleTransactionClick"},standalone:!1,features:[pi],decls:25,vars:39,consts:[[1,"stock-transfer-wrapper"],[1,"stock-transfer-dialog",3,"articleToTransfer","allWarehouses","stockLocations","articleFlat","articleTransaction","showStockTransfer"],[1,"stock-transfer-add"],[1,"menu-icon",3,"iconData"],[1,"simple-grid",3,"selectRow","data","rowsPerPage","showAdd","inlineEdit","showGridSettings","showColumnSort","showToolbar"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[1,"stock-transfer-dialog",3,"handleStickerClicked","showStockTransferChange","articleToTransfer","allWarehouses","stockLocations","articleFlat","articleTransaction","showStockTransfer"],[1,"menu-icon",3,"click","iconData"],[1,"double-data"],[3,"textContent"],[1,"double-data","link"],[3,"click","iconData"],[3,"click","textContent"],[3,"closeClick"]],template:function(r,o){r&1&&(O(0,"div",0),$(1,Ixt,1,6,"co-stock-transfer-allocated",1),I(),O(2,"div",2),$(3,Nxt,1,1,"co-icon",3),$(4,vxt,1,1,"co-icon",3),I(),O(5,"co-simple-grid",4),W("selectRow",function(a){return o.onRowSelected(a)}),O(6,"co-simple-grid-column",5),le(7,"sharedLocalize"),Yt(8,Dxt,3,2,"ng-template",6),I(),O(9,"co-simple-grid-column",5),le(10,"sharedLocalize"),Yt(11,yxt,3,2,"ng-template",6),I(),j(12,"co-simple-grid-column",7),le(13,"sharedLocalize"),O(14,"co-simple-grid-column",5),le(15,"sharedLocalize"),Yt(16,bxt,2,4,"ng-template",6),I(),O(17,"co-simple-grid-column",5),le(18,"sharedLocalize"),Yt(19,Lxt,2,4,"ng-template",6),I(),j(20,"co-simple-grid-column",7),le(21,"sharedLocalize"),j(22,"co-simple-grid-column",7),le(23,"sharedLocalize"),I(),$(24,wxt,1,0,"co-send-method-dialog")),r&2&&(m(),ee(o.showStockTransfer?1:-1),m(2),ee(o.selectedRow?3:-1),m(),ee(o.selectedRow?4:-1),m(),S("data",o.data)("rowsPerPage",20)("showAdd",!1)("inlineEdit",!1)("showGridSettings",!1)("showColumnSort",!0)("showToolbar",!0),m(),S("headerText",ge(7,25,"WAREHOUSE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(10,27,"ORDER")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(13,29,"CUSTOMER"))("field","customerName"),m(2),S("headerText",ge(15,31,"ORDER_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(18,33,"DELIVERY_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(21,35,"AMOUNT"))("field","amountInOrder"),m(2),S("headerText",ge(23,37,"ALLOCATED"))("field","reserved"),m(2),ee(o.showSendMethodDialog?24:-1))},dependencies:[Al,$a,Ja,nE,ri,FYe,Er,kt],encapsulation:2});let i=e;return i})();function Mxt(i,e){if(i&1&&(O(0,"div",4),j(1,"span",5)(2,"span",5),I()),i&2){let t=e.row;m(),S("textContent",t.warehouseNumber),m(),S("textContent",t.warehouseDescription)}}function kxt(i,e){if(i&1){let t=de();O(0,"div",6)(1,"co-icon",7),W("click",function(r){let o=F(t).row,s=R();return U(s.handleTransactionNavigationClick(r,o.transactionNr.toString()))}),I(),O(2,"span",8),W("click",function(r){let o=F(t).row,s=R();return U(s.handleTransactionNavigationClick(r,o.transactionNr.toString()))}),I()()}if(i&2){let t=e.row,n=R();m(),S("iconData",n.iconCacheService.getIcon(n.icons.DetailView)),m(),S("textContent",t.type+t.transactionNr)}}function xxt(i,e){if(i&1&&(j(0,"span",5),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.transactionDate,"dd-MM-yyyy"))}}function Fxt(i,e){if(i&1&&(j(0,"span",5),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.deliveryDate,"dd-MM-yyyy"))}}var BYe=(()=>{let e=class e extends Ac{constructor(n,r){super(),this.iconCacheService=n,this._stockService=r,this.icons=ot,this.data=[],this.handleTransactionClick=new re,this.SimpleGridColumnTemplateType=Xs}handleTransactionNavigationClick(n,r){n.stopPropagation(),this.handleTransactionNavigation(r)}handleTransactionNavigation(n){this.handleTransactionClick.emit(n)}getData(){return B(this,null,function*(){let n=new nN;n.type="I",n.goodId=this.goodId.toString(),this._stockService.getArticleTransaction(n).then(r=>{this.data=r.filter(o=>o.warehouseNumber===this.warehouseNo)})})}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-order-stock-tab"]],inputs:{warehouseNo:"warehouseNo"},outputs:{handleTransactionClick:"handleTransactionClick"},standalone:!1,features:[pi],decls:19,vars:31,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[1,"double-data"],[3,"textContent"],[1,"double-data","link"],[3,"click","iconData"],[3,"click","textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,Mxt,3,2,"ng-template",2),I(),O(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),Yt(6,kxt,3,2,"ng-template",2),I(),O(7,"co-simple-grid-column",1),le(8,"sharedLocalize"),Yt(9,xxt,2,4,"ng-template",2),I(),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",3),le(13,"sharedLocalize"),j(14,"co-simple-grid-column",3),le(15,"sharedLocalize"),O(16,"co-simple-grid-column",1),le(17,"sharedLocalize"),Yt(18,Fxt,2,4,"ng-template",2),I()()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,17,"WAREHOUSE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,19,"PURCHASE_ORDER_NR"))("field","transactionNr"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(8,21,"DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(11,23,"AMOUNT"))("field","amountInOrder"),m(2),S("headerText",ge(13,25,"RESERVED"))("field","reserved"),m(2),S("headerText",ge(15,27,"FREE_STOCK"))("field","InOrderForStock"),m(2),S("headerText",ge(17,29,"DELIVERY_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content))},dependencies:[Al,$a,Ja,ri,Er,kt],encapsulation:2});let i=e;return i})();var QYe=Be(nme());var VYe=Be(MD()),GYe=Be(d7()),HYe=Be(nme());var Vxt=i=>[i],WYe=(()=>{let e=class e{showClass(){return!0}constructor(n){this.sharedConnectorService=n,this.sendMethodType=VYe.SendMethodType,this.printerList=[],this.printLayouts=[],this.layoutCode=GYe.LayoutCode.StockSticker,this.reportDocumentPrintRequest=new HYe.PrintStockStickersRequest,this.close=new re}ngOnInit(){return B(this,null,function*(){yield this._prepareData()})}handleSendMethodOkClick(n){return B(this,null,function*(){this.close.emit(),yield this.print(n)})}print(n){return B(this,null,function*(){n&&typeof n!="string"?yield this.printDocument(this.reportDocumentPrintRequest,n.localPrint):yield this.printDocument(this.reportDocumentPrintRequest,!1)})}printDocument(n,r){return B(this,null,function*(){yield this.sharedConnectorService.printStockStickers(n)})}_prepareData(){return B(this,null,function*(){yield this._getPrinters(),yield this._getPrintLayouts()})}_getPrinters(){return B(this,null,function*(){this.printerList=yield this.sharedConnectorService.getAllPrinters()})}_getPrintLayouts(){return B(this,null,function*(){this.printLayouts=yield this.sharedConnectorService.getStockStickerPrintLayouts()})}};e.\u0275fac=function(r){return new(r||e)(Q(mc))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-print-sticker"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-stock-transfer-print-sticker",o.showClass)},inputs:{reportDocumentPrintRequest:"reportDocumentPrintRequest"},outputs:{close:"close"},standalone:!1,decls:1,vars:9,consts:[[3,"reportingDocumentPrintRequestChange","closeClick","okClick","headerTitle","printerList","defaultSendMethod","visibleMethods","printLayouts","layoutCode","reportingDocumentPrintRequest"]],template:function(r,o){r&1&&(O(0,"co-send-method-dialog",0),vt("reportingDocumentPrintRequestChange",function(a){return Rt(o.reportDocumentPrintRequest,a)||(o.reportDocumentPrintRequest=a),a}),W("closeClick",function(){return o.close.emit()})("okClick",function(a){return o.handleSendMethodOkClick(a)}),I()),r&2&&(S("headerTitle","Verzendmethode")("printerList",o.printerList)("defaultSendMethod",o.defaultSendMethod)("visibleMethods",Ga(7,Vxt,o.sendMethodType.Print))("printLayouts",o.printLayouts)("layoutCode",o.layoutCode),Nt("reportingDocumentPrintRequest",o.reportDocumentPrintRequest))},dependencies:[nE],encapsulation:2});let i=e;return i})();var qYe=Be(ome());var jYe=Be(MD()),zYe=Be(d7()),YYe=Be(ome());var Wxt=i=>[i],KYe=(()=>{let e=class e{showClass(){return!0}constructor(n){this.sharedConnectorService=n,this.sendMethodType=jYe.SendMethodType,this.printerList=[],this.printLayouts=[],this.layoutCode=zYe.LayoutCode.TransferSticker,this.reportDocumentPrintRequest=new YYe.PrintTransferStickersRequest,this.close=new re}ngOnInit(){return B(this,null,function*(){yield this._prepareData()})}handleSendMethodOkClick(n){return B(this,null,function*(){this.close.emit(),yield this.print(n)})}print(n){return B(this,null,function*(){n&&typeof n!="string"?yield this.printDocument(this.reportDocumentPrintRequest,n.localPrint):yield this.printDocument(this.reportDocumentPrintRequest,!1)})}printDocument(n,r){return B(this,null,function*(){yield this.sharedConnectorService.printTransferStickers(n)})}_prepareData(){return B(this,null,function*(){yield this._getPrinters(),yield this._getPrintLayouts()})}_getPrinters(){return B(this,null,function*(){this.printerList=yield this.sharedConnectorService.getAllPrinters()})}_getPrintLayouts(){return B(this,null,function*(){this.printLayouts=yield this.sharedConnectorService.getTransferStickerPrintLayouts()})}};e.\u0275fac=function(r){return new(r||e)(Q(mc))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-transfer-print-sticker"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-stock-transfer-print-sticker",o.showClass)},inputs:{reportDocumentPrintRequest:"reportDocumentPrintRequest"},outputs:{close:"close"},standalone:!1,decls:1,vars:9,consts:[[3,"reportingDocumentPrintRequestChange","closeClick","okClick","headerTitle","printerList","defaultSendMethod","visibleMethods","printLayouts","layoutCode","reportingDocumentPrintRequest"]],template:function(r,o){r&1&&(O(0,"co-send-method-dialog",0),vt("reportingDocumentPrintRequestChange",function(a){return Rt(o.reportDocumentPrintRequest,a)||(o.reportDocumentPrintRequest=a),a}),W("closeClick",function(){return o.close.emit()})("okClick",function(a){return o.handleSendMethodOkClick(a)}),I()),r&2&&(S("headerTitle","Verzendmethode")("printerList",o.printerList)("defaultSendMethod",o.defaultSendMethod)("visibleMethods",Ga(7,Wxt,o.sendMethodType.Print))("printLayouts",o.printLayouts)("layoutCode",o.layoutCode),Nt("reportingDocumentPrintRequest",o.reportDocumentPrintRequest))},dependencies:[nE],encapsulation:2});let i=e;return i})();function zxt(i,e){if(i&1&&(O(0,"div",16),j(1,"co-icon",10)(2,"div",17),le(3,"sharedLocalize"),I()),i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.Cubes)),m(),S("textContent",ge(3,2,"TRANSFER_STOCK"))}}function Yxt(i,e){if(i&1&&(O(0,"div",19),j(1,"label",20),le(2,"sharedLocalize"),j(3,"span",21),I()),i&2){let t=R(2);m(),S("textContent",ge(2,2,"BATCH_NO")),m(2),S("textContent",t.articleToTransfer.batchNo)}}function Kxt(i,e){if(i&1&&(O(0,"div",19),j(1,"label",20),le(2,"sharedLocalize"),j(3,"span",21),I()),i&2){let t=R(2);m(),S("textContent",ge(2,2,"SERIE_NO")),m(2),S("textContent",t.articleToTransfer.serialNo)}}function qxt(i,e){if(i&1&&(j(0,"span",24),le(1,"sharedLocalize")),i&2){let t=R(2);S("textContent",t.articleToTransfer.amountInStockFree+ge(1,1," AVAILABLE"))}}function Xxt(i,e){if(i&1){let t=de();O(0,"div",6)(1,"div",18)(2,"div",19),j(3,"label",20),le(4,"sharedLocalize"),j(5,"span",21),I(),O(6,"div",19),j(7,"label",20),le(8,"sharedLocalize"),j(9,"span",21),I(),$(10,Yxt,4,4,"div",19),$(11,Kxt,4,4,"div",19),I(),O(12,"div",22)(13,"co-input-number-picker",23),le(14,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R();return Rt(o.articleToTransfer.amountTransfer,r)||(o.articleToTransfer.amountTransfer=r),U(r)}),I(),$(15,qxt,2,3,"span",24),I()()}if(i&2){let t=R();m(3),S("textContent",ge(4,10,"WAREHOUSE")),m(2),S("textContent",t.articleToTransfer.warehouseDescription),m(2),S("textContent",ge(8,12,"LOCATION")),m(2),S("textContent",t.articleToTransfer.locationNo),m(),ee(t.articleToTransfer!=null&&t.articleToTransfer.batchNo?10:-1),m(),ee(t.articleToTransfer!=null&&t.articleToTransfer.serialNo?11:-1),m(2),Nt("model",t.articleToTransfer.amountTransfer),S("min",1)("label",ge(14,14,"QUANTITY")),m(2),ee(t.transferFull?15:-1)}}function Zxt(i,e){if(i&1){let t=de();O(0,"div",25)(1,"co-button",26),W("click",function(){F(t);let r=R();return U(r.handleOkClick(r.articleToTransfer))}),I(),O(2,"co-button",27),W("click",function(){F(t);let r=R();return U(r.onCloseClick())}),I()()}if(i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.CheckDuotone)),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CrossSkinny))}}function Qxt(i,e){if(i&1){let t=de();O(0,"co-stock-transfer-print-sticker",28),W("close",function(){F(t);let r=R();return U(r.showSendMethodDialog=!1)}),I()}}var XYe=(()=>{let e=class e{constructor(n,r){this._stockService=n,this.iconCacheService=r,this.icons=ot,this.selectedArticleDetailsData=new Il,this.articleDetailsInformation=new Nu,this.articleStockInfo=[],this.stockLocations=[],this.handleStickerClicked=new re,this.handleTogglePopup=new re,this.showSendMethodDialog=!1,this.transferFull=!1,this.warehouses=[],this.stockState=[],this.locations=[],this.transferStickerPrintRequest=new qYe.PrintTransferStickersRequest}ngAfterViewInit(){this.getStockManagementWarehouses(),this.getStockState()}handleOkClick(n){return B(this,null,function*(){this.articleToTransfer.amountTransfer>this.articleToTransfer.amountInStockFree?this.transferFull=!0:(n.selected=!0,n.entryDate=new Date,(yield this._stockService.updateArticleDetails(n))&&this.handleTogglePopup.emit())})}onCloseClick(){this.handleTogglePopup.emit()}handleSelectedWarehouse(n){this.articleToTransfer.targetWarehouse=n.warehouseNo,this.selectedWarehouse=n,this.getStockManagementLocations()}handleSelectedLocation(n){this.articleToTransfer.targetLocation=n.locationNo}handleSelectedStockState(n){this.articleToTransfer.stockStateId=n.stockStateId}handleStickerClick(){this._buildStickerPrintRequest(),this.handleStickerClicked.emit(),this.showSendMethodDialog=!0}getStockManagementWarehouses(){this._stockService.getStockManagementWarehouses().then(n=>{this.warehouses=n})}getStockManagementLocations(){this._stockService.getStockManagementLocations(this.selectedWarehouse.warehouseNo).then(n=>{this.stockLocations=n})}getStockState(){this._stockService.getStockState().then(n=>{this.stockState=n})}_buildStickerPrintRequest(){this.transferStickerPrintRequest.goodId=this.articleFlat.goodId,this.transferStickerPrintRequest.amount=this.articleToTransfer.amountTransfer,this.transferStickerPrintRequest.sourceWarehouse=this.articleToTransfer.warehouseNo,this.transferStickerPrintRequest.sourceLocation=this.articleToTransfer.locationNo,this.transferStickerPrintRequest.targetWarehouse=this.articleToTransfer.targetWarehouse,this.transferStickerPrintRequest.targetLocation=this.articleToTransfer.targetLocation,this.transferStickerPrintRequest.batch=this.articleToTransfer.batchNo,this.transferStickerPrintRequest.serial=this.articleToTransfer.serialNo,this.transferStickerPrintRequest.lineId=this.articleToTransfer.lineId}};e.\u0275fac=function(r){return new(r||e)(Q(wr),Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-transfer"]],inputs:{stockSticker:"stockSticker",article:"article",articleToTransfer:"articleToTransfer",allWarehouses:"allWarehouses",selectedArticleDetailsData:"selectedArticleDetailsData",articleFlat:"articleFlat",articleDetailsInformation:"articleDetailsInformation",selectedWarehouse:"selectedWarehouse",selectedLocationNo:"selectedLocationNo",articleStockInfo:"articleStockInfo",stockLocations:"stockLocations"},outputs:{handleStickerClicked:"handleStickerClicked",handleTogglePopup:"handleTogglePopup"},standalone:!1,decls:26,vars:26,consts:[["headerTemplate",""],["footerTemplate",""],[1,"stock-transfer"],[3,"closeClick","showCloseIcon","modal","headerTemplate","footerTemplate"],[1,"dialog-wrapper"],[1,"stock-transfer-columns"],[1,"stock-transfer-top-column"],[1,"transfer-arrow-wrapper"],[1,"half-circle"],[1,"icon-wrapper"],[3,"iconData"],[1,"stock-transfer-bottom-column"],[1,"transfer-bottom-row"],[3,"modelChange","collection","displayField","label"],[1,"transfer-sticker-buttons"],[3,"click","label","iconData"],[1,"co-dialog-header-title-wrapper"],[1,"co-dialog-header-title",3,"textContent"],[1,"transfer-items"],[1,"transfer-item"],[1,"item-label",3,"textContent"],[1,"item-value",3,"textContent"],[1,"transfer-quantity"],[3,"modelChange","model","min","label"],[3,"textContent"],[1,"button-wrapper","ok-cancel-buttons"],[1,"save-button",3,"click","iconData"],[1,"cancel-button",3,"click","iconData"],[3,"close"]],template:function(r,o){if(r&1){let s=de();O(0,"div",2)(1,"co-dialog",3),W("closeClick",function(){return F(s),U(o.onCloseClick())}),Yt(2,zxt,4,4,"ng-template",null,0,zi),O(4,"div",4)(5,"div",5),$(6,Xxt,16,16,"div",6),O(7,"div",7),j(8,"span",8),O(9,"div",9),j(10,"co-icon",10),I()(),O(11,"div",11)(12,"div",12)(13,"co-list-of-values",13),le(14,"sharedLocalize"),W("modelChange",function(l){return F(s),U(o.handleSelectedWarehouse(l))}),I(),O(15,"co-list-of-values",13),le(16,"sharedLocalize"),W("modelChange",function(l){return F(s),U(o.handleSelectedLocation(l))}),I()(),O(17,"div",12)(18,"co-list-of-values",13),le(19,"sharedLocalize"),W("modelChange",function(l){return F(s),U(o.handleSelectedStockState(l))}),I()()(),O(20,"div",14)(21,"co-button",15),le(22,"sharedLocalize"),W("click",function(){return F(s),U(o.handleStickerClick())}),I()()()(),Yt(23,Zxt,3,2,"ng-template",null,1,zi),I()(),$(25,Qxt,1,0,"co-stock-transfer-print-sticker")}if(r&2){let s=ln(3),a=ln(24);m(),S("showCloseIcon",!0)("modal",!0)("headerTemplate",s)("footerTemplate",a),m(5),ee(o.articleToTransfer?6:-1),m(4),S("iconData",o.iconCacheService.getIcon(o.icons.ArrowDownRegular)),m(3),S("collection",o.warehouses)("displayField","warehouseDescription")("label",ge(14,18,"WAREHOUSE")),m(2),S("collection",o.stockLocations)("displayField","locationNo")("label",ge(16,20,"LOCATION")),m(3),S("collection",o.stockState)("displayField","stateDescription")("label",ge(19,22,"STOCK_STATE")),m(3),S("label",ge(22,24,"STICKER"))("iconData",o.iconCacheService.getIcon(o.icons.BarcodeReadRegular)),m(4),ee(o.showSendMethodDialog?25:-1)}},dependencies:[Ki,ri,tS,qo,ns,KYe,kt],encapsulation:2});let i=e;return i})();function $xt(i,e){if(i&1&&(O(0,"div",5),j(1,"co-icon",6)(2,"div",7),le(3,"sharedLocalize"),I()),i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.Cubes)),m(),S("textContent",ge(3,2,"CONFIRM_STOCK_CHANGE"))}}function eFt(i,e){i&1&&(O(0,"div",4),j(1,"span",8),le(2,"sharedLocalize"),I()),i&2&&(m(),S("textContent",ge(2,1,"DELETE_STOCK_LINE?")))}function tFt(i,e){i&1&&(j(0,"span",8),le(1,"sharedLocalize")),i&2&&S("textContent",ge(1,1,"NEW_STOCK_LINE"))}function iFt(i,e){i&1&&(j(0,"span",8),le(1,"sharedLocalize")),i&2&&S("textContent",ge(1,1,"CHANGE_STOCK_LINE"))}function nFt(i,e){if(i&1){let t=de();O(0,"co-input-text",17),le(1,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R(2);return Rt(o.selectedArticleDetailsData.serialNo,r)||(o.selectedArticleDetailsData.serialNo=r),U(r)}),I()}if(i&2){let t=R(2);Nt("model",t.selectedArticleDetailsData.serialNo),S("placeholder",ge(1,4,"SERIAL_NO"))("required",!0)("readonly",!1)}}function rFt(i,e){i&1&&j(0,"span",13)}function oFt(i,e){if(i&1){let t=de();O(0,"co-list-of-values",19),le(1,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R(3);return U(o.locationChanged(r))}),I()}if(i&2){let t=R(3);S("model",t.locationForNumber(t.selectedArticleDetailsData.locationNo))("collection",t.stockLocations)("displayField","locationNo")("label",ge(1,5,"LOCATION"))("required",!0)}}function sFt(i,e){if(i&1){let t=de();O(0,"co-input-text",17),le(1,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R(3);return Rt(o.selectedArticleDetailsData.batchNo,r)||(o.selectedArticleDetailsData.batchNo=r),U(r)}),I()}if(i&2){let t=R(3);Nt("model",t.selectedArticleDetailsData.batchNo),S("placeholder",ge(1,4,"BATCH"))("required",!0)("readonly",!1)}}function aFt(i,e){i&1&&j(0,"span",13)}function lFt(i,e){if(i&1&&(O(0,"div",10),$(1,oFt,2,7,"co-list-of-values",18),$(2,sFt,2,6,"co-input-text",12)(3,aFt,1,0,"span",13),I()),i&2){let t=R(2);m(),ee(t.articleFlat.locationRegistered?1:-1),m(),ee(t.articleFlat.batch?2:3)}}function cFt(i,e){if(i&1&&(O(0,"div",10),j(1,"co-input-text",11),le(2,"currency"),le(3,"sharedLocalize"),I()),i&2){let t=R(2);m(),S("model",Wn(2,3,t.articleExtended==null?null:t.articleExtended.purchasePrice,"EUR"))("placeholder",ge(3,6,"PURCHASE_PRICE"))("readonly",!1)}}function dFt(i,e){if(i&1){let t=de();O(0,"co-input-date",20),le(1,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R(2);return Rt(o.entryDate,r)||(o.entryDate=r),U(r)}),I()}if(i&2){let t=R(2);Nt("model",t.entryDate),S("placeholder",ge(1,3,"DATE"))("readonly",!1)}}function uFt(i,e){if(i&1){let t=de();O(0,"div",4)(1,"div",9),$(2,tFt,2,3,"span",8),$(3,iFt,2,3,"span",8),I(),O(4,"div",10),j(5,"co-input-text",11),le(6,"sharedLocalize"),$(7,nFt,2,6,"co-input-text",12)(8,rFt,1,0,"span",13),I(),$(9,lFt,4,2,"div",10),O(10,"div",10),$(11,cFt,4,8,"div",10),$(12,dFt,2,5,"co-input-date",11),I(),O(13,"div",10)(14,"co-input-number-picker",14),le(15,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R();return Rt(o.selectedArticleDetailsData.amountInStock,r)||(o.selectedArticleDetailsData.amountInStock=r),U(r)}),W("modelChange",function(r){F(t);let o=R();return U(o.amountInStockChanged(r))}),I(),O(16,"div",15)(17,"co-list-of-values",16),le(18,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R();return U(o.handleSelectedStockState(r))}),I()()()()}if(i&2){let t=R();m(2),ee(t.newStockLine?2:-1),m(),ee(t.newStockLine?-1:3),m(2),S("model",t.selectedWarehouse==null?null:t.selectedWarehouse.warehouseDescription)("placeholder",ge(6,15,"WAREHOUSE"))("readonly",!0),m(2),ee(t.selectedArticleDetailsData.serialNoItem?7:8),m(2),ee(t.articleFlat?9:-1),m(2),ee(t.articleStockInfo.length>0?11:-1),m(),ee(t.selectedArticleDetailsData?12:-1),m(2),Nt("model",t.selectedArticleDetailsData.amountInStock),S("label",ge(15,17,"STOCK"))("min",0),m(3),S("collection",t.stockState)("displayField","stateDescription")("label",ge(18,19,"STOCK_STATE"))}}function hFt(i,e){i&1&&(j(0,"span",22),le(1,"sharedLocalize")),i&2&&S("textContent",ge(1,1,"STOCK_BELOW_ZERO_TEXT"))}function fFt(i,e){if(i&1&&(j(0,"span",22),le(1,"sharedLocalize")),i&2){let t=R(2);S("textContent",ge(1,1,t.validationMessage))}}function _Ft(i,e){if(i&1){let t=de();O(0,"div",21),$(1,hFt,2,3,"span",22),$(2,fFt,2,3,"span",22),O(3,"co-button",23),W("click",function(){F(t);let r=R();return U(r.handleOkClick())}),I(),O(4,"co-button",24),W("click",function(){F(t);let r=R();return U(r.togglePopup())}),I()()}if(i&2){let t=R();m(),ee(t.stockBelow?1:-1),m(),ee(t.validationMessage?2:-1),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CheckDuotone))("disabled",t.disabled),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CrossSkinny))}}var ZYe=(()=>{let e=class e{set setSelectedArticleDetailsData(n){this.selectedArticleDetailsData=n,n&&(n.entryDate&&(this.entryDate=n.entryDate),this.disabled=n.stockStateId&&n.stockStateRemark?.length<=1)}set setArticleFlat(n){this.articleFlat=n}set selectedLocationNo(n){this._selectedLocationNo=n}get selectedLocationNo(){return this._selectedLocationNo}set setArticleStockInfo(n){this.articleStockInfo=n}constructor(n,r){this.iconCacheService=n,this._stockService=r,this.icons=ot,this.selectedArticleDetailsData=new Il,this.entryDate=new Date,this.disabled=!1,this.articleStockInfo=[],this.articleFlat=new Ym,this.stockState=[],this.editingRow=!1,this.newStockLine=!1,this.deleteStockLine=!1,this.articleDetailsInformation=new Nu,this.selectedWarehouse=new eE,this.togglePopupEvent=new re,this.saveEvent=new re,this.stockLocations=[],this.stockStatus=[],this.stockBelow=!1,this.validationMessage=""}ngOnInit(){this._stockService.getStockState().then(n=>{this.stockState=n})}amountInStockChanged(n){this.selectedArticleDetailsData.amountInStock=n}handleOkClick(){return B(this,null,function*(){this.validationMessage="",this.stockBelow=!1;let n=this.validateForm();if(n){this.validationMessage=n;return}if(this.selectedArticleDetailsData.stockAssigned>this.selectedArticleDetailsData.amountInStock){this.stockBelow=!0;return}this.handleStockChange(),yield this._stockService.updateArticleDetails(this.selectedArticleDetailsData),this.togglePopup()})}togglePopup(){this.stockBelow=!1,this.togglePopupEvent.emit()}locationForNumber(n){return this.stockLocations?.find(r=>r.locationNo===n)?this.stockLocations?.find(r=>r.locationNo===n):""}locationChanged(n){this.selectedLocationNo=n.locationNo,this.selectedArticleDetailsData.locationNo=n.locationNo}handleStockChange(){this.selectedArticleDetailsData.selected=!0,this.articleFlat.goodId?this.selectedArticleDetailsData.goodId=this.articleFlat.goodId:this.articleDetailsInformation.goodId&&(this.selectedArticleDetailsData.goodId=parseInt(this.articleDetailsInformation.goodId)),this.selectedArticleDetailsData.entryDate=new Date,this.deleteStockLine?(this.selectedWarehouse.warehouseNo=this.selectedArticleDetailsData.warehouseNo,this.selectedArticleDetailsData.amountInStock=0):(this.selectedArticleDetailsData.warehouseNo=this.selectedWarehouse.warehouseNo,this.selectedLocationNo&&this.articleFlat?.locationRegistered&&(this.selectedArticleDetailsData.locationNo=this.selectedLocationNo?.toString()))}handleSelectedStockState(n){this.selectedArticleDetailsData.stockStateId=n.stockStateId}validateForm(){return this.deleteStockLine?null:this.selectedWarehouse?.warehouseNo===null||this.selectedWarehouse?.warehouseNo===void 0?"WAREHOUSE_IS_REQUIRED":this.selectedArticleDetailsData.locationItem&&!this.selectedArticleDetailsData?.locationNo?.trim()?"LOCATION_IS_REQUIRED":this.selectedArticleDetailsData.serialNoItem&&!this.selectedArticleDetailsData?.serialNo?.trim()?"SERIAL_NR_IS_REQUIRED":this.selectedArticleDetailsData.batchItem&&!this.selectedArticleDetailsData?.batchNo?.trim()?"BATCH_IS_REQUIRED":this.selectedArticleDetailsData?.amountInStock===null||this.selectedArticleDetailsData?.amountInStock===void 0?"STOCK_IS_REQUIRED":null}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-location-popup"]],inputs:{articleExtended:"articleExtended",editingRow:"editingRow",newStockLine:"newStockLine",deleteStockLine:"deleteStockLine",setSelectedArticleDetailsData:"setSelectedArticleDetailsData",setArticleFlat:"setArticleFlat",articleDetailsInformation:"articleDetailsInformation",selectedWarehouse:"selectedWarehouse",selectedLocationNo:"selectedLocationNo",setArticleStockInfo:"setArticleStockInfo",stockLocations:"stockLocations",stockStatus:"stockStatus"},outputs:{togglePopupEvent:"togglePopupEvent",saveEvent:"saveEvent"},standalone:!1,decls:8,vars:6,consts:[["headerTemplate",""],["footerTemplate",""],[1,"stock-grid"],[3,"closeClick","showCloseIcon","modal","headerTemplate","footerTemplate"],[1,"dialog-wrapper"],[1,"co-dialog-header-title-wrapper"],[3,"iconData"],[1,"co-dialog-header-title",3,"textContent"],[1,"stock-header",3,"textContent"],[1,"stock-dialog-header"],[1,"stock-dialog-row"],[3,"model","placeholder","readonly"],[3,"model","placeholder","required","readonly"],[1,"filler"],[3,"modelChange","model","label","min"],[1,"transfer-bottom-row"],[3,"modelChange","collection","displayField","label"],[3,"modelChange","model","placeholder","required","readonly"],[3,"model","collection","displayField","label","required"],[3,"modelChange","model","collection","displayField","label","required"],[3,"modelChange","model","placeholder","readonly"],[1,"button-wrapper","ok-cancel-buttons"],[1,"minimum-stock",3,"textContent"],[1,"save-button",3,"click","iconData","disabled"],[1,"cancel-button",3,"click","iconData"]],template:function(r,o){if(r&1){let s=de();O(0,"div",2)(1,"co-dialog",3),W("closeClick",function(){return F(s),U(o.togglePopup())}),Yt(2,$xt,4,4,"ng-template",null,0,zi),$(4,eFt,3,3,"div",4),$(5,uFt,19,21,"div",4),Yt(6,_Ft,5,5,"ng-template",null,1,zi),I()()}if(r&2){let s=ln(3),a=ln(7);m(),S("showCloseIcon",!0)("modal",!0)("headerTemplate",s)("footerTemplate",a),m(3),ee(o.deleteStockLine?4:-1),m(),ee(o.deleteStockLine?-1:5)}},dependencies:[Ki,So,ri,tS,qo,ns,eS,H$,kt],encapsulation:2});let i=e;return i})();function EFt(i,e){if(i&1){let t=de();O(0,"co-stock-transfer",12),W("handleStickerClicked",function(r){F(t);let o=R();return U(o.handleStickerClicked.emit(r))})("handleTogglePopup",function(){F(t);let r=R();return U(r.toggleTransferDialog())}),I()}if(i&2){let t=R();S("articleToTransfer",t.articleDetails)("allWarehouses",t.allWarehouses)("stockLocations",t.stockLocations)("articleFlat",t.articleFlat)}}function mFt(i,e){if(i&1){let t=de();O(0,"co-stock-location-popup",13),W("togglePopupEvent",function(){F(t);let r=R();return U(r.toggleConfirmationDialog())}),I()}if(i&2){let t=R();S("articleExtended",t.article)("selectedWarehouse",t.selectedWarehouse)("setArticleFlat",t.articleFlat)("selectedLocationNo",t.selectedLocationNo)("stockLocations",t.stockLocations)("articleDetailsInformation",t.articleDetailsInformation)("setArticleStockInfo",t.data)("setSelectedArticleDetailsData",t.selectedArticleDetailsData)("newStockLine",t.newStockLine)("deleteStockLine",t.deleteStockLine)("stockStatus",t.stockStatus)}}function gFt(i,e){if(i&1){let t=de();O(0,"co-icon",5),W("click",function(){F(t);let r=R();return U(r.handleStockTransferClick(r.selectedRow))}),I()}if(i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.ArrowRightArrowLeftRegular))}}function AFt(i,e){if(i&1){let t=de();O(0,"co-icon",5),W("click",function(){F(t);let r=R();return U(r.openSendMethodDialog(r.selectedRow))}),I()}if(i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.SolidBarcodeReadTag))}}function TFt(i,e){if(i&1){let t=de();O(0,"co-icon",5),W("click",function(){F(t);let r=R();return U(r.handleDeleteRow(r.selectedRow))}),I()}if(i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.TrashCanRegular))}}function SFt(i,e){i&1&&(j(0,"span",7),le(1,"sharedLocalize")),i&2&&S("textContent",ge(1,1,"STOCK_BELOW_ZERO_TEXT"))}function CFt(i,e){if(i&1){let t=de();O(0,"div",14),W("click",function(){let r=F(t).row,o=R();return U(o.onOkClickSendLocations(r))}),j(1,"co-icon",6)(2,"span",15),I()}if(i&2){let t=e.row,n=R();m(),S("iconData",n.iconCacheService.getIcon(n.icons.EditPenRegular)),m(),S("textContent",t.amountInStock)}}function RFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.locationNo)}}function OFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.batchNo)}}function IFt(i,e){if(i&1&&(O(0,"co-simple-grid-column",9),le(1,"sharedLocalize"),Yt(2,OFt,1,1,"ng-template",10),I()),i&2){let t=R();S("headerText",ge(1,3,"BATCH"))("field","batchNo"),m(2),S("templateType",t.SimpleGridColumnTemplateType.Content)}}function NFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.serialNo)}}function vFt(i,e){if(i&1&&(O(0,"co-simple-grid-column",9),le(1,"sharedLocalize"),Yt(2,NFt,1,1,"ng-template",10),I()),i&2){let t=R();S("headerText",ge(1,3,"SERIAL_NO"))("field","serialNo"),m(2),S("templateType",t.SimpleGridColumnTemplateType.Content)}}function DFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.stockAssigned)}}function yFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.amountInStockFree)}}function bFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.currency)}}function LFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.purchasePrice)}}function wFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.supplierNo)}}function PFt(i,e){if(i&1){let t=de();O(0,"co-stock-print-sticker",16),W("close",function(){F(t);let r=R();return U(r.showSendMethodDialog=!1)}),I()}}var JYe=(()=>{let e=class e extends Ac{set warehouseNo(n){this._warehouseNo!==n&&(this._warehouseNo=n,this.getData(),this._getWarehouseLocations())}get warehouseNo(){return this._warehouseNo}constructor(n,r,o){super(),this.iconCacheService=n,this._stockService=r,this._changeDetector=o,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.articleStockInformation=[],this.articleWarehouse=[],this.allWarehouses=[],this.dataWareHouseCode=[],this.transferIconClicked=new re,this.sendMethodDialogClicked=new re,this.handleStickerClicked=new re,this.showConfirmationDialog=!1,this.newStockLine=!1,this.deleteStockLine=!1,this.cannotDelete=!1,this.articleDetailsInformation=new Nu,this.stockStatus=[],this.selectedArticleDetailsData=new Il,this.data=[],this.stockLocations=[],this.stockStickerPrintRequest=new QYe.PrintStockStickersRequest,this.showSendMethodDialog=!1,this._subs=[]}ngOnInit(){this._stockService.getStockState().then(n=>{this.stockStatus=n})}ngOnDestroy(){this._subs.forEach(n=>n.unsubscribe())}openSendMethodDialog(n){this._buildPrintStockStickersRequest(),this.showSendMethodDialog=!0,this.sendMethodDialogClicked.emit(n)}handleStockTransferClick(n){this.articleDetails=n,this.showStockTransfer=!0}onRowSelected(n){this.selectedRow=n,this.cannotDelete=!1}onOkClickSendLocations(n){this.selectedArticleDetailsData=n,this.newStockLine=!1,this.showConfirmationDialog=!0}handleDeleteRow(n){this.selectedArticleDetailsData=n,this.selectedArticleDetailsData.stockAssigned>0?(this.deleteStockLine=!1,this.showConfirmationDialog=!1,this.cannotDelete=!0):(this.deleteStockLine=!0,this.showConfirmationDialog=!0,this.cannotDelete=!1)}handleAddRow(){this.data?.length||(this.data=[]),this.data.push(new Il),this.selectedArticleDetailsData=this.data[this.data.length-1],this.newStockLine=!0,this.showConfirmationDialog=!0}toggleConfirmationDialog(){this.showConfirmationDialog=!this.showConfirmationDialog,this.getData(),this._stockService.refreshStockInformation.emit()}toggleTransferDialog(){this.showStockTransfer=!this.showStockTransfer,this.getData()}getData(){let n=new Nu;n.goodId=this.goodId.toString(),n.warehouseNumber=this.warehouseNo,this._stockService.getArticleDetails(n).then(r=>{this.data=r,this._changeDetector.detectChanges()}),this._getWarehouseLocations()}_getWarehouseLocations(){this._stockService.getStockManagementLocations(this.warehouseNo).then(n=>{this.stockLocations=n})}_buildPrintStockStickersRequest(){this.stockStickerPrintRequest.goodId=this.article.goodId,this.stockStickerPrintRequest.warehouse=this.selectedWarehouse.warehouseNo,this.stockStickerPrintRequest.location=this.selectedLocationNo,this.stockStickerPrintRequest.batch=this.selectedRow.batchNo,this.stockStickerPrintRequest.serial=this.selectedRow.serialNo,this.stockStickerPrintRequest.amount=this.selectedRow.amountInStock}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr),Q(pn))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-location"]],inputs:{warehouseNo:"warehouseNo",article:"article",articleStockInformation:"articleStockInformation",articleWarehouse:"articleWarehouse",allWarehouses:"allWarehouses",articleFlat:"articleFlat",dataWareHouseCode:"dataWareHouseCode",selectedWarehouse:"selectedWarehouse"},outputs:{transferIconClicked:"transferIconClicked",sendMethodDialogClicked:"sendMethodDialogClicked",handleStickerClicked:"handleStickerClicked"},standalone:!1,features:[pi],decls:35,vars:50,consts:[[1,"stock-grid"],[1,"stock-transfer-wrapper"],[1,"stock-transfer-dialog",3,"articleToTransfer","allWarehouses","stockLocations","articleFlat"],[3,"articleExtended","selectedWarehouse","setArticleFlat","selectedLocationNo","stockLocations","articleDetailsInformation","setArticleStockInfo","setSelectedArticleDetailsData","newStockLine","deleteStockLine","stockStatus"],[1,"stock-transfer-add"],[1,"menu-icon",3,"click","iconData"],[1,"menu-icon",3,"iconData"],[1,"minimum-stock",3,"textContent"],[1,"simple-grid",3,"addRow","selectRow","data","showAdd","inlineEdit","showToolbar"],[3,"headerText","field"],[3,"templateType"],[3,"width","headerText","field"],[1,"stock-transfer-dialog",3,"handleStickerClicked","handleTogglePopup","articleToTransfer","allWarehouses","stockLocations","articleFlat"],[3,"togglePopupEvent","articleExtended","selectedWarehouse","setArticleFlat","selectedLocationNo","stockLocations","articleDetailsInformation","setArticleStockInfo","setSelectedArticleDetailsData","newStockLine","deleteStockLine","stockStatus"],[1,"stock-amount",3,"click"],[3,"textContent"],[3,"close"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div",1),$(2,EFt,1,4,"co-stock-transfer",2),I(),$(3,mFt,1,11,"co-stock-location-popup",3),O(4,"div",4)(5,"co-icon",5),W("click",function(){return o.handleAddRow()}),I(),$(6,gFt,1,1,"co-icon",6),$(7,AFt,1,1,"co-icon",6),$(8,TFt,1,1,"co-icon",6),$(9,SFt,2,3,"span",7),I(),O(10,"co-simple-grid",8),W("addRow",function(){return o.handleAddRow()})("selectRow",function(a){return o.onRowSelected(a)}),O(11,"co-simple-grid-column",9),le(12,"sharedLocalize"),Yt(13,CFt,3,2,"ng-template",10),I(),O(14,"co-simple-grid-column",11),le(15,"sharedLocalize"),Yt(16,RFt,1,1,"ng-template",10),I(),$(17,IFt,3,5,"co-simple-grid-column",9),$(18,vFt,3,5,"co-simple-grid-column",9),O(19,"co-simple-grid-column",9),le(20,"sharedLocalize"),Yt(21,DFt,1,1,"ng-template",10),I(),O(22,"co-simple-grid-column",9),le(23,"sharedLocalize"),Yt(24,yFt,1,1,"ng-template",10),I(),O(25,"co-simple-grid-column",9),le(26,"sharedLocalize"),Yt(27,bFt,1,1,"ng-template",10),I(),O(28,"co-simple-grid-column",9),le(29,"sharedLocalize"),Yt(30,LFt,1,1,"ng-template",10),I(),O(31,"co-simple-grid-column",9),le(32,"sharedLocalize"),Yt(33,wFt,1,1,"ng-template",10),I()()(),$(34,PFt,1,0,"co-stock-print-sticker")),r&2&&(m(2),ee(o.showStockTransfer?2:-1),m(),ee(o.showConfirmationDialog?3:-1),m(2),S("iconData",o.iconCacheService.getIcon(o.icons.PlusRegular)),m(),ee(o.selectedRow?6:-1),m(),ee(o.selectedRow?7:-1),m(),ee(o.selectedRow?8:-1),m(),ee(o.cannotDelete?9:-1),m(),S("data",o.data)("showAdd",!1)("inlineEdit",!1)("showToolbar",!0),m(),S("headerText",ge(12,36,"STOCK"))("field","amountInStock"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("width",150)("headerText",ge(15,38,"LOCATION"))("field","locationNo"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),ee(o.articleFlat!=null&&o.articleFlat.batch?17:-1),m(),ee(o.articleFlat!=null&&o.articleFlat.serial?18:-1),m(),S("headerText",ge(20,40,"ALLOCATED"))("field","stockAssigned"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(23,42,"AVAILABLE_STOCK"))("field","amountInStockFree"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(26,44,"VALUTA"))("field","currency"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(29,46,"PURCHASE_PRICE"))("field","purchasePrice"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(32,48,"SUPPLIERNR"))("field","supplierNo"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),ee(o.showSendMethodDialog?34:-1))},dependencies:[Al,$a,Ja,ri,WYe,XYe,ZYe,kt],encapsulation:2});let i=e;return i})();var K_=class{};function kFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.mutationDate,"dd-MM-yyyy"))}}var $Ye=(()=>{let e=class e extends Ac{constructor(n,r){super(),this.iconCacheService=n,this._stockService=r,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.stockHistoryInformation=[],this.data=[]}getData(){return B(this,null,function*(){let n=new K_;n.type="V",n.goodId=this.goodId.toString(),this._stockService.getStockHistory(n).then(r=>{this.data=r})})}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-history"]],inputs:{stockHistoryInformation:"stockHistoryInformation",articleGoodId:"articleGoodId"},standalone:!1,features:[pi],decls:28,vars:54,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,kFt,2,4,"ng-template",2),I(),j(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),j(6,"co-simple-grid-column",3),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",3),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",3),le(13,"sharedLocalize"),j(14,"co-simple-grid-column",3),le(15,"sharedLocalize"),j(16,"co-simple-grid-column",3),le(17,"sharedLocalize"),j(18,"co-simple-grid-column",3),le(19,"sharedLocalize"),j(20,"co-simple-grid-column",3),le(21,"sharedLocalize"),j(22,"co-simple-grid-column",3),le(23,"sharedLocalize"),j(24,"co-simple-grid-column",3),le(25,"sharedLocalize"),j(26,"co-simple-grid-column",3),le(27,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,28,"DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,30,"TIME"))("field","mutationTime"),m(2),S("headerText",ge(7,32,"AMOUNT"))("field","amount"),m(2),S("headerText",ge(9,34,"WAREHOUSE"))("field","wareHouseNr"),m(2),S("headerText",ge(11,36,"LOCATION"))("field","locationNr"),m(2),S("headerText",ge(13,38,"ORDERNUMBER"))("field","docNr"),m(2),S("headerText",ge(15,40,"ORDER_RULE"))("field","transLineNr"),m(2),S("headerText",ge(17,42,"STATUS"))("field","stockStateId"),m(2),S("headerText",ge(19,44,"REMARK"))("field","stockStateRemarkId"),m(2),S("headerText",ge(21,46,"VALUTA"))("field","currencyCode"),m(2),S("headerText",ge(23,48,"RELATION_NR"))("field","relationNr"),m(2),S("headerText",ge(25,50,"USER"))("field","user"),m(2),S("headerText",ge(27,52,"MUTATION_TYPE"))("field","mutationType"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();function FFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.mutationDate,"dd-MM-yyyy"))}}var eKe=(()=>{let e=class e extends Ac{constructor(n){super(),this._stockService=n,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.data=[]}getData(){return B(this,null,function*(){let n=new K_;n.type="O",n.goodId=this.goodId.toString(),this._stockService.getStockHistory(n).then(r=>{this.data=r})})}};e.\u0275fac=function(r){return new(r||e)(Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-order-supply-stock-history"]],standalone:!1,features:[pi],decls:28,vars:54,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,FFt,2,4,"ng-template",2),I(),j(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),j(6,"co-simple-grid-column",3),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",3),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",3),le(13,"sharedLocalize"),j(14,"co-simple-grid-column",3),le(15,"sharedLocalize"),j(16,"co-simple-grid-column",3),le(17,"sharedLocalize"),j(18,"co-simple-grid-column",3),le(19,"sharedLocalize"),j(20,"co-simple-grid-column",3),le(21,"sharedLocalize"),j(22,"co-simple-grid-column",3),le(23,"sharedLocalize"),j(24,"co-simple-grid-column",3),le(25,"sharedLocalize"),j(26,"co-simple-grid-column",3),le(27,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,28,"MUTATION_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,30,"MUTATION_TIME"))("field","mutationTime"),m(2),S("headerText",ge(7,32,"AMOUNT"))("field","amount"),m(2),S("headerText",ge(9,34,"WAREHOUSE"))("field","wareHouseNr"),m(2),S("headerText",ge(11,36,"LOCATION"))("field","locationNr"),m(2),S("headerText",ge(13,38,"DOCUMENT_NUMBER"))("field","docNr"),m(2),S("headerText",ge(15,40,"LINE"))("field","transLineNr"),m(2),S("headerText",ge(17,42,"STOCK_STATE"))("field","stockStateId"),m(2),S("headerText",ge(19,44,"STOCK_REMARK"))("field","stockStateRemarkId"),m(2),S("headerText",ge(21,46,"VALUTA"))("field","currencyCode"),m(2),S("headerText",ge(23,48,"RELATION_NR"))("field","relationNr"),m(2),S("headerText",ge(25,50,"USER"))("field","user"),m(2),S("headerText",ge(27,52,"MUTATION_TYPE"))("field","mutationType"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();function BFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.mutationDate,"dd-MM-yyyy"))}}var tKe=(()=>{let e=class e extends Ac{constructor(n){super(),this._stockService=n,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.data=[]}getData(){return B(this,null,function*(){let n=new K_;n.type="C",n.goodId=this.goodId.toString(),this._stockService.getStockHistory(n).then(r=>{this.data=r})})}};e.\u0275fac=function(r){return new(r||e)(Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-order-stock-commission-history"]],standalone:!1,features:[pi],decls:28,vars:54,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,BFt,2,4,"ng-template",2),I(),j(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),j(6,"co-simple-grid-column",3),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",3),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",3),le(13,"sharedLocalize"),j(14,"co-simple-grid-column",3),le(15,"sharedLocalize"),j(16,"co-simple-grid-column",3),le(17,"sharedLocalize"),j(18,"co-simple-grid-column",3),le(19,"sharedLocalize"),j(20,"co-simple-grid-column",3),le(21,"sharedLocalize"),j(22,"co-simple-grid-column",3),le(23,"sharedLocalize"),j(24,"co-simple-grid-column",3),le(25,"sharedLocalize"),j(26,"co-simple-grid-column",3),le(27,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,28,"MUTATION_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,30,"MUTATION_TIME"))("field","mutationTime"),m(2),S("headerText",ge(7,32,"AMOUNT"))("field","amount"),m(2),S("headerText",ge(9,34,"WAREHOUSE"))("field","wareHouseNr"),m(2),S("headerText",ge(11,36,"LOCATION"))("field","locationNr"),m(2),S("headerText",ge(13,38,"DOCUMENT_NUMBER"))("field","docNr"),m(2),S("headerText",ge(15,40,"LINE"))("field","transLineNr"),m(2),S("headerText",ge(17,42,"STOCK_STATE"))("field","stockStateId"),m(2),S("headerText",ge(19,44,"STOCK_REMARK"))("field","stockStateRemarkId"),m(2),S("headerText",ge(21,46,"VALUTA"))("field","currencyCode"),m(2),S("headerText",ge(23,48,"RELATION_NR"))("field","relationNr"),m(2),S("headerText",ge(25,50,"USER"))("field","user"),m(2),S("headerText",ge(27,52,"MUTATION_TYPE"))("field","mutationType"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();function GFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.mutationDate,"dd-MM-yyyy"))}}var iKe=(()=>{let e=class e extends Ac{constructor(n){super(),this._stockService=n,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.data=[]}getData(){return B(this,null,function*(){let n=new K_;n.type="B",n.goodId=this.goodId.toString(),this._stockService.getStockHistory(n).then(r=>{this.data=r})})}};e.\u0275fac=function(r){return new(r||e)(Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-order-stock-history"]],standalone:!1,features:[pi],decls:28,vars:54,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,GFt,2,4,"ng-template",2),I(),j(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),j(6,"co-simple-grid-column",3),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",3),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",3),le(13,"sharedLocalize"),j(14,"co-simple-grid-column",3),le(15,"sharedLocalize"),j(16,"co-simple-grid-column",3),le(17,"sharedLocalize"),j(18,"co-simple-grid-column",3),le(19,"sharedLocalize"),j(20,"co-simple-grid-column",3),le(21,"sharedLocalize"),j(22,"co-simple-grid-column",3),le(23,"sharedLocalize"),j(24,"co-simple-grid-column",3),le(25,"sharedLocalize"),j(26,"co-simple-grid-column",3),le(27,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,28,"DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,30,"TIME"))("field","mutationTime"),m(2),S("headerText",ge(7,32,"AMOUNT"))("field","amount"),m(2),S("headerText",ge(9,34,"WAREHOUSE"))("field","wareHouseNr"),m(2),S("headerText",ge(11,36,"LOCATION"))("field","locationNr"),m(2),S("headerText",ge(13,38,"ORDERNUMBER"))("field","docNr"),m(2),S("headerText",ge(15,40,"ORDER_RULE"))("field","transLineNr"),m(2),S("headerText",ge(17,42,"STATUS"))("field","stockStateId"),m(2),S("headerText",ge(19,44,"REMARK"))("field","stockStateRemarkId"),m(2),S("headerText",ge(21,46,"VALUTA"))("field","currencyCode"),m(2),S("headerText",ge(23,48,"RELATION_NR"))("field","relationNr"),m(2),S("headerText",ge(25,50,"USER"))("field","user"),m(2),S("headerText",ge(27,52,"MUTATION_TYPE"))("field","mutationType"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();var nKe=(()=>{let e=class e{constructor(){this.salesOrderNavigation=new Ai}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=pt({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function jFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.mutationDate,"dd-MM-yyyy"))}}function zFt(i,e){if(i&1){let t=de();O(0,"div",5),W("click",function(){let r=F(t).row,o=R();return U(o.handleTransactionNavigation(r.docNr))}),I()}if(i&2){let t=e.row;S("textContent",t.docNr)}}var rKe=(()=>{let e=class e extends Ac{constructor(n,r){super(),this._stockService=n,this.sharedEventService=r,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.data=[]}getData(){return B(this,null,function*(){let n=new K_;n.type="T",n.goodId=this.goodId.toString(),this._stockService.getStockHistory(n).then(r=>{this.data=r.sort((o,s)=>o.docNr.toString().localeCompare(s.docNr.toString(),void 0,{numeric:!0}))})})}handleTransactionNavigation(n){let r=n.split(" ");r&&r.length>1&&r[0].toLowerCase()==="v"&&this.sharedEventService.salesOrderNavigation.next(r[1])}};e.\u0275fac=function(r){return new(r||e)(Q(wr),Q(nKe))},e.\u0275cmp=Fe({type:e,selectors:[["co-allocation-stock-history"]],standalone:!1,features:[pi],decls:29,vars:54,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[3,"textContent"],[1,"clickable-link",3,"click","textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,jFt,2,4,"ng-template",2),I(),j(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),j(6,"co-simple-grid-column",3),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",3),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),O(12,"co-simple-grid-column",1),le(13,"sharedLocalize"),Yt(14,zFt,1,1,"ng-template",2),I(),j(15,"co-simple-grid-column",3),le(16,"sharedLocalize"),j(17,"co-simple-grid-column",3),le(18,"sharedLocalize"),j(19,"co-simple-grid-column",3),le(20,"sharedLocalize"),j(21,"co-simple-grid-column",3),le(22,"sharedLocalize"),j(23,"co-simple-grid-column",3),le(24,"sharedLocalize"),j(25,"co-simple-grid-column",3),le(26,"sharedLocalize"),j(27,"co-simple-grid-column",3),le(28,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,28,"DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,30,"TIME"))("field","mutationTime"),m(2),S("headerText",ge(7,32,"AMOUNT"))("field","amount"),m(2),S("headerText",ge(9,34,"WAREHOUSE"))("field","wareHouseNr"),m(2),S("headerText",ge(11,36,"LOCATION"))("field","locationNr"),m(2),S("headerText",ge(13,38,"ORDERNUMBER")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(16,40,"ORDER_RULE"))("field","transLineNr"),m(2),S("headerText",ge(18,42,"STATUS"))("field","stockStateId"),m(2),S("headerText",ge(20,44,"REMARK"))("field","stockStateRemarkId"),m(2),S("headerText",ge(22,46,"VALUTA"))("field","currencyCode"),m(2),S("headerText",ge(24,48,"RELATION_NR"))("field","relationNr"),m(2),S("headerText",ge(26,50,"USER"))("field","user"),m(2),S("headerText",ge(28,52,"MUTATION_TYPE"))("field","mutationType"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();function KFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.transactionDate,"dd-MM-yyyy"))}}function qFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.arrivalDate,"dd-MM-yyyy"))}}function XFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.transConfirmedDate,"dd-MM-yyyy"))}}var oKe=(()=>{let e=class e extends Ac{set warehouseNo(n){this._warehouseNo!==n&&(this._warehouseNo=n,this.getData())}get warehouseNo(){return this._warehouseNo}constructor(n,r){super(),this.iconCacheService=n,this._stockService=r,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.data=[]}getData(){return B(this,null,function*(){this.goodId&&this.warehouseNo!==void 0&&this.warehouseNo!==null&&this._stockService.stockPrognose(this.goodId,this.warehouseNo).then(n=>{this.data=n})})}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-prognose"]],inputs:{warehouseNo:"warehouseNo"},standalone:!1,features:[pi],decls:22,vars:38,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText","field"],[3,"headerText"],[3,"templateType"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0),j(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),j(3,"co-simple-grid-column",1),le(4,"sharedLocalize"),j(5,"co-simple-grid-column",1),le(6,"sharedLocalize"),j(7,"co-simple-grid-column",1),le(8,"sharedLocalize"),O(9,"co-simple-grid-column",2),le(10,"sharedLocalize"),Yt(11,KFt,2,4,"ng-template",3),I(),O(12,"co-simple-grid-column",2),le(13,"sharedLocalize"),Yt(14,qFt,2,4,"ng-template",3),I(),j(15,"co-simple-grid-column",1),le(16,"sharedLocalize"),O(17,"co-simple-grid-column",2),le(18,"sharedLocalize"),Yt(19,XFt,2,4,"ng-template",3),I(),j(20,"co-simple-grid-column",1),le(21,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,20,"AVAILABLE_STOCK2"))("field","available"),m(2),S("headerText",ge(4,22,"FREE_STOCK"))("field","freeStock"),m(2),S("headerText",ge(6,24,"IN_ORDER"))("field","inOrder"),m(2),S("headerText",ge(8,26,"PURCHASE_ORDER"))("field","transNr"),m(2),S("headerText",ge(10,28,"PURCHASE_ORDER_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(13,30,"ARRIVAL_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(16,32,"REFERENCE"))("field","reference"),m(2),S("headerText",ge(18,34,"DELIVERY_DATE_CONFIRMED")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(21,36,"FUTURE_FREE_STOCK"))("field","laterAvailable"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();function QFt(i,e){if(i&1){let t=de();O(0,"co-stock-tab",6),W("locationClicked",function(r){F(t);let o=R();return U(o.handleLocationClicked(r))}),I()}if(i&2){let t=R();S("articleStockInformation",t.stockInformation)}}function JFt(i,e){if(i&1&&j(0,"co-stock-prognose",2),i&2){let t=R();S("goodId",t.article.goodId)("warehouseNo",t.selectedWarehouse.warehouseNo)}}function $Ft(i,e){if(i&1){let t=de();O(0,"co-stock-location",7),W("transferIconClicked",function(r){F(t);let o=R();return U(o.transferIconClicked.emit(r))})("sendMethodDialogClicked",function(r){F(t);let o=R();return U(o.sendMethodDialogClicked.emit(r))}),I()}if(i&2){let t=R();S("articleStockInformation",t.stockInformation)("article",t.article)("goodId",t.article.goodId)("warehouseNo",t.selectedWarehouse.warehouseNo)("articleFlat",t.articleFlat)("dataWareHouseCode",t.warehouses)("selectedWarehouse",t.selectedWarehouse)}}function e5t(i,e){if(i&1){let t=de();O(0,"co-order-tab",8),W("transferIconClicked",function(r){F(t);let o=R();return U(o.transferIconClicked.emit(r))})("sendMethodDialogClicked",function(r){F(t);let o=R();return U(o.sendMethodDialogClicked.emit(r))})("handleTransactionClick",function(r){F(t);let o=R();return U(o.handleSalesOrderClick.emit(r))}),I()}if(i&2){let t=R();S("warehouseNo",t.selectedWarehouse.warehouseNo)("goodId",t.article.goodId)}}function t5t(i,e){if(i&1){let t=de();O(0,"co-order-stock-tab",9),W("handleTransactionClick",function(r){F(t);let o=R();return U(o.handlePurchaseOrderClick.emit(r))}),I()}if(i&2){let t=R();S("warehouseNo",t.selectedWarehouse.warehouseNo)("goodId",t.article.goodId)}}function i5t(i,e){if(i&1&&j(0,"co-stock-history",5),i&2){let t=R();S("goodId",t.article.goodId)}}function n5t(i,e){if(i&1&&j(0,"co-order-supply-stock-history",5),i&2){let t=R();S("goodId",t.article.goodId)}}function r5t(i,e){if(i&1&&j(0,"co-order-stock-commission-history",5),i&2){let t=R();S("goodId",t.article.goodId)}}function o5t(i,e){if(i&1&&j(0,"co-order-stock-history",5),i&2){let t=R();S("goodId",t.article.goodId)}}function s5t(i,e){if(i&1&&j(0,"co-allocation-stock-history",5),i&2){let t=R();S("goodId",t.article.goodId)}}var sKe=(()=>{let e=class e{constructor(n,r,o,s){this._stockService=n,this._dictionaryService=r,this._changeDetector=o,this._stockScreenConfigService=s,this.icons=ot,this.stockInformation=[],this.warehouses=[],this.transferIconClicked=new re,this.sendMethodDialogClicked=new re,this.handleSalesOrderClick=new re,this.handlePurchaseOrderClick=new re,this.selectedWarehouse=new eE,this.tabs=[],this.historyTabs=[]}ngOnInit(){this.tabs=[{title:this._dictionaryService.get("OVERVIEW"),active:!0,cfg:vu.Overview},{title:this._dictionaryService.get("STOCK_FORECAST"),active:!1,cfg:vu.InventoryForecast},{title:this._dictionaryService.get("STOCK_DETAILS"),active:!1,cfg:vu.InventoryDetails},{title:this._dictionaryService.get("ALREADY_IN_ORDER"),active:!1,cfg:vu.OverviewDetails},{title:this._dictionaryService.get("IN_ORDER"),active:!1,cfg:vu.InOrder},{title:this._dictionaryService.get("HISTORY"),active:!1,cfg:vu.History}],this._stockScreenConfigService.immediatelyHidden(this.tabs[0].cfg)&&(this.tabs[0].active=!1,this.tabs.find(n=>this._stockScreenConfigService.immediatelyVisible(n.cfg)).active=!0),this.historyTabs=[{title:this._dictionaryService.get("STOCK"),active:!0,cfg:vu.HistoryStock},{title:this._dictionaryService.get("ORDER_STOCK"),active:!1,cfg:vu.HistoryOrderStock},{title:this._dictionaryService.get("ORDER_COMMISSION"),active:!1,cfg:vu.HistoryOrderCommission},{title:this._dictionaryService.get("ORDER"),active:!1,cfg:vu.HistoryOrder},{title:this._dictionaryService.get("ALLOCATION"),active:!1,cfg:vu.HistoryAssign}],this._stockScreenConfigService.immediatelyHidden(this.historyTabs[0].cfg)&&(this.historyTabs[0].active=!1,this.historyTabs.find(n=>this._stockScreenConfigService.immediatelyVisible(n.cfg)).active=!0)}handleLocationClicked(n){this.tabs[0].active=!1,this.tabs[2].active=!0;let r=this.wareHouseForCode(parseInt(n));this.selectedWarehouse=r,this.handleWarehouseSelected(this.selectedWarehouse),this.getStockData(this.selectedWarehouse)}handleWarehouseSelected(n){this.selectedWarehouse=n}getStockData(n){this.handleWarehouseSelected(n),this._changeDetector.markForCheck(),this._changeDetector.detectChanges()}wareHouseForCode(n){return this.warehouses.find(r=>r.warehouseNo===n)}};e.\u0275fac=function(r){return new(r||e)(Q(wr),Q(kn),Q(pn),Q(mC))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-tabs"]],inputs:{stockInformation:"stockInformation",article:"article",articleFlat:"articleFlat",warehouses:"warehouses"},outputs:{transferIconClicked:"transferIconClicked",sendMethodDialogClicked:"sendMethodDialogClicked",handleSalesOrderClick:"handleSalesOrderClick",handlePurchaseOrderClick:"handlePurchaseOrderClick"},standalone:!1,decls:13,vars:22,consts:[[3,"warehouseSelected","wareHouseLabel","wareHouseSearchLabel","tabs","dataWareHouseCode","selectedWarehouse","secondaryTabs","ActivateSecondaryTabs","showWarehouseSelection"],[3,"articleStockInformation"],[3,"goodId","warehouseNo"],[3,"articleStockInformation","article","goodId","warehouseNo","articleFlat","dataWareHouseCode","selectedWarehouse"],[3,"warehouseNo","goodId"],[3,"goodId"],[3,"locationClicked","articleStockInformation"],[3,"transferIconClicked","sendMethodDialogClicked","articleStockInformation","article","goodId","warehouseNo","articleFlat","dataWareHouseCode","selectedWarehouse"],[3,"transferIconClicked","sendMethodDialogClicked","handleTransactionClick","warehouseNo","goodId"],[3,"handleTransactionClick","warehouseNo","goodId"]],template:function(r,o){r&1&&(O(0,"co-tab-bar",0),le(1,"sharedLocalize"),le(2,"sharedLocalize"),W("warehouseSelected",function(a){return o.handleWarehouseSelected(a)}),I(),$(3,QFt,1,1,"co-stock-tab",1),$(4,JFt,1,2,"co-stock-prognose",2),$(5,$Ft,1,7,"co-stock-location",3),$(6,e5t,1,2,"co-order-tab",4),$(7,t5t,1,2,"co-order-stock-tab",4),$(8,i5t,1,1,"co-stock-history",5),$(9,n5t,1,1,"co-order-supply-stock-history",5),$(10,r5t,1,1,"co-order-stock-commission-history",5),$(11,o5t,1,1,"co-order-stock-history",5),$(12,s5t,1,1,"co-allocation-stock-history",5)),r&2&&(S("wareHouseLabel",ge(1,18,"WAREHOUSE_SELECTION"))("wareHouseSearchLabel",ge(2,20,"SEARCH"))("tabs",o.tabs)("dataWareHouseCode",o.warehouses)("selectedWarehouse",o.selectedWarehouse)("secondaryTabs",o.historyTabs)("ActivateSecondaryTabs",o.tabs[5].active)("showWarehouseSelection",o.tabs[1].active||o.tabs[2].active),m(3),ee(o.tabs[0].active?3:-1),m(),ee(o.tabs[1].active?4:-1),m(),ee(o.tabs[2].active?5:-1),m(),ee(o.tabs[3].active?6:-1),m(),ee(o.tabs[4].active?7:-1),m(),ee(o.historyTabs[0].active&&o.tabs[5].active?8:-1),m(),ee(o.historyTabs[1].active&&o.tabs[5].active?9:-1),m(),ee(o.historyTabs[2].active&&o.tabs[5].active?10:-1),m(),ee(o.historyTabs[3].active&&o.tabs[5].active?11:-1),m(),ee(o.historyTabs[4].active&&o.tabs[5].active?12:-1))},dependencies:[kYe,xYe,UYe,BYe,JYe,$Ye,eKe,tKe,iKe,rKe,oKe,kt],encapsulation:2});let i=e;return i})();function l5t(i,e){if(i&1){let t=de();O(0,"div",0),j(1,"co-stock-information",1),O(2,"co-stock-tabs",2),W("transferIconClicked",function(r){F(t);let o=R();return U(o.handleStockTransferClick(r))})("sendMethodDialogClicked",function(r){F(t);let o=R();return U(o.handleSendMethodClick(r))})("handlePurchaseOrderClick",function(r){F(t);let o=R();return U(o.handlePurchaseOrderClick.emit(r))})("handleSalesOrderClick",function(r){F(t);let o=R();return U(o.handlePurchaseOrderClick.emit(r))}),I()()}if(i&2){let t=R();m(),S("article",t.articleExtended)("articleStockState",t.articleStockState)("allAvailableStockInformation",t.allAvailableStock)("allTechnicalStockInformation",t.allTechnicalStock)("economicalStock",t.economicalStock)("perceptibleStorage",t.perceptibleStorage),m(),S("stockInformation",t.stockInformation)("article",t.articleExtended)("articleFlat",t.articleFlat)("warehouses",t.warehouses)}}var aKe=(()=>{let e=class e{set article(n){n instanceof Bb?(this.articleExtended=n,this._goodId=n.goodId):typeof n=="number"&&(this._goodId=n)}showClass(){return!0}constructor(n,r,o,s,a,l,c){this.iconCacheService=n,this._stockService=r,this._optionsService=o,this._dictionary=s,this._changeDetector=a,this._connector=l,this._screenConfigService=c,this.icons=ot,this.handleStickerClicked=new re,this.articleWarehouse=[],this.allWarehouses=[],this.okButtonClicked=new re,this.cancelButtonClicked=new re,this.handleClick=new re,this.handlePurchaseOrderClick=new re,this.handleSalesOrderClick=new re,this.updateGridData=new re,this.loaded=!1,this.showStockInformationGrid=!0,this.showStockTransfer=!1,this.stockInformation=[],this.articleDetailsInformation=new Nu,this.stockHistory=[],this.allAvailableStock=0,this.allTechnicalStock=0,this.economicalStock=0,this.perceptibleStorage=0,this.showSendMethodDialog=!1,this.warehouses=[],this._subscriptions=[],this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(d=>this._handleSettingsLoaded(d)))}ngOnDestroy(){this.articleExtended=void 0,this.articleFlat=void 0,this._subscriptions.forEach(n=>n.unsubscribe())}ngOnInit(){this._subscriptions.push(this._stockService.refreshStockInformation.subscribe(n=>{this.getStockInformation(this.articleExtended.goodId)}))}handleStockTransferClick(n){this.stockTransferArticleDetails=n,this.showStockTransfer=!this.showStockTransfer,this.showStockInformationGrid=!this.showStockInformationGrid,this._stockService.stockStickers=new RYe}handleSendMethodClick(n){this.showSendMethodDialog=!0}handleOkClick(n){n.selected=!0,n.entryDate=new Date,this._stockService.updateArticleDetails(n).then(r=>{this.handleClick.emit(),this._stockService.getArticleDetails(this.articleDetailsInformation).then(o=>{this.updateGridData.emit(o)})}),this.loaded=!0,this.loadData()}backToStock(n){this.loadData(),this.showStockTransfer=!this.showStockTransfer,this.showStockInformationGrid=!this.showStockInformationGrid}getStockInformation(n){let r=new RF;r.goodId=n.toString(),r.viewKind="M",this._stockService.getStockInformation(r).then(o=>{this.stockInformation=o,this._resetStockInformation(),this.stockInformation.forEach(s=>this.allAvailableStock+=s.availableStock),this.stockInformation.forEach(s=>this.allTechnicalStock+=s.technicalStock),this.stockInformation.forEach(s=>this.economicalStock+=s.economicalStock),this.stockInformation.forEach(s=>this.perceptibleStorage+=parseInt(s.perceptibleStorage))})}getArtStockStatus(){this._stockService.getArtStockStatus(this.articleExtended?this.articleExtended.goodId:this._goodId).then(n=>{this.articleStockState=n})}getStockManagementWarehouses(){this._stockService.getStockManagementWarehouses().then(n=>{this.warehouses=n})}_handleSettingsLoaded(n){return B(this,null,function*(){n&&(yield this._initConnection().then())})}_initConnection(){return B(this,null,function*(){yield this._connector.connect(),yield this._dictionary.setDictionary(this._optionsService.options.languageCode),setTimeout(()=>{this._changeDetector.detectChanges()}),this._screenConfigService.loadConfig().then(n=>{n&&n.length>0&&(this.loaded=!0,this.loadData())})})}_resetStockInformation(){this.allAvailableStock=0,this.allTechnicalStock=0,this.economicalStock=0,this.perceptibleStorage=0}loadData(){if(this.loaded){if(this._goodId&&!this.articleExtended){let n=new IK;n.goodId=this._goodId,this._stockService.searchArticles(n).then(r=>{r[0]&&(this.articleExtended=r[0],this._stockService.getArticleFlat(r[0].articleNumber).then(o=>{this.articleFlat=o}))})}this.getArtStockStatus(),this.getStockManagementWarehouses(),this.getStockInformation(this.articleExtended?this.articleExtended.goodId:this._goodId)}this._changeDetector.markForCheck(),this._changeDetector.detectChanges()}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr),Q(_S),Q(kn),Q(pn),Q(mc),Q(mC))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-stock",o.showClass)},inputs:{article:"article",branchNr:"branchNr",articleWarehouse:"articleWarehouse",allWarehouses:"allWarehouses"},outputs:{handleStickerClicked:"handleStickerClicked",okButtonClicked:"okButtonClicked",cancelButtonClicked:"cancelButtonClicked",handleClick:"handleClick",handlePurchaseOrderClick:"handlePurchaseOrderClick",handleSalesOrderClick:"handleSalesOrderClick"},standalone:!1,features:[Oi([{provide:dh,useExisting:mC}])],decls:1,vars:1,consts:[[1,"stock-info-container"],[3,"article","articleStockState","allAvailableStockInformation","allTechnicalStockInformation","economicalStock","perceptibleStorage"],[3,"transferIconClicked","sendMethodDialogClicked","handlePurchaseOrderClick","handleSalesOrderClick","stockInformation","article","articleFlat","warehouses"]],template:function(r,o){r&1&&$(0,l5t,3,10,"div",0),r&2&&ee(o.loaded&&o.articleExtended?0:-1)},dependencies:[MYe,sKe],encapsulation:2});let i=e;return i})();var d5t=(function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},i(e,t)};return function(e,t){i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),u5t=(function(i){d5t(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.goodIds=[],t}return e})(jy);var lKe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,co,Fm,Qi]});let i=e;return i})();var cKe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut]});let i=e;return i})();var dKe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,cC]});let i=e;return i})();var uKe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,cC]});let i=e;return i})();var hKe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({providers:[mC,wr],imports:[Qi,ut,iS,Y3e,$T,vr,cC,ii,KH,P3e,m_,lKe,Fo,CK,cKe,co,ui,j3e,ch,Fm,dKe,uKe]});let i=e;return i})();var OF=(function(i){return i.Dutch="nl-NL",i.English="en-GB",i.German="de-DE",i.French="fr-FR",i})(OF||{});var sme=(()=>{let e=class e{constructor(n,r){this.injector=n,this._sharedDictionary=r}initializeApp(){return B(this,null,function*(){let n={url:"https://develop.colijn-it.nl/",schema:"815",version:"300",useLoginEncryption:!0,username:"elske",password:"elske1",languageCode:"NL"},r=this.injector.get(bi);r&&(yield r.init(n)),yield this._sharedDictionary.setDictionary(OF.Dutch)})}};e.\u0275fac=function(r){return new(r||e)(Ut(mr),Ut(kn))},e.\u0275prov=pt({token:e,factory:e.\u0275fac});let i=e;return i})();var Dn=(function(i){return i.DayView="DAY",i.DaysAround="DAYS_AROUND",i.ThreeDaysView="THREE_DAYS_AROUND",i.WeekView="WEEK",i.WeekSelectView="WEEK_SELECT",i.WeekWorkView="WORK_WEEK",i.WeekPlanningView="WEEK_PLANNING",i.MonthView="MONTH",i})(Dn||{});var f5t=(function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},i(e,t)};return function(e,t){i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),fKe=(function(i){f5t(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e})(jy);var aQe=Be(e7()),lQe=Be(r7()),cQe=Be(Hle()),dQe=Be(MD());var Sh=(function(i){return i.UserNameAndPasswordEntry="userNameAndPasswordEntry",i.MFACodeEntry="MFACodeEntry",i.ChangePasswordAndOptionallyActivateUser="changePasswordAndOptionallyActivateUser",i.MFACodeSetup="MFACodeSetup",i})(Sh||{});var gC=(function(i){return i.Absence="ABSENCE",i.AbsenceEvent="ABSENCE_EVENT",i.AbsenceFile="ABSENCE_FILE",i.AbsenceForm="ABSENCE_FORM",i.AccountingPeriod="PERIODES",i.Address="ADRESSEN",i.Administration="ADMINISTRATIES",i.AnamnesisForm="ANAMNESIS_FORM",i.ArticleGroup="ARTIKEL_GROEP",i.Articles="ARTIKELEN",i.Branch="FILIALEN",i.BusinessRule="BRE_RULE",i.Booking="BOEKINGSREGELS",i.Category="CATEGORIE",i.Characteristic="KENMERKEN",i.CharacteristicTypes="KENMERK_SOORTEN",i.CharacteristicLines="KENMERK_REGELS",i.Company="BEDRIJVEN",i.Concept="CONCEPTEN",i.Connections="ASS_VERBINDING",i.ContactPerson="CONTACTPERSONEN",i.CostCenter="KOSTENPLAATS_DRAGER",i.Country="LANDCODE",i.CurrencyInfo="VALUTA",i.CurrentIndication="CURRENT_INDICATION",i.Customer="KLANTEN",i.DeclarationMedicalOfficer="DECLARATION_MEDICAL_OFFICER",i.DeliveryMethod="LEVERMETHODES",i.Department="AFDELING",i.DiagnosisForm="DIAGNOSIS_FORM",i.Documents="DOCUMENTATIE",i.EmployabilityProfile="EMPLOYABILITY_PROFILE",i.EmployeeContract="EMPLOYEE_CONTRACT",i.EmployeeContractType="EMPLOYEE_CONTRACT_TYPE",i.Employee="PERSONEEL",i.EndEvaluation="END_EVALUATION",i.ExternalSource="EXTERNE_BRONNEN",i.FirstYearEvaluation="FIRST_YEAR_EVALUATION",i.FmlDocument="FML_DOCUMENT",i.Goods="GOEDEREN",i.Hardware="ASS_HARDWARE",i.Identification="IDENTIFICATION",i.JobCategory="JOB_CATEGORY",i.JobType="JOB_TYPE",i.LedgerAccount="GROOTBOEKEN",i.LedgerClassification="VERDICHTINGEN",i.LedgerJournal="DAGBOEKEN",i.LedgerMainClassification="HOOFDVERDICHTINGEN",i.LedgerMutation="GROOTBOEK_MUTATIES",i.Location="LOCATIES",i.MainArticle="HOOFDARTIKELEN",i.MedicalConsultFeedback="MEDICAL_CONSULT_FEEDBACK",i.MedicalFile="MEDICAL_FILE",i.MedicalForm="MEDICAL_FORM",i.MedicalInformationForm="MEDICAL_INFORMATION_FORM",i.Note="NOTITIE",i.NotificationFullyRecovered="NOTIFICATION_FULLY_RECOVERED",i.NotificationLongTermIllness="NOTIFICATION_LONG_TERM_ILLNESS",i.PaymentCondition="BETALINGSCONDITIES",i.PaymentMethod="BETAALWIJZE",i.PlanOfApproach="PLAN_OF_APPROACH",i.PriceList="PRIJSLIJSTEN",i.ProblemAnalysis="PROBLEM_ANALYSIS",i.ProblemAnalysisAdjustment="PROBLEM_ANALYSIS_ADJUSTMENT",i.Relations="RELATIES",i.RelationAddress="ADRES_RELATIES",i.RelationCommunication="COMM_RELATIES",i.Remarks="OPMERKINGEN",i.Salary="SALARY",i.ServiceProvision="ASS_DIENSTVERLENING",i.ShortReintegrationReport="SHORT_REINTEGRATION_REPORT",i.Software="ASS_SOFTWARE",i.Supplier="LEVERANCIERS",i.TagValues="TAG_VALUES",i.Tasks="TAKEN",i.Transactions="TRANSACTIES",i.TransactionLines="TRANSACTIE_REGELS",i.TurnoverGroup="OMZETGROEPEN",i.Unit="EENHEDEN",i.User="GEBRUIKERS",i.Vat="BTW",i.Warehouse="MAGAZIJNEN",i})(gC||{});var uQe=Be(ame()),hQe=Be(bK()),fQe=Be(Yle());var hme=Be(EKe()),fme=Be(mKe()),gKe=Be(z_()),AKe=Be(Su()),TKe=Be(KI()),SKe=Be($ae()),CKe=Be(eg()),_me=Be(Ad()),pme=Be(pD()),RKe=Be(Wpe()),OKe=Be(QS()),IKe=Be(DY()),NKe=Be(bK()),Eme=Be(n_e());var vKe=(()=>{let e=class e{constructor(){this.emailLayouts=[],this.printLayouts=[],this.documents=[],this.activities=[],this.printers=[],this._createTestData()}_createTestData(){this._createEmailLayouts(),this._createPrintLayouts(),this._createDocuments(),this._createActivities(),this._createPrinters()}_createPrinters(){let n=new Eme.Printer;n.name="Printer1",n.isDefault=!1,n.acceptingJobs="blabla";let r=new Eme.Printer;r.name="Printer2",r.isDefault=!1,r.acceptingJobs="blabla",this.printers.push(n,r)}_createEmailLayouts(){let n=new hme.ReportLayoutSelectionEmail;n.reportId=1,n.name="Standaard email rapport",n.description="Standaard email rapport",n.documentId=11,n.sendMethod=2,n.isDefault=!0,this.emailLayouts.push(n);let r=new hme.ReportLayoutSelectionEmail;r.reportId=2,r.name="Email rapport 2",r.description="Email rapport 2",r.documentId=16,r.sendMethod=2,r.isDefault=!1,this.emailLayouts.push(r)}_createPrintLayouts(){let n=new fme.ReportLayoutSelectionPrint;n.reportId=1,n.name="Standaard voorraadsticker 99x73",n.description="Standaard voorraadsticker 99x73",n.documentId=32,n.sendMethod=1,n.isDefault=!0,this.printLayouts.push(n);let r=new fme.ReportLayoutSelectionPrint;r.reportId=2,r.name="Voorraadsticker 100x50",r.description="Voorraadsticker 100x50",r.documentId=35,r.sendMethod=1,r.isDefault=!1,this.printLayouts.push(r)}_createDocuments(){let n=new _me.CoDocument;n.creationDate=new Date,n.description="DIT IS DOCUMENT",n.publication=1,n.fileSize="veel",n.fileType=pme.FileType.Document,n.isLoaded=!0,n.index=0,n.title="DOCUMENT",n.rightLevel=1,n.fileName="documentexe",this.documents.push(n);let r=new _me.CoDocument;r.creationDate=new Date,r.description="DIT IS IMAGE",r.publication=1,r.fileSize="veel",r.fileType=pme.FileType.Document,r.isLoaded=!0,r.index=0,r.title="IMAGE",r.rightLevel=2,r.fileName="imageexe",this.documents.push(r)}_createActivities(){let n=new TKe.RelationSmallObject;n.relationId=3,n.firstName="Work",n.familyName="Flow",n.initials="WF",n.prefix="Mvr",n.title="Mevrouw",n.relationNr=33,n.relationType=SKe.RelationKind.Personnel;let r=new RKe.Workflow;r.workflowProcessId=1,r.workflowProcessDescription="DIT IS EEN WORKFLOW PROCESS",r.sequence=0,r.table=CKe.TableName.Transactions,r.key="1",r.workflowDescription="DIT IS EEN WORKFLOW PROCESS DESCRIPTION",r.state="Status",r.stateName="StatusNaam",r.stateDate=new Date,r.workflowId=1,r.workflowName="DIT IS EEN WORKFLOW NAME";let o=new OKe.Task;o.taskId=1,o.priority=IKe.PriorityType.VeryHigh,o.name="TASKNAAM",o.workflowCategory=NKe.WorkflowCategoryType.Task,o.lastModifiedBy=n,o.lastModifiedDate=new Date;let s=new gKe.Activity;s.activityType=AKe.ActivityType.Task,s.task=o,s.workflow=r,s.lastActionDateTime=new Date,s.activityTitle="Work Activity",this.activities.push(s)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=pt({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var PKe=Be(j9());var DKe=Be(Fy()),yKe=Be(ox()),bKe=Be(Cl()),LKe=Be(Cz());var Vb=(()=>{let e=class e{constructor(){this._boFactory=new bKe.BusinessObjectFactory}connect(n){this._connector=new DKe.Connector(n),this._mainConnector=new LKe.MainApi(n)}getMfaParameter(n){return B(this,null,function*(){if(this._mfaSendMethod)return this._mfaSendMethod;{let r=yield this._mainConnector.getPublicParams(n);return this._mfaSendMethod=r?r.mfaSendMethod:null,this._mfaSendMethod}})}checkAndPrepareKeycloak(){return this._connector.checkAndPrepareKeycloak()}login(n){return B(this,null,function*(){return this._connector.logIn(n)})}confirmCode(n,r,o,s,a,l,c){return B(this,null,function*(){let d=yield this._connector.confirmCode(n,r,o,s,a,l,c);return this._boFactory.makeWithRawBackendData(yKe.LoginResponse,d)})}resetGoogleAuth(n,r){return B(this,null,function*(){return yield this._connector.resetGoogleAuth(n,r)})}changePassword(n,r,o){return B(this,null,function*(){return yield this._connector.changePassword(n,r,o)})}changePasswordAndActivateUser(n,r,o,s){return B(this,null,function*(){return yield this._connector.changePasswordAndActivateUser(n,r,o,s)})}sendResetPasswordOrInviteMessage(n,r,o){return B(this,null,function*(){return yield this._connector.sendResetPasswordOrInviteMessage(n,r,o)})}getUserGoogleAuthBarcode(){return B(this,null,function*(){let n={methodName:"getUserGoogleAuthBarcode",moduleName:"MFA",refCursorAsArray:!0};return yield this._connector.call("executeMethod",n,!1,"dataservice")})}checkAndStoreGoogleAuth(n){return B(this,null,function*(){let r={methodName:"checkAndStoreGoogleAuth",moduleName:"MFA",refCursorAsArray:!0,parameterValues:{code:n}};return yield this._connector.call("executeMethod",r,!1,"dataservice")})}isUserHasToSetUpGoogleAuthentication(){return B(this,null,function*(){let n={methodName:"isUserHasToSetUpGoogleAuthentication",moduleName:"MFA",refCursorAsArray:!0};return yield this._connector.call("executeMethod",n,!1,"dataservice")})}getUserNameBySecurityCode(n,r){return B(this,null,function*(){let o=yield this._connector.getUserNameBySecurityCode(n,r);return o&&o.validationResult&&o.validationResult.success?o.resultObject:null})}logout(){return B(this,null,function*(){return yield this._connector.logOut()})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=pt({token:e,factory:e.\u0275fac});let i=e;return i})();var lg=(()=>{let e=class e{constructor(n){this._adapterService=n,this.type=Sh.UserNameAndPasswordEntry,this.userLoggedIn=new Ai}getLoginRequest(){let n=new PKe.LoginRequest;return n.upId=this.upId,n.userName=this.username,n.userPassword=this.password,n.clientVersion=this.clientVersion,n.clientLanguage=this.clientLanguage,n.clientDeviceFingerprint=this.clientDeviceFingerprint,n}init(n){this.username&&(n.username=this.username),this._adapterService.connect(n)}checkAndPrepareKeycloak(){return this._adapterService.checkAndPrepareKeycloak()}login(n){return this._adapterService.login(n)}confirmCode(n,r,o,s,a,l,c){return B(this,null,function*(){return this._adapterService.confirmCode(n,r,o,s,a,l,c)})}resetGoogleAuth(n,r){return B(this,null,function*(){return this._adapterService.resetGoogleAuth(n,r)})}changePassword(n,r,o){return B(this,null,function*(){return this._adapterService.changePassword(n,r,o)})}changePasswordAndActivateUser(n,r,o,s){return B(this,null,function*(){return this._adapterService.changePasswordAndActivateUser(n,r,o,s)})}sendResetPasswordOrInviteMessage(n,r,o){return B(this,null,function*(){return this._adapterService.sendResetPasswordOrInviteMessage(n,r,o)})}getUserGoogleAuthBarcode(){return this._adapterService.getUserGoogleAuthBarcode()}checkAndStoreGoogleAuth(n){return this._adapterService.checkAndStoreGoogleAuth(n)}isUserHasToSetUpGoogleAuthentication(){return this._adapterService.isUserHasToSetUpGoogleAuthentication()}getUserNameBySecurityCode(n,r){return B(this,null,function*(){return this._adapterService.getUserNameBySecurityCode(n,r)})}logout(){return this._adapterService.logout()}};e.\u0275fac=function(r){return new(r||e)(Ut(Vb))},e.\u0275prov=pt({token:e,factory:e.\u0275fac});let i=e;return i})();var nr="primary",FF=Symbol("RouteTitle"),Sme=class{params;constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}};function sN(i){return new Sme(i)}function GKe(i,e,t){let n=t.path.split("/");if(n.length>i.length||t.pathMatch==="full"&&(e.hasChildren()||n.length<i.length))return null;let r={};for(let o=0;o<n.length;o++){let s=n[o],a=i[o];if(s[0]===":")r[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:i.slice(0,n.length),posParams:r}}function g5t(i,e){if(i.length!==e.length)return!1;for(let t=0;t<i.length;++t)if(!cg(i[t],e[t]))return!1;return!0}function cg(i,e){let t=i?Cme(i):void 0,n=e?Cme(e):void 0;if(!t||!n||t.length!=n.length)return!1;let r;for(let o=0;o<t.length;o++)if(r=t[o],!HKe(i[r],e[r]))return!1;return!0}function Cme(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}function HKe(i,e){if(Array.isArray(i)&&Array.isArray(e)){if(i.length!==e.length)return!1;let t=[...i].sort(),n=[...e].sort();return t.every((r,o)=>n[o]===r)}else return i===e}function WKe(i){return i.length>0?i[i.length-1]:null}function EA(i){return k4(i)?i:tT(i)?gs(Promise.resolve(i)):Cn(i)}var A5t={exact:zKe,subset:YKe},jKe={exact:T5t,subset:S5t,ignored:()=>!0};function MKe(i,e,t){return A5t[t.paths](i.root,e.root,t.matrixParams)&&jKe[t.queryParams](i.queryParams,e.queryParams)&&!(t.fragment==="exact"&&i.fragment!==e.fragment)}function T5t(i,e){return cg(i,e)}function zKe(i,e,t){if(!rN(i.segments,e.segments)||!FK(i.segments,e.segments,t)||i.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!i.children[n]||!zKe(i.children[n],e.children[n],t))return!1;return!0}function S5t(i,e){return Object.keys(e).length<=Object.keys(i).length&&Object.keys(e).every(t=>HKe(i[t],e[t]))}function YKe(i,e,t){return KKe(i,e,e.segments,t)}function KKe(i,e,t,n){if(i.segments.length>t.length){let r=i.segments.slice(0,t.length);return!(!rN(r,t)||e.hasChildren()||!FK(r,t,n))}else if(i.segments.length===t.length){if(!rN(i.segments,t)||!FK(i.segments,t,n))return!1;for(let r in e.children)if(!i.children[r]||!YKe(i.children[r],e.children[r],n))return!1;return!0}else{let r=t.slice(0,i.segments.length),o=t.slice(i.segments.length);return!rN(i.segments,r)||!FK(i.segments,r,n)||!i.children[nr]?!1:KKe(i.children[nr],e,o,n)}}function FK(i,e,t){return e.every((n,r)=>jKe[t](i[r].parameters,n.parameters))}var ug=class{root;queryParams;fragment;_queryParamMap;constructor(e=new wo([],{}),t={},n=null){this.root=e,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap??=sN(this.queryParams),this._queryParamMap}toString(){return O5t.serialize(this)}},wo=class{segments;children;parent=null;constructor(e,t){this.segments=e,this.children=t,Object.values(t).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return UK(this)}},AC=class{path;parameters;_parameterMap;constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap??=sN(this.parameters),this._parameterMap}toString(){return XKe(this)}};function C5t(i,e){return rN(i,e)&&i.every((t,n)=>cg(t.parameters,e[n].parameters))}function rN(i,e){return i.length!==e.length?!1:i.every((t,n)=>t.path===e[n].path)}function R5t(i,e){let t=[];return Object.entries(i.children).forEach(([n,r])=>{n===nr&&(t=t.concat(e(r,n)))}),Object.entries(i.children).forEach(([n,r])=>{n!==nr&&(t=t.concat(e(r,n)))}),t}var aN=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:()=>new TC,providedIn:"root"})}return i})(),TC=class{parse(e){let t=new Ome(e);return new ug(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){let t=`/${IF(e.root,!0)}`,n=v5t(e.queryParams),r=typeof e.fragment=="string"?`#${I5t(e.fragment)}`:"";return`${t}${n}${r}`}},O5t=new TC;function UK(i){return i.segments.map(e=>XKe(e)).join("/")}function IF(i,e){if(!i.hasChildren())return UK(i);if(e){let t=i.children[nr]?IF(i.children[nr],!1):"",n=[];return Object.entries(i.children).forEach(([r,o])=>{r!==nr&&n.push(`${r}:${IF(o,!1)}`)}),n.length>0?`${t}(${n.join("//")})`:t}else{let t=R5t(i,(n,r)=>r===nr?[IF(i.children[nr],!1)]:[`${r}:${IF(n,!1)}`]);return Object.keys(i.children).length===1&&i.children[nr]!=null?`${UK(i)}/${t[0]}`:`${UK(i)}/(${t.join("//")})`}}function qKe(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function kK(i){return qKe(i).replace(/%3B/gi,";")}function I5t(i){return encodeURI(i)}function Rme(i){return qKe(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function BK(i){return decodeURIComponent(i)}function kKe(i){return BK(i.replace(/\+/g,"%20"))}function XKe(i){return`${Rme(i.path)}${N5t(i.parameters)}`}function N5t(i){return Object.entries(i).map(([e,t])=>`;${Rme(e)}=${Rme(t)}`).join("")}function v5t(i){let e=Object.entries(i).map(([t,n])=>Array.isArray(n)?n.map(r=>`${kK(t)}=${kK(r)}`).join("&"):`${kK(t)}=${kK(n)}`).filter(t=>t);return e.length?`?${e.join("&")}`:""}var D5t=/^[^\/()?;#]+/;function mme(i){let e=i.match(D5t);return e?e[0]:""}var y5t=/^[^\/()?;=#]+/;function b5t(i){let e=i.match(y5t);return e?e[0]:""}var L5t=/^[^=?&#]+/;function w5t(i){let e=i.match(L5t);return e?e[0]:""}var P5t=/^[^&#]+/;function M5t(i){let e=i.match(P5t);return e?e[0]:""}var Ome=class{url;remaining;constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new wo([],{}):new wo([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n[nr]=new wo(e,t)),n}parseSegment(){let e=mme(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new wt(4009,!1);return this.capture(e),new AC(BK(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let t=b5t(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let r=mme(this.remaining);r&&(n=r,this.capture(n))}e[BK(t)]=BK(n)}parseQueryParam(e){let t=w5t(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let s=M5t(this.remaining);s&&(n=s,this.capture(n))}let r=kKe(t),o=kKe(n);if(e.hasOwnProperty(r)){let s=e[r];Array.isArray(s)||(s=[s],e[r]=s),s.push(o)}else e[r]=o}parseParens(e){let t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=mme(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new wt(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=nr);let s=this.parseChildren();t[o??nr]=Object.keys(s).length===1&&s[nr]?s[nr]:new wo([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new wt(4011,!1)}};function ZKe(i){return i.segments.length>0?new wo([],{[nr]:i}):i}function QKe(i){let e={};for(let[n,r]of Object.entries(i.children)){let o=QKe(r);if(n===nr&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))e[s]=a;else(o.segments.length>0||o.hasChildren())&&(e[n]=o)}let t=new wo(i.segments,e);return k5t(t)}function k5t(i){if(i.numberOfChildren===1&&i.children[nr]){let e=i.children[nr];return new wo(i.segments.concat(e.segments),e.children)}return i}function Yb(i){return i instanceof ug}function JKe(i,e,t=null,n=null){let r=$Ke(i);return eqe(r,e,t,n)}function $Ke(i){let e;function t(o){let s={};for(let l of o.children){let c=t(l);s[l.outlet]=c}let a=new wo(o.url,s);return o===i&&(e=a),a}let n=t(i.root),r=ZKe(n);return e??r}function eqe(i,e,t,n){let r=i;for(;r.parent;)r=r.parent;if(e.length===0)return gme(r,r,r,t,n);let o=x5t(e);if(o.toRoot())return gme(r,r,new wo([],{}),t,n);let s=F5t(o,r,i),a=s.processChildren?vF(s.segmentGroup,s.index,o.commands):iqe(s.segmentGroup,s.index,o.commands);return gme(r,s.segmentGroup,a,t,n)}function VK(i){return typeof i=="object"&&i!=null&&!i.outlets&&!i.segmentPath}function yF(i){return typeof i=="object"&&i!=null&&i.outlets}function gme(i,e,t,n,r){let o={};n&&Object.entries(n).forEach(([l,c])=>{o[l]=Array.isArray(c)?c.map(d=>`${d}`):`${c}`});let s;i===e?s=t:s=tqe(i,e,t);let a=ZKe(QKe(s));return new ug(a,o,r)}function tqe(i,e,t){let n={};return Object.entries(i.children).forEach(([r,o])=>{o===e?n[r]=t:n[r]=tqe(o,e,t)}),new wo(i.segments,n)}var GK=class{isAbsolute;numberOfDoubleDots;commands;constructor(e,t,n){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=n,e&&n.length>0&&VK(n[0]))throw new wt(4003,!1);let r=n.find(yF);if(r&&r!==WKe(n))throw new wt(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function x5t(i){if(typeof i[0]=="string"&&i.length===1&&i[0]==="/")return new GK(!0,0,i);let e=0,t=!1,n=i.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?t=!0:a===".."?e++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new GK(t,e,n)}var Wb=class{segmentGroup;processChildren;index;constructor(e,t,n){this.segmentGroup=e,this.processChildren=t,this.index=n}};function F5t(i,e,t){if(i.isAbsolute)return new Wb(e,!0,0);if(!t)return new Wb(e,!1,NaN);if(t.parent===null)return new Wb(t,!0,0);let n=VK(i.commands[0])?0:1,r=t.segments.length-1+n;return U5t(t,r,i.numberOfDoubleDots)}function U5t(i,e,t){let n=i,r=e,o=t;for(;o>r;){if(o-=r,n=n.parent,!n)throw new wt(4005,!1);r=n.segments.length}return new Wb(n,!1,r-o)}function B5t(i){return yF(i[0])?i[0].outlets:{[nr]:i}}function iqe(i,e,t){if(i??=new wo([],{}),i.segments.length===0&&i.hasChildren())return vF(i,e,t);let n=V5t(i,e,t),r=t.slice(n.commandIndex);if(n.match&&n.pathIndex<i.segments.length){let o=new wo(i.segments.slice(0,n.pathIndex),{});return o.children[nr]=new wo(i.segments.slice(n.pathIndex),i.children),vF(o,0,r)}else return n.match&&r.length===0?new wo(i.segments,{}):n.match&&!i.hasChildren()?Ime(i,e,t):n.match?vF(i,0,r):Ime(i,e,t)}function vF(i,e,t){if(t.length===0)return new wo(i.segments,{});{let n=B5t(t),r={};if(Object.keys(n).some(o=>o!==nr)&&i.children[nr]&&i.numberOfChildren===1&&i.children[nr].segments.length===0){let o=vF(i.children[nr],e,t);return new wo(i.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=iqe(i.children[o],e,s))}),Object.entries(i.children).forEach(([o,s])=>{n[o]===void 0&&(r[o]=s)}),new wo(i.segments,r)}}function V5t(i,e,t){let n=0,r=e,o={match:!1,pathIndex:0,commandIndex:0};for(;r<i.segments.length;){if(n>=t.length)return o;let s=i.segments[r],a=t[n];if(yF(a))break;let l=`${a}`,c=n<t.length-1?t[n+1]:null;if(r>0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!FKe(l,c,s))return o;n+=2}else{if(!FKe(l,{},s))return o;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function Ime(i,e,t){let n=i.segments.slice(0,e),r=0;for(;r<t.length;){let o=t[r];if(yF(o)){let l=G5t(o.outlets);return new wo(n,l)}if(r===0&&VK(t[0])){let l=i.segments[e];n.push(new AC(l.path,xKe(t[0]))),r++;continue}let s=yF(o)?o.outlets[nr]:`${o}`,a=r<t.length-1?t[r+1]:null;s&&a&&VK(a)?(n.push(new AC(s,xKe(a))),r+=2):(n.push(new AC(s,{})),r++)}return new wo(n,{})}function G5t(i){let e={};return Object.entries(i).forEach(([t,n])=>{typeof n=="string"&&(n=[n]),n!==null&&(e[t]=Ime(new wo([],{}),0,n))}),e}function xKe(i){let e={};return Object.entries(i).forEach(([t,n])=>e[t]=`${n}`),e}function FKe(i,e,t){return i==t.path&&cg(e,t.parameters)}var jb="imperative",zl=(function(i){return i[i.NavigationStart=0]="NavigationStart",i[i.NavigationEnd=1]="NavigationEnd",i[i.NavigationCancel=2]="NavigationCancel",i[i.NavigationError=3]="NavigationError",i[i.RoutesRecognized=4]="RoutesRecognized",i[i.ResolveStart=5]="ResolveStart",i[i.ResolveEnd=6]="ResolveEnd",i[i.GuardsCheckStart=7]="GuardsCheckStart",i[i.GuardsCheckEnd=8]="GuardsCheckEnd",i[i.RouteConfigLoadStart=9]="RouteConfigLoadStart",i[i.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",i[i.ChildActivationStart=11]="ChildActivationStart",i[i.ChildActivationEnd=12]="ChildActivationEnd",i[i.ActivationStart=13]="ActivationStart",i[i.ActivationEnd=14]="ActivationEnd",i[i.Scroll=15]="Scroll",i[i.NavigationSkipped=16]="NavigationSkipped",i})(zl||{}),gf=class{id;url;constructor(e,t){this.id=e,this.url=t}},SC=class extends gf{type=zl.NavigationStart;navigationTrigger;restoredState;constructor(e,t,n="imperative",r=null){super(e,t),this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},lE=class extends gf{urlAfterRedirects;type=zl.NavigationEnd;constructor(e,t,n){super(e,t),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Du=(function(i){return i[i.Redirect=0]="Redirect",i[i.SupersededByNewNavigation=1]="SupersededByNewNavigation",i[i.NoDataFromResolver=2]="NoDataFromResolver",i[i.GuardRejected=3]="GuardRejected",i[i.Aborted=4]="Aborted",i})(Du||{}),Kb=(function(i){return i[i.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",i[i.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",i})(Kb||{}),dg=class extends gf{reason;code;type=zl.NavigationCancel;constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},hg=class extends gf{reason;code;type=zl.NavigationSkipped;constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r}},qb=class extends gf{error;target;type=zl.NavigationError;constructor(e,t,n,r){super(e,t),this.error=n,this.target=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},bF=class extends gf{urlAfterRedirects;state;type=zl.RoutesRecognized;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},HK=class extends gf{urlAfterRedirects;state;type=zl.GuardsCheckStart;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},WK=class extends gf{urlAfterRedirects;state;shouldActivate;type=zl.GuardsCheckEnd;constructor(e,t,n,r,o){super(e,t),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},jK=class extends gf{urlAfterRedirects;state;type=zl.ResolveStart;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},zK=class extends gf{urlAfterRedirects;state;type=zl.ResolveEnd;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},YK=class{route;type=zl.RouteConfigLoadStart;constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},KK=class{route;type=zl.RouteConfigLoadEnd;constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},qK=class{snapshot;type=zl.ChildActivationStart;constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},XK=class{snapshot;type=zl.ChildActivationEnd;constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ZK=class{snapshot;type=zl.ActivationStart;constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},QK=class{snapshot;type=zl.ActivationEnd;constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Xb=class{routerEvent;position;anchor;type=zl.Scroll;constructor(e,t,n){this.routerEvent=e,this.position=t,this.anchor=n}toString(){let e=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${e}')`}},LF=class{},Zb=class{url;navigationBehaviorOptions;constructor(e,t){this.url=e,this.navigationBehaviorOptions=t}};function H5t(i){return!(i instanceof LF)&&!(i instanceof Zb)}function W5t(i,e){return i.providers&&!i._injector&&(i._injector=vv(i.providers,e,`Route: ${i.path}`)),i._injector??e}function aE(i){return i.outlet||nr}function j5t(i,e){let t=i.filter(n=>aE(n)===e);return t.push(...i.filter(n=>aE(n)!==e)),t}function $b(i){if(!i)return null;if(i.routeConfig?._injector)return i.routeConfig._injector;for(let e=i.parent;e;e=e.parent){let t=e.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}var JK=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return $b(this.route?.snapshot)??this.rootInjector}constructor(e){this.rootInjector=e,this.children=new lN(this.rootInjector)}},lN=(()=>{class i{rootInjector;contexts=new Map;constructor(t){this.rootInjector=t}onChildOutletCreated(t,n){let r=this.getOrCreateContext(t);r.outlet=n,this.contexts.set(t,r)}onChildOutletDestroyed(t){let n=this.getContext(t);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){let t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let n=this.getContext(t);return n||(n=new JK(this.rootInjector),this.contexts.set(t,n)),n}getContext(t){return this.contexts.get(t)||null}static \u0275fac=function(n){return new(n||i)(Ut(Ds))};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),$K=class{_root;constructor(e){this._root=e}get root(){return this._root.value}parent(e){let t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){let t=Nme(e,this._root);return t?t.children.map(n=>n.value):[]}firstChild(e){let t=Nme(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){let t=vme(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return vme(e,this._root).map(t=>t.value)}};function Nme(i,e){if(i===e.value)return e;for(let t of e.children){let n=Nme(i,t);if(n)return n}return null}function vme(i,e){if(i===e.value)return[e];for(let t of e.children){let n=vme(i,t);if(n.length)return n.unshift(e),n}return[]}var mf=class{value;children;constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}};function Hb(i){let e={};return i&&i.children.forEach(t=>e[t.value.outlet]=t),e}var wF=class extends $K{snapshot;constructor(e,t){super(e),this.snapshot=t,kme(this,e)}toString(){return this.snapshot.toString()}};function nqe(i){let e=z5t(i),t=new Es([new AC("",{})]),n=new Es({}),r=new Es({}),o=new Es({}),s=new Es(""),a=new CC(t,n,o,s,r,nr,i,e.root);return a.snapshot=e.root,new wF(new mf(a,[]),e)}function z5t(i){let e={},t={},n={},o=new oN([],e,n,"",t,nr,i,null,{});return new PF("",new mf(o,[]))}var CC=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(e,t,n,r,o,s,a,l){this.urlSubject=e,this.paramsSubject=t,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(Ir(c=>c[FF]))??Cn(void 0),this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=o}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.params.pipe(Ir(e=>sN(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Ir(e=>sN(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function eq(i,e,t="emptyOnly"){let n,{routeConfig:r}=i;return e!==null&&(t==="always"||r?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:Ct(Ct({},e.params),i.params),data:Ct(Ct({},e.data),i.data),resolve:Ct(Ct(Ct(Ct({},i.data),e.data),r?.data),i._resolvedData)}:n={params:Ct({},i.params),data:Ct({},i.data),resolve:Ct(Ct({},i.data),i._resolvedData??{})},r&&oqe(r)&&(n.resolve[FF]=r.title),n}var oN=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[FF]}constructor(e,t,n,r,o,s,a,l,c){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c}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??=sN(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=sN(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),t=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${t}')`}},PF=class extends $K{url;constructor(e,t){super(t),this.url=e,kme(this,t)}toString(){return rqe(this._root)}};function kme(i,e){e.value._routerState=i,e.children.forEach(t=>kme(i,t))}function rqe(i){let e=i.children.length>0?` { ${i.children.map(rqe).join(", ")} } `:"";return`${i.value}${e}`}function Ame(i){if(i.snapshot){let e=i.snapshot,t=i._futureSnapshot;i.snapshot=t,cg(e.queryParams,t.queryParams)||i.queryParamsSubject.next(t.queryParams),e.fragment!==t.fragment&&i.fragmentSubject.next(t.fragment),cg(e.params,t.params)||i.paramsSubject.next(t.params),g5t(e.url,t.url)||i.urlSubject.next(t.url),cg(e.data,t.data)||i.dataSubject.next(t.data)}else i.snapshot=i._futureSnapshot,i.dataSubject.next(i._futureSnapshot.data)}function Dme(i,e){let t=cg(i.params,e.params)&&C5t(i.url,e.url),n=!i.parent!=!e.parent;return t&&!n&&(!i.parent||Dme(i.parent,e.parent))}function oqe(i){return typeof i.title=="string"||i.title===null}var sqe=new si(""),UF=(()=>{class i{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=nr;activateEvents=new re;deactivateEvents=new re;attachEvents=new re;detachEvents=new re;routerOutletData=GCe();parentContexts=dt(lN);location=dt(js);changeDetector=dt(pn);inputBinder=dt(BF,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(t){if(t.name){let{firstChange:n,previousValue:r}=t.name;if(n)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new wt(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new wt(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new wt(4012,!1);this.location.detach();let t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,n){this.activated=t,this._activatedRoute=n,this.location.insert(t.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){let t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,n){if(this.isActivated)throw new wt(4013,!1);this._activatedRoute=t;let r=this.location,s=t.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new yme(t,a,r.injector,this.routerOutletData);this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:n}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(n){return new(n||i)};static \u0275dir=rn({type:i,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[ll]})}return i})(),yme=class{route;childContexts;parent;outletData;constructor(e,t,n,r){this.route=e,this.childContexts=t,this.parent=n,this.outletData=r}get(e,t){return e===CC?this.route:e===lN?this.childContexts:e===sqe?this.outletData:this.parent.get(e,t)}},BF=new si(""),xme=(()=>{class i{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(t){this.unsubscribeFromRouteData(t),this.subscribeToRouteData(t)}unsubscribeFromRouteData(t){this.outletDataSubscriptions.get(t)?.unsubscribe(),this.outletDataSubscriptions.delete(t)}subscribeToRouteData(t){let{activatedRoute:n}=t,r=uL([n.queryParams,n.params,n.data]).pipe(Ql(([o,s,a],l)=>(a=Ct(Ct(Ct({},o),s),a),l===0?Cn(a):Promise.resolve(a)))).subscribe(o=>{if(!t.isActivated||!t.activatedComponentRef||t.activatedRoute!==n||n.component===null){this.unsubscribeFromRouteData(t);return}let s=YCe(n.component);if(!s){this.unsubscribeFromRouteData(t);return}for(let{templateName:a}of s.inputs)t.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(t,r)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:i.\u0275fac})}return i})(),Fme=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Fe({type:i,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(n,r){n&1&&j(0,"router-outlet")},dependencies:[UF],encapsulation:2})}return i})();function Ume(i){let e=i.children&&i.children.map(Ume),t=e?Hi(Ct({},i),{children:e}):Ct({},i);return!t.component&&!t.loadComponent&&(e||t.loadChildren)&&t.outlet&&t.outlet!==nr&&(t.component=Fme),t}function Y5t(i,e,t){let n=MF(i,e._root,t?t._root:void 0);return new wF(n,e)}function MF(i,e,t){if(t&&i.shouldReuseRoute(e.value,t.value.snapshot)){let n=t.value;n._futureSnapshot=e.value;let r=K5t(i,e,t);return new mf(n,r)}else{if(i.shouldAttach(e.value)){let o=i.retrieve(e.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>MF(i,a)),s}}let n=q5t(e.value),r=e.children.map(o=>MF(i,o));return new mf(n,r)}}function K5t(i,e,t){return e.children.map(n=>{for(let r of t.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return MF(i,n,r);return MF(i,n)})}function q5t(i){return new CC(new Es(i.url),new Es(i.params),new Es(i.queryParams),new Es(i.fragment),new Es(i.data),i.outlet,i.component,i)}var Qb=class{redirectTo;navigationBehaviorOptions;constructor(e,t){this.redirectTo=e,this.navigationBehaviorOptions=t}},aqe="ngNavigationCancelingError";function tq(i,e){let{redirectTo:t,navigationBehaviorOptions:n}=Yb(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=lqe(!1,Du.Redirect);return r.url=t,r.navigationBehaviorOptions=n,r}function lqe(i,e){let t=new Error(`NavigationCancelingError: ${i||""}`);return t[aqe]=!0,t.cancellationCode=e,t}function X5t(i){return cqe(i)&&Yb(i.url)}function cqe(i){return!!i&&i[aqe]}var Z5t=(i,e,t,n)=>Ir(r=>(new bme(e,r.targetRouterState,r.currentRouterState,t,n).activate(i),r)),bme=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(e,t,n,r,o){this.routeReuseStrategy=e,this.futureState=t,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=o}activate(e){let t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),Ame(this.futureState.root),this.activateChildRoutes(t,n,e)}deactivateChildRoutes(e,t,n){let r=Hb(t);e.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],n),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(e,t,n){let r=e.value,o=t?t.value:null;if(r===o)if(r.component){let s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,n);else o&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,o=Hb(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,o=Hb(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,t,n){let r=Hb(t);e.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],n),this.forwardEvent(new QK(o.value.snapshot))}),e.children.length&&this.forwardEvent(new XK(e.value.snapshot))}activateRoutes(e,t,n){let r=e.value,o=t?t.value:null;if(Ame(r),r===o)if(r.component){let s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,n);else if(r.component){let s=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Ame(a.route.value),this.activateChildRoutes(e,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(e,null,s.children)}else this.activateChildRoutes(e,null,n)}},iq=class{path;route;constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},zb=class{component;route;constructor(e,t){this.component=e,this.route=t}};function Q5t(i,e,t){let n=i._root,r=e?e._root:null;return NF(n,r,t,[n.value])}function J5t(i){let e=i.routeConfig?i.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:i,guards:e}}function e2(i,e){let t=Symbol(),n=e.get(i,t);return n===t?typeof i=="function"&&!MZ(i)?i:e.get(i):n}function NF(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=Hb(e);return i.children.forEach(s=>{$5t(s,o[s.value.outlet],t,n.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>DF(a,t.getContext(s),r)),r}function $5t(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=i.value,s=e?e.value:null,a=t?t.getContext(i.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let l=e4t(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new iq(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?NF(i,e,a?a.children:null,n,r):NF(i,e,t,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new zb(a.outlet.component,s))}else s&&DF(e,a,r),r.canActivateChecks.push(new iq(n)),o.component?NF(i,null,a?a.children:null,n,r):NF(i,null,t,n,r);return r}function e4t(i,e,t){if(typeof t=="function")return t(i,e);switch(t){case"pathParamsChange":return!rN(i.url,e.url);case"pathParamsOrQueryParamsChange":return!rN(i.url,e.url)||!cg(i.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Dme(i,e)||!cg(i.queryParams,e.queryParams);case"paramsChange":default:return!Dme(i,e)}}function DF(i,e,t){let n=Hb(i),r=i.value;Object.entries(n).forEach(([o,s])=>{r.component?e?DF(s,e.children.getContext(o),t):DF(s,null,t):DF(s,e,t)}),r.component?e&&e.outlet&&e.outlet.isActivated?t.canDeactivateChecks.push(new zb(e.outlet.component,r)):t.canDeactivateChecks.push(new zb(null,r)):t.canDeactivateChecks.push(new zb(null,r))}function VF(i){return typeof i=="function"}function t4t(i){return typeof i=="boolean"}function i4t(i){return i&&VF(i.canLoad)}function n4t(i){return i&&VF(i.canActivate)}function r4t(i){return i&&VF(i.canActivateChild)}function o4t(i){return i&&VF(i.canDeactivate)}function s4t(i){return i&&VF(i.canMatch)}function dqe(i){return i instanceof Gg||i?.name==="EmptyError"}var xK=Symbol("INITIAL_VALUE");function Jb(){return Ql(i=>uL(i.map(e=>e.pipe(up(1),oR(xK)))).pipe(Ir(e=>{for(let t of e)if(t!==!0){if(t===xK)return xK;if(t===!1||a4t(t))return t}return!0}),ol(e=>e!==xK),up(1)))}function a4t(i){return Yb(i)||i instanceof Qb}function l4t(i,e){return ra(t=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return s.length===0&&o.length===0?Cn(Hi(Ct({},t),{guardsResult:!0})):c4t(s,n,r,i).pipe(ra(a=>a&&t4t(a)?d4t(n,o,i,e):Cn(a)),Ir(a=>Hi(Ct({},t),{guardsResult:a})))})}function c4t(i,e,t,n){return gs(i).pipe(ra(r=>p4t(r.component,r.route,t,e,n)),Wg(r=>r!==!0,!0))}function d4t(i,e,t,n){return gs(e).pipe(GA(r=>nv(h4t(r.route.parent,n),u4t(r.route,n),_4t(i,r.path,t),f4t(i,r.route,t))),Wg(r=>r!==!0,!0))}function u4t(i,e){return i!==null&&e&&e(new ZK(i)),Cn(!0)}function h4t(i,e){return i!==null&&e&&e(new qK(i)),Cn(!0)}function f4t(i,e,t){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return Cn(!0);let r=n.map(o=>hL(()=>{let s=$b(e)??t,a=e2(o,s),l=n4t(a)?a.canActivate(e,i):cd(s,()=>a(e,i));return EA(l).pipe(Wg())}));return Cn(r).pipe(Jb())}function _4t(i,e,t){let n=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>J5t(s)).filter(s=>s!==null).map(s=>hL(()=>{let a=s.guards.map(l=>{let c=$b(s.node)??t,d=e2(l,c),u=r4t(d)?d.canActivateChild(n,i):cd(c,()=>d(n,i));return EA(u).pipe(Wg())});return Cn(a).pipe(Jb())}));return Cn(o).pipe(Jb())}function p4t(i,e,t,n,r){let o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||o.length===0)return Cn(!0);let s=o.map(a=>{let l=$b(e)??r,c=e2(a,l),d=o4t(c)?c.canDeactivate(i,e,t,n):cd(l,()=>c(i,e,t,n));return EA(d).pipe(Wg())});return Cn(s).pipe(Jb())}function E4t(i,e,t,n){let r=e.canLoad;if(r===void 0||r.length===0)return Cn(!0);let o=r.map(s=>{let a=e2(s,i),l=i4t(a)?a.canLoad(e,t):cd(i,()=>a(e,t));return EA(l)});return Cn(o).pipe(Jb(),uqe(n))}function uqe(i){return uZ(sl(e=>{if(typeof e!="boolean")throw tq(i,e)}),Ir(e=>e===!0))}function m4t(i,e,t,n){let r=e.canMatch;if(!r||r.length===0)return Cn(!0);let o=r.map(s=>{let a=e2(s,i),l=s4t(a)?a.canMatch(e,t):cd(i,()=>a(e,t));return EA(l)});return Cn(o).pipe(Jb(),uqe(n))}var kF=class{segmentGroup;constructor(e){this.segmentGroup=e||null}},xF=class extends Error{urlTree;constructor(e){super(),this.urlTree=e}};function Gb(i){return tv(new kF(i))}function g4t(i){return tv(new wt(4e3,!1))}function A4t(i){return tv(lqe(!1,Du.GuardRejected))}var Lme=class{urlSerializer;urlTree;constructor(e,t){this.urlSerializer=e,this.urlTree=t}lineralizeSegments(e,t){let n=[],r=t.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return Cn(n);if(r.numberOfChildren>1||!r.children[nr])return g4t(`${e.redirectTo}`);r=r.children[nr]}}applyRedirectCommands(e,t,n,r,o){return T4t(t,r,o).pipe(Ir(s=>{if(s instanceof ug)throw new xF(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),e,n);if(s[0]==="/")throw new xF(a);return a}))}applyRedirectCreateUrlTree(e,t,n,r){let o=this.createSegmentGroup(e,t.root,n,r);return new ug(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){let n={};return Object.entries(e).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);n[r]=t[a]}else n[r]=o}),n}createSegmentGroup(e,t,n,r){let o=this.createSegments(e,t.segments,n,r),s={};return Object.entries(t.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(e,l,n,r)}),new wo(o,s)}createSegments(e,t,n,r){return t.map(o=>o.path[0]===":"?this.findPosParam(e,o,r):this.findOrReturn(o,n))}findPosParam(e,t,n){let r=n[t.path.substring(1)];if(!r)throw new wt(4001,!1);return r}findOrReturn(e,t){let n=0;for(let r of t){if(r.path===e.path)return t.splice(n),r;n++}return e}};function T4t(i,e,t){if(typeof i=="string")return Cn(i);let n=i,{queryParams:r,fragment:o,routeConfig:s,url:a,outlet:l,params:c,data:d,title:u}=e;return EA(cd(t,()=>n({params:c,data:d,queryParams:r,fragment:o,routeConfig:s,url:a,outlet:l,title:u})))}var wme={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function S4t(i,e,t,n,r){let o=hqe(i,e,t);return o.matched?(n=W5t(e,n),m4t(n,e,t,r).pipe(Ir(s=>s===!0?o:Ct({},wme)))):Cn(o)}function hqe(i,e,t){if(e.path==="**")return C4t(t);if(e.path==="")return e.pathMatch==="full"&&(i.hasChildren()||t.length>0)?Ct({},wme):{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};let r=(e.matcher||GKe)(t,i,e);if(!r)return Ct({},wme);let o={};Object.entries(r.posParams??{}).forEach(([a,l])=>{o[a]=l.path});let s=r.consumed.length>0?Ct(Ct({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function C4t(i){return{matched:!0,parameters:i.length>0?WKe(i).parameters:{},consumedSegments:i,remainingSegments:[],positionalParamSegments:{}}}function UKe(i,e,t,n){return t.length>0&&I4t(i,t,n)?{segmentGroup:new wo(e,O4t(n,new wo(t,i.children))),slicedSegments:[]}:t.length===0&&N4t(i,t,n)?{segmentGroup:new wo(i.segments,R4t(i,t,n,i.children)),slicedSegments:t}:{segmentGroup:new wo(i.segments,i.children),slicedSegments:t}}function R4t(i,e,t,n){let r={};for(let o of t)if(rq(i,e,o)&&!n[aE(o)]){let s=new wo([],{});r[aE(o)]=s}return Ct(Ct({},n),r)}function O4t(i,e){let t={};t[nr]=e;for(let n of i)if(n.path===""&&aE(n)!==nr){let r=new wo([],{});t[aE(n)]=r}return t}function I4t(i,e,t){return t.some(n=>rq(i,e,n)&&aE(n)!==nr)}function N4t(i,e,t){return t.some(n=>rq(i,e,n))}function rq(i,e,t){return(i.hasChildren()||e.length>0)&&t.pathMatch==="full"?!1:t.path===""}function v4t(i,e,t){return e.length===0&&!i.children[t]}var Pme=class{};function D4t(i,e,t,n,r,o,s="emptyOnly"){return new Mme(i,e,t,n,r,s,o).recognize()}var y4t=31,Mme=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(e,t,n,r,o,s,a){this.injector=e,this.configLoader=t,this.rootComponentType=n,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Lme(this.urlSerializer,this.urlTree)}noMatchError(e){return new wt(4002,`'${e.segmentGroup}'`)}recognize(){let e=UKe(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(Ir(({children:t,rootSnapshot:n})=>{let r=new mf(n,t),o=new PF("",r),s=JKe(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(e){let t=new oN([],Object.freeze({}),Object.freeze(Ct({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),nr,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,nr,t).pipe(Ir(n=>({children:n,rootSnapshot:t})),Hg(n=>{if(n instanceof xF)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof kF?this.noMatchError(n):n}))}processSegmentGroup(e,t,n,r,o){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,t,n,o):this.processSegment(e,t,n,n.segments,r,!0,o).pipe(Ir(s=>s instanceof mf?[s]:[]))}processChildren(e,t,n,r){let o=[];for(let s of Object.keys(n.children))s==="primary"?o.unshift(s):o.push(s);return gs(o).pipe(GA(s=>{let a=n.children[s],l=j5t(t,s);return this.processSegmentGroup(e,l,a,s,r)}),TZ((s,a)=>(s.push(...a),s)),HA(null),AZ(),ra(s=>{if(s===null)return Gb(n);let a=fqe(s);return b4t(a),Cn(a)}))}processSegment(e,t,n,r,o,s,a){return gs(t).pipe(GA(l=>this.processSegmentAgainstRoute(l._injector??e,t,l,n,r,o,s,a).pipe(Hg(c=>{if(c instanceof kF)return Cn(null);throw c}))),Wg(l=>!!l),Hg(l=>{if(dqe(l))return v4t(n,r,o)?Cn(new Pme):Gb(n);throw l}))}processSegmentAgainstRoute(e,t,n,r,o,s,a,l){return aE(n)!==s&&(s===nr||!rq(r,o,n))?Gb(r):n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,r,n,o,s,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,r,t,n,o,s,l):Gb(r)}expandSegmentAgainstRouteUsingRedirect(e,t,n,r,o,s,a){let{matched:l,parameters:c,consumedSegments:d,positionalParamSegments:u,remainingSegments:h}=hqe(t,r,o);if(!l)return Gb(t);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>y4t&&(this.allowRedirects=!1));let f=new oN(o,c,Object.freeze(Ct({},this.urlTree.queryParams)),this.urlTree.fragment,BKe(r),aE(r),r.component??r._loadedComponent??null,r,VKe(r)),_=eq(f,a,this.paramsInheritanceStrategy);return f.params=Object.freeze(_.params),f.data=Object.freeze(_.data),this.applyRedirects.applyRedirectCommands(d,r.redirectTo,u,f,e).pipe(Ql(T=>this.applyRedirects.lineralizeSegments(r,T)),ra(T=>this.processSegment(e,n,t,T.concat(h),s,!1,a)))}matchSegmentAgainstRoute(e,t,n,r,o,s){let a=S4t(t,n,r,e,this.urlSerializer);return n.path==="**"&&(t.children={}),a.pipe(Ql(l=>l.matched?(e=n._injector??e,this.getChildConfig(e,n,r).pipe(Ql(({routes:c})=>{let d=n._loadedInjector??e,{parameters:u,consumedSegments:h,remainingSegments:f}=l,_=new oN(h,u,Object.freeze(Ct({},this.urlTree.queryParams)),this.urlTree.fragment,BKe(n),aE(n),n.component??n._loadedComponent??null,n,VKe(n)),p=eq(_,s,this.paramsInheritanceStrategy);_.params=Object.freeze(p.params),_.data=Object.freeze(p.data);let{segmentGroup:T,slicedSegments:g}=UKe(t,h,f,c);if(g.length===0&&T.hasChildren())return this.processChildren(d,c,T,_).pipe(Ir(w=>new mf(_,w)));if(c.length===0&&g.length===0)return Cn(new mf(_,[]));let y=aE(n)===o;return this.processSegment(d,c,T,g,y?nr:o,!0,_).pipe(Ir(w=>new mf(_,w instanceof mf?[w]:[])))}))):Gb(t)))}getChildConfig(e,t,n){return t.children?Cn({routes:t.children,injector:e}):t.loadChildren?t._loadedRoutes!==void 0?Cn({routes:t._loadedRoutes,injector:t._loadedInjector}):E4t(e,t,n,this.urlSerializer).pipe(ra(r=>r?this.configLoader.loadChildren(e,t).pipe(sl(o=>{t._loadedRoutes=o.routes,t._loadedInjector=o.injector})):A4t(t))):Cn({routes:[],injector:e})}};function b4t(i){i.sort((e,t)=>e.value.outlet===nr?-1:t.value.outlet===nr?1:e.value.outlet.localeCompare(t.value.outlet))}function L4t(i){let e=i.value.routeConfig;return e&&e.path===""}function fqe(i){let e=[],t=new Set;for(let n of i){if(!L4t(n)){e.push(n);continue}let r=e.find(o=>n.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...n.children),t.add(r)):e.push(n)}for(let n of t){let r=fqe(n.children);e.push(new mf(n.value,r))}return e.filter(n=>!t.has(n))}function BKe(i){return i.data||{}}function VKe(i){return i.resolve||{}}function w4t(i,e,t,n,r,o){return ra(s=>D4t(i,e,t,n,s.extractedUrl,r,o).pipe(Ir(({state:a,tree:l})=>Hi(Ct({},s),{targetSnapshot:a,urlAfterRedirects:l}))))}function P4t(i,e){return ra(t=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return Cn(t);let o=new Set(r.map(l=>l.route)),s=new Set;for(let l of o)if(!s.has(l))for(let c of _qe(l))s.add(c);let a=0;return gs(s).pipe(GA(l=>o.has(l)?M4t(l,n,i,e):(l.data=eq(l,l.parent,i).resolve,Cn(void 0))),sl(()=>a++),sv(1),ra(l=>a===s.size?Cn(t):ld))})}function _qe(i){let e=i.children.map(t=>_qe(t)).flat();return[i,...e]}function M4t(i,e,t,n){let r=i.routeConfig,o=i._resolve;return r?.title!==void 0&&!oqe(r)&&(o[FF]=r.title),hL(()=>(i.data=eq(i,i.parent,t).resolve,k4t(o,i,e,n).pipe(Ir(s=>(i._resolvedData=s,i.data=Ct(Ct({},i.data),s),null)))))}function k4t(i,e,t,n){let r=Cme(i);if(r.length===0)return Cn({});let o={};return gs(r).pipe(ra(s=>x4t(i[s],e,t,n).pipe(Wg(),sl(a=>{if(a instanceof Qb)throw tq(new TC,a);o[s]=a}))),sv(1),Ir(()=>o),Hg(s=>dqe(s)?ld:tv(s)))}function x4t(i,e,t,n){let r=$b(e)??n,o=e2(i,r),s=o.resolve?o.resolve(e,t):cd(r,()=>o(e,t));return EA(s)}function Tme(i){return Ql(e=>{let t=i(e);return t?gs(t).pipe(Ir(()=>e)):Cn(e)})}var Bme=(()=>{class i{buildTitle(t){let n,r=t.root;for(;r!==void 0;)n=this.getResolvedTitleForRoute(r)??n,r=r.children.find(o=>o.outlet===nr);return n}getResolvedTitleForRoute(t){return t.data[FF]}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:()=>dt(pqe),providedIn:"root"})}return i})(),pqe=(()=>{class i extends Bme{title;constructor(t){super(),this.title=t}updateTitle(t){let n=this.buildTitle(t);n!==void 0&&this.title.setTitle(n)}static \u0275fac=function(n){return new(n||i)(Ut(DRe))};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),cN=new si("",{providedIn:"root",factory:()=>({})}),t2=new si(""),oq=(()=>{class i{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=dt(p$);loadComponent(t,n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Cn(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=EA(cd(t,()=>n.loadComponent())).pipe(Ir(mqe),Ql(gqe),sl(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),fL(()=>{this.componentLoaders.delete(n)})),o=new XN(r,()=>new Ai).pipe(qN());return this.componentLoaders.set(n,o),o}loadChildren(t,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return Cn({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);let o=Eqe(n,this.compiler,t,this.onLoadEndListener).pipe(fL(()=>{this.childrenLoaders.delete(n)})),s=new XN(o,()=>new Ai).pipe(qN());return this.childrenLoaders.set(n,s),s}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Eqe(i,e,t,n){return EA(cd(t,()=>i.loadChildren())).pipe(Ir(mqe),Ql(gqe),ra(r=>r instanceof nB||Array.isArray(r)?Cn(r):gs(e.compileModuleAsync(r))),Ir(r=>{n&&n(i);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(t).injector,s=o.get(t2,[],{optional:!0,self:!0}).flat()),{routes:s.map(Ume),injector:o}}))}function F4t(i){return i&&typeof i=="object"&&"default"in i}function mqe(i){return F4t(i)?i.default:i}function gqe(i){return Cn(i)}var sq=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:()=>dt(U4t),providedIn:"root"})}return i})(),U4t=(()=>{class i{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,n){return t}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Vme=new si(""),Gme=new si("");function Aqe(i,e,t){let n=i.get(Gme),r=i.get(Mr);if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,new Promise(c=>setTimeout(c));let o,s=new Promise(c=>{o=c}),a=r.startViewTransition(()=>(o(),B4t(i)));a.ready.catch(c=>{});let{onViewTransitionCreated:l}=n;return l&&cd(i,()=>l({transition:a,from:e,to:t})),s}function B4t(i){return new Promise(e=>{YE({read:()=>setTimeout(e)},{injector:i})})}var Hme=new si(""),aq=(()=>{class i{currentNavigation=zd(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new Ai;transitionAbortWithErrorSubject=new Ai;configLoader=dt(oq);environmentInjector=dt(Ds);destroyRef=dt(Ep);urlSerializer=dt(aN);rootContexts=dt(lN);location=dt(XE);inputBindingEnabled=dt(BF,{optional:!0})!==null;titleStrategy=dt(Bme);options=dt(cN,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=dt(sq);createViewTransition=dt(Vme,{optional:!0});navigationErrorHandler=dt(Hme,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>Cn(void 0);rootComponentType=null;destroyed=!1;constructor(){let t=r=>this.events.next(new YK(r)),n=r=>this.events.next(new KK(r));this.configLoader.onLoadEndListener=n,this.configLoader.onLoadStartListener=t,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(t){let n=++this.navigationId;kc(()=>{this.transitions?.next(Hi(Ct({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:n}))})}setupNavigations(t){return this.transitions=new Es(null),this.transitions.pipe(ol(n=>n!==null),Ql(n=>{let r=!1;return Cn(n).pipe(Ql(o=>{if(this.navigationId>n.id)return this.cancelNavigationTransition(n,"",Du.SupersededByNewNavigation),ld;this.currentTransition=n,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?Hi(Ct({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let s=!t.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??t.onSameUrlNavigation;if(!s&&a!=="reload")return this.events.next(new hg(o.id,this.urlSerializer.serialize(o.rawUrl),"",Kb.IgnoredSameUrlNavigation)),o.resolve(!1),ld;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return Cn(o).pipe(Ql(l=>(this.events.next(new SC(l.id,this.urlSerializer.serialize(l.extractedUrl),l.source,l.restoredState)),l.id!==this.navigationId?ld:Promise.resolve(l))),w4t(this.environmentInjector,this.configLoader,this.rootComponentType,t.config,this.urlSerializer,this.paramsInheritanceStrategy),sl(l=>{n.targetSnapshot=l.targetSnapshot,n.urlAfterRedirects=l.urlAfterRedirects,this.currentNavigation.update(d=>(d.finalUrl=l.urlAfterRedirects,d));let c=new bF(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:l,extractedUrl:c,source:d,restoredState:u,extras:h}=o,f=new SC(l,this.urlSerializer.serialize(c),d,u);this.events.next(f);let _=nqe(this.rootComponentType).snapshot;return this.currentTransition=n=Hi(Ct({},o),{targetSnapshot:_,urlAfterRedirects:c,extras:Hi(Ct({},h),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(p=>(p.finalUrl=c,p)),Cn(n)}else return this.events.next(new hg(o.id,this.urlSerializer.serialize(o.extractedUrl),"",Kb.IgnoredByUrlHandlingStrategy)),o.resolve(!1),ld}),sl(o=>{let s=new HK(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),Ir(o=>(this.currentTransition=n=Hi(Ct({},o),{guards:Q5t(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),n)),l4t(this.environmentInjector,o=>this.events.next(o)),sl(o=>{if(n.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw tq(this.urlSerializer,o.guardsResult);let s=new WK(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),ol(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",Du.GuardRejected),!1)),Tme(o=>{if(o.guards.canActivateChecks.length!==0)return Cn(o).pipe(sl(s=>{let a=new jK(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),Ql(s=>{let a=!1;return Cn(s).pipe(P4t(this.paramsInheritanceStrategy,this.environmentInjector),sl({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",Du.NoDataFromResolver)}}))}),sl(s=>{let a=new zK(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),Tme(o=>{let s=a=>{let l=[];if(a.routeConfig?.loadComponent){let c=$b(a)??this.environmentInjector;l.push(this.configLoader.loadComponent(c,a.routeConfig).pipe(sl(d=>{a.component=d}),Ir(()=>{})))}for(let c of a.children)l.push(...s(c));return l};return uL(s(o.targetSnapshot.root)).pipe(HA(null),up(1))}),Tme(()=>this.afterPreactivation()),Ql(()=>{let{currentSnapshot:o,targetSnapshot:s}=n,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?gs(a).pipe(Ir(()=>n)):Cn(n)}),Ir(o=>{let s=Y5t(t.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=n=Hi(Ct({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),n}),sl(()=>{this.events.next(new LF)}),Z5t(this.rootContexts,t.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),up(1),xE(new $n(o=>{let s=n.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(ol(()=>!r&&!n.targetRouterState),sl(()=>{this.cancelNavigationTransition(n,n.abortController.signal.reason+"",Du.Aborted)}))),sl({next:o=>{r=!0,this.lastSuccessfulNavigation=kc(this.currentNavigation),this.events.next(new lE(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),xE(this.transitionAbortWithErrorSubject.pipe(sl(o=>{throw o}))),fL(()=>{r||this.cancelNavigationTransition(n,"",Du.SupersededByNewNavigation),this.currentTransition?.id===n.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Hg(o=>{if(this.destroyed)return n.resolve(!1),ld;if(r=!0,cqe(o))this.events.next(new dg(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode)),X5t(o)?this.events.next(new Zb(o.url,o.navigationBehaviorOptions)):n.resolve(!1);else{let s=new qb(n.id,this.urlSerializer.serialize(n.extractedUrl),o,n.targetSnapshot??void 0);try{let a=cd(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof Qb){let{message:l,cancellationCode:c}=tq(this.urlSerializer,a);this.events.next(new dg(n.id,this.urlSerializer.serialize(n.extractedUrl),l,c)),this.events.next(new Zb(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?n.resolve(!1):n.reject(a)}}return ld}))}))}cancelNavigationTransition(t,n,r){let o=new dg(t.id,this.urlSerializer.serialize(t.extractedUrl),n,r);this.events.next(o),t.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let t=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),n=kc(this.currentNavigation),r=n?.targetBrowserUrl??n?.extractedUrl;return t.toString()!==r?.toString()&&!n?.extras.skipLocationChange}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function V4t(i){return i!==jb}var Tqe=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:()=>dt(G4t),providedIn:"root"})}return i})(),nq=class{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}},G4t=(()=>{class i extends nq{static \u0275fac=(()=>{let t;return function(r){return(t||(t=fo(i)))(r||i)}})();static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Sqe=(()=>{class i{urlSerializer=dt(aN);options=dt(cN,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=dt(XE);urlHandlingStrategy=dt(sq);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new ug;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:t,initialUrl:n,targetBrowserUrl:r}){let o=t!==void 0?this.urlHandlingStrategy.merge(t,n):n,s=r??o;return s instanceof ug?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:t,finalUrl:n,initialUrl:r}){n&&t?(this.currentUrlTree=n,this.rawUrlTree=this.urlHandlingStrategy.merge(n,r),this.routerState=t):this.rawUrlTree=r}routerState=nqe(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:t}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t??this.rawUrlTree)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:()=>dt(H4t),providedIn:"root"})}return i})(),H4t=(()=>{class i extends Sqe{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(t){return this.location.subscribe(n=>{n.type==="popstate"&&setTimeout(()=>{t(n.url,n.state,"popstate")})})}handleRouterEvent(t,n){t instanceof SC?this.updateStateMemento():t instanceof hg?this.commitTransition(n):t instanceof bF?this.urlUpdateStrategy==="eager"&&(n.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(n),n)):t instanceof LF?(this.commitTransition(n),this.urlUpdateStrategy==="deferred"&&!n.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(n),n)):t instanceof dg&&t.code!==Du.SupersededByNewNavigation&&t.code!==Du.Redirect?this.restoreHistory(n):t instanceof qb?this.restoreHistory(n,!0):t instanceof lE&&(this.lastSuccessfulId=t.id,this.currentPageId=this.browserPageId)}setBrowserUrl(t,{extras:n,id:r}){let{replaceUrl:o,state:s}=n;if(this.location.isCurrentPathEqualTo(t)||o){let a=this.browserPageId,l=Ct(Ct({},s),this.generateNgRouterState(r,a));this.location.replaceState(t,"",l)}else{let a=Ct(Ct({},s),this.generateNgRouterState(r,this.browserPageId+1));this.location.go(t,"",a)}}restoreHistory(t,n=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,o=this.currentPageId-r;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===t.finalUrl&&o===0&&(this.resetInternalState(t),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(n&&this.resetInternalState(t),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,n){return this.canceledNavigationResolution==="computed"?{navigationId:t,\u0275routerPageId:n}:{navigationId:t}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=fo(i)))(r||i)}})();static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function lq(i,e){i.events.pipe(ol(t=>t instanceof lE||t instanceof dg||t instanceof qb||t instanceof hg),Ir(t=>t instanceof lE||t instanceof hg?0:(t instanceof dg?t.code===Du.Redirect||t.code===Du.SupersededByNewNavigation:!1)?2:1),ol(t=>t!==2),up(1)).subscribe(()=>{e()})}var W4t={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},j4t={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},fg=(()=>{class i{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=dt(rB);stateManager=dt(Sqe);options=dt(cN,{optional:!0})||{};pendingTasks=dt(Zg);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=dt(aq);urlSerializer=dt(aN);location=dt(XE);urlHandlingStrategy=dt(sq);injector=dt(Ds);_events=new Ai;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=dt(Tqe);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=dt(t2,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!dt(BF,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:t=>{this.console.warn(t)}}),this.subscribeToNavigationEvents()}eventsSubscription=new so;subscribeToNavigationEvents(){let t=this.navigationTransitions.events.subscribe(n=>{try{let r=this.navigationTransitions.currentTransition,o=kc(this.navigationTransitions.currentNavigation);if(r!==null&&o!==null){if(this.stateManager.handleRouterEvent(n,o),n instanceof dg&&n.code!==Du.Redirect&&n.code!==Du.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof lE)this.navigated=!0;else if(n instanceof Zb){let s=n.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(n.url,r.currentRawUrl),l=Ct({browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||V4t(r.source)},s);this.scheduleNavigation(a,jb,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}H5t(n)&&this._events.next(n)}catch(r){this.navigationTransitions.transitionAbortWithErrorSubject.next(r)}});this.eventsSubscription.add(t)}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),jb,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((t,n,r)=>{this.navigateToSyncWithBrowser(t,r,n)})}navigateToSyncWithBrowser(t,n,r){let o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){let l=Ct({},r);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(o.state=l)}let a=this.parseUrl(t);this.scheduleNavigation(a,n,s,o).catch(l=>{this.disposed||this.injector.get(Pf)(l)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return kc(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(t){this.config=t.map(Ume),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(t,n={}){let{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=n,c=l?this.currentUrlTree.fragment:s,d=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":d=Ct(Ct({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}d!==null&&(d=this.removeEmptyProps(d));let u;try{let h=r?r.snapshot:this.routerState.snapshot.root;u=$Ke(h)}catch{(typeof t[0]!="string"||t[0][0]!=="/")&&(t=[]),u=this.currentUrlTree.root}return eqe(u,t,d,c??null)}navigateByUrl(t,n={skipLocationChange:!1}){let r=Yb(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,jb,null,n)}navigate(t,n={skipLocationChange:!1}){return z4t(t),this.navigateByUrl(this.createUrlTree(t,n),n)}serializeUrl(t){return this.urlSerializer.serialize(t)}parseUrl(t){try{return this.urlSerializer.parse(t)}catch{return this.console.warn(Yg(4018,!1)),this.urlSerializer.parse("/")}}isActive(t,n){let r;if(n===!0?r=Ct({},W4t):n===!1?r=Ct({},j4t):r=n,Yb(t))return MKe(this.currentUrlTree,t,r);let o=this.parseUrl(t);return MKe(this.currentUrlTree,o,r)}removeEmptyProps(t){return Object.entries(t).reduce((n,[r,o])=>(o!=null&&(n[r]=o),n),{})}scheduleNavigation(t,n,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c;s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((u,h)=>{a=u,l=h});let d=this.pendingTasks.add();return lq(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(u=>Promise.reject(u))}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function z4t(i){for(let e=0;e<i.length;e++)if(i[e]==null)throw new wt(4008,!1)}var GF=class{};var Cqe=(()=>{class i{router;injector;preloadingStrategy;loader;subscription;constructor(t,n,r,o){this.router=t,this.injector=n,this.preloadingStrategy=r,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(ol(t=>t instanceof lE),GA(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,n){let r=[];for(let o of n){o.providers&&!o._injector&&(o._injector=vv(o.providers,t,`Route: ${o.path}`));let s=o._injector??t,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return gs(r).pipe(VA())}preloadConfig(t,n){return this.preloadingStrategy.preload(n,()=>{let r;n.loadChildren&&n.canLoad===void 0?r=this.loader.loadChildren(t,n):r=Cn(null);let o=r.pipe(ra(s=>s===null?Cn(void 0):(n._loadedRoutes=s.routes,n._loadedInjector=s.injector,this.processRoutes(s.injector??t,s.routes))));if(n.loadComponent&&!n._loadedComponent){let s=this.loader.loadComponent(t,n);return gs([o,s]).pipe(VA())}else return o})}static \u0275fac=function(n){return new(n||i)(Ut(fg),Ut(Ds),Ut(GF),Ut(oq))};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Rqe=new si(""),Y4t=(()=>{class i{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=jb;restoredId=0;store={};constructor(t,n,r,o,s={}){this.urlSerializer=t,this.transitions=n,this.viewportScroller=r,this.zone=o,this.options=s,s.scrollPositionRestoration||="disabled",s.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof SC?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof lE?(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment)):t instanceof hg&&t.code===Kb.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{if(!(t instanceof Xb))return;let n={behavior:"instant"};t.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0],n):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(t.position,n):t.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(t.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0])})}scheduleScrollEvent(t,n){this.zone.runOutsideAngular(()=>B(this,null,function*(){yield new Promise(r=>{setTimeout(r),typeof requestAnimationFrame<"u"&&requestAnimationFrame(r)}),this.zone.run(()=>{this.transitions.events.next(new Xb(t,this.lastSource==="popstate"?this.store[this.restoredId]:null,n))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(n){$J()};static \u0275prov=pt({token:i,factory:i.\u0275fac})}return i})();function K4t(i){return i.routerState.root}function HF(i,e){return{\u0275kind:i,\u0275providers:e}}function q4t(){let i=dt(mr);return e=>{let t=i.get(Ba);if(e!==t.components[0])return;let n=i.get(fg),r=i.get(Oqe);i.get(jme)===1&&n.initialNavigation(),i.get(vqe,null,{optional:!0})?.setUpPreloading(),i.get(Rqe,null,{optional:!0})?.init(),n.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var Oqe=new si("",{factory:()=>new Ai}),jme=new si("",{providedIn:"root",factory:()=>1});function Iqe(){let i=[{provide:jU,useValue:!0},{provide:jme,useValue:0},yv(()=>{let e=dt(mr);return e.get(w$,Promise.resolve()).then(()=>new Promise(n=>{let r=e.get(fg),o=e.get(Oqe);lq(r,()=>{n(!0)}),e.get(aq).afterPreactivation=()=>(n(!0),o.closed?Cn(void 0):o),r.initialNavigation()}))})];return HF(2,i)}function Nqe(){let i=[yv(()=>{dt(fg).setUpLocationChangeListener()}),{provide:jme,useValue:2}];return HF(3,i)}var vqe=new si("");function Dqe(i){return HF(0,[{provide:vqe,useExisting:Cqe},{provide:GF,useExisting:i}])}function yqe(){return HF(8,[xme,{provide:BF,useExisting:xme}])}function bqe(i){Tp("NgRouterViewTransitions");let e=[{provide:Vme,useValue:Aqe},{provide:Gme,useValue:Ct({skipNextTransition:!!i?.skipInitialTransition},i)}];return HF(9,e)}var Lqe=[XE,{provide:aN,useClass:TC},fg,lN,{provide:CC,useFactory:K4t,deps:[fg]},oq,[]],zme=(()=>{class i{constructor(){}static forRoot(t,n){return{ngModule:i,providers:[Lqe,[],{provide:t2,multi:!0,useValue:t},[],n?.errorHandler?{provide:Hme,useValue:n.errorHandler}:[],{provide:cN,useValue:n||{}},n?.useHash?Z4t():Q4t(),X4t(),n?.preloadingStrategy?Dqe(n.preloadingStrategy).\u0275providers:[],n?.initialNavigation?J4t(n):[],n?.bindToComponentInputs?yqe().\u0275providers:[],n?.enableViewTransitions?bqe().\u0275providers:[],$4t()]}}static forChild(t){return{ngModule:i,providers:[{provide:t2,multi:!0,useValue:t}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Qe({type:i});static \u0275inj=Ze({})}return i})();function X4t(){return{provide:Rqe,useFactory:()=>{let i=dt(TRe),e=dt(Nn),t=dt(cN),n=dt(aq),r=dt(aN);return t.scrollOffset&&i.setOffset(t.scrollOffset),new Y4t(r,n,i,e,t)}}}function Z4t(){return{provide:i0,useClass:B$}}function Q4t(){return{provide:i0,useClass:EB}}function J4t(i){return[i.initialNavigation==="disabled"?Nqe().\u0275providers:[],i.initialNavigation==="enabledBlocking"?Iqe().\u0275providers:[]]}var Wme=new si("");function $4t(){return[{provide:Wme,useFactory:q4t},{provide:sB,multi:!0,useExisting:Wme}]}var cE=(function(i){return i.Sunday="sunday",i.Monday="monday",i.Tuesday="tuesday",i.Wednesday="wednesday",i.Thursday="thursday",i.Friday="friday",i.Saturday="saturday",i})(cE||{});var hs=(function(i){return i.January="JANUARY",i.Februrary="FEBRUARY",i.March="MARCH",i.April="APRIL",i.May="MAY",i.June="JUNE",i.July="JULY",i.August="AUGUST",i.September="SEPTEMBER",i.October="OCTOBER",i.November="NOVEMBER",i.December="DECEMBER",i})(hs||{});var _g=[hs.January,hs.Februrary,hs.March,hs.April,hs.May,hs.June,hs.July,hs.August,hs.September,hs.October,hs.November,hs.December];function dE(i){return i!=null}var Kme=Be(wqe());var cq=class{constructor(){}};Date.prototype.toJSON=function(){return(0,Kme.default)(this).format("YYYY-MM-DD[T]HH:mm:ss")};var Tc=class Tc{static NowAsString(){return Tc.ParseDate(new Date,Tc.BACKEND_DATE_FORMAT)}static ParseDate(e,t="d-m-y"){if(!e)return"";let n=("0"+e.getDate()).slice(-2),r=("0"+(e.getMonth()+1)).slice(-2),o=e.getFullYear()+"",s=t.split("-"),a=[];for(let l=0,c=s.length;l<c;l++)switch(s[l]){case"d":case"DD":a.push(n);break;case"m":case"MM":a.push(r);break;case"y":case"YYYY":a.push(o);break;default:break}return a.join("-")}static GetWeekNumber(e){return e=new Date(e.getTime()),e.setHours(0,0,0,0),e.setDate(e.getDate()+4-(e.getDay()||7)),Math.ceil(((e.getTime()-new Date(e.getFullYear(),0,1).getTime())/864e5+1)/7)}static GetDaysFromNow(e){return Tc.GetDayDifference(new Date(Date.now()),e)}static StringAsDate(e,t=Tc.BACKEND_DATE_FORMAT){if(dE(e))if(isNaN(Number(e))){let n=(0,Kme.default)(e,t,!0);return n.isValid()?new Date(n):void 0}else return new Date(e);else return}static MomentToDate(e){if(!e||!e.isValid())return;let t=new Date(e.format(Tc.BACKEND_DATE_FORMAT));return t.setHours(e.hours()),t.setMinutes(e.minutes()),t.setSeconds(e.seconds()),t}static GetCurrentMonth(){return _g[new Date().getMonth()]}static Get12MonthsArrayWithFirstMonthIsCurrentMonth(){let e=[],t=new Date().getMonth();for(let n=0;n<12;n++)e.push(_g[t]),t=(t+1)%_g.length;return e}static GetFirstDayOfWeek(e){if(!Tc._ValidDate(e))return null;let t,n=e.getDay()||7;return n===1?t=new Date(e):(t=new Date(e),t.setHours(-24*(n-1))),t}static GetLastDayOfWeek(e){let t=Tc.GetFirstDayOfWeek(e),n=new Date(t);return n.setDate(t.getDate()+6),n}static GetFirstDayOfMonth(e){if(!Tc._ValidDate(e))return null;let t=e.getFullYear(),n=e.getMonth();return new Date(t,n,1)}static GetLastDayOfMonth(e){if(!Tc._ValidDate(e))return null;let t=e.getFullYear(),n=e.getMonth();return new Date(t,n+1,0)}static DatesEqual(e,t){let n=!1;return Tc._ValidDate(e)&&Tc._ValidDate(t)&&(n=e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()),n}static DateRangeEqual(e,t){return this.DatesEqual(e.startDate,t.startDate)&&this.DatesEqual(e.endDate,t.endDate)}static AddMinutes(e,t){return new Date(e.getTime()+t*6e4)}static AddDays(e,t){let n=new Date(e);return n.setDate(n.getDate()+t),n}static AddMonths(e,t){let n=new Date(e);return n.setMonth(n.getMonth()+t),n}static DetermineDSTBreakpoints(){let e=new Date(new Date().getFullYear(),11,1),t=new Date(new Date().getFullYear(),0,1),n=t.getTimezoneOffset(),r=new Date,o=!1,s=new Date,a=!1;for(;t.getTime()<e.getTime()&&(t=this.AddMinutes(t,60),n<t.getTimezoneOffset()?(s.setTime(t.getTime()),a=!0):n>t.getTimezoneOffset()&&(r.setTime(t.getTime()),o=!0),n=t.getTimezoneOffset(),!(o&&a)););return o&&a?{start:this._DateToTimeStringWithDateFormat(r),end:this._DateToTimeStringWithDateFormat(s)}:{start:void 0,end:void 0}}static _ValidDate(e){return e!=null}static GetDayDifference(e,t){return!e||!t?NaN:(t.getTime()-e.getTime())/1e3/60/60/24}static IsSameDay(e,t){return e&&t&&e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}static IsInBetween(e,t,n,r=!0){if(t&&n){if(r)return e>t&&e<n;{let o=new Date(e).setHours(0,0,0,0),s=new Date(t).setHours(0,0,0,0),a=new Date(n).setHours(0,0,0,0);return o>=s&&o<=a}}}static IsMonday(e){return e.getDay()===1}static IsSunday(e){return e.getDay()===0}static IsToday(e){let t=new Date;return Tc.IsSameDay(t,e)}static ParseDateInShortDateFormat(e,t){return this.datePipe=new Er(t),this.datePipe.transform(e)}static getFormattedDateRangeString(e,t=" - "){let n=e;return n=n.replace("<=?<=",` ${t} `),n=n.replace(/'/g,""),n}static SetDateOrDateRangeObjectHoursZero(e){e instanceof cq?(e.startDate&&e.startDate.setHours(0,0,0),e.endDate&&e.endDate.setHours(0,0,0)):e&&e instanceof Date&&e.setHours(0,0,0,0)}static GetMonthAsNumber(e){return Tc.monthMap.get(e)}static _DateToTimeStringWithDateFormat(e,t="d-m-y"){if(!e)return"";let n=e.getHours()<10?"0"+e.getHours():""+e.getHours(),r=e.getMinutes()<10?"0"+e.getMinutes():""+e.getMinutes();return this.ParseDate(e,t)+" "+[n,r].join(":")}};Tc.BACKEND_DATE_FORMAT="YYYY-MM-DD[T]HH:mm:ss",Tc.datePipe=new Er("shortDate"),Tc.monthMap=new Map([[hs.January,1],[hs.Februrary,2],[hs.March,3],[hs.April,4],[hs.May,5],[hs.June,6],[hs.July,7],[hs.August,8],[hs.September,9],[hs.October,10],[hs.November,11],[hs.December,12]]);var ro=Tc;function iUt(i,e){if(i&1){let t=de();O(0,"div",1),W("click",function(){let r=F(t).$implicit,o=R();return o.year=r,U(o.yearChange.emit(o.year))}),I()}if(i&2){let t=e.$implicit,n=R();we("selected-year",t===n.year),S("textContent",t)}}var Pqe=(()=>{let e=class e{constructor(){this.yearChange=new re,this.years=[]}ngOnInit(){this.years.length=0;let n=this._determineStart(),r=n+11;for(;n<r;)this.years.push(n),n++}_determineStart(){if(this.year>0){let n=this.year,r=parseInt(n.toString().split("").pop());for(;r>0;)n--,r=parseInt(n.toString().split("").pop());return n}return 0}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["calendar-all-years"]],inputs:{year:"year"},outputs:{yearChange:"yearChange"},standalone:!1,decls:2,vars:0,consts:[[1,"pointer-hover",3,"textContent","selected-year"],[1,"pointer-hover",3,"click","textContent"]],template:function(r,o){r&1&&Pt(0,iUt,1,3,"div",0,zt),r&2&&Mt(o.years)},encapsulation:2});let i=e;return i})();function rUt(i,e){if(i&1){let t=de();O(0,"div",1),W("click",function(){let r=F(t).$index,o=R();return o.month=r,U(o.monthChange.emit(o.month))}),I()}if(i&2){let t=e.$implicit,n=e.$index,r=R();we("selected-month",r.month===n),S("textContent",t)}}var Mqe=(()=>{let e=class e{constructor(){this.shortDescriptions=!1,this.monthChange=new re,this.months=[]}ngOnInit(){this.months.length=0,this.months=_g}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["calendar-all-months"]],inputs:{month:"month",shortDescriptions:"shortDescriptions"},outputs:{monthChange:"monthChange"},standalone:!1,decls:2,vars:0,consts:[[1,"pointer-hover",3,"selected-month","textContent"],[1,"pointer-hover",3,"click","textContent"]],template:function(r,o){r&1&&Pt(0,rUt,1,3,"div",0,zt),r&2&&Mt(o.months)},encapsulation:2});let i=e;return i})();function sUt(i,e){if(i&1){let t=de();O(0,"div",8),W("clickOutside",function(){F(t);let r=R(2);return U(r.hideMonthYearSelection())}),O(1,"div")(2,"calendar-all-months",9),W("monthChange",function(r){F(t);let o=R(2);return U(o.setNewMonth(r))}),I(),j(3,"div",10),O(4,"calendar-all-years",11),W("yearChange",function(r){F(t);let o=R(2);return U(o.setNewYear(r))}),I()()()}if(i&2){let t=R(2);we("expanded",t.expanded),S("@showMonthYearSelect",void 0),m(2),S("month",t.currentMonth)("shortDescriptions",!0),m(2),S("year",t.currentYear)}}function aUt(i,e){if(i&1&&$(0,sUt,5,6,"div",7),i&2){let t=R();ee(t.showMonthYearSelect?0:-1)}}var kqe=(()=>{let e=class e{constructor(n){this.iconCacheService=n,this.selectedDate=new Date,this.selectedDateChange=new re,this.icons=ot,this.showMonthYearSelect=!1,this.expanded=!1}ngDoCheck(){if(this.selectedDate){let n=_g[this.selectedDate.getMonth()];this.currentMonth=ro.GetMonthAsNumber(n),this.currentYear=this.selectedDate.getFullYear()}}subMonth(){let n=new Date(this.selectedDate);n.setMonth(n.getMonth()-1),this.selectedDate=n,this.selectedDateChange.emit(this.selectedDate)}addMonth(){let n=new Date(this.selectedDate);n.setMonth(n.getMonth()+1),this.selectedDate=n,this.selectedDateChange.emit(this.selectedDate)}hideMonthYearSelection(){this.expanded=!1,this.showMonthYearSelect=!1}setNewMonth(n){this.selectedMonth=n}setNewYear(n){this.selectedYear=n}changeMonthYear(){this.hideMonthYearSelection();let n=new Date(this.selectedDate);n.setMonth(this.selectedMonth),n.setFullYear(this.selectedYear),this.selectedDate=n,this.selectedDateChange.emit(this.selectedDate)}};e.\u0275fac=function(r){return new(r||e)(Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["calendar-header"]],inputs:{selectedDate:"selectedDate"},outputs:{selectedDateChange:"selectedDateChange"},standalone:!1,decls:9,vars:4,consts:[["monthYearSelect",""],["template",""],[1,"calendar-header-row"],[1,"pointer-hover",3,"click","iconData"],[3,"click"],[1,"month",3,"textContent"],[1,"year",3,"textContent"],[1,"select-month-year-window",3,"expanded"],[1,"select-month-year-window",3,"clickOutside"],[3,"monthChange","month","shortDescriptions"],[1,"vertical-divider"],[3,"yearChange","year"]],template:function(r,o){if(r&1){let s=de();O(0,"div",2,0)(2,"co-icon",3),W("click",function(){return F(s),U(o.subMonth())}),I(),O(3,"div",4),W("click",function(){return F(s),U(o.showMonthYearSelect=!0)}),j(4,"div",5)(5,"div",6),I(),O(6,"co-icon",3),W("click",function(){return F(s),U(o.addMonth())}),I()(),Yt(7,aUt,1,1,"ng-template",null,1,zi)}r&2&&(m(2),S("iconData",o.iconCacheService.getIcon(o.icons.ArrowPointLeft)),m(2),S("textContent",o.currentMonth),m(),S("textContent",o.currentYear),m(),S("iconData",o.iconCacheService.getIcon(o.icons.ArrowPointRight)))},dependencies:[ri,Pqe,Mqe],encapsulation:2,data:{animation:[ao("showMonthYearSelect",[xn("void",on({"transform-origin":"top center",transform:"scaleY(0)"})),xn("*",on({"transform-origin":"top center",transform:"scaleY(1)"})),qr(":enter, :leave",[Gr("200ms ease-in-out")])])]}});let i=e;return i})();var qme=(()=>{let e=class e{transform(n,r=0){return!n||n<0?[]:Array.from({length:Math.round(n)},(o,s)=>s+r)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=Pc({name:"arrayNumber",type:e,pure:!0,standalone:!1});let i=e;return i})();var Xme=(()=>{let e=class e{transform(n){return typeof n=="string"?n.charAt(0).toUpperCase()+n.slice(1):n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=Pc({name:"ucfirst",type:e,pure:!0,standalone:!1});let i=e;return i})();function dUt(i,e){if(i&1&&(j(0,"div",3),le(1,"ucfirst")),i&2){let t=e.$implicit;S("textContent",ge(1,1,t))}}function uUt(i,e){if(i&1){let t=de();O(0,"div",7),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.onDateClick(r))}),I()}if(i&2){let t=e.$implicit;S("textContent",t.day)}}function hUt(i,e){if(i&1&&(O(0,"div",4),j(1,"div",5),Pt(2,uUt,1,1,"div",6,bv().trackByStamp,!0),I()),i&2){let t=e.$implicit;m(),S("textContent",t[0].week),m(),Mt(t)}}var xqe=(()=>{let e=class e{set view(n){this._view=n,this._selectDays()}get view(){return this._view}set selectedDate(n){this._selectedDate=n,this._selectedDate.setHours(0,0,0,0),this._prepareWeeks()}get selectedDate(){return this._selectedDate}constructor(n){this._locale=n,this.selectedDateChange=new re,this.trackByStamp=(r,o)=>o&&o.timestamp||r,this.trackByWeek=(r,o)=>o&&o[0].week||r,this.weekDayLabel=[],this.weeks=[],this._selectedDate=new Date,this._view=Dn.ThreeDaysView,this.selectedDate.setHours(0,0,0,0),this._setLabels()}onDateClick(n){this.selectedDate=new Date(n.timestamp),this.selectedDateChange.emit(this.selectedDate),this._selectDays()}_setLabels(){let n=new Er(this._locale),r=this.selectedDate.getDay(),o=new Date(this.selectedDate.getTime());o.setDate(o.getDate()-r-1),this.weekDayLabel=new qme().transform(7).map(()=>(o.setDate(o.getDate()+1),n.transform(o,"E"))),this.weekDayLabel.push(this.weekDayLabel.shift())}_prepareWeeks(){this.weeks.length=0;let n=new Date(this.selectedDate.getTime());n.setHours(0,0,0,0),n.setMonth(n.getMonth()+1),n.setDate(0);let r=n.getDay(),o=n.getDate(),s=r?7-r:0;n.setDate(1);let a=n.getDay(),l=a?a-1:6;n.setDate(-l+1);let c=Math.ceil((l+s+o)/7),d=ro.GetWeekNumber(n),u=d+c-1;for(let h=d;h<=u;h++){let f=h;d>50&&(f=ro.GetWeekNumber(n));let _=[];for(let p=1;p<=7;p++){let T=!0;h===d?T=p>l:h===u&&(T=p<=7-s);let g=n.getTime();_.push({week:f,inMonth:T,day:n.getDate(),timestamp:g,selected:this.selectedDate.getTime()===g}),n.setDate(n.getDate()+1)}this.weeks.push(_)}this._selectDays()}_selectDays(){if(this._resetSelection(),!this.selectedDate)return;let n=ro.GetWeekNumber(this.selectedDate),r=this.weeks.length;for(let o=0;o<r;o++){let s=this.weeks[o].length;for(let a=0;a<s;a++)this.weeks[o][a].inMonth&&this.view===Dn.MonthView?this.weeks[o][a].selected=!0:this.weeks[o][a].week===n&&this.view===Dn.WeekView?this.weeks[o][a].selected=!0:this.weeks[o][a].timestamp===this.selectedDate.getTime()&&this.view===Dn.WeekSelectView?this.weeks[o][a].selected=!0:this.weeks[o][a].timestamp===this.selectedDate.getTime()&&this.view===Dn.DayView&&(this.weeks[o][a].selected=!0)}}_resetSelection(){let n=this.weeks.length;for(let r=0;r<n;r++){let o=this.weeks[r].length;for(let s=0;s<o;s++)this.weeks[r][s].selected=!1}}};e.\u0275fac=function(r){return new(r||e)(Q(cl))},e.\u0275cmp=Fe({type:e,selectors:[["calendar-view"]],inputs:{view:"view",selectedDate:"selectedDate"},outputs:{selectedDateChange:"selectedDateChange"},standalone:!1,decls:8,vars:0,consts:[[1,"calendar-content"],[1,"week-day-header","week-row"],[1,"week-acronym"],[1,"week-day-label",3,"textContent"],[1,"week-row"],[1,"week-number",3,"textContent"],[1,"week-day",3,"textContent"],[1,"week-day",3,"click","textContent"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div")(2,"div",1),j(3,"div",2),Pt(4,dUt,2,3,"div",3,zt),I(),Pt(6,hUt,4,1,"div",4,o.trackByWeek,!0),I()()),r&2&&(m(4),Mt(o.weekDayLabel),m(2),Mt(o.weeks))},dependencies:[Xme],encapsulation:2});let i=e;return i})();var Fqe=(()=>{let e=class e{constructor(){this.view=Dn.ThreeDaysView,this.selectedDate=new Date,this.days=[],this.daysChange=new re,this.selectedDateChange=new re}changeSelectedDate(n){this.selectedDate=n,this.selectedDateChange.emit(this.selectedDate)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["calendar"]],inputs:{view:"view",selectedDate:"selectedDate",days:"days"},outputs:{daysChange:"daysChange",selectedDateChange:"selectedDateChange"},standalone:!1,decls:3,vars:3,consts:[[1,"sc-calendar"],[3,"selectedDateChange","selectedDate"],[3,"selectedDateChange","view","selectedDate"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"calendar-header",1),W("selectedDateChange",function(a){return o.changeSelectedDate(a)}),I(),O(2,"calendar-view",2),W("selectedDateChange",function(a){return o.changeSelectedDate(a)}),I()()),r&2&&(m(),S("selectedDate",o.selectedDate),m(),S("view",o.view)("selectedDate",o.selectedDate))},dependencies:[kqe,xqe],encapsulation:2});let i=e;return i})();var dN=class{constructor(){this.inView=!0,this.newMonth=!1,this.weekdaySelected=!1,this.datesByTheHour=[],this.events=[]}};var mA=class{constructor(){this.weekDays=[]}};var pUt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},EUt=function(i,e){return function(t,n){e(t,n,i)}},xs,RC,yu=(RC=class{constructor(e){this._locale=e,xs.Locale=e}static GetDayHours(e){let t=[];if(e){let n=new Date(e);n.setHours(0,0,0,0),t.push(n);for(let r=0;r<23;r++)n=new Date(n),n.setHours(n.getHours()+1),t.push(n)}return t}static GetDaysOfWeek(e){let t=e?new Date(e):new Date;t=xs.getMonday(t);let n=[],r,o;for(let a=0;a<7;a++){let l=new dN,c=xs.GetDayHours(t);l.newMonth=t.getMonth()!==o,l.weekdaySelected=t.getDay()===e.getDay(),l.weekdayDay=t.getDate(),r={weekday:"short"},l.weekdayShort=t.toLocaleDateString(xs.Locale,r),r={weekday:"long"},l.weekdayLong=t.toLocaleDateString(xs.Locale,r),r={month:"short"},l.weekdayMonthShort=t.toLocaleDateString(xs.Locale,r),r={month:"long"},l.weekdayMonthLong=t.toLocaleDateString(xs.Locale,r),l.weekdayYear=t.getFullYear(),l.date=new Date(t),l.datesByTheHour=c,n.push(l),o=t.getMonth(),t=new Date(t),t.setDate(t.getDate()+1)}let s=new mA;return s.weekDays=n,s}static GetWorkDaysOfWeek(e){let t=e?new Date(e):new Date;t=xs.getMonday(t);let n=[],r,o;for(let a=0;a<5;a++){let l=new dN,c=xs.GetDayHours(t);l.newMonth=t.getMonth()!==o,l.weekdaySelected=t.getDay()===e.getDay(),l.weekdayDay=t.getDate(),r={weekday:"short"},l.weekdayShort=t.toLocaleDateString(xs.Locale,r),r={weekday:"long"},l.weekdayLong=t.toLocaleDateString(xs.Locale,r),r={month:"short"},l.weekdayMonthShort=t.toLocaleDateString(xs.Locale,r),r={month:"long"},l.weekdayMonthLong=t.toLocaleDateString(xs.Locale,r),l.weekdayYear=t.getFullYear(),l.date=new Date(t),l.datesByTheHour=c,n.push(l),o=t.getMonth(),t=new Date(t),t.setDate(t.getDate()+1)}let s=new mA;return s.weekDays=n,s}static GetThreeDays(e){let t;e?t=e:t=new Date;let n=[],r,o;for(let a=0;a<3;a++){let l=new dN,c=xs.GetDayHours(t);l.newMonth=t.getMonth()!==o,l.weekdaySelected=t.getDay()===e.getDay(),l.weekdayDay=t.getDate(),r={weekday:"short"},l.weekdayShort=t.toLocaleDateString(xs.Locale,r),r={weekday:"long"},l.weekdayLong=t.toLocaleDateString(xs.Locale,r),r={month:"short"},l.weekdayMonthShort=t.toLocaleDateString(xs.Locale,r),r={month:"long"},l.weekdayMonthLong=t.toLocaleDateString(xs.Locale,r),l.weekdayYear=t.getFullYear(),l.date=new Date(t),l.datesByTheHour=c,n.push(l),o=t.getMonth(),t=new Date(t),t.setDate(t.getDate()+1)}let s=new mA;return s.weekDays=n,s}static GetDaysAround(e){let t=[],n=e?new Date(e):new Date;n.setHours(0,0,0,0);let r=new Date(n);r.setDate(r.getDate()-2);for(let s=0;s<7;s++){let a=new dN,l=xs.GetDayHours(r);a.newMonth=r.getMonth()!==n.getMonth(),a.weekdaySelected=r.getDate()===n.getDate(),a.weekdayDay=r.getDate();let c={weekday:"short"};a.weekdayShort=r.toLocaleDateString(xs.Locale,c),c={weekday:"long"},a.weekdayLong=r.toLocaleDateString(xs.Locale,c),c={month:"short"},a.weekdayMonthShort=r.toLocaleDateString(xs.Locale,c),c={month:"long"},a.weekdayMonthLong=r.toLocaleDateString(xs.Locale,c),a.weekdayYear=r.getFullYear(),a.date=new Date(r),a.datesByTheHour=l,t.push(a),r.setDate(r.getDate()+1)}let o=new mA;return o.weekDays=t,o}static getMonday(e){let t=new Date(e),n=t.getDay(),r=(n===0?-6:1)-n;return t.setDate(t.getDate()+r),t.setHours(0,0,0,0),t}},xs=RC,RC.Locale=void 0,RC.Now=new Date,RC);yu=xs=pUt([EUt(0,VU(cl))],yu);var dq=class{constructor(){this.checked=!1,this.showCheckbox=!1,this.draggable=!1}};var n2=class{constructor(){this.events=[]}};var r2=class{constructor(){this.weeks=[]}get firstWeek(){if(this.weeks&&this.weeks.length>0)return this.weeks[0]}};var o2=class{constructor(){this.datesByTheHour=[],this.events=[]}};var uq=new dq,Fln=new n2,Uqe=new r2,hq=new mA,Bqe=new o2;var WF=(function(i){return i[i.Left=0]="Left",i[i.Middle=1]="Middle",i[i.Right=2]="Right",i})(WF||{});var fq=class{static FindKeyByValue(e,t){if(!e||!t)return;let n,r=!1;return e.forEach((o,s)=>{!r&&t.call(this,o)&&(n=s,r=!0)}),n}static InsertArrayItemIntoMap(e,t,n){e&&(e.has(t)?e.get(t).push(n):e.set(t,[n]))}};var Vqe=(()=>{let e=class e{get modelAsThumbState(){return this._viewsToThumb.get(this.selectedView)}constructor(){this._viewsToThumb=new Map([[Dn.DayView,WF.Left],[Dn.WeekView,WF.Middle],[Dn.MonthView,WF.Right]]),this.selectedView=Dn.WeekView,this.selectedViewChange=new re,this.CalendarView=Dn}selectView(n){this.selectedView=n,this.selectedViewChange.emit(n)}onThumbStateChange(n){this.selectedView=fq.FindKeyByValue(this._viewsToThumb,r=>r===n),this.selectedViewChange.emit(this.selectedView)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["view-select"]],inputs:{selectedView:"selectedView",selectedFirstDayOfTheWeek:"selectedFirstDayOfTheWeek"},outputs:{selectedViewChange:"selectedViewChange"},standalone:!1,decls:10,vars:15,consts:[[1,"select-wrapper"],[1,"label",3,"click"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div",1),W("click",function(){return o.selectView(o.CalendarView.ThreeDaysView)}),j(2,"span",2),le(3,"sharedLocalize"),I(),O(4,"div",1),W("click",function(){return o.selectView(o.CalendarView.WeekWorkView)}),j(5,"span",2),le(6,"sharedLocalize"),I(),O(7,"div",1),W("click",function(){return o.selectView(o.CalendarView.WeekView)}),j(8,"span",2),le(9,"sharedLocalize"),I()()),r&2&&(m(),we("active",o.selectedView===o.CalendarView.ThreeDaysView),m(),S("textContent",ge(3,9,"THREE_DAYS_VIEW")),m(2),we("active",o.selectedView===o.CalendarView.WeekWorkView),m(),S("textContent",ge(6,11,"FIVE_DAYS_VIEW")),m(2),we("active",o.selectedView===o.CalendarView.WeekView),m(),S("textContent",ge(9,13,"WEEK_VIEW")))},dependencies:[kt],encapsulation:2});let i=e;return i})();function gUt(i,e){if(i&1){let t=de();O(0,"div",0)(1,"div",6)(2,"co-icon",7),W("click",function(){F(t);let r=R();return U(r.subUnit())}),I(),j(3,"div",8),O(4,"co-icon",9),W("click",function(){F(t);let r=R();return U(r.addUnit())}),I()()()}if(i&2){let t=R();m(2),S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft)),m(),S("textContent",t.day.description),m(),S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function AUt(i,e){if(i&1&&(O(0,"div",10),Rn(1),le(2,"date"),le(3,"sharedLocalize"),I()),i&2){let t=R(2);m(),Bh(" ",Wn(2,1,t.selectedDate,"MMMM")+" "+t.selectedDate.getFullYear()+" "+ge(3,4,"WEEK")+": "+t.getWeekNumber(t.selectedDate)," ")}}function TUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function SUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function CUt(i,e){if(i&1){let t=de();O(0,"div",12),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.setUnit(r))}),$(1,TUt,1,1,"co-icon",13),j(2,"div",14)(3,"div",15),$(4,SUt,1,1,"co-icon",16),I()}if(i&2){let t=e.$implicit,n=e.$index,r=R(2);we("selected",t.weekdaySelected),m(),ee(r.showBackButton&&n===0?1:-1),m(),S("textContent",r.capitalizeString(t.weekdayShort)),m(),S("textContent",t.weekdayDay),m(),ee(n===6?4:-1)}}function RUt(i,e){if(i&1&&(O(0,"div",1),$(1,AUt,4,6,"div",10),Pt(2,CUt,5,6,"div",11,zt),I()),i&2){let t=R();m(),ee((t.weekDays==null?null:t.weekDays.length)>0?1:-1),m(),Mt(t.weekDays)}}function OUt(i,e){if(i&1){let t=de();O(0,"div",17)(1,"view-select",20),W("selectedViewChange",function(r){F(t);let o=R(2);return U(o.changeTheView(r))}),I()()}if(i&2){let t=R(2);m(),S("selectedView",t.view)("selectedFirstDayOfTheWeek",t.selectedFirstDayOfTheWeek)}}function IUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function NUt(i,e){if(i&1&&(O(0,"div",10),j(1,"span",22),le(2,"date"),le(3,"sharedLocalize"),I()),i&2){let t=R(3);m(),S("textContent",Wn(2,1,t.selectedDate,"MMMM")+" "+t.selectedDate.getFullYear()+" "+ge(3,4,"WEEK")+": "+t.getWeekNumber(t.selectedDate))}}function vUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function DUt(i,e){if(i&1&&(O(0,"div",6),$(1,IUt,1,1,"co-icon",13),$(2,NUt,4,6,"div",10),j(3,"div",21),$(4,vUt,1,1,"co-icon",16),I()),i&2){let t=e.$implicit,n=e.$index,r=R(2);we("selected",t.weekdaySelected),m(),ee(r.showBackButton&&n===0?1:-1),m(),ee(t.newMonth?2:-1),m(),S("textContent",r.capitalizeString(t.weekdayLong)+" "+t.weekdayDay+" "+r.capitalizeString(t.weekdayMonthLong)+" "+t.weekdayYear),m(),ee(n===2?4:-1)}}function yUt(i,e){if(i&1&&(O(0,"div",2),$(1,OUt,2,2,"div",17),O(2,"div",18),Pt(3,DUt,5,6,"div",19,zt),I()()),i&2){let t=R();m(),ee(t.viewSelection?1:-1),m(2),Mt(t.weekDays)}}function bUt(i,e){if(i&1){let t=de();O(0,"div",17)(1,"view-select",20),W("selectedViewChange",function(r){F(t);let o=R(2);return U(o.changeTheView(r))}),I()()}if(i&2){let t=R(2);m(),S("selectedView",t.view)("selectedFirstDayOfTheWeek",t.selectedFirstDayOfTheWeek)}}function LUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function wUt(i,e){if(i&1&&(O(0,"div",10),j(1,"span",22),le(2,"date"),le(3,"sharedLocalize"),I()),i&2){let t=R(3);m(),S("textContent",Wn(2,1,t.selectedDate,"MMMM")+" "+t.selectedDate.getFullYear()+" "+ge(3,4,"WEEK")+": "+t.getWeekNumber(t.selectedDate))}}function PUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function MUt(i,e){if(i&1){let t=de();O(0,"div",23),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.setUnit(r))}),$(1,LUt,1,1,"co-icon",13),$(2,wUt,4,6,"div",10),O(3,"div",24),j(4,"span",22)(5,"span",22),I(),$(6,PUt,1,1,"co-icon",16),I()}if(i&2){let t=e.$implicit,n=e.$index,r=R(2);we("selected",t.weekdaySelected),m(),ee(r.showBackButton&&n===0?1:-1),m(),ee(t.newMonth?2:-1),m(2),S("textContent",r.capitalizeString(t.weekdayLong)),m(),S("textContent",t.weekdayDay+" "+r.capitalizeString(t.weekdayMonthLong)+" "+t.weekdayYear),m(),ee(n===6?6:-1)}}function kUt(i,e){if(i&1&&(O(0,"div",3),$(1,bUt,2,2,"div",17),O(2,"div",18),Pt(3,MUt,7,7,"div",19,zt),I()()),i&2){let t=R();m(),ee(t.viewSelection?1:-1),m(2),Mt(t.weekDays)}}function xUt(i,e){if(i&1){let t=de();O(0,"div",17)(1,"view-select",20),W("selectedViewChange",function(r){F(t);let o=R(2);return U(o.changeTheView(r))}),I()()}if(i&2){let t=R(2);m(),S("selectedView",t.view)("selectedFirstDayOfTheWeek",t.selectedFirstDayOfTheWeek)}}function FUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function UUt(i,e){if(i&1&&(O(0,"div",10),j(1,"span",22),le(2,"date"),le(3,"sharedLocalize"),I()),i&2){let t=R(3);m(),S("textContent",Wn(2,1,t.selectedDate,"MMMM")+" "+t.selectedDate.getFullYear()+" "+ge(3,4,"WEEK")+": "+t.getWeekNumber(t.selectedDate))}}function BUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function VUt(i,e){if(i&1&&(O(0,"div",6),$(1,FUt,1,1,"co-icon",13),$(2,UUt,4,6,"div",10),O(3,"div",24),j(4,"span",22)(5,"span",22),I(),$(6,BUt,1,1,"co-icon",16),I()),i&2){let t=e.$implicit,n=e.$index,r=R(2);we("selected",t.weekdaySelected),m(),ee(r.showBackButton&&n===0?1:-1),m(),ee(t.newMonth?2:-1),m(2),S("textContent",r.capitalizeString(t.weekdayLong)),m(),S("textContent",t.weekdayDay+" "+r.capitalizeString(t.weekdayMonthLong)+" "+t.weekdayYear),m(),ee(n===4?6:-1)}}function GUt(i,e){if(i&1&&(O(0,"div",4),$(1,xUt,2,2,"div",17),O(2,"div",18),Pt(3,VUt,7,7,"div",19,zt),I()()),i&2){let t=R();m(),ee(t.viewSelection?1:-1),m(2),Mt(t.weekDays)}}function HUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function WUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function jUt(i,e){if(i&1){let t=de();O(0,"div",23),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.setUnit(r))}),$(1,HUt,1,1,"co-icon",13),j(2,"div",26)(3,"div",21),$(4,WUt,1,1,"co-icon",16),I()}if(i&2){let t=e.$implicit,n=e.$index,r=R(2);we("selected",t.weekdaySelected)("selectable",t.events&&t.events.length>0),m(),ee(n===0&&r.showBackButton?1:-1),m(),S("textContent",t.weekdayShort),m(),S("textContent",t.weekdayDay+" "+t.weekdayMonthShort),m(),ee(n===6?4:-1)}}function zUt(i,e){if(i&1&&(O(0,"div",5),Pt(1,jUt,5,8,"div",25,zt),I()),i&2){let t=R();m(),Mt(t.weekDays)}}function YUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function KUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function qUt(i,e){if(i&1&&(O(0,"div",6),$(1,YUt,1,1,"co-icon",13),j(2,"div",26),$(3,KUt,1,1,"co-icon",16),I()),i&2){let t=e.$implicit,n=e.$index,r=R(2);m(),ee(n===0&&r.showBackButton?1:-1),m(),S("textContent",t.weekdayShort),m(),ee(n===6?3:-1)}}function XUt(i,e){if(i&1&&(O(0,"div",5),Pt(1,qUt,4,3,"div",6,zt),I()),i&2){let t=R();m(),Mt(t.weekDays)}}var Gqe=(()=>{let e=class e{set selectedDate(n){this._selectedDate=new Date(n),this._prepareHeaderData()}get selectedDate(){return this._selectedDate}set firstAvailableDate(n){n&&(this._firstAvailableDate=new Date(n),this._prepareHeaderData())}get firstAvailableDate(){return this._firstAvailableDate}set eventsPerDay(n){this._eventsPerDay=n,this._prepareHeaderData()}constructor(n,r,o,s,a){this._locale=n,this._elementRef=r,this._renderer=o,this._ngZone=s,this.iconCacheService=a,this.icons=ot,this.viewTypes=Dn,this.scrollbarWidth=15,this.today=new Date,this.viewChange=new re,this.selectedDateChange=new re,this.rangeChange=new re,this.weekDays=[],this.day=Bqe,this.showBackButton=!0,this._eventsPerDay=[],this._onResize=()=>B(this,null,function*(){this._resizeHost()})}ngOnDestroy(){window.removeEventListener("resize",this._onResize),this._elementRef=void 0}ngOnInit(){this._ngZone.runOutsideAngular(()=>{window.addEventListener("resize",this._onResize)})}ngAfterContentChecked(){this._resizeHost()}subUnit(){if(this.selectedDate){let n=new Date(this.selectedDate);switch(this.view){case Dn.DayView:n.setDate(this.selectedDate.getDate()-1);break;case Dn.DaysAround:n.setDate(this.selectedDate.getDate()-1);break;case Dn.ThreeDaysView:n.setDate(this.selectedDate.getDate()-3);break;case Dn.WeekView:n.setDate(this.selectedDate.getDate()-7);break;case Dn.WeekWorkView:n.setDate(this.selectedDate.getDate()-5);break;case Dn.WeekSelectView:n.setDate(this.selectedDate.getDate()-7);break;case Dn.MonthView:n.setMonth(this.selectedDate.getMonth()-1);break}this.selectedDate=n,this.rangeChange.emit(this.selectedDate)}}addUnit(){if(this.selectedDate){let n=new Date(this.selectedDate);switch(this.view){case Dn.DayView:n.setDate(this.selectedDate.getDate()+1);break;case Dn.DaysAround:n.setDate(this.selectedDate.getDate()+1);break;case Dn.ThreeDaysView:n.setDate(this.selectedDate.getDate()+3);break;case Dn.WeekView:n.setDate(this.selectedDate.getDate()+7);break;case Dn.WeekWorkView:n.setDate(this.selectedDate.getDate()+5);break;case Dn.WeekSelectView:n.setDate(this.selectedDate.getDate()+7);break;case Dn.MonthView:n.setMonth(this.selectedDate.getMonth()+1);break}this.selectedDate=n,this.rangeChange.emit(this.selectedDate)}}setUnit(n){this.selectedDate=n.date,this.selectedDateChange.emit(this.selectedDate)}changeTheView(n){switch(this.view=n,!this.originalSelectedDate&&this._selectedDate&&(this.originalSelectedDate=this._selectedDate),n){case Dn.WeekView:this._selectedDate=this.selectedFirstDayOfTheWeek;break;case Dn.WeekWorkView:this._selectedDate=this.selectedFirstDayOfTheWeek;break;case Dn.ThreeDaysView:this.originalSelectedDate&&(this._selectedDate=this.originalSelectedDate,this.originalSelectedDate=void 0);break}this.viewChange.emit({view:n,date:this._selectedDate}),this._prepareHeaderData()}_resizeHost(){this._elementRef&&this._renderer.setStyle(this._elementRef.nativeElement,"width",this._elementRef.nativeElement.parentElement.clientWidth-this.scrollbarWidth+"px")}_prepareHeaderData(){if(this.selectedDate)switch(this.view){case Dn.DayView:let n=new o2;n.date=new Date(this.selectedDate);let r={year:"numeric",month:"long",day:"numeric"};n.description=this.selectedDate.toLocaleDateString(this._locale,r),this.day=n;break;case Dn.DaysAround:let o=yu.GetDaysAround(this.selectedDate);this.weekDays=o.weekDays,this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break;case Dn.ThreeDaysView:let s=yu.GetThreeDays(this.selectedDate);this.weekDays=s.weekDays,this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break;case Dn.WeekView:let a=yu.GetDaysOfWeek(this.selectedDate);this.weekDays=a.weekDays,this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break;case Dn.WeekWorkView:let l=yu.GetWorkDaysOfWeek(this.selectedDate);this.weekDays=l.weekDays,this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break;case Dn.WeekSelectView:let c=yu.GetDaysOfWeek(this.selectedDate);this.weekDays=c.weekDays,this.weekDays.forEach(u=>{let h=this._eventsPerDay&&this._eventsPerDay.length>0?this._eventsPerDay.find(f=>ro.DatesEqual(f.date,u.date)):null;h?u.events=h.events:u.weekdaySelected=!1}),this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break;case Dn.MonthView:let d=yu.GetDaysOfWeek(this.selectedDate);this.weekDays=d.weekDays,this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break}}capitalizeString(n){return n[0].toUpperCase()+n.slice(1)}getWeekNumber(n){let r=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())),o=r.getUTCDay()||7;r.setUTCDate(r.getUTCDate()+4-o);let s=new Date(Date.UTC(r.getUTCFullYear(),0,1));return Math.ceil(((r.getTime()-s.getTime())/864e5+1)/7)}};e.\u0275fac=function(r){return new(r||e)(Q(cl),Q(ti),Q(As),Q(Nn),Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["agenda-header"]],inputs:{selectedDate:"selectedDate",selectedFirstDayOfTheWeek:"selectedFirstDayOfTheWeek",view:"view",firstAvailableDate:"firstAvailableDate",eventsPerDay:"eventsPerDay",viewSelection:"viewSelection"},outputs:{viewChange:"viewChange",selectedDateChange:"selectedDateChange",rangeChange:"rangeChange"},standalone:!1,decls:7,vars:7,consts:[[1,"agenda-header-wrapper","day-view"],[1,"agenda-header-wrapper","days-around"],[1,"agenda-header-wrapper","three-days-view"],[1,"agenda-header-wrapper","week-view"],[1,"agenda-header-wrapper","work-week-view"],[1,"agenda-header-wrapper"],[1,"week-day-label"],[1,"pointer-hover","no-user-select","sub-unit-icon","dark",3,"click","iconData"],[1,"day-description",3,"textContent"],[1,"pointer-hover","no-user-select","add-unit-icon","dark",3,"click","iconData"],[1,"month-description"],[1,"week-day-label","days-around",3,"selected"],[1,"week-day-label","days-around",3,"click"],[1,"pointer-hover","no-user-select","sub-unit-icon","dark",3,"iconData"],[1,"weekday-value","day",3,"textContent"],[1,"weekday-value","date",3,"textContent"],[1,"pointer-hover","no-user-select","add-unit-icon","dark",3,"iconData"],[1,"hour-label-placeholder"],[1,"week-view-header-wrapper"],[1,"week-day-label",3,"selected"],[3,"selectedViewChange","selectedView","selectedFirstDayOfTheWeek"],[1,"weekday-value",3,"textContent"],[3,"textContent"],[1,"week-day-label",3,"click"],[1,"weekday-value"],[1,"week-day-label",3,"selected","selectable"],[1,"weekday-description",3,"textContent"]],template:function(r,o){r&1&&($(0,gUt,5,3,"div",0),$(1,RUt,4,1,"div",1),$(2,yUt,5,1,"div",2),$(3,kUt,5,1,"div",3),$(4,GUt,5,1,"div",4),$(5,zUt,3,0,"div",5),$(6,XUt,3,0,"div",5)),r&2&&(ee(o.view===o.viewTypes.DayView?0:-1),m(),ee(o.view===o.viewTypes.DaysAround?1:-1),m(),ee(o.view===o.viewTypes.ThreeDaysView?2:-1),m(),ee(o.view===o.viewTypes.WeekView?3:-1),m(),ee(o.view===o.viewTypes.WeekWorkView?4:-1),m(),ee(o.view===o.viewTypes.WeekSelectView?5:-1),m(),ee(o.view===o.viewTypes.MonthView?6:-1))},dependencies:[ri,Vqe,Er,kt],encapsulation:2});let i=e;return i})();var OC=(()=>{let e=class e{set selectedDate(n){this._selectedDate=n,this._dateIsSet()}set eventsPerDay(n){this._eventsPerDay=n,this._eventsAreSet()}get selectedDate(){return this._selectedDate}get eventsPerDate(){return this._eventsPerDay}constructor(n,r){this.locale=n,this.iconCacheService=r,this.eventChecked=new re,this._eventsPerDay=[]}prepareViewData(){}getEventsFromDate(n){let r=[];if(this.eventsPerDate){let o=this.eventsPerDate.length;for(let s=0;s<o;s++)if(ro.DatesEqual(n,this.eventsPerDate[s].date)){r=this.eventsPerDate[s].events;break}}return r}_dateIsSet(){this.prepareViewData()}_eventsAreSet(){this.prepareViewData()}};e.\u0275fac=function(r){return new(r||e)(Q(cl),Q(yt))},e.\u0275dir=rn({type:e,inputs:{selectedDate:"selectedDate",eventsPerDay:"eventsPerDay"},outputs:{eventChecked:"eventChecked"}});let i=e;return i})();function QUt(i,e){if(i&1&&(O(0,"div",5),j(1,"div",6),I()),i&2){let t=e.$implicit;we("not-in-month",!t.inView),m(),S("textContent",t.weekdayDay)}}function JUt(i,e){if(i&1&&(O(0,"div",3),Pt(1,QUt,2,3,"div",4,zt),I()),i&2){let t=e.$implicit;m(),Mt(t.weekDays)}}var Hqe=(()=>{let e=class e extends OC{constructor(){super(...arguments),this.month=Uqe,this.firstWeekDays=[],this.weeks=[]}prepareViewData(){let n=new r2;if(this.selectedDate){let r=ro.GetFirstDayOfMonth(this.selectedDate),o=ro.GetLastDayOfMonth(this.selectedDate),s=!1,a=!0;for(;a;){s&&(a=!1);let l=yu.GetDaysOfWeek(r),c=l.weekDays.length;for(let d=0;d<c;d++)l.weekDays[d].events=this.getEventsFromDate(l.weekDays[d].date),l.weekDays[d].inView=l.weekDays[d].date.getMonth()===this.selectedDate.getMonth();n.weeks.push(l),r.setDate(r.getDate()+7),r.getTime()>=o.getTime()&&(s=!0)}this.month=n,this.firstWeekDays=this.month.firstWeek.weekDays,this.weeks=n.weeks}}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=fo(e)))(o||e)}})(),e.\u0275cmp=Fe({type:e,selectors:[["agenda-month-view"]],standalone:!1,features:[pi],decls:5,vars:0,consts:[[1,"view-wrapper"],[1,"hour-view-labels-wrapper"],[1,"weeks"],["fxLayout","row",1,"week"],[1,"week-day",3,"not-in-month"],[1,"week-day"],[1,"day",3,"textContent"]],template:function(r,o){r&1&&(O(0,"div",0),j(1,"div",1),O(2,"div",2),Pt(3,JUt,3,0,"div",3,zt),I()()),r&2&&(m(3),Mt(o.weeks))},encapsulation:2});let i=e;return i})();var eBt=["currentTime"],tBt=["*"];function iBt(i,e){if(i&1&&(O(0,"div",5),j(1,"div",6),le(2,"date"),I()),i&2){let t=R();we("show",t.showLabel),m(),S("textContent",Wn(2,3,t.date,"HH:mm"))}}function nBt(i,e){i&1&&j(0,"div",3,0)}var Wqe=(()=>{let e=class e{set date(n){this._date=n,this._checkDate(),this._checkWorkingDayStart()}get date(){return this._date}constructor(n){this._renderer=n,this.showLabel=!1,this.showCurrentTime=!1,this.currentTimeTop=0}ngOnDestroy(){this.currentTimeElement=void 0}_checkDate(){let n=new Date,r=this.date.getMinutes(),o=r+30;ro.DatesEqual(this.date,n)&&n.getHours()===this.date.getHours()&&n.getMinutes()>r&&n.getMinutes()<o&&(this.currentTimeTop=Math.max(n.getMinutes(),.01)/60*100,this._positionCurrentTime(),this.showCurrentTime=!0)}_checkWorkingDayStart(){this.id=this._date.getHours()===8&&this._date.getMinutes()===30?"dayStart":""}_positionCurrentTime(){this.currentTimeElement&&(this._renderer.setStyle(this.currentTimeElement.nativeElement,"top",this.currentTimeTop+"%"),this.currentTimeElement.nativeElement.scrollIntoView())}};e.\u0275fac=function(r){return new(r||e)(Q(As))},e.\u0275cmp=Fe({type:e,selectors:[["agenda-half-hour-cell"]],viewQuery:function(r,o){if(r&1&&qt(eBt,5),r&2){let s;xt(s=Ft())&&(o.currentTimeElement=s.first)}},inputs:{date:"date",showLabel:"showLabel"},standalone:!1,ngContentSelectors:tBt,decls:5,vars:4,consts:[["currentTime",""],[1,"cell-wrapper",3,"id"],[1,"half-hour-label",3,"show"],["id","currentTime",1,"current-time"],[1,"content-wrapper"],[1,"half-hour-label"],[3,"textContent"]],template:function(r,o){r&1&&(Mc(),O(0,"div",1),$(1,iBt,3,6,"div",2),$(2,nBt,2,0,"div",3),O(3,"div",4),Jl(4),I()()),r&2&&(S("id",d$(o.id)),m(),ee(o.showLabel?1:-1),m(),ee(o.showCurrentTime?2:-1))},dependencies:[Er],encapsulation:2});let i=e;return i})();var _q=(()=>{let e=class e{constructor(){this.onlyLabels=!1,this.noLabels=!1}set date(n){this._date=n,this._setNextHalfHour()}get date(){return this._date}_setNextHalfHour(){this.datePlushalfHour=new Date(this._date),this.datePlushalfHour.setMinutes(this.datePlushalfHour.getMinutes()+30)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["agenda-hour-cell"]],inputs:{onlyLabels:"onlyLabels",noLabels:"noLabels",date:"date"},standalone:!1,decls:3,vars:3,consts:[[1,"row-per-half-hour"],[3,"date","showLabel"],[3,"date"]],template:function(r,o){r&1&&(O(0,"div",0),j(1,"agenda-half-hour-cell",1)(2,"agenda-half-hour-cell",2),I()),r&2&&(m(),S("date",o.date)("showLabel",o.onlyLabels&&!o.noLabels),m(),S("date",o.datePlushalfHour))},dependencies:[Wqe],encapsulation:2});let i=e;return i})();var oBt=["*"];function sBt(i,e){if(i&1&&(O(0,"div",0)(1,"div",1),j(2,"agenda-hour-cell",2),I()()),i&2){let t=e.$implicit;m(2),S("date",t)}}var pq=(()=>{let e=class e{constructor(){this.datesByTheHour=[],this._date=new Date}set date(n){this._date=new Date(n),this._prepareViewData()}get date(){return this._date}_prepareViewData(){if(this.datesByTheHour.length=0,this.date){let n=new Date(this.date);n.setHours(0,0,0,0),this.datesByTheHour.push(n);for(let r=0;r<23;r++)n=new Date(n),n.setHours(n.getHours()+1),this.datesByTheHour.push(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["agenda-hour-view"]],inputs:{date:"date"},standalone:!1,ngContentSelectors:oBt,decls:3,vars:0,consts:[[1,"row-per-hour"],["fxLayout","row"],[3,"date"]],template:function(r,o){r&1&&(Mc(),Pt(0,sBt,3,1,"div",0,zt),Jl(2)),r&2&&Mt(o.datesByTheHour)},dependencies:[_q],encapsulation:2});let i=e;return i})();function aBt(i,e){if(i&1&&(O(0,"div",0)(1,"div"),j(2,"agenda-hour-cell",1),I()()),i&2){let t=e.$implicit,n=R();m(2),S("date",t)("onlyLabels",!0)("noLabels",n.noLabels)}}var Eq=(()=>{let e=class e{constructor(){this.noLabels=!1,this.datesByTheHour=[],this._date=new Date}set date(n){this._date=new Date(n),this._date.setDate(1),this._date.setMonth(1),this._date.setFullYear(1),this._prepareViewData()}get date(){return this._date}_prepareViewData(){if(this.datesByTheHour.length=0,this.date){let n=new Date(this.date);n.setHours(0,0,0,0),this.datesByTheHour.push(n);for(let r=0;r<23;r++)n=new Date(n),n.setHours(n.getHours()+1),this.datesByTheHour.push(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["agenda-hour-view-labels"]],inputs:{date:"date",noLabels:"noLabels"},standalone:!1,decls:2,vars:0,consts:[[1,"row-per-hour"],[3,"date","onlyLabels","noLabels"]],template:function(r,o){r&1&&Pt(0,aBt,3,3,"div",0,zt),r&2&&Mt(o.datesByTheHour)},dependencies:[_q],encapsulation:2});let i=e;return i})();function lBt(i,e){if(i&1&&j(0,"co-icon",3),i&2){let t=R();we("checked",t.event.checked),S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}var Kqe=(()=>{let e=class e{constructor(n,r,o){this._elementRef=n,this._renderer=r,this.iconCacheService=o,this.icons=ot,this.event=uq,this.eventChecked=new re}ngOnDestroy(){this._elementRef=void 0}ngOnInit(){let n=this.event.from.getHours(),r=this.event.from.getMinutes(),s=(n+r/60)*(this.halfHourHeight*2);this._renderer.setStyle(this._elementRef.nativeElement,"top",s+"px");let l=Math.abs(this.event.to.getTime()-this.event.from.getTime())/36e5*(this.halfHourHeight*2)-1;this._renderer.setStyle(this._elementRef.nativeElement,"height",l+"px")}checkEvent(n){this.event.checked=!this.event.checked,this.eventChecked.emit(this.event)}};e.\u0275fac=function(r){return new(r||e)(Q(ti),Q(As),Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["agenda-event"]],inputs:{event:"event",customEventObject:"customEventObject",halfHourHeight:"halfHourHeight"},outputs:{eventChecked:"eventChecked"},standalone:!1,decls:3,vars:6,consts:[[1,"agenda-event-wrapper",3,"click"],[1,"event-description",3,"textContent"],[3,"iconData","checked"],[3,"iconData"]],template:function(r,o){r&1&&(O(0,"div",0),W("click",function(a){return o.checkEvent(a)}),j(1,"div",1),$(2,lBt,1,3,"co-icon",2),I()),r&2&&(we("checkable",o.event.showCheckbox)("selected",o.event.checked),m(),S("textContent",o.event.description),m(),ee(o.event.showCheckbox?2:-1))},dependencies:[ri],encapsulation:2});let i=e;return i})();function dBt(i,e){if(i&1&&j(0,"co-icon",1),i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function uBt(i,e){if(i&1&&j(0,"co-icon",1),i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}var qqe=(()=>{let e=class e{constructor(n){this.iconCacheService=n,this.icons=ot,this.event=uq,this.eventChecked=new re}checkEvent(n){this.event.checked=!this.event.checked,this.eventChecked.emit(this.event)}};e.\u0275fac=function(r){return new(r||e)(Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["agenda-select-event"]],inputs:{event:"event"},outputs:{eventChecked:"eventChecked"},standalone:!1,decls:10,vars:9,consts:[[1,"week-select-item",3,"click"],[1,"select-icon","action-color",3,"iconData"],[1,"moment-name"]],template:function(r,o){r&1&&(O(0,"div",0),W("click",function(a){return o.checkEvent(a)}),$(1,dBt,1,1,"co-icon",1),$(2,uBt,1,1,"co-icon",1),O(3,"div",2)(4,"small"),Rn(5),le(6,"date"),le(7,"uppercase"),I(),O(8,"h2"),Rn(9),I()()()),r&2&&(m(),ee(o.event.checked?-1:1),m(),ee(o.event.checked?2:-1),m(3),Ml(ge(7,7,Wn(6,4,o.event.date,"EEEE d MMMM"))),m(4),Ml(o.event.description))},dependencies:[ri,G$,Er],encapsulation:2});let i=e;return i})();function fBt(i,e){if(i&1){let t=de();O(0,"agenda-event",1),W("eventChecked",function(r){F(t);let o=R(2);return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=e.$implicit,n=R(2);S("halfHourHeight",n.halfHourHeight)("event",t)("customEventObject",n.customEventObject)}}function _Bt(i,e){if(i&1&&Pt(0,fBt,1,3,"agenda-event",0,zt),i&2){let t=R();Mt(t.events)}}function pBt(i,e){if(i&1){let t=de();O(0,"agenda-select-event",3),W("eventChecked",function(r){F(t);let o=R(2);return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=e.$implicit;S("event",t)}}function EBt(i,e){if(i&1&&Pt(0,pBt,1,1,"agenda-select-event",2,zt),i&2){let t=R();Mt(t.events)}}var s2=(()=>{let e=class e{constructor(){this.viewTypes=Dn,this.view=Dn.WeekView,this.type="",this.events=[],this.eventChecked=new re}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["agenda-events"]],inputs:{customEventObject:"customEventObject",view:"view",type:"type",events:"events",halfHourHeight:"halfHourHeight"},outputs:{eventChecked:"eventChecked"},standalone:!1,decls:2,vars:2,consts:[[3,"halfHourHeight","event","customEventObject"],[3,"eventChecked","halfHourHeight","event","customEventObject"],[3,"event"],[3,"eventChecked","event"]],template:function(r,o){r&1&&($(0,_Bt,2,0),$(1,EBt,2,0)),r&2&&(ee(o.view!==o.viewTypes.WeekSelectView?0:-1),m(),ee(o.view===o.viewTypes.WeekSelectView?1:-1))},dependencies:[Kqe,qqe],encapsulation:2});let i=e;return i})();var Xqe=(()=>{let e=class e extends OC{constructor(){super(...arguments),this.events=[]}prepareViewData(){this.eventsPerDate&&this.eventsPerDate.length>0&&(this.events=this.eventsPerDate[0].events)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=fo(e)))(o||e)}})(),e.\u0275cmp=Fe({type:e,selectors:[["agenda-day-view"]],inputs:{customEventObject:"customEventObject"},standalone:!1,features:[pi],decls:4,vars:5,consts:[[1,"view-wrapper"],[3,"date"],[3,"eventChecked","halfHourHeight","events","customEventObject"]],template:function(r,o){r&1&&(O(0,"div",0),j(1,"agenda-hour-view-labels",1),O(2,"agenda-hour-view",1)(3,"agenda-events",2),W("eventChecked",function(a){return o.eventChecked.emit(a)}),I()()()),r&2&&(m(),S("date",o.selectedDate),m(),S("date",o.selectedDate),m(),S("halfHourHeight",40)("events",o.events)("customEventObject",o.customEventObject))},dependencies:[pq,Eq,s2],encapsulation:2});let i=e;return i})();function gBt(i,e){if(i&1){let t=de();O(0,"div",2)(1,"agenda-hour-view",1)(2,"agenda-events",3),W("eventChecked",function(r){F(t);let o=R();return U(o.eventChecked.emit(r))}),I()()()}if(i&2){let t=e.$implicit,n=R();m(),S("date",t.date),m(),S("halfHourHeight",40)("events",t.events)("view",n.view)("customEventObject",n.customEventObject)}}var Zqe=(()=>{let e=class e extends OC{constructor(){super(...arguments),this.week=hq}prepareViewData(){if(this.selectedDate){let n=yu.GetDaysOfWeek(this.selectedDate),r=n.weekDays.length;for(let o=0;o<r;o++)n.weekDays[o].events=this.getEventsFromDate(n.weekDays[o].date);this.week=n}}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=fo(e)))(o||e)}})(),e.\u0275cmp=Fe({type:e,selectors:[["agenda-week-view"]],inputs:{view:"view",customEventObject:"customEventObject"},standalone:!1,features:[pi],decls:4,vars:1,consts:[[1,"view-wrapper"],[3,"date"],[1,"week-day"],[3,"eventChecked","halfHourHeight","events","view","customEventObject"]],template:function(r,o){r&1&&(O(0,"div",0),j(1,"agenda-hour-view-labels",1),Pt(2,gBt,3,5,"div",2,zt),I()),r&2&&(m(),S("date",o.selectedDate),m(),Mt(o.week.weekDays))},dependencies:[pq,Eq,s2],encapsulation:2});let i=e;return i})();function TBt(i,e){i&1&&(O(0,"div",7),j(1,"p",4),I()),i&2&&(m(),S("textContent","AGENDA_NO_PERIODS_AVAILABLE"))}function SBt(i,e){if(i&1){let t=de();O(0,"div",2)(1,"div",3),j(2,"h3",4),O(3,"div",5)(4,"agenda-events",6),W("eventChecked",function(r){F(t);let o=R(2);return U(o.eventChecked.emit(r))}),I(),$(5,TBt,2,1,"div",7),I()(),O(6,"div",8),j(7,"h3",4),O(8,"ul")(9,"li"),j(10,"co-icon",9)(11,"span",4),I(),O(12,"li"),j(13,"co-icon",9)(14,"span",4),I()()()()}if(i&2){let t=R().$implicit,n=R();m(2),S("textContent","AGENDA_CHOOSE_DELIVERY_PERIOD"),m(2),S("halfHourHeight",40)("events",t.events)("view",n.view),m(),ee(t.events.length===0?5:-1),m(2),S("textContent","AGENDA_FOR_EVERY_PERIOD"),m(3),S("iconData",n.iconCacheService.getIcon(n.icons.CheckRound)),m(),S("textContent","AGENDA_FOR_EVERY_PERIOD_REASON1"),m(2),S("iconData",n.iconCacheService.getIcon(n.icons.CheckRound)),m(),S("textContent","AGENDA_FOR_EVERY_PERIOD_REASON2")}}function CBt(i,e){if(i&1&&(O(0,"div",1),$(1,SBt,15,10,"div",2),I()),i&2){let t=e.$implicit;m(),ee(t.weekdaySelected?1:-1)}}var Qqe=(()=>{let e=class e extends OC{constructor(){super(...arguments),this.view=Dn.WeekSelectView,this.week=hq,this.icons=ot}prepareViewData(){if(this.selectedDate){let n=yu.GetDaysOfWeek(this.selectedDate),r=n.weekDays.length;for(let o=0;o<r;o++)n.weekDays[o].events=this.getEventsFromDate(n.weekDays[o].date);this.week=n}}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=fo(e)))(o||e)}})(),e.\u0275cmp=Fe({type:e,selectors:[["agenda-week-select-view"]],inputs:{view:"view"},standalone:!1,features:[pi],decls:3,vars:0,consts:[[1,"view-wrapper","week-select-view"],[1,"week-day"],[1,"week-select-container"],[1,"week-select-left"],[3,"textContent"],[1,"week-select-list","mini-scrollbar"],[3,"eventChecked","halfHourHeight","events","view"],[1,"no-events-banner"],[1,"week-select-right"],[1,"small","action-color","moment-icon",3,"iconData"]],template:function(r,o){r&1&&(O(0,"div",0),Pt(1,CBt,2,1,"div",1,zt),I()),r&2&&(m(),Mt(o.week.weekDays))},dependencies:[ri,s2],encapsulation:2});let i=e;return i})();function OBt(i,e){if(i&1){let t=de();O(0,"agenda-day-view",5),W("eventChecked",function(r){F(t);let o=R();return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=R();S("selectedDate",t.selectedDate)("customEventObject",t.customEventObject)("eventsPerDay",t.eventsPerDay)}}function IBt(i,e){if(i&1){let t=de();O(0,"agenda-week-view",6),W("eventChecked",function(r){F(t);let o=R();return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=R();S("view",t.view)("selectedDate",t.selectedDate)("customEventObject",t.customEventObject)("eventsPerDay",t.eventsPerDay)}}function NBt(i,e){if(i&1){let t=de();O(0,"agenda-week-select-view",7),W("eventChecked",function(r){F(t);let o=R();return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=R();S("view",t.view)("selectedDate",t.selectedDate)("eventsPerDay",t.eventsPerDay)}}function vBt(i,e){if(i&1){let t=de();O(0,"agenda-month-view",8),W("eventChecked",function(r){F(t);let o=R();return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=R();S("selectedDate",t.selectedDate)("eventsPerDay",t.eventsPerDay)}}var Jqe=(()=>{let e=class e{constructor(){this.eventsPerDay=[],this.eventChecked=new re,this.viewTypes=Dn}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["agenda-view"]],inputs:{view:"view",customEventObject:"customEventObject",selectedDate:"selectedDate",eventsPerDay:"eventsPerDay"},outputs:{eventChecked:"eventChecked"},standalone:!1,decls:5,vars:1,consts:[[1,"view-wrapper","mini-scrollbar"],[3,"selectedDate","customEventObject","eventsPerDay"],[3,"view","selectedDate","customEventObject","eventsPerDay"],[3,"view","selectedDate","eventsPerDay"],[3,"selectedDate","eventsPerDay"],[3,"eventChecked","selectedDate","customEventObject","eventsPerDay"],[3,"eventChecked","view","selectedDate","customEventObject","eventsPerDay"],[3,"eventChecked","view","selectedDate","eventsPerDay"],[3,"eventChecked","selectedDate","eventsPerDay"]],template:function(r,o){if(r&1&&(O(0,"div",0),$(1,OBt,1,3,"agenda-day-view",1)(2,IBt,1,4,"agenda-week-view",2)(3,NBt,1,3,"agenda-week-select-view",3)(4,vBt,1,2,"agenda-month-view",4),I()),r&2){let s;m(),ee((s=o.view)===o.viewTypes.DayView?1:s===o.viewTypes.WeekView?2:s===o.viewTypes.WeekSelectView?3:s===o.viewTypes.MonthView?4:-1)}},dependencies:[Hqe,Xqe,Zqe,Qqe],encapsulation:2});let i=e;return i})();var yBt=["dayStart"];function bBt(i,e){if(i&1){let t=de();O(0,"calendar",8),vt("daysChange",function(r){F(t);let o=R();return Rt(o.days,r)||(o.days=r),U(r)}),W("selectedDateChange",function(r){F(t);let o=R();return U(o.doChangeSelectedDate(r))}),I()}if(i&2){let t=R();S("view",t.view),Nt("days",t.days),S("selectedDate",t.selectedDate)}}function LBt(i,e){if(i&1){let t=de();O(0,"co-button",9),W("click",function(r){F(t);let o=R();return U(o.buttonClick.emit(r))}),I()}if(i&2){let t=R();S("label",t.buttonLabel)}}var $qe=(()=>{let e=class e{set setSelectedDate(n){this.selectedDate=n,this.setFirstDayOfTheWeek(n,this.weekStartsOn)}constructor(n,r){this._changeDetector=n,this.renderer=r,this.calendarNavigation=!1,this.customEventObject=!1,this.showButton=!1,this.weekStartsOn=cE.Monday,this.buttonLabel="",this.eventsPerDay=[],this.view=Dn.ThreeDaysView,this.viewSelection=!0,this.eventChecked=new re,this.selectedDateChange=new re,this.rangeChange=new re,this.viewChange=new re,this.buttonClick=new re,this.dayNumbers={[cE.Sunday]:0,[cE.Monday]:1,[cE.Tuesday]:2,[cE.Wednesday]:3,[cE.Thursday]:4,[cE.Friday]:5,[cE.Saturday]:6},this.showClass=!0,this.days=[],this._selectedDate=new Date}doChangeSelectedDate(n,r=!1){this.selectedDate=new Date(n),r?this.rangeChange.emit(this.selectedDate):this.selectedDateChange.emit(this.selectedDate),this._changeDetector.detectChanges()}doChangeView(n){this.view=n.view,this.viewChange.emit(n)}scrollToDayStart(){if(this.dayStart!==void 0){let n=this.renderer.selectRootElement("#dayStart");n&&setTimeout(()=>{n.scrollIntoView({behavior:"instant",block:"center"})})}}setFirstDayOfTheWeek(n,r=cE.Monday){if(Number.isNaN(n.getTime()))throw new TypeError("Invalid Date");let o=new Date(n),s=this.dayNumbers[r],a=(o.getDay()-s+7)%7;o.setDate(o.getDate()-a),o.setHours(0,0,0,0),this.selectedFirstDateOfTheWeek=o}};e.\u0275fac=function(r){return new(r||e)(Q(pn),Q(As))},e.\u0275cmp=Fe({type:e,selectors:[["co-date-planning"]],viewQuery:function(r,o){if(r&1&&qt(yBt,7),r&2){let s;xt(s=Ft())&&(o.dayStart=s.first)}},hostVars:2,hostBindings:function(r,o){r&2&&we("co-date-planning",o.showClass)},inputs:{calendarNavigation:"calendarNavigation",customEventObject:"customEventObject",showButton:"showButton",weekStartsOn:"weekStartsOn",setSelectedDate:"setSelectedDate",firstAvailableDate:"firstAvailableDate",buttonLabel:"buttonLabel",eventsPerDay:"eventsPerDay",view:"view",viewSelection:"viewSelection"},outputs:{eventChecked:"eventChecked",selectedDateChange:"selectedDateChange",rangeChange:"rangeChange",viewChange:"viewChange",buttonClick:"buttonClick"},standalone:!1,decls:8,vars:12,consts:[[1,"sc-agenda"],[1,"content-wrapper"],[3,"view","days","selectedDate"],[1,"agenda-content-wrapper","mini-scrollbar"],[1,"agenda-content"],[3,"viewChange","selectedDateChange","rangeChange","view","firstAvailableDate","eventsPerDay","selectedDate","selectedFirstDayOfTheWeek","viewSelection"],[3,"eventChecked","view","customEventObject","selectedDate","eventsPerDay"],[1,"text-only","select-agenda-button",3,"label"],[3,"daysChange","selectedDateChange","view","days","selectedDate"],[1,"text-only","select-agenda-button",3,"click","label"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div",1),$(2,bBt,1,3,"calendar",2),O(3,"div",3)(4,"div",4)(5,"agenda-header",5),W("viewChange",function(a){return o.doChangeView(a)})("selectedDateChange",function(a){return o.doChangeSelectedDate(a)})("rangeChange",function(a){return o.doChangeSelectedDate(a,!0)}),I(),O(6,"agenda-view",6),W("eventChecked",function(a){return o.eventChecked.emit(a)}),I()()()()(),$(7,LBt,1,1,"co-button",7)),r&2&&(m(2),ee(o.calendarNavigation?2:-1),m(3),S("view",o.view)("firstAvailableDate",o.firstAvailableDate)("eventsPerDay",o.eventsPerDay)("selectedDate",o.selectedDate)("selectedFirstDayOfTheWeek",o.selectedFirstDateOfTheWeek)("viewSelection",o.viewSelection),m(),S("view",o.view)("customEventObject",o.customEventObject)("selectedDate",o.selectedDate)("eventsPerDay",o.eventsPerDay),m(),ee(o.showButton&&o.eventsPerDay.length>0?7:-1))},dependencies:[Ki,Fqe,Gqe,Jqe],encapsulation:2,data:{animation:[ao("showHideWindow",[xn("void",on({transform:"scaleY(0)"})),xn("*",on({transform:"scaleY(1)"})),qr(":enter, :leave",[Gr("200ms ease-in-out")])])]}});let i=e;return i})();var PBt=["dayStart"];function MBt(i,e){if(i&1){let t=de();O(0,"div",11)(1,"co-input-checkbox",12),W("modelChange",function(r){let o=F(t).$implicit,s=R(),a=s.$implicit,l=s.$index,c=R(2);return U(c.handleOptionSelect(r,o,a.date,l))}),I()()}if(i&2){let t=e.$implicit,n=R(3);m(),S("disabled",n.checkDisabled)("model",t.checked)("label",t.description)}}function kBt(i,e){if(i&1&&(O(0,"div",10),j(1,"p",2),le(2,"date"),Pt(3,MBt,2,3,"div",11,zt),I()),i&2){let t=e.$implicit,n=e.$index;S("id",u$("event-",n)),m(),S("textContent",dB(2,3,t.date,"EEEE dd MMMM","nl")),m(2),Mt(t.events)}}function xBt(i,e){if(i&1&&(O(0,"div",9),Pt(1,kBt,5,7,"div",10,zt),le(3,"slice"),I()),i&2){let t=R();we("horizontal-layout",!t.verticalLayout),m(),Mt(dB(3,2,t.events,0,t.limit))}}function FBt(i,e){if(i&1&&(O(0,"div",5),j(1,"h2",2),O(2,"div",13),j(3,"co-icon",14)(4,"p",2),I()()),i&2){let t=R();m(),S("textContent",t.disclaimerHeader),m(2),S("iconData",t.iconCacheService.getIcon(t.icons.CheckRound)),m(),S("textContent",t.disclaimerDescription)}}function UBt(i,e){if(i&1){let t=de();O(0,"co-button",15),W("click",function(r){F(t);let o=R();return U(o.buttonClick.emit(r))}),I()}if(i&2){let t=R();S("label",t.buttonLabel)}}var eXe=(()=>{let e=class e{set eventsPerDay(n){this._eventsPerDay=n,this.checkForMoreLoadable()}get eventsPerDay(){return this._eventsPerDay}constructor(n,r,o){this.locale=n,this.iconCacheService=r,this._changeDetector=o,this.icons=ot,this.buttonLabel="",this.headerText="",this.headerDescription="",this.disclaimerHeader="",this.disclaimerDescription="",this.loadMoreButtonText="",this.showDisclaimer=!0,this.showConfirmButton=!0,this.verticalLayout=!0,this.buttonClick=new re,this.selected=new re,this.showClass=!0,this.days=[],this.events=[],this.limit=4,this.moreLoadable=!0,this.checkDisabled=!1,this._eventsPerDay=[]}ngOnInit(){this.checkForMoreLoadable()}checkForMoreLoadable(){this.eventsPerDay&&(this.events=this.eventsPerDay,this.eventsPerDay.length<=this.limit&&(this.moreLoadable=!1),this._changeDetector.detectChanges())}handleOptionSelect(n,r,o,s){this.events.forEach(c=>{c.events.forEach(d=>d.checked=!1)});let a=document.getElementById("event-"+s),l=document.getElementsByClassName("eventOption");for(let c=0;c<l.length;c++)l[c].classList.remove("day-selected");if(n){r.checked=!0,this.selectedOption=r;let c=new n2;c.date=o,c.events.push(r),this.selected.emit(c),a?.classList.add("day-selected")}else this.selectedOption=null,this.selected.emit(null);this._changeDetector.detectChanges()}loadMore(){this.limit=this.limit+=4,this.eventsPerDay.length<=this.limit&&(this.moreLoadable=!1),this._changeDetector.detectChanges()}};e.\u0275fac=function(r){return new(r||e)(Q(cl),Q(yt),Q(pn))},e.\u0275cmp=Fe({type:e,selectors:[["co-preferred-planning"]],viewQuery:function(r,o){if(r&1&&qt(PBt,7),r&2){let s;xt(s=Ft())&&(o.dayStart=s.first)}},hostVars:2,hostBindings:function(r,o){r&2&&we("co-preferred-planning",o.showClass)},inputs:{firstAvailableDate:"firstAvailableDate",buttonLabel:"buttonLabel",headerText:"headerText",headerDescription:"headerDescription",disclaimerHeader:"disclaimerHeader",disclaimerDescription:"disclaimerDescription",loadMoreButtonText:"loadMoreButtonText",showDisclaimer:"showDisclaimer",showConfirmButton:"showConfirmButton",verticalLayout:"verticalLayout",eventsPerDay:"eventsPerDay",selectedDate:"selectedDate"},outputs:{buttonClick:"buttonClick",selected:"selected"},standalone:!1,decls:11,vars:7,consts:[[1,"co-preferred-planning"],[1,"content-wrapper"],[3,"textContent"],[1,"planning-container"],[1,"planning-options",3,"horizontal-layout"],[1,"planning-disclaimer"],[1,"load-more-container",3,"click","ngClass"],[3,"iconData"],[1,"submit-button",3,"label"],[1,"planning-options"],[1,"eventOption",3,"id"],[1,"planning-option"],[3,"modelChange","disabled","model","label"],[1,"planning-disclaimer-contents"],[1,"disclaimer-icon",3,"iconData"],[1,"submit-button",3,"click","label"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div",1),j(2,"p",2),O(3,"div",3),$(4,xBt,4,6,"div",4),$(5,FBt,5,3,"div",5),I(),O(6,"div",6),W("click",function(){return o.loadMore()}),O(7,"p"),j(8,"co-icon",7)(9,"span",2),I()()()(),$(10,UBt,1,1,"co-button",8)),r&2&&(m(2),S("textContent",o.headerDescription),m(2),ee(o.events?4:-1),m(),ee(o.showDisclaimer?5:-1),m(),S("ngClass",o.moreLoadable?"":"load-more-container-disabled"),m(2),S("iconData",o.iconCacheService.getIcon(o.icons.ArrowFatRight)),m(),S("textContent",o.loadMoreButtonText),m(),ee(o.showConfirmButton?10:-1))},dependencies:[xf,ri,Ki,gl,W$,Er],encapsulation:2,data:{animation:[ao("showHideWindow",[xn("void",on({transform:"scaleY(0)"})),xn("*",on({transform:"scaleY(1)"})),qr(":enter, :leave",[Gr("200ms ease-in-out")])])]}});let i=e;return i})();var pg=(function(){function i(){}return i.prototype.getTitle=function(){return this.title},i.prototype.setTitle=function(e){this.title=e},i.prototype.getModuleId=function(){return this.moduleId},i.prototype.setModuleId=function(e){this.moduleId=e},i.prototype.getNodeLevel=function(){return this.nodeLevel},i.prototype.setNodeLevel=function(e){this.nodeLevel=e},i.prototype.getSequence=function(){return this.sequence},i.prototype.setSequence=function(e){this.sequence=e},i.prototype.getConfigId=function(){return this.configId},i.prototype.setConfigId=function(e){this.configId=e},i.prototype.getRubricId=function(){return this.rubricId},i.prototype.setRubricId=function(e){this.rubricId=e},i.prototype.getCategoryId=function(){return this.categoryId},i.prototype.setCategoryId=function(e){this.categoryId=e},i.prototype.getParentCatId=function(){return this.parentCatId},i.prototype.setParentCatId=function(e){this.parentCatId=e},i.prototype.getFixedKey=function(){return this.fixedKey},i.prototype.setFixedKey=function(e){this.fixedKey=e},i.prototype.getCfgObjId=function(){return this.cfgObjId},i.prototype.setCfgObjId=function(e){this.cfgObjId=e},i.prototype.getCfgRights=function(){return this.cfgRights},i.prototype.setCfgRights=function(e){this.cfgRights=e},i.prototype.getVisible=function(){return this.visible},i.prototype.setVisible=function(e){this.visible=e},i.prototype.getDefaultConfig=function(){return this.defaultConfig},i.prototype.setDefaultConfig=function(e){this.defaultConfig=e},i.prototype.getSeparateInputRight=function(){return this.separateInputRight},i.prototype.setSeparateInputRight=function(e){this.separateInputRight=e},i})();var jF=class extends pg{constructor(){super(...arguments),this.subCats=[],this.headers=[]}};var mq=class extends pg{constructor(){super(...arguments),this.headers=[]}};var zF=class extends pg{constructor(){super(...arguments),this.subRubrics=[]}};var YF=class{};var Ld=(function(i){return i.K="K",i.L="L",i.Date="D",i.N="N",i.Alphanumeric="A",i.J="J",i.MultiSelect="M",i})(Ld||{});var KF=class extends pg{};var qF=class extends pg{constructor(){super(...arguments),this.rubrics=[]}};var tXe=(function(){function i(){}return i.prototype.getRubricId=function(){return this.rubricId},i.prototype.setRubricId=function(e){this.rubricId=e},i.prototype.getModuleId=function(){return this.moduleId},i.prototype.setModuleId=function(e){this.moduleId=e},i.prototype.getDescription=function(){return this.description},i.prototype.setDescription=function(e){this.description=e},i.prototype.getParentId=function(){return this.parentId},i.prototype.setParentId=function(e){this.parentId=e},i.prototype.getCfgObjId=function(){return this.cfgObjId},i.prototype.setCfgObjId=function(e){this.cfgObjId=e},i.prototype.getCfgRights=function(){return this.cfgRights},i.prototype.setCfgRights=function(e){this.cfgRights=e},i.prototype.getVisible=function(){return this.visible},i.prototype.setVisible=function(e){this.visible=e},i.prototype.getConfigObjects=function(){return this.configObjects},i.prototype.setConfigObjects=function(e){this.configObjects=e},i})();var XF=class extends tXe{constructor(){super(...arguments),this.fields=[]}};function VBt(i,e){if(i&1){let t=de();O(0,"span",10),W("click",function(){F(t);let r=R().$implicit;return U(r.visible=r.visible==="T"?"F":"T")}),I()}if(i&2){let t=R().$implicit;S("textContent",t.title)}}function GBt(i,e){if(i&1){let t=de();O(0,"span",10),W("click",function(){F(t);let r=R().$implicit;return U(r.visible=r.visible==="T"?"F":"T")}),I()}if(i&2){let t=R().$implicit;S("textContent",t.title)}}function HBt(i,e){if(i&1){let t=de();O(0,"span",10),W("click",function(){F(t);let r=R().$implicit;return U(r.visible=r.visible==="T"?"F":"T")}),I()}if(i&2){let t=R().$implicit;S("textContent",t.title)}}function WBt(i,e){if(i&1){let t=de();O(0,"span",10),W("click",function(){F(t);let r=R(3).$implicit,o=R().$implicit,s=R().$implicit,a=R();return U(a.handleRubricClicked(r,o,s))}),I()}if(i&2){let t=R().$implicit;S("textContent",t.title)}}function jBt(i,e){if(i&1&&(O(0,"div",14),$(1,WBt,1,1,"span",1),I()),i&2){let t=R().$implicit;m(),ee(t.visible==="T"?1:-1)}}function zBt(i,e){if(i&1&&(O(0,"div",13),$(1,HBt,1,1,"span",1),Pt(2,jBt,2,1,"div",14,zt),I()),i&2){let t=e.$implicit,n=R().$implicit;m(),ee(n.visible==="T"?1:-1),m(),Mt(t.headers)}}function YBt(i,e){if(i&1){let t=de();O(0,"span",10),W("click",function(){F(t);let r=R(2).$implicit,o=R().$implicit,s=R().$implicit,a=R();return U(a.handleRubricClicked(r,o,s))}),I()}if(i&2){let t=R().$implicit;S("textContent",t.title)}}function KBt(i,e){if(i&1&&(O(0,"div",14),$(1,YBt,1,1,"span",1),I()),i&2){let t=R().$implicit;m(),ee(t.visible==="T"?1:-1)}}function qBt(i,e){if(i&1&&(O(0,"div",12),$(1,GBt,1,1,"span",1),Pt(2,zBt,4,1,"div",13,zt),Pt(4,KBt,2,1,"div",14,zt),I()),i&2){let t=e.$implicit,n=R().$implicit;m(),ee(n.visible==="T"?1:-1),m(),Mt(t.subCats),m(2),Mt(t.headers)}}function XBt(i,e){if(i&1&&(O(0,"div",11),$(1,VBt,1,1,"span",1),Pt(2,qBt,6,1,"div",12,zt),I()),i&2){let t=e.$implicit,n=R().$implicit;m(),ee(n.visible==="T"?1:-1),m(),Mt(t.rubrics)}}function ZBt(i,e){if(i&1){let t=de();O(0,"div",2)(1,"span",10),W("click",function(){let r=F(t).$implicit;return U(r.visible=r.visible==="T"?"F":"T")}),I(),Pt(2,XBt,4,1,"div",11,zt),I()}if(i&2){let t=e.$implicit;m(),S("textContent",t.title),m(),Mt(t.configs)}}function QBt(i,e){if(i&1){let t=de();O(0,"div",20)(1,"co-input-text",18),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.name,r)||(o.name=r),U(r)}),I(),O(2,"co-list-of-values",21),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.fieldType,r)||(o.fieldType=r),U(r)}),I(),O(3,"co-button",17),W("click",function(){let r=F(t).$index,o=R().$index,s=R().$index,a=R().$index,l=R();return U(l.removeField(a,s,o,r))}),I()()}if(i&2){let t=e.$implicit,n=R(4);m(),S("placeholder","Field name"),Nt("model",t.name),S("maxLength",28),m(),S("collection",n.multiSelectValues),Nt("model",t.fieldType),S("displayField","name")("label","Field type")}}function JBt(i,e){if(i&1){let t=de();O(0,"div",9)(1,"co-button",17),W("click",function(){let r=F(t).$index,o=R().$index,s=R().$index,a=R();return U(a.removeHeader(s,o,r))}),I(),j(2,"br"),O(3,"co-input-text",18),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.description,r)||(o.description=r),U(r)}),I(),O(4,"div",4),j(5,"h5",1),O(6,"co-button",7),W("click",function(){let r=F(t).$index,o=R().$index,s=R().$index,a=R();return U(a.addField(s,o,r))}),I()(),Pt(7,QBt,4,7,"div",20,zt),I()}if(i&2){let t=e.$implicit;m(3),S("placeholder","Header description"),Nt("model",t.description),S("maxLength",28),m(2),S("textContent","Header fields"),m(2),Mt(t.fields)}}function $Bt(i,e){if(i&1){let t=de();O(0,"div",9)(1,"co-button",17),W("click",function(){let r=F(t).$index,o=R().$index,s=R();return U(s.removeSubTab(o,r))}),I(),j(2,"br"),O(3,"co-input-text",18),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.title,r)||(o.title=r),U(r)}),I(),O(4,"div",4),j(5,"h4",1),O(6,"co-button",7),W("click",function(){let r=F(t).$index,o=R().$index,s=R();return U(s.addHeader(o,r))}),I()(),Pt(7,JBt,9,4,"div",9,zt),I()}if(i&2){let t=e.$implicit;m(3),S("placeholder","Sub tab description"),Nt("model",t.title),S("maxLength",28),m(2),S("textContent","Sub tab headers"),m(2),Mt(t.subRubrics)}}function eVt(i,e){if(i&1){let t=de();O(0,"div",9)(1,"div",15)(2,"div",16)(3,"co-button",17),W("click",function(){let r=F(t).$index,o=R();return U(o.removeRubric(r))}),I(),j(4,"br"),O(5,"co-input-text",18),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.title,r)||(o.title=r),U(r)}),I(),O(6,"co-input-text",19),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.categoryId,r)||(o.categoryId=r),U(r)}),I()(),O(7,"div",4),j(8,"h3",1),O(9,"co-button",7),W("click",function(){let r=F(t).$index,o=R();return U(o.addSubTab(r))}),I()(),Pt(10,$Bt,9,4,"div",9,zt),I()()}if(i&2){let t=e.$implicit;m(5),S("placeholder","Rubric name"),Nt("model",t.title),S("maxLength",28),m(),S("placeholder","Unique ID")("type","number"),Nt("model",t.categoryId),m(2),S("textContent","Rubric sub tabs"),m(2),Mt(t.headers)}}var iXe=(()=>{let e=class e{showClass(){return!0}constructor(n){this._sharedService=n,this.currentModule=new KF,this.currentConfig=new qF,this.configData=[],this.idList=[],this.multiSelectValues=[{name:"Button",value:Ld.K},{name:"LOV",value:Ld.L},{name:"Date",value:Ld.Date},{name:"Numeric",value:Ld.N},{name:"Alphanumeric",value:Ld.Alphanumeric},{name:"Yes/No",value:Ld.J},{name:"Multi select",value:Ld.MultiSelect}],this._sqlProcedure=""}ngOnInit(){this._getScreenConfigData()}addRubric(){this.currentConfig.rubrics.push(new jF)}removeRubric(n){this.currentConfig.rubrics.splice(n,1)}addSubTab(n){this.currentConfig.rubrics[n].headers.unshift(new zF)}removeSubTab(n,r){this.currentConfig.rubrics[n].headers.splice(r,1)}addHeader(n,r){this.currentConfig.rubrics[n].headers[r].subRubrics.unshift(new XF)}removeHeader(n,r,o){this.currentConfig.rubrics[n].headers[r].subRubrics.splice(o,1)}addField(n,r,o){this.currentConfig.rubrics[n].headers[r].subRubrics[o].fields.unshift(new YF)}removeField(n,r,o,s){this.currentConfig.rubrics[n].headers[r].subRubrics[o].fields.splice(s,1)}copySQLProcedure(){this._sqlProcedure="",this._defineObjectNames(),this._createProcedurePrefix(),this._createIdSymbols(),this._createIdSymbols(!1),this._createScreenConfigRubrics(),this._createObjects(),this._createScreenConfigObjects(),this._createProcedureSuffix(),this._copyToClipboard(this._sqlProcedure)}_createProcedurePrefix(){this._sqlProcedure+=`/**
|
|
234
|
+
`)},enumerable:!0,configurable:!0}),i.prototype.setData=function(e){e&&(e.fieldNames&&(this.fieldNames=e.fieldNames),e.pagingParameters&&this.pagingParameters.setData(e.pagingParameters),Ro(e.resultObject)&&(this.resultObject=e.resultObject),e.resultObjects&&(this.resultObjects=e.resultObjects),e.validationResult&&this.validationResult.setData(e.validationResult))},i.prototype.getGeneralErrorString=function(){return this.validationResult?this.validationResult.getGeneralErrorString():""},i})();var _c=(function(i){return i.ListPrinters="listAllPrinters",i.PrintOrderConfirmation="printOrderConfirmation",i.EmailOrderConfirmation="emailOrderConfirmation",i.PdfOrderConfirmation="pdfOrderConfirmation",i.TextingReport="textingReport",i.CutReceipt="cutReceipt",i.OpenDrawer="openDrawer",i.GetOrderConfirmationPrintLayouts="getOrderConfirmationPrintLayouts",i.GetOrderConfirmationEmailLayouts="getOrderConfirmationEmailLayouts",i.GetStockStickerEmailLayouts="getStockStickerEmailLayouts",i.GetStockStickerPrintLayouts="getStockStickerPrintLayouts",i.GetPriceTagPrintLayouts="getPriceTagPrintLayouts",i.GetOrderConfirmationDefaultSendMethod="getOrderConfirmationDefaultSendMethod",i.GetPurchaseOrderDefaultSendMethod="getPurchaseOrderDefaultSendMethod",i.GetReminderPurchaseOrderDefaultSendMethod="getReminderPurchaseOrderDefaultSendMethod",i.GetDemandingDeliveryDefaultSendMethod="getDemandingDeliveryDefaultSendMethod",i.GetDeliveryNoteDefaultSendMethod="getDeliveryNoteDefaultSendMethod",i.GetDefaultEmailAddressListForOrderConfirmation="getDefaultEmailAddressListForOrderConfirmation",i.GetPurchaseOrderEmailLayouts="getPurchaseOrderEmailLayouts",i})(_c||{});var Ms=(function(i){return i.Printers="Printers",i.Stock="Stock",i.ReportingDocument="reportingDocuments",i.Report="Report",i.CoReport="CoReport",i.General="General",i.Articles="Articles",i.Config="config",i.Tags="Tags",i})(Ms||{});var Pj=(function(i){return i.GetWarehouses="getWarehouses",i.UpdateLocation="updateLocation",i.UpdateSerie="updateSerie",i.UpdateBatch="updateBatch",i.IsArticleStockAdditionalInfoEditable="isArticleStockAdditionalInfoEditable",i.IsStockEditable="isStockEditable",i.GetArtStockStatus="getArtStockStatus",i.GetArticleStockInformation="getArticleStockInformation",i.GetStockHistory="getStockHistory",i.PrintStockStickers="printStockStickers",i.PrintPriceStickers="printPriceStickers",i})(Pj||{});var Qs=(function(i){return i.SelectSingleObject="selectSingleObject",i.SelectMultipleObjects="selectMultipleObjects",i.UpdateObject="updateObject",i.InsertObject="insertObject",i.DeleteObject="deleteObject",i.ExecuteMethod="executeMethod",i.LockObject="lockObject",i.UnlockObject="unlockObject",i.UpdateMultipleObjects="updateMultipleObjects",i.InsertMultipleObjects="insertMultipleObjects",i.DeleteMultipleObjects="deleteMultipleObjects",i.Commit="commit",i})(Qs||{});var Mj=(function(i){return i.DataService="dataservice",i.LoginService="login",i.ReportService="reportservice",i.WebCallService="webcallservice",i.PublicService="publicservice",i.DatasessionService="datasessionservice",i.PrintingService="printingservice",i})(Mj||{});var Lfe=(function(i){return i.CoDocument="CoDocument",i})(Lfe||{});var wfe=(function(i){return i.SelectDocsByTableKey="selectDocsByTableKey",i})(wfe||{});var Pfe=(function(i){return i.GetDocumentContent="getDocumentContent",i})(Pfe||{});var Mfe=(function(i){return i.StoreSignedDoc="storeSignedDoc",i})(Mfe||{});var kj=(function(i){return i.SubRubric="SubRubric",i.ConfigTreeObject="ConfigTreeObject",i})(kj||{});var Hbt=(function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},i(e,t)};return function(e,t){i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Wbt=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},jbt=function(i,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,r&&(o=c[0]&2?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,r=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(i,t)}catch(d){c=[6,d],r=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},FGe=(function(i){Hbt(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e.prototype.listAllPrinters=function(t){t===void 0&&(t=!0);var n={moduleName:Ms.ReportingDocument,methodName:_c.ListPrinters,refCursorAsArray:!0};return this._call(Qs.ExecuteMethod,n)},e.prototype.printReport=function(t){var n={printerName:t.printerName,saveDefaultPrinterForUser:t.saveDefaultPrinterForUser,saveDefaultPrinterForAllUsers:t.saveDefaultPrinterForAllUsers,copies:t.copies,transId:t.transId,reportId:t.reportId},r={moduleName:Ms.ReportingDocument,methodName:_c.PrintOrderConfirmation,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getStockStickerEmailLayouts=function(t){var n={moduleName:Ms.ReportingDocument,methodName:_c.GetStockStickerEmailLayouts,refCursorAsArray:!0,parameterValues:t};return this._call(Qs.ExecuteMethod,n)},e.prototype.getStockStickerPrintLayouts=function(t){var n={moduleName:Ms.ReportingDocument,methodName:_c.GetStockStickerPrintLayouts,refCursorAsArray:!0,parameterValues:t};return this._call(Qs.ExecuteMethod,n)},e.prototype.getPriceTagPrintLayouts=function(t){var n={moduleName:Ms.ReportingDocument,methodName:_c.GetPriceTagPrintLayouts,refCursorAsArray:!0,parameterValues:t};return this._call(Qs.ExecuteMethod,n)},e.prototype.emailReport=function(t){var n={moduleName:Ms.ReportingDocument,methodName:_c.EmailOrderConfirmation,refCursorAsArray:!0,parameterValues:t};return this._call(Qs.ExecuteMethod,n)},e.prototype.pdfReport=function(t){var n={moduleName:Ms.ReportingDocument,methodName:_c.PdfOrderConfirmation,refCursorAsArray:!0,parameterValues:t};return this._call(Qs.ExecuteMethod,n)},e.prototype.getPrintStockStickers=function(t){var n={goodId:t.goodId,warehouse:t.warehouse,location:t.location,batch:t.batch,serial:t.serial,amount:t.amount,reportId:t.reportId,printerName:t.printerName},r={moduleName:Ms.Stock,methodName:Pj.PrintStockStickers,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.printPriceStickers=function(t){var n={priceListCode:t.priceListCode,reportId:t.reportId,printerName:t.printerName,goodIds:t.goodIds},r={moduleName:Ms.Articles,methodName:Pj.PrintPriceStickers,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getPrintTemplates=function(t){var n={defaultPrinterName:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetOrderConfirmationPrintLayouts,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getEmailTemplates=function(t){var n={emailSubject:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetOrderConfirmationEmailLayouts,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getOrderConfirmationDefaultSendMethod=function(t){var n={relationId:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetOrderConfirmationDefaultSendMethod,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getPurchaseOrderDefaultSendMethod=function(t){var n={relationId:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetPurchaseOrderDefaultSendMethod,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getReminderPurchaseOrderDefaultSendMethod=function(t){var n={relationId:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetReminderPurchaseOrderDefaultSendMethod,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getDemandingDeliveryDefaultSendMethod=function(t){var n={relationId:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetDemandingDeliveryDefaultSendMethod,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getDeliveryNoteDefaultSendMethod=function(t){var n={relationId:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetDeliveryNoteDefaultSendMethod,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getDefaultEmailAddressListForOrderConfirmation=function(t){var n={transactionUUID:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetDefaultEmailAddressListForOrderConfirmation,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.getPurchaseOrderEmailLayouts=function(t){var n={transactionUUID:t},r={moduleName:Ms.ReportingDocument,methodName:_c.GetPurchaseOrderEmailLayouts,refCursorAsArray:!0,parameterValues:n};return this._call(Qs.ExecuteMethod,r)},e.prototype.selectDocsByTableKey=function(t,n){var r={table:t,key:n};return this._selectMultiple(Ms.General,Lfe.CoDocument,wfe.SelectDocsByTableKey,r)},e.prototype.getDocumentContent=function(t,n){if(n===void 0&&(n=!0),t==null)return Promise.resolve(new MI);var r={documentId:t,thumbnail:n},o={moduleName:Ms.General,methodName:Pfe.GetDocumentContent,refCursorAsArray:!0,parameterValues:r};return this._call(Qs.ExecuteMethod,o)},e.prototype.storeSignedDoc=function(t,n){var r={docId:t,document:n},o={moduleName:Ms.Report,methodName:Mfe.StoreSignedDoc,refCursorAsArray:!0,parameterValues:r};return this._call(Qs.ExecuteMethod,o)},e.prototype.getConfigSubRubric=function(t,n,r){var o={parentRubricId:t,configId:n,fixedKey:r};return this._selectMultiple(Ms.Config,kj.SubRubric,void 0,o)},e.prototype.getConfigTreeObject=function(t,n){var r={full:t,clientType:n};return this._selectMultiple(Ms.Config,kj.ConfigTreeObject,void 0,r)},e.prototype.commit=function(){return this._call(Qs.Commit,{},Mj.DatasessionService)},e.prototype._selectMultiple=function(t,n,r,o){var s={moduleName:t,objectName:n};return r&&(s.operationName=r),o&&(s.parameterValues=o),this._call(Qs.SelectMultipleObjects,s)},e.prototype._call=function(t,n,r,o){return r===void 0&&(r=Mj.DataService),o===void 0&&(o=!1),Wbt(this,void 0,void 0,function(){return jbt(this,function(s){return[2,this.connector.call(t,n,o,r,this.endPoint)]})})},e})(bj);var VGe=Be(Fy());var UGe=Be(C_());var kfe=(function(i){return i.GetDocumentContent="getDocumentContent",i})(kfe||{});var zbt=(function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},i(e,t)};return function(e,t){i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),xj=function(){return xj=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},xj.apply(this,arguments)},Rl=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Ol=function(i,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,r&&(o=c[0]&2?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,r=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(i,t)}catch(d){c=[6,d],r=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},BGe=(function(i){zbt(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.endPoint=UGe.EndPoint.PublicService,t}return e.prototype.listAllPrinters=function(t){return t===void 0&&(t=!0),Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.printReport=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getStockStickerEmailLayouts=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getStockStickerPrintLayouts=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.emailReport=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.pdfReport=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getPrintTemplates=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getEmailTemplates=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getOrderConfirmationDefaultSendMethod=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getPurchaseOrderDefaultSendMethod=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getReminderPurchaseOrderDefaultSendMethod=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getDemandingDeliveryDefaultSendMethod=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getDeliveryNoteDefaultSendMethod=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getDefaultEmailAddressListForOrderConfirmation=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getPurchaseOrderEmailLayouts=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.getPrintStockStickers=function(){return Rl(this,void 0,void 0,function(){return Ol(this,function(t){return[2,null]})})},e.prototype.printPriceStickers=function(t){return Rl(this,void 0,void 0,function(){return Ol(this,function(n){return[2,null]})})},e.prototype.selectDocsByTableKey=function(t,n){return console.warn("selectDocsByTableKey not implemented"),Promise.resolve(new MI)},e.prototype.getDocumentContent=function(t,n){return n===void 0&&(n=!0),Rl(this,void 0,void 0,function(){var r,o;return Ol(this,function(s){return r={documentId:t,thumbnail:n},o=xj(xj({},this.createServiceRequestData()),{parameterValues:r}),[2,this._call(kfe.GetDocumentContent,o)]})})},e.prototype.storeSignedDoc=function(t,n){return console.warn("storeSignedDoc not implemented"),Promise.resolve(new MI)},e.prototype.getConfigSubRubric=function(t,n,r){return console.warn("getConfigSubRubric not implemented"),Promise.resolve(new MI)},e.prototype.getConfigTreeObject=function(t,n){return console.warn("getConfigTreeObject not implemented"),Promise.resolve(new MI)},e.prototype.commit=function(){return Rl(this,void 0,void 0,function(){return Ol(this,function(t){return[2,null]})})},e.prototype.createServiceRequestData=function(){var t={languageCode:this.languageCode};return t},e.prototype._call=function(t,n,r){return r===void 0&&(r=!1),Rl(this,void 0,void 0,function(){return Ol(this,function(o){return[2,this.connector.call(t,n,r,void 0,this.endPoint)]})})},e})(bj);var Ybt=function(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})},Kbt=function(i,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,r&&(o=c[0]&2?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,r=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1],o=c;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(c);break}o[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(i,t)}catch(d){c=[6,d],r=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},GGe=(function(){function i(e){var t=this;this.showLoader=new Jm,this.connectionAborted=new Jm,this.connectionResetInactivity=new Jm,this.useLoginEncryption=!1,this._subs=[],e&&(this.url=e.url?e.url:"",this.version=e.version?e.version:"",this.schema=e.schema?e.schema:"",this.branch=e.branch?e.branch:"",this.languageCode=e.languageCode,this.currencyId=e.hasOwnProperty("currencyId")?e.currencyId:void 0,this.useLoginEncryption=e.hasOwnProperty("useLoginEncryption")?e.useLoginEncryption===!0:!1),this._connector=new VGe.Connector(e),this.sharedapi=i.createConnector(this._connector.isPublicSession(),this._connector.hasSession()),this.sharedapi.connector=this._connector,this.sharedapi.languageCode=this.languageCode,this.sharedapi.branchNr=this.branch,this._subs.push(this.sharedapi.showLoader.subscribe(function(n){return t.showLoader.next(n)}),this.sharedapi.connectionAborted.subscribe(function(){return t.connectionAborted.next()}),this.sharedapi.connectionResetInactivity.subscribe(function(){return t._handleConnectionReset()}))}return i.prototype.connect=function(){return Ybt(this,void 0,void 0,function(){return Kbt(this,function(e){return[2,this._connector.connect()]})})},i.prototype.listAllPrinters=function(e){return e===void 0&&(e=!0),this.sharedapi.listAllPrinters(e)},i.prototype.printReport=function(e){return this.sharedapi.printReport(e)},i.prototype.getStockStickerEmailLayouts=function(e){return this.sharedapi.getStockStickerEmailLayouts(e)},i.prototype.getStockStickerPrintLayouts=function(e){return this.sharedapi.getStockStickerPrintLayouts(e)},i.prototype.emailReport=function(e){return this.sharedapi.emailReport(e)},i.prototype.pdfReport=function(e){return this.sharedapi.pdfReport(e)},i.prototype.getPrintTemplates=function(e){return this.sharedapi.getPrintTemplates(e)},i.prototype.getEmailTemplates=function(e){return this.sharedapi.getEmailTemplates(e)},i.prototype.getOrderConfirmationDefaultSendMethod=function(e){return this.sharedapi.getOrderConfirmationDefaultSendMethod(e)},i.prototype.getPurchaseOrderDefaultSendMethod=function(e){return this.sharedapi.getPurchaseOrderDefaultSendMethod(e)},i.prototype.getReminderPurchaseOrderDefaultSendMethod=function(e){return this.sharedapi.getReminderPurchaseOrderDefaultSendMethod(e)},i.prototype.getDemandingDeliveryDefaultSendMethod=function(e){return this.sharedapi.getDemandingDeliveryDefaultSendMethod(e)},i.prototype.getDeliveryNoteDefaultSendMethod=function(e){return this.sharedapi.getDeliveryNoteDefaultSendMethod(e)},i.prototype.getDefaultEmailAddressListForOrderConfirmation=function(e){return this.sharedapi.getDefaultEmailAddressListForOrderConfirmation(e)},i.prototype.getPurchaseOrderEmailLayouts=function(e){return this.sharedapi.getPurchaseOrderEmailLayouts(e)},i.prototype.getPrintStockStickers=function(e){return this.sharedapi.getPrintStockStickers(e)},i.prototype.printPriceStickers=function(e){return this.sharedapi.printPriceStickers(e)},i.prototype.selectDocsByTableKey=function(e,t){return this.sharedapi.selectDocsByTableKey(e,t)},i.prototype.getDocumentContent=function(e,t){return t===void 0&&(t=!0),this.sharedapi.getDocumentContent(e,t)},i.prototype.storeSignedDoc=function(e,t){return this.sharedapi.storeSignedDoc(e,t)},i.prototype.getConfigSubRubric=function(e,t,n){return this.sharedapi.getConfigSubRubric(e,t,n)},i.prototype.getConfigTreeObject=function(e,t){return this.sharedapi.getConfigTreeObject(e,t)},i.prototype.commit=function(){return this.sharedapi.commit()},i.createConnector=function(e,t){return!e||t?new FGe:new BGe},i.prototype._handleConnectionReset=function(){this.connectionResetInactivity.next()},i})();var HGe=Be(Wi()),Fj=class extends HGe.BusinessObject{};var WGe=Be(Wi()),Uj=class extends WGe.BusinessObject{};var kI=Be(Xa()),jGe=Be(Wi()),zy=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Il=class extends jGe.BusinessObject{};zy([(0,kI.BooleanText)("T")],Il.prototype,"locationItem",void 0);zy([(0,kI.BooleanText)("T")],Il.prototype,"serialNoItem",void 0);zy([(0,kI.BooleanText)("T")],Il.prototype,"batchItem",void 0);zy([(0,kI.BooleanText)("T")],Il.prototype,"trackingStock",void 0);zy([(0,kI.BooleanText)("T")],Il.prototype,"selected",void 0);zy([(0,kI.BooleanText)("T")],Il.prototype,"transactionTransfer",void 0);var zGe=Be(Wi()),Bj=class extends zGe.BusinessObject{};var YGe=Be(Wi()),eE=class extends YGe.BusinessObject{};var KGe=Be(Wi()),Vj=class extends KGe.BusinessObject{};var qGe=Be(Wi()),Gj=class extends qGe.BusinessObject{};var oje=Be(Cz()),sje=Be(n_e()),aje=Be(o7e()),lje=Be(Cl()),sEe=Be(d_e()),cje=Be(MH()),dje=Be(c9e()),uje=Be(_Y()),hje=Be(R9e()),fje=Be(O9e()),_je=Be(CY()),pje=Be(I9e()),VY=Be(z_()),Eje=Be(Z9e()),mje=Be(KI()),gje=Be(J9e()),Aje=Be(Cb()),Tje=Be(Sb()),Sje=Be(QS()),Cje=Be(tje()),Rje=Be(Zx()),GY=Be(BY());var mc=(()=>{let e=class e{constructor(n){this._optionsService=n,this._boFactory=new lje.BusinessObjectFactory}connect(){return B(this,null,function*(){this.sharedConnector=new GGe(this._optionsService.options),yield this.sharedConnector.connect(),this.articleConnector=new Nj(this._optionsService.options),this.mainConnector=new oje.MainApi(this._optionsService.options),this.relationConnector=new dje.RelationApi(this._optionsService.options)})}getConfiguration(n,r){return B(this,null,function*(){let o=yield this.mainConnector.getObjectConfigurations(n,r);if(o&&o.validationResult&&o.validationResult.success)return this._boFactory.makeBOArrayFromRawBackendDataArray(cje.ObjectConfiguration,o.resultObjects)})}getSequenceValue(n){return B(this,null,function*(){let r=yield this.mainConnector.getSequenceValue(n);return r&&r.validationResult&&r.validationResult.success?parseInt(r.resultObject):null})}getAllPrinters(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.listAllPrinters().then(o=>{o.validationResult&&o.validationResult.success?o.resultObject&&n(this._boFactory.makeBOArrayFromRawBackendDataArray(sje.Printer,o.resultObject)):r(o.validationMessagesAsString)}))})}getDefaultPrinter(n,r){return B(this,null,function*(){let o=yield this.mainConnector.getStandardPrinter(n,r);if(o&&o.validationResult&&o.validationResult.success){if(o.resultObject&&o.resultObject?.length>0)return o.resultObject}else return null})}getSendMethods(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.getSendMethods().then(o=>{o.validationResult&&o.validationResult.success?o.resultObject&&o.resultObject.result&&n(this._boFactory.makeBOArrayFromRawBackendDataArray(aje.SendMethod,o.resultObject.result)):r(o.validationMessagesAsString)}))})}getScreenConfigTree(){return B(this,null,function*(){return new Promise((n,r)=>this.sharedConnector.getConfigTreeObject("T","JS").then(o=>{o.validationResult&&o.validationResult.success?o.resultObjects&&n(o.resultObjects):r(o.validationMessagesAsString)}))})}getScreenConfigSubRubric(n,r,o){return B(this,null,function*(){return new Promise((s,a)=>this.sharedConnector.getConfigSubRubric(n,r,o).then(l=>{l.validationResult&&l.validationResult.success?l.resultObjects&&s(l.resultObjects):a(l.validationMessagesAsString)}))})}getTagsFullTree(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getTagsFullTree(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(sEe.TagTreeItem,a.resultObjects)):s(a.validationMessagesAsString)}))})}getComponentActivitiesWithoutRelationFiltering(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getComponentActivitiesWithoutRelationFiltering(n,r).then(a=>{a&&a.validationResult&&a.validationResult.success?o(this._boFactory.makeBOArrayFromRawBackendDataArray(VY.Activity,a.resultObject)):s(a.validationMessagesAsString)}))})}getRelationSmallObject(n){return B(this,null,function*(){return new Promise((r,o)=>this.relationConnector.getRelationSmallObject(n).then(s=>{s&&s.validationResult&&s.validationResult.success?r(this._boFactory.makeWithRawBackendData(mje.RelationSmallObject,s.resultObject)):o(s.validationMessagesAsString)}))})}getWorkflowStatusForActivity(n,r,o){return B(this,null,function*(){return new Promise((s,a)=>this.mainConnector.getWorkflowStatusForActivity(n,r,o).then(l=>B(this,null,function*(){l&&l.validationResult&&l.validationResult.success?s(this._boFactory.makeWithRawBackendData(Cje.ActivityWorkflow,l.resultObject)):a(l.validationMessagesAsString)})))})}insertActivity(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertActivity(n).then(s=>B(this,null,function*(){r(s.validationResult)})))})}insertWork(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertActivity(n).then(s=>B(this,null,function*(){s&&s.validationResult&&s.validationResult.success?r(this._boFactory.makeWithRawBackendData(Aje.Work,s.resultObject)):o(s.validationMessagesAsString)})))})}insertRemark(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertActivity(n).then(s=>B(this,null,function*(){s&&s.validationResult&&s.validationResult.success?r(this._boFactory.makeWithRawBackendData(Tje.Remark,s.resultObject)):o(s.validationMessagesAsString)})))})}insertTask(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertActivity(n).then(s=>B(this,null,function*(){s&&s.validationResult&&s.validationResult.success?r(this._boFactory.makeWithRawBackendData(Sje.Task,s.resultObject)):o(s.validationMessagesAsString)})))})}updateActivity(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.updateActivity(n).then(s=>B(this,null,function*(){r(s.validationResult)})))})}deleteActivity(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.deleteActivity(n).then(s=>B(this,null,function*(){r(s.validationResult)})))})}lockTask(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.lockTask(n).then(s=>B(this,null,function*(){r(s.validationResult)})))})}fireTrigger(n,r,o){return B(this,null,function*(){return new Promise((s,a)=>this.mainConnector.fireTrigger(n,r,o).then(l=>B(this,null,function*(){s(l.validationResult)})))})}fireGenericTrigger(n,r,o){return B(this,null,function*(){return new Promise((s,a)=>this.mainConnector.fireGenericTrigger(n,r,o).then(l=>B(this,null,function*(){s(l.validationResult)})))})}getJoinedTags(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getJoinedTags(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(sEe.TagTreeItem,a.resultObjects)):s(a.validationMessagesAsString)}))})}getDocumentContent(n,r=!0){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getDocumentContent(n,r).then(a=>{a.validationResult&&a.validationResult.success?o(a.resultObject.documentContent):s(a.validationMessagesAsString)}))})}getStockHistory(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getStockHistory(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&s.resultObject.hasOwnProperty("stockHistory")&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Uj,s.resultObject.stockHistory)):o(s.validationMessagesAsString)}))})}getStockInformation(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getStockInformation(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Fj,s.resultObjects)):o(s.validationMessagesAsString)}))})}getArtStockStatus(n,r,o,s){return B(this,null,function*(){return new Promise((a,l)=>this.articleConnector.getArtStockStatus(n,r,o,s).then(c=>{c.validationResult&&c.validationResult.success?c.resultObject&&a(c.resultObject):l(c.validationMessagesAsString)}))})}getArticleFlat(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getArticleFlat(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&r(s.resultObject):o(s.validationMessagesAsString)}))})}searchArticles(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.searchArticles(n,!1).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(eE,s.resultObjects)):o(s.validationMessagesAsString)}))})}getStockManagementWarehouses(){return B(this,null,function*(){return new Promise((n,r)=>this.articleConnector.getStockManagementWarehouses().then(o=>{o.validationResult&&o.validationResult.success?o.resultObjects&&n(this._boFactory.makeBOArrayFromRawBackendDataArray(eE,o.resultObjects)):r(o.validationMessagesAsString)}))})}getStockManagementLocations(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getStockManagementLocations(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Vj,s.resultObjects)):o(s.validationMessagesAsString)}))})}getArticleDetails(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getArticleDetails(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Il,s.resultObjects)):o(s.validationMessagesAsString)}))})}updateArticleDetails(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.updateArticleDetails(n).then(s=>B(this,null,function*(){s.validationResult&&s.validationResult.success?(yield this.commit(),r(!0)):o(s.validationMessagesAsString)})))})}lockArticleDetails(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.lockArticleDetails(n).then(s=>B(this,null,function*(){if(s.validationResult&&s.validationResult.success)return this.commit();o(s.validationMessagesAsString)})))})}getStockStatus(){return B(this,null,function*(){return new Promise((n,r)=>this.articleConnector.getStockState().then(o=>{o.validationResult&&o.validationResult.success?o.resultObjects&&n(this._boFactory.makeBOArrayFromRawBackendDataArray(Bj,o.resultObjects)):r(o.validationMessagesAsString)}))})}getArticleTransaction(n){return B(this,null,function*(){return new Promise((r,o)=>this.articleConnector.getArticleTransaction(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Gj,s.resultObjects)):o(s.validationMessagesAsString)}))})}getStockPrognose(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.articleConnector.getStockForecast(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(a.resultObjects):s(a.validationMessagesAsString)}))})}getRelationListObjects(n){return B(this,null,function*(){return new Promise((r,o)=>this.relationConnector.getRelationListObjects(n,!1).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(uje.RelationListObject,s.resultObjects)):o(s.validationMessagesAsString)}))})}getTaskCategories(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.getTaskCategories().then(o=>{o.validationResult&&o.validationResult.success?o.resultObjects&&n(this._boFactory.makeBOArrayFromRawBackendDataArray(hje.TaskCategory,o.resultObjects)):r(o.validationMessagesAsString)}))})}getActiveProcessesByTableAndKey(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getActiveProcessesByTableAndKey(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(fje.WorkflowProcess,a.resultObjects)):s(a.validationMessagesAsString)}))})}getDomainCollection(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getDomainCollection(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(_je.CoDomainValue,a.resultObjects)):s(a.validationMessagesAsString)}))})}getRoleEmailAddressesByWorkflowCategoryAndKey(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getRoleEmailAddressesByWorkflowCategoryAndKey(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObject&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(pje.RoleEmailaddress,a.resultObject)):s(a.validationMessagesAsString)}))})}getEmailSenderByWorkflowCategoryAndKey(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getEmailSenderByWorkflowCategoryAndKey(n,r).then(a=>{a.validationResult&&a.validationResult.success?o(a.resultObject):s(a.validationMessagesAsString)}))})}getReportTemplates(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.getReportTemplates(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObjects&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(gje.Report,s.resultObjects)):o(s.validationMessagesAsString)}))})}emailReport(n){return B(this,null,function*(){let r=yield this.mainConnector.emailReport(n);return r&&r.validationResult&&r.validationResult.success?Promise.resolve(!0):Promise.resolve(!1)})}emailActivity(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.emailActivity(n).then(s=>{s.validationResult&&s.validationResult.success?r(!0):o(s.validationMessagesAsString)}))})}insertEmailHistoryForRemark(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertEmailHistoryForRemark(n).then(s=>{s.validationResult&&s.validationResult.success?r(!0):o(s.validationMessagesAsString)}))})}insertEmailHistoryForWork(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertEmailHistoryForWork(n).then(s=>{s.validationResult&&s.validationResult.success?r(s.resultObject):o(s.validationMessagesAsString)}))})}insertEmailHistoryForTask(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertEmailHistoryForTask(n).then(s=>{s.validationResult&&s.validationResult.success?r(s.resultObject):o(s.validationMessagesAsString)}))})}getWorkflowProcessInfoPerStatus(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.getWorkflowProcessInfoPerStatus(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&r(this._boFactory.makeBOArrayFromRawBackendDataArray(Eje.WorkflowProcessInfoPerStatus,s.resultObject)):o(s.validationMessagesAsString)}))})}getHistoricActivities(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getHistoricActivities(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObject&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(VY.Activity,a.resultObject)):s(a.validationMessagesAsString)}))})}getComponentActivities(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getComponentActivities(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObject&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(VY.Activity,a.resultObject)):s(a.validationMessagesAsString)}))})}getFormById(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.getFormById(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&r(this._boFactory.makeWithRawBackendData(Rje.Form,s.resultObject)):o(s.validationMessagesAsString)}))})}getAllFormResponsesForTableAndKey(n,r){return B(this,null,function*(){return new Promise((o,s)=>this.mainConnector.getAllFormResponsesForTableAndKey(n,r).then(a=>{a.validationResult&&a.validationResult.success?a.resultObjects&&o(this._boFactory.makeBOArrayFromRawBackendDataArray(GY.FormResponse,a.resultObjects)):s(a.validationMessagesAsString)}))})}insertFormResponse(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.insertFormResponse(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&r(this._boFactory.makeWithRawBackendData(GY.FormResponse,s.resultObject)):o(s.validationMessagesAsString)}))})}updateFormResponse(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.updateFormResponse(n).then(s=>{s.validationResult&&s.validationResult.success?s.resultObject&&r(this._boFactory.makeWithRawBackendData(GY.FormResponse,s.resultObject)):o(s.validationMessagesAsString)}))})}lockFormResponse(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.lockFormResponse(n).then(s=>{s.validationResult&&s.validationResult.success?r(!0):o(s.validationResult.messages[0].message)}))})}unlockFormResponse(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.unlockFormResponse(n).then(s=>{s.validationResult&&s.validationResult.success?r(!0):o(s.validationResult.messages[0].message)}))})}getStockStickerEmailLayouts(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.getStockStickerEmailLayouts().then(o=>{o.validationResult&&o.validationResult.success?n(o.resultObjects):r(o.validationResult.messages[0].message)}))})}getStockStickerPrintLayouts(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.getStockStickerPrintLayouts().then(o=>{o.validationResult&&o.validationResult.success?n(o.resultObject):r(o.validationResult.messages[0].message)}))})}printStockStickers(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.printStockStickers(n).then(s=>{s.validationResult&&s.validationResult.success?r(s.validationResult.success):o(s.validationResult.messages[0].message)}))})}getTransferStickerPrintLayouts(){return B(this,null,function*(){return new Promise((n,r)=>this.mainConnector.getTransferStickerPrintLayouts().then(o=>{o.validationResult&&o.validationResult.success?n(o.resultObject):r(o.validationResult.messages[0].message)}))})}printTransferStickers(n){return B(this,null,function*(){return new Promise((r,o)=>this.mainConnector.printTransferStickers(n).then(s=>{s.validationResult&&s.validationResult.success?r(s.validationResult.success):o(s.validationResult.messages[0].message)}))})}commit(){return B(this,null,function*(){let n=yield this.articleConnector.commit();return n&&n.validationResult&&n.validationResult.success?Promise.resolve(!0):Promise.resolve(!1)})}};e.\u0275fac=function(r){return new(r||e)(Ut(_S))},e.\u0275prov=pt({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var bi=(()=>{let e=class e{constructor(n,r,o,s){this.locale=n,this.options=r,this.connector=o,this.dictionary=s}init(n){return B(this,null,function*(){yield this.options.initialize(n),yield this.connector.connect()})}connect(){return B(this,null,function*(){yield this.connector.connect()})}getSequenceValue(n){return this.connector.getSequenceValue(n)}getAllPrinters(){return B(this,null,function*(){return yield this.connector.getAllPrinters()})}getDefaultPrinter(n,r){return B(this,null,function*(){return yield this.connector.getDefaultPrinter(n,r)})}getSendMethods(){return B(this,null,function*(){return yield this.connector.getSendMethods()})}getScreenConfigTree(){return B(this,null,function*(){return yield this.connector.getScreenConfigTree()})}getScreenConfigSubRubric(n,r,o){return B(this,null,function*(){return yield this.connector.getScreenConfigSubRubric(n,r,o)})}getTagsFullTree(n,r=!0){return B(this,null,function*(){return yield this.connector.getTagsFullTree(n,r)})}getJoinedTags(n,r){return B(this,null,function*(){return yield this.connector.getJoinedTags(n,r)})}getDocumentContent(n,r=!0){return B(this,null,function*(){return yield this.connector.getDocumentContent(n,r)})}getComponentActivitiesWithoutRelationFiltering(n,r){return B(this,null,function*(){return yield this.connector.getComponentActivitiesWithoutRelationFiltering(n,r)})}getRelationSmallObject(n){return B(this,null,function*(){return yield this.connector.getRelationSmallObject(n)})}getWorkflowStatusForActivity(n,r,o){return B(this,null,function*(){return yield this.connector.getWorkflowStatusForActivity(n,r,o)})}insertActivity(n){return B(this,null,function*(){return yield this.connector.insertActivity(n)})}insertWork(n){return B(this,null,function*(){return yield this.connector.insertWork(n)})}insertRemark(n){return B(this,null,function*(){return yield this.connector.insertRemark(n)})}insertTask(n){return B(this,null,function*(){return yield this.connector.insertTask(n)})}updateActivity(n){return B(this,null,function*(){return yield this.connector.updateActivity(n)})}deleteActivity(n){return B(this,null,function*(){return yield this.connector.deleteActivity(n)})}lockTask(n){return B(this,null,function*(){return yield this.connector.lockTask(n)})}commit(){return B(this,null,function*(){return this.connector.commit()})}canFireTrigger(n,r){return!0}fireTrigger(n,r,o){return B(this,null,function*(){return yield this.connector.fireTrigger(n,r,o)})}fireGenericTrigger(n,r,o){return B(this,null,function*(){return yield this.connector.fireGenericTrigger(n,r,o)})}getRelationListObjects(n){return B(this,null,function*(){return yield this.connector.getRelationListObjects(n)})}getTaskCategories(){return B(this,null,function*(){return yield this.connector.getTaskCategories()})}getActiveProcessesByTableAndKey(n,r){return B(this,null,function*(){return yield this.connector.getActiveProcessesByTableAndKey(n,r)})}getDomainCollection(n,r){return B(this,null,function*(){return yield this.connector.getDomainCollection(n,r)})}getRoleEmailAddressesByWorkflowCategoryAndKey(n,r){return B(this,null,function*(){return yield this.connector.getRoleEmailAddressesByWorkflowCategoryAndKey(n,r)})}getEmailSenderByWorkflowCategoryAndKey(n,r){return B(this,null,function*(){return yield this.connector.getEmailSenderByWorkflowCategoryAndKey(n,r)})}getDefaultEmailReportTemplatesForBranch(n,r){return B(this,null,function*(){let o=new Oje.SelectReportTemplatesRequest;return o.branchNr=n,o.documentCode=r,o.sendMethod=Ije.SendMethodType.Email,yield this.connector.getReportTemplates(o)})}emailViaTemplate(u,h,f,_){return B(this,arguments,function*(n,r,o,s,a="",l="",c=[],d={}){let p=a.trim(),T=this._createEmailJob(n,r,o,s,p,l,c,d);return this.connector.emailReport(T)})}_createEmailJob(n,r,o,s,a,l,c,d={}){let u=new Nje.EmailJob;return u.emailTo=r,u.emailBcc=o,u.reply=s,u.subject=a,u.message=l,u.attachments=c,u.reportId=n.reportId,u.parameterValues=d,u.locale=this.locale,u}emailActivity(n){return B(this,null,function*(){return yield this.connector.emailActivity(n)})}insertEmailHistoryForRemark(n){return B(this,null,function*(){return yield this.connector.insertEmailHistoryForRemark(n)})}insertEmailHistoryForWork(n){return B(this,null,function*(){return yield this.connector.insertEmailHistoryForWork(n)})}insertEmailHistoryForTask(n){return B(this,null,function*(){return yield this.connector.insertEmailHistoryForTask(n)})}getWorkflowProcessInfoPerStatus(n){return B(this,null,function*(){return yield this.connector.getWorkflowProcessInfoPerStatus(n)})}getActivities(n,r){return B(this,null,function*(){let o=yield this.connector.getComponentActivitiesWithoutRelationFiltering(n,r),s=yield this.connector.getHistoricActivities(n,r),a=[],l=[];return o&&o.length>0&&o.forEach(c=>{a.push(c)}),s&&s.length>0&&s.forEach(c=>{l.push(c)}),a.concat(l)})}};e.\u0275fac=function(r){return new(r||e)(Ut(cl),Ut(_S),Ut(mc),Ut(kn))},e.\u0275prov=pt({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var HY=(()=>{let e=class e{set defaultPrinter(n){this.printerModel=n}showClass(){return!0}constructor(n,r){this.sendMethodService=n,this.iconService=r,this.icons=ot,this.printers=[],this.required=!1}handlePrinterClicked(n){n===void 0?this.sendMethodService.printerNotSet.next(!0):(this.printerModel=n,this.sendMethodService.reportingDocumentPrintSignDocBaseRequest.printerName=n.name,this.sendMethodService.reportingDocumentPrintSignDocBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest),this.sendMethodService.printerNotSet.next(!1))}};e.\u0275fac=function(r){return new(r||e)(Q(uh),Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["co-printer-selection"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-printer-selection",o.showClass)},inputs:{printers:"printers",defaultPrinter:"defaultPrinter",required:"required"},standalone:!1,decls:2,vars:7,consts:[[1,"printers-list",3,"modelChange","displayField","model","label","collection","required"]],template:function(r,o){r&1&&(O(0,"co-list-of-values",0),le(1,"sharedLocalize"),W("modelChange",function(a){return o.handlePrinterClicked(a)}),I()),r&2&&S("displayField","name")("model",o.printerModel)("label",ge(1,5,"PRINTER"))("collection",o.printers)("required",o.required)},dependencies:[ns,kt],encapsulation:2});let i=e;return i})();var APt=["additionalFileButton"];function TPt(i,e){if(i&1){let t=de();O(0,"co-additional-file-button",9,0),W("additionalFileChangeEvent",function(r){F(t);let o=R();return U(o.additionalFileChangeEvent.emit(r))}),I()}if(i&2){let t=R();S("additionalFileContents",t.additionalFileContents)("additionalFileName",t.additionalFileName)}}function SPt(i,e){if(i&1&&j(0,"co-signature-button",6),i&2){let t=R();S("request",t.sendMethodService.reportingDocumentPrintSignDocBaseRequest)}}function CPt(i,e){if(i&1&&(j(0,"span",12),le(1,"sharedLocalize"),j(2,"co-printer-selection",14)),i&2){let t=R(2);S("textContent",ge(1,4,"NETWORK_PRINTERS")),m(2),S("defaultPrinter",t.defaultPrinter)("required",!t.localPrint)("printers",t.printerList)}}function RPt(i,e){if(i&1){let t=de();O(0,"div",8),$(1,CPt,3,6),O(2,"div",10)(3,"div",11),j(4,"span",12),le(5,"sharedLocalize"),O(6,"co-input-number-picker",13),W("modelChange",function(r){F(t);let o=R();return U(o.handleCopiesAmountChange(r))}),I()(),O(7,"co-input-checkbox",7),W("modelChange",function(r){F(t);let o=R();return U(o.handleDefaultPrinterUserChange(r))}),I(),O(8,"co-input-checkbox",7),W("modelChange",function(r){F(t);let o=R();return U(o.handleDefaultPrinterAllUsersChange(r))}),I()()()}if(i&2){let t=R();m(),ee(t.localPrint?-1:1),m(3),S("textContent",ge(5,8,"AMOUNT")),m(2),S("model",t.copiesAmount)("min",1),m(),S("model",t.sendMethodService.reportingDocumentPrintSignDocBaseRequest.saveDefaultPrinterForUser)("label","Koppeling onthouden"),m(),S("model",t.sendMethodService.reportingDocumentPrintSignDocBaseRequest.saveDefaultPrinterForAllUsers)("label","Alle gebruikers")}}var Dje=(()=>{let e=class e{showClass(){return!0}constructor(n,r,o){this.sendMethodService=n,this.iconCacheService=r,this._sharedService=o,this.printerList=[],this.layouts=[],this.isPrinterLayoutsEnabled=!0,this.isAdditionalDocEnabled=!1,this.hideSignatureBtn=!1,this.additionalFileContents="",this.additionalFileName="",this.additionalFileChangeEvent=new re,this.useLocalPrint=new re,this.copiesAmountChange=new re,this.icons=ot,this.localPrint=!1,this.copiesAmount=1}ngOnInit(){this.defaultPrinter||this.updatePrinter(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest)}handleDefaultPrinterUserChange(n){this.sendMethodService.reportingDocumentPrintSignDocBaseRequest.saveDefaultPrinterForUser=n,this.sendMethodService.reportingDocumentPrintSignDocBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest)}handleLocalPrintChange(n){this.localPrint=n,this.useLocalPrint.emit(n)}handleDefaultPrinterAllUsersChange(n){this.sendMethodService.reportingDocumentPrintSignDocBaseRequest.saveDefaultPrinterForAllUsers=n,this.sendMethodService.reportingDocumentPrintSignDocBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest)}openAdditionalFileDialog(){this.additionalFileButtonRef?.openForSave()}isAdditionalFileActive(){return this.additionalFileButtonRef?.isActive??!1}updatePrinter(n){this._sharedService.getDefaultPrinter(n.reportId,this.layoutCode).then(r=>{let o=this.printerList.find(s=>s.name===r);if(o)this.defaultPrinter=o;else{let s=this.printerList.find(a=>a.isDefault);s?this.defaultPrinter=s:this.defaultPrinter=this.printerList[0]}this.defaultPrinter&&this.defaultPrinter.name!==this.sendMethodService.reportingDocumentPrintSignDocBaseRequest.printerName&&(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest.printerName=this.defaultPrinter.name,this.sendMethodService.reportingDocumentPrintSignDocBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintSignDocBaseRequest))})}handleCopiesAmountChange(n){this.copiesAmount=n,this.copiesAmountChange.emit(n)}};e.\u0275fac=function(r){return new(r||e)(Q(uh),Q(yt),Q(bi))},e.\u0275cmp=Fe({type:e,selectors:[["co-send-method-printer"]],viewQuery:function(r,o){if(r&1&&qt(APt,5),r&2){let s;xt(s=Ft())&&(o.additionalFileButtonRef=s.first)}},hostVars:2,hostBindings:function(r,o){r&2&&we("co-send-method-printer",o.showClass)},inputs:{printerList:"printerList",layouts:"layouts",isPrinterLayoutsEnabled:"isPrinterLayoutsEnabled",isAdditionalDocEnabled:"isAdditionalDocEnabled",hideSignatureBtn:"hideSignatureBtn",additionalFileContents:"additionalFileContents",additionalFileName:"additionalFileName",layoutCode:"layoutCode"},outputs:{additionalFileChangeEvent:"additionalFileChangeEvent",useLocalPrint:"useLocalPrint",copiesAmountChange:"copiesAmountChange"},standalone:!1,decls:10,vars:14,consts:[["additionalFileButton",""],[1,"send-methods-label",3,"textContent"],[1,"printer-layout-selections-wrapper"],[1,"printer-signature-wrapper"],[3,"requestChange","request","layouts","label","useDefault"],[3,"additionalFileContents","additionalFileName"],[3,"request"],[3,"modelChange","model","label"],[1,"layout-buttons-wrapper"],[3,"additionalFileChangeEvent","additionalFileContents","additionalFileName"],[1,"additional-checks"],[1,"copies-amount-wrapper"],[3,"textContent"],[3,"modelChange","model","min"],[3,"defaultPrinter","required","printers"]],template:function(r,o){r&1&&(j(0,"span",1),le(1,"sharedLocalize"),O(2,"div",2)(3,"div",3)(4,"co-layout-selection",4),vt("requestChange",function(a){return Rt(o.sendMethodService.reportingDocumentPrintSignDocBaseRequest,a)||(o.sendMethodService.reportingDocumentPrintSignDocBaseRequest=a),a}),W("requestChange",function(a){return o.updatePrinter(a)}),I(),$(5,TPt,2,2,"co-additional-file-button",5),$(6,SPt,1,1,"co-signature-button",6),I(),O(7,"co-input-checkbox",7),le(8,"sharedLocalize"),W("modelChange",function(a){return o.handleLocalPrintChange(a)}),I(),$(9,RPt,9,10,"div",8),I()),r&2&&(S("textContent",ge(1,10,"SETTINGS")),m(4),Nt("request",o.sendMethodService.reportingDocumentPrintSignDocBaseRequest),S("layouts",o.layouts)("label","PRINTER_LAYOUT")("useDefault",!1),m(),ee(o.isAdditionalDocEnabled?5:-1),m(),ee(o.hideSignatureBtn?-1:6),m(),S("model",o.localPrint)("label",ge(8,12,"LOCAL_PRINT")),m(2),ee(o.isPrinterLayoutsEnabled?9:-1))},dependencies:[oS,HY,gl,E7,tW,tS,kt],encapsulation:2});let i=e;return i})();var yje=(()=>{let e=class e{showClass(){return!0}constructor(n){this.sendMethodService=n,this.layouts=[],this.showFilePreview=new re,this.loadDefaultPrinterName=new re}};e.\u0275fac=function(r){return new(r||e)(Q(uh))},e.\u0275cmp=Fe({type:e,selectors:[["co-send-method-pdf"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-send-method-pdf",o.showClass)},inputs:{layouts:"layouts"},outputs:{showFilePreview:"showFilePreview",loadDefaultPrinterName:"loadDefaultPrinterName"},standalone:!1,decls:5,vars:6,consts:[[1,"send-methods-label",3,"textContent"],[1,"pdf-layout-selections-wrapper"],[1,"layout-signature-wrapper"],[3,"requestChange","request","layouts","useDefault"]],template:function(r,o){r&1&&(j(0,"span",0),le(1,"sharedLocalize"),O(2,"div",1)(3,"div",2)(4,"co-layout-selection",3),vt("requestChange",function(a){return Rt(o.sendMethodService.reportingDocumentPdfBaseRequest,a)||(o.sendMethodService.reportingDocumentPdfBaseRequest=a),a}),W("requestChange",function(){return o.showFilePreview.emit(o.sendMethodService.reportingDocumentPdfBaseRequest.reportId)}),I()()()),r&2&&(S("textContent",ge(1,4,"SETTINGS")),m(4),Nt("request",o.sendMethodService.reportingDocumentPdfBaseRequest),S("layouts",o.layouts)("useDefault",!1))},dependencies:[oS,kt],encapsulation:2});let i=e;return i})();var aEe=Be($k());var NPt=[[["","extra-content-pass",""]]],vPt=["[extra-content-pass]"];function DPt(i,e){if(i&1){let t=de();O(0,"co-input-checkbox",3),le(1,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R();return U(o.handleLocalPrintChange(r))}),I()}if(i&2){let t=R();S("model",t.localPrint)("label",ge(1,2,"LOCAL_PRINT"))}}function yPt(i,e){if(i&1&&(j(0,"span",12),le(1,"sharedLocalize"),j(2,"co-printer-selection",13)),i&2){let t=R();S("textContent",ge(1,3,"NETWORK_PRINTERS")),m(2),S("defaultPrinter",t.defaultPrinter)("printers",t.printerList)}}function bPt(i,e){if(i&1){let t=de();O(0,"div",9)(1,"co-input-checkbox",3),W("modelChange",function(r){F(t);let o=R();return U(o.handleDefaultPrinterUserChange(r))}),I(),O(2,"co-input-checkbox",3),W("modelChange",function(r){F(t);let o=R();return U(o.handleDefaultPrinterAllUsersChange(r))}),I()()}if(i&2){let t=R();m(),S("model",t.sendMethodService.reportingDocumentCombinedBaseRequest.saveDefaultPrinterForUser)("label","Koppeling onthouden"),m(),S("model",t.sendMethodService.reportingDocumentCombinedBaseRequest.saveDefaultPrinterForAllUsers)("label","Alle gebruikers")}}function LPt(i,e){if(i&1){let t=de();O(0,"div",11)(1,"co-list-of-values",14),le(2,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R();return Rt(o.overruledEmail,r)||(o.overruledEmail=r),U(r)}),W("modelChange",function(r){F(t);let o=R();return U(o.updateEmailOverrule(r))}),I(),O(3,"co-list-of-values",14),le(4,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R();return Rt(o.overruledEdi,r)||(o.overruledEdi=r),U(r)}),W("modelChange",function(r){F(t);let o=R();return U(o.updateEdiOverrule(r))}),I(),O(5,"co-list-of-values",14),le(6,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R();return Rt(o.overruledPrint,r)||(o.overruledPrint=r),U(r)}),W("modelChange",function(r){F(t);let o=R();return U(o.updatePrintOverrule(r))}),I()()}if(i&2){let t=R();m(),S("displayField","description"),Nt("model",t.overruledEmail),S("label",ge(2,12,"OVERRULE_VIA_EMAIL"))("collection",t.overruleOptions),m(2),S("displayField","description"),Nt("model",t.overruledEdi),S("label",ge(4,14,"OVERRULE_VIA_EDI"))("collection",t.overruleOptions),m(2),S("displayField","description"),Nt("model",t.overruledPrint),S("label",ge(6,16,"OVERRULE_VIA_PRINT"))("collection",t.overruleOptions)}}var bje=(()=>{let e=class e{showClass(){return!0}constructor(n,r){this.sendMethodService=n,this._sharedService=r,this.emailLayouts=[],this.printLayouts=[],this.printerList=[],this.pdfDoc="",this.emailUnsignedPossible=!1,this.showFilePreview=new re,this.useLocalPrint=new re,this.localPrint=!1,this.reportForPrinting=new aEe.ReportingDocumentBaseRequest,this.reportForEmailing=new aEe.ReportingDocumentBaseRequest,this.overruleOptions=[{code:1,description:"Print"},{code:2,description:"E-mail"},{code:3,description:"EDI"},{code:8,description:"PDF"}]}ngOnInit(){this.defaultPrinter||this.setDefaultPrinterFromRequest(this.sendMethodService.reportingDocumentCombinedBaseRequest)}setDefaultPrinterFromRequest(n){n&&n.reportIdForPrinting?this._updatePrinterBasedOnReportId(n.reportIdForPrinting):(this.defaultPrinter=this.printerList[0],this._updatePrinterOnRequest()),this._updateRequest()}handleLocalPrintChange(n){this.localPrint=n,this.useLocalPrint.emit(n)}handleDefaultPrinterUserChange(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.saveDefaultPrinterForUser=n,this._updateRequest()}handleDefaultPrinterAllUsersChange(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.saveDefaultPrinterForAllUsers=n,this._updateRequest()}updateReportForPrinting(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.reportIdForPrinting=n.reportId,this._updatePrinterBasedOnReportId(n.reportId),this._updateRequest()}updateReportForEmailing(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.reportIdForEmail=n.reportId,this._updateRequest()}updateUseRelationSpecificReports(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports=n,this._updateRequest()}updateUseRelationSpecificSendMethods(n){this.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificSendMethods=n,this._updateRequest()}updateEmailOverrule(n){this.overruledEmail=n,this.sendMethodService.reportingDocumentCombinedBaseRequest.overruleSendMethodForEmail=n.code,this._updateRequest()}updateEdiOverrule(n){this.overruledEdi=n,this.sendMethodService.reportingDocumentCombinedBaseRequest.overruleSendMethodForEDI=n.code,this._updateRequest()}updatePrintOverrule(n){this.overruledPrint=n,this.sendMethodService.reportingDocumentCombinedBaseRequest.overruleSendMethodForPrinting=n.code,this._updateRequest()}_updateRequest(){this.sendMethodService.reportingDocumentCombinedBaseRequestChanged.next(this.sendMethodService.reportingDocumentCombinedBaseRequest)}_updatePrinterBasedOnReportId(n){this._sharedService.getDefaultPrinter(n,this.layoutCode).then(r=>{let o=this.printerList.find(s=>s.name===r);if(o)this.defaultPrinter=o,this._updatePrinterOnRequest();else{let s=this.printerList.find(a=>a.isDefault);s?(this.defaultPrinter=s,this._updatePrinterOnRequest()):(this.defaultPrinter=this.printerList[0],this._updatePrinterOnRequest())}})}_updatePrinterOnRequest(){this.defaultPrinter&&this.defaultPrinter.name&&(this.sendMethodService.reportingDocumentCombinedBaseRequest.printerName=this.defaultPrinter.name,this._updateRequest())}};e.\u0275fac=function(r){return new(r||e)(Q(uh),Q(bi))},e.\u0275cmp=Fe({type:e,selectors:[["co-send-method-combine-print-email"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-send-method-purchase",o.showClass)},inputs:{emailLayouts:"emailLayouts",printLayouts:"printLayouts",printerList:"printerList",pdfDoc:"pdfDoc",emailUnsignedPossible:"emailUnsignedPossible",showAdditionalChecks:"showAdditionalChecks",showLocalPrint:"showLocalPrint",layoutCode:"layoutCode"},outputs:{showFilePreview:"showFilePreview",useLocalPrint:"useLocalPrint"},standalone:!1,ngContentSelectors:vPt,decls:23,vars:29,consts:[[1,"send-methods-label",3,"textContent"],[1,"save-dialog-contents"],[1,"use-default-wrapper"],[3,"modelChange","model","label"],[1,"info",3,"textContent"],[1,"override-selections-wrapper"],[1,"layout-selections"],[3,"requestChange","request","layouts","label","useDefault"],[3,"model","label"],[1,"additional-checks"],[1,"override-methods-wrapper"],[1,"shipping-methods"],[3,"textContent"],[3,"defaultPrinter","printers"],[3,"modelChange","displayField","model","label","collection"]],template:function(r,o){r&1&&(Mc(NPt),j(0,"span",0),le(1,"sharedLocalize"),O(2,"div",1)(3,"div",2)(4,"co-input-checkbox",3),le(5,"sharedLocalize"),vt("modelChange",function(a){return Rt(o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports,a)||(o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports=a),a}),W("modelChange",function(a){return o.updateUseRelationSpecificReports(a)}),I(),j(6,"div",4),le(7,"sharedLocalize"),I(),O(8,"div",5)(9,"div",6)(10,"co-layout-selection",7),vt("requestChange",function(a){return Rt(o.reportForPrinting,a)||(o.reportForPrinting=a),a}),W("requestChange",function(a){return o.updateReportForPrinting(a)}),I(),O(11,"co-layout-selection",7),vt("requestChange",function(a){return Rt(o.reportForEmailing,a)||(o.reportForEmailing=a),a}),W("requestChange",function(a){return o.updateReportForEmailing(a)}),I()(),$(12,DPt,2,4,"co-input-checkbox",8),$(13,yPt,3,5),$(14,bPt,3,4,"div",9),I()(),O(15,"div",10),j(16,"span",0),le(17,"sharedLocalize"),O(18,"div",2)(19,"co-input-checkbox",3),le(20,"sharedLocalize"),vt("modelChange",function(a){return Rt(o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificSendMethods,a)||(o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificSendMethods=a),a}),W("modelChange",function(a){return o.updateUseRelationSpecificSendMethods(a)}),I()(),$(21,LPt,7,18,"div",11),Jl(22),I()),r&2&&(S("textContent",ge(1,19,"SETTINGS")),m(4),Nt("model",o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports),S("label",ge(5,21,"RELATION_LAYOUTS")),m(2),S("textContent",ge(7,23,"RELATION_LAYOUTS_MESSAGE")),m(4),Nt("request",o.reportForPrinting),S("layouts",o.printLayouts)("label","PRINTER_LAYOUT")("useDefault",o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports),m(),Nt("request",o.reportForEmailing),S("layouts",o.emailLayouts)("label","EMAIL_LAYOUT")("useDefault",o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificReports),m(),ee(o.showLocalPrint?12:-1),m(),ee(o.localPrint?-1:13),m(),ee(o.showAdditionalChecks?14:-1),m(2),S("textContent",ge(17,25,"SHIPPING_METHOD_SETTINGS")),m(3),Nt("model",o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificSendMethods),S("label",ge(20,27,"SHIPPING_METHOD_STANDARD_SETTINGS")),m(2),ee(o.sendMethodService.reportingDocumentCombinedBaseRequest.useRelationSpecificSendMethods?-1:21))},dependencies:[oS,HY,gl,ns,kt],encapsulation:2});let i=e;return i})();function PPt(i,e){if(i&1){let t=de();O(0,"div",5)(1,"co-button",6),W("click",function(){F(t);let r=R();return U(r.closePDFDialog.emit())}),I(),O(2,"co-button",7),W("click",function(){F(t);let r=R();return U(r.closePDFDialog.emit())}),I()()}if(i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.CheckDuotone)),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CrossSkinny))}}var Lje=(()=>{let e=class e{showClass(){return!0}set pdfDoc(n){this._pdfDoc=n,this._generatePdf()}get pdfDoc(){return this._pdfDoc}constructor(n,r){this.iconCacheService=n,this.sanitizer=r,this.closePDFDialog=new re,this.icons=ot,this._pdfDoc=""}ngOnInit(){this._generatePdf()}_generatePdf(){if(this.pdfDoc){let n=atob(this.pdfDoc),r=new Uint8Array(n.length);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s);let o=new Blob([r],{type:"application/pdf"});this.pdfUrl=URL.createObjectURL(o)}}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(JE))},e.\u0275cmp=Fe({type:e,selectors:[["co-preview-pdf-dialog"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-preview-pdf-dialog",o.showClass)},inputs:{pdfDoc:"pdfDoc"},outputs:{closePDFDialog:"closePDFDialog"},standalone:!1,decls:6,vars:2,consts:[["pdfBody",""],["footerTemplate",""],["id","preview-pdf-dialog",3,"closeClick","footerTemplate"],["id","pdfBody"],["width","100%","height","700px",3,"src"],[1,"co-dialog-footer-button-wrapper"],[1,"save-button",3,"click","iconData"],[1,"close-button",3,"click","iconData"]],template:function(r,o){if(r&1){let s=de();O(0,"co-dialog",2),W("closeClick",function(){return F(s),U(o.closePDFDialog.emit())}),O(1,"div",3,0),j(3,"iframe",4),I(),Yt(4,PPt,3,2,"ng-template",null,1,zi),I()}if(r&2){let s=ln(5);S("footerTemplate",s),m(3),S("src",o.sanitizer.bypassSecurityTrustResourceUrl(o.pdfUrl),kJ)}},dependencies:[qo,Ki],encapsulation:2});let i=e;return i})();var kPt=["navigationItems"],xPt=["faxItems"],FPt=["printItems"],UPt=["emailItems"],BPt=["ediItems"],VPt=["emailTemplateItems"],GPt=["smsItems"],HPt=["webServiceItems"],WPt=["pdfItems"],jPt=["combinePrintAndEmail"],zPt=["printerComponent"],YPt=["emailComponent"],KPt=[[["","extra-content",""]]],qPt=["[extra-content]"];function XPt(i,e){if(i&1){let t=de();O(0,"div",25),W("click",function(){let r=F(t).$implicit,o=R(3);return U(o.handleSendMethodClick(r))}),j(1,"div",26),I()}if(i&2){let t=e.$implicit,n=e.$index,r=R(3);we("selected",r.activeSendMethod?t.code===r.activeSendMethod.code:n===0),m(),S("textContent",t.description)}}function ZPt(i,e){if(i&1&&(O(0,"div",23),Pt(1,XPt,2,3,"div",24,zt),I()),i&2){let t=R(2);m(),Mt(t.sendMethods)}}function QPt(i,e){if(i&1&&(O(0,"div",20),j(1,"co-icon",21)(2,"div",22),I(),$(3,ZPt,3,0,"div",23)),i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.ShareSolid)),m(),S("textContent",t.headerTitle),m(),ee(t.sendMethods.length>1?3:-1)}}function JPt(i,e){if(i&1){let t=de();O(0,"div",18,4)(2,"co-send-method-printer",27,5),W("additionalFileChangeEvent",function(r){F(t);let o=R();return U(o.handleAdditionalFileSaved(r))})("useLocalPrint",function(r){F(t);let o=R();return U(o.handleUseLocalPrint(r))})("copiesAmountChange",function(r){F(t);let o=R();return U(o.handleCopiesAmountChange(r))}),I()()}if(i&2){let t=R();m(2),S("isPrinterLayoutsEnabled",t.isPrinterLayoutsEnabled)("printerList",t.printerList)("layouts",t.printLayouts)("isAdditionalDocEnabled",t.isAdditionalDocEnabled)("additionalFileContents",t.additionalFileContents)("additionalFileName",t.additionalFileName)("layoutCode",t.layoutCode)("hideSignatureBtn",t.hideSignatureBtn)}}function $Pt(i,e){if(i&1){let t=de();O(0,"div",18,6)(2,"co-send-method-email",28,7),W("loadDefaultPrinterName",function(r){F(t);let o=R();return U(o.loadDefaultPrinterName.emit(r))})("additionalFileChangeEvent",function(r){F(t);let o=R();return U(o.handleAdditionalFileSaved(r))}),I()()}if(i&2){let t=R();m(2),S("emailAddresses",t.emailAddresses)("layouts",t.emailLayouts)("emailUnsignedPossible",t.emailUnsignedPossible)("isAdditionalDocEnabled",t.isAdditionalDocEnabled)("additionalFileContents",t.additionalFileContents)("additionalFileName",t.additionalFileName)}}function eMt(i,e){i&1&&j(0,"div",18,8)}function tMt(i,e){i&1&&j(0,"div",18,9)}function iMt(i,e){i&1&&j(0,"div",18,10)}function nMt(i,e){i&1&&j(0,"div",18,11)}function rMt(i,e){if(i&1&&(O(0,"div",18,12),j(2,"co-send-method-pdf",29),I()),i&2){let t=R();m(2),S("layouts",t.printLayouts)}}function oMt(i,e){if(i&1){let t=de();O(0,"div",18,13)(2,"co-send-method-combine-print-email",30),W("useLocalPrint",function(r){F(t);let o=R();return U(o.handleUseLocalPrint(r))}),O(3,"div",31),Jl(4),I()()()}if(i&2){let t=R();m(2),S("emailLayouts",t.emailLayouts)("printLayouts",t.printLayouts)("printerList",t.printerList)("showAdditionalChecks",t.showAdditionalChecks)("showLocalPrint",t.showLocalPrint)}}function sMt(i,e){if(i&1){let t=de();O(0,"co-preview-pdf-dialog",34),W("closePDFDialog",function(){F(t);let r=R(2);return U(r.closePdfPreview())}),I()}if(i&2){let t=R(2);S("pdfDoc",t.pdfDoc)}}function aMt(i,e){if(i&1){let t=de();O(0,"div",19)(1,"div",32),W("click",function(){F(t);let r=R();return U(r.createPdfPreview())}),j(2,"co-icon",21),I(),$(3,sMt,1,1,"co-preview-pdf-dialog",33),I()}if(i&2){let t=R();m(),we("disabled",t.disablePdfPreview),m(),S("iconData",t.iconCacheService.getIcon(t.icons.FileMagnifyingGlass)),m(),ee(t.pdfDoc?3:-1)}}function lMt(i,e){if(i&1){let t=de();O(0,"div",35)(1,"co-button",36),W("click",function(){F(t);let r=R();return U(r.handleOkClick())}),I(),O(2,"co-button",37),W("click",function(){F(t);let r=R();return U(r.handleCancelClick())}),I()()}if(i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.CheckDuotone))("disabled",t.disableOkButton),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CrossSkinny))}}var cMt=[new g_(Lr.SendMethodType.Fax,"Fax",ot.PrintRegular),new g_(Lr.SendMethodType.Print,"Print",ot.PrintSolid),new g_(Lr.SendMethodType.Email,"Email",ot.AtSolid),new g_(Lr.SendMethodType.Edi,"Edi",ot.FileExportSolid),new g_(Lr.SendMethodType.EmailTemplate,"Email template",ot.EnvelopeRegular),new g_(Lr.SendMethodType.Sms,"Sms",ot.MessageSmsSolid),new g_(Lr.SendMethodType.WebService,"Webservice",ot.PrintRegular),new g_(Lr.SendMethodType.Pdf,"Pdf",ot.Pdf),new g_(Lr.SendMethodType.CombinePrintAndEmail,"Combine",ot.Account)],nE=(()=>{let e=class e{showClass(){return!0}constructor(n,r){this.iconCacheService=n,this._sendMethodService=r,this.icons=ot,this.printerList=[],this.emailLayouts=[],this.printLayouts=[],this.emailAddresses=[],this.visibleMethods=[],this.isDocSignEnabled=!1,this.docSign=!1,this.hideSignatureBtn=!1,this.isPrinterLayoutsEnabled=!0,this.isAdditionalDocEnabled=!1,this.additionalFileName="",this.additionalFileContents="",this.pdfDoc="",this.disablePdfPreview=!1,this.emailUnsignedPossible=!1,this.showPDFPreview=!1,this.showAdditionalChecks=!0,this.showLocalPrint=!0,this.layoutCode=wje.LayoutCode.OrderConfirmation,this.reportingDocumentPrintRequestChange=new re,this.reportingDocumentEmailRequestChange=new re,this.reportingDocumentPdfRequestChange=new re,this.reportingDocumentCombinedRequestChange=new re,this.startSignatureClicked=new re,this.closeClick=new re,this.okClick=new re,this.additionalFileChangeEvent=new re,this.showFilePreview=new re,this.loadDefaultPrinterName=new re,this.sendMethods=cMt,this.startUp=!0,this.showFax=!0,this.showPrint=!0,this.showEmail=!0,this.showEdi=!0,this.showSms=!0,this.showEmailTemplate=!0,this.showWebservice=!0,this.showPdf=!0,this.showCombinePrintAndEmail=!0,this.additionalFileHasBeenSaved=!1,this.disableOkButton=!1,this._subscriptions=[],this._localPrint=!1,this._subscriptions.push(this._sendMethodService.reportingDocumentPrintSignDocBaseRequestChanged.subscribe(o=>this.reportingDocumentPrintRequestChange.emit(o)),this._sendMethodService.reportingDocumentEmailSignDocBaseRequestChanged.subscribe(o=>this.reportingDocumentEmailRequestChange.emit(o)),this._sendMethodService.reportingDocumentPdfBaseRequestChanged.subscribe(o=>this.reportingDocumentPdfRequestChange.emit(o)),this._sendMethodService.reportingDocumentCombinedBaseRequestChanged.subscribe(o=>this.reportingDocumentCombinedRequestChange.emit(o)),this._sendMethodService.printerNotSet.subscribe(o=>this.disableOkButton=o))}ngOnInit(){this.reportingDocumentEmailRequest&&(this._sendMethodService.reportingDocumentEmailSignDocBaseRequest=this.reportingDocumentEmailRequest),this.reportingDocumentPrintRequest&&(this._sendMethodService.reportingDocumentPrintSignDocBaseRequest=this.reportingDocumentPrintRequest),this.reportingDocumentPdfRequest&&(this._sendMethodService.reportingDocumentPdfBaseRequest=this.reportingDocumentPdfRequest),this.reportingDocumentCombinedRequest&&(this._sendMethodService.reportingDocumentCombinedBaseRequest=this.reportingDocumentCombinedRequest),this._initDefaultSendMethod(),this._prepareVisibleMethods()}ngOnDestroy(){this._subscriptions.forEach(n=>n.unsubscribe())}handleSignatureStart(){this.docSign=!this.docSign,this.startSignatureClicked.emit()}handleAdditionalFileSaved(n){this.additionalFileHasBeenSaved=!0,this.additionalFileChangeEvent.emit(n),this._continueHandleOkClick()}handleUseLocalPrint(n){this._localPrint=n,n&&(this.disableOkButton=!1)}handleOkClick(){if(this.isAdditionalDocEnabled&&!this.additionalFileHasBeenSaved){if(this.activeSendMethod?.code===Lr.SendMethodType.Print&&this.printerComponentRef?.isAdditionalFileActive()){this.printerComponentRef.openAdditionalFileDialog();return}if(this.activeSendMethod?.code===Lr.SendMethodType.Email&&this.emailComponentRef?.isAdditionalFileActive()){this.emailComponentRef.openAdditionalFileDialog();return}}this._continueHandleOkClick()}handleCancelClick(){this.reportingDocumentEmailRequest&&(this.reportingDocumentEmailRequest.toAddresses=null),this.closeClick.emit()}_continueHandleOkClick(){if(this.activeSendMethod.code===Lr.SendMethodType.Print||this.activeSendMethod.code===Lr.SendMethodType.CombinePrintAndEmail){let r={sendMethode:this.activeSendMethod?this.activeSendMethod.code:Lr.SendMethodType.Fax,localPrint:this._localPrint};this.okClick.emit(r)}else this.okClick.emit(this.activeSendMethod?this.activeSendMethod.code:"0")}handleSendMethodClick(n){this.activeSendMethod=n,n.code===Lr.SendMethodType.Fax&&this.showFax?this.navigationItems.nativeElement.scrollLeft=this.faxItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.Print&&this.showPrint?this.navigationItems.nativeElement.scrollLeft=this.printItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.Email&&this.showEmail?this.navigationItems.nativeElement.scrollLeft=this.emailItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.Edi&&this.showEdi?this.navigationItems.nativeElement.scrollLeft=this.ediItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.EmailTemplate&&this.showEmailTemplate?this.navigationItems.nativeElement.scrollLeft=this.emailTemplateItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.Sms&&this.showSms?this.navigationItems.nativeElement.scrollLeft=this.smsItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.WebService&&this.showWebservice?this.navigationItems.nativeElement.scrollLeft=this.webServiceItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.Pdf&&this.showPdf?this.navigationItems.nativeElement.scrollLeft=this.pdfItems.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft:n.code===Lr.SendMethodType.CombinePrintAndEmail&&this.showCombinePrintAndEmail&&(this.navigationItems.nativeElement.scrollLeft=this.combinePrintAndEmail.nativeElement.offsetLeft-this.navigationItems.nativeElement.offsetLeft)}createPdfPreview(){this.activeSendMethod.code===Lr.SendMethodType.Print||this.activeSendMethod.code===Lr.SendMethodType.Pdf?this.showFilePreview.emit(this._sendMethodService.reportingDocumentPrintSignDocBaseRequest.reportId):this.activeSendMethod.code===Lr.SendMethodType.Email||this.activeSendMethod.code===Lr.SendMethodType.EmailTemplate?this.showFilePreview.emit(this._sendMethodService.reportingDocumentEmailSignDocBaseRequest.reportId):this.activeSendMethod.code===Lr.SendMethodType.CombinePrintAndEmail&&this.showFilePreview.emit(this._sendMethodService.reportingDocumentCombinedBaseRequest.reportId)}closePdfPreview(){this.pdfDoc=""}handleCopiesAmountChange(n){this.reportingDocumentPrintRequest.copies=n,this.reportingDocumentPrintRequestChange.emit(this.reportingDocumentPrintRequest)}_initDefaultSendMethod(){this.defaultSendMethod?this._selectDefaultSendMethod():this.visibleMethods&&this.visibleMethods.length>=1&&(this.defaultSendMethod=this.visibleMethods[0],this._selectDefaultSendMethod()),this.startUp=!1}_selectDefaultSendMethod(){let n=this.sendMethods.find(r=>r.code===this.defaultSendMethod);n&&setTimeout(()=>{this.handleSendMethodClick(n),this.startUp=!1})}_prepareVisibleMethods(){this.visibleMethods&&this.visibleMethods.length>0&&(this.sendMethods=this.sendMethods.filter(n=>this.visibleMethods.find(r=>r===n.code))),this.showFax=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Fax)!==void 0,this.showPrint=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Print)!==void 0,this.showEmail=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Email)!==void 0,this.showEdi=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Edi)!==void 0,this.showEmailTemplate=this.sendMethods.find(n=>n.code===Lr.SendMethodType.EmailTemplate)!==void 0,this.showSms=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Sms)!==void 0,this.showWebservice=this.sendMethods.find(n=>n.code===Lr.SendMethodType.WebService)!==void 0,this.showPdf=this.sendMethods.find(n=>n.code===Lr.SendMethodType.Pdf)!==void 0,this.showCombinePrintAndEmail=this.sendMethods.find(n=>n.code===Lr.SendMethodType.CombinePrintAndEmail)!==void 0}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(uh))},e.\u0275cmp=Fe({type:e,selectors:[["co-send-method-dialog"]],viewQuery:function(r,o){if(r&1&&(qt(kPt,5,ti),qt(xPt,5,ti),qt(FPt,5,ti),qt(UPt,5,ti),qt(BPt,5,ti),qt(VPt,5,ti),qt(GPt,5,ti),qt(HPt,5,ti),qt(WPt,5,ti),qt(jPt,5,ti),qt(zPt,5),qt(YPt,5)),r&2){let s;xt(s=Ft())&&(o.navigationItems=s.first),xt(s=Ft())&&(o.faxItems=s.first),xt(s=Ft())&&(o.printItems=s.first),xt(s=Ft())&&(o.emailItems=s.first),xt(s=Ft())&&(o.ediItems=s.first),xt(s=Ft())&&(o.emailTemplateItems=s.first),xt(s=Ft())&&(o.smsItems=s.first),xt(s=Ft())&&(o.webServiceItems=s.first),xt(s=Ft())&&(o.pdfItems=s.first),xt(s=Ft())&&(o.combinePrintAndEmail=s.first),xt(s=Ft())&&(o.printerComponentRef=s.first),xt(s=Ft())&&(o.emailComponentRef=s.first)}},hostVars:2,hostBindings:function(r,o){r&2&&we("co-send-method-dialog",o.showClass)},inputs:{printerList:"printerList",reportingDocumentPrintRequest:"reportingDocumentPrintRequest",reportingDocumentEmailRequest:"reportingDocumentEmailRequest",reportingDocumentPdfRequest:"reportingDocumentPdfRequest",reportingDocumentCombinedRequest:"reportingDocumentCombinedRequest",emailLayouts:"emailLayouts",printLayouts:"printLayouts",headerTitle:"headerTitle",emailAddresses:"emailAddresses",defaultSendMethod:"defaultSendMethod",visibleMethods:"visibleMethods",isDocSignEnabled:"isDocSignEnabled",docSign:"docSign",hideSignatureBtn:"hideSignatureBtn",isPrinterLayoutsEnabled:"isPrinterLayoutsEnabled",isAdditionalDocEnabled:"isAdditionalDocEnabled",additionalFileName:"additionalFileName",additionalFileContents:"additionalFileContents",pdfDoc:"pdfDoc",disablePdfPreview:"disablePdfPreview",emailUnsignedPossible:"emailUnsignedPossible",showPDFPreview:"showPDFPreview",showAdditionalChecks:"showAdditionalChecks",showLocalPrint:"showLocalPrint",layoutCode:"layoutCode"},outputs:{reportingDocumentPrintRequestChange:"reportingDocumentPrintRequestChange",reportingDocumentEmailRequestChange:"reportingDocumentEmailRequestChange",reportingDocumentPdfRequestChange:"reportingDocumentPdfRequestChange",reportingDocumentCombinedRequestChange:"reportingDocumentCombinedRequestChange",startSignatureClicked:"startSignatureClicked",closeClick:"closeClick",okClick:"okClick",additionalFileChangeEvent:"additionalFileChangeEvent",showFilePreview:"showFilePreview",loadDefaultPrinterName:"loadDefaultPrinterName"},standalone:!1,features:[Oi([uh])],ngContentSelectors:qPt,decls:20,vars:13,consts:[["headerTemplate",""],["navigationItems",""],["faxItems",""],["footerTemplate",""],["printItems",""],["printerComponent",""],["emailItems",""],["emailComponent",""],["ediItems",""],["emailTemplateItems",""],["smsItems",""],["webServiceItems",""],["pdfItems",""],["combinePrintAndEmail",""],["id","sendOptionsDialog",3,"closeClick","headerTemplate","footerTemplate"],[1,"dialog-content-wrapper"],[1,"send-methods-wrapper"],[1,"send-method-navigation-wrapper"],[1,"send-method-navigation-content","co-small-scrollbar"],[1,"pdf-preview-wrapper"],[1,"co-dialog-header-title-wrapper"],[3,"iconData"],[1,"co-dialog-header-title",3,"textContent"],[1,"dialog-navigation-wrapper"],[1,"send-button-wrapper",3,"selected"],[1,"send-button-wrapper",3,"click"],[1,"custom-button-title",3,"textContent"],[3,"additionalFileChangeEvent","useLocalPrint","copiesAmountChange","isPrinterLayoutsEnabled","printerList","layouts","isAdditionalDocEnabled","additionalFileContents","additionalFileName","layoutCode","hideSignatureBtn"],[3,"loadDefaultPrinterName","additionalFileChangeEvent","emailAddresses","layouts","emailUnsignedPossible","isAdditionalDocEnabled","additionalFileContents","additionalFileName"],[3,"layouts"],[3,"useLocalPrint","emailLayouts","printLayouts","printerList","showAdditionalChecks","showLocalPrint"],["extra-content-pass",""],[1,"pdf-preview-button",3,"click"],[3,"pdfDoc"],[3,"closePDFDialog","pdfDoc"],[1,"co-dialog-footer-button-wrapper"],[1,"save-button",3,"click","iconData","disabled"],[1,"close-button",3,"click","iconData"]],template:function(r,o){if(r&1){let s=de();Mc(KPt),O(0,"co-dialog",14),W("closeClick",function(){return F(s),U(o.handleCancelClick())}),Yt(1,QPt,4,3,"ng-template",null,0,zi),O(3,"div",15),j(4,"div",16),O(5,"div",17,1),j(7,"div",18,2),$(9,JPt,4,8,"div",18),$(10,$Pt,4,6,"div",18),$(11,eMt,2,0,"div",18),$(12,tMt,2,0,"div",18),$(13,iMt,2,0,"div",18),$(14,nMt,2,0,"div",18),$(15,rMt,3,1,"div",18),$(16,oMt,5,5,"div",18),I(),$(17,aMt,4,4,"div",19),I(),Yt(18,lMt,3,3,"ng-template",null,3,zi),I()}if(r&2){let s=ln(2),a=ln(19);S("headerTemplate",s)("footerTemplate",a),m(5),we("smooth-scrolling",!o.startUp),m(4),ee(o.showPrint?9:-1),m(),ee(o.showEmail?10:-1),m(),ee(o.showEdi?11:-1),m(),ee(o.showEmailTemplate?12:-1),m(),ee(o.showSms?13:-1),m(),ee(o.showWebservice?14:-1),m(),ee(o.showPdf?15:-1),m(),ee(o.showCombinePrintAndEmail?16:-1),m(),ee(o.showPDFPreview?17:-1)}},dependencies:[qo,ri,d4e,Dje,Ki,yje,bje,Lje],encapsulation:2,data:{animation:[ao("slideInOut",[xn("*",on({transform:"translateX(0%)",width:"100%",opacity:"1"})),xn("void",on({transform:"translateX(150%)",opacity:"0"})),qr("void => *",Gr(250))])]}});let i=e;return i})();var wr=(()=>{let e=class e{constructor(n){this._sharedService=n,this.refreshStockInformation=new re}getStockHistory(n){return B(this,null,function*(){return yield this._sharedService.getStockHistory(n)})}getStockInformation(n){return B(this,null,function*(){return yield this._sharedService.getStockInformation(n)})}getArticleDetails(n){return B(this,null,function*(){return yield this._sharedService.getArticleDetails(n)})}updateArticleDetails(n){return B(this,null,function*(){return yield this._sharedService.updateArticleDetails(n)})}getStockState(){return B(this,null,function*(){return yield this._sharedService.getStockStatus()})}getArtStockStatus(n,r,o,s){return B(this,null,function*(){return yield this._sharedService.getArtStockStatus(n,r,o,s)})}getStockManagementWarehouses(){return B(this,null,function*(){return yield this._sharedService.getStockManagementWarehouses()})}getStockManagementLocations(n){return B(this,null,function*(){return yield this._sharedService.getStockManagementLocations(n)})}getArticleTransaction(n){return B(this,null,function*(){return yield this._sharedService.getArticleTransaction(n)})}stockPrognose(n,r){return B(this,null,function*(){return yield this._sharedService.getStockPrognose(n,r)})}lockArticleDetails(n){return B(this,null,function*(){return yield this._sharedService.lockArticleDetails(n)})}getArticleFlat(n){return B(this,null,function*(){return yield this._sharedService.getArticleFlat(n)})}searchArticles(n){return B(this,null,function*(){return yield this._sharedService.searchArticles(n)})}};e.\u0275fac=function(r){return new(r||e)(Ut(mc))},e.\u0275prov=pt({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var ui=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({});let i=e;return i})();var lC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,ii,co,ui]});let i=e;return i})();var yb=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,ii,Qa]});let i=e;return i})();var WY=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ii,Fo,ut,Qi,ui,J3e]});let i=e;return i})();var jY=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,ii,WY]});let i=e;return i})();var Pje=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,Qa,lC,ii,yb,ui,jY]});let i=e;return i})();var zY=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,ii,co,ui]});let i=e;return i})();var Mje=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,ii,lC,zY,Qa,yb,WY,jY,co,ui,KH]});let i=e;return i})();var kje=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,lC,yb,ui]});let i=e;return i})();var xje=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ii,Fo,ut,Qi,ui]});let i=e;return i})();var Fje=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,lC,zY,ui,Qa,co]});let i=e;return i})();var cC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({providers:[wr],imports:[ut,Fo,ii,Pje,Mje,Qi,kje,Fje,ui,xje]});let i=e;return i})();function tF(i){return i+.5|0}var dC=(i,e,t)=>Math.max(Math.min(i,t),e);function $x(i){return dC(tF(i*2.55),0,255)}function uC(i){return dC(tF(i*255),0,255)}function hA(i){return dC(tF(i/2.55)/100,0,1)}function Uje(i){return dC(tF(i*100),0,100)}var Y_={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},cEe=[..."0123456789ABCDEF"],dMt=i=>cEe[i&15],uMt=i=>cEe[(i&240)>>4]+cEe[i&15],YY=i=>(i&240)>>4===(i&15),hMt=i=>YY(i.r)&&YY(i.g)&&YY(i.b)&&YY(i.a);function fMt(i){var e=i.length,t;return i[0]==="#"&&(e===4||e===5?t={r:255&Y_[i[1]]*17,g:255&Y_[i[2]]*17,b:255&Y_[i[3]]*17,a:e===5?Y_[i[4]]*17:255}:(e===7||e===9)&&(t={r:Y_[i[1]]<<4|Y_[i[2]],g:Y_[i[3]]<<4|Y_[i[4]],b:Y_[i[5]]<<4|Y_[i[6]],a:e===9?Y_[i[7]]<<4|Y_[i[8]]:255})),t}var _Mt=(i,e)=>i<255?e(i):"";function pMt(i){var e=hMt(i)?dMt:uMt;return i?"#"+e(i.r)+e(i.g)+e(i.b)+_Mt(i.a,e):void 0}var EMt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Hje(i,e,t){let n=e*Math.min(t,1-t),r=(o,s=(o+i/30)%12)=>t-n*Math.max(Math.min(s-3,9-s,1),-1);return[r(0),r(8),r(4)]}function mMt(i,e,t){let n=(r,o=(r+i/60)%6)=>t-t*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function gMt(i,e,t){let n=Hje(i,1,.5),r;for(e+t>1&&(r=1/(e+t),e*=r,t*=r),r=0;r<3;r++)n[r]*=1-e-t,n[r]+=e;return n}function AMt(i,e,t,n,r){return i===r?(e-t)/n+(e<t?6:0):e===r?(t-i)/n+2:(i-e)/n+4}function dEe(i){let t=i.r/255,n=i.g/255,r=i.b/255,o=Math.max(t,n,r),s=Math.min(t,n,r),a=(o+s)/2,l,c,d;return o!==s&&(d=o-s,c=a>.5?d/(2-o-s):d/(o+s),l=AMt(t,n,r,d,o),l=l*60+.5),[l|0,c||0,a]}function uEe(i,e,t,n){return(Array.isArray(e)?i(e[0],e[1],e[2]):i(e,t,n)).map(uC)}function hEe(i,e,t){return uEe(Hje,i,e,t)}function TMt(i,e,t){return uEe(gMt,i,e,t)}function SMt(i,e,t){return uEe(mMt,i,e,t)}function Wje(i){return(i%360+360)%360}function CMt(i){let e=EMt.exec(i),t=255,n;if(!e)return;e[5]!==n&&(t=e[6]?$x(+e[5]):uC(+e[5]));let r=Wje(+e[2]),o=+e[3]/100,s=+e[4]/100;return e[1]==="hwb"?n=TMt(r,o,s):e[1]==="hsv"?n=SMt(r,o,s):n=hEe(r,o,s),{r:n[0],g:n[1],b:n[2],a:t}}function RMt(i,e){var t=dEe(i);t[0]=Wje(t[0]+e),t=hEe(t),i.r=t[0],i.g=t[1],i.b=t[2]}function OMt(i){if(!i)return;let e=dEe(i),t=e[0],n=Uje(e[1]),r=Uje(e[2]);return i.a<255?`hsla(${t}, ${n}%, ${r}%, ${hA(i.a)})`:`hsl(${t}, ${n}%, ${r}%)`}var Bje={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Vje={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function IMt(){let i={},e=Object.keys(Vje),t=Object.keys(Bje),n,r,o,s,a;for(n=0;n<e.length;n++){for(s=a=e[n],r=0;r<t.length;r++)o=t[r],a=a.replace(o,Bje[o]);o=parseInt(Vje[s],16),i[a]=[o>>16&255,o>>8&255,o&255]}return i}var KY;function NMt(i){KY||(KY=IMt(),KY.transparent=[0,0,0,0]);let e=KY[i.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}var vMt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function DMt(i){let e=vMt.exec(i),t=255,n,r,o;if(e){if(e[7]!==n){let s=+e[7];t=e[8]?$x(s):dC(s*255,0,255)}return n=+e[1],r=+e[3],o=+e[5],n=255&(e[2]?$x(n):dC(n,0,255)),r=255&(e[4]?$x(r):dC(r,0,255)),o=255&(e[6]?$x(o):dC(o,0,255)),{r:n,g:r,b:o,a:t}}}function yMt(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${hA(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var lEe=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,bb=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function bMt(i,e,t){let n=bb(hA(i.r)),r=bb(hA(i.g)),o=bb(hA(i.b));return{r:uC(lEe(n+t*(bb(hA(e.r))-n))),g:uC(lEe(r+t*(bb(hA(e.g))-r))),b:uC(lEe(o+t*(bb(hA(e.b))-o))),a:i.a+t*(e.a-i.a)}}function qY(i,e,t){if(i){let n=dEe(i);n[e]=Math.max(0,Math.min(n[e]+n[e]*t,e===0?360:1)),n=hEe(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function jje(i,e){return i&&Object.assign(e||{},i)}function Gje(i){var e={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(e={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(e.a=uC(i[3]))):(e=jje(i,{r:0,g:0,b:0,a:1}),e.a=uC(e.a)),e}function LMt(i){return i.charAt(0)==="r"?DMt(i):CMt(i)}var eF=class i{constructor(e){if(e instanceof i)return e;let t=typeof e,n;t==="object"?n=Gje(e):t==="string"&&(n=fMt(e)||NMt(e)||LMt(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=jje(this._rgb);return e&&(e.a=hA(e.a)),e}set rgb(e){this._rgb=Gje(e)}rgbString(){return this._valid?yMt(this._rgb):void 0}hexString(){return this._valid?pMt(this._rgb):void 0}hslString(){return this._valid?OMt(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,r=e.rgb,o,s=t===o?.5:t,a=2*s-1,l=n.a-r.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=bMt(this._rgb,e._rgb,t)),this}clone(){return new i(this.rgb)}alpha(e){return this._rgb.a=uC(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb,t=tF(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return qY(this._rgb,2,e),this}darken(e){return qY(this._rgb,2,-e),this}saturate(e){return qY(this._rgb,1,e),this}desaturate(e){return qY(this._rgb,1,-e),this}rotate(e){return RMt(this._rgb,e),this}};var Qje=(()=>{let i=0;return()=>i++})();function pa(i){return i===null||typeof i>"u"}function ya(i){if(Array.isArray&&Array.isArray(i))return!0;let e=Object.prototype.toString.call(i);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Io(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function jl(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function Ah(i,e){return jl(i)?i:e}function Js(i,e){return typeof i>"u"?e:i}var Jje=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/e,EEe=(i,e)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*e:+i;function Ea(i,e,t){if(i&&typeof i.call=="function")return i.apply(t,e)}function Qc(i,e,t,n){let r,o,s;if(ya(i))if(o=i.length,n)for(r=o-1;r>=0;r--)e.call(t,i[r],r);else for(r=0;r<o;r++)e.call(t,i[r],r);else if(Io(i))for(s=Object.keys(i),o=s.length,r=0;r<o;r++)e.call(t,i[s[r]],s[r])}function mEe(i,e){let t,n,r,o;if(!i||!e||i.length!==e.length)return!1;for(t=0,n=i.length;t<n;++t)if(r=i[t],o=e[t],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function QY(i){if(ya(i))return i.map(QY);if(Io(i)){let e=Object.create(null),t=Object.keys(i),n=t.length,r=0;for(;r<n;++r)e[t[r]]=QY(i[t[r]]);return e}return i}function $je(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function wMt(i,e,t,n){if(!$je(i))return;let r=e[i],o=t[i];Io(r)&&Io(o)?wb(r,o,n):e[i]=QY(o)}function wb(i,e,t){let n=ya(e)?e:[e],r=n.length;if(!Io(i))return i;t=t||{};let o=t.merger||wMt,s;for(let a=0;a<r;++a){if(s=n[a],!Io(s))continue;let l=Object.keys(s);for(let c=0,d=l.length;c<d;++c)o(l[c],i,s,t)}return i}function Pb(i,e){return wb(i,e,{merger:PMt})}function PMt(i,e,t){if(!$je(i))return;let n=e[i],r=t[i];Io(n)&&Io(r)?Pb(n,r):Object.prototype.hasOwnProperty.call(e,i)||(e[i]=QY(r))}var zje={"":i=>i,x:i=>i.x,y:i=>i.y};function MMt(i){let e=i.split("."),t=[],n="";for(let r of e)n+=r,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}function kMt(i){let e=MMt(i);return t=>{for(let n of e){if(n==="")break;t=t&&t[n]}return t}}function Mb(i,e){return(zje[e]||(zje[e]=kMt(e)))(i)}function eK(i){return i.charAt(0).toUpperCase()+i.slice(1)}var rF=i=>typeof i<"u",fA=i=>typeof i=="function",gEe=(i,e)=>{if(i.size!==e.size)return!1;for(let t of i)if(!e.has(t))return!1;return!0};function eze(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var Wl=Math.PI,ba=2*Wl,Gen=ba+Wl,JY=Number.POSITIVE_INFINITY,Hen=Wl/180,Hl=Wl/2,Wen=Wl/4,jen=Wl*2/3,_A=Math.log10,oF=Math.sign;function sF(i,e,t){return Math.abs(i-e)<t}function AEe(i){let e=Math.round(i);i=sF(i,e,i/1e3)?e:i;let t=Math.pow(10,Math.floor(_A(i))),n=i/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t}function tze(i){let e=[],t=Math.sqrt(i),n;for(n=1;n<t;n++)i%n===0&&(e.push(n),e.push(i/n));return t===(t|0)&&e.push(t),e.sort((r,o)=>r-o).pop(),e}function aF(i){return!isNaN(parseFloat(i))&&isFinite(i)}function ize(i,e){let t=Math.round(i);return t-e<=i&&t+e>=i}function TEe(i,e,t){let n,r,o;for(n=0,r=i.length;n<r;n++)o=i[n][t],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function oE(i){return i*(Wl/180)}function tK(i){return i*(180/Wl)}function SEe(i){if(!jl(i))return;let e=1,t=0;for(;Math.round(i*e)/e!==i;)e*=10,t++;return t}function CEe(i,e){let t=e.x-i.x,n=e.y-i.y,r=Math.sqrt(t*t+n*n),o=Math.atan2(n,t);return o<-.5*Wl&&(o+=ba),{angle:o,distance:r}}function rE(i){return(i%ba+ba)%ba}function lF(i,e,t,n){let r=rE(i),o=rE(e),s=rE(t),a=rE(o-r),l=rE(s-r),c=rE(r-o),d=rE(r-s);return r===o||r===s||n&&o===s||a>l&&c<d}function sE(i,e,t){return Math.max(e,Math.min(t,i))}function nze(i){return sE(i,-32768,32767)}function rze(i,e,t,n=1e-6){return i>=Math.min(e,t)-n&&i<=Math.max(e,t)+n}function iK(i,e,t){t=t||(s=>i[s]<e);let n=i.length-1,r=0,o;for(;n-r>1;)o=r+n>>1,t(o)?r=o:n=o;return{lo:r,hi:n}}var nK=(i,e,t,n)=>iK(i,t,n?r=>{let o=i[r][e];return o<t||o===t&&i[r+1][e]===t}:r=>i[r][e]<t),oze=(i,e,t)=>iK(i,t,n=>i[n][e]>=t);function sze(i,e,t){let n=0,r=i.length;for(;n<r&&i[n]<e;)n++;for(;r>n&&i[r-1]>t;)r--;return n>0||r<i.length?i.slice(n,r):i}var aze=["push","pop","shift","splice","unshift"];function lze(i,e){if(i._chartjs){i._chartjs.listeners.push(e);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),aze.forEach(t=>{let n="_onData"+eK(t),r=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...o){let s=r.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...o)}),s}})})}function REe(i,e){let t=i._chartjs;if(!t)return;let n=t.listeners,r=n.indexOf(e);r!==-1&&n.splice(r,1),!(n.length>0)&&(aze.forEach(o=>{delete i[o]}),delete i._chartjs)}function cze(i){let e=new Set(i);return e.size===i.length?i:Array.from(e)}var OEe=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function IEe(i,e){let t=[],n=!1;return function(...r){t=r,n||(n=!0,OEe.call(window,()=>{n=!1,i.apply(e,t)}))}}function dze(i,e){let t;return function(...n){return e?(clearTimeout(t),t=setTimeout(i,e,n)):i.apply(this,n),e}}var uze=i=>i==="start"?"left":i==="end"?"right":"center",NEe=(i,e,t)=>i==="start"?e:i==="end"?t:(e+t)/2;var XY=i=>i===0||i===1,Yje=(i,e,t)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-e)*ba/t)),Kje=(i,e,t)=>Math.pow(2,-10*i)*Math.sin((i-e)*ba/t)+1,Lb={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*Hl)+1,easeOutSine:i=>Math.sin(i*Hl),easeInOutSine:i=>-.5*(Math.cos(Wl*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>XY(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>XY(i)?i:Yje(i,.075,.3),easeOutElastic:i=>XY(i)?i:Kje(i,.075,.3),easeInOutElastic(i){return XY(i)?i:i<.5?.5*Yje(i*2,.1125,.45):.5+.5*Kje(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let e=1.70158;return(i/=.5)<1?.5*(i*i*(((e*=1.525)+1)*i-e)):.5*((i-=2)*i*(((e*=1.525)+1)*i+e)+2)},easeInBounce:i=>1-Lb.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Lb.easeInBounce(i*2)*.5:Lb.easeOutBounce(i*2-1)*.5+.5};function hze(i){if(i&&typeof i=="object"){let e=i.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function vEe(i){return hze(i)?i:new eF(i)}function fEe(i){return hze(i)?i:new eF(i).saturate(.5).darken(.1).hexString()}var xMt=["x","y","borderWidth","radius","tension"],FMt=["color","borderColor","backgroundColor"];function UMt(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),i.set("animations",{colors:{type:"color",properties:FMt},numbers:{type:"number",properties:xMt}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function BMt(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var qje=new Map;function VMt(i,e){e=e||{};let t=i+JSON.stringify(e),n=qje.get(t);return n||(n=new Intl.NumberFormat(i,e),qje.set(t,n)),n}function cF(i,e,t){return VMt(e,t).format(i)}var fze={values(i){return ya(i)?i:""+i},numeric(i,e,t){if(i===0)return"0";let n=this.chart.options.locale,r,o=i;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),o=GMt(i,t)}let s=_A(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),cF(i,n,l)},logarithmic(i,e,t){if(i===0)return"0";let n=t[e].significand||i/Math.pow(10,Math.floor(_A(i)));return[1,2,3,5,10,15].includes(n)||e>.8*t.length?fze.numeric.call(this,i,e,t):""}};function GMt(i,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&i!==Math.floor(i)&&(t=i-Math.floor(i)),t}var dF={formatters:fze};function HMt(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:dF.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}var hC=Object.create(null),rK=Object.create(null);function iF(i,e){if(!e)return i;let t=e.split(".");for(let n=0,r=t.length;n<r;++n){let o=t[n];i=i[o]||(i[o]=Object.create(null))}return i}function _Ee(i,e,t){return typeof e=="string"?wb(iF(i,e),t):wb(iF(i,""),e)}var pEe=class{constructor(e,t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,r)=>fEe(r.backgroundColor),this.hoverBorderColor=(n,r)=>fEe(r.borderColor),this.hoverColor=(n,r)=>fEe(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return _Ee(this,e,t)}get(e){return iF(this,e)}describe(e,t){return _Ee(rK,e,t)}override(e,t){return _Ee(hC,e,t)}route(e,t,n,r){let o=iF(this,e),s=iF(this,n),a="_"+t;Object.defineProperties(o,{[a]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[a],c=s[r];return Io(l)?Object.assign({},c,l):Js(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(t=>t(this))}},La=new pEe({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[UMt,BMt,HMt]);function WMt(i){return!i||pa(i.size)||pa(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function nF(i,e,t,n,r){let o=e[r];return o||(o=e[r]=i.measureText(r).width,t.push(r)),o>n&&(n=o),n}function _ze(i,e,t,n){n=n||{};let r=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),i.save(),i.font=e;let s=0,a=t.length,l,c,d,u,h;for(l=0;l<a;l++)if(u=t[l],u!=null&&!ya(u))s=nF(i,r,o,s,u);else if(ya(u))for(c=0,d=u.length;c<d;c++)h=u[c],h!=null&&!ya(h)&&(s=nF(i,r,o,s,h));i.restore();let f=o.length/2;if(f>t.length){for(l=0;l<f;l++)delete r[o[l]];o.splice(0,f)}return s}function fC(i,e,t){let n=i.currentDevicePixelRatio,r=t!==0?Math.max(t/2,.5):0;return Math.round((e-r)*n)/n+r}function DEe(i,e){e=e||i.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,i.width,i.height),e.restore()}function QI(i,e,t){return t=t||.5,!e||i&&i.x>e.left-t&&i.x<e.right+t&&i.y>e.top-t&&i.y<e.bottom+t}function yEe(i,e){i.save(),i.beginPath(),i.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),i.clip()}function bEe(i){i.restore()}function jMt(i,e){e.translation&&i.translate(e.translation[0],e.translation[1]),pa(e.rotation)||i.rotate(e.rotation),e.color&&(i.fillStyle=e.color),e.textAlign&&(i.textAlign=e.textAlign),e.textBaseline&&(i.textBaseline=e.textBaseline)}function zMt(i,e,t,n,r){if(r.strikethrough||r.underline){let o=i.measureText(n),s=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=t-o.actualBoundingBoxAscent,c=t+o.actualBoundingBoxDescent,d=r.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=r.decorationWidth||2,i.moveTo(s,d),i.lineTo(a,d),i.stroke()}}function YMt(i,e){let t=i.fillStyle;i.fillStyle=e.color,i.fillRect(e.left,e.top,e.width,e.height),i.fillStyle=t}function uF(i,e,t,n,r,o={}){let s=ya(e)?e:[e],a=o.strokeWidth>0&&o.strokeColor!=="",l,c;for(i.save(),i.font=r.string,jMt(i,o),l=0;l<s.length;++l)c=s[l],o.backdrop&&YMt(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),pa(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,t,n,o.maxWidth)),i.fillText(c,t,n,o.maxWidth),zMt(i,t,n,c,o),n+=Number(r.lineHeight);i.restore()}function pze(i,e){let{x:t,y:n,w:r,h:o,radius:s}=e;i.arc(t+s.topLeft,n+s.topLeft,s.topLeft,-Hl,Wl,!0),i.lineTo(t,n+o-s.bottomLeft),i.arc(t+s.bottomLeft,n+o-s.bottomLeft,s.bottomLeft,Wl,Hl,!0),i.lineTo(t+r-s.bottomRight,n+o),i.arc(t+r-s.bottomRight,n+o-s.bottomRight,s.bottomRight,Hl,0,!0),i.lineTo(t+r,n+s.topRight),i.arc(t+r-s.topRight,n+s.topRight,s.topRight,0,-Hl,!0),i.lineTo(t+s.topLeft,n)}var KMt=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,qMt=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function XMt(i,e){let t=(""+i).match(KMt);if(!t||t[1]==="normal")return e*1.2;switch(i=+t[2],t[3]){case"px":return i;case"%":i/=100;break}return e*i}var ZMt=i=>+i||0;function oK(i,e){let t={},n=Io(e),r=n?Object.keys(e):e,o=Io(i)?n?s=>Js(i[s],i[e[s]]):s=>i[s]:()=>i;for(let s of r)t[s]=ZMt(o(s));return t}function Eze(i){return oK(i,{top:"y",right:"x",bottom:"y",left:"x"})}function mze(i){return oK(i,["topLeft","topRight","bottomLeft","bottomRight"])}function sg(i){let e=Eze(i);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function JI(i,e){i=i||{},e=e||La.font;let t=Js(i.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let n=Js(i.style,e.style);n&&!(""+n).match(qMt)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let r={family:Js(i.family,e.family),lineHeight:XMt(Js(i.lineHeight,e.lineHeight),t),size:t,style:n,weight:Js(i.weight,e.weight),string:""};return r.string=WMt(r),r}function hF(i,e,t,n){let r=!0,o,s,a;for(o=0,s=i.length;o<s;++o)if(a=i[o],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),r=!1),t!==void 0&&ya(a)&&(a=a[t%a.length],r=!1),a!==void 0))return n&&!r&&(n.cacheable=!1),a}function gze(i,e,t){let{min:n,max:r}=i,o=EEe(e,(r-n)/2),s=(a,l)=>t&&a===0?0:a+l;return{min:s(n,-Math.abs(o)),max:s(r,o)}}function $I(i,e){return Object.assign(Object.create(i),e)}function sK(i,e=[""],t,n,r=()=>i[0]){let o=t||i;typeof n>"u"&&(n=Sze("_fallback",i));let s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:r,override:a=>sK([a,...i],e,o,n)};return new Proxy(s,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Aze(a,l,()=>rkt(l,e,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return Zje(a).includes(l)},ownKeys(a){return Zje(a)},set(a,l,c){let d=a._storage||(a._storage=r());return a[l]=d[l]=c,delete a._keys,!0}})}function ZI(i,e,t,n){let r={_cacheable:!1,_proxy:i,_context:e,_subProxy:t,_stack:new Set,_descriptors:LEe(i,n),setContext:o=>ZI(i,o,t,n),override:o=>ZI(i.override(o),e,t,n)};return new Proxy(r,{deleteProperty(o,s){return delete o[s],delete i[s],!0},get(o,s,a){return Aze(o,s,()=>JMt(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(i,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,s)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,s){return Reflect.has(i,s)},ownKeys(){return Reflect.ownKeys(i)},set(o,s,a){return i[s]=a,delete o[s],!0}})}function LEe(i,e={scriptable:!0,indexable:!0}){let{_scriptable:t=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=i;return{allKeys:r,scriptable:t,indexable:n,isScriptable:fA(t)?t:()=>t,isIndexable:fA(n)?n:()=>n}}var QMt=(i,e)=>i?i+eK(e):e,wEe=(i,e)=>Io(e)&&i!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Aze(i,e,t){if(Object.prototype.hasOwnProperty.call(i,e))return i[e];let n=t();return i[e]=n,n}function JMt(i,e,t){let{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=i,a=n[e];return fA(a)&&s.isScriptable(e)&&(a=$Mt(e,a,i,t)),ya(a)&&a.length&&(a=ekt(e,a,i,s.isIndexable)),wEe(e,a)&&(a=ZI(a,r,o&&o[e],s)),a}function $Mt(i,e,t,n){let{_proxy:r,_context:o,_subProxy:s,_stack:a}=t;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=e(o,s||n);return a.delete(i),wEe(i,l)&&(l=PEe(r._scopes,r,i,l)),l}function ekt(i,e,t,n){let{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=t;if(typeof o.index<"u"&&n(i))return e[o.index%e.length];if(Io(e[0])){let l=e,c=r._scopes.filter(d=>d!==l);e=[];for(let d of l){let u=PEe(c,r,i,d);e.push(ZI(u,o,s&&s[i],a))}}return e}function Tze(i,e,t){return fA(i)?i(e,t):i}var tkt=(i,e)=>i===!0?e:typeof i=="string"?Mb(e,i):void 0;function ikt(i,e,t,n,r){for(let o of e){let s=tkt(t,o);if(s){i.add(s);let a=Tze(s._fallback,t,r);if(typeof a<"u"&&a!==t&&a!==n)return a}else if(s===!1&&typeof n<"u"&&t!==n)return null}return!1}function PEe(i,e,t,n){let r=e._rootScopes,o=Tze(e._fallback,t,n),s=[...i,...r],a=new Set;a.add(n);let l=Xje(a,s,t,o||t,n);return l===null||typeof o<"u"&&o!==t&&(l=Xje(a,s,o,l,n),l===null)?!1:sK(Array.from(a),[""],r,o,()=>nkt(e,t,n))}function Xje(i,e,t,n,r){for(;t;)t=ikt(i,e,t,n,r);return t}function nkt(i,e,t){let n=i._getTarget();e in n||(n[e]={});let r=n[e];return ya(r)&&Io(t)?t:r||{}}function rkt(i,e,t,n){let r;for(let o of e)if(r=Sze(QMt(o,i),t),typeof r<"u")return wEe(i,r)?PEe(t,n,i,r):r}function Sze(i,e){for(let t of e){if(!t)continue;let n=t[i];if(typeof n<"u")return n}}function Zje(i){let e=i._keys;return e||(e=i._keys=okt(i._scopes)),e}function okt(i){let e=new Set;for(let t of i)for(let n of Object.keys(t).filter(r=>!r.startsWith("_")))e.add(n);return Array.from(e)}var zen=Number.EPSILON||1e-14;function MEe(){return typeof window<"u"&&typeof document<"u"}function aK(i){let e=i.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function $Y(i,e,t){let n;return typeof i=="string"?(n=parseInt(i,10),i.indexOf("%")!==-1&&(n=n/100*e.parentNode[t])):n=i,n}var lK=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function skt(i,e){return lK(i).getPropertyValue(e)}var akt=["top","right","bottom","left"];function XI(i,e,t){let n={};t=t?"-"+t:"";for(let r=0;r<4;r++){let o=akt[r];n[o]=parseFloat(i[e+"-"+o+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}var lkt=(i,e,t)=>(i>0||e>0)&&(!t||!t.shadowRoot);function ckt(i,e){let t=i.touches,n=t&&t.length?t[0]:i,{offsetX:r,offsetY:o}=n,s=!1,a,l;if(lkt(r,o,i.target))a=r,l=o;else{let c=e.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function _C(i,e){if("native"in i)return i;let{canvas:t,currentDevicePixelRatio:n}=e,r=lK(t),o=r.boxSizing==="border-box",s=XI(r,"padding"),a=XI(r,"border","width"),{x:l,y:c,box:d}=ckt(i,t),u=s.left+(d&&a.left),h=s.top+(d&&a.top),{width:f,height:_}=e;return o&&(f-=s.width+a.width,_-=s.height+a.height),{x:Math.round((l-u)/f*t.width/n),y:Math.round((c-h)/_*t.height/n)}}function dkt(i,e,t){let n,r;if(e===void 0||t===void 0){let o=aK(i);if(!o)e=i.clientWidth,t=i.clientHeight;else{let s=o.getBoundingClientRect(),a=lK(o),l=XI(a,"border","width"),c=XI(a,"padding");e=s.width-c.width-l.width,t=s.height-c.height-l.height,n=$Y(a.maxWidth,o,"clientWidth"),r=$Y(a.maxHeight,o,"clientHeight")}}return{width:e,height:t,maxWidth:n||JY,maxHeight:r||JY}}var ZY=i=>Math.round(i*10)/10;function Cze(i,e,t,n){let r=lK(i),o=XI(r,"margin"),s=$Y(r.maxWidth,i,"clientWidth")||JY,a=$Y(r.maxHeight,i,"clientHeight")||JY,l=dkt(i,e,t),{width:c,height:d}=l;if(r.boxSizing==="content-box"){let h=XI(r,"border","width"),f=XI(r,"padding");c-=f.width+h.width,d-=f.height+h.height}return c=Math.max(0,c-o.width),d=Math.max(0,n?c/n:d-o.height),c=ZY(Math.min(c,s,l.maxWidth)),d=ZY(Math.min(d,a,l.maxHeight)),c&&!d&&(d=ZY(c/2)),(e!==void 0||t!==void 0)&&n&&l.height&&d>l.height&&(d=l.height,c=ZY(Math.floor(d*n))),{width:c,height:d}}function kEe(i,e,t){let n=e||1,r=Math.floor(i.height*n),o=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);let s=i.canvas;return s.style&&(t||!s.style.height&&!s.style.width)&&(s.style.height=`${i.height}px`,s.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||s.height!==r||s.width!==o?(i.currentDevicePixelRatio=n,s.height=r,s.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}var Rze=(function(){let i=!1;try{let e={get passive(){return i=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return i})();function xEe(i,e){let t=skt(i,e),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}var HEe=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,n,r){let o=t.listeners[r],s=t.duration;o.forEach(a=>a({chart:e,initial:t.initial,numSteps:s,currentStep:Math.min(n-t.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=OEe.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let o=n.items,s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),a=!0):(o[s]=o[o.length-1],o.pop());a&&(r.draw(),this._notify(r,n,e,"progress")),o.length||(n.running=!1,this._notify(r,n,e,"complete"),n.initial=!1),t+=o.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,r)=>Math.max(n,r._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}},pA=new HEe,Oze="transparent",ukt={boolean(i,e,t){return t>.5?e:i},color(i,e,t){let n=vEe(i||Oze),r=n.valid&&vEe(e||Oze);return r&&r.valid?r.mix(n,t).hexString():e},number(i,e,t){return i+(e-i)*t}},WEe=class{constructor(e,t,n,r){let o=t[n];r=hF([e.to,r,o,e.from]);let s=hF([e.from,o,r]);this._active=!0,this._fn=e.fn||ukt[e.type||typeof s],this._easing=Lb[e.easing]||Lb.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let r=this._target[this._prop],o=n-this._start,s=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=hF([e.to,t,r,e.from]),this._from=hF([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,r=this._prop,o=this._from,s=this._loop,a=this._to,l;if(this._active=o!==a&&(s||t<n),!this._active){this._target[r]=a,this._notify(!0);return}if(t<0){this._target[r]=o;return}l=t/n%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(o,a,l)}wait(){let e=this._promises||(this._promises=[]);return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?"res":"rej",n=this._promises||[];for(let r=0;r<n.length;r++)n[r][t]()}},jEe=class{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Io(e))return;let t=Object.keys(La.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{let o=e[r];if(!Io(o))return;let s={};for(let a of t)s[a]=o[a];(ya(o.properties)&&o.properties||[r]).forEach(a=>{(a===r||!n.has(a))&&n.set(a,s)})})}_animateOptions(e,t){let n=t.options,r=fkt(e,n);if(!r)return[];let o=this._createAnimations(r,n);return n.$shared&&hkt(e.options.$animations,n).then(()=>{e.options=n},()=>{}),o}_createAnimations(e,t){let n=this._properties,r=[],o=e.$animations||(e.$animations={}),s=Object.keys(t),a=Date.now(),l;for(l=s.length-1;l>=0;--l){let c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(e,t));continue}let d=t[c],u=o[c],h=n.get(c);if(u)if(h&&u.active()){u.update(h,d,a);continue}else u.cancel();if(!h||!h.duration){e[c]=d;continue}o[c]=u=new WEe(h,e,c,d),r.push(u)}return r}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return pA.add(this._chart,n),!0}};function hkt(i,e){let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let o=i[n[r]];o&&o.active()&&t.push(o.wait())}return Promise.all(t)}function fkt(i,e){if(!e)return;let t=i.options;if(!t){i.options=e;return}return t.$shared&&(i.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function Ize(i,e){let t=i&&i.options||{},n=t.reverse,r=t.min===void 0?e:0,o=t.max===void 0?e:0;return{start:n?o:r,end:n?r:o}}function _kt(i,e,t){if(t===!1)return!1;let n=Ize(i,t),r=Ize(e,t);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}function pkt(i){let e,t,n,r;return Io(i)?(e=i.top,t=i.right,n=i.bottom,r=i.left):e=t=n=r=i,{top:e,right:t,bottom:n,left:r,disabled:i===!1}}function cYe(i,e){let t=[],n=i._getSortedDatasetMetas(e),r,o;for(r=0,o=n.length;r<o;++r)t.push(n[r].index);return t}function Nze(i,e,t,n={}){let r=i.keys,o=n.mode==="single",s,a,l,c;if(e!==null){for(s=0,a=r.length;s<a;++s){if(l=+r[s],l===t){if(n.all)continue;break}c=i.values[l],jl(c)&&(o||e===0||oF(e)===oF(c))&&(e+=c)}return e}}function Ekt(i){let e=Object.keys(i),t=new Array(e.length),n,r,o;for(n=0,r=e.length;n<r;++n)o=e[n],t[n]={x:o,y:i[o]};return t}function vze(i,e){let t=i&&i.options.stacked;return t||t===void 0&&e.stack!==void 0}function mkt(i,e,t){return`${i.id}.${e.id}.${t.stack||t.type}`}function gkt(i){let{min:e,max:t,minDefined:n,maxDefined:r}=i.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?t:Number.POSITIVE_INFINITY}}function Akt(i,e,t){let n=i[e]||(i[e]={});return n[t]||(n[t]={})}function Dze(i,e,t,n){for(let r of e.getMatchingVisibleMetas(n).reverse()){let o=i[r.index];if(t&&o>0||!t&&o<0)return r.index}return null}function yze(i,e){let{chart:t,_cachedMeta:n}=i,r=t._stacks||(t._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,d=mkt(o,s,n),u=e.length,h;for(let f=0;f<u;++f){let _=e[f],{[l]:p,[c]:T}=_,g=_._stacks||(_._stacks={});h=g[c]=Akt(r,d,p),h[a]=T,h._top=Dze(h,s,!0,n.type),h._bottom=Dze(h,s,!1,n.type);let y=h._visualValues||(h._visualValues={});y[a]=T}}function FEe(i,e){let t=i.scales;return Object.keys(t).filter(n=>t[n].axis===e).shift()}function Tkt(i,e){return $I(i,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Skt(i,e,t){return $I(i,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function fF(i,e){let t=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){e=e||i._parsed;for(let r of e){let o=r._stacks;if(!o||o[n]===void 0||o[n][t]===void 0)return;delete o[n][t],o[n]._visualValues!==void 0&&o[n]._visualValues[t]!==void 0&&delete o[n]._visualValues[t]}}}var UEe=i=>i==="reset"||i==="none",bze=(i,e)=>e?i:Object.assign({},i),Ckt=(i,e,t)=>i&&!e.hidden&&e._stacked&&{keys:cYe(t,!0),values:null},dYe=(()=>{class i{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=vze(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&fF(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,n=this._cachedMeta,r=this.getDataset(),o=(h,f,_,p)=>h==="x"?f:h==="r"?p:_,s=n.xAxisID=Js(r.xAxisID,FEe(t,"x")),a=n.yAxisID=Js(r.yAxisID,FEe(t,"y")),l=n.rAxisID=Js(r.rAxisID,FEe(t,"r")),c=n.indexAxis,d=n.iAxisID=o(c,s,a,l),u=n.vAxisID=o(c,a,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&REe(this._data,this),t._stacked&&fF(t)}_dataCheck(){let t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Io(n))this._data=Ekt(n);else if(r!==n){if(r){REe(r,this);let o=this._cachedMeta;fF(o),o._parsed=[]}n&&Object.isExtensible(n)&&lze(n,this),this._syncList=[],this._data=n}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let n=this._cachedMeta,r=this.getDataset(),o=!1;this._dataCheck();let s=n._stacked;n._stacked=vze(n.vScale,n),n.stack!==r.stack&&(o=!0,fF(n),n.stack=r.stack),this._resyncElements(t),(o||s!==n._stacked)&&yze(this,n._parsed)}configure(){let t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){let{_cachedMeta:r,_data:o}=this,{iScale:s,_stacked:a}=r,l=s.axis,c=t===0&&n===o.length?!0:r._sorted,d=t>0&&r._parsed[t-1],u,h,f;if(this._parsing===!1)r._parsed=o,r._sorted=!0,f=o;else{ya(o[t])?f=this.parseArrayData(r,o,t,n):Io(o[t])?f=this.parseObjectData(r,o,t,n):f=this.parsePrimitiveData(r,o,t,n);let _=()=>h[l]===null||d&&h[l]<d[l];for(u=0;u<n;++u)r._parsed[u+t]=h=f[u],c&&(_()&&(c=!1),d=h);r._sorted=c}a&&yze(this,f)}parsePrimitiveData(t,n,r,o){let{iScale:s,vScale:a}=t,l=s.axis,c=a.axis,d=s.getLabels(),u=s===a,h=new Array(o),f,_,p;for(f=0,_=o;f<_;++f)p=f+r,h[f]={[l]:u||s.parse(d[p],p),[c]:a.parse(n[p],p)};return h}parseArrayData(t,n,r,o){let{xScale:s,yScale:a}=t,l=new Array(o),c,d,u,h;for(c=0,d=o;c<d;++c)u=c+r,h=n[u],l[c]={x:s.parse(h[0],u),y:a.parse(h[1],u)};return l}parseObjectData(t,n,r,o){let{xScale:s,yScale:a}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(o),u,h,f,_;for(u=0,h=o;u<h;++u)f=u+r,_=n[f],d[u]={x:s.parse(Mb(_,l),f),y:a.parse(Mb(_,c),f)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){let o=this.chart,s=this._cachedMeta,a=n[t.axis],l={keys:cYe(o,!0),values:n._stacks[t.axis]._visualValues};return Nze(l,a,s.index,{mode:r})}updateRangeFromParsed(t,n,r,o){let s=r[n.axis],a=s===null?NaN:s,l=o&&r._stacks[n.axis];o&&l&&(o.values=l,a=Nze(o,s,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){let r=this._cachedMeta,o=r._parsed,s=r._sorted&&t===r.iScale,a=o.length,l=this._getOtherScale(t),c=Ckt(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=gkt(l),f,_;function p(){_=o[f];let T=_[l.axis];return!jl(_[t.axis])||u>T||h<T}for(f=0;f<a&&!(!p()&&(this.updateRangeFromParsed(d,t,_,c),s));++f);if(s){for(f=a-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(d,t,_,c);break}}return d}getAllParsedValues(t){let n=this._cachedMeta._parsed,r=[],o,s,a;for(o=0,s=n.length;o<s;++o)a=n[o][t.axis],jl(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(t){let n=this._cachedMeta,r=n.iScale,o=n.vScale,s=this.getParsed(t);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:o?""+o.getLabelForValue(s[o.axis]):""}}_update(t){let n=this._cachedMeta;this.update(t||"default"),n._clip=pkt(Js(this.options.clip,_kt(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,n=this.chart,r=this._cachedMeta,o=r.data||[],s=n.chartArea,a=[],l=this._drawStart||0,c=this._drawCount||o.length-l,d=this.options.drawActiveElementsOnTop,u;for(r.dataset&&r.dataset.draw(t,s,l,c),u=l;u<l+c;++u){let h=o[u];h.hidden||(h.active&&d?a.push(h):h.draw(t,s))}for(u=0;u<a.length;++u)a[u].draw(t,s)}getStyle(t,n){let r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){let o=this.getDataset(),s;if(t>=0&&t<this._cachedMeta.data.length){let a=this._cachedMeta.data[t];s=a.$context||(a.$context=Skt(this.getContext(),t,a)),s.parsed=this.getParsed(t),s.raw=o.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=Tkt(this.chart.getContext(),this.index)),s.dataset=o,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){let o=n==="active",s=this._cachedDataOpts,a=t+"-"+n,l=s[a],c=this.enableOptionSharing&&rF(r);if(l)return bze(l,c);let d=this.chart.config,u=d.datasetElementScopeKeys(this._type,t),h=o?[`${t}Hover`,"hover",t,""]:[t,""],f=d.getOptionScopes(this.getDataset(),u),_=Object.keys(La.elements[t]),p=()=>this.getContext(r,o,n),T=d.resolveNamedOptions(f,_,p,h);return T.$shared&&(T.$shared=c,s[a]=Object.freeze(bze(T,c))),T}_resolveAnimations(t,n,r){let o=this.chart,s=this._cachedDataOpts,a=`animation-${n}`,l=s[a];if(l)return l;let c;if(o.options.animation!==!1){let u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),h);c=u.createResolver(f,this.getContext(t,r,n))}let d=new jEe(o,c&&c.animations);return c&&c._cacheable&&(s[a]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||UEe(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){let r=this.resolveDataElementOptions(t,n),o=this._sharedOptions,s=this.getSharedOptions(r),a=this.includeOptions(n,s)||s!==o;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:a}}updateElement(t,n,r,o){UEe(o)?Object.assign(t,r):this._resolveAnimations(n,o).update(t,r)}updateSharedOptions(t,n,r){t&&!UEe(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,o){t.active=o;let s=this.getStyle(n,o);this._resolveAnimations(n,r,o).update(t,{options:!o&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let n=this._data,r=this._cachedMeta.data;for(let[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];let o=r.length,s=n.length,a=Math.min(s,o);a&&this.parse(0,a),s>o?this._insertElements(o,s-o,t):s<o&&this._removeElements(s,o-s)}_insertElements(t,n,r=!0){let o=this._cachedMeta,s=o.data,a=t+n,l,c=d=>{for(d.length+=n,l=d.length-1;l>=a;l--)d[l]=d[l-n]};for(c(s),l=t;l<a;++l)s[l]=new this.dataElementType;this._parsing&&c(o._parsed),this.parse(t,n),r&&this.updateElements(s,t,n,"reset")}updateElements(t,n,r,o){}_removeElements(t,n){let r=this._cachedMeta;if(this._parsing){let o=r._parsed.splice(t,n);r._stacked&&fF(r,o)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[n,r,o]=t;this[n](r,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);let r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}return i})();function Rkt(i,e,t){let n=1,r=1,o=0,s=0;if(e<ba){let a=i,l=a+e,c=Math.cos(a),d=Math.sin(a),u=Math.cos(l),h=Math.sin(l),f=(w,L,P)=>lF(w,a,l,!0)?1:Math.max(L,L*t,P,P*t),_=(w,L,P)=>lF(w,a,l,!0)?-1:Math.min(L,L*t,P,P*t),p=f(0,c,u),T=f(Hl,d,h),g=_(Wl,c,u),y=_(Wl+Hl,d,h);n=(p-g)/2,r=(T-y)/2,o=-(p+g)/2,s=-(T+y)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}var uYe=(()=>{class i extends dYe{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:r,color:o}}=t.legend.options;return n.labels.map((s,a)=>{let c=t.getDatasetMeta(0).controller.getStyle(a);return{text:s,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){let r=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=r;else{let s=c=>+r[c];if(Io(r[t])){let{key:c="value"}=this._parsing;s=d=>+Mb(r[d],c)}let a,l;for(a=t,l=t+n;a<l;++a)o._parsed[a]=s(a)}}_getRotation(){return oE(this.options.rotation-90)}_getCircumference(){return oE(this.options.circumference)}_getRotationExtents(){let t=ba,n=-ba;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){let o=this.chart.getDatasetMeta(r).controller,s=o._getRotation(),a=o._getCircumference();t=Math.min(t,s),n=Math.max(n,s+a)}return{rotation:t,circumference:n-t}}update(t){let n=this.chart,{chartArea:r}=n,o=this._cachedMeta,s=o.data,a=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(r.width,r.height)-a)/2,0),c=Math.min(Jje(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:f,ratioY:_,offsetX:p,offsetY:T}=Rkt(h,u,c),g=(r.width-a)/f,y=(r.height-a)/_,w=Math.max(Math.min(g,y)/2,0),L=EEe(this.options.radius,w),P=Math.max(L*c,0),V=(L-P)/this._getVisibleDatasetWeightTotal();this.offsetX=p*L,this.offsetY=T*L,o.total=this.calculateTotal(),this.outerRadius=L-V*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-V*d,0),this.updateElements(s,0,s.length,t)}_circumference(t,n){let r=this.options,o=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||o._parsed[t]===null||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*s/ba)}updateElements(t,n,r,o){let s=o==="reset",a=this.chart,l=a.chartArea,d=a.options.animation,u=(l.left+l.right)/2,h=(l.top+l.bottom)/2,f=s&&d.animateScale,_=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:T,includeOptions:g}=this._getSharedOptions(n,o),y=this._getRotation(),w;for(w=0;w<n;++w)y+=this._circumference(w,s);for(w=n;w<n+r;++w){let L=this._circumference(w,s),P=t[w],V={x:u+this.offsetX,y:h+this.offsetY,startAngle:y,endAngle:y+L,circumference:L,outerRadius:p,innerRadius:_};g&&(V.options=T||this.resolveDataElementOptions(w,P.active?"active":o)),y+=L,this.updateElement(P,w,V,o)}}calculateTotal(){let t=this._cachedMeta,n=t.data,r=0,o;for(o=0;o<n.length;o++){let s=t._parsed[o];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(o)&&!n[o].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(t){let n=this._cachedMeta.total;return n>0&&!isNaN(t)?ba*(Math.abs(t)/n):0}getLabelAndValue(t){let n=this._cachedMeta,r=this.chart,o=r.data.labels||[],s=cF(n._parsed[t],r.options.locale);return{label:o[t]||"",value:s}}getMaxBorderWidth(t){let n=0,r=this.chart,o,s,a,l,c;if(!t){for(o=0,s=r.data.datasets.length;o<s;++o)if(r.isDatasetVisible(o)){a=r.getDatasetMeta(o),t=a.data,l=a.controller;break}}if(!t)return 0;for(o=0,s=t.length;o<s;++o)c=l.resolveDataElementOptions(o),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,o=t.length;r<o;++r){let s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Js(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}return i})();function eN(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var zEe=class i{static override(e){Object.assign(i.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return eN()}parse(){return eN()}format(){return eN()}add(){return eN()}diff(){return eN()}startOf(){return eN()}endOf(){return eN()}},Okt={_date:zEe};function Ikt(i,e,t,n){let{controller:r,data:o,_sorted:s}=i,a=r._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&s&&o.length){let l=a._reversePixels?oze:nK;if(n){if(r._sharedOptions){let c=o[0],d=typeof c.getRange=="function"&&c.getRange(e);if(d){let u=l(o,e,t-d),h=l(o,e,t+d);return{lo:u.lo,hi:h.hi}}}}else return l(o,e,t)}return{lo:0,hi:o.length-1}}function CF(i,e,t,n,r){let o=i.getSortedVisibleDatasetMetas(),s=t[e];for(let a=0,l=o.length;a<l;++a){let{index:c,data:d}=o[a],{lo:u,hi:h}=Ikt(o[a],e,s,r);for(let f=u;f<=h;++f){let _=d[f];_.skip||n(_,c,f)}}}function Nkt(i){let e=i.indexOf("x")!==-1,t=i.indexOf("y")!==-1;return function(n,r){let o=e?Math.abs(n.x-r.x):0,s=t?Math.abs(n.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function BEe(i,e,t,n,r){let o=[];return!r&&!i.isPointInArea(e)||CF(i,t,e,function(a,l,c){!r&&!QI(a,i.chartArea,0)||a.inRange(e.x,e.y,n)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function vkt(i,e,t,n){let r=[];function o(s,a,l){let{startAngle:c,endAngle:d}=s.getProps(["startAngle","endAngle"],n),{angle:u}=CEe(s,{x:e.x,y:e.y});lF(u,c,d)&&r.push({element:s,datasetIndex:a,index:l})}return CF(i,t,e,o),r}function Dkt(i,e,t,n,r,o){let s=[],a=Nkt(t),l=Number.POSITIVE_INFINITY;function c(d,u,h){let f=d.inRange(e.x,e.y,r);if(n&&!f)return;let _=d.getCenterPoint(r);if(!(!!o||i.isPointInArea(_))&&!f)return;let T=a(e,_);T<l?(s=[{element:d,datasetIndex:u,index:h}],l=T):T===l&&s.push({element:d,datasetIndex:u,index:h})}return CF(i,t,e,c),s}function VEe(i,e,t,n,r,o){return!o&&!i.isPointInArea(e)?[]:t==="r"&&!n?vkt(i,e,t,r):Dkt(i,e,t,n,r,o)}function Lze(i,e,t,n,r){let o=[],s=t==="x"?"inXRange":"inYRange",a=!1;return CF(i,t,e,(l,c,d)=>{l[s](e[t],r)&&(o.push({element:l,datasetIndex:c,index:d}),a=a||l.inRange(e.x,e.y,r))}),n&&!a?[]:o}var ykt={evaluateInteractionItems:CF,modes:{index(i,e,t,n){let r=_C(e,i),o=t.axis||"x",s=t.includeInvisible||!1,a=t.intersect?BEe(i,r,o,n,s):VEe(i,r,o,!1,n,s),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let d=a[0].index,u=c.data[d];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:d})}),l):[]},dataset(i,e,t,n){let r=_C(e,i),o=t.axis||"xy",s=t.includeInvisible||!1,a=t.intersect?BEe(i,r,o,n,s):VEe(i,r,o,!1,n,s);if(a.length>0){let l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let d=0;d<c.length;++d)a.push({element:c[d],datasetIndex:l,index:d})}return a},point(i,e,t,n){let r=_C(e,i),o=t.axis||"xy",s=t.includeInvisible||!1;return BEe(i,r,o,n,s)},nearest(i,e,t,n){let r=_C(e,i),o=t.axis||"xy",s=t.includeInvisible||!1;return VEe(i,r,o,t.intersect,n,s)},x(i,e,t,n){let r=_C(e,i);return Lze(i,r,"x",t.intersect,n)},y(i,e,t,n){let r=_C(e,i);return Lze(i,r,"y",t.intersect,n)}}},hYe=["left","top","right","bottom"];function _F(i,e){return i.filter(t=>t.pos===e)}function wze(i,e){return i.filter(t=>hYe.indexOf(t.pos)===-1&&t.box.axis===e)}function pF(i,e){return i.sort((t,n)=>{let r=e?n:t,o=e?t:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight})}function bkt(i){let e=[],t,n,r,o,s,a;for(t=0,n=(i||[]).length;t<n;++t)r=i[t],{position:o,options:{stack:s,stackWeight:a=1}}=r,e.push({index:t,box:r,pos:o,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&o+s,stackWeight:a});return e}function Lkt(i){let e={};for(let t of i){let{stack:n,pos:r,stackWeight:o}=t;if(!n||!hYe.includes(r))continue;let s=e[n]||(e[n]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return e}function wkt(i,e){let t=Lkt(i),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e,o,s,a;for(o=0,s=i.length;o<s;++o){a=i[o];let{fullSize:l}=a.box,c=t[a.stack],d=c&&a.stackWeight/c.weight;a.horizontal?(a.width=d?d*n:l&&e.availableWidth,a.height=r):(a.width=n,a.height=d?d*r:l&&e.availableHeight)}return t}function Pkt(i){let e=bkt(i),t=pF(e.filter(c=>c.box.fullSize),!0),n=pF(_F(e,"left"),!0),r=pF(_F(e,"right")),o=pF(_F(e,"top"),!0),s=pF(_F(e,"bottom")),a=wze(e,"x"),l=wze(e,"y");return{fullSize:t,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:_F(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}function Pze(i,e,t,n){return Math.max(i[t],e[t])+Math.max(i[n],e[n])}function fYe(i,e){i.top=Math.max(i.top,e.top),i.left=Math.max(i.left,e.left),i.bottom=Math.max(i.bottom,e.bottom),i.right=Math.max(i.right,e.right)}function Mkt(i,e,t,n){let{pos:r,box:o}=t,s=i.maxPadding;if(!Io(r)){t.size&&(i[r]-=t.size);let u=n[t.stack]||{size:0,count:1};u.size=Math.max(u.size,t.horizontal?o.height:o.width),t.size=u.size/u.count,i[r]+=t.size}o.getPadding&&fYe(s,o.getPadding());let a=Math.max(0,e.outerWidth-Pze(s,i,"left","right")),l=Math.max(0,e.outerHeight-Pze(s,i,"top","bottom")),c=a!==i.w,d=l!==i.h;return i.w=a,i.h=l,t.horizontal?{same:c,other:d}:{same:d,other:c}}function kkt(i){let e=i.maxPadding;function t(n){let r=Math.max(e[n]-i[n],0);return i[n]+=r,r}i.y+=t("top"),i.x+=t("left"),t("right"),t("bottom")}function xkt(i,e){let t=e.maxPadding;function n(r){let o={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{o[s]=Math.max(e[s],t[s])}),o}return n(i?["left","right"]:["top","bottom"])}function gF(i,e,t,n){let r=[],o,s,a,l,c,d;for(o=0,s=i.length,c=0;o<s;++o){a=i[o],l=a.box,l.update(a.width||e.w,a.height||e.h,xkt(a.horizontal,e));let{same:u,other:h}=Mkt(e,t,a,n);c|=u&&r.length,d=d||h,l.fullSize||r.push(a)}return c&&gF(r,e,t,n)||d}function cK(i,e,t,n,r){i.top=t,i.left=e,i.right=e+n,i.bottom=t+r,i.width=n,i.height=r}function Mze(i,e,t,n){let r=t.padding,{x:o,y:s}=e;for(let a of i){let l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},d=a.stackWeight/c.weight||1;if(a.horizontal){let u=e.w*d,h=c.size||l.height;rF(c.start)&&(s=c.start),l.fullSize?cK(l,r.left,s,t.outerWidth-r.right-r.left,h):cK(l,e.left+c.placed,s,u,h),c.start=s,c.placed+=u,s=l.bottom}else{let u=e.h*d,h=c.size||l.width;rF(c.start)&&(o=c.start),l.fullSize?cK(l,o,r.top,h,t.outerHeight-r.bottom-r.top):cK(l,o,e.top+c.placed,h,u),c.start=o,c.placed+=u,o=l.right}}e.x=o,e.y=s}var dK={addBox(i,e){i.boxes||(i.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},i.boxes.push(e)},removeBox(i,e){let t=i.boxes?i.boxes.indexOf(e):-1;t!==-1&&i.boxes.splice(t,1)},configure(i,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(i,e,t,n){if(!i)return;let r=sg(i.options.layout.padding),o=Math.max(e-r.width,0),s=Math.max(t-r.height,0),a=Pkt(i.boxes),l=a.vertical,c=a.horizontal;Qc(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});let d=l.reduce((p,T)=>T.box.options&&T.box.options.display===!1?p:p+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:t,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/d,hBoxMaxHeight:s/2}),h=Object.assign({},r);fYe(h,sg(n));let f=Object.assign({maxPadding:h,w:o,h:s,x:r.left,y:r.top},r),_=wkt(l.concat(c),u);gF(a.fullSize,f,u,_),gF(l,f,u,_),gF(c,f,u,_)&&gF(l,f,u,_),kkt(f),Mze(a.leftAndTop,f,u,_),f.x+=f.w,f.y+=f.h,Mze(a.rightAndBottom,f,u,_),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Qc(a.chartArea,p=>{let T=p.box;Object.assign(T,i.chartArea),T.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},EK=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}},YEe=class extends EK{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}},_K="$chartjs",Fkt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},kze=i=>i===null||i==="";function Ukt(i,e){let t=i.style,n=i.getAttribute("height"),r=i.getAttribute("width");if(i[_K]={initial:{height:n,width:r,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",kze(r)){let o=xEe(i,"width");o!==void 0&&(i.width=o)}if(kze(n))if(i.style.height==="")i.height=i.width/(e||2);else{let o=xEe(i,"height");o!==void 0&&(i.height=o)}return i}var _Ye=Rze?{passive:!0}:!1;function Bkt(i,e,t){i.addEventListener(e,t,_Ye)}function Vkt(i,e,t){i.canvas.removeEventListener(e,t,_Ye)}function Gkt(i,e){let t=Fkt[i.type]||i.type,{x:n,y:r}=_C(i,e);return{type:t,chart:e,native:i,x:n!==void 0?n:null,y:r!==void 0?r:null}}function mK(i,e){for(let t of i)if(t===e||t.contains(e))return!0}function Hkt(i,e,t){let n=i.canvas,r=new MutationObserver(o=>{let s=!1;for(let a of o)s=s||mK(a.addedNodes,n),s=s&&!mK(a.removedNodes,n);s&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}function Wkt(i,e,t){let n=i.canvas,r=new MutationObserver(o=>{let s=!1;for(let a of o)s=s||mK(a.removedNodes,n),s=s&&!mK(a.addedNodes,n);s&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}var AF=new Map,xze=0;function pYe(){let i=window.devicePixelRatio;i!==xze&&(xze=i,AF.forEach((e,t)=>{t.currentDevicePixelRatio!==i&&e()}))}function jkt(i,e){AF.size||window.addEventListener("resize",pYe),AF.set(i,e)}function zkt(i){AF.delete(i),AF.size||window.removeEventListener("resize",pYe)}function Ykt(i,e,t){let n=i.canvas,r=n&&aK(n);if(!r)return;let o=IEe((a,l)=>{let c=r.clientWidth;t(a,l),c<r.clientWidth&&t()},window),s=new ResizeObserver(a=>{let l=a[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||o(c,d)});return s.observe(r),jkt(i,o),s}function GEe(i,e,t){t&&t.disconnect(),e==="resize"&&zkt(i)}function Kkt(i,e,t){let n=i.canvas,r=IEe(o=>{i.ctx!==null&&t(Gkt(o,i))},i);return Bkt(n,e,r),r}var KEe=class extends EK{acquireContext(e,t){let n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(Ukt(e,t),n):null}releaseContext(e){let t=e.canvas;if(!t[_K])return!1;let n=t[_K].initial;["height","width"].forEach(o=>{let s=n[o];pa(s)?t.removeAttribute(o):t.setAttribute(o,s)});let r=n.style||{};return Object.keys(r).forEach(o=>{t.style[o]=r[o]}),t.width=t.width,delete t[_K],!0}addEventListener(e,t,n){this.removeEventListener(e,t);let r=e.$proxies||(e.$proxies={}),s={attach:Hkt,detach:Wkt,resize:Ykt}[t]||Kkt;r[t]=s(e,t,n)}removeEventListener(e,t){let n=e.$proxies||(e.$proxies={}),r=n[t];if(!r)return;({attach:GEe,detach:GEe,resize:GEe}[t]||Vkt)(e,t,r),n[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return Cze(e,t,n,r)}isAttached(e){let t=aK(e);return!!(t&&t.isConnected)}};function qkt(i){return!MEe()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?YEe:KEe}var TF=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps(["x","y"],e);return{x:t,y:n}}hasValue(){return aF(this.x)&&aF(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let r={};return e.forEach(o=>{r[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),r}};function Xkt(i,e){let t=i.options.ticks,n=Zkt(i),r=Math.min(t.maxTicksLimit||n,n),o=t.major.enabled?Jkt(e):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>r)return $kt(e,c,o,s/r),c;let d=Qkt(o,e,r);if(s>0){let u,h,f=s>1?Math.round((l-a)/(s-1)):null;for(uK(e,c,d,pa(f)?0:a-f,a),u=0,h=s-1;u<h;u++)uK(e,c,d,o[u],o[u+1]);return uK(e,c,d,l,pa(f)?e.length:l+f),c}return uK(e,c,d),c}function Zkt(i){let e=i.options.offset,t=i._tickSize(),n=i._length/t+(e?0:1),r=i._maxLength/t;return Math.floor(Math.min(n,r))}function Qkt(i,e,t){let n=e3t(i),r=e.length/t;if(!n)return Math.max(r,1);let o=tze(n);for(let s=0,a=o.length-1;s<a;s++){let l=o[s];if(l>r)return l}return Math.max(r,1)}function Jkt(i){let e=[],t,n;for(t=0,n=i.length;t<n;t++)i[t].major&&e.push(t);return e}function $kt(i,e,t,n){let r=0,o=t[0],s;for(n=Math.ceil(n),s=0;s<i.length;s++)s===o&&(e.push(i[s]),r++,o=t[r*n])}function uK(i,e,t,n,r){let o=Js(n,0),s=Math.min(Js(r,i.length),i.length),a=0,l,c,d;for(t=Math.ceil(t),r&&(l=r-n,t=l/Math.floor(l/t)),d=o;d<0;)a++,d=Math.round(o+a*t);for(c=Math.max(o,0);c<s;c++)c===d&&(e.push(i[c]),a++,d=Math.round(o+a*t))}function e3t(i){let e=i.length,t,n;if(e<2)return!1;for(n=i[0],t=1;t<e;++t)if(i[t]-i[t-1]!==n)return!1;return n}var t3t=i=>i==="left"?"right":i==="right"?"left":i,Fze=(i,e,t)=>e==="top"||e==="left"?i[e]+t:i[e]-t,Uze=(i,e)=>Math.min(e||i,i);function Bze(i,e){let t=[],n=i.length/e,r=i.length,o=0;for(;o<r;o+=n)t.push(i[Math.floor(o)]);return t}function i3t(i,e,t){let n=i.ticks.length,r=Math.min(e,n-1),o=i._startPixel,s=i._endPixel,a=1e-6,l=i.getPixelForTick(r),c;if(!(t&&(n===1?c=Math.max(l-o,s-l):e===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(r-1))/2,l+=r<e?c:-c,l<o-a||l>s+a)))return l}function n3t(i,e){Qc(i,t=>{let n=t.gc,r=n.length/2,o;if(r>e){for(o=0;o<r;++o)delete t.data[n[o]];n.splice(0,r)}})}function EF(i){return i.drawTicks?i.tickLength:0}function Vze(i,e){if(!i.display)return 0;let t=JI(i.font,e),n=sg(i.padding);return(ya(i.text)?i.text.length:1)*t.lineHeight+n.height}function r3t(i,e){return $I(i,{scale:e,type:"scale"})}function o3t(i,e,t){return $I(i,{tick:t,index:e,type:"tick"})}function s3t(i,e,t){let n=uze(i);return(t&&e!=="right"||!t&&e==="right")&&(n=t3t(n)),n}function a3t(i,e,t,n){let{top:r,left:o,bottom:s,right:a,chart:l}=i,{chartArea:c,scales:d}=l,u=0,h,f,_,p=s-r,T=a-o;if(i.isHorizontal()){if(f=NEe(n,o,a),Io(t)){let g=Object.keys(t)[0],y=t[g];_=d[g].getPixelForValue(y)+p-e}else t==="center"?_=(c.bottom+c.top)/2+p-e:_=Fze(i,t,e);h=a-o}else{if(Io(t)){let g=Object.keys(t)[0],y=t[g];f=d[g].getPixelForValue(y)-T+e}else t==="center"?f=(c.left+c.right)/2-T+e:f=Fze(i,t,e);_=NEe(n,s,r),u=t==="left"?-Hl:Hl}return{titleX:f,titleY:_,maxWidth:h,rotation:u}}var Fb=class i extends TF{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return e=Ah(e,Number.POSITIVE_INFINITY),t=Ah(t,Number.NEGATIVE_INFINITY),n=Ah(n,Number.POSITIVE_INFINITY),r=Ah(r,Number.NEGATIVE_INFINITY),{min:Ah(e,n),max:Ah(t,r),minDefined:jl(e),maxDefined:jl(t)}}getMinMax(e){let{min:t,max:n,minDefined:r,maxDefined:o}=this.getUserBounds(),s;if(r&&o)return{min:t,max:n};let a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)s=a[l].controller.getMinMax(this,e),r||(t=Math.min(t,s.min)),o||(n=Math.max(n,s.max));return t=o&&t>n?n:t,n=r&&t>n?t:n,{min:Ah(t,Ah(n,t)),max:Ah(n,Ah(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ea(this.options.beforeUpdate,[this])}update(e,t,n){let{beginAtZero:r,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=gze(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a<this.ticks.length;this._convertTicksToLabels(l?Bze(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=Xkt(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,n;this.isHorizontal()?(t=this.left,n=this.right):(t=this.top,n=this.bottom,e=!e),this._startPixel=t,this._endPixel=n,this._reversePixels=e,this._length=n-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Ea(this.options.afterUpdate,[this])}beforeSetDimensions(){Ea(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Ea(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Ea(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Ea(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){let t=this.options.ticks,n,r,o;for(n=0,r=e.length;n<r;n++)o=e[n],o.label=Ea(t.callback,[o.value,n,e],this)}afterTickToLabelConversion(){Ea(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Ea(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let e=this.options,t=e.ticks,n=Uze(this.ticks.length,e.ticks.maxTicksLimit),r=t.minRotation||0,o=t.maxRotation,s=r,a,l,c;if(!this._isVisible()||!t.display||r>=o||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let d=this._getLabelSizes(),u=d.widest.width,h=d.highest.height,f=sE(this.chart.width-u,0,this.maxWidth);a=e.offset?this.maxWidth/n:f/(n-1),u+6>a&&(a=f/(n-(e.offset?.5:1)),l=this.maxHeight-EF(e.grid)-t.padding-Vze(e.title,this.chart.options.font),c=Math.sqrt(u*u+h*h),s=tK(Math.min(Math.asin(sE((d.highest.height+6)/a,-1,1)),Math.asin(sE(l/c,-1,1))-Math.asin(sE(h/c,-1,1)))),s=Math.max(r,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){Ea(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ea(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){let l=Vze(r,t.options.font);if(a?(e.width=this.maxWidth,e.height=EF(o)+l):(e.height=this.maxHeight,e.width=EF(o)+l),n.display&&this.ticks.length){let{first:c,last:d,widest:u,highest:h}=this._getLabelSizes(),f=n.padding*2,_=oE(this.labelRotation),p=Math.cos(_),T=Math.sin(_);if(a){let g=n.mirror?0:T*u.width+p*h.height;e.height=Math.min(this.maxHeight,e.height+g+f)}else{let g=n.mirror?0:p*u.width+T*h.height;e.width=Math.min(this.maxWidth,e.width+g+f)}this._calculatePadding(c,d,T,p)}}this._handleMargins(),a?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){let{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){let d=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1),h=0,f=0;l?c?(h=r*e.width,f=n*t.height):(h=n*e.height,f=r*t.width):o==="start"?f=t.width:o==="end"?h=e.width:o!=="inner"&&(h=e.width/2,f=t.width/2),this.paddingLeft=Math.max((h-d+s)*this.width/(this.width-d),0),this.paddingRight=Math.max((f-u+s)*this.width/(this.width-u),0)}else{let d=t.height/2,u=e.height/2;o==="start"?(d=0,u=e.height):o==="end"&&(d=t.height,u=0),this.paddingTop=d+s,this.paddingBottom=u+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ea(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,n;for(t=0,n=e.length;t<n;t++)pa(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){let t=this.options.ticks.sampleSize,n=this.ticks;t<n.length&&(n=Bze(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,n){let{ctx:r,_longestTextCache:o}=this,s=[],a=[],l=Math.floor(t/Uze(t,n)),c=0,d=0,u,h,f,_,p,T,g,y,w,L,P;for(u=0;u<t;u+=l){if(_=e[u].label,p=this._resolveTickFontOptions(u),r.font=T=p.string,g=o[T]=o[T]||{data:{},gc:[]},y=p.lineHeight,w=L=0,!pa(_)&&!ya(_))w=nF(r,g.data,g.gc,w,_),L=y;else if(ya(_))for(h=0,f=_.length;h<f;++h)P=_[h],!pa(P)&&!ya(P)&&(w=nF(r,g.data,g.gc,w,P),L+=y);s.push(w),a.push(L),c=Math.max(w,c),d=Math.max(L,d)}n3t(o,t);let V=s.indexOf(c),K=a.indexOf(d),G=z=>({width:s[z]||0,height:a[z]||0});return{first:G(0),last:G(t-1),widest:G(V),highest:G(K),widths:s,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return nze(this._alignToPixels?fC(this.chart,t,0):t)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&e<t.length){let n=t[e];return n.$context||(n.$context=o3t(this.getContext(),e,n))}return this.$context||(this.$context=r3t(this.chart.getContext(),this))}_tickSize(){let e=this.options.ticks,t=oE(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),o=this._getLabelSizes(),s=e.autoSkipPadding||0,a=o?o.widest.width+s:0,l=o?o.highest.height+s:0;return this.isHorizontal()?l*n>a*r?a/n:l/r:l*r<a*n?l/n:a/r}_isVisible(){let e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){let t=this.axis,n=this.chart,r=this.options,{grid:o,position:s,border:a}=r,l=o.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),h=EF(o),f=[],_=a.setContext(this.getContext()),p=_.display?_.width:0,T=p/2,g=function(Ce){return fC(n,Ce,p)},y,w,L,P,V,K,G,z,oe,x,J,fe;if(s==="top")y=g(this.bottom),K=this.bottom-h,z=y-T,x=g(e.top)+T,fe=e.bottom;else if(s==="bottom")y=g(this.top),x=e.top,fe=g(e.bottom)-T,K=y+T,z=this.top+h;else if(s==="left")y=g(this.right),V=this.right-h,G=y-T,oe=g(e.left)+T,J=e.right;else if(s==="right")y=g(this.left),oe=e.left,J=g(e.right)-T,V=y+T,G=this.left+h;else if(t==="x"){if(s==="center")y=g((e.top+e.bottom)/2+.5);else if(Io(s)){let Ce=Object.keys(s)[0],Te=s[Ce];y=g(this.chart.scales[Ce].getPixelForValue(Te))}x=e.top,fe=e.bottom,K=y+T,z=K+h}else if(t==="y"){if(s==="center")y=g((e.left+e.right)/2);else if(Io(s)){let Ce=Object.keys(s)[0],Te=s[Ce];y=g(this.chart.scales[Ce].getPixelForValue(Te))}V=y-T,G=V-h,oe=e.left,J=e.right}let _e=Js(r.ticks.maxTicksLimit,u),be=Math.max(1,Math.ceil(u/_e));for(w=0;w<u;w+=be){let Ce=this.getContext(w),Te=o.setContext(Ce),Le=a.setContext(Ce),ze=Te.lineWidth,lt=Te.color,Ke=Le.dash||[],te=Le.dashOffset,ce=Te.tickWidth,Ie=Te.tickColor,Ge=Te.tickBorderDash||[],Ve=Te.tickBorderDashOffset;L=i3t(this,w,l),L!==void 0&&(P=fC(n,L,ze),c?V=G=oe=J=P:K=z=x=fe=P,f.push({tx1:V,ty1:K,tx2:G,ty2:z,x1:oe,y1:x,x2:J,y2:fe,width:ze,color:lt,borderDash:Ke,borderDashOffset:te,tickWidth:ce,tickColor:Ie,tickBorderDash:Ge,tickBorderDashOffset:Ve}))}return this._ticksLength=u,this._borderValue=y,f}_computeLabelItems(e){let t=this.axis,n=this.options,{position:r,ticks:o}=n,s=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:d,mirror:u}=o,h=EF(n.grid),f=h+d,_=u?-d:f,p=-oE(this.labelRotation),T=[],g,y,w,L,P,V,K,G,z,oe,x,J,fe="middle";if(r==="top")V=this.bottom-_,K=this._getXAxisLabelAlignment();else if(r==="bottom")V=this.top+_,K=this._getXAxisLabelAlignment();else if(r==="left"){let be=this._getYAxisLabelAlignment(h);K=be.textAlign,P=be.x}else if(r==="right"){let be=this._getYAxisLabelAlignment(h);K=be.textAlign,P=be.x}else if(t==="x"){if(r==="center")V=(e.top+e.bottom)/2+f;else if(Io(r)){let be=Object.keys(r)[0],Ce=r[be];V=this.chart.scales[be].getPixelForValue(Ce)+f}K=this._getXAxisLabelAlignment()}else if(t==="y"){if(r==="center")P=(e.left+e.right)/2-f;else if(Io(r)){let be=Object.keys(r)[0],Ce=r[be];P=this.chart.scales[be].getPixelForValue(Ce)}K=this._getYAxisLabelAlignment(h).textAlign}t==="y"&&(l==="start"?fe="top":l==="end"&&(fe="bottom"));let _e=this._getLabelSizes();for(g=0,y=a.length;g<y;++g){w=a[g],L=w.label;let be=o.setContext(this.getContext(g));G=this.getPixelForTick(g)+o.labelOffset,z=this._resolveTickFontOptions(g),oe=z.lineHeight,x=ya(L)?L.length:1;let Ce=x/2,Te=be.color,Le=be.textStrokeColor,ze=be.textStrokeWidth,lt=K;s?(P=G,K==="inner"&&(g===y-1?lt=this.options.reverse?"left":"right":g===0?lt=this.options.reverse?"right":"left":lt="center"),r==="top"?c==="near"||p!==0?J=-x*oe+oe/2:c==="center"?J=-_e.highest.height/2-Ce*oe+oe:J=-_e.highest.height+oe/2:c==="near"||p!==0?J=oe/2:c==="center"?J=_e.highest.height/2-Ce*oe:J=_e.highest.height-x*oe,u&&(J*=-1),p!==0&&!be.showLabelBackdrop&&(P+=oe/2*Math.sin(p))):(V=G,J=(1-x)*oe/2);let Ke;if(be.showLabelBackdrop){let te=sg(be.backdropPadding),ce=_e.heights[g],Ie=_e.widths[g],Ge=J-te.top,Ve=0-te.left;switch(fe){case"middle":Ge-=ce/2;break;case"bottom":Ge-=ce;break}switch(K){case"center":Ve-=Ie/2;break;case"right":Ve-=Ie;break}Ke={left:Ve,top:Ge,width:Ie+te.width,height:ce+te.height,color:be.backdropColor}}T.push({label:L,font:z,textOffset:J,options:{rotation:p,color:Te,strokeColor:Le,strokeWidth:ze,textAlign:lt,textBaseline:fe,translation:[P,V],backdrop:Ke}})}return T}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-oE(this.labelRotation))return e==="top"?"left":"right";let r="center";return t.align==="start"?r="left":t.align==="end"?r="right":t.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(e){let{position:t,ticks:{crossAlign:n,mirror:r,padding:o}}=this.options,s=this._getLabelSizes(),a=e+o,l=s.widest.width,c,d;return t==="left"?r?(d=this.right+o,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-a,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d=this.left)):t==="right"?r?(d=this.left+o,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+a,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:n,top:r,width:o,height:s}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,o,s),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let r=this.ticks.findIndex(o=>o.value===e);return r>=0?t.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){let t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),o,s,a=(l,c,d)=>{!d.width||!d.color||(n.save(),n.lineWidth=d.width,n.strokeStyle=d.color,n.setLineDash(d.borderDash||[]),n.lineDashOffset=d.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(t.display)for(o=0,s=r.length;o<s;++o){let l=r[o];t.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){let{chart:e,ctx:t,options:{border:n,grid:r}}=this,o=n.setContext(this.getContext()),s=n.display?o.width:0;if(!s)return;let a=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,d,u,h;this.isHorizontal()?(c=fC(e,this.left,s)-s/2,d=fC(e,this.right,a)+a/2,u=h=l):(u=fC(e,this.top,s)-s/2,h=fC(e,this.bottom,a)+a/2,c=d=l),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(c,u),t.lineTo(d,h),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;let n=this.ctx,r=this._computeLabelArea();r&&yEe(n,r);let o=this.getLabelItems(e);for(let s of o){let a=s.options,l=s.font,c=s.label,d=s.textOffset;uF(n,c,0,d,l,a)}r&&bEe(n)}drawTitle(){let{ctx:e,options:{position:t,title:n,reverse:r}}=this;if(!n.display)return;let o=JI(n.font),s=sg(n.padding),a=n.align,l=o.lineHeight/2;t==="bottom"||t==="center"||Io(t)?(l+=s.bottom,ya(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=s.top;let{titleX:c,titleY:d,maxWidth:u,rotation:h}=a3t(this,l,t,a);uF(e,n.text,0,0,o,{color:n.color,maxWidth:u,rotation:h,textAlign:s3t(a,t,r),textBaseline:"middle",translation:[c,d]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){let e=this.options,t=e.ticks&&e.ticks.z||0,n=Js(e.grid&&e.grid.z,-1),r=Js(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==i.prototype.draw?[{z:t,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[],o,s;for(o=0,s=t.length;o<s;++o){let a=t[o];a[n]===this.id&&(!e||a.type===e)&&r.push(a)}return r}_resolveTickFontOptions(e){let t=this.options.ticks.setContext(this.getContext(e));return JI(t.font)}_maxDigits(){let e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}},xb=class{constructor(e,t,n){this.type=e,this.scope=t,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){let t=Object.getPrototypeOf(e),n;d3t(t)&&(n=this.register(t));let r=this.items,o=e.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in r||(r[o]=e,l3t(e,s,n),this.override&&La.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){let t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in La[r]&&(delete La[r][n],this.override&&delete hC[n])}};function l3t(i,e,t){let n=wb(Object.create(null),[t?La.get(t):{},La.get(e),i.defaults]);La.set(e,n),i.defaultRoutes&&c3t(e,i.defaultRoutes),i.descriptors&&La.describe(e,i.descriptors)}function c3t(i,e){Object.keys(e).forEach(t=>{let n=t.split("."),r=n.pop(),o=[i].concat(n).join("."),s=e[t].split("."),a=s.pop(),l=s.join(".");La.route(o,r,l,a)})}function d3t(i){return"id"in i&&"defaults"in i}var qEe=class{constructor(){this.controllers=new xb(dYe,"datasets",!0),this.elements=new xb(TF,"elements"),this.plugins=new xb(Object,"plugins"),this.scales=new xb(Fb,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,n){[...t].forEach(r=>{let o=n||this._getRegistryForType(r);n||o.isForType(r)||o===this.plugins&&r.id?this._exec(e,o,r):Qc(r,s=>{let a=n||this._getRegistryForType(s);this._exec(e,a,s)})})}_exec(e,t,n){let r=eK(e);Ea(n["before"+r],[],n),t[e](n),Ea(n["after"+r],[],n)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){let n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}_get(e,t,n){let r=t.get(e);if(r===void 0)throw new Error('"'+e+'" is not a registered '+n+".");return r}},ag=new qEe,XEe=class{constructor(){this._init=[]}notify(e,t,n,r){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));let o=r?this._descriptors(e).filter(r):this._descriptors(e),s=this._notify(o,e,t,n);return t==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),s}_notify(e,t,n,r){r=r||{};for(let o of e){let s=o.plugin,a=s[n],l=[t,r,o.options];if(Ea(a,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){pa(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){let n=e&&e.config,r=Js(n.options&&n.options.plugins,{}),o=u3t(n);return r===!1&&!t?[]:f3t(e,o,r,t)}_notifyStateChanges(e){let t=this._oldCache||[],n=this._cache,r=(o,s)=>o.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(r(t,n),e,"stop"),this._notify(r(n,t),e,"start")}};function u3t(i){let e={},t=[],n=Object.keys(ag.plugins.items);for(let o=0;o<n.length;o++)t.push(ag.getPlugin(n[o]));let r=i.plugins||[];for(let o=0;o<r.length;o++){let s=r[o];t.indexOf(s)===-1&&(t.push(s),e[s.id]=!0)}return{plugins:t,localIds:e}}function h3t(i,e){return!e&&i===!1?null:i===!0?{}:i}function f3t(i,{plugins:e,localIds:t},n,r){let o=[],s=i.getContext();for(let a of e){let l=a.id,c=h3t(n[l],r);c!==null&&o.push({plugin:a,options:_3t(i.config,{plugin:a,local:t[l]},c,s)})}return o}function _3t(i,{plugin:e,local:t},n,r){let o=i.pluginScopeKeys(e),s=i.getOptionScopes(n,o);return t&&e.defaults&&s.push(e.defaults),i.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ZEe(i,e){let t=La.datasets[i]||{};return((e.datasets||{})[i]||{}).indexAxis||e.indexAxis||t.indexAxis||"x"}function p3t(i,e){let t=i;return i==="_index_"?t=e:i==="_value_"&&(t=e==="x"?"y":"x"),t}function E3t(i,e){return i===e?"_index_":"_value_"}function Gze(i){if(i==="x"||i==="y"||i==="r")return i}function m3t(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function QEe(i,...e){if(Gze(i))return i;for(let t of e){let n=t.axis||m3t(t.position)||i.length>1&&Gze(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function Hze(i,e,t){if(t[e+"AxisID"]===i)return{axis:e}}function g3t(i,e){if(e.data&&e.data.datasets){let t=e.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(t.length)return Hze(i,"x",t[0])||Hze(i,"y",t[0])}return{}}function A3t(i,e){let t=hC[i.type]||{scales:{}},n=e.scales||{},r=ZEe(i.type,e),o=Object.create(null);return Object.keys(n).forEach(s=>{let a=n[s];if(!Io(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);let l=QEe(s,a,g3t(s,i),La.scales[a.type]),c=E3t(l,r),d=t.scales||{};o[s]=Pb(Object.create(null),[{axis:l},a,d[l],d[c]])}),i.data.datasets.forEach(s=>{let a=s.type||i.type,l=s.indexAxis||ZEe(a,e),d=(hC[a]||{}).scales||{};Object.keys(d).forEach(u=>{let h=p3t(u,l),f=s[h+"AxisID"]||h;o[f]=o[f]||Object.create(null),Pb(o[f],[{axis:h},n[f],d[u]])})}),Object.keys(o).forEach(s=>{let a=o[s];Pb(a,[La.scales[a.type],La.scale])}),o}function EYe(i){let e=i.options||(i.options={});e.plugins=Js(e.plugins,{}),e.scales=A3t(i,e)}function mYe(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function T3t(i){return i=i||{},i.data=mYe(i.data),EYe(i),i}var Wze=new Map,gYe=new Set;function hK(i,e){let t=Wze.get(i);return t||(t=e(),Wze.set(i,t),gYe.add(t)),t}var mF=(i,e,t)=>{let n=Mb(e,t);n!==void 0&&i.add(n)},JEe=class{constructor(e){this._config=T3t(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=mYe(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),EYe(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return hK(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return hK(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return hK(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){let t=e.id,n=this.type;return hK(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,r=n.get(e);return(!r||t)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){let{options:r,type:o}=this,s=this._cachedScopes(e,n),a=s.get(t);if(a)return a;let l=new Set;t.forEach(d=>{e&&(l.add(e),d.forEach(u=>mF(l,e,u))),d.forEach(u=>mF(l,r,u)),d.forEach(u=>mF(l,hC[o]||{},u)),d.forEach(u=>mF(l,La,u)),d.forEach(u=>mF(l,rK,u))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),gYe.has(t)&&s.set(t,c),c}chartOptionScopes(){let{options:e,type:t}=this;return[e,hC[t]||{},La.datasets[t]||{},{type:t},La,rK]}resolveNamedOptions(e,t,n,r=[""]){let o={$shared:!0},{resolver:s,subPrefixes:a}=jze(this._resolverCache,e,r),l=s;if(C3t(s,t)){o.$shared=!1,n=fA(n)?n():n;let c=this.createResolver(e,n,a);l=ZI(s,n,c)}for(let c of t)o[c]=l[c];return o}createResolver(e,t,n=[""],r){let{resolver:o}=jze(this._resolverCache,e,n);return Io(t)?ZI(o,t,void 0,r):o}};function jze(i,e,t){let n=i.get(e);n||(n=new Map,i.set(e,n));let r=t.join(),o=n.get(r);return o||(o={resolver:sK(e,t),subPrefixes:t.filter(a=>!a.toLowerCase().includes("hover"))},n.set(r,o)),o}var S3t=i=>Io(i)&&Object.getOwnPropertyNames(i).reduce((e,t)=>e||fA(i[t]),!1);function C3t(i,e){let{isScriptable:t,isIndexable:n}=LEe(i);for(let r of e){let o=t(r),s=n(r),a=(s||o)&&i[r];if(o&&(fA(a)||S3t(a))||s&&ya(a))return!0}return!1}var R3t="4.3.0",O3t=["top","bottom","left","right","chartArea"];function zze(i,e){return i==="top"||i==="bottom"||O3t.indexOf(i)===-1&&e==="x"}function Yze(i,e){return function(t,n){return t[i]===n[i]?t[e]-n[e]:t[i]-n[i]}}function Kze(i){let e=i.chart,t=e.options.animation;e.notifyPlugins("afterRender"),Ea(t&&t.onComplete,[i],e)}function I3t(i){let e=i.chart,t=e.options.animation;Ea(t&&t.onProgress,[i],e)}function AYe(i){return MEe()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var pK={},qze=i=>{let e=AYe(i);return Object.values(pK).filter(t=>t.canvas===e).pop()};function N3t(i,e,t){let n=Object.keys(i);for(let r of n){let o=+r;if(o>=e){let s=i[r];delete i[r],(t>0||o>e)&&(i[o+t]=s)}}}function v3t(i,e,t,n){return!t||i.type==="mouseout"?null:n?e:i}function D3t(i){let{xScale:e,yScale:t}=i;if(e&&t)return{left:e.left,right:e.right,top:t.top,bottom:t.bottom}}var TK=(()=>{class i{static defaults=La;static instances=pK;static overrides=hC;static registry=ag;static version=R3t;static getChart=qze;static register(...t){ag.add(...t),Xze()}static unregister(...t){ag.remove(...t),Xze()}constructor(t,n){let r=this.config=new JEe(n),o=AYe(t),s=qze(o);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");let a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||qkt(o)),this.platform.updateConfig(r);let l=this.platform.acquireContext(o,a.aspectRatio),c=l&&l.canvas,d=c&&c.height,u=c&&c.width;if(this.id=Qje(),this.ctx=l,this.canvas=c,this.width=u,this.height=d,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new XEe,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=dze(h=>this.update(h),a.resizeDelay||0),this._dataChanges=[],pK[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}pA.listen(this,"complete",Kze),pA.listen(this,"progress",I3t),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:o,_aspectRatio:s}=this;return pa(t)?n&&s?s:o?r/o:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ag}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():kEe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return DEe(this.canvas,this.ctx),this}stop(){return pA.stop(this),this}resize(t,n){pA.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){let r=this.options,o=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(o,t,n,s),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,kEe(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),Ea(r.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let n=this.options.scales||{};Qc(n,(r,o)=>{r.id=o})}buildOrUpdateScales(){let t=this.options,n=t.scales,r=this.scales,o=Object.keys(r).reduce((a,l)=>(a[l]=!1,a),{}),s=[];n&&(s=s.concat(Object.keys(n).map(a=>{let l=n[a],c=QEe(a,l),d=c==="r",u=c==="x";return{options:l,dposition:d?"chartArea":u?"bottom":"left",dtype:d?"radialLinear":u?"category":"linear"}}))),Qc(s,a=>{let l=a.options,c=l.id,d=QEe(c,l),u=Js(l.type,a.dtype);(l.position===void 0||zze(l.position,d)!==zze(a.dposition))&&(l.position=a.dposition),o[c]=!0;let h=null;if(c in r&&r[c].type===u)h=r[c];else{let f=ag.getScale(u);h=new f({id:c,type:u,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(l,t)}),Qc(o,(a,l)=>{a||delete r[l]}),Qc(r,a=>{dK.configure(this,a,a.options),dK.addBox(this,a)})}_updateMetasets(){let t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((o,s)=>o.index-s.index),r>n){for(let o=n;o<r;++o)this._destroyDatasetMeta(o);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Yze("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,o)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){let t=[],n=this.data.datasets,r,o;for(this._removeUnreferencedMetasets(),r=0,o=n.length;r<o;r++){let s=n[r],a=this.getDatasetMeta(r),l=s.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=l,a.indexAxis=s.indexAxis||ZEe(l,this.options),a.order=s.order||0,a.index=r,a.label=""+s.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{let c=ag.getController(l),{datasetElementType:d,dataElementType:u}=La.datasets[l];Object.assign(c,{dataElementType:ag.getElement(u),datasetElementType:d&&ag.getElement(d)}),a.controller=new c(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Qc(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let n=this.config;n.update();let r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let d=0,u=this.data.datasets.length;d<u;d++){let{controller:h}=this.getDatasetMeta(d),f=!o&&s.indexOf(h)===-1;h.buildOrUpdateElements(f),a=Math.max(+h.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),o||Qc(s,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Yze("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){Qc(this.scales,t=>{dK.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!gEe(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(let{method:r,start:o,count:s}of n){let a=r==="_removeElements"?-s:s;N3t(t,o,a)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let n=this.data.datasets.length,r=s=>new Set(t.filter(a=>a[0]===s).map((a,l)=>l+","+a.splice(1).join(","))),o=r(0);for(let s=1;s<n;s++)if(!gEe(o,r(s)))return;return Array.from(o).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;dK.update(this,this.width,this.height,t);let n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Qc(this.boxes,o=>{r&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,s)=>{o._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,fA(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){let r=this.getDatasetMeta(t),o={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(r.controller._update(n),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(pA.has(this)?this.attached&&!pA.running(this)&&pA.start(this):(this.draw(),Kze({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:r,height:o}=this._resizeBeforeDraw;this._resize(r,o),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let n=this._sortedMetasets,r=[],o,s;for(o=0,s=n.length;o<s;++o){let a=n[o];(!t||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let n=this.ctx,r=t._clip,o=!r.disabled,s=D3t(t)||this.chartArea,a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(o&&yEe(n,{left:r.left===!1?0:s.left-r.left,right:r.right===!1?this.width:s.right+r.right,top:r.top===!1?0:s.top-r.top,bottom:r.bottom===!1?this.height:s.bottom+r.bottom}),t.controller.draw(),o&&bEe(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return QI(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,o){let s=ykt.modes[n];return typeof s=="function"?s(this,t,r,o):[]}getDatasetMeta(t){let n=this.data.datasets[t],r=this._metasets,o=r.filter(s=>s&&s._dataset===n).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(o)),o}getContext(){return this.$context||(this.$context=$I(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let n=this.data.datasets[t];if(!n)return!1;let r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){let r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){let o=r?"show":"hide",s=this.getDatasetMeta(t),a=s.controller._resolveAnimations(void 0,o);rF(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(s,{visible:r}),this.update(l=>l.datasetIndex===t?o:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){let n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),pA.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),DEe(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete pK[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,n=this.platform,r=(s,a)=>{n.addEventListener(this,s,a),t[s]=a},o=(s,a,l)=>{s.offsetX=a,s.offsetY=l,this._eventHandler(s)};Qc(this.options.events,s=>r(s,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,n=this.platform,r=(c,d)=>{n.addEventListener(this,c,d),t[c]=d},o=(c,d)=>{t[c]&&(n.removeEventListener(this,c,d),delete t[c])},s=(c,d)=>{this.canvas&&this.resize(c,d)},a,l=()=>{o("attach",l),this.attached=!0,this.resize(),r("resize",s),r("detach",a)};a=()=>{this.attached=!1,o("resize",s),this._stop(),this._resize(0,0),r("attach",l)},n.isAttached(this.canvas)?l():a()}unbindEvents(){Qc(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Qc(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){let o=r?"set":"remove",s,a,l,c;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+o+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){a=t[l];let d=a&&this.getDatasetMeta(a.datasetIndex).controller;d&&d[o+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let n=this._active||[],r=t.map(({datasetIndex:s,index:a})=>{let l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[a],index:a}});!mEe(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){let o=this.options.hover,s=(c,d)=>c.filter(u=>!d.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),a=s(n,t),l=r?t:s(t,n);a.length&&this.updateHoverStyle(a,o.mode,!1),l.length&&o.mode&&this.updateHoverStyle(l,o.mode,!0)}_eventHandler(t,n){let r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},o=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,o)===!1)return;let s=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,o),(s||r.changed)&&this.render(),this}_handleEvent(t,n,r){let{_active:o=[],options:s}=this,a=n,l=this._getActiveElements(t,o,r,a),c=eze(t),d=v3t(t,this._lastEvent,r,c);r&&(this._lastEvent=null,Ea(s.onHover,[t,l,this],this),c&&Ea(s.onClick,[t,l,this],this));let u=!mEe(l,o);return(u||n)&&(this._active=l,this._updateHoverStyles(l,o,n)),this._lastEvent=d,u}_getActiveElements(t,n,r,o){if(t.type==="mouseout")return[];if(!r)return n;let s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,o)}}return i})();function Xze(){return Qc(TK.instances,i=>i._plugins.invalidate())}function y3t(i,e,t){let{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e,c=r/a;i.beginPath(),i.arc(o,s,a,n-c,t+c),l>r?(c=r/l,i.arc(o,s,l,t+c,n-c,!0)):i.arc(o,s,r,t+Hl,n-Hl),i.closePath(),i.clip()}function b3t(i){return oK(i,["outerStart","outerEnd","innerStart","innerEnd"])}function L3t(i,e,t,n){let r=b3t(i.options.borderRadius),o=(t-e)/2,s=Math.min(o,n*e/2),a=l=>{let c=(t-Math.min(o,l))*n/2;return sE(l,0,Math.min(o,c))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:sE(r.innerStart,0,s),innerEnd:sE(r.innerEnd,0,s)}}function kb(i,e,t,n){return{x:t+i*Math.cos(e),y:n+i*Math.sin(e)}}function gK(i,e,t,n,r,o){let{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:d}=e,u=Math.max(e.outerRadius+n+t-c,0),h=d>0?d+n+t+c:0,f=0,_=r-l;if(n){let be=d>0?d-n:0,Ce=u>0?u-n:0,Te=(be+Ce)/2,Le=Te!==0?_*Te/(Te+n):_;f=(_-Le)/2}let p=Math.max(.001,_*u-t/Wl)/u,T=(_-p)/2,g=l+T+f,y=r-T-f,{outerStart:w,outerEnd:L,innerStart:P,innerEnd:V}=L3t(e,h,u,y-g),K=u-w,G=u-L,z=g+w/K,oe=y-L/G,x=h+P,J=h+V,fe=g+P/x,_e=y-V/J;if(i.beginPath(),o){let be=(z+oe)/2;if(i.arc(s,a,u,z,be),i.arc(s,a,u,be,oe),L>0){let ze=kb(G,oe,s,a);i.arc(ze.x,ze.y,L,oe,y+Hl)}let Ce=kb(J,y,s,a);if(i.lineTo(Ce.x,Ce.y),V>0){let ze=kb(J,_e,s,a);i.arc(ze.x,ze.y,V,y+Hl,_e+Math.PI)}let Te=(y-V/h+(g+P/h))/2;if(i.arc(s,a,h,y-V/h,Te,!0),i.arc(s,a,h,Te,g+P/h,!0),P>0){let ze=kb(x,fe,s,a);i.arc(ze.x,ze.y,P,fe+Math.PI,g-Hl)}let Le=kb(K,g,s,a);if(i.lineTo(Le.x,Le.y),w>0){let ze=kb(K,z,s,a);i.arc(ze.x,ze.y,w,g-Hl,z)}}else{i.moveTo(s,a);let be=Math.cos(z)*u+s,Ce=Math.sin(z)*u+a;i.lineTo(be,Ce);let Te=Math.cos(oe)*u+s,Le=Math.sin(oe)*u+a;i.lineTo(Te,Le)}i.closePath()}function w3t(i,e,t,n,r){let{fullCircles:o,startAngle:s,circumference:a}=e,l=e.endAngle;if(o){gK(i,e,t,n,l,r);for(let c=0;c<o;++c)i.fill();isNaN(a)||(l=s+(a%ba||ba))}return gK(i,e,t,n,l,r),i.fill(),l}function P3t(i,e,t,n,r){let{fullCircles:o,startAngle:s,circumference:a,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:u,borderDashOffset:h}=l,f=l.borderAlign==="inner";if(!c)return;i.setLineDash(u||[]),i.lineDashOffset=h,f?(i.lineWidth=c*2,i.lineJoin=d||"round"):(i.lineWidth=c,i.lineJoin=d||"bevel");let _=e.endAngle;if(o){gK(i,e,t,n,_,r);for(let p=0;p<o;++p)i.stroke();isNaN(a)||(_=s+(a%ba||ba))}f&&y3t(i,e,_),o||(gK(i,e,t,n,_,r),i.stroke())}var AK=class extends TF{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){let r=this.getProps(["x","y"],n),{angle:o,distance:s}=CEe(r,{x:e,y:t}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:d,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),h=(this.options.spacing+this.options.borderWidth)/2,_=Js(u,l-a)>=ba||lF(o,a,l),p=rze(s,c+h,d+h);return _&&p}getCenterPoint(e){let{x:t,y:n,startAngle:r,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:c}=this.options,d=(r+o)/2,u=(s+a+c+l)/2;return{x:t+Math.cos(d)*u,y:n+Math.sin(d)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:n}=this,r=(t.offset||0)/4,o=(t.spacing||0)/2,s=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=n>ba?Math.floor(n/ba):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*r,Math.sin(a)*r);let l=1-Math.sin(Math.min(Wl,n||0)),c=r*l;e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,w3t(e,this,c,o,s),P3t(e,this,c,o,s),e.restore()}};function M3t(i,e){let t=[],{bounds:r,step:o,min:s,max:a,precision:l,count:c,maxTicks:d,maxDigits:u,includeBounds:h}=i,f=o||1,_=d-1,{min:p,max:T}=e,g=!pa(s),y=!pa(a),w=!pa(c),L=(T-p)/(u+1),P=AEe((T-p)/_/f)*f,V,K,G,z;if(P<1e-14&&!g&&!y)return[{value:p},{value:T}];z=Math.ceil(T/P)-Math.floor(p/P),z>_&&(P=AEe(z*P/_/f)*f),pa(l)||(V=Math.pow(10,l),P=Math.ceil(P*V)/V),r==="ticks"?(K=Math.floor(p/P)*P,G=Math.ceil(T/P)*P):(K=p,G=T),g&&y&&o&&ize((a-s)/o,P/1e3)?(z=Math.round(Math.min((a-s)/P,d)),P=(a-s)/z,K=s,G=a):w?(K=g?s:K,G=y?a:G,z=c-1,P=(G-K)/z):(z=(G-K)/P,sF(z,Math.round(z),P/1e3)?z=Math.round(z):z=Math.ceil(z));let oe=Math.max(SEe(P),SEe(K));V=Math.pow(10,pa(l)?oe:l),K=Math.round(K*V)/V,G=Math.round(G*V)/V;let x=0;for(g&&(h&&K!==s?(t.push({value:s}),K<s&&x++,sF(Math.round((K+x*P)*V)/V,s,Zze(s,L,i))&&x++):K<s&&x++);x<z;++x){let J=Math.round((K+x*P)*V)/V;if(y&&J>a)break;t.push({value:J})}return y&&h&&G!==a?t.length&&sF(t[t.length-1].value,a,Zze(a,L,i))?t[t.length-1].value=a:t.push({value:a}):(!y||G===a)&&t.push({value:G}),t}function Zze(i,e,{horizontal:t,minRotation:n}){let r=oE(n),o=(t?Math.sin(r):Math.cos(r))||.001,s=.75*e*(""+i).length;return Math.min(e/o,s)}var Ub=class extends Fb{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return pa(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:r,max:o}=this,s=l=>r=t?r:l,a=l=>o=n?o:l;if(e){let l=oF(r),c=oF(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(r===o){let l=o===0?1:Math.abs(o*.05);a(o+l),e||s(r-l)}this.min=r,this.max=o}getTickLimit(){let e=this.options.ticks,{maxTicksLimit:t,stepSize:n}=e,r;return n?(r=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),t=t||11),t&&(r=Math.min(t,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let e=this.options,t=e.ticks,n=this.getTickLimit();n=Math.max(2,n);let r={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},o=this._range||this,s=M3t(r,o);return e.bounds==="ticks"&&TEe(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){let e=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){let r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return cF(e,this.chart.options.locale,this.options.ticks.format)}},Qze=class extends Ub{static id="linear";static defaults={ticks:{callback:dF.formatters.numeric}};determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=jl(e)?e:0,this.max=jl(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),t=e?this.width:this.height,n=oE(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}},SF=i=>Math.floor(_A(i)),tN=(i,e)=>Math.pow(10,SF(i)+e);function Jze(i){return i/Math.pow(10,SF(i))===1}function $ze(i,e,t){let n=Math.pow(10,t),r=Math.floor(i/n);return Math.ceil(e/n)-r}function k3t(i,e){let t=e-i,n=SF(t);for(;$ze(i,e,n)>10;)n++;for(;$ze(i,e,n)<10;)n--;return Math.min(n,SF(i))}function x3t(i,{min:e,max:t}){e=Ah(i.min,e);let n=[],r=SF(e),o=k3t(e,t),s=o<0?Math.pow(10,Math.abs(o)):1,a=Math.pow(10,o),l=r>o?Math.pow(10,r):0,c=Math.round((e-l)*s)/s,d=Math.floor((e-l)/a/10)*a*10,u=Math.floor((c-d)/Math.pow(10,o)),h=Ah(i.min,Math.round((l+d+u*Math.pow(10,o))*s)/s);for(;h<t;)n.push({value:h,major:Jze(h),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(o++,u=2,s=o>=0?1:s),h=Math.round((l+d+u*Math.pow(10,o))*s)/s;let f=Ah(i.max,h);return n.push({value:f,major:Jze(f),significand:u}),n}var eYe=class extends Fb{static id="logarithmic";static defaults={ticks:{callback:dF.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){let n=Ub.prototype.parse.apply(this,[e,t]);if(n===0){this._zero=!0;return}return jl(n)&&n>0?n:null}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=jl(e)?Math.max(0,e):null,this.max=jl(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!jl(this._userMin)&&(this.min=e===tN(this.min,0)?tN(this.min,-1):tN(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),n=this.min,r=this.max,o=a=>n=e?n:a,s=a=>r=t?r:a;n===r&&(n<=0?(o(1),s(10)):(o(tN(n,-1)),s(tN(r,1)))),n<=0&&o(tN(r,-1)),r<=0&&s(tN(n,1)),this.min=n,this.max=r}buildTicks(){let e=this.options,t={min:this._userMin,max:this._userMax},n=x3t(t,this);return e.bounds==="ticks"&&TEe(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return e===void 0?"0":cF(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=_A(e),this._valueRange=_A(this.max)-_A(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(_A(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}};function $Ee(i){let e=i.ticks;if(e.display&&i.display){let t=sg(e.backdropPadding);return Js(e.font&&e.font.size,La.font.size)+t.height}return 0}function F3t(i,e,t){return t=ya(t)?t:[t],{w:_ze(i,e.string,t),h:t.length*e.lineHeight}}function tYe(i,e,t,n,r){return i===n||i===r?{start:e-t/2,end:e+t/2}:i<n||i>r?{start:e-t,end:e}:{start:e,end:e+t}}function U3t(i){let e={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},t=Object.assign({},e),n=[],r=[],o=i._pointLabels.length,s=i.options.pointLabels,a=s.centerPointLabels?Wl/o:0;for(let l=0;l<o;l++){let c=s.setContext(i.getPointLabelContext(l));r[l]=c.padding;let d=i.getPointPosition(l,i.drawingArea+r[l],a),u=JI(c.font),h=F3t(i.ctx,u,i._pointLabels[l]);n[l]=h;let f=rE(i.getIndexAngle(l)+a),_=Math.round(tK(f)),p=tYe(_,d.x,h.w,0,180),T=tYe(_,d.y,h.h,90,270);B3t(t,e,f,p,T)}i.setCenterPoint(e.l-t.l,t.r-e.r,e.t-t.t,t.b-e.b),i._pointLabelItems=H3t(i,n,r)}function B3t(i,e,t,n,r){let o=Math.abs(Math.sin(t)),s=Math.abs(Math.cos(t)),a=0,l=0;n.start<e.l?(a=(e.l-n.start)/o,i.l=Math.min(i.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/o,i.r=Math.max(i.r,e.r+a)),r.start<e.t?(l=(e.t-r.start)/s,i.t=Math.min(i.t,e.t-l)):r.end>e.b&&(l=(r.end-e.b)/s,i.b=Math.max(i.b,e.b+l))}function V3t(i,e,t){let n=i.drawingArea,{extra:r,additionalAngle:o,padding:s,size:a}=t,l=i.getPointPosition(e,n+r+s,o),c=Math.round(tK(rE(l.angle+Hl))),d=z3t(l.y,a.h,c),u=W3t(c),h=j3t(l.x,a.w,u);return{visible:!0,x:l.x,y:d,textAlign:u,left:h,top:d,right:h+a.w,bottom:d+a.h}}function G3t(i,e){if(!e)return!0;let{left:t,top:n,right:r,bottom:o}=i;return!(QI({x:t,y:n},e)||QI({x:t,y:o},e)||QI({x:r,y:n},e)||QI({x:r,y:o},e))}function H3t(i,e,t){let n=[],r=i._pointLabels.length,o=i.options,{centerPointLabels:s,display:a}=o.pointLabels,l={extra:$Ee(o)/2,additionalAngle:s?Wl/r:0},c;for(let d=0;d<r;d++){l.padding=t[d],l.size=e[d];let u=V3t(i,d,l);n.push(u),a==="auto"&&(u.visible=G3t(u,c),u.visible&&(c=u))}return n}function W3t(i){return i===0||i===180?"center":i<180?"left":"right"}function j3t(i,e,t){return t==="right"?i-=e:t==="center"&&(i-=e/2),i}function z3t(i,e,t){return t===90||t===270?i-=e/2:(t>270||t<90)&&(i-=e),i}function Y3t(i,e,t){let{left:n,top:r,right:o,bottom:s}=t,{backdropColor:a}=e;if(!pa(a)){let l=mze(e.borderRadius),c=sg(e.backdropPadding);i.fillStyle=a;let d=n-c.left,u=r-c.top,h=o-n+c.width,f=s-r+c.height;Object.values(l).some(_=>_!==0)?(i.beginPath(),pze(i,{x:d,y:u,w:h,h:f,radius:l}),i.fill()):i.fillRect(d,u,h,f)}}function K3t(i,e){let{ctx:t,options:{pointLabels:n}}=i;for(let r=e-1;r>=0;r--){let o=i._pointLabelItems[r];if(!o.visible)continue;let s=n.setContext(i.getPointLabelContext(r));Y3t(t,s,o);let a=JI(s.font),{x:l,y:c,textAlign:d}=o;uF(t,i._pointLabels[r],l,c+a.lineHeight/2,a,{color:s.color,textAlign:d,textBaseline:"middle"})}}function TYe(i,e,t,n){let{ctx:r}=i;if(t)r.arc(i.xCenter,i.yCenter,e,0,ba);else{let o=i.getPointPosition(0,e);r.moveTo(o.x,o.y);for(let s=1;s<n;s++)o=i.getPointPosition(s,e),r.lineTo(o.x,o.y)}}function q3t(i,e,t,n,r){let o=i.ctx,s=e.circular,{color:a,lineWidth:l}=e;!s&&!n||!a||!l||t<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(r.dash),o.lineDashOffset=r.dashOffset,o.beginPath(),TYe(i,t,s,n),o.closePath(),o.stroke(),o.restore())}function X3t(i,e,t){return $I(i,{label:t,index:e,type:"pointLabel"})}var iYe=class extends Ub{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:dF.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let e=this._padding=sg($Ee(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!1);this.min=jl(e)&&!isNaN(e)?e:0,this.max=jl(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/$Ee(this.options))}generateTickLabels(e){Ub.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,n)=>{let r=Ea(this.options.pointLabels.callback,[t,n],this);return r||r===0?r:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){let e=this.options;e.display&&e.pointLabels.display?U3t(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}getIndexAngle(e){let t=ba/(this._pointLabels.length||1),n=this.options.startAngle||0;return rE(e*t+oE(n))}getDistanceFromCenterForValue(e){if(pa(e))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(pa(e))return NaN;let t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){let t=this._pointLabels||[];if(e>=0&&e<t.length){let n=t[e];return X3t(this.getContext(),e,n)}}getPointPosition(e,t,n=0){let r=this.getIndexAngle(e)-Hl+n;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){let{left:t,top:n,right:r,bottom:o}=this._pointLabelItems[e];return{left:t,top:n,right:r,bottom:o}}drawBackground(){let{backgroundColor:e,grid:{circular:t}}=this.options;if(e){let n=this.ctx;n.save(),n.beginPath(),TYe(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){let e=this.ctx,t=this.options,{angleLines:n,grid:r,border:o}=t,s=this._pointLabels.length,a,l,c;if(t.pointLabels.display&&K3t(this,s),r.display&&this.ticks.forEach((d,u)=>{if(u!==0){l=this.getDistanceFromCenterForValue(d.value);let h=this.getContext(u),f=r.setContext(h),_=o.setContext(h);q3t(this,f,l,s,_)}}),n.display){for(e.save(),a=s-1;a>=0;a--){let d=n.setContext(this.getPointLabelContext(a)),{color:u,lineWidth:h}=d;!h||!u||(e.lineWidth=h,e.strokeStyle=u,e.setLineDash(d.borderDash),e.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let r=this.getIndexAngle(0),o,s;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!t.reverse)return;let c=n.setContext(this.getContext(l)),d=JI(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=d.string,s=e.measureText(a.label).width,e.fillStyle=c.backdropColor;let u=sg(c.backdropPadding);e.fillRect(-s/2-u.left,-o-d.size/2-u.top,s+u.width,d.size+u.height)}uF(e,a.label,0,-o,d,{color:c.color})}),e.restore()}drawTitle(){}},SK={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Th=Object.keys(SK);function Z3t(i,e){return i-e}function nYe(i,e){if(pa(e))return null;let t=i._adapter,{parser:n,round:r,isoWeekday:o}=i._parseOpts,s=e;return typeof n=="function"&&(s=n(s)),jl(s)||(s=typeof n=="string"?t.parse(s,n):t.parse(s)),s===null?null:(r&&(s=r==="week"&&(aF(o)||o===!0)?t.startOf(s,"isoWeek",o):t.startOf(s,r)),+s)}function rYe(i,e,t,n){let r=Th.length;for(let o=Th.indexOf(i);o<r-1;++o){let s=SK[Th[o]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((t-e)/(a*s.size))<=n)return Th[o]}return Th[r-1]}function Q3t(i,e,t,n,r){for(let o=Th.length-1;o>=Th.indexOf(t);o--){let s=Th[o];if(SK[s].common&&i._adapter.diff(r,n,s)>=e-1)return s}return Th[t?Th.indexOf(t):0]}function J3t(i){for(let e=Th.indexOf(i)+1,t=Th.length;e<t;++e)if(SK[Th[e]].common)return Th[e]}function oYe(i,e,t){if(!t)i[e]=!0;else if(t.length){let{lo:n,hi:r}=iK(t,e),o=t[n]>=e?t[n]:t[r];i[o]=!0}}function $3t(i,e,t,n){let r=i._adapter,o=+r.startOf(e[0].value,n),s=e[e.length-1].value,a,l;for(a=o;a<=s;a=+r.add(a,1,n))l=t[a],l>=0&&(e[l].major=!0);return e}function sYe(i,e,t){let n=[],r={},o=e.length,s,a;for(s=0;s<o;++s)a=e[s],r[a]=s,n.push({value:a,major:!1});return o===0||!t?n:$3t(i,n,r,t)}var aYe=(()=>{class i extends Fb{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){let r=t.time||(t.time={}),o=this._adapter=new Okt._date(t.adapters.date);o.init(n),Pb(r.displayFormats,o.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:nYe(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,n=this._adapter,r=t.time.unit||"day",{min:o,max:s,minDefined:a,maxDefined:l}=this.getUserBounds();function c(d){!a&&!isNaN(d.min)&&(o=Math.min(o,d.min)),!l&&!isNaN(d.max)&&(s=Math.max(s,d.max))}(!a||!l)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),o=jl(o)&&!isNaN(o)?o:+n.startOf(Date.now(),r),s=jl(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(o,s-1),this.max=Math.max(o+1,s)}_getLabelBounds(){let t=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){let t=this.options,n=t.time,r=t.ticks,o=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let s=this.min,a=this.max,l=sze(o,s,a);return this._unit=n.unit||(r.autoSkip?rYe(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):Q3t(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:J3t(this._unit),this.initOffsets(o),t.reverse&&l.reverse(),sYe(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,o,s;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),t.length===1?n=1-o:n=(this.getDecimalForValue(t[1])-o)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?r=s:r=(s-this.getDecimalForValue(t[t.length-2]))/2);let a=t.length<3?.5:.25;n=sE(n,0,a),r=sE(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){let t=this._adapter,n=this.min,r=this.max,o=this.options,s=o.time,a=s.unit||rYe(s.minUnit,n,r,this._getLabelCapacity(n)),l=Js(o.ticks.stepSize,1),c=a==="week"?s.isoWeekday:!1,d=aF(c)||c===!0,u={},h=n,f,_;if(d&&(h=+t.startOf(h,"isoWeek",c)),h=+t.startOf(h,d?"day":a),t.diff(r,n,a)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+a);let p=o.ticks.source==="data"&&this.getDataTimestamps();for(f=h,_=0;f<r;f=+t.add(f,l,a),_++)oYe(u,f,p);return(f===r||o.bounds==="ticks"||_===1)&&oYe(u,f,p),Object.keys(u).sort((T,g)=>T-g).map(T=>+T)}getLabelForValue(t){let n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){let o=this.options.time.displayFormats,s=this._unit,a=n||o[s];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,o){let s=this.options,a=s.ticks.callback;if(a)return Ea(a,[t,n,r],this);let l=s.time.displayFormats,c=this._unit,d=this._majorUnit,u=c&&l[c],h=d&&l[d],f=r[n],_=d&&h&&f&&f.major;return this._adapter.format(t,o||(_?h:u))}generateTickLabels(t){let n,r,o;for(n=0,r=t.length;n<r;++n)o=t[n],o.label=this._tickFormatFunction(o.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){let n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){let n=this.options.ticks,r=this.ctx.measureText(t).width,o=oE(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(o),a=Math.sin(o),l=this._resolveTickFontOptions(0).size;return{w:r*s+l*a,h:r*a+l*s}}_getLabelCapacity(t){let n=this.options.time,r=n.displayFormats,o=r[n.unit]||r.millisecond,s=this._tickFormatFunction(t,0,sYe(this,[t],this._majorUnit),o),a=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return l>0?l:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,r=o.length;n<r;++n)t=t.concat(o[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],n,r;if(t.length)return t;let o=this.getLabels();for(n=0,r=o.length;n<r;++n)t.push(nYe(this,o[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return cze(t.sort(Z3t))}}return i})();function fK(i,e,t){let n=0,r=i.length-1,o,s,a,l;t?(e>=i[n].pos&&e<=i[r].pos&&({lo:n,hi:r}=nK(i,"pos",e)),{pos:o,time:a}=i[n],{pos:s,time:l}=i[r]):(e>=i[n].time&&e<=i[r].time&&({lo:n,hi:r}=nK(i,"time",e)),{time:o,pos:a}=i[n],{time:s,pos:l}=i[r]);let c=s-o;return c?a+(l-a)*(e-o)/c:a}var lYe=class extends aYe{static id="timeseries";static defaults=aYe.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=fK(t,this.min),this._tableRange=fK(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:t,max:n}=this,r=[],o=[],s,a,l,c,d;for(s=0,a=e.length;s<a;++s)c=e[s],c>=t&&c<=n&&r.push(c);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(s=0,a=r.length;s<a;++s)d=r[s+1],l=r[s-1],c=r[s],Math.round((d+l)/2)!==c&&o.push({time:c,pos:s/(a-1)});return o}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return t.length&&n.length?e=this.normalize(t.concat(n)):e=t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(fK(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return fK(this._table,n*this._tableRange+this._minPos,!0)}};var ext=["doughnutCanvas"];function txt(i,e){if(i&1){let t=de();O(0,"div",4),W("click",function(){let r=F(t).$implicit,o=R();return U(o.handleStatusClicked(r.category?r.category:""))}),O(1,"div",5),j(2,"canvas",6,0)(4,"span",7),I(),j(5,"span",8),I()}if(i&2){let t=e.$implicit;m(4),S("textContent",t.percentage),m(),S("textContent",t.label)}}TK.register(uYe,AK);var pC=(function(i){return i.Disabled="#e7e7e7",i.Lowest="#E0E0E0",i.Low="#fff7b8",i.MediumLow="#ffe367",i.MediumHigh="#ffc15b",i.High="#F88952",i.Highest="#5FDCB3",i})(pC||{}),SYe=(()=>{let e=class e{constructor(){this.statusbarData=[],this.statusClicked=new re,this.showClass=!0,this.doughnutCharts=[]}set content(n){this.doughnutCharts=n.toArray(),this._prepareChartData()}ngOnInit(){this._prepareChartData()}_prepareChartData(){!this.doughnutCharts||this.doughnutCharts.length===0||this.doughnutCharts.forEach((n,r)=>{new TK(n.nativeElement,{type:"doughnut",data:{datasets:[{label:this.statusbarData[r].label,data:this._getDataForChart(this.statusbarData[r].percentage),backgroundColor:[this._getColor(this.statusbarData[r].percentage),this._getColor(-1)],borderWidth:1}]},options:{cutout:"70%"}})})}_getColor(n){if(n==null)return pC.Disabled;if(n<=0)return pC.Lowest;if(n>=1&&n<25)return pC.Low;if(n>=25&&n<50)return pC.MediumLow;if(n>=50&&n<75)return pC.MediumHigh;if(n>=75&&n<100)return pC.High;if(n>=100)return pC.Highest}_getDataForChart(n){return n==null?[100,0]:[Math.max(1e-4,n),100-Math.max(1e-4,n)]}handleStatusClicked(n){this.statusClicked.emit(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["co-statusbar-popup"]],viewQuery:function(r,o){if(r&1&&qt(ext,5,ti),r&2){let s;xt(s=Ft())&&(o.content=s)}},hostVars:2,hostBindings:function(r,o){r&2&&we("co-statusbar-popup",o.showClass)},inputs:{defaultColor:"defaultColor",statusbarData:"statusbarData",parentForOverlay:"parentForOverlay"},outputs:{statusClicked:"statusClicked"},standalone:!1,decls:4,vars:1,consts:[["doughnutCanvas",""],[1,"co-statusbar-popup-wrapper",3,"overlay"],[1,"status-descriptions"],[1,"status-description"],[1,"status-description",3,"click"],[1,"statusbar-canvas-wrapper"],[1,"chart-canvas"],[1,"statusbar-inner-canvas-label",3,"textContent"],[1,"statusbar-description",3,"textContent"]],template:function(r,o){r&1&&(O(0,"div",1)(1,"div",2),Pt(2,txt,6,2,"div",3,zt),I()()),r&2&&(S("overlay",o.parentForOverlay),m(2),Mt(o.statusbarData))},dependencies:[xm],encapsulation:2});let i=e;return i})();function ixt(i,e){if(i&1&&(O(0,"div",2),j(1,"co-linear-gauge",3),I()),i&2){let t=e.$implicit,n=e.$index,r=R(2);m(),we("focused-status",r.focusedStatusIndex!==void 0&&r.focusedStatusIndex===n),S("value",t.percentage)("count",t.count?t.count:void 0)}}function nxt(i,e){if(i&1){let t=de();O(0,"div",0),W("clickOutside",function(){F(t);let r=R();return U(r.handleHidePopup())}),O(1,"div",1),Pt(2,ixt,2,4,"div",2,zt),I()()}if(i&2){let t=R();S("clickOutside",t.popupShowing),m(2),Mt(t.statusbarData)}}var CYe=(()=>{let e=class e{set statusbarData(n){this._statusbarData=n,this.adjustTooHighPercentages()}get statusbarData(){return this._statusbarData}showClass(){return!0}handleClick(n){this.handleShowPopup(n)}constructor(n,r){this._elementRef=n,this._overlayService=r,this.statusbarClick=new re,this.statusClicked=new re,this.popupShowing=!1}handleShowPopup(n){this.popupShowing||(n.preventDefault(),n.stopPropagation(),this._statusbarPopupComponentRef=this._overlayService.createComponent(SYe,{parentForOverlay:this._elementRef,statusbarData:this.statusbarData,defaultColor:this.defaultColor},{statusClicked:r=>this.handleStatusClicked(r)}),this.popupShowing=!0)}handleHidePopup(){this._overlayService.removeComponent(this._statusbarPopupComponentRef),this.popupShowing=!1}adjustTooHighPercentages(){this._statusbarData.forEach(n=>n.percentage>100?n.percentage=100:!1)}handleStatusClicked(n){this.statusClicked.emit(n)}};e.\u0275fac=function(r){return new(r||e)(Q(ti),Q(Ko))},e.\u0275cmp=Fe({type:e,selectors:[["co-statusbar"]],hostVars:2,hostBindings:function(r,o){r&1&&W("click",function(a){return o.handleClick(a)}),r&2&&we("co-statusbar",o.showClass)},inputs:{statusbarData:"statusbarData",defaultColor:"defaultColor",focusedStatusIndex:"focusedStatusIndex"},outputs:{statusbarClick:"statusbarClick",statusClicked:"statusClicked"},standalone:!1,features:[Oi([Ko])],decls:1,vars:1,consts:[[1,"co-statusbar-wrapper",3,"clickOutside"],[1,"statuses"],[1,"status"],[3,"value","count"]],template:function(r,o){r&1&&$(0,nxt,4,1,"div",0),r&2&&ee(o.statusbarData?0:-1)},dependencies:[axe,nf],encapsulation:2,data:{animation:[ao("showHidePopup",[xn("void",on({opacity:0})),xn("*",on({opacity:1})),qr("void <=> *",Gr("250ms ease-in-out"))])]}});let i=e;return i})();var CK=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,QH,sc,oc]});let i=e;return i})();var RYe=(function(){function i(){}return i})();var OYe=Be(Wi()),IYe=Be(Wc()),eme=Be(ic()),NYe=Be(Hc()),vYe=Be(Ad()),RK=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},EC=class extends OYe.BusinessObject{};RK([(0,IYe.ComplexField)(vYe.CoDocument)],EC.prototype,"image",void 0);RK([(0,eme.DateField)()],EC.prototype,"creationDate",void 0);RK([(0,eme.DateField)()],EC.prototype,"deliveryDate",void 0);RK([(0,NYe.NoDbField)()],EC.prototype,"imageData",void 0);var bYe=Be(jc());var DYe=Be(Wi()),OK=Be(Ck()),tme=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},iN=class extends DYe.BusinessObject{constructor(){super(...arguments),this.colorCode=null,this.description=null,this.rgbColor=null,this.jsOnly=!1}get hexColor(){let e=this.rgbColor?Number(this.rgbColor).toString(16):"";return e.length<2&&(e="0"+e),"#"+e}getId(){return this.colorCode}};tme([(0,OK.MapProperty)("KLEUR")],iN.prototype,"colorCode",void 0);tme([(0,OK.MapProperty)("OMSCHRIJVING")],iN.prototype,"description",void 0);tme([(0,OK.MapProperty)("RGB_WAARDE")],iN.prototype,"rgbColor",void 0);var LYe=Be(Xa()),yYe=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},Bb=class extends EC{};yYe([(0,bYe.ComplexArray)(iN)],Bb.prototype,"colours",void 0);yYe([(0,LYe.BooleanText)("T")],Bb.prototype,"isConfigurable",void 0);var RF=class{};var wYe=Be(Fde()),IK=class{constructor(){this.active="?='Y'",this.colourCodes=[],this.paging=new wYe.PagingParameters,this.articleKindList=[]}};var Nu=class{};var mC=(()=>{let e=class e extends dh{constructor(n){super(),this._sharedConnectorService=n,this.screenModuleName="Stock"}loadConfigForModule(n,r){return B(this,null,function*(){let o=yield this._sharedConnectorService.getConfiguration(this.screenModuleName,["ALL"]);return o||Promise.resolve([])})}};e.\u0275fac=function(r){return new(r||e)(Ut(mc))},e.\u0275prov=pt({token:e,factory:e.\u0275fac});let i=e;return i})();function oxt(i,e){if(i&1&&(O(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),j(4,"co-image",4),I()(),O(5,"div",5),j(6,"label",6),le(7,"sharedLocalize"),j(8,"span",7),I()(),O(9,"div",5),j(10,"label",6),le(11,"sharedLocalize"),j(12,"span",7),I(),O(13,"div",5),j(14,"label",6),le(15,"sharedLocalize"),j(16,"span",7),I(),O(17,"div",5),j(18,"label",6),le(19,"sharedLocalize"),j(20,"span",7),I(),O(21,"div",5),j(22,"label",6),le(23,"sharedLocalize"),j(24,"span",7),I(),O(25,"div",5),j(26,"label",6),le(27,"sharedLocalize"),j(28,"span",7),I()()),i&2){let t=R();m(4),S("source",t.article.imageData),m(2),S("textContent",ge(7,13,"DESCRIPTION")),m(2),S("textContent",t.article.description),m(2),S("textContent",ge(11,15,"ARTICLE_NUMBER")),m(2),S("textContent",t.article.articleNumber),m(2),S("textContent",ge(15,17,"AMOUNT_IN_STOCK")),m(2),S("textContent",t.allTechnicalStockInformation),m(2),S("textContent",ge(19,19,"AMOUNT_AVAILABLE")),m(2),S("textContent",t.allAvailableStockInformation),m(2),S("textContent",ge(23,21,"ECONOMICAL_STOCK")),m(2),S("textContent",t.economicalStock),m(2),S("textContent",ge(27,23,"PERCEPTIBLE_STORAGE")),m(2),S("textContent",t.perceptibleStorage)}}var MYe=(()=>{let e=class e{set article(n){this._article=n,this._prepareImage()}get article(){return this._article}constructor(n){this._connectorService=n}_prepareImage(){return B(this,null,function*(){if(this._article&&this._article.image&&this._article.image.documentId){let n=yield this._connectorService.getDocumentContent(this._article.image.documentId);this._article.imageData=`data:${this._article.image.mimeType};base64,${n}`}})}};e.\u0275fac=function(r){return new(r||e)(Q(mc))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-information"]],inputs:{article:"article",articleStockState:"articleStockState",allAvailableStockInformation:"allAvailableStockInformation",allTechnicalStockInformation:"allTechnicalStockInformation",economicalStock:"economicalStock",perceptibleStorage:"perceptibleStorage"},standalone:!1,decls:1,vars:1,consts:[[1,"stock-info"],[1,"stock-info-row"],[1,"stock-info-row-image"],[1,"stock-image"],[1,"stock-image",3,"source"],[1,"stock-status"],[1,"stock-label",3,"textContent"],[1,"stock-span",3,"textContent"]],template:function(r,o){r&1&&$(0,oxt,29,25,"div",0),r&2&&ee(o.article?0:-1)},dependencies:[zH,kt],encapsulation:2});let i=e;return i})();var vu=(function(i){return i.Overview="overview",i.OverviewDetails="overviewDetails",i.StockForecast="stockForecast",i.InventoryForecast="inventoryForecast",i.InventoryDetails="inventoryDetails",i.InOrder="inOrder",i.History="history",i.HistoryStock="historyStock",i.HistoryOrderStock="historyOrderStock",i.HistoryOrderCommission="historyOrderCommission",i.HistoryOrder="historyOrder",i.HistoryAssign="historyAssign",i})(vu||{});function axt(i,e){if(i&1){let t=de();O(0,"co-list-of-values",9),vt("modelChange",function(r){F(t);let o=R();return Rt(o.selectedWarehouse,r)||(o.selectedWarehouse=r),U(r)}),W("modelChange",function(r){F(t);let o=R();return U(o.onSelectWarehouse(r))}),I()}if(i&2){let t=R();S("label",t.wareHouseLabel)("displayField","warehouseDescription")("collection",t.dataWareHouseCode)("multiselect",!1)("required",!1)("readonly",!1)("customCssClass","mini-scrollbar")("searchPlaceholder",t.wareHouseSearchLabel),Nt("model",t.selectedWarehouse)}}function lxt(i,e){if(i&1){let t=de();O(0,"div",7)(1,"co-button",10),W("click",function(){let r=F(t).$implicit,o=R();return U(o.selectTab(r))}),I()()}if(i&2){let t=e.$implicit;m(),we("active",t.active),S("label",t.title)("screenConfigurationObject",t.cfg)}}function cxt(i,e){if(i&1){let t=de();O(0,"co-button",10),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.selectSecondaryTab(r))}),I()}if(i&2){let t=e.$implicit;we("active",t.active),S("label",t.title)("screenConfigurationObject",t.cfg)}}function dxt(i,e){if(i&1&&(O(0,"div",8),Pt(1,cxt,1,4,"co-button",11,zt),I()),i&2){let t=R();m(),Mt(t.secondaryTabs)}}var kYe=(()=>{let e=class e{constructor(n){this._stockService=n,this.tabs=[],this.secondaryTabs=[],this.ActivateSecondaryTabs=!1,this.dataWareHouseCode=[],this.showWarehouseSelection=!1,this.warehouseSelected=new re,this.selectedWarehouse=new eE}selectTab(n){n.clickHandler&&n.clickHandler(),this.tabs.forEach(r=>r.active=!1),n.active=!0}selectSecondaryTab(n){n.clickHandler&&n.clickHandler(),this.secondaryTabs.forEach(r=>r.active=!1),n.active=!0}onSelectWarehouse(n){this.warehouseSelected.emit(n)}};e.\u0275fac=function(r){return new(r||e)(Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-tab-bar"]],inputs:{wareHouseLabel:"wareHouseLabel",wareHouseSearchLabel:"wareHouseSearchLabel",tabs:"tabs",secondaryTabs:"secondaryTabs",ActivateSecondaryTabs:"ActivateSecondaryTabs",dataWareHouseCode:"dataWareHouseCode",article:"article",showWarehouseSelection:"showWarehouseSelection",selectedWarehouse:"selectedWarehouse"},outputs:{warehouseSelected:"warehouseSelected"},standalone:!1,decls:10,vars:2,consts:[[1,"tab-bar-wrapper"],[1,"tab-bar-warehouse-wrapper"],[1,"stock-location-group"],[1,"stock-location-right-group"],[1,"custom-height",3,"label","displayField","collection","multiselect","required","readonly","customCssClass","searchPlaceholder","model"],[1,"tab-bar"],[1,"tab-bar-primary"],[1,"tab-primary"],[1,"secondary-tab-bar"],[1,"custom-height",3,"modelChange","label","displayField","collection","multiselect","required","readonly","customCssClass","searchPlaceholder","model"],[3,"click","label","screenConfigurationObject"],[3,"label","screenConfigurationObject","active"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),$(4,axt,1,9,"co-list-of-values",4),I()()(),O(5,"div",5)(6,"div",6),Pt(7,lxt,2,4,"div",7,zt),I(),$(9,dxt,3,0,"div",8),I()()),r&2&&(m(4),ee(o.showWarehouseSelection?4:-1),m(3),Mt(o.tabs),m(2),ee(o.ActivateSecondaryTabs?9:-1))},dependencies:[ns,ZH,Ki],encapsulation:2});let i=e;return i})();function hxt(i,e){if(i&1&&(O(0,"div",5),j(1,"span",6),I()),i&2){let t=e.row;m(),S("textContent",t.warehouseName)}}var xYe=(()=>{let e=class e{constructor(){this.sharedCfgName=vu,this.SimpleGridColumnTemplateType=Xs,this.articleStockInformation=[],this.locationClicked=new re}onLocationClick(n){this.locationClicked.emit(n.warehouseNo)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-tab"]],inputs:{articleStockInformation:"articleStockInformation"},outputs:{locationClicked:"locationClicked"},standalone:!1,decls:14,vars:33,consts:[[1,"simple-grid",3,"selectRow","data","rowsPerPage"],[3,"width","headerText","field","order"],[3,"headerText","order"],[3,"templateType"],[3,"headerText","field","order"],[1,"double-data","link"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0),W("selectRow",function(a){return o.onLocationClick(a)}),j(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),O(3,"co-simple-grid-column",2),le(4,"sharedLocalize"),Yt(5,hxt,2,1,"ng-template",3),I(),j(6,"co-simple-grid-column",4),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",4),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",4),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",4),le(13,"sharedLocalize"),I()),r&2&&(S("data",o.articleStockInformation)("rowsPerPage",20),m(),S("width",100)("headerText",ge(2,21,"WAREHOUSE"))("field","warehouseNo")("order",10),m(2),S("headerText",ge(4,23,"DESCRIPTION"))("order",11),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(7,25,"STOCK"))("field","technicalStock")("order",12),m(2),S("headerText",ge(9,27,"AVAILABLE_STOCK"))("field","availableStock")("order",13),m(2),S("headerText",ge(11,29,"ECONOMICAL_STOCK"))("field","economicalStock")("order",14),m(2),S("headerText",ge(13,31,"PERCEPTIBLE_STORAGE"))("field","perceptibleStorage")("order",15))},dependencies:[Al,$a,Ja,kt],encapsulation:2});let i=e;return i})();var Ac=(()=>{let e=class e{ngOnInit(){this.getData()}getData(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=rn({type:e,inputs:{goodId:"goodId"}});let i=e;return i})();var nN=class{};function _xt(i,e){if(i&1&&(O(0,"div",7),j(1,"co-icon",8)(2,"div",9),le(3,"sharedLocalize"),I()),i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.Cubes)),m(),S("textContent",ge(3,2,"TRANSFER_STOCK"))}}function pxt(i,e){if(i&1&&(O(0,"div",12),j(1,"span",13),le(2,"sharedLocalize"),j(3,"span",14),I()),i&2){let t=R().$implicit;m(),S("textContent",ge(2,2,"LOCATION")+": "),m(2),S("textContent",t.locationNo)}}function Ext(i,e){if(i&1&&(O(0,"div",12),j(1,"span",13),le(2,"sharedLocalize"),j(3,"span",14),I()),i&2){let t=R().$implicit;m(),S("textContent",ge(2,2,"BATCH_NO")+": "),m(2),S("textContent",t.batchNo)}}function mxt(i,e){if(i&1){let t=de();O(0,"div",11),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.articleToTransfer=r)}),O(1,"div",12),j(2,"span",13),le(3,"sharedLocalize"),j(4,"span",14),I(),$(5,pxt,4,4,"div",12),$(6,Ext,4,4,"div",12),O(7,"div",12),j(8,"span",13),le(9,"sharedLocalize"),j(10,"span",14),I(),O(11,"div",12),j(12,"span",13),le(13,"sharedLocalize"),j(14,"span",14),I()()}if(i&2){let t=e.$implicit,n=R(2);we("selected",n.articleToTransfer===t),m(2),S("textContent",ge(3,10,"STOREROOM")+": "),m(2),S("textContent",t.warehouseDescription),m(),ee(t.locationItem?5:-1),m(),ee(t.batchItem?6:-1),m(2),S("textContent",ge(9,12,"ORDER_RULE")+": "),m(2),S("textContent",t.lineId),m(2),S("textContent",ge(13,14,"AMOUNT")+": "),m(2),S("textContent",t.amountInStock)}}function gxt(i,e){if(i&1&&(O(0,"div",5),Pt(1,mxt,15,16,"div",10,zt),I()),i&2){let t=R();m(),Mt(t.articleDetails)}}function Axt(i,e){if(i&1){let t=de();O(0,"div",15)(1,"div",25)(2,"co-input-number-picker",26),le(3,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R(2);return U(o.handleInputNumberChange(r))}),I()()()}if(i&2){let t=R(2);m(2),S("readonly",t.articleToTransfer.amountTransfer===t.articleTransaction.amountInOrder&&t.articleToTransfer.targetWarehouse&&t.articleToTransfer.targetWarehouse!==t.articleToTransfer.warehouseNo)("model",t.articleToTransfer.amountTransfer)("min",1)("max",t.articleTransaction.amountInOrder)("label",ge(3,5,"QUANTITY"))}}function Txt(i,e){if(i&1){let t=de();O(0,"co-list-of-values",22),le(1,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R(2);return U(o.handleSelectedWarehouse(r))}),I()}if(i&2){let t=R(2);S("collection",t.warehouses)("displayField","warehouseDescription")("label",ge(1,3,"WAREHOUSE"))}}function Sxt(i,e){if(i&1){let t=de();O(0,"div",6),$(1,Axt,4,7,"div",15),O(2,"div",16),j(3,"span",17),O(4,"div",18),j(5,"co-icon",8),I()(),O(6,"div",19)(7,"div",20),$(8,Txt,2,5,"co-list-of-values",21),O(9,"co-list-of-values",22),le(10,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R();return U(o.handleSelectedLocation(r))}),I()(),O(11,"div",20)(12,"co-list-of-values",22),le(13,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R();return U(o.handleSelectedStockState(r))}),I()()(),O(14,"div",23)(15,"co-button",24),le(16,"sharedLocalize"),W("click",function(){F(t);let r=R();return U(r.handleStickerClick())}),I()()()}if(i&2){let t=R();m(),ee(t.articleToTransfer?1:-1),m(4),S("iconData",t.iconCacheService.getIcon(t.icons.ArrowDownRegular)),m(3),ee(t.articleToTransfer.amountTransfer===t.articleTransaction.amountInOrder?8:-1),m(),S("collection",t.stockLocations)("displayField","locationNo")("label",ge(10,11,"LOCATION")),m(3),S("collection",t.stockState)("displayField","stateDescription")("label",ge(13,13,"STOCK_STATE")),m(3),S("label",ge(16,15,"STICKER"))("iconData",t.iconCacheService.getIcon(t.icons.BarcodeReadRegular))}}function Cxt(i,e){if(i&1){let t=de();O(0,"div",27)(1,"co-button",28),W("click",function(){F(t);let r=R();return U(r.handleOkClick(r.articleToTransfer))}),I(),O(2,"co-button",29),W("click",function(){F(t);let r=R();return U(r.onCloseClick())}),I()()}if(i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.CheckDuotone)),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CrossSkinny))}}function Rxt(i,e){if(i&1){let t=de();O(0,"co-send-method-dialog",30),W("closeClick",function(){F(t);let r=R();return U(r.showSendMethodDialog=!1)}),I()}}var FYe=(()=>{let e=class e{constructor(n,r,o,s,a){this._stockService=n,this.iconCacheService=r,this._changeDetector=o,this.dialogService=s,this.dict=a,this.selectedArticleDetailsData=new Il,this.articleDetailsInformation=new Nu,this.articleStockInfo=[],this.stockLocations=[],this.handleClick=new re,this.handleStickerClicked=new re,this.updateGridData=new re,this.showStockTransferChange=new re,this.showSendMethodDialog=!1,this.warehouses=[],this.articleDetails=[],this.transferFull=!1,this.stockState=[],this.locations=[],this.stockStatus=[],this.icons=ot}ngAfterViewInit(){let n=new Nu;n.transId=this.articleTransaction.transId.toString(),n.lineId=this.articleTransaction.lineNr.toString(),this._stockService.getArticleDetails(n).then(r=>{this.articleDetails=r,r.length===1&&(this.articleToTransfer=r[0],this.getStockManagementLocations(r[0].warehouseNo),this._changeDetector.detectChanges(),this.articleToTransfer.amountTransfer=1)}),this.getStockManagementWarehouses(),this.getStockState()}onCloseClick(){this.showStockTransferChange.emit(!1)}handleOkClick(n){this.articleToTransfer.amountTransfer===this.articleTransaction.amountInOrder?(this.articleToTransfer.lineId=this.articleTransaction.lineNr,this.articleToTransfer.transId=this.articleTransaction.transId,n.selected=!0,n.entryDate=new Date,n.targetWarehouse||(n.targetWarehouse=n.warehouseNo),this._stockService.updateArticleDetails(n).then(r=>{this.handleClick.emit(),this.showStockTransferChange.emit(!1),this._stockService.getArticleDetails(this.articleDetailsInformation).then(o=>{this.articleStockInfo=o,this.updateGridData.emit(o),this.showStockTransferChange.emit(!0)})}).catch(r=>{})):this.dialogService.showError(this.dict.get("AMOUNT_TO_TRANSFER_ALLOCATED_NOT_EQUAL"))}handleSelectedWarehouse(n){this.articleToTransfer.targetWarehouse=n.warehouseNo,this.getStockManagementLocations(n.warehouseNo)}handleSelectedLocation(n){this.articleToTransfer.targetLocation=n.locationNo}handleSelectedStockState(n){this.articleToTransfer.stockStateId=n.stockStateId}handleStickerClick(){this.handleStickerClicked.emit(),this.showSendMethodDialog=!0}getStockManagementWarehouses(){this._stockService.getStockManagementWarehouses().then(n=>{this.warehouses=n})}getStockManagementLocations(n){this._stockService.getStockManagementLocations(n).then(r=>{this.stockLocations=r})}getStockState(){this._stockService.getStockState().then(n=>{this.stockState=n})}handleInputNumberChange(n){this.articleToTransfer.targetWarehouse&&this.articleToTransfer.targetWarehouse!==this.articleToTransfer.warehouseNo?this.dialogService.showError("AMOUNT_CANT_BE_CHANGED_WITH_DIFFERING_WAREHOUSES"):this.articleToTransfer.amountTransfer=n}};e.\u0275fac=function(r){return new(r||e)(Q(wr),Q(yt),Q(pn),Q(Uo),Q(kn))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-transfer-allocated"]],inputs:{stockSticker:"stockSticker",article:"article",articleToTransfer:"articleToTransfer",articleTransaction:"articleTransaction",allWarehouses:"allWarehouses",showStockTransfer:"showStockTransfer",selectedArticleDetailsData:"selectedArticleDetailsData",articleFlat:"articleFlat",articleDetailsInformation:"articleDetailsInformation",selectedWarehouse:"selectedWarehouse",selectedLocationNo:"selectedLocationNo",articleStockInfo:"articleStockInfo",stockLocations:"stockLocations"},outputs:{handleClick:"handleClick",handleStickerClicked:"handleStickerClicked",updateGridData:"updateGridData",showStockTransferChange:"showStockTransferChange"},standalone:!1,decls:10,vars:7,consts:[["headerTemplate",""],["footerTemplate",""],[1,"stock-transfer"],[3,"closeClick","showCloseIcon","modal","headerTemplate","footerTemplate"],[1,"dialog-wrapper"],[1,"stock-transfer-allocated-columns"],[1,"stock-transfer-columns"],[1,"co-dialog-header-title-wrapper"],[3,"iconData"],[1,"co-dialog-header-title",3,"textContent"],[1,"stock-transfer-allocated-column",3,"selected"],[1,"stock-transfer-allocated-column",3,"click"],[1,"row"],[1,"bold",3,"textContent"],[3,"textContent"],[1,"stock-transfer-top-column"],[1,"transfer-arrow-wrapper"],[1,"half-circle"],[1,"icon-wrapper"],[1,"stock-transfer-bottom-column"],[1,"transfer-bottom-row"],[3,"collection","displayField","label"],[3,"modelChange","collection","displayField","label"],[1,"transfer-sticker-buttons"],[3,"click","label","iconData"],[1,"transfer-quantity-allocated"],[3,"modelChange","readonly","model","min","max","label"],[1,"button-wrapper","ok-cancel-buttons"],[1,"save-button",3,"click","iconData"],[1,"cancel-button",3,"click","iconData"],[3,"closeClick"]],template:function(r,o){if(r&1){let s=de();O(0,"div",2)(1,"co-dialog",3),W("closeClick",function(){return F(s),U(o.onCloseClick())}),Yt(2,_xt,4,4,"ng-template",null,0,zi),O(4,"div",4),$(5,gxt,3,0,"div",5),$(6,Sxt,17,17,"div",6),I(),Yt(7,Cxt,3,2,"ng-template",null,1,zi),I()(),$(9,Rxt,1,0,"co-send-method-dialog")}if(r&2){let s=ln(3),a=ln(8);m(),S("showCloseIcon",!0)("modal",!0)("headerTemplate",s)("footerTemplate",a),m(4),ee(o.articleToTransfer?5:-1),m(),ee(o.articleToTransfer?6:-1),m(3),ee(o.showSendMethodDialog?9:-1)}},dependencies:[Ki,nE,ri,tS,qo,ns,kt],encapsulation:2});let i=e;return i})();function Ixt(i,e){if(i&1){let t=de();O(0,"co-stock-transfer-allocated",8),W("handleStickerClicked",function(r){F(t);let o=R();return U(o.handleStickerClicked.emit(r))})("showStockTransferChange",function(r){F(t);let o=R();return U(o.onShowStockTransferChange(r))}),I()}if(i&2){let t=R();S("articleToTransfer",t.articleDetails)("allWarehouses",t.allWarehouses)("stockLocations",t.stockLocations)("articleFlat",t.articleFlat)("articleTransaction",t.selectedRow)("showStockTransfer",t.showStockTransfer)}}function Nxt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R();return U(r.handleStockTransferClick())}),I()}if(i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.ArrowRightArrowLeftRegular))}}function vxt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R();return U(r.openSendMethodDialog(r.selectedRow))}),I()}if(i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.SolidBarcodeReadTag))}}function Dxt(i,e){if(i&1&&(O(0,"div",10),j(1,"span",11)(2,"span",11),I()),i&2){let t=e.row;m(),S("textContent",t.warehouseNumber),m(),S("textContent",t.warehouseDescription)}}function yxt(i,e){if(i&1){let t=de();O(0,"div",12)(1,"co-icon",13),W("click",function(r){let o=F(t).row,s=R();return U(s.handleTransactionNavigationClick(r,o.transactionNr.toString()))}),I(),O(2,"span",14),W("click",function(r){let o=F(t).row,s=R();return U(s.handleTransactionNavigationClick(r,o.transactionNr.toString()))}),I()()}if(i&2){let t=e.row,n=R();m(),S("iconData",n.iconCacheService.getIcon(n.icons.DetailView)),m(),S("textContent",t.type+t.transactionNr)}}function bxt(i,e){if(i&1&&(j(0,"span",11),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.transactionDate,"dd-MM-yyyy"))}}function Lxt(i,e){if(i&1&&(j(0,"span",11),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.deliveryDate,"dd-MM-yyyy"))}}function wxt(i,e){if(i&1){let t=de();O(0,"co-send-method-dialog",15),W("closeClick",function(){F(t);let r=R();return U(r.showSendMethodDialog=!1)}),I()}}var UYe=(()=>{let e=class e extends Ac{constructor(n,r,o){super(),this.iconCacheService=n,this._stockService=r,this._changeDetector=o,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.stockLocations=[],this.allWarehouses=[],this.locationClicked=new re,this.transferIconClicked=new re,this.sendMethodDialogClicked=new re,this.handleStickerClicked=new re,this.showStockTransferChange=new re,this.handleTransactionClick=new re,this.data=[],this.selectedRow=null,this.showSendMethodDialog=!1}openSendMethodDialog(n){this.showSendMethodDialog=!0,this.sendMethodDialogClicked.emit(n)}handleStockTransferClick(){this.showStockTransfer=!0}onRowSelected(n){this.selectedRow=n}onShowStockTransferChange(n){n&&this.updateData(),this.showStockTransfer=!1}getData(){return B(this,null,function*(){this.getGridData()})}handleTransactionNavigationClick(n,r){n.stopPropagation(),this.handleTransactionNavigation(r)}updateData(){this.getGridData()}handleTransactionNavigation(n){this.handleTransactionClick.emit(n)}getGridData(){let n=new nN;n.type="V",n.goodId=this.goodId.toString(),this._stockService.getArticleTransaction(n).then(r=>{this.data=r.filter(o=>o.warehouseNumber===this.warehouseNo),this._changeDetector.detectChanges()})}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr),Q(pn))},e.\u0275cmp=Fe({type:e,selectors:[["co-order-tab"]],inputs:{warehouseNo:"warehouseNo",showStockTransfer:"showStockTransfer",allWarehouses:"allWarehouses",articleFlat:"articleFlat"},outputs:{locationClicked:"locationClicked",transferIconClicked:"transferIconClicked",sendMethodDialogClicked:"sendMethodDialogClicked",handleStickerClicked:"handleStickerClicked",showStockTransferChange:"showStockTransferChange",handleTransactionClick:"handleTransactionClick"},standalone:!1,features:[pi],decls:25,vars:39,consts:[[1,"stock-transfer-wrapper"],[1,"stock-transfer-dialog",3,"articleToTransfer","allWarehouses","stockLocations","articleFlat","articleTransaction","showStockTransfer"],[1,"stock-transfer-add"],[1,"menu-icon",3,"iconData"],[1,"simple-grid",3,"selectRow","data","rowsPerPage","showAdd","inlineEdit","showGridSettings","showColumnSort","showToolbar"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[1,"stock-transfer-dialog",3,"handleStickerClicked","showStockTransferChange","articleToTransfer","allWarehouses","stockLocations","articleFlat","articleTransaction","showStockTransfer"],[1,"menu-icon",3,"click","iconData"],[1,"double-data"],[3,"textContent"],[1,"double-data","link"],[3,"click","iconData"],[3,"click","textContent"],[3,"closeClick"]],template:function(r,o){r&1&&(O(0,"div",0),$(1,Ixt,1,6,"co-stock-transfer-allocated",1),I(),O(2,"div",2),$(3,Nxt,1,1,"co-icon",3),$(4,vxt,1,1,"co-icon",3),I(),O(5,"co-simple-grid",4),W("selectRow",function(a){return o.onRowSelected(a)}),O(6,"co-simple-grid-column",5),le(7,"sharedLocalize"),Yt(8,Dxt,3,2,"ng-template",6),I(),O(9,"co-simple-grid-column",5),le(10,"sharedLocalize"),Yt(11,yxt,3,2,"ng-template",6),I(),j(12,"co-simple-grid-column",7),le(13,"sharedLocalize"),O(14,"co-simple-grid-column",5),le(15,"sharedLocalize"),Yt(16,bxt,2,4,"ng-template",6),I(),O(17,"co-simple-grid-column",5),le(18,"sharedLocalize"),Yt(19,Lxt,2,4,"ng-template",6),I(),j(20,"co-simple-grid-column",7),le(21,"sharedLocalize"),j(22,"co-simple-grid-column",7),le(23,"sharedLocalize"),I(),$(24,wxt,1,0,"co-send-method-dialog")),r&2&&(m(),ee(o.showStockTransfer?1:-1),m(2),ee(o.selectedRow?3:-1),m(),ee(o.selectedRow?4:-1),m(),S("data",o.data)("rowsPerPage",20)("showAdd",!1)("inlineEdit",!1)("showGridSettings",!1)("showColumnSort",!0)("showToolbar",!0),m(),S("headerText",ge(7,25,"WAREHOUSE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(10,27,"ORDER")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(13,29,"CUSTOMER"))("field","customerName"),m(2),S("headerText",ge(15,31,"ORDER_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(18,33,"DELIVERY_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(21,35,"AMOUNT"))("field","amountInOrder"),m(2),S("headerText",ge(23,37,"ALLOCATED"))("field","reserved"),m(2),ee(o.showSendMethodDialog?24:-1))},dependencies:[Al,$a,Ja,nE,ri,FYe,Er,kt],encapsulation:2});let i=e;return i})();function Mxt(i,e){if(i&1&&(O(0,"div",4),j(1,"span",5)(2,"span",5),I()),i&2){let t=e.row;m(),S("textContent",t.warehouseNumber),m(),S("textContent",t.warehouseDescription)}}function kxt(i,e){if(i&1){let t=de();O(0,"div",6)(1,"co-icon",7),W("click",function(r){let o=F(t).row,s=R();return U(s.handleTransactionNavigationClick(r,o.transactionNr.toString()))}),I(),O(2,"span",8),W("click",function(r){let o=F(t).row,s=R();return U(s.handleTransactionNavigationClick(r,o.transactionNr.toString()))}),I()()}if(i&2){let t=e.row,n=R();m(),S("iconData",n.iconCacheService.getIcon(n.icons.DetailView)),m(),S("textContent",t.type+t.transactionNr)}}function xxt(i,e){if(i&1&&(j(0,"span",5),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.transactionDate,"dd-MM-yyyy"))}}function Fxt(i,e){if(i&1&&(j(0,"span",5),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.deliveryDate,"dd-MM-yyyy"))}}var BYe=(()=>{let e=class e extends Ac{constructor(n,r){super(),this.iconCacheService=n,this._stockService=r,this.icons=ot,this.data=[],this.handleTransactionClick=new re,this.SimpleGridColumnTemplateType=Xs}handleTransactionNavigationClick(n,r){n.stopPropagation(),this.handleTransactionNavigation(r)}handleTransactionNavigation(n){this.handleTransactionClick.emit(n)}getData(){return B(this,null,function*(){let n=new nN;n.type="I",n.goodId=this.goodId.toString(),this._stockService.getArticleTransaction(n).then(r=>{this.data=r.filter(o=>o.warehouseNumber===this.warehouseNo)})})}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-order-stock-tab"]],inputs:{warehouseNo:"warehouseNo"},outputs:{handleTransactionClick:"handleTransactionClick"},standalone:!1,features:[pi],decls:19,vars:31,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[1,"double-data"],[3,"textContent"],[1,"double-data","link"],[3,"click","iconData"],[3,"click","textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,Mxt,3,2,"ng-template",2),I(),O(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),Yt(6,kxt,3,2,"ng-template",2),I(),O(7,"co-simple-grid-column",1),le(8,"sharedLocalize"),Yt(9,xxt,2,4,"ng-template",2),I(),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",3),le(13,"sharedLocalize"),j(14,"co-simple-grid-column",3),le(15,"sharedLocalize"),O(16,"co-simple-grid-column",1),le(17,"sharedLocalize"),Yt(18,Fxt,2,4,"ng-template",2),I()()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,17,"WAREHOUSE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,19,"PURCHASE_ORDER_NR"))("field","transactionNr"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(8,21,"DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(11,23,"AMOUNT"))("field","amountInOrder"),m(2),S("headerText",ge(13,25,"RESERVED"))("field","reserved"),m(2),S("headerText",ge(15,27,"FREE_STOCK"))("field","InOrderForStock"),m(2),S("headerText",ge(17,29,"DELIVERY_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content))},dependencies:[Al,$a,Ja,ri,Er,kt],encapsulation:2});let i=e;return i})();var QYe=Be(nme());var VYe=Be(MD()),GYe=Be(d7()),HYe=Be(nme());var Vxt=i=>[i],WYe=(()=>{let e=class e{showClass(){return!0}constructor(n){this.sharedConnectorService=n,this.sendMethodType=VYe.SendMethodType,this.printerList=[],this.printLayouts=[],this.layoutCode=GYe.LayoutCode.StockSticker,this.reportDocumentPrintRequest=new HYe.PrintStockStickersRequest,this.close=new re}ngOnInit(){return B(this,null,function*(){yield this._prepareData()})}handleSendMethodOkClick(n){return B(this,null,function*(){this.close.emit(),yield this.print(n)})}print(n){return B(this,null,function*(){n&&typeof n!="string"?yield this.printDocument(this.reportDocumentPrintRequest,n.localPrint):yield this.printDocument(this.reportDocumentPrintRequest,!1)})}printDocument(n,r){return B(this,null,function*(){yield this.sharedConnectorService.printStockStickers(n)})}_prepareData(){return B(this,null,function*(){yield this._getPrinters(),yield this._getPrintLayouts()})}_getPrinters(){return B(this,null,function*(){this.printerList=yield this.sharedConnectorService.getAllPrinters()})}_getPrintLayouts(){return B(this,null,function*(){this.printLayouts=yield this.sharedConnectorService.getStockStickerPrintLayouts()})}};e.\u0275fac=function(r){return new(r||e)(Q(mc))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-print-sticker"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-stock-transfer-print-sticker",o.showClass)},inputs:{reportDocumentPrintRequest:"reportDocumentPrintRequest"},outputs:{close:"close"},standalone:!1,decls:1,vars:9,consts:[[3,"reportingDocumentPrintRequestChange","closeClick","okClick","headerTitle","printerList","defaultSendMethod","visibleMethods","printLayouts","layoutCode","reportingDocumentPrintRequest"]],template:function(r,o){r&1&&(O(0,"co-send-method-dialog",0),vt("reportingDocumentPrintRequestChange",function(a){return Rt(o.reportDocumentPrintRequest,a)||(o.reportDocumentPrintRequest=a),a}),W("closeClick",function(){return o.close.emit()})("okClick",function(a){return o.handleSendMethodOkClick(a)}),I()),r&2&&(S("headerTitle","Verzendmethode")("printerList",o.printerList)("defaultSendMethod",o.defaultSendMethod)("visibleMethods",Ga(7,Vxt,o.sendMethodType.Print))("printLayouts",o.printLayouts)("layoutCode",o.layoutCode),Nt("reportingDocumentPrintRequest",o.reportDocumentPrintRequest))},dependencies:[nE],encapsulation:2});let i=e;return i})();var qYe=Be(ome());var jYe=Be(MD()),zYe=Be(d7()),YYe=Be(ome());var Wxt=i=>[i],KYe=(()=>{let e=class e{showClass(){return!0}constructor(n){this.sharedConnectorService=n,this.sendMethodType=jYe.SendMethodType,this.printerList=[],this.printLayouts=[],this.layoutCode=zYe.LayoutCode.TransferSticker,this.reportDocumentPrintRequest=new YYe.PrintTransferStickersRequest,this.close=new re}ngOnInit(){return B(this,null,function*(){yield this._prepareData()})}handleSendMethodOkClick(n){return B(this,null,function*(){this.close.emit(),yield this.print(n)})}print(n){return B(this,null,function*(){n&&typeof n!="string"?yield this.printDocument(this.reportDocumentPrintRequest,n.localPrint):yield this.printDocument(this.reportDocumentPrintRequest,!1)})}printDocument(n,r){return B(this,null,function*(){yield this.sharedConnectorService.printTransferStickers(n)})}_prepareData(){return B(this,null,function*(){yield this._getPrinters(),yield this._getPrintLayouts()})}_getPrinters(){return B(this,null,function*(){this.printerList=yield this.sharedConnectorService.getAllPrinters()})}_getPrintLayouts(){return B(this,null,function*(){this.printLayouts=yield this.sharedConnectorService.getTransferStickerPrintLayouts()})}};e.\u0275fac=function(r){return new(r||e)(Q(mc))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-transfer-print-sticker"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-stock-transfer-print-sticker",o.showClass)},inputs:{reportDocumentPrintRequest:"reportDocumentPrintRequest"},outputs:{close:"close"},standalone:!1,decls:1,vars:9,consts:[[3,"reportingDocumentPrintRequestChange","closeClick","okClick","headerTitle","printerList","defaultSendMethod","visibleMethods","printLayouts","layoutCode","reportingDocumentPrintRequest"]],template:function(r,o){r&1&&(O(0,"co-send-method-dialog",0),vt("reportingDocumentPrintRequestChange",function(a){return Rt(o.reportDocumentPrintRequest,a)||(o.reportDocumentPrintRequest=a),a}),W("closeClick",function(){return o.close.emit()})("okClick",function(a){return o.handleSendMethodOkClick(a)}),I()),r&2&&(S("headerTitle","Verzendmethode")("printerList",o.printerList)("defaultSendMethod",o.defaultSendMethod)("visibleMethods",Ga(7,Wxt,o.sendMethodType.Print))("printLayouts",o.printLayouts)("layoutCode",o.layoutCode),Nt("reportingDocumentPrintRequest",o.reportDocumentPrintRequest))},dependencies:[nE],encapsulation:2});let i=e;return i})();function zxt(i,e){if(i&1&&(O(0,"div",16),j(1,"co-icon",10)(2,"div",17),le(3,"sharedLocalize"),I()),i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.Cubes)),m(),S("textContent",ge(3,2,"TRANSFER_STOCK"))}}function Yxt(i,e){if(i&1&&(O(0,"div",19),j(1,"label",20),le(2,"sharedLocalize"),j(3,"span",21),I()),i&2){let t=R(2);m(),S("textContent",ge(2,2,"BATCH_NO")),m(2),S("textContent",t.articleToTransfer.batchNo)}}function Kxt(i,e){if(i&1&&(O(0,"div",19),j(1,"label",20),le(2,"sharedLocalize"),j(3,"span",21),I()),i&2){let t=R(2);m(),S("textContent",ge(2,2,"SERIE_NO")),m(2),S("textContent",t.articleToTransfer.serialNo)}}function qxt(i,e){if(i&1&&(j(0,"span",24),le(1,"sharedLocalize")),i&2){let t=R(2);S("textContent",t.articleToTransfer.amountInStockFree+ge(1,1," AVAILABLE"))}}function Xxt(i,e){if(i&1){let t=de();O(0,"div",6)(1,"div",18)(2,"div",19),j(3,"label",20),le(4,"sharedLocalize"),j(5,"span",21),I(),O(6,"div",19),j(7,"label",20),le(8,"sharedLocalize"),j(9,"span",21),I(),$(10,Yxt,4,4,"div",19),$(11,Kxt,4,4,"div",19),I(),O(12,"div",22)(13,"co-input-number-picker",23),le(14,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R();return Rt(o.articleToTransfer.amountTransfer,r)||(o.articleToTransfer.amountTransfer=r),U(r)}),I(),$(15,qxt,2,3,"span",24),I()()}if(i&2){let t=R();m(3),S("textContent",ge(4,10,"WAREHOUSE")),m(2),S("textContent",t.articleToTransfer.warehouseDescription),m(2),S("textContent",ge(8,12,"LOCATION")),m(2),S("textContent",t.articleToTransfer.locationNo),m(),ee(t.articleToTransfer!=null&&t.articleToTransfer.batchNo?10:-1),m(),ee(t.articleToTransfer!=null&&t.articleToTransfer.serialNo?11:-1),m(2),Nt("model",t.articleToTransfer.amountTransfer),S("min",1)("label",ge(14,14,"QUANTITY")),m(2),ee(t.transferFull?15:-1)}}function Zxt(i,e){if(i&1){let t=de();O(0,"div",25)(1,"co-button",26),W("click",function(){F(t);let r=R();return U(r.handleOkClick(r.articleToTransfer))}),I(),O(2,"co-button",27),W("click",function(){F(t);let r=R();return U(r.onCloseClick())}),I()()}if(i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.CheckDuotone)),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CrossSkinny))}}function Qxt(i,e){if(i&1){let t=de();O(0,"co-stock-transfer-print-sticker",28),W("close",function(){F(t);let r=R();return U(r.showSendMethodDialog=!1)}),I()}}var XYe=(()=>{let e=class e{constructor(n,r){this._stockService=n,this.iconCacheService=r,this.icons=ot,this.selectedArticleDetailsData=new Il,this.articleDetailsInformation=new Nu,this.articleStockInfo=[],this.stockLocations=[],this.handleStickerClicked=new re,this.handleTogglePopup=new re,this.showSendMethodDialog=!1,this.transferFull=!1,this.warehouses=[],this.stockState=[],this.locations=[],this.transferStickerPrintRequest=new qYe.PrintTransferStickersRequest}ngAfterViewInit(){this.getStockManagementWarehouses(),this.getStockState()}handleOkClick(n){return B(this,null,function*(){this.articleToTransfer.amountTransfer>this.articleToTransfer.amountInStockFree?this.transferFull=!0:(n.selected=!0,n.entryDate=new Date,(yield this._stockService.updateArticleDetails(n))&&this.handleTogglePopup.emit())})}onCloseClick(){this.handleTogglePopup.emit()}handleSelectedWarehouse(n){this.articleToTransfer.targetWarehouse=n.warehouseNo,this.selectedWarehouse=n,this.getStockManagementLocations()}handleSelectedLocation(n){this.articleToTransfer.targetLocation=n.locationNo}handleSelectedStockState(n){this.articleToTransfer.stockStateId=n.stockStateId}handleStickerClick(){this._buildStickerPrintRequest(),this.handleStickerClicked.emit(),this.showSendMethodDialog=!0}getStockManagementWarehouses(){this._stockService.getStockManagementWarehouses().then(n=>{this.warehouses=n})}getStockManagementLocations(){this._stockService.getStockManagementLocations(this.selectedWarehouse.warehouseNo).then(n=>{this.stockLocations=n})}getStockState(){this._stockService.getStockState().then(n=>{this.stockState=n})}_buildStickerPrintRequest(){this.transferStickerPrintRequest.goodId=this.articleFlat.goodId,this.transferStickerPrintRequest.amount=this.articleToTransfer.amountTransfer,this.transferStickerPrintRequest.sourceWarehouse=this.articleToTransfer.warehouseNo,this.transferStickerPrintRequest.sourceLocation=this.articleToTransfer.locationNo,this.transferStickerPrintRequest.targetWarehouse=this.articleToTransfer.targetWarehouse,this.transferStickerPrintRequest.targetLocation=this.articleToTransfer.targetLocation,this.transferStickerPrintRequest.batch=this.articleToTransfer.batchNo,this.transferStickerPrintRequest.serial=this.articleToTransfer.serialNo,this.transferStickerPrintRequest.lineId=this.articleToTransfer.lineId}};e.\u0275fac=function(r){return new(r||e)(Q(wr),Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-transfer"]],inputs:{stockSticker:"stockSticker",article:"article",articleToTransfer:"articleToTransfer",allWarehouses:"allWarehouses",selectedArticleDetailsData:"selectedArticleDetailsData",articleFlat:"articleFlat",articleDetailsInformation:"articleDetailsInformation",selectedWarehouse:"selectedWarehouse",selectedLocationNo:"selectedLocationNo",articleStockInfo:"articleStockInfo",stockLocations:"stockLocations"},outputs:{handleStickerClicked:"handleStickerClicked",handleTogglePopup:"handleTogglePopup"},standalone:!1,decls:26,vars:26,consts:[["headerTemplate",""],["footerTemplate",""],[1,"stock-transfer"],[3,"closeClick","showCloseIcon","modal","headerTemplate","footerTemplate"],[1,"dialog-wrapper"],[1,"stock-transfer-columns"],[1,"stock-transfer-top-column"],[1,"transfer-arrow-wrapper"],[1,"half-circle"],[1,"icon-wrapper"],[3,"iconData"],[1,"stock-transfer-bottom-column"],[1,"transfer-bottom-row"],[3,"modelChange","collection","displayField","label"],[1,"transfer-sticker-buttons"],[3,"click","label","iconData"],[1,"co-dialog-header-title-wrapper"],[1,"co-dialog-header-title",3,"textContent"],[1,"transfer-items"],[1,"transfer-item"],[1,"item-label",3,"textContent"],[1,"item-value",3,"textContent"],[1,"transfer-quantity"],[3,"modelChange","model","min","label"],[3,"textContent"],[1,"button-wrapper","ok-cancel-buttons"],[1,"save-button",3,"click","iconData"],[1,"cancel-button",3,"click","iconData"],[3,"close"]],template:function(r,o){if(r&1){let s=de();O(0,"div",2)(1,"co-dialog",3),W("closeClick",function(){return F(s),U(o.onCloseClick())}),Yt(2,zxt,4,4,"ng-template",null,0,zi),O(4,"div",4)(5,"div",5),$(6,Xxt,16,16,"div",6),O(7,"div",7),j(8,"span",8),O(9,"div",9),j(10,"co-icon",10),I()(),O(11,"div",11)(12,"div",12)(13,"co-list-of-values",13),le(14,"sharedLocalize"),W("modelChange",function(l){return F(s),U(o.handleSelectedWarehouse(l))}),I(),O(15,"co-list-of-values",13),le(16,"sharedLocalize"),W("modelChange",function(l){return F(s),U(o.handleSelectedLocation(l))}),I()(),O(17,"div",12)(18,"co-list-of-values",13),le(19,"sharedLocalize"),W("modelChange",function(l){return F(s),U(o.handleSelectedStockState(l))}),I()()(),O(20,"div",14)(21,"co-button",15),le(22,"sharedLocalize"),W("click",function(){return F(s),U(o.handleStickerClick())}),I()()()(),Yt(23,Zxt,3,2,"ng-template",null,1,zi),I()(),$(25,Qxt,1,0,"co-stock-transfer-print-sticker")}if(r&2){let s=ln(3),a=ln(24);m(),S("showCloseIcon",!0)("modal",!0)("headerTemplate",s)("footerTemplate",a),m(5),ee(o.articleToTransfer?6:-1),m(4),S("iconData",o.iconCacheService.getIcon(o.icons.ArrowDownRegular)),m(3),S("collection",o.warehouses)("displayField","warehouseDescription")("label",ge(14,18,"WAREHOUSE")),m(2),S("collection",o.stockLocations)("displayField","locationNo")("label",ge(16,20,"LOCATION")),m(3),S("collection",o.stockState)("displayField","stateDescription")("label",ge(19,22,"STOCK_STATE")),m(3),S("label",ge(22,24,"STICKER"))("iconData",o.iconCacheService.getIcon(o.icons.BarcodeReadRegular)),m(4),ee(o.showSendMethodDialog?25:-1)}},dependencies:[Ki,ri,tS,qo,ns,KYe,kt],encapsulation:2});let i=e;return i})();function $xt(i,e){if(i&1&&(O(0,"div",5),j(1,"co-icon",6)(2,"div",7),le(3,"sharedLocalize"),I()),i&2){let t=R();m(),S("iconData",t.iconCacheService.getIcon(t.icons.Cubes)),m(),S("textContent",ge(3,2,"CONFIRM_STOCK_CHANGE"))}}function eFt(i,e){i&1&&(O(0,"div",4),j(1,"span",8),le(2,"sharedLocalize"),I()),i&2&&(m(),S("textContent",ge(2,1,"DELETE_STOCK_LINE?")))}function tFt(i,e){i&1&&(j(0,"span",8),le(1,"sharedLocalize")),i&2&&S("textContent",ge(1,1,"NEW_STOCK_LINE"))}function iFt(i,e){i&1&&(j(0,"span",8),le(1,"sharedLocalize")),i&2&&S("textContent",ge(1,1,"CHANGE_STOCK_LINE"))}function nFt(i,e){if(i&1){let t=de();O(0,"co-input-text",17),le(1,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R(2);return Rt(o.selectedArticleDetailsData.serialNo,r)||(o.selectedArticleDetailsData.serialNo=r),U(r)}),I()}if(i&2){let t=R(2);Nt("model",t.selectedArticleDetailsData.serialNo),S("placeholder",ge(1,4,"SERIAL_NO"))("required",!0)("readonly",!1)}}function rFt(i,e){i&1&&j(0,"span",13)}function oFt(i,e){if(i&1){let t=de();O(0,"co-list-of-values",19),le(1,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R(3);return U(o.locationChanged(r))}),I()}if(i&2){let t=R(3);S("model",t.locationForNumber(t.selectedArticleDetailsData.locationNo))("collection",t.stockLocations)("displayField","locationNo")("label",ge(1,5,"LOCATION"))("required",!0)}}function sFt(i,e){if(i&1){let t=de();O(0,"co-input-text",17),le(1,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R(3);return Rt(o.selectedArticleDetailsData.batchNo,r)||(o.selectedArticleDetailsData.batchNo=r),U(r)}),I()}if(i&2){let t=R(3);Nt("model",t.selectedArticleDetailsData.batchNo),S("placeholder",ge(1,4,"BATCH"))("required",!0)("readonly",!1)}}function aFt(i,e){i&1&&j(0,"span",13)}function lFt(i,e){if(i&1&&(O(0,"div",10),$(1,oFt,2,7,"co-list-of-values",18),$(2,sFt,2,6,"co-input-text",12)(3,aFt,1,0,"span",13),I()),i&2){let t=R(2);m(),ee(t.articleFlat.locationRegistered?1:-1),m(),ee(t.articleFlat.batch?2:3)}}function cFt(i,e){if(i&1&&(O(0,"div",10),j(1,"co-input-text",11),le(2,"currency"),le(3,"sharedLocalize"),I()),i&2){let t=R(2);m(),S("model",Wn(2,3,t.articleExtended==null?null:t.articleExtended.purchasePrice,"EUR"))("placeholder",ge(3,6,"PURCHASE_PRICE"))("readonly",!1)}}function dFt(i,e){if(i&1){let t=de();O(0,"co-input-date",20),le(1,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R(2);return Rt(o.entryDate,r)||(o.entryDate=r),U(r)}),I()}if(i&2){let t=R(2);Nt("model",t.entryDate),S("placeholder",ge(1,3,"DATE"))("readonly",!1)}}function uFt(i,e){if(i&1){let t=de();O(0,"div",4)(1,"div",9),$(2,tFt,2,3,"span",8),$(3,iFt,2,3,"span",8),I(),O(4,"div",10),j(5,"co-input-text",11),le(6,"sharedLocalize"),$(7,nFt,2,6,"co-input-text",12)(8,rFt,1,0,"span",13),I(),$(9,lFt,4,2,"div",10),O(10,"div",10),$(11,cFt,4,8,"div",10),$(12,dFt,2,5,"co-input-date",11),I(),O(13,"div",10)(14,"co-input-number-picker",14),le(15,"sharedLocalize"),vt("modelChange",function(r){F(t);let o=R();return Rt(o.selectedArticleDetailsData.amountInStock,r)||(o.selectedArticleDetailsData.amountInStock=r),U(r)}),W("modelChange",function(r){F(t);let o=R();return U(o.amountInStockChanged(r))}),I(),O(16,"div",15)(17,"co-list-of-values",16),le(18,"sharedLocalize"),W("modelChange",function(r){F(t);let o=R();return U(o.handleSelectedStockState(r))}),I()()()()}if(i&2){let t=R();m(2),ee(t.newStockLine?2:-1),m(),ee(t.newStockLine?-1:3),m(2),S("model",t.selectedWarehouse==null?null:t.selectedWarehouse.warehouseDescription)("placeholder",ge(6,15,"WAREHOUSE"))("readonly",!0),m(2),ee(t.selectedArticleDetailsData.serialNoItem?7:8),m(2),ee(t.articleFlat?9:-1),m(2),ee(t.articleStockInfo.length>0?11:-1),m(),ee(t.selectedArticleDetailsData?12:-1),m(2),Nt("model",t.selectedArticleDetailsData.amountInStock),S("label",ge(15,17,"STOCK"))("min",0),m(3),S("collection",t.stockState)("displayField","stateDescription")("label",ge(18,19,"STOCK_STATE"))}}function hFt(i,e){i&1&&(j(0,"span",22),le(1,"sharedLocalize")),i&2&&S("textContent",ge(1,1,"STOCK_BELOW_ZERO_TEXT"))}function fFt(i,e){if(i&1&&(j(0,"span",22),le(1,"sharedLocalize")),i&2){let t=R(2);S("textContent",ge(1,1,t.validationMessage))}}function _Ft(i,e){if(i&1){let t=de();O(0,"div",21),$(1,hFt,2,3,"span",22),$(2,fFt,2,3,"span",22),O(3,"co-button",23),W("click",function(){F(t);let r=R();return U(r.handleOkClick())}),I(),O(4,"co-button",24),W("click",function(){F(t);let r=R();return U(r.togglePopup())}),I()()}if(i&2){let t=R();m(),ee(t.stockBelow?1:-1),m(),ee(t.validationMessage?2:-1),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CheckDuotone))("disabled",t.disabled),m(),S("iconData",t.iconCacheService.getIcon(t.icons.CrossSkinny))}}var ZYe=(()=>{let e=class e{set setSelectedArticleDetailsData(n){this.selectedArticleDetailsData=n,n&&(n.entryDate&&(this.entryDate=n.entryDate),this.disabled=n.stockStateId&&n.stockStateRemark?.length<=1)}set setArticleFlat(n){this.articleFlat=n}set selectedLocationNo(n){this._selectedLocationNo=n}get selectedLocationNo(){return this._selectedLocationNo}set setArticleStockInfo(n){this.articleStockInfo=n}constructor(n,r){this.iconCacheService=n,this._stockService=r,this.icons=ot,this.selectedArticleDetailsData=new Il,this.entryDate=new Date,this.disabled=!1,this.articleStockInfo=[],this.articleFlat=new Ym,this.stockState=[],this.editingRow=!1,this.newStockLine=!1,this.deleteStockLine=!1,this.articleDetailsInformation=new Nu,this.selectedWarehouse=new eE,this.togglePopupEvent=new re,this.saveEvent=new re,this.stockLocations=[],this.stockStatus=[],this.stockBelow=!1,this.validationMessage=""}ngOnInit(){this._stockService.getStockState().then(n=>{this.stockState=n})}amountInStockChanged(n){this.selectedArticleDetailsData.amountInStock=n}handleOkClick(){return B(this,null,function*(){this.validationMessage="",this.stockBelow=!1;let n=this.validateForm();if(n){this.validationMessage=n;return}if(this.selectedArticleDetailsData.stockAssigned>this.selectedArticleDetailsData.amountInStock){this.stockBelow=!0;return}this.handleStockChange(),yield this._stockService.updateArticleDetails(this.selectedArticleDetailsData),this.togglePopup()})}togglePopup(){this.stockBelow=!1,this.togglePopupEvent.emit()}locationForNumber(n){return this.stockLocations?.find(r=>r.locationNo===n)?this.stockLocations?.find(r=>r.locationNo===n):""}locationChanged(n){this.selectedLocationNo=n.locationNo,this.selectedArticleDetailsData.locationNo=n.locationNo}handleStockChange(){this.selectedArticleDetailsData.selected=!0,this.articleFlat.goodId?this.selectedArticleDetailsData.goodId=this.articleFlat.goodId:this.articleDetailsInformation.goodId&&(this.selectedArticleDetailsData.goodId=parseInt(this.articleDetailsInformation.goodId)),this.selectedArticleDetailsData.entryDate=new Date,this.deleteStockLine?(this.selectedWarehouse.warehouseNo=this.selectedArticleDetailsData.warehouseNo,this.selectedArticleDetailsData.amountInStock=0):(this.selectedArticleDetailsData.warehouseNo=this.selectedWarehouse.warehouseNo,this.selectedLocationNo&&this.articleFlat?.locationRegistered&&(this.selectedArticleDetailsData.locationNo=this.selectedLocationNo?.toString()))}handleSelectedStockState(n){this.selectedArticleDetailsData.stockStateId=n.stockStateId}validateForm(){return this.deleteStockLine?null:this.selectedWarehouse?.warehouseNo===null||this.selectedWarehouse?.warehouseNo===void 0?"WAREHOUSE_IS_REQUIRED":this.selectedArticleDetailsData.locationItem&&!this.selectedArticleDetailsData?.locationNo?.trim()?"LOCATION_IS_REQUIRED":this.selectedArticleDetailsData.serialNoItem&&!this.selectedArticleDetailsData?.serialNo?.trim()?"SERIAL_NR_IS_REQUIRED":this.selectedArticleDetailsData.batchItem&&!this.selectedArticleDetailsData?.batchNo?.trim()?"BATCH_IS_REQUIRED":this.selectedArticleDetailsData?.amountInStock===null||this.selectedArticleDetailsData?.amountInStock===void 0?"STOCK_IS_REQUIRED":null}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-location-popup"]],inputs:{articleExtended:"articleExtended",editingRow:"editingRow",newStockLine:"newStockLine",deleteStockLine:"deleteStockLine",setSelectedArticleDetailsData:"setSelectedArticleDetailsData",setArticleFlat:"setArticleFlat",articleDetailsInformation:"articleDetailsInformation",selectedWarehouse:"selectedWarehouse",selectedLocationNo:"selectedLocationNo",setArticleStockInfo:"setArticleStockInfo",stockLocations:"stockLocations",stockStatus:"stockStatus"},outputs:{togglePopupEvent:"togglePopupEvent",saveEvent:"saveEvent"},standalone:!1,decls:8,vars:6,consts:[["headerTemplate",""],["footerTemplate",""],[1,"stock-grid"],[3,"closeClick","showCloseIcon","modal","headerTemplate","footerTemplate"],[1,"dialog-wrapper"],[1,"co-dialog-header-title-wrapper"],[3,"iconData"],[1,"co-dialog-header-title",3,"textContent"],[1,"stock-header",3,"textContent"],[1,"stock-dialog-header"],[1,"stock-dialog-row"],[3,"model","placeholder","readonly"],[3,"model","placeholder","required","readonly"],[1,"filler"],[3,"modelChange","model","label","min"],[1,"transfer-bottom-row"],[3,"modelChange","collection","displayField","label"],[3,"modelChange","model","placeholder","required","readonly"],[3,"model","collection","displayField","label","required"],[3,"modelChange","model","collection","displayField","label","required"],[3,"modelChange","model","placeholder","readonly"],[1,"button-wrapper","ok-cancel-buttons"],[1,"minimum-stock",3,"textContent"],[1,"save-button",3,"click","iconData","disabled"],[1,"cancel-button",3,"click","iconData"]],template:function(r,o){if(r&1){let s=de();O(0,"div",2)(1,"co-dialog",3),W("closeClick",function(){return F(s),U(o.togglePopup())}),Yt(2,$xt,4,4,"ng-template",null,0,zi),$(4,eFt,3,3,"div",4),$(5,uFt,19,21,"div",4),Yt(6,_Ft,5,5,"ng-template",null,1,zi),I()()}if(r&2){let s=ln(3),a=ln(7);m(),S("showCloseIcon",!0)("modal",!0)("headerTemplate",s)("footerTemplate",a),m(3),ee(o.deleteStockLine?4:-1),m(),ee(o.deleteStockLine?-1:5)}},dependencies:[Ki,So,ri,tS,qo,ns,eS,H$,kt],encapsulation:2});let i=e;return i})();function EFt(i,e){if(i&1){let t=de();O(0,"co-stock-transfer",12),W("handleStickerClicked",function(r){F(t);let o=R();return U(o.handleStickerClicked.emit(r))})("handleTogglePopup",function(){F(t);let r=R();return U(r.toggleTransferDialog())}),I()}if(i&2){let t=R();S("articleToTransfer",t.articleDetails)("allWarehouses",t.allWarehouses)("stockLocations",t.stockLocations)("articleFlat",t.articleFlat)}}function mFt(i,e){if(i&1){let t=de();O(0,"co-stock-location-popup",13),W("togglePopupEvent",function(){F(t);let r=R();return U(r.toggleConfirmationDialog())}),I()}if(i&2){let t=R();S("articleExtended",t.article)("selectedWarehouse",t.selectedWarehouse)("setArticleFlat",t.articleFlat)("selectedLocationNo",t.selectedLocationNo)("stockLocations",t.stockLocations)("articleDetailsInformation",t.articleDetailsInformation)("setArticleStockInfo",t.data)("setSelectedArticleDetailsData",t.selectedArticleDetailsData)("newStockLine",t.newStockLine)("deleteStockLine",t.deleteStockLine)("stockStatus",t.stockStatus)}}function gFt(i,e){if(i&1){let t=de();O(0,"co-icon",5),W("click",function(){F(t);let r=R();return U(r.handleStockTransferClick(r.selectedRow))}),I()}if(i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.ArrowRightArrowLeftRegular))}}function AFt(i,e){if(i&1){let t=de();O(0,"co-icon",5),W("click",function(){F(t);let r=R();return U(r.openSendMethodDialog(r.selectedRow))}),I()}if(i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.SolidBarcodeReadTag))}}function TFt(i,e){if(i&1){let t=de();O(0,"co-icon",5),W("click",function(){F(t);let r=R();return U(r.handleDeleteRow(r.selectedRow))}),I()}if(i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.TrashCanRegular))}}function SFt(i,e){i&1&&(j(0,"span",7),le(1,"sharedLocalize")),i&2&&S("textContent",ge(1,1,"STOCK_BELOW_ZERO_TEXT"))}function CFt(i,e){if(i&1){let t=de();O(0,"div",14),W("click",function(){let r=F(t).row,o=R();return U(o.onOkClickSendLocations(r))}),j(1,"co-icon",6)(2,"span",15),I()}if(i&2){let t=e.row,n=R();m(),S("iconData",n.iconCacheService.getIcon(n.icons.EditPenRegular)),m(),S("textContent",t.amountInStock)}}function RFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.locationNo)}}function OFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.batchNo)}}function IFt(i,e){if(i&1&&(O(0,"co-simple-grid-column",9),le(1,"sharedLocalize"),Yt(2,OFt,1,1,"ng-template",10),I()),i&2){let t=R();S("headerText",ge(1,3,"BATCH"))("field","batchNo"),m(2),S("templateType",t.SimpleGridColumnTemplateType.Content)}}function NFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.serialNo)}}function vFt(i,e){if(i&1&&(O(0,"co-simple-grid-column",9),le(1,"sharedLocalize"),Yt(2,NFt,1,1,"ng-template",10),I()),i&2){let t=R();S("headerText",ge(1,3,"SERIAL_NO"))("field","serialNo"),m(2),S("templateType",t.SimpleGridColumnTemplateType.Content)}}function DFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.stockAssigned)}}function yFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.amountInStockFree)}}function bFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.currency)}}function LFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.purchasePrice)}}function wFt(i,e){if(i&1&&j(0,"span",15),i&2){let t=e.row;S("textContent",t.supplierNo)}}function PFt(i,e){if(i&1){let t=de();O(0,"co-stock-print-sticker",16),W("close",function(){F(t);let r=R();return U(r.showSendMethodDialog=!1)}),I()}}var JYe=(()=>{let e=class e extends Ac{set warehouseNo(n){this._warehouseNo!==n&&(this._warehouseNo=n,this.getData(),this._getWarehouseLocations())}get warehouseNo(){return this._warehouseNo}constructor(n,r,o){super(),this.iconCacheService=n,this._stockService=r,this._changeDetector=o,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.articleStockInformation=[],this.articleWarehouse=[],this.allWarehouses=[],this.dataWareHouseCode=[],this.transferIconClicked=new re,this.sendMethodDialogClicked=new re,this.handleStickerClicked=new re,this.showConfirmationDialog=!1,this.newStockLine=!1,this.deleteStockLine=!1,this.cannotDelete=!1,this.articleDetailsInformation=new Nu,this.stockStatus=[],this.selectedArticleDetailsData=new Il,this.data=[],this.stockLocations=[],this.stockStickerPrintRequest=new QYe.PrintStockStickersRequest,this.showSendMethodDialog=!1,this._subs=[]}ngOnInit(){this._stockService.getStockState().then(n=>{this.stockStatus=n})}ngOnDestroy(){this._subs.forEach(n=>n.unsubscribe())}openSendMethodDialog(n){this._buildPrintStockStickersRequest(),this.showSendMethodDialog=!0,this.sendMethodDialogClicked.emit(n)}handleStockTransferClick(n){this.articleDetails=n,this.showStockTransfer=!0}onRowSelected(n){this.selectedRow=n,this.cannotDelete=!1}onOkClickSendLocations(n){this.selectedArticleDetailsData=n,this.newStockLine=!1,this.showConfirmationDialog=!0}handleDeleteRow(n){this.selectedArticleDetailsData=n,this.selectedArticleDetailsData.stockAssigned>0?(this.deleteStockLine=!1,this.showConfirmationDialog=!1,this.cannotDelete=!0):(this.deleteStockLine=!0,this.showConfirmationDialog=!0,this.cannotDelete=!1)}handleAddRow(){this.data?.length||(this.data=[]),this.data.push(new Il),this.selectedArticleDetailsData=this.data[this.data.length-1],this.newStockLine=!0,this.showConfirmationDialog=!0}toggleConfirmationDialog(){this.showConfirmationDialog=!this.showConfirmationDialog,this.getData(),this._stockService.refreshStockInformation.emit()}toggleTransferDialog(){this.showStockTransfer=!this.showStockTransfer,this.getData()}getData(){let n=new Nu;n.goodId=this.goodId.toString(),n.warehouseNumber=this.warehouseNo,this._stockService.getArticleDetails(n).then(r=>{this.data=r,this._changeDetector.detectChanges()}),this._getWarehouseLocations()}_getWarehouseLocations(){this._stockService.getStockManagementLocations(this.warehouseNo).then(n=>{this.stockLocations=n})}_buildPrintStockStickersRequest(){this.stockStickerPrintRequest.goodId=this.article.goodId,this.stockStickerPrintRequest.warehouse=this.selectedWarehouse.warehouseNo,this.stockStickerPrintRequest.location=this.selectedLocationNo,this.stockStickerPrintRequest.batch=this.selectedRow.batchNo,this.stockStickerPrintRequest.serial=this.selectedRow.serialNo,this.stockStickerPrintRequest.amount=this.selectedRow.amountInStock}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr),Q(pn))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-location"]],inputs:{warehouseNo:"warehouseNo",article:"article",articleStockInformation:"articleStockInformation",articleWarehouse:"articleWarehouse",allWarehouses:"allWarehouses",articleFlat:"articleFlat",dataWareHouseCode:"dataWareHouseCode",selectedWarehouse:"selectedWarehouse"},outputs:{transferIconClicked:"transferIconClicked",sendMethodDialogClicked:"sendMethodDialogClicked",handleStickerClicked:"handleStickerClicked"},standalone:!1,features:[pi],decls:35,vars:50,consts:[[1,"stock-grid"],[1,"stock-transfer-wrapper"],[1,"stock-transfer-dialog",3,"articleToTransfer","allWarehouses","stockLocations","articleFlat"],[3,"articleExtended","selectedWarehouse","setArticleFlat","selectedLocationNo","stockLocations","articleDetailsInformation","setArticleStockInfo","setSelectedArticleDetailsData","newStockLine","deleteStockLine","stockStatus"],[1,"stock-transfer-add"],[1,"menu-icon",3,"click","iconData"],[1,"menu-icon",3,"iconData"],[1,"minimum-stock",3,"textContent"],[1,"simple-grid",3,"addRow","selectRow","data","showAdd","inlineEdit","showToolbar"],[3,"headerText","field"],[3,"templateType"],[3,"width","headerText","field"],[1,"stock-transfer-dialog",3,"handleStickerClicked","handleTogglePopup","articleToTransfer","allWarehouses","stockLocations","articleFlat"],[3,"togglePopupEvent","articleExtended","selectedWarehouse","setArticleFlat","selectedLocationNo","stockLocations","articleDetailsInformation","setArticleStockInfo","setSelectedArticleDetailsData","newStockLine","deleteStockLine","stockStatus"],[1,"stock-amount",3,"click"],[3,"textContent"],[3,"close"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div",1),$(2,EFt,1,4,"co-stock-transfer",2),I(),$(3,mFt,1,11,"co-stock-location-popup",3),O(4,"div",4)(5,"co-icon",5),W("click",function(){return o.handleAddRow()}),I(),$(6,gFt,1,1,"co-icon",6),$(7,AFt,1,1,"co-icon",6),$(8,TFt,1,1,"co-icon",6),$(9,SFt,2,3,"span",7),I(),O(10,"co-simple-grid",8),W("addRow",function(){return o.handleAddRow()})("selectRow",function(a){return o.onRowSelected(a)}),O(11,"co-simple-grid-column",9),le(12,"sharedLocalize"),Yt(13,CFt,3,2,"ng-template",10),I(),O(14,"co-simple-grid-column",11),le(15,"sharedLocalize"),Yt(16,RFt,1,1,"ng-template",10),I(),$(17,IFt,3,5,"co-simple-grid-column",9),$(18,vFt,3,5,"co-simple-grid-column",9),O(19,"co-simple-grid-column",9),le(20,"sharedLocalize"),Yt(21,DFt,1,1,"ng-template",10),I(),O(22,"co-simple-grid-column",9),le(23,"sharedLocalize"),Yt(24,yFt,1,1,"ng-template",10),I(),O(25,"co-simple-grid-column",9),le(26,"sharedLocalize"),Yt(27,bFt,1,1,"ng-template",10),I(),O(28,"co-simple-grid-column",9),le(29,"sharedLocalize"),Yt(30,LFt,1,1,"ng-template",10),I(),O(31,"co-simple-grid-column",9),le(32,"sharedLocalize"),Yt(33,wFt,1,1,"ng-template",10),I()()(),$(34,PFt,1,0,"co-stock-print-sticker")),r&2&&(m(2),ee(o.showStockTransfer?2:-1),m(),ee(o.showConfirmationDialog?3:-1),m(2),S("iconData",o.iconCacheService.getIcon(o.icons.PlusRegular)),m(),ee(o.selectedRow?6:-1),m(),ee(o.selectedRow?7:-1),m(),ee(o.selectedRow?8:-1),m(),ee(o.cannotDelete?9:-1),m(),S("data",o.data)("showAdd",!1)("inlineEdit",!1)("showToolbar",!0),m(),S("headerText",ge(12,36,"STOCK"))("field","amountInStock"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("width",150)("headerText",ge(15,38,"LOCATION"))("field","locationNo"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),ee(o.articleFlat!=null&&o.articleFlat.batch?17:-1),m(),ee(o.articleFlat!=null&&o.articleFlat.serial?18:-1),m(),S("headerText",ge(20,40,"ALLOCATED"))("field","stockAssigned"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(23,42,"AVAILABLE_STOCK"))("field","amountInStockFree"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(26,44,"VALUTA"))("field","currency"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(29,46,"PURCHASE_PRICE"))("field","purchasePrice"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(32,48,"SUPPLIERNR"))("field","supplierNo"),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),ee(o.showSendMethodDialog?34:-1))},dependencies:[Al,$a,Ja,ri,WYe,XYe,ZYe,kt],encapsulation:2});let i=e;return i})();var K_=class{};function kFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.mutationDate,"dd-MM-yyyy"))}}var $Ye=(()=>{let e=class e extends Ac{constructor(n,r){super(),this.iconCacheService=n,this._stockService=r,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.stockHistoryInformation=[],this.data=[]}getData(){return B(this,null,function*(){let n=new K_;n.type="V",n.goodId=this.goodId.toString(),this._stockService.getStockHistory(n).then(r=>{this.data=r})})}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-history"]],inputs:{stockHistoryInformation:"stockHistoryInformation",articleGoodId:"articleGoodId"},standalone:!1,features:[pi],decls:28,vars:54,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,kFt,2,4,"ng-template",2),I(),j(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),j(6,"co-simple-grid-column",3),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",3),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",3),le(13,"sharedLocalize"),j(14,"co-simple-grid-column",3),le(15,"sharedLocalize"),j(16,"co-simple-grid-column",3),le(17,"sharedLocalize"),j(18,"co-simple-grid-column",3),le(19,"sharedLocalize"),j(20,"co-simple-grid-column",3),le(21,"sharedLocalize"),j(22,"co-simple-grid-column",3),le(23,"sharedLocalize"),j(24,"co-simple-grid-column",3),le(25,"sharedLocalize"),j(26,"co-simple-grid-column",3),le(27,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,28,"DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,30,"TIME"))("field","mutationTime"),m(2),S("headerText",ge(7,32,"AMOUNT"))("field","amount"),m(2),S("headerText",ge(9,34,"WAREHOUSE"))("field","wareHouseNr"),m(2),S("headerText",ge(11,36,"LOCATION"))("field","locationNr"),m(2),S("headerText",ge(13,38,"ORDERNUMBER"))("field","docNr"),m(2),S("headerText",ge(15,40,"ORDER_RULE"))("field","transLineNr"),m(2),S("headerText",ge(17,42,"STATUS"))("field","stockStateId"),m(2),S("headerText",ge(19,44,"REMARK"))("field","stockStateRemarkId"),m(2),S("headerText",ge(21,46,"VALUTA"))("field","currencyCode"),m(2),S("headerText",ge(23,48,"RELATION_NR"))("field","relationNr"),m(2),S("headerText",ge(25,50,"USER"))("field","user"),m(2),S("headerText",ge(27,52,"MUTATION_TYPE"))("field","mutationType"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();function FFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.mutationDate,"dd-MM-yyyy"))}}var eKe=(()=>{let e=class e extends Ac{constructor(n){super(),this._stockService=n,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.data=[]}getData(){return B(this,null,function*(){let n=new K_;n.type="O",n.goodId=this.goodId.toString(),this._stockService.getStockHistory(n).then(r=>{this.data=r})})}};e.\u0275fac=function(r){return new(r||e)(Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-order-supply-stock-history"]],standalone:!1,features:[pi],decls:28,vars:54,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,FFt,2,4,"ng-template",2),I(),j(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),j(6,"co-simple-grid-column",3),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",3),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",3),le(13,"sharedLocalize"),j(14,"co-simple-grid-column",3),le(15,"sharedLocalize"),j(16,"co-simple-grid-column",3),le(17,"sharedLocalize"),j(18,"co-simple-grid-column",3),le(19,"sharedLocalize"),j(20,"co-simple-grid-column",3),le(21,"sharedLocalize"),j(22,"co-simple-grid-column",3),le(23,"sharedLocalize"),j(24,"co-simple-grid-column",3),le(25,"sharedLocalize"),j(26,"co-simple-grid-column",3),le(27,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,28,"MUTATION_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,30,"MUTATION_TIME"))("field","mutationTime"),m(2),S("headerText",ge(7,32,"AMOUNT"))("field","amount"),m(2),S("headerText",ge(9,34,"WAREHOUSE"))("field","wareHouseNr"),m(2),S("headerText",ge(11,36,"LOCATION"))("field","locationNr"),m(2),S("headerText",ge(13,38,"DOCUMENT_NUMBER"))("field","docNr"),m(2),S("headerText",ge(15,40,"LINE"))("field","transLineNr"),m(2),S("headerText",ge(17,42,"STOCK_STATE"))("field","stockStateId"),m(2),S("headerText",ge(19,44,"STOCK_REMARK"))("field","stockStateRemarkId"),m(2),S("headerText",ge(21,46,"VALUTA"))("field","currencyCode"),m(2),S("headerText",ge(23,48,"RELATION_NR"))("field","relationNr"),m(2),S("headerText",ge(25,50,"USER"))("field","user"),m(2),S("headerText",ge(27,52,"MUTATION_TYPE"))("field","mutationType"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();function BFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.mutationDate,"dd-MM-yyyy"))}}var tKe=(()=>{let e=class e extends Ac{constructor(n){super(),this._stockService=n,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.data=[]}getData(){return B(this,null,function*(){let n=new K_;n.type="C",n.goodId=this.goodId.toString(),this._stockService.getStockHistory(n).then(r=>{this.data=r})})}};e.\u0275fac=function(r){return new(r||e)(Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-order-stock-commission-history"]],standalone:!1,features:[pi],decls:28,vars:54,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,BFt,2,4,"ng-template",2),I(),j(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),j(6,"co-simple-grid-column",3),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",3),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",3),le(13,"sharedLocalize"),j(14,"co-simple-grid-column",3),le(15,"sharedLocalize"),j(16,"co-simple-grid-column",3),le(17,"sharedLocalize"),j(18,"co-simple-grid-column",3),le(19,"sharedLocalize"),j(20,"co-simple-grid-column",3),le(21,"sharedLocalize"),j(22,"co-simple-grid-column",3),le(23,"sharedLocalize"),j(24,"co-simple-grid-column",3),le(25,"sharedLocalize"),j(26,"co-simple-grid-column",3),le(27,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,28,"MUTATION_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,30,"MUTATION_TIME"))("field","mutationTime"),m(2),S("headerText",ge(7,32,"AMOUNT"))("field","amount"),m(2),S("headerText",ge(9,34,"WAREHOUSE"))("field","wareHouseNr"),m(2),S("headerText",ge(11,36,"LOCATION"))("field","locationNr"),m(2),S("headerText",ge(13,38,"DOCUMENT_NUMBER"))("field","docNr"),m(2),S("headerText",ge(15,40,"LINE"))("field","transLineNr"),m(2),S("headerText",ge(17,42,"STOCK_STATE"))("field","stockStateId"),m(2),S("headerText",ge(19,44,"STOCK_REMARK"))("field","stockStateRemarkId"),m(2),S("headerText",ge(21,46,"VALUTA"))("field","currencyCode"),m(2),S("headerText",ge(23,48,"RELATION_NR"))("field","relationNr"),m(2),S("headerText",ge(25,50,"USER"))("field","user"),m(2),S("headerText",ge(27,52,"MUTATION_TYPE"))("field","mutationType"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();function GFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.mutationDate,"dd-MM-yyyy"))}}var iKe=(()=>{let e=class e extends Ac{constructor(n){super(),this._stockService=n,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.data=[]}getData(){return B(this,null,function*(){let n=new K_;n.type="B",n.goodId=this.goodId.toString(),this._stockService.getStockHistory(n).then(r=>{this.data=r})})}};e.\u0275fac=function(r){return new(r||e)(Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-order-stock-history"]],standalone:!1,features:[pi],decls:28,vars:54,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,GFt,2,4,"ng-template",2),I(),j(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),j(6,"co-simple-grid-column",3),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",3),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),j(12,"co-simple-grid-column",3),le(13,"sharedLocalize"),j(14,"co-simple-grid-column",3),le(15,"sharedLocalize"),j(16,"co-simple-grid-column",3),le(17,"sharedLocalize"),j(18,"co-simple-grid-column",3),le(19,"sharedLocalize"),j(20,"co-simple-grid-column",3),le(21,"sharedLocalize"),j(22,"co-simple-grid-column",3),le(23,"sharedLocalize"),j(24,"co-simple-grid-column",3),le(25,"sharedLocalize"),j(26,"co-simple-grid-column",3),le(27,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,28,"DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,30,"TIME"))("field","mutationTime"),m(2),S("headerText",ge(7,32,"AMOUNT"))("field","amount"),m(2),S("headerText",ge(9,34,"WAREHOUSE"))("field","wareHouseNr"),m(2),S("headerText",ge(11,36,"LOCATION"))("field","locationNr"),m(2),S("headerText",ge(13,38,"ORDERNUMBER"))("field","docNr"),m(2),S("headerText",ge(15,40,"ORDER_RULE"))("field","transLineNr"),m(2),S("headerText",ge(17,42,"STATUS"))("field","stockStateId"),m(2),S("headerText",ge(19,44,"REMARK"))("field","stockStateRemarkId"),m(2),S("headerText",ge(21,46,"VALUTA"))("field","currencyCode"),m(2),S("headerText",ge(23,48,"RELATION_NR"))("field","relationNr"),m(2),S("headerText",ge(25,50,"USER"))("field","user"),m(2),S("headerText",ge(27,52,"MUTATION_TYPE"))("field","mutationType"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();var nKe=(()=>{let e=class e{constructor(){this.salesOrderNavigation=new Ai}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=pt({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function jFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.mutationDate,"dd-MM-yyyy"))}}function zFt(i,e){if(i&1){let t=de();O(0,"div",5),W("click",function(){let r=F(t).row,o=R();return U(o.handleTransactionNavigation(r.docNr))}),I()}if(i&2){let t=e.row;S("textContent",t.docNr)}}var rKe=(()=>{let e=class e extends Ac{constructor(n,r){super(),this._stockService=n,this.sharedEventService=r,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.data=[]}getData(){return B(this,null,function*(){let n=new K_;n.type="T",n.goodId=this.goodId.toString(),this._stockService.getStockHistory(n).then(r=>{this.data=r.sort((o,s)=>o.docNr.toString().localeCompare(s.docNr.toString(),void 0,{numeric:!0}))})})}handleTransactionNavigation(n){let r=n.split(" ");r&&r.length>1&&r[0].toLowerCase()==="v"&&this.sharedEventService.salesOrderNavigation.next(r[1])}};e.\u0275fac=function(r){return new(r||e)(Q(wr),Q(nKe))},e.\u0275cmp=Fe({type:e,selectors:[["co-allocation-stock-history"]],standalone:!1,features:[pi],decls:29,vars:54,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText"],[3,"templateType"],[3,"headerText","field"],[3,"textContent"],[1,"clickable-link",3,"click","textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0)(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),Yt(3,jFt,2,4,"ng-template",2),I(),j(4,"co-simple-grid-column",3),le(5,"sharedLocalize"),j(6,"co-simple-grid-column",3),le(7,"sharedLocalize"),j(8,"co-simple-grid-column",3),le(9,"sharedLocalize"),j(10,"co-simple-grid-column",3),le(11,"sharedLocalize"),O(12,"co-simple-grid-column",1),le(13,"sharedLocalize"),Yt(14,zFt,1,1,"ng-template",2),I(),j(15,"co-simple-grid-column",3),le(16,"sharedLocalize"),j(17,"co-simple-grid-column",3),le(18,"sharedLocalize"),j(19,"co-simple-grid-column",3),le(20,"sharedLocalize"),j(21,"co-simple-grid-column",3),le(22,"sharedLocalize"),j(23,"co-simple-grid-column",3),le(24,"sharedLocalize"),j(25,"co-simple-grid-column",3),le(26,"sharedLocalize"),j(27,"co-simple-grid-column",3),le(28,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,28,"DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(5,30,"TIME"))("field","mutationTime"),m(2),S("headerText",ge(7,32,"AMOUNT"))("field","amount"),m(2),S("headerText",ge(9,34,"WAREHOUSE"))("field","wareHouseNr"),m(2),S("headerText",ge(11,36,"LOCATION"))("field","locationNr"),m(2),S("headerText",ge(13,38,"ORDERNUMBER")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(16,40,"ORDER_RULE"))("field","transLineNr"),m(2),S("headerText",ge(18,42,"STATUS"))("field","stockStateId"),m(2),S("headerText",ge(20,44,"REMARK"))("field","stockStateRemarkId"),m(2),S("headerText",ge(22,46,"VALUTA"))("field","currencyCode"),m(2),S("headerText",ge(24,48,"RELATION_NR"))("field","relationNr"),m(2),S("headerText",ge(26,50,"USER"))("field","user"),m(2),S("headerText",ge(28,52,"MUTATION_TYPE"))("field","mutationType"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();function KFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.transactionDate,"dd-MM-yyyy"))}}function qFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.arrivalDate,"dd-MM-yyyy"))}}function XFt(i,e){if(i&1&&(j(0,"span",4),le(1,"date")),i&2){let t=e.row;S("textContent",Wn(1,1,t.transConfirmedDate,"dd-MM-yyyy"))}}var oKe=(()=>{let e=class e extends Ac{set warehouseNo(n){this._warehouseNo!==n&&(this._warehouseNo=n,this.getData())}get warehouseNo(){return this._warehouseNo}constructor(n,r){super(),this.iconCacheService=n,this._stockService=r,this.icons=ot,this.SimpleGridColumnTemplateType=Xs,this.data=[]}getData(){return B(this,null,function*(){this.goodId&&this.warehouseNo!==void 0&&this.warehouseNo!==null&&this._stockService.stockPrognose(this.goodId,this.warehouseNo).then(n=>{this.data=n})})}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-prognose"]],inputs:{warehouseNo:"warehouseNo"},standalone:!1,features:[pi],decls:22,vars:38,consts:[[1,"simple-grid",3,"data","rowsPerPage"],[3,"headerText","field"],[3,"headerText"],[3,"templateType"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"co-simple-grid",0),j(1,"co-simple-grid-column",1),le(2,"sharedLocalize"),j(3,"co-simple-grid-column",1),le(4,"sharedLocalize"),j(5,"co-simple-grid-column",1),le(6,"sharedLocalize"),j(7,"co-simple-grid-column",1),le(8,"sharedLocalize"),O(9,"co-simple-grid-column",2),le(10,"sharedLocalize"),Yt(11,KFt,2,4,"ng-template",3),I(),O(12,"co-simple-grid-column",2),le(13,"sharedLocalize"),Yt(14,qFt,2,4,"ng-template",3),I(),j(15,"co-simple-grid-column",1),le(16,"sharedLocalize"),O(17,"co-simple-grid-column",2),le(18,"sharedLocalize"),Yt(19,XFt,2,4,"ng-template",3),I(),j(20,"co-simple-grid-column",1),le(21,"sharedLocalize"),I()),r&2&&(S("data",o.data)("rowsPerPage",20),m(),S("headerText",ge(2,20,"AVAILABLE_STOCK2"))("field","available"),m(2),S("headerText",ge(4,22,"FREE_STOCK"))("field","freeStock"),m(2),S("headerText",ge(6,24,"IN_ORDER"))("field","inOrder"),m(2),S("headerText",ge(8,26,"PURCHASE_ORDER"))("field","transNr"),m(2),S("headerText",ge(10,28,"PURCHASE_ORDER_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(13,30,"ARRIVAL_DATE")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(16,32,"REFERENCE"))("field","reference"),m(2),S("headerText",ge(18,34,"DELIVERY_DATE_CONFIRMED")),m(2),S("templateType",o.SimpleGridColumnTemplateType.Content),m(),S("headerText",ge(21,36,"FUTURE_FREE_STOCK"))("field","laterAvailable"))},dependencies:[Al,$a,Ja,Er,kt],encapsulation:2});let i=e;return i})();function QFt(i,e){if(i&1){let t=de();O(0,"co-stock-tab",6),W("locationClicked",function(r){F(t);let o=R();return U(o.handleLocationClicked(r))}),I()}if(i&2){let t=R();S("articleStockInformation",t.stockInformation)}}function JFt(i,e){if(i&1&&j(0,"co-stock-prognose",2),i&2){let t=R();S("goodId",t.article.goodId)("warehouseNo",t.selectedWarehouse.warehouseNo)}}function $Ft(i,e){if(i&1){let t=de();O(0,"co-stock-location",7),W("transferIconClicked",function(r){F(t);let o=R();return U(o.transferIconClicked.emit(r))})("sendMethodDialogClicked",function(r){F(t);let o=R();return U(o.sendMethodDialogClicked.emit(r))}),I()}if(i&2){let t=R();S("articleStockInformation",t.stockInformation)("article",t.article)("goodId",t.article.goodId)("warehouseNo",t.selectedWarehouse.warehouseNo)("articleFlat",t.articleFlat)("dataWareHouseCode",t.warehouses)("selectedWarehouse",t.selectedWarehouse)}}function e5t(i,e){if(i&1){let t=de();O(0,"co-order-tab",8),W("transferIconClicked",function(r){F(t);let o=R();return U(o.transferIconClicked.emit(r))})("sendMethodDialogClicked",function(r){F(t);let o=R();return U(o.sendMethodDialogClicked.emit(r))})("handleTransactionClick",function(r){F(t);let o=R();return U(o.handleSalesOrderClick.emit(r))}),I()}if(i&2){let t=R();S("warehouseNo",t.selectedWarehouse.warehouseNo)("goodId",t.article.goodId)}}function t5t(i,e){if(i&1){let t=de();O(0,"co-order-stock-tab",9),W("handleTransactionClick",function(r){F(t);let o=R();return U(o.handlePurchaseOrderClick.emit(r))}),I()}if(i&2){let t=R();S("warehouseNo",t.selectedWarehouse.warehouseNo)("goodId",t.article.goodId)}}function i5t(i,e){if(i&1&&j(0,"co-stock-history",5),i&2){let t=R();S("goodId",t.article.goodId)}}function n5t(i,e){if(i&1&&j(0,"co-order-supply-stock-history",5),i&2){let t=R();S("goodId",t.article.goodId)}}function r5t(i,e){if(i&1&&j(0,"co-order-stock-commission-history",5),i&2){let t=R();S("goodId",t.article.goodId)}}function o5t(i,e){if(i&1&&j(0,"co-order-stock-history",5),i&2){let t=R();S("goodId",t.article.goodId)}}function s5t(i,e){if(i&1&&j(0,"co-allocation-stock-history",5),i&2){let t=R();S("goodId",t.article.goodId)}}var sKe=(()=>{let e=class e{constructor(n,r,o,s){this._stockService=n,this._dictionaryService=r,this._changeDetector=o,this._stockScreenConfigService=s,this.icons=ot,this.stockInformation=[],this.warehouses=[],this.transferIconClicked=new re,this.sendMethodDialogClicked=new re,this.handleSalesOrderClick=new re,this.handlePurchaseOrderClick=new re,this.selectedWarehouse=new eE,this.tabs=[],this.historyTabs=[]}ngOnInit(){this.tabs=[{title:this._dictionaryService.get("OVERVIEW"),active:!0,cfg:vu.Overview},{title:this._dictionaryService.get("STOCK_FORECAST"),active:!1,cfg:vu.InventoryForecast},{title:this._dictionaryService.get("STOCK_DETAILS"),active:!1,cfg:vu.InventoryDetails},{title:this._dictionaryService.get("ALREADY_IN_ORDER"),active:!1,cfg:vu.OverviewDetails},{title:this._dictionaryService.get("IN_ORDER"),active:!1,cfg:vu.InOrder},{title:this._dictionaryService.get("HISTORY"),active:!1,cfg:vu.History}],this._stockScreenConfigService.immediatelyHidden(this.tabs[0].cfg)&&(this.tabs[0].active=!1,this.tabs.find(n=>this._stockScreenConfigService.immediatelyVisible(n.cfg)).active=!0),this.historyTabs=[{title:this._dictionaryService.get("STOCK"),active:!0,cfg:vu.HistoryStock},{title:this._dictionaryService.get("ORDER_STOCK"),active:!1,cfg:vu.HistoryOrderStock},{title:this._dictionaryService.get("ORDER_COMMISSION"),active:!1,cfg:vu.HistoryOrderCommission},{title:this._dictionaryService.get("ORDER"),active:!1,cfg:vu.HistoryOrder},{title:this._dictionaryService.get("ALLOCATION"),active:!1,cfg:vu.HistoryAssign}],this._stockScreenConfigService.immediatelyHidden(this.historyTabs[0].cfg)&&(this.historyTabs[0].active=!1,this.historyTabs.find(n=>this._stockScreenConfigService.immediatelyVisible(n.cfg)).active=!0)}handleLocationClicked(n){this.tabs[0].active=!1,this.tabs[2].active=!0;let r=this.wareHouseForCode(parseInt(n));this.selectedWarehouse=r,this.handleWarehouseSelected(this.selectedWarehouse),this.getStockData(this.selectedWarehouse)}handleWarehouseSelected(n){this.selectedWarehouse=n}getStockData(n){this.handleWarehouseSelected(n),this._changeDetector.markForCheck(),this._changeDetector.detectChanges()}wareHouseForCode(n){return this.warehouses.find(r=>r.warehouseNo===n)}};e.\u0275fac=function(r){return new(r||e)(Q(wr),Q(kn),Q(pn),Q(mC))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock-tabs"]],inputs:{stockInformation:"stockInformation",article:"article",articleFlat:"articleFlat",warehouses:"warehouses"},outputs:{transferIconClicked:"transferIconClicked",sendMethodDialogClicked:"sendMethodDialogClicked",handleSalesOrderClick:"handleSalesOrderClick",handlePurchaseOrderClick:"handlePurchaseOrderClick"},standalone:!1,decls:13,vars:22,consts:[[3,"warehouseSelected","wareHouseLabel","wareHouseSearchLabel","tabs","dataWareHouseCode","selectedWarehouse","secondaryTabs","ActivateSecondaryTabs","showWarehouseSelection"],[3,"articleStockInformation"],[3,"goodId","warehouseNo"],[3,"articleStockInformation","article","goodId","warehouseNo","articleFlat","dataWareHouseCode","selectedWarehouse"],[3,"warehouseNo","goodId"],[3,"goodId"],[3,"locationClicked","articleStockInformation"],[3,"transferIconClicked","sendMethodDialogClicked","articleStockInformation","article","goodId","warehouseNo","articleFlat","dataWareHouseCode","selectedWarehouse"],[3,"transferIconClicked","sendMethodDialogClicked","handleTransactionClick","warehouseNo","goodId"],[3,"handleTransactionClick","warehouseNo","goodId"]],template:function(r,o){r&1&&(O(0,"co-tab-bar",0),le(1,"sharedLocalize"),le(2,"sharedLocalize"),W("warehouseSelected",function(a){return o.handleWarehouseSelected(a)}),I(),$(3,QFt,1,1,"co-stock-tab",1),$(4,JFt,1,2,"co-stock-prognose",2),$(5,$Ft,1,7,"co-stock-location",3),$(6,e5t,1,2,"co-order-tab",4),$(7,t5t,1,2,"co-order-stock-tab",4),$(8,i5t,1,1,"co-stock-history",5),$(9,n5t,1,1,"co-order-supply-stock-history",5),$(10,r5t,1,1,"co-order-stock-commission-history",5),$(11,o5t,1,1,"co-order-stock-history",5),$(12,s5t,1,1,"co-allocation-stock-history",5)),r&2&&(S("wareHouseLabel",ge(1,18,"WAREHOUSE_SELECTION"))("wareHouseSearchLabel",ge(2,20,"SEARCH"))("tabs",o.tabs)("dataWareHouseCode",o.warehouses)("selectedWarehouse",o.selectedWarehouse)("secondaryTabs",o.historyTabs)("ActivateSecondaryTabs",o.tabs[5].active)("showWarehouseSelection",o.tabs[1].active||o.tabs[2].active),m(3),ee(o.tabs[0].active?3:-1),m(),ee(o.tabs[1].active?4:-1),m(),ee(o.tabs[2].active?5:-1),m(),ee(o.tabs[3].active?6:-1),m(),ee(o.tabs[4].active?7:-1),m(),ee(o.historyTabs[0].active&&o.tabs[5].active?8:-1),m(),ee(o.historyTabs[1].active&&o.tabs[5].active?9:-1),m(),ee(o.historyTabs[2].active&&o.tabs[5].active?10:-1),m(),ee(o.historyTabs[3].active&&o.tabs[5].active?11:-1),m(),ee(o.historyTabs[4].active&&o.tabs[5].active?12:-1))},dependencies:[kYe,xYe,UYe,BYe,JYe,$Ye,eKe,tKe,iKe,rKe,oKe,kt],encapsulation:2});let i=e;return i})();function l5t(i,e){if(i&1){let t=de();O(0,"div",0),j(1,"co-stock-information",1),O(2,"co-stock-tabs",2),W("transferIconClicked",function(r){F(t);let o=R();return U(o.handleStockTransferClick(r))})("sendMethodDialogClicked",function(r){F(t);let o=R();return U(o.handleSendMethodClick(r))})("handlePurchaseOrderClick",function(r){F(t);let o=R();return U(o.handlePurchaseOrderClick.emit(r))})("handleSalesOrderClick",function(r){F(t);let o=R();return U(o.handlePurchaseOrderClick.emit(r))}),I()()}if(i&2){let t=R();m(),S("article",t.articleExtended)("articleStockState",t.articleStockState)("allAvailableStockInformation",t.allAvailableStock)("allTechnicalStockInformation",t.allTechnicalStock)("economicalStock",t.economicalStock)("perceptibleStorage",t.perceptibleStorage),m(),S("stockInformation",t.stockInformation)("article",t.articleExtended)("articleFlat",t.articleFlat)("warehouses",t.warehouses)}}var aKe=(()=>{let e=class e{set article(n){n instanceof Bb?(this.articleExtended=n,this._goodId=n.goodId):typeof n=="number"&&(this._goodId=n)}showClass(){return!0}constructor(n,r,o,s,a,l,c){this.iconCacheService=n,this._stockService=r,this._optionsService=o,this._dictionary=s,this._changeDetector=a,this._connector=l,this._screenConfigService=c,this.icons=ot,this.handleStickerClicked=new re,this.articleWarehouse=[],this.allWarehouses=[],this.okButtonClicked=new re,this.cancelButtonClicked=new re,this.handleClick=new re,this.handlePurchaseOrderClick=new re,this.handleSalesOrderClick=new re,this.updateGridData=new re,this.loaded=!1,this.showStockInformationGrid=!0,this.showStockTransfer=!1,this.stockInformation=[],this.articleDetailsInformation=new Nu,this.stockHistory=[],this.allAvailableStock=0,this.allTechnicalStock=0,this.economicalStock=0,this.perceptibleStorage=0,this.showSendMethodDialog=!1,this.warehouses=[],this._subscriptions=[],this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(d=>this._handleSettingsLoaded(d)))}ngOnDestroy(){this.articleExtended=void 0,this.articleFlat=void 0,this._subscriptions.forEach(n=>n.unsubscribe())}ngOnInit(){this._subscriptions.push(this._stockService.refreshStockInformation.subscribe(n=>{this.getStockInformation(this.articleExtended.goodId)}))}handleStockTransferClick(n){this.stockTransferArticleDetails=n,this.showStockTransfer=!this.showStockTransfer,this.showStockInformationGrid=!this.showStockInformationGrid,this._stockService.stockStickers=new RYe}handleSendMethodClick(n){this.showSendMethodDialog=!0}handleOkClick(n){n.selected=!0,n.entryDate=new Date,this._stockService.updateArticleDetails(n).then(r=>{this.handleClick.emit(),this._stockService.getArticleDetails(this.articleDetailsInformation).then(o=>{this.updateGridData.emit(o)})}),this.loaded=!0,this.loadData()}backToStock(n){this.loadData(),this.showStockTransfer=!this.showStockTransfer,this.showStockInformationGrid=!this.showStockInformationGrid}getStockInformation(n){let r=new RF;r.goodId=n.toString(),r.viewKind="M",this._stockService.getStockInformation(r).then(o=>{this.stockInformation=o,this._resetStockInformation(),this.stockInformation.forEach(s=>this.allAvailableStock+=s.availableStock),this.stockInformation.forEach(s=>this.allTechnicalStock+=s.technicalStock),this.stockInformation.forEach(s=>this.economicalStock+=s.economicalStock),this.stockInformation.forEach(s=>this.perceptibleStorage+=parseInt(s.perceptibleStorage))})}getArtStockStatus(){this._stockService.getArtStockStatus(this.articleExtended?this.articleExtended.goodId:this._goodId).then(n=>{this.articleStockState=n})}getStockManagementWarehouses(){this._stockService.getStockManagementWarehouses().then(n=>{this.warehouses=n})}_handleSettingsLoaded(n){return B(this,null,function*(){n&&(yield this._initConnection().then())})}_initConnection(){return B(this,null,function*(){yield this._connector.connect(),yield this._dictionary.setDictionary(this._optionsService.options.languageCode),setTimeout(()=>{this._changeDetector.detectChanges()}),this._screenConfigService.loadConfig().then(n=>{n&&n.length>0&&(this.loaded=!0,this.loadData())})})}_resetStockInformation(){this.allAvailableStock=0,this.allTechnicalStock=0,this.economicalStock=0,this.perceptibleStorage=0}loadData(){if(this.loaded){if(this._goodId&&!this.articleExtended){let n=new IK;n.goodId=this._goodId,this._stockService.searchArticles(n).then(r=>{r[0]&&(this.articleExtended=r[0],this._stockService.getArticleFlat(r[0].articleNumber).then(o=>{this.articleFlat=o}))})}this.getArtStockStatus(),this.getStockManagementWarehouses(),this.getStockInformation(this.articleExtended?this.articleExtended.goodId:this._goodId)}this._changeDetector.markForCheck(),this._changeDetector.detectChanges()}};e.\u0275fac=function(r){return new(r||e)(Q(yt),Q(wr),Q(_S),Q(kn),Q(pn),Q(mc),Q(mC))},e.\u0275cmp=Fe({type:e,selectors:[["co-stock"]],hostVars:2,hostBindings:function(r,o){r&2&&we("co-stock",o.showClass)},inputs:{article:"article",branchNr:"branchNr",articleWarehouse:"articleWarehouse",allWarehouses:"allWarehouses"},outputs:{handleStickerClicked:"handleStickerClicked",okButtonClicked:"okButtonClicked",cancelButtonClicked:"cancelButtonClicked",handleClick:"handleClick",handlePurchaseOrderClick:"handlePurchaseOrderClick",handleSalesOrderClick:"handleSalesOrderClick"},standalone:!1,features:[Oi([{provide:dh,useExisting:mC}])],decls:1,vars:1,consts:[[1,"stock-info-container"],[3,"article","articleStockState","allAvailableStockInformation","allTechnicalStockInformation","economicalStock","perceptibleStorage"],[3,"transferIconClicked","sendMethodDialogClicked","handlePurchaseOrderClick","handleSalesOrderClick","stockInformation","article","articleFlat","warehouses"]],template:function(r,o){r&1&&$(0,l5t,3,10,"div",0),r&2&&ee(o.loaded&&o.articleExtended?0:-1)},dependencies:[MYe,sKe],encapsulation:2});let i=e;return i})();var d5t=(function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},i(e,t)};return function(e,t){i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),u5t=(function(i){d5t(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.goodIds=[],t}return e})(jy);var lKe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,co,Fm,Qi]});let i=e;return i})();var cKe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut]});let i=e;return i})();var dKe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,cC]});let i=e;return i})();var uKe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({imports:[ut,cC]});let i=e;return i})();var hKe=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Qe({type:e}),e.\u0275inj=Ze({providers:[mC,wr],imports:[Qi,ut,iS,Y3e,$T,vr,cC,ii,KH,P3e,m_,lKe,Fo,CK,cKe,co,ui,j3e,ch,Fm,dKe,uKe]});let i=e;return i})();var OF=(function(i){return i.Dutch="nl-NL",i.English="en-GB",i.German="de-DE",i.French="fr-FR",i})(OF||{});var sme=(()=>{let e=class e{constructor(n,r){this.injector=n,this._sharedDictionary=r}initializeApp(){return B(this,null,function*(){let n={url:"https://develop.colijn-it.nl/",schema:"815",version:"300",useLoginEncryption:!0,username:"elske",password:"elske1",languageCode:"NL"},r=this.injector.get(bi);r&&(yield r.init(n)),yield this._sharedDictionary.setDictionary(OF.Dutch)})}};e.\u0275fac=function(r){return new(r||e)(Ut(mr),Ut(kn))},e.\u0275prov=pt({token:e,factory:e.\u0275fac});let i=e;return i})();var Dn=(function(i){return i.DayView="DAY",i.DaysAround="DAYS_AROUND",i.ThreeDaysView="THREE_DAYS_AROUND",i.WeekView="WEEK",i.WeekSelectView="WEEK_SELECT",i.WeekWorkView="WORK_WEEK",i.WeekPlanningView="WEEK_PLANNING",i.MonthView="MONTH",i})(Dn||{});var f5t=(function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},i(e,t)};return function(e,t){i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),fKe=(function(i){f5t(e,i);function e(){return i!==null&&i.apply(this,arguments)||this}return e})(jy);var aQe=Be(e7()),lQe=Be(r7()),cQe=Be(Hle()),dQe=Be(MD());var Sh=(function(i){return i.UserNameAndPasswordEntry="userNameAndPasswordEntry",i.MFACodeEntry="MFACodeEntry",i.ChangePasswordAndOptionallyActivateUser="changePasswordAndOptionallyActivateUser",i.MFACodeSetup="MFACodeSetup",i})(Sh||{});var gC=(function(i){return i.Absence="ABSENCE",i.AbsenceEvent="ABSENCE_EVENT",i.AbsenceFile="ABSENCE_FILE",i.AbsenceForm="ABSENCE_FORM",i.AccountingPeriod="PERIODES",i.Address="ADRESSEN",i.Administration="ADMINISTRATIES",i.AnamnesisForm="ANAMNESIS_FORM",i.ArticleGroup="ARTIKEL_GROEP",i.Articles="ARTIKELEN",i.Branch="FILIALEN",i.BusinessRule="BRE_RULE",i.Booking="BOEKINGSREGELS",i.Category="CATEGORIE",i.Characteristic="KENMERKEN",i.CharacteristicTypes="KENMERK_SOORTEN",i.CharacteristicLines="KENMERK_REGELS",i.Company="BEDRIJVEN",i.Concept="CONCEPTEN",i.Connections="ASS_VERBINDING",i.ContactPerson="CONTACTPERSONEN",i.CostCenter="KOSTENPLAATS_DRAGER",i.Country="LANDCODE",i.CurrencyInfo="VALUTA",i.CurrentIndication="CURRENT_INDICATION",i.Customer="KLANTEN",i.DeclarationMedicalOfficer="DECLARATION_MEDICAL_OFFICER",i.DeliveryMethod="LEVERMETHODES",i.Department="AFDELING",i.DiagnosisForm="DIAGNOSIS_FORM",i.Documents="DOCUMENTATIE",i.EmployabilityProfile="EMPLOYABILITY_PROFILE",i.EmployeeContract="EMPLOYEE_CONTRACT",i.EmployeeContractType="EMPLOYEE_CONTRACT_TYPE",i.Employee="PERSONEEL",i.EndEvaluation="END_EVALUATION",i.ExternalSource="EXTERNE_BRONNEN",i.FirstYearEvaluation="FIRST_YEAR_EVALUATION",i.FmlDocument="FML_DOCUMENT",i.Goods="GOEDEREN",i.Hardware="ASS_HARDWARE",i.Identification="IDENTIFICATION",i.JobCategory="JOB_CATEGORY",i.JobType="JOB_TYPE",i.LedgerAccount="GROOTBOEKEN",i.LedgerClassification="VERDICHTINGEN",i.LedgerJournal="DAGBOEKEN",i.LedgerMainClassification="HOOFDVERDICHTINGEN",i.LedgerMutation="GROOTBOEK_MUTATIES",i.Location="LOCATIES",i.MainArticle="HOOFDARTIKELEN",i.MedicalConsultFeedback="MEDICAL_CONSULT_FEEDBACK",i.MedicalFile="MEDICAL_FILE",i.MedicalForm="MEDICAL_FORM",i.MedicalInformationForm="MEDICAL_INFORMATION_FORM",i.Note="NOTITIE",i.NotificationFullyRecovered="NOTIFICATION_FULLY_RECOVERED",i.NotificationLongTermIllness="NOTIFICATION_LONG_TERM_ILLNESS",i.PaymentCondition="BETALINGSCONDITIES",i.PaymentMethod="BETAALWIJZE",i.PlanOfApproach="PLAN_OF_APPROACH",i.PriceList="PRIJSLIJSTEN",i.ProblemAnalysis="PROBLEM_ANALYSIS",i.ProblemAnalysisAdjustment="PROBLEM_ANALYSIS_ADJUSTMENT",i.Relations="RELATIES",i.RelationAddress="ADRES_RELATIES",i.RelationCommunication="COMM_RELATIES",i.Remarks="OPMERKINGEN",i.Salary="SALARY",i.ServiceProvision="ASS_DIENSTVERLENING",i.ShortReintegrationReport="SHORT_REINTEGRATION_REPORT",i.Software="ASS_SOFTWARE",i.Supplier="LEVERANCIERS",i.TagValues="TAG_VALUES",i.Tasks="TAKEN",i.Transactions="TRANSACTIES",i.TransactionLines="TRANSACTIE_REGELS",i.TurnoverGroup="OMZETGROEPEN",i.Unit="EENHEDEN",i.User="GEBRUIKERS",i.Vat="BTW",i.Warehouse="MAGAZIJNEN",i})(gC||{});var uQe=Be(ame()),hQe=Be(bK()),fQe=Be(Yle());var hme=Be(EKe()),fme=Be(mKe()),gKe=Be(z_()),AKe=Be(Su()),TKe=Be(KI()),SKe=Be($ae()),CKe=Be(eg()),_me=Be(Ad()),pme=Be(pD()),RKe=Be(Wpe()),OKe=Be(QS()),IKe=Be(DY()),NKe=Be(bK()),Eme=Be(n_e());var vKe=(()=>{let e=class e{constructor(){this.emailLayouts=[],this.printLayouts=[],this.documents=[],this.activities=[],this.printers=[],this._createTestData()}_createTestData(){this._createEmailLayouts(),this._createPrintLayouts(),this._createDocuments(),this._createActivities(),this._createPrinters()}_createPrinters(){let n=new Eme.Printer;n.name="Printer1",n.isDefault=!1,n.acceptingJobs="blabla";let r=new Eme.Printer;r.name="Printer2",r.isDefault=!1,r.acceptingJobs="blabla",this.printers.push(n,r)}_createEmailLayouts(){let n=new hme.ReportLayoutSelectionEmail;n.reportId=1,n.name="Standaard email rapport",n.description="Standaard email rapport",n.documentId=11,n.sendMethod=2,n.isDefault=!0,this.emailLayouts.push(n);let r=new hme.ReportLayoutSelectionEmail;r.reportId=2,r.name="Email rapport 2",r.description="Email rapport 2",r.documentId=16,r.sendMethod=2,r.isDefault=!1,this.emailLayouts.push(r)}_createPrintLayouts(){let n=new fme.ReportLayoutSelectionPrint;n.reportId=1,n.name="Standaard voorraadsticker 99x73",n.description="Standaard voorraadsticker 99x73",n.documentId=32,n.sendMethod=1,n.isDefault=!0,this.printLayouts.push(n);let r=new fme.ReportLayoutSelectionPrint;r.reportId=2,r.name="Voorraadsticker 100x50",r.description="Voorraadsticker 100x50",r.documentId=35,r.sendMethod=1,r.isDefault=!1,this.printLayouts.push(r)}_createDocuments(){let n=new _me.CoDocument;n.creationDate=new Date,n.description="DIT IS DOCUMENT",n.publication=1,n.fileSize="veel",n.fileType=pme.FileType.Document,n.isLoaded=!0,n.index=0,n.title="DOCUMENT",n.rightLevel=1,n.fileName="documentexe",this.documents.push(n);let r=new _me.CoDocument;r.creationDate=new Date,r.description="DIT IS IMAGE",r.publication=1,r.fileSize="veel",r.fileType=pme.FileType.Document,r.isLoaded=!0,r.index=0,r.title="IMAGE",r.rightLevel=2,r.fileName="imageexe",this.documents.push(r)}_createActivities(){let n=new TKe.RelationSmallObject;n.relationId=3,n.firstName="Work",n.familyName="Flow",n.initials="WF",n.prefix="Mvr",n.title="Mevrouw",n.relationNr=33,n.relationType=SKe.RelationKind.Personnel;let r=new RKe.Workflow;r.workflowProcessId=1,r.workflowProcessDescription="DIT IS EEN WORKFLOW PROCESS",r.sequence=0,r.table=CKe.TableName.Transactions,r.key="1",r.workflowDescription="DIT IS EEN WORKFLOW PROCESS DESCRIPTION",r.state="Status",r.stateName="StatusNaam",r.stateDate=new Date,r.workflowId=1,r.workflowName="DIT IS EEN WORKFLOW NAME";let o=new OKe.Task;o.taskId=1,o.priority=IKe.PriorityType.VeryHigh,o.name="TASKNAAM",o.workflowCategory=NKe.WorkflowCategoryType.Task,o.lastModifiedBy=n,o.lastModifiedDate=new Date;let s=new gKe.Activity;s.activityType=AKe.ActivityType.Task,s.task=o,s.workflow=r,s.lastActionDateTime=new Date,s.activityTitle="Work Activity",this.activities.push(s)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=pt({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var PKe=Be(j9());var DKe=Be(Fy()),yKe=Be(ox()),bKe=Be(Cl()),LKe=Be(Cz());var Vb=(()=>{let e=class e{constructor(){this._boFactory=new bKe.BusinessObjectFactory}connect(n){this._connector=new DKe.Connector(n),this._mainConnector=new LKe.MainApi(n)}getMfaParameter(n){return B(this,null,function*(){if(this._mfaSendMethod)return this._mfaSendMethod;{let r=yield this._mainConnector.getPublicParams(n);return this._mfaSendMethod=r?r.mfaSendMethod:null,this._mfaSendMethod}})}checkAndPrepareKeycloak(){return this._connector.checkAndPrepareKeycloak()}login(n){return B(this,null,function*(){return this._connector.logIn(n)})}confirmCode(n,r,o,s,a,l,c){return B(this,null,function*(){let d=yield this._connector.confirmCode(n,r,o,s,a,l,c);return this._boFactory.makeWithRawBackendData(yKe.LoginResponse,d)})}resetGoogleAuth(n,r){return B(this,null,function*(){return yield this._connector.resetGoogleAuth(n,r)})}changePassword(n,r,o){return B(this,null,function*(){return yield this._connector.changePassword(n,r,o)})}changePasswordAndActivateUser(n,r,o,s){return B(this,null,function*(){return yield this._connector.changePasswordAndActivateUser(n,r,o,s)})}sendResetPasswordOrInviteMessage(n,r,o){return B(this,null,function*(){return yield this._connector.sendResetPasswordOrInviteMessage(n,r,o)})}getUserGoogleAuthBarcode(){return B(this,null,function*(){let n={methodName:"getUserGoogleAuthBarcode",moduleName:"MFA",refCursorAsArray:!0};return yield this._connector.call("executeMethod",n,!1,"dataservice")})}checkAndStoreGoogleAuth(n){return B(this,null,function*(){let r={methodName:"checkAndStoreGoogleAuth",moduleName:"MFA",refCursorAsArray:!0,parameterValues:{code:n}};return yield this._connector.call("executeMethod",r,!1,"dataservice")})}isUserHasToSetUpGoogleAuthentication(){return B(this,null,function*(){let n={methodName:"isUserHasToSetUpGoogleAuthentication",moduleName:"MFA",refCursorAsArray:!0};return yield this._connector.call("executeMethod",n,!1,"dataservice")})}getUserNameBySecurityCode(n,r){return B(this,null,function*(){let o=yield this._connector.getUserNameBySecurityCode(n,r);return o&&o.validationResult&&o.validationResult.success?o.resultObject:null})}logout(){return B(this,null,function*(){return yield this._connector.logOut()})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=pt({token:e,factory:e.\u0275fac});let i=e;return i})();var lg=(()=>{let e=class e{constructor(n){this._adapterService=n,this.type=Sh.UserNameAndPasswordEntry,this.userLoggedIn=new Ai}getLoginRequest(){let n=new PKe.LoginRequest;return n.upId=this.upId,n.userName=this.username,n.userPassword=this.password,n.clientVersion=this.clientVersion,n.clientLanguage=this.clientLanguage,n.clientDeviceFingerprint=this.clientDeviceFingerprint,n}init(n){this.username&&(n.username=this.username),this._adapterService.connect(n)}checkAndPrepareKeycloak(){return this._adapterService.checkAndPrepareKeycloak()}login(n){return this._adapterService.login(n)}confirmCode(n,r,o,s,a,l,c){return B(this,null,function*(){return this._adapterService.confirmCode(n,r,o,s,a,l,c)})}resetGoogleAuth(n,r){return B(this,null,function*(){return this._adapterService.resetGoogleAuth(n,r)})}changePassword(n,r,o){return B(this,null,function*(){return this._adapterService.changePassword(n,r,o)})}changePasswordAndActivateUser(n,r,o,s){return B(this,null,function*(){return this._adapterService.changePasswordAndActivateUser(n,r,o,s)})}sendResetPasswordOrInviteMessage(n,r,o){return B(this,null,function*(){return this._adapterService.sendResetPasswordOrInviteMessage(n,r,o)})}getUserGoogleAuthBarcode(){return this._adapterService.getUserGoogleAuthBarcode()}checkAndStoreGoogleAuth(n){return this._adapterService.checkAndStoreGoogleAuth(n)}isUserHasToSetUpGoogleAuthentication(){return this._adapterService.isUserHasToSetUpGoogleAuthentication()}getUserNameBySecurityCode(n,r){return B(this,null,function*(){return this._adapterService.getUserNameBySecurityCode(n,r)})}logout(){return this._adapterService.logout()}};e.\u0275fac=function(r){return new(r||e)(Ut(Vb))},e.\u0275prov=pt({token:e,factory:e.\u0275fac});let i=e;return i})();var nr="primary",FF=Symbol("RouteTitle"),Sme=class{params;constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}};function sN(i){return new Sme(i)}function GKe(i,e,t){let n=t.path.split("/");if(n.length>i.length||t.pathMatch==="full"&&(e.hasChildren()||n.length<i.length))return null;let r={};for(let o=0;o<n.length;o++){let s=n[o],a=i[o];if(s[0]===":")r[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:i.slice(0,n.length),posParams:r}}function g5t(i,e){if(i.length!==e.length)return!1;for(let t=0;t<i.length;++t)if(!cg(i[t],e[t]))return!1;return!0}function cg(i,e){let t=i?Cme(i):void 0,n=e?Cme(e):void 0;if(!t||!n||t.length!=n.length)return!1;let r;for(let o=0;o<t.length;o++)if(r=t[o],!HKe(i[r],e[r]))return!1;return!0}function Cme(i){return[...Object.keys(i),...Object.getOwnPropertySymbols(i)]}function HKe(i,e){if(Array.isArray(i)&&Array.isArray(e)){if(i.length!==e.length)return!1;let t=[...i].sort(),n=[...e].sort();return t.every((r,o)=>n[o]===r)}else return i===e}function WKe(i){return i.length>0?i[i.length-1]:null}function EA(i){return k4(i)?i:tT(i)?gs(Promise.resolve(i)):Cn(i)}var A5t={exact:zKe,subset:YKe},jKe={exact:T5t,subset:S5t,ignored:()=>!0};function MKe(i,e,t){return A5t[t.paths](i.root,e.root,t.matrixParams)&&jKe[t.queryParams](i.queryParams,e.queryParams)&&!(t.fragment==="exact"&&i.fragment!==e.fragment)}function T5t(i,e){return cg(i,e)}function zKe(i,e,t){if(!rN(i.segments,e.segments)||!FK(i.segments,e.segments,t)||i.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!i.children[n]||!zKe(i.children[n],e.children[n],t))return!1;return!0}function S5t(i,e){return Object.keys(e).length<=Object.keys(i).length&&Object.keys(e).every(t=>HKe(i[t],e[t]))}function YKe(i,e,t){return KKe(i,e,e.segments,t)}function KKe(i,e,t,n){if(i.segments.length>t.length){let r=i.segments.slice(0,t.length);return!(!rN(r,t)||e.hasChildren()||!FK(r,t,n))}else if(i.segments.length===t.length){if(!rN(i.segments,t)||!FK(i.segments,t,n))return!1;for(let r in e.children)if(!i.children[r]||!YKe(i.children[r],e.children[r],n))return!1;return!0}else{let r=t.slice(0,i.segments.length),o=t.slice(i.segments.length);return!rN(i.segments,r)||!FK(i.segments,r,n)||!i.children[nr]?!1:KKe(i.children[nr],e,o,n)}}function FK(i,e,t){return e.every((n,r)=>jKe[t](i[r].parameters,n.parameters))}var ug=class{root;queryParams;fragment;_queryParamMap;constructor(e=new wo([],{}),t={},n=null){this.root=e,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap??=sN(this.queryParams),this._queryParamMap}toString(){return O5t.serialize(this)}},wo=class{segments;children;parent=null;constructor(e,t){this.segments=e,this.children=t,Object.values(t).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return UK(this)}},AC=class{path;parameters;_parameterMap;constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap??=sN(this.parameters),this._parameterMap}toString(){return XKe(this)}};function C5t(i,e){return rN(i,e)&&i.every((t,n)=>cg(t.parameters,e[n].parameters))}function rN(i,e){return i.length!==e.length?!1:i.every((t,n)=>t.path===e[n].path)}function R5t(i,e){let t=[];return Object.entries(i.children).forEach(([n,r])=>{n===nr&&(t=t.concat(e(r,n)))}),Object.entries(i.children).forEach(([n,r])=>{n!==nr&&(t=t.concat(e(r,n)))}),t}var aN=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:()=>new TC,providedIn:"root"})}return i})(),TC=class{parse(e){let t=new Ome(e);return new ug(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){let t=`/${IF(e.root,!0)}`,n=v5t(e.queryParams),r=typeof e.fragment=="string"?`#${I5t(e.fragment)}`:"";return`${t}${n}${r}`}},O5t=new TC;function UK(i){return i.segments.map(e=>XKe(e)).join("/")}function IF(i,e){if(!i.hasChildren())return UK(i);if(e){let t=i.children[nr]?IF(i.children[nr],!1):"",n=[];return Object.entries(i.children).forEach(([r,o])=>{r!==nr&&n.push(`${r}:${IF(o,!1)}`)}),n.length>0?`${t}(${n.join("//")})`:t}else{let t=R5t(i,(n,r)=>r===nr?[IF(i.children[nr],!1)]:[`${r}:${IF(n,!1)}`]);return Object.keys(i.children).length===1&&i.children[nr]!=null?`${UK(i)}/${t[0]}`:`${UK(i)}/(${t.join("//")})`}}function qKe(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function kK(i){return qKe(i).replace(/%3B/gi,";")}function I5t(i){return encodeURI(i)}function Rme(i){return qKe(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function BK(i){return decodeURIComponent(i)}function kKe(i){return BK(i.replace(/\+/g,"%20"))}function XKe(i){return`${Rme(i.path)}${N5t(i.parameters)}`}function N5t(i){return Object.entries(i).map(([e,t])=>`;${Rme(e)}=${Rme(t)}`).join("")}function v5t(i){let e=Object.entries(i).map(([t,n])=>Array.isArray(n)?n.map(r=>`${kK(t)}=${kK(r)}`).join("&"):`${kK(t)}=${kK(n)}`).filter(t=>t);return e.length?`?${e.join("&")}`:""}var D5t=/^[^\/()?;#]+/;function mme(i){let e=i.match(D5t);return e?e[0]:""}var y5t=/^[^\/()?;=#]+/;function b5t(i){let e=i.match(y5t);return e?e[0]:""}var L5t=/^[^=?&#]+/;function w5t(i){let e=i.match(L5t);return e?e[0]:""}var P5t=/^[^&#]+/;function M5t(i){let e=i.match(P5t);return e?e[0]:""}var Ome=class{url;remaining;constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new wo([],{}):new wo([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n[nr]=new wo(e,t)),n}parseSegment(){let e=mme(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new wt(4009,!1);return this.capture(e),new AC(BK(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let t=b5t(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let r=mme(this.remaining);r&&(n=r,this.capture(n))}e[BK(t)]=BK(n)}parseQueryParam(e){let t=w5t(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let s=M5t(this.remaining);s&&(n=s,this.capture(n))}let r=kKe(t),o=kKe(n);if(e.hasOwnProperty(r)){let s=e[r];Array.isArray(s)||(s=[s],e[r]=s),s.push(o)}else e[r]=o}parseParens(e){let t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=mme(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new wt(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=nr);let s=this.parseChildren();t[o??nr]=Object.keys(s).length===1&&s[nr]?s[nr]:new wo([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new wt(4011,!1)}};function ZKe(i){return i.segments.length>0?new wo([],{[nr]:i}):i}function QKe(i){let e={};for(let[n,r]of Object.entries(i.children)){let o=QKe(r);if(n===nr&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))e[s]=a;else(o.segments.length>0||o.hasChildren())&&(e[n]=o)}let t=new wo(i.segments,e);return k5t(t)}function k5t(i){if(i.numberOfChildren===1&&i.children[nr]){let e=i.children[nr];return new wo(i.segments.concat(e.segments),e.children)}return i}function Yb(i){return i instanceof ug}function JKe(i,e,t=null,n=null){let r=$Ke(i);return eqe(r,e,t,n)}function $Ke(i){let e;function t(o){let s={};for(let l of o.children){let c=t(l);s[l.outlet]=c}let a=new wo(o.url,s);return o===i&&(e=a),a}let n=t(i.root),r=ZKe(n);return e??r}function eqe(i,e,t,n){let r=i;for(;r.parent;)r=r.parent;if(e.length===0)return gme(r,r,r,t,n);let o=x5t(e);if(o.toRoot())return gme(r,r,new wo([],{}),t,n);let s=F5t(o,r,i),a=s.processChildren?vF(s.segmentGroup,s.index,o.commands):iqe(s.segmentGroup,s.index,o.commands);return gme(r,s.segmentGroup,a,t,n)}function VK(i){return typeof i=="object"&&i!=null&&!i.outlets&&!i.segmentPath}function yF(i){return typeof i=="object"&&i!=null&&i.outlets}function gme(i,e,t,n,r){let o={};n&&Object.entries(n).forEach(([l,c])=>{o[l]=Array.isArray(c)?c.map(d=>`${d}`):`${c}`});let s;i===e?s=t:s=tqe(i,e,t);let a=ZKe(QKe(s));return new ug(a,o,r)}function tqe(i,e,t){let n={};return Object.entries(i.children).forEach(([r,o])=>{o===e?n[r]=t:n[r]=tqe(o,e,t)}),new wo(i.segments,n)}var GK=class{isAbsolute;numberOfDoubleDots;commands;constructor(e,t,n){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=n,e&&n.length>0&&VK(n[0]))throw new wt(4003,!1);let r=n.find(yF);if(r&&r!==WKe(n))throw new wt(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function x5t(i){if(typeof i[0]=="string"&&i.length===1&&i[0]==="/")return new GK(!0,0,i);let e=0,t=!1,n=i.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?t=!0:a===".."?e++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new GK(t,e,n)}var Wb=class{segmentGroup;processChildren;index;constructor(e,t,n){this.segmentGroup=e,this.processChildren=t,this.index=n}};function F5t(i,e,t){if(i.isAbsolute)return new Wb(e,!0,0);if(!t)return new Wb(e,!1,NaN);if(t.parent===null)return new Wb(t,!0,0);let n=VK(i.commands[0])?0:1,r=t.segments.length-1+n;return U5t(t,r,i.numberOfDoubleDots)}function U5t(i,e,t){let n=i,r=e,o=t;for(;o>r;){if(o-=r,n=n.parent,!n)throw new wt(4005,!1);r=n.segments.length}return new Wb(n,!1,r-o)}function B5t(i){return yF(i[0])?i[0].outlets:{[nr]:i}}function iqe(i,e,t){if(i??=new wo([],{}),i.segments.length===0&&i.hasChildren())return vF(i,e,t);let n=V5t(i,e,t),r=t.slice(n.commandIndex);if(n.match&&n.pathIndex<i.segments.length){let o=new wo(i.segments.slice(0,n.pathIndex),{});return o.children[nr]=new wo(i.segments.slice(n.pathIndex),i.children),vF(o,0,r)}else return n.match&&r.length===0?new wo(i.segments,{}):n.match&&!i.hasChildren()?Ime(i,e,t):n.match?vF(i,0,r):Ime(i,e,t)}function vF(i,e,t){if(t.length===0)return new wo(i.segments,{});{let n=B5t(t),r={};if(Object.keys(n).some(o=>o!==nr)&&i.children[nr]&&i.numberOfChildren===1&&i.children[nr].segments.length===0){let o=vF(i.children[nr],e,t);return new wo(i.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=iqe(i.children[o],e,s))}),Object.entries(i.children).forEach(([o,s])=>{n[o]===void 0&&(r[o]=s)}),new wo(i.segments,r)}}function V5t(i,e,t){let n=0,r=e,o={match:!1,pathIndex:0,commandIndex:0};for(;r<i.segments.length;){if(n>=t.length)return o;let s=i.segments[r],a=t[n];if(yF(a))break;let l=`${a}`,c=n<t.length-1?t[n+1]:null;if(r>0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!FKe(l,c,s))return o;n+=2}else{if(!FKe(l,{},s))return o;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function Ime(i,e,t){let n=i.segments.slice(0,e),r=0;for(;r<t.length;){let o=t[r];if(yF(o)){let l=G5t(o.outlets);return new wo(n,l)}if(r===0&&VK(t[0])){let l=i.segments[e];n.push(new AC(l.path,xKe(t[0]))),r++;continue}let s=yF(o)?o.outlets[nr]:`${o}`,a=r<t.length-1?t[r+1]:null;s&&a&&VK(a)?(n.push(new AC(s,xKe(a))),r+=2):(n.push(new AC(s,{})),r++)}return new wo(n,{})}function G5t(i){let e={};return Object.entries(i).forEach(([t,n])=>{typeof n=="string"&&(n=[n]),n!==null&&(e[t]=Ime(new wo([],{}),0,n))}),e}function xKe(i){let e={};return Object.entries(i).forEach(([t,n])=>e[t]=`${n}`),e}function FKe(i,e,t){return i==t.path&&cg(e,t.parameters)}var jb="imperative",zl=(function(i){return i[i.NavigationStart=0]="NavigationStart",i[i.NavigationEnd=1]="NavigationEnd",i[i.NavigationCancel=2]="NavigationCancel",i[i.NavigationError=3]="NavigationError",i[i.RoutesRecognized=4]="RoutesRecognized",i[i.ResolveStart=5]="ResolveStart",i[i.ResolveEnd=6]="ResolveEnd",i[i.GuardsCheckStart=7]="GuardsCheckStart",i[i.GuardsCheckEnd=8]="GuardsCheckEnd",i[i.RouteConfigLoadStart=9]="RouteConfigLoadStart",i[i.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",i[i.ChildActivationStart=11]="ChildActivationStart",i[i.ChildActivationEnd=12]="ChildActivationEnd",i[i.ActivationStart=13]="ActivationStart",i[i.ActivationEnd=14]="ActivationEnd",i[i.Scroll=15]="Scroll",i[i.NavigationSkipped=16]="NavigationSkipped",i})(zl||{}),gf=class{id;url;constructor(e,t){this.id=e,this.url=t}},SC=class extends gf{type=zl.NavigationStart;navigationTrigger;restoredState;constructor(e,t,n="imperative",r=null){super(e,t),this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},lE=class extends gf{urlAfterRedirects;type=zl.NavigationEnd;constructor(e,t,n){super(e,t),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Du=(function(i){return i[i.Redirect=0]="Redirect",i[i.SupersededByNewNavigation=1]="SupersededByNewNavigation",i[i.NoDataFromResolver=2]="NoDataFromResolver",i[i.GuardRejected=3]="GuardRejected",i[i.Aborted=4]="Aborted",i})(Du||{}),Kb=(function(i){return i[i.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",i[i.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",i})(Kb||{}),dg=class extends gf{reason;code;type=zl.NavigationCancel;constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},hg=class extends gf{reason;code;type=zl.NavigationSkipped;constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r}},qb=class extends gf{error;target;type=zl.NavigationError;constructor(e,t,n,r){super(e,t),this.error=n,this.target=r}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},bF=class extends gf{urlAfterRedirects;state;type=zl.RoutesRecognized;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},HK=class extends gf{urlAfterRedirects;state;type=zl.GuardsCheckStart;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},WK=class extends gf{urlAfterRedirects;state;shouldActivate;type=zl.GuardsCheckEnd;constructor(e,t,n,r,o){super(e,t),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},jK=class extends gf{urlAfterRedirects;state;type=zl.ResolveStart;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},zK=class extends gf{urlAfterRedirects;state;type=zl.ResolveEnd;constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},YK=class{route;type=zl.RouteConfigLoadStart;constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},KK=class{route;type=zl.RouteConfigLoadEnd;constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},qK=class{snapshot;type=zl.ChildActivationStart;constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},XK=class{snapshot;type=zl.ChildActivationEnd;constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ZK=class{snapshot;type=zl.ActivationStart;constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},QK=class{snapshot;type=zl.ActivationEnd;constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Xb=class{routerEvent;position;anchor;type=zl.Scroll;constructor(e,t,n){this.routerEvent=e,this.position=t,this.anchor=n}toString(){let e=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${e}')`}},LF=class{},Zb=class{url;navigationBehaviorOptions;constructor(e,t){this.url=e,this.navigationBehaviorOptions=t}};function H5t(i){return!(i instanceof LF)&&!(i instanceof Zb)}function W5t(i,e){return i.providers&&!i._injector&&(i._injector=vv(i.providers,e,`Route: ${i.path}`)),i._injector??e}function aE(i){return i.outlet||nr}function j5t(i,e){let t=i.filter(n=>aE(n)===e);return t.push(...i.filter(n=>aE(n)!==e)),t}function $b(i){if(!i)return null;if(i.routeConfig?._injector)return i.routeConfig._injector;for(let e=i.parent;e;e=e.parent){let t=e.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}var JK=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return $b(this.route?.snapshot)??this.rootInjector}constructor(e){this.rootInjector=e,this.children=new lN(this.rootInjector)}},lN=(()=>{class i{rootInjector;contexts=new Map;constructor(t){this.rootInjector=t}onChildOutletCreated(t,n){let r=this.getOrCreateContext(t);r.outlet=n,this.contexts.set(t,r)}onChildOutletDestroyed(t){let n=this.getContext(t);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){let t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let n=this.getContext(t);return n||(n=new JK(this.rootInjector),this.contexts.set(t,n)),n}getContext(t){return this.contexts.get(t)||null}static \u0275fac=function(n){return new(n||i)(Ut(Ds))};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),$K=class{_root;constructor(e){this._root=e}get root(){return this._root.value}parent(e){let t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){let t=Nme(e,this._root);return t?t.children.map(n=>n.value):[]}firstChild(e){let t=Nme(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){let t=vme(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return vme(e,this._root).map(t=>t.value)}};function Nme(i,e){if(i===e.value)return e;for(let t of e.children){let n=Nme(i,t);if(n)return n}return null}function vme(i,e){if(i===e.value)return[e];for(let t of e.children){let n=vme(i,t);if(n.length)return n.unshift(e),n}return[]}var mf=class{value;children;constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}};function Hb(i){let e={};return i&&i.children.forEach(t=>e[t.value.outlet]=t),e}var wF=class extends $K{snapshot;constructor(e,t){super(e),this.snapshot=t,kme(this,e)}toString(){return this.snapshot.toString()}};function nqe(i){let e=z5t(i),t=new Es([new AC("",{})]),n=new Es({}),r=new Es({}),o=new Es({}),s=new Es(""),a=new CC(t,n,o,s,r,nr,i,e.root);return a.snapshot=e.root,new wF(new mf(a,[]),e)}function z5t(i){let e={},t={},n={},o=new oN([],e,n,"",t,nr,i,null,{});return new PF("",new mf(o,[]))}var CC=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(e,t,n,r,o,s,a,l){this.urlSubject=e,this.paramsSubject=t,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(Ir(c=>c[FF]))??Cn(void 0),this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=o}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.params.pipe(Ir(e=>sN(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Ir(e=>sN(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function eq(i,e,t="emptyOnly"){let n,{routeConfig:r}=i;return e!==null&&(t==="always"||r?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:Ct(Ct({},e.params),i.params),data:Ct(Ct({},e.data),i.data),resolve:Ct(Ct(Ct(Ct({},i.data),e.data),r?.data),i._resolvedData)}:n={params:Ct({},i.params),data:Ct({},i.data),resolve:Ct(Ct({},i.data),i._resolvedData??{})},r&&oqe(r)&&(n.resolve[FF]=r.title),n}var oN=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[FF]}constructor(e,t,n,r,o,s,a,l,c){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c}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??=sN(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=sN(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),t=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${t}')`}},PF=class extends $K{url;constructor(e,t){super(t),this.url=e,kme(this,t)}toString(){return rqe(this._root)}};function kme(i,e){e.value._routerState=i,e.children.forEach(t=>kme(i,t))}function rqe(i){let e=i.children.length>0?` { ${i.children.map(rqe).join(", ")} } `:"";return`${i.value}${e}`}function Ame(i){if(i.snapshot){let e=i.snapshot,t=i._futureSnapshot;i.snapshot=t,cg(e.queryParams,t.queryParams)||i.queryParamsSubject.next(t.queryParams),e.fragment!==t.fragment&&i.fragmentSubject.next(t.fragment),cg(e.params,t.params)||i.paramsSubject.next(t.params),g5t(e.url,t.url)||i.urlSubject.next(t.url),cg(e.data,t.data)||i.dataSubject.next(t.data)}else i.snapshot=i._futureSnapshot,i.dataSubject.next(i._futureSnapshot.data)}function Dme(i,e){let t=cg(i.params,e.params)&&C5t(i.url,e.url),n=!i.parent!=!e.parent;return t&&!n&&(!i.parent||Dme(i.parent,e.parent))}function oqe(i){return typeof i.title=="string"||i.title===null}var sqe=new si(""),UF=(()=>{class i{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=nr;activateEvents=new re;deactivateEvents=new re;attachEvents=new re;detachEvents=new re;routerOutletData=GCe();parentContexts=dt(lN);location=dt(js);changeDetector=dt(pn);inputBinder=dt(BF,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(t){if(t.name){let{firstChange:n,previousValue:r}=t.name;if(n)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new wt(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new wt(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new wt(4012,!1);this.location.detach();let t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,n){this.activated=t,this._activatedRoute=n,this.location.insert(t.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){let t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,n){if(this.isActivated)throw new wt(4013,!1);this._activatedRoute=t;let r=this.location,s=t.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new yme(t,a,r.injector,this.routerOutletData);this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:n}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(n){return new(n||i)};static \u0275dir=rn({type:i,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[ll]})}return i})(),yme=class{route;childContexts;parent;outletData;constructor(e,t,n,r){this.route=e,this.childContexts=t,this.parent=n,this.outletData=r}get(e,t){return e===CC?this.route:e===lN?this.childContexts:e===sqe?this.outletData:this.parent.get(e,t)}},BF=new si(""),xme=(()=>{class i{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(t){this.unsubscribeFromRouteData(t),this.subscribeToRouteData(t)}unsubscribeFromRouteData(t){this.outletDataSubscriptions.get(t)?.unsubscribe(),this.outletDataSubscriptions.delete(t)}subscribeToRouteData(t){let{activatedRoute:n}=t,r=uL([n.queryParams,n.params,n.data]).pipe(Ql(([o,s,a],l)=>(a=Ct(Ct(Ct({},o),s),a),l===0?Cn(a):Promise.resolve(a)))).subscribe(o=>{if(!t.isActivated||!t.activatedComponentRef||t.activatedRoute!==n||n.component===null){this.unsubscribeFromRouteData(t);return}let s=YCe(n.component);if(!s){this.unsubscribeFromRouteData(t);return}for(let{templateName:a}of s.inputs)t.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(t,r)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:i.\u0275fac})}return i})(),Fme=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Fe({type:i,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(n,r){n&1&&j(0,"router-outlet")},dependencies:[UF],encapsulation:2})}return i})();function Ume(i){let e=i.children&&i.children.map(Ume),t=e?Hi(Ct({},i),{children:e}):Ct({},i);return!t.component&&!t.loadComponent&&(e||t.loadChildren)&&t.outlet&&t.outlet!==nr&&(t.component=Fme),t}function Y5t(i,e,t){let n=MF(i,e._root,t?t._root:void 0);return new wF(n,e)}function MF(i,e,t){if(t&&i.shouldReuseRoute(e.value,t.value.snapshot)){let n=t.value;n._futureSnapshot=e.value;let r=K5t(i,e,t);return new mf(n,r)}else{if(i.shouldAttach(e.value)){let o=i.retrieve(e.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>MF(i,a)),s}}let n=q5t(e.value),r=e.children.map(o=>MF(i,o));return new mf(n,r)}}function K5t(i,e,t){return e.children.map(n=>{for(let r of t.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return MF(i,n,r);return MF(i,n)})}function q5t(i){return new CC(new Es(i.url),new Es(i.params),new Es(i.queryParams),new Es(i.fragment),new Es(i.data),i.outlet,i.component,i)}var Qb=class{redirectTo;navigationBehaviorOptions;constructor(e,t){this.redirectTo=e,this.navigationBehaviorOptions=t}},aqe="ngNavigationCancelingError";function tq(i,e){let{redirectTo:t,navigationBehaviorOptions:n}=Yb(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=lqe(!1,Du.Redirect);return r.url=t,r.navigationBehaviorOptions=n,r}function lqe(i,e){let t=new Error(`NavigationCancelingError: ${i||""}`);return t[aqe]=!0,t.cancellationCode=e,t}function X5t(i){return cqe(i)&&Yb(i.url)}function cqe(i){return!!i&&i[aqe]}var Z5t=(i,e,t,n)=>Ir(r=>(new bme(e,r.targetRouterState,r.currentRouterState,t,n).activate(i),r)),bme=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(e,t,n,r,o){this.routeReuseStrategy=e,this.futureState=t,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=o}activate(e){let t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),Ame(this.futureState.root),this.activateChildRoutes(t,n,e)}deactivateChildRoutes(e,t,n){let r=Hb(t);e.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],n),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(e,t,n){let r=e.value,o=t?t.value:null;if(r===o)if(r.component){let s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,n);else o&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,o=Hb(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,o=Hb(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,t,n){let r=Hb(t);e.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],n),this.forwardEvent(new QK(o.value.snapshot))}),e.children.length&&this.forwardEvent(new XK(e.value.snapshot))}activateRoutes(e,t,n){let r=e.value,o=t?t.value:null;if(Ame(r),r===o)if(r.component){let s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,n);else if(r.component){let s=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Ame(a.route.value),this.activateChildRoutes(e,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(e,null,s.children)}else this.activateChildRoutes(e,null,n)}},iq=class{path;route;constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},zb=class{component;route;constructor(e,t){this.component=e,this.route=t}};function Q5t(i,e,t){let n=i._root,r=e?e._root:null;return NF(n,r,t,[n.value])}function J5t(i){let e=i.routeConfig?i.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:i,guards:e}}function e2(i,e){let t=Symbol(),n=e.get(i,t);return n===t?typeof i=="function"&&!MZ(i)?i:e.get(i):n}function NF(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=Hb(e);return i.children.forEach(s=>{$5t(s,o[s.value.outlet],t,n.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>DF(a,t.getContext(s),r)),r}function $5t(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=i.value,s=e?e.value:null,a=t?t.getContext(i.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let l=e4t(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new iq(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?NF(i,e,a?a.children:null,n,r):NF(i,e,t,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new zb(a.outlet.component,s))}else s&&DF(e,a,r),r.canActivateChecks.push(new iq(n)),o.component?NF(i,null,a?a.children:null,n,r):NF(i,null,t,n,r);return r}function e4t(i,e,t){if(typeof t=="function")return t(i,e);switch(t){case"pathParamsChange":return!rN(i.url,e.url);case"pathParamsOrQueryParamsChange":return!rN(i.url,e.url)||!cg(i.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Dme(i,e)||!cg(i.queryParams,e.queryParams);case"paramsChange":default:return!Dme(i,e)}}function DF(i,e,t){let n=Hb(i),r=i.value;Object.entries(n).forEach(([o,s])=>{r.component?e?DF(s,e.children.getContext(o),t):DF(s,null,t):DF(s,e,t)}),r.component?e&&e.outlet&&e.outlet.isActivated?t.canDeactivateChecks.push(new zb(e.outlet.component,r)):t.canDeactivateChecks.push(new zb(null,r)):t.canDeactivateChecks.push(new zb(null,r))}function VF(i){return typeof i=="function"}function t4t(i){return typeof i=="boolean"}function i4t(i){return i&&VF(i.canLoad)}function n4t(i){return i&&VF(i.canActivate)}function r4t(i){return i&&VF(i.canActivateChild)}function o4t(i){return i&&VF(i.canDeactivate)}function s4t(i){return i&&VF(i.canMatch)}function dqe(i){return i instanceof Gg||i?.name==="EmptyError"}var xK=Symbol("INITIAL_VALUE");function Jb(){return Ql(i=>uL(i.map(e=>e.pipe(up(1),oR(xK)))).pipe(Ir(e=>{for(let t of e)if(t!==!0){if(t===xK)return xK;if(t===!1||a4t(t))return t}return!0}),ol(e=>e!==xK),up(1)))}function a4t(i){return Yb(i)||i instanceof Qb}function l4t(i,e){return ra(t=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return s.length===0&&o.length===0?Cn(Hi(Ct({},t),{guardsResult:!0})):c4t(s,n,r,i).pipe(ra(a=>a&&t4t(a)?d4t(n,o,i,e):Cn(a)),Ir(a=>Hi(Ct({},t),{guardsResult:a})))})}function c4t(i,e,t,n){return gs(i).pipe(ra(r=>p4t(r.component,r.route,t,e,n)),Wg(r=>r!==!0,!0))}function d4t(i,e,t,n){return gs(e).pipe(GA(r=>nv(h4t(r.route.parent,n),u4t(r.route,n),_4t(i,r.path,t),f4t(i,r.route,t))),Wg(r=>r!==!0,!0))}function u4t(i,e){return i!==null&&e&&e(new ZK(i)),Cn(!0)}function h4t(i,e){return i!==null&&e&&e(new qK(i)),Cn(!0)}function f4t(i,e,t){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return Cn(!0);let r=n.map(o=>hL(()=>{let s=$b(e)??t,a=e2(o,s),l=n4t(a)?a.canActivate(e,i):cd(s,()=>a(e,i));return EA(l).pipe(Wg())}));return Cn(r).pipe(Jb())}function _4t(i,e,t){let n=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>J5t(s)).filter(s=>s!==null).map(s=>hL(()=>{let a=s.guards.map(l=>{let c=$b(s.node)??t,d=e2(l,c),u=r4t(d)?d.canActivateChild(n,i):cd(c,()=>d(n,i));return EA(u).pipe(Wg())});return Cn(a).pipe(Jb())}));return Cn(o).pipe(Jb())}function p4t(i,e,t,n,r){let o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||o.length===0)return Cn(!0);let s=o.map(a=>{let l=$b(e)??r,c=e2(a,l),d=o4t(c)?c.canDeactivate(i,e,t,n):cd(l,()=>c(i,e,t,n));return EA(d).pipe(Wg())});return Cn(s).pipe(Jb())}function E4t(i,e,t,n){let r=e.canLoad;if(r===void 0||r.length===0)return Cn(!0);let o=r.map(s=>{let a=e2(s,i),l=i4t(a)?a.canLoad(e,t):cd(i,()=>a(e,t));return EA(l)});return Cn(o).pipe(Jb(),uqe(n))}function uqe(i){return uZ(sl(e=>{if(typeof e!="boolean")throw tq(i,e)}),Ir(e=>e===!0))}function m4t(i,e,t,n){let r=e.canMatch;if(!r||r.length===0)return Cn(!0);let o=r.map(s=>{let a=e2(s,i),l=s4t(a)?a.canMatch(e,t):cd(i,()=>a(e,t));return EA(l)});return Cn(o).pipe(Jb(),uqe(n))}var kF=class{segmentGroup;constructor(e){this.segmentGroup=e||null}},xF=class extends Error{urlTree;constructor(e){super(),this.urlTree=e}};function Gb(i){return tv(new kF(i))}function g4t(i){return tv(new wt(4e3,!1))}function A4t(i){return tv(lqe(!1,Du.GuardRejected))}var Lme=class{urlSerializer;urlTree;constructor(e,t){this.urlSerializer=e,this.urlTree=t}lineralizeSegments(e,t){let n=[],r=t.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return Cn(n);if(r.numberOfChildren>1||!r.children[nr])return g4t(`${e.redirectTo}`);r=r.children[nr]}}applyRedirectCommands(e,t,n,r,o){return T4t(t,r,o).pipe(Ir(s=>{if(s instanceof ug)throw new xF(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),e,n);if(s[0]==="/")throw new xF(a);return a}))}applyRedirectCreateUrlTree(e,t,n,r){let o=this.createSegmentGroup(e,t.root,n,r);return new ug(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){let n={};return Object.entries(e).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);n[r]=t[a]}else n[r]=o}),n}createSegmentGroup(e,t,n,r){let o=this.createSegments(e,t.segments,n,r),s={};return Object.entries(t.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(e,l,n,r)}),new wo(o,s)}createSegments(e,t,n,r){return t.map(o=>o.path[0]===":"?this.findPosParam(e,o,r):this.findOrReturn(o,n))}findPosParam(e,t,n){let r=n[t.path.substring(1)];if(!r)throw new wt(4001,!1);return r}findOrReturn(e,t){let n=0;for(let r of t){if(r.path===e.path)return t.splice(n),r;n++}return e}};function T4t(i,e,t){if(typeof i=="string")return Cn(i);let n=i,{queryParams:r,fragment:o,routeConfig:s,url:a,outlet:l,params:c,data:d,title:u}=e;return EA(cd(t,()=>n({params:c,data:d,queryParams:r,fragment:o,routeConfig:s,url:a,outlet:l,title:u})))}var wme={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function S4t(i,e,t,n,r){let o=hqe(i,e,t);return o.matched?(n=W5t(e,n),m4t(n,e,t,r).pipe(Ir(s=>s===!0?o:Ct({},wme)))):Cn(o)}function hqe(i,e,t){if(e.path==="**")return C4t(t);if(e.path==="")return e.pathMatch==="full"&&(i.hasChildren()||t.length>0)?Ct({},wme):{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};let r=(e.matcher||GKe)(t,i,e);if(!r)return Ct({},wme);let o={};Object.entries(r.posParams??{}).forEach(([a,l])=>{o[a]=l.path});let s=r.consumed.length>0?Ct(Ct({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function C4t(i){return{matched:!0,parameters:i.length>0?WKe(i).parameters:{},consumedSegments:i,remainingSegments:[],positionalParamSegments:{}}}function UKe(i,e,t,n){return t.length>0&&I4t(i,t,n)?{segmentGroup:new wo(e,O4t(n,new wo(t,i.children))),slicedSegments:[]}:t.length===0&&N4t(i,t,n)?{segmentGroup:new wo(i.segments,R4t(i,t,n,i.children)),slicedSegments:t}:{segmentGroup:new wo(i.segments,i.children),slicedSegments:t}}function R4t(i,e,t,n){let r={};for(let o of t)if(rq(i,e,o)&&!n[aE(o)]){let s=new wo([],{});r[aE(o)]=s}return Ct(Ct({},n),r)}function O4t(i,e){let t={};t[nr]=e;for(let n of i)if(n.path===""&&aE(n)!==nr){let r=new wo([],{});t[aE(n)]=r}return t}function I4t(i,e,t){return t.some(n=>rq(i,e,n)&&aE(n)!==nr)}function N4t(i,e,t){return t.some(n=>rq(i,e,n))}function rq(i,e,t){return(i.hasChildren()||e.length>0)&&t.pathMatch==="full"?!1:t.path===""}function v4t(i,e,t){return e.length===0&&!i.children[t]}var Pme=class{};function D4t(i,e,t,n,r,o,s="emptyOnly"){return new Mme(i,e,t,n,r,s,o).recognize()}var y4t=31,Mme=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(e,t,n,r,o,s,a){this.injector=e,this.configLoader=t,this.rootComponentType=n,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Lme(this.urlSerializer,this.urlTree)}noMatchError(e){return new wt(4002,`'${e.segmentGroup}'`)}recognize(){let e=UKe(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(Ir(({children:t,rootSnapshot:n})=>{let r=new mf(n,t),o=new PF("",r),s=JKe(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(e){let t=new oN([],Object.freeze({}),Object.freeze(Ct({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),nr,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,nr,t).pipe(Ir(n=>({children:n,rootSnapshot:t})),Hg(n=>{if(n instanceof xF)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof kF?this.noMatchError(n):n}))}processSegmentGroup(e,t,n,r,o){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,t,n,o):this.processSegment(e,t,n,n.segments,r,!0,o).pipe(Ir(s=>s instanceof mf?[s]:[]))}processChildren(e,t,n,r){let o=[];for(let s of Object.keys(n.children))s==="primary"?o.unshift(s):o.push(s);return gs(o).pipe(GA(s=>{let a=n.children[s],l=j5t(t,s);return this.processSegmentGroup(e,l,a,s,r)}),TZ((s,a)=>(s.push(...a),s)),HA(null),AZ(),ra(s=>{if(s===null)return Gb(n);let a=fqe(s);return b4t(a),Cn(a)}))}processSegment(e,t,n,r,o,s,a){return gs(t).pipe(GA(l=>this.processSegmentAgainstRoute(l._injector??e,t,l,n,r,o,s,a).pipe(Hg(c=>{if(c instanceof kF)return Cn(null);throw c}))),Wg(l=>!!l),Hg(l=>{if(dqe(l))return v4t(n,r,o)?Cn(new Pme):Gb(n);throw l}))}processSegmentAgainstRoute(e,t,n,r,o,s,a,l){return aE(n)!==s&&(s===nr||!rq(r,o,n))?Gb(r):n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,r,n,o,s,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,r,t,n,o,s,l):Gb(r)}expandSegmentAgainstRouteUsingRedirect(e,t,n,r,o,s,a){let{matched:l,parameters:c,consumedSegments:d,positionalParamSegments:u,remainingSegments:h}=hqe(t,r,o);if(!l)return Gb(t);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>y4t&&(this.allowRedirects=!1));let f=new oN(o,c,Object.freeze(Ct({},this.urlTree.queryParams)),this.urlTree.fragment,BKe(r),aE(r),r.component??r._loadedComponent??null,r,VKe(r)),_=eq(f,a,this.paramsInheritanceStrategy);return f.params=Object.freeze(_.params),f.data=Object.freeze(_.data),this.applyRedirects.applyRedirectCommands(d,r.redirectTo,u,f,e).pipe(Ql(T=>this.applyRedirects.lineralizeSegments(r,T)),ra(T=>this.processSegment(e,n,t,T.concat(h),s,!1,a)))}matchSegmentAgainstRoute(e,t,n,r,o,s){let a=S4t(t,n,r,e,this.urlSerializer);return n.path==="**"&&(t.children={}),a.pipe(Ql(l=>l.matched?(e=n._injector??e,this.getChildConfig(e,n,r).pipe(Ql(({routes:c})=>{let d=n._loadedInjector??e,{parameters:u,consumedSegments:h,remainingSegments:f}=l,_=new oN(h,u,Object.freeze(Ct({},this.urlTree.queryParams)),this.urlTree.fragment,BKe(n),aE(n),n.component??n._loadedComponent??null,n,VKe(n)),p=eq(_,s,this.paramsInheritanceStrategy);_.params=Object.freeze(p.params),_.data=Object.freeze(p.data);let{segmentGroup:T,slicedSegments:g}=UKe(t,h,f,c);if(g.length===0&&T.hasChildren())return this.processChildren(d,c,T,_).pipe(Ir(w=>new mf(_,w)));if(c.length===0&&g.length===0)return Cn(new mf(_,[]));let y=aE(n)===o;return this.processSegment(d,c,T,g,y?nr:o,!0,_).pipe(Ir(w=>new mf(_,w instanceof mf?[w]:[])))}))):Gb(t)))}getChildConfig(e,t,n){return t.children?Cn({routes:t.children,injector:e}):t.loadChildren?t._loadedRoutes!==void 0?Cn({routes:t._loadedRoutes,injector:t._loadedInjector}):E4t(e,t,n,this.urlSerializer).pipe(ra(r=>r?this.configLoader.loadChildren(e,t).pipe(sl(o=>{t._loadedRoutes=o.routes,t._loadedInjector=o.injector})):A4t(t))):Cn({routes:[],injector:e})}};function b4t(i){i.sort((e,t)=>e.value.outlet===nr?-1:t.value.outlet===nr?1:e.value.outlet.localeCompare(t.value.outlet))}function L4t(i){let e=i.value.routeConfig;return e&&e.path===""}function fqe(i){let e=[],t=new Set;for(let n of i){if(!L4t(n)){e.push(n);continue}let r=e.find(o=>n.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...n.children),t.add(r)):e.push(n)}for(let n of t){let r=fqe(n.children);e.push(new mf(n.value,r))}return e.filter(n=>!t.has(n))}function BKe(i){return i.data||{}}function VKe(i){return i.resolve||{}}function w4t(i,e,t,n,r,o){return ra(s=>D4t(i,e,t,n,s.extractedUrl,r,o).pipe(Ir(({state:a,tree:l})=>Hi(Ct({},s),{targetSnapshot:a,urlAfterRedirects:l}))))}function P4t(i,e){return ra(t=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return Cn(t);let o=new Set(r.map(l=>l.route)),s=new Set;for(let l of o)if(!s.has(l))for(let c of _qe(l))s.add(c);let a=0;return gs(s).pipe(GA(l=>o.has(l)?M4t(l,n,i,e):(l.data=eq(l,l.parent,i).resolve,Cn(void 0))),sl(()=>a++),sv(1),ra(l=>a===s.size?Cn(t):ld))})}function _qe(i){let e=i.children.map(t=>_qe(t)).flat();return[i,...e]}function M4t(i,e,t,n){let r=i.routeConfig,o=i._resolve;return r?.title!==void 0&&!oqe(r)&&(o[FF]=r.title),hL(()=>(i.data=eq(i,i.parent,t).resolve,k4t(o,i,e,n).pipe(Ir(s=>(i._resolvedData=s,i.data=Ct(Ct({},i.data),s),null)))))}function k4t(i,e,t,n){let r=Cme(i);if(r.length===0)return Cn({});let o={};return gs(r).pipe(ra(s=>x4t(i[s],e,t,n).pipe(Wg(),sl(a=>{if(a instanceof Qb)throw tq(new TC,a);o[s]=a}))),sv(1),Ir(()=>o),Hg(s=>dqe(s)?ld:tv(s)))}function x4t(i,e,t,n){let r=$b(e)??n,o=e2(i,r),s=o.resolve?o.resolve(e,t):cd(r,()=>o(e,t));return EA(s)}function Tme(i){return Ql(e=>{let t=i(e);return t?gs(t).pipe(Ir(()=>e)):Cn(e)})}var Bme=(()=>{class i{buildTitle(t){let n,r=t.root;for(;r!==void 0;)n=this.getResolvedTitleForRoute(r)??n,r=r.children.find(o=>o.outlet===nr);return n}getResolvedTitleForRoute(t){return t.data[FF]}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:()=>dt(pqe),providedIn:"root"})}return i})(),pqe=(()=>{class i extends Bme{title;constructor(t){super(),this.title=t}updateTitle(t){let n=this.buildTitle(t);n!==void 0&&this.title.setTitle(n)}static \u0275fac=function(n){return new(n||i)(Ut(DRe))};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),cN=new si("",{providedIn:"root",factory:()=>({})}),t2=new si(""),oq=(()=>{class i{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=dt(p$);loadComponent(t,n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Cn(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=EA(cd(t,()=>n.loadComponent())).pipe(Ir(mqe),Ql(gqe),sl(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),fL(()=>{this.componentLoaders.delete(n)})),o=new XN(r,()=>new Ai).pipe(qN());return this.componentLoaders.set(n,o),o}loadChildren(t,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return Cn({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);let o=Eqe(n,this.compiler,t,this.onLoadEndListener).pipe(fL(()=>{this.childrenLoaders.delete(n)})),s=new XN(o,()=>new Ai).pipe(qN());return this.childrenLoaders.set(n,s),s}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Eqe(i,e,t,n){return EA(cd(t,()=>i.loadChildren())).pipe(Ir(mqe),Ql(gqe),ra(r=>r instanceof nB||Array.isArray(r)?Cn(r):gs(e.compileModuleAsync(r))),Ir(r=>{n&&n(i);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(t).injector,s=o.get(t2,[],{optional:!0,self:!0}).flat()),{routes:s.map(Ume),injector:o}}))}function F4t(i){return i&&typeof i=="object"&&"default"in i}function mqe(i){return F4t(i)?i.default:i}function gqe(i){return Cn(i)}var sq=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:()=>dt(U4t),providedIn:"root"})}return i})(),U4t=(()=>{class i{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,n){return t}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Vme=new si(""),Gme=new si("");function Aqe(i,e,t){let n=i.get(Gme),r=i.get(Mr);if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,new Promise(c=>setTimeout(c));let o,s=new Promise(c=>{o=c}),a=r.startViewTransition(()=>(o(),B4t(i)));a.ready.catch(c=>{});let{onViewTransitionCreated:l}=n;return l&&cd(i,()=>l({transition:a,from:e,to:t})),s}function B4t(i){return new Promise(e=>{YE({read:()=>setTimeout(e)},{injector:i})})}var Hme=new si(""),aq=(()=>{class i{currentNavigation=zd(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new Ai;transitionAbortWithErrorSubject=new Ai;configLoader=dt(oq);environmentInjector=dt(Ds);destroyRef=dt(Ep);urlSerializer=dt(aN);rootContexts=dt(lN);location=dt(XE);inputBindingEnabled=dt(BF,{optional:!0})!==null;titleStrategy=dt(Bme);options=dt(cN,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=dt(sq);createViewTransition=dt(Vme,{optional:!0});navigationErrorHandler=dt(Hme,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>Cn(void 0);rootComponentType=null;destroyed=!1;constructor(){let t=r=>this.events.next(new YK(r)),n=r=>this.events.next(new KK(r));this.configLoader.onLoadEndListener=n,this.configLoader.onLoadStartListener=t,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(t){let n=++this.navigationId;kc(()=>{this.transitions?.next(Hi(Ct({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:n}))})}setupNavigations(t){return this.transitions=new Es(null),this.transitions.pipe(ol(n=>n!==null),Ql(n=>{let r=!1;return Cn(n).pipe(Ql(o=>{if(this.navigationId>n.id)return this.cancelNavigationTransition(n,"",Du.SupersededByNewNavigation),ld;this.currentTransition=n,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?Hi(Ct({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let s=!t.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??t.onSameUrlNavigation;if(!s&&a!=="reload")return this.events.next(new hg(o.id,this.urlSerializer.serialize(o.rawUrl),"",Kb.IgnoredSameUrlNavigation)),o.resolve(!1),ld;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return Cn(o).pipe(Ql(l=>(this.events.next(new SC(l.id,this.urlSerializer.serialize(l.extractedUrl),l.source,l.restoredState)),l.id!==this.navigationId?ld:Promise.resolve(l))),w4t(this.environmentInjector,this.configLoader,this.rootComponentType,t.config,this.urlSerializer,this.paramsInheritanceStrategy),sl(l=>{n.targetSnapshot=l.targetSnapshot,n.urlAfterRedirects=l.urlAfterRedirects,this.currentNavigation.update(d=>(d.finalUrl=l.urlAfterRedirects,d));let c=new bF(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:l,extractedUrl:c,source:d,restoredState:u,extras:h}=o,f=new SC(l,this.urlSerializer.serialize(c),d,u);this.events.next(f);let _=nqe(this.rootComponentType).snapshot;return this.currentTransition=n=Hi(Ct({},o),{targetSnapshot:_,urlAfterRedirects:c,extras:Hi(Ct({},h),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(p=>(p.finalUrl=c,p)),Cn(n)}else return this.events.next(new hg(o.id,this.urlSerializer.serialize(o.extractedUrl),"",Kb.IgnoredByUrlHandlingStrategy)),o.resolve(!1),ld}),sl(o=>{let s=new HK(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),Ir(o=>(this.currentTransition=n=Hi(Ct({},o),{guards:Q5t(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),n)),l4t(this.environmentInjector,o=>this.events.next(o)),sl(o=>{if(n.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw tq(this.urlSerializer,o.guardsResult);let s=new WK(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),ol(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",Du.GuardRejected),!1)),Tme(o=>{if(o.guards.canActivateChecks.length!==0)return Cn(o).pipe(sl(s=>{let a=new jK(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),Ql(s=>{let a=!1;return Cn(s).pipe(P4t(this.paramsInheritanceStrategy,this.environmentInjector),sl({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",Du.NoDataFromResolver)}}))}),sl(s=>{let a=new zK(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),Tme(o=>{let s=a=>{let l=[];if(a.routeConfig?.loadComponent){let c=$b(a)??this.environmentInjector;l.push(this.configLoader.loadComponent(c,a.routeConfig).pipe(sl(d=>{a.component=d}),Ir(()=>{})))}for(let c of a.children)l.push(...s(c));return l};return uL(s(o.targetSnapshot.root)).pipe(HA(null),up(1))}),Tme(()=>this.afterPreactivation()),Ql(()=>{let{currentSnapshot:o,targetSnapshot:s}=n,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?gs(a).pipe(Ir(()=>n)):Cn(n)}),Ir(o=>{let s=Y5t(t.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=n=Hi(Ct({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),n}),sl(()=>{this.events.next(new LF)}),Z5t(this.rootContexts,t.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),up(1),xE(new $n(o=>{let s=n.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(ol(()=>!r&&!n.targetRouterState),sl(()=>{this.cancelNavigationTransition(n,n.abortController.signal.reason+"",Du.Aborted)}))),sl({next:o=>{r=!0,this.lastSuccessfulNavigation=kc(this.currentNavigation),this.events.next(new lE(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{r=!0}}),xE(this.transitionAbortWithErrorSubject.pipe(sl(o=>{throw o}))),fL(()=>{r||this.cancelNavigationTransition(n,"",Du.SupersededByNewNavigation),this.currentTransition?.id===n.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),Hg(o=>{if(this.destroyed)return n.resolve(!1),ld;if(r=!0,cqe(o))this.events.next(new dg(n.id,this.urlSerializer.serialize(n.extractedUrl),o.message,o.cancellationCode)),X5t(o)?this.events.next(new Zb(o.url,o.navigationBehaviorOptions)):n.resolve(!1);else{let s=new qb(n.id,this.urlSerializer.serialize(n.extractedUrl),o,n.targetSnapshot??void 0);try{let a=cd(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof Qb){let{message:l,cancellationCode:c}=tq(this.urlSerializer,a);this.events.next(new dg(n.id,this.urlSerializer.serialize(n.extractedUrl),l,c)),this.events.next(new Zb(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?n.resolve(!1):n.reject(a)}}return ld}))}))}cancelNavigationTransition(t,n,r){let o=new dg(t.id,this.urlSerializer.serialize(t.extractedUrl),n,r);this.events.next(o),t.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let t=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),n=kc(this.currentNavigation),r=n?.targetBrowserUrl??n?.extractedUrl;return t.toString()!==r?.toString()&&!n?.extras.skipLocationChange}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function V4t(i){return i!==jb}var Tqe=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:()=>dt(G4t),providedIn:"root"})}return i})(),nq=class{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}},G4t=(()=>{class i extends nq{static \u0275fac=(()=>{let t;return function(r){return(t||(t=fo(i)))(r||i)}})();static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Sqe=(()=>{class i{urlSerializer=dt(aN);options=dt(cN,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=dt(XE);urlHandlingStrategy=dt(sq);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new ug;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:t,initialUrl:n,targetBrowserUrl:r}){let o=t!==void 0?this.urlHandlingStrategy.merge(t,n):n,s=r??o;return s instanceof ug?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:t,finalUrl:n,initialUrl:r}){n&&t?(this.currentUrlTree=n,this.rawUrlTree=this.urlHandlingStrategy.merge(n,r),this.routerState=t):this.rawUrlTree=r}routerState=nqe(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:t}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t??this.rawUrlTree)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:()=>dt(H4t),providedIn:"root"})}return i})(),H4t=(()=>{class i extends Sqe{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(t){return this.location.subscribe(n=>{n.type==="popstate"&&setTimeout(()=>{t(n.url,n.state,"popstate")})})}handleRouterEvent(t,n){t instanceof SC?this.updateStateMemento():t instanceof hg?this.commitTransition(n):t instanceof bF?this.urlUpdateStrategy==="eager"&&(n.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(n),n)):t instanceof LF?(this.commitTransition(n),this.urlUpdateStrategy==="deferred"&&!n.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(n),n)):t instanceof dg&&t.code!==Du.SupersededByNewNavigation&&t.code!==Du.Redirect?this.restoreHistory(n):t instanceof qb?this.restoreHistory(n,!0):t instanceof lE&&(this.lastSuccessfulId=t.id,this.currentPageId=this.browserPageId)}setBrowserUrl(t,{extras:n,id:r}){let{replaceUrl:o,state:s}=n;if(this.location.isCurrentPathEqualTo(t)||o){let a=this.browserPageId,l=Ct(Ct({},s),this.generateNgRouterState(r,a));this.location.replaceState(t,"",l)}else{let a=Ct(Ct({},s),this.generateNgRouterState(r,this.browserPageId+1));this.location.go(t,"",a)}}restoreHistory(t,n=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,o=this.currentPageId-r;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===t.finalUrl&&o===0&&(this.resetInternalState(t),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(n&&this.resetInternalState(t),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,n){return this.canceledNavigationResolution==="computed"?{navigationId:t,\u0275routerPageId:n}:{navigationId:t}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=fo(i)))(r||i)}})();static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function lq(i,e){i.events.pipe(ol(t=>t instanceof lE||t instanceof dg||t instanceof qb||t instanceof hg),Ir(t=>t instanceof lE||t instanceof hg?0:(t instanceof dg?t.code===Du.Redirect||t.code===Du.SupersededByNewNavigation:!1)?2:1),ol(t=>t!==2),up(1)).subscribe(()=>{e()})}var W4t={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},j4t={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},fg=(()=>{class i{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=dt(rB);stateManager=dt(Sqe);options=dt(cN,{optional:!0})||{};pendingTasks=dt(Zg);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=dt(aq);urlSerializer=dt(aN);location=dt(XE);urlHandlingStrategy=dt(sq);injector=dt(Ds);_events=new Ai;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=dt(Tqe);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=dt(t2,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!dt(BF,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:t=>{this.console.warn(t)}}),this.subscribeToNavigationEvents()}eventsSubscription=new so;subscribeToNavigationEvents(){let t=this.navigationTransitions.events.subscribe(n=>{try{let r=this.navigationTransitions.currentTransition,o=kc(this.navigationTransitions.currentNavigation);if(r!==null&&o!==null){if(this.stateManager.handleRouterEvent(n,o),n instanceof dg&&n.code!==Du.Redirect&&n.code!==Du.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof lE)this.navigated=!0;else if(n instanceof Zb){let s=n.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(n.url,r.currentRawUrl),l=Ct({browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||V4t(r.source)},s);this.scheduleNavigation(a,jb,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}H5t(n)&&this._events.next(n)}catch(r){this.navigationTransitions.transitionAbortWithErrorSubject.next(r)}});this.eventsSubscription.add(t)}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),jb,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((t,n,r)=>{this.navigateToSyncWithBrowser(t,r,n)})}navigateToSyncWithBrowser(t,n,r){let o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){let l=Ct({},r);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(o.state=l)}let a=this.parseUrl(t);this.scheduleNavigation(a,n,s,o).catch(l=>{this.disposed||this.injector.get(Pf)(l)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return kc(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(t){this.config=t.map(Ume),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(t,n={}){let{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=n,c=l?this.currentUrlTree.fragment:s,d=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":d=Ct(Ct({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}d!==null&&(d=this.removeEmptyProps(d));let u;try{let h=r?r.snapshot:this.routerState.snapshot.root;u=$Ke(h)}catch{(typeof t[0]!="string"||t[0][0]!=="/")&&(t=[]),u=this.currentUrlTree.root}return eqe(u,t,d,c??null)}navigateByUrl(t,n={skipLocationChange:!1}){let r=Yb(t)?t:this.parseUrl(t),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,jb,null,n)}navigate(t,n={skipLocationChange:!1}){return z4t(t),this.navigateByUrl(this.createUrlTree(t,n),n)}serializeUrl(t){return this.urlSerializer.serialize(t)}parseUrl(t){try{return this.urlSerializer.parse(t)}catch{return this.console.warn(Yg(4018,!1)),this.urlSerializer.parse("/")}}isActive(t,n){let r;if(n===!0?r=Ct({},W4t):n===!1?r=Ct({},j4t):r=n,Yb(t))return MKe(this.currentUrlTree,t,r);let o=this.parseUrl(t);return MKe(this.currentUrlTree,o,r)}removeEmptyProps(t){return Object.entries(t).reduce((n,[r,o])=>(o!=null&&(n[r]=o),n),{})}scheduleNavigation(t,n,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c;s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((u,h)=>{a=u,l=h});let d=this.pendingTasks.add();return lq(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(u=>Promise.reject(u))}static \u0275fac=function(n){return new(n||i)};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function z4t(i){for(let e=0;e<i.length;e++)if(i[e]==null)throw new wt(4008,!1)}var GF=class{};var Cqe=(()=>{class i{router;injector;preloadingStrategy;loader;subscription;constructor(t,n,r,o){this.router=t,this.injector=n,this.preloadingStrategy=r,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(ol(t=>t instanceof lE),GA(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,n){let r=[];for(let o of n){o.providers&&!o._injector&&(o._injector=vv(o.providers,t,`Route: ${o.path}`));let s=o._injector??t,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return gs(r).pipe(VA())}preloadConfig(t,n){return this.preloadingStrategy.preload(n,()=>{let r;n.loadChildren&&n.canLoad===void 0?r=this.loader.loadChildren(t,n):r=Cn(null);let o=r.pipe(ra(s=>s===null?Cn(void 0):(n._loadedRoutes=s.routes,n._loadedInjector=s.injector,this.processRoutes(s.injector??t,s.routes))));if(n.loadComponent&&!n._loadedComponent){let s=this.loader.loadComponent(t,n);return gs([o,s]).pipe(VA())}else return o})}static \u0275fac=function(n){return new(n||i)(Ut(fg),Ut(Ds),Ut(GF),Ut(oq))};static \u0275prov=pt({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Rqe=new si(""),Y4t=(()=>{class i{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=jb;restoredId=0;store={};constructor(t,n,r,o,s={}){this.urlSerializer=t,this.transitions=n,this.viewportScroller=r,this.zone=o,this.options=s,s.scrollPositionRestoration||="disabled",s.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof SC?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof lE?(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment)):t instanceof hg&&t.code===Kb.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{if(!(t instanceof Xb))return;let n={behavior:"instant"};t.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0],n):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(t.position,n):t.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(t.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0])})}scheduleScrollEvent(t,n){this.zone.runOutsideAngular(()=>B(this,null,function*(){yield new Promise(r=>{setTimeout(r),typeof requestAnimationFrame<"u"&&requestAnimationFrame(r)}),this.zone.run(()=>{this.transitions.events.next(new Xb(t,this.lastSource==="popstate"?this.store[this.restoredId]:null,n))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(n){$J()};static \u0275prov=pt({token:i,factory:i.\u0275fac})}return i})();function K4t(i){return i.routerState.root}function HF(i,e){return{\u0275kind:i,\u0275providers:e}}function q4t(){let i=dt(mr);return e=>{let t=i.get(Ba);if(e!==t.components[0])return;let n=i.get(fg),r=i.get(Oqe);i.get(jme)===1&&n.initialNavigation(),i.get(vqe,null,{optional:!0})?.setUpPreloading(),i.get(Rqe,null,{optional:!0})?.init(),n.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var Oqe=new si("",{factory:()=>new Ai}),jme=new si("",{providedIn:"root",factory:()=>1});function Iqe(){let i=[{provide:jU,useValue:!0},{provide:jme,useValue:0},yv(()=>{let e=dt(mr);return e.get(w$,Promise.resolve()).then(()=>new Promise(n=>{let r=e.get(fg),o=e.get(Oqe);lq(r,()=>{n(!0)}),e.get(aq).afterPreactivation=()=>(n(!0),o.closed?Cn(void 0):o),r.initialNavigation()}))})];return HF(2,i)}function Nqe(){let i=[yv(()=>{dt(fg).setUpLocationChangeListener()}),{provide:jme,useValue:2}];return HF(3,i)}var vqe=new si("");function Dqe(i){return HF(0,[{provide:vqe,useExisting:Cqe},{provide:GF,useExisting:i}])}function yqe(){return HF(8,[xme,{provide:BF,useExisting:xme}])}function bqe(i){Tp("NgRouterViewTransitions");let e=[{provide:Vme,useValue:Aqe},{provide:Gme,useValue:Ct({skipNextTransition:!!i?.skipInitialTransition},i)}];return HF(9,e)}var Lqe=[XE,{provide:aN,useClass:TC},fg,lN,{provide:CC,useFactory:K4t,deps:[fg]},oq,[]],zme=(()=>{class i{constructor(){}static forRoot(t,n){return{ngModule:i,providers:[Lqe,[],{provide:t2,multi:!0,useValue:t},[],n?.errorHandler?{provide:Hme,useValue:n.errorHandler}:[],{provide:cN,useValue:n||{}},n?.useHash?Z4t():Q4t(),X4t(),n?.preloadingStrategy?Dqe(n.preloadingStrategy).\u0275providers:[],n?.initialNavigation?J4t(n):[],n?.bindToComponentInputs?yqe().\u0275providers:[],n?.enableViewTransitions?bqe().\u0275providers:[],$4t()]}}static forChild(t){return{ngModule:i,providers:[{provide:t2,multi:!0,useValue:t}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Qe({type:i});static \u0275inj=Ze({})}return i})();function X4t(){return{provide:Rqe,useFactory:()=>{let i=dt(TRe),e=dt(Nn),t=dt(cN),n=dt(aq),r=dt(aN);return t.scrollOffset&&i.setOffset(t.scrollOffset),new Y4t(r,n,i,e,t)}}}function Z4t(){return{provide:i0,useClass:B$}}function Q4t(){return{provide:i0,useClass:EB}}function J4t(i){return[i.initialNavigation==="disabled"?Nqe().\u0275providers:[],i.initialNavigation==="enabledBlocking"?Iqe().\u0275providers:[]]}var Wme=new si("");function $4t(){return[{provide:Wme,useFactory:q4t},{provide:sB,multi:!0,useExisting:Wme}]}var cE=(function(i){return i.Sunday="sunday",i.Monday="monday",i.Tuesday="tuesday",i.Wednesday="wednesday",i.Thursday="thursday",i.Friday="friday",i.Saturday="saturday",i})(cE||{});var hs=(function(i){return i.January="JANUARY",i.Februrary="FEBRUARY",i.March="MARCH",i.April="APRIL",i.May="MAY",i.June="JUNE",i.July="JULY",i.August="AUGUST",i.September="SEPTEMBER",i.October="OCTOBER",i.November="NOVEMBER",i.December="DECEMBER",i})(hs||{});var _g=[hs.January,hs.Februrary,hs.March,hs.April,hs.May,hs.June,hs.July,hs.August,hs.September,hs.October,hs.November,hs.December];function dE(i){return i!=null}var Kme=Be(wqe());var cq=class{constructor(){}};Date.prototype.toJSON=function(){return(0,Kme.default)(this).format("YYYY-MM-DD[T]HH:mm:ss")};var Tc=class Tc{static NowAsString(){return Tc.ParseDate(new Date,Tc.BACKEND_DATE_FORMAT)}static ParseDate(e,t="d-m-y"){if(!e)return"";let n=("0"+e.getDate()).slice(-2),r=("0"+(e.getMonth()+1)).slice(-2),o=e.getFullYear()+"",s=t.split("-"),a=[];for(let l=0,c=s.length;l<c;l++)switch(s[l]){case"d":case"DD":a.push(n);break;case"m":case"MM":a.push(r);break;case"y":case"YYYY":a.push(o);break;default:break}return a.join("-")}static GetWeekNumber(e){return e=new Date(e.getTime()),e.setHours(0,0,0,0),e.setDate(e.getDate()+4-(e.getDay()||7)),Math.ceil(((e.getTime()-new Date(e.getFullYear(),0,1).getTime())/864e5+1)/7)}static GetDaysFromNow(e){return Tc.GetDayDifference(new Date(Date.now()),e)}static StringAsDate(e,t=Tc.BACKEND_DATE_FORMAT){if(dE(e))if(isNaN(Number(e))){let n=(0,Kme.default)(e,t,!0);return n.isValid()?new Date(n):void 0}else return new Date(e);else return}static MomentToDate(e){if(!e||!e.isValid())return;let t=new Date(e.format(Tc.BACKEND_DATE_FORMAT));return t.setHours(e.hours()),t.setMinutes(e.minutes()),t.setSeconds(e.seconds()),t}static GetCurrentMonth(){return _g[new Date().getMonth()]}static Get12MonthsArrayWithFirstMonthIsCurrentMonth(){let e=[],t=new Date().getMonth();for(let n=0;n<12;n++)e.push(_g[t]),t=(t+1)%_g.length;return e}static GetFirstDayOfWeek(e){if(!Tc._ValidDate(e))return null;let t,n=e.getDay()||7;return n===1?t=new Date(e):(t=new Date(e),t.setHours(-24*(n-1))),t}static GetLastDayOfWeek(e){let t=Tc.GetFirstDayOfWeek(e),n=new Date(t);return n.setDate(t.getDate()+6),n}static GetFirstDayOfMonth(e){if(!Tc._ValidDate(e))return null;let t=e.getFullYear(),n=e.getMonth();return new Date(t,n,1)}static GetLastDayOfMonth(e){if(!Tc._ValidDate(e))return null;let t=e.getFullYear(),n=e.getMonth();return new Date(t,n+1,0)}static DatesEqual(e,t){let n=!1;return Tc._ValidDate(e)&&Tc._ValidDate(t)&&(n=e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()),n}static DateRangeEqual(e,t){return this.DatesEqual(e.startDate,t.startDate)&&this.DatesEqual(e.endDate,t.endDate)}static AddMinutes(e,t){return new Date(e.getTime()+t*6e4)}static AddDays(e,t){let n=new Date(e);return n.setDate(n.getDate()+t),n}static AddMonths(e,t){let n=new Date(e);return n.setMonth(n.getMonth()+t),n}static DetermineDSTBreakpoints(){let e=new Date(new Date().getFullYear(),11,1),t=new Date(new Date().getFullYear(),0,1),n=t.getTimezoneOffset(),r=new Date,o=!1,s=new Date,a=!1;for(;t.getTime()<e.getTime()&&(t=this.AddMinutes(t,60),n<t.getTimezoneOffset()?(s.setTime(t.getTime()),a=!0):n>t.getTimezoneOffset()&&(r.setTime(t.getTime()),o=!0),n=t.getTimezoneOffset(),!(o&&a)););return o&&a?{start:this._DateToTimeStringWithDateFormat(r),end:this._DateToTimeStringWithDateFormat(s)}:{start:void 0,end:void 0}}static _ValidDate(e){return e!=null}static GetDayDifference(e,t){return!e||!t?NaN:(t.getTime()-e.getTime())/1e3/60/60/24}static IsSameDay(e,t){return e&&t&&e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}static IsInBetween(e,t,n,r=!0){if(t&&n){if(r)return e>t&&e<n;{let o=new Date(e).setHours(0,0,0,0),s=new Date(t).setHours(0,0,0,0),a=new Date(n).setHours(0,0,0,0);return o>=s&&o<=a}}}static IsMonday(e){return e.getDay()===1}static IsSunday(e){return e.getDay()===0}static IsToday(e){let t=new Date;return Tc.IsSameDay(t,e)}static ParseDateInShortDateFormat(e,t){return this.datePipe=new Er(t),this.datePipe.transform(e)}static getFormattedDateRangeString(e,t=" - "){let n=e;return n=n.replace("<=?<=",` ${t} `),n=n.replace(/'/g,""),n}static SetDateOrDateRangeObjectHoursZero(e){e instanceof cq?(e.startDate&&e.startDate.setHours(0,0,0),e.endDate&&e.endDate.setHours(0,0,0)):e&&e instanceof Date&&e.setHours(0,0,0,0)}static GetMonthAsNumber(e){return Tc.monthMap.get(e)}static _DateToTimeStringWithDateFormat(e,t="d-m-y"){if(!e)return"";let n=e.getHours()<10?"0"+e.getHours():""+e.getHours(),r=e.getMinutes()<10?"0"+e.getMinutes():""+e.getMinutes();return this.ParseDate(e,t)+" "+[n,r].join(":")}};Tc.BACKEND_DATE_FORMAT="YYYY-MM-DD[T]HH:mm:ss",Tc.datePipe=new Er("shortDate"),Tc.monthMap=new Map([[hs.January,1],[hs.Februrary,2],[hs.March,3],[hs.April,4],[hs.May,5],[hs.June,6],[hs.July,7],[hs.August,8],[hs.September,9],[hs.October,10],[hs.November,11],[hs.December,12]]);var ro=Tc;function iUt(i,e){if(i&1){let t=de();O(0,"div",1),W("click",function(){let r=F(t).$implicit,o=R();return o.year=r,U(o.yearChange.emit(o.year))}),I()}if(i&2){let t=e.$implicit,n=R();we("selected-year",t===n.year),S("textContent",t)}}var Pqe=(()=>{let e=class e{constructor(){this.yearChange=new re,this.years=[]}ngOnInit(){this.years.length=0;let n=this._determineStart(),r=n+11;for(;n<r;)this.years.push(n),n++}_determineStart(){if(this.year>0){let n=this.year,r=parseInt(n.toString().split("").pop());for(;r>0;)n--,r=parseInt(n.toString().split("").pop());return n}return 0}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["calendar-all-years"]],inputs:{year:"year"},outputs:{yearChange:"yearChange"},standalone:!1,decls:2,vars:0,consts:[[1,"pointer-hover",3,"textContent","selected-year"],[1,"pointer-hover",3,"click","textContent"]],template:function(r,o){r&1&&Pt(0,iUt,1,3,"div",0,zt),r&2&&Mt(o.years)},encapsulation:2});let i=e;return i})();function rUt(i,e){if(i&1){let t=de();O(0,"div",1),W("click",function(){let r=F(t).$index,o=R();return o.month=r,U(o.monthChange.emit(o.month))}),I()}if(i&2){let t=e.$implicit,n=e.$index,r=R();we("selected-month",r.month===n),S("textContent",t)}}var Mqe=(()=>{let e=class e{constructor(){this.shortDescriptions=!1,this.monthChange=new re,this.months=[]}ngOnInit(){this.months.length=0,this.months=_g}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["calendar-all-months"]],inputs:{month:"month",shortDescriptions:"shortDescriptions"},outputs:{monthChange:"monthChange"},standalone:!1,decls:2,vars:0,consts:[[1,"pointer-hover",3,"selected-month","textContent"],[1,"pointer-hover",3,"click","textContent"]],template:function(r,o){r&1&&Pt(0,rUt,1,3,"div",0,zt),r&2&&Mt(o.months)},encapsulation:2});let i=e;return i})();function sUt(i,e){if(i&1){let t=de();O(0,"div",8),W("clickOutside",function(){F(t);let r=R(2);return U(r.hideMonthYearSelection())}),O(1,"div")(2,"calendar-all-months",9),W("monthChange",function(r){F(t);let o=R(2);return U(o.setNewMonth(r))}),I(),j(3,"div",10),O(4,"calendar-all-years",11),W("yearChange",function(r){F(t);let o=R(2);return U(o.setNewYear(r))}),I()()()}if(i&2){let t=R(2);we("expanded",t.expanded),S("@showMonthYearSelect",void 0),m(2),S("month",t.currentMonth)("shortDescriptions",!0),m(2),S("year",t.currentYear)}}function aUt(i,e){if(i&1&&$(0,sUt,5,6,"div",7),i&2){let t=R();ee(t.showMonthYearSelect?0:-1)}}var kqe=(()=>{let e=class e{constructor(n){this.iconCacheService=n,this.selectedDate=new Date,this.selectedDateChange=new re,this.icons=ot,this.showMonthYearSelect=!1,this.expanded=!1}ngDoCheck(){if(this.selectedDate){let n=_g[this.selectedDate.getMonth()];this.currentMonth=ro.GetMonthAsNumber(n),this.currentYear=this.selectedDate.getFullYear()}}subMonth(){let n=new Date(this.selectedDate);n.setMonth(n.getMonth()-1),this.selectedDate=n,this.selectedDateChange.emit(this.selectedDate)}addMonth(){let n=new Date(this.selectedDate);n.setMonth(n.getMonth()+1),this.selectedDate=n,this.selectedDateChange.emit(this.selectedDate)}hideMonthYearSelection(){this.expanded=!1,this.showMonthYearSelect=!1}setNewMonth(n){this.selectedMonth=n}setNewYear(n){this.selectedYear=n}changeMonthYear(){this.hideMonthYearSelection();let n=new Date(this.selectedDate);n.setMonth(this.selectedMonth),n.setFullYear(this.selectedYear),this.selectedDate=n,this.selectedDateChange.emit(this.selectedDate)}};e.\u0275fac=function(r){return new(r||e)(Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["calendar-header"]],inputs:{selectedDate:"selectedDate"},outputs:{selectedDateChange:"selectedDateChange"},standalone:!1,decls:9,vars:4,consts:[["monthYearSelect",""],["template",""],[1,"calendar-header-row"],[1,"pointer-hover",3,"click","iconData"],[3,"click"],[1,"month",3,"textContent"],[1,"year",3,"textContent"],[1,"select-month-year-window",3,"expanded"],[1,"select-month-year-window",3,"clickOutside"],[3,"monthChange","month","shortDescriptions"],[1,"vertical-divider"],[3,"yearChange","year"]],template:function(r,o){if(r&1){let s=de();O(0,"div",2,0)(2,"co-icon",3),W("click",function(){return F(s),U(o.subMonth())}),I(),O(3,"div",4),W("click",function(){return F(s),U(o.showMonthYearSelect=!0)}),j(4,"div",5)(5,"div",6),I(),O(6,"co-icon",3),W("click",function(){return F(s),U(o.addMonth())}),I()(),Yt(7,aUt,1,1,"ng-template",null,1,zi)}r&2&&(m(2),S("iconData",o.iconCacheService.getIcon(o.icons.ArrowPointLeft)),m(2),S("textContent",o.currentMonth),m(),S("textContent",o.currentYear),m(),S("iconData",o.iconCacheService.getIcon(o.icons.ArrowPointRight)))},dependencies:[ri,Pqe,Mqe],encapsulation:2,data:{animation:[ao("showMonthYearSelect",[xn("void",on({"transform-origin":"top center",transform:"scaleY(0)"})),xn("*",on({"transform-origin":"top center",transform:"scaleY(1)"})),qr(":enter, :leave",[Gr("200ms ease-in-out")])])]}});let i=e;return i})();var qme=(()=>{let e=class e{transform(n,r=0){return!n||n<0?[]:Array.from({length:Math.round(n)},(o,s)=>s+r)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=Pc({name:"arrayNumber",type:e,pure:!0,standalone:!1});let i=e;return i})();var Xme=(()=>{let e=class e{transform(n){return typeof n=="string"?n.charAt(0).toUpperCase()+n.slice(1):n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=Pc({name:"ucfirst",type:e,pure:!0,standalone:!1});let i=e;return i})();function dUt(i,e){if(i&1&&(j(0,"div",3),le(1,"ucfirst")),i&2){let t=e.$implicit;S("textContent",ge(1,1,t))}}function uUt(i,e){if(i&1){let t=de();O(0,"div",7),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.onDateClick(r))}),I()}if(i&2){let t=e.$implicit;S("textContent",t.day)}}function hUt(i,e){if(i&1&&(O(0,"div",4),j(1,"div",5),Pt(2,uUt,1,1,"div",6,bv().trackByStamp,!0),I()),i&2){let t=e.$implicit;m(),S("textContent",t[0].week),m(),Mt(t)}}var xqe=(()=>{let e=class e{set view(n){this._view=n,this._selectDays()}get view(){return this._view}set selectedDate(n){this._selectedDate=n,this._selectedDate.setHours(0,0,0,0),this._prepareWeeks()}get selectedDate(){return this._selectedDate}constructor(n){this._locale=n,this.selectedDateChange=new re,this.trackByStamp=(r,o)=>o&&o.timestamp||r,this.trackByWeek=(r,o)=>o&&o[0].week||r,this.weekDayLabel=[],this.weeks=[],this._selectedDate=new Date,this._view=Dn.ThreeDaysView,this.selectedDate.setHours(0,0,0,0),this._setLabels()}onDateClick(n){this.selectedDate=new Date(n.timestamp),this.selectedDateChange.emit(this.selectedDate),this._selectDays()}_setLabels(){let n=new Er(this._locale),r=this.selectedDate.getDay(),o=new Date(this.selectedDate.getTime());o.setDate(o.getDate()-r-1),this.weekDayLabel=new qme().transform(7).map(()=>(o.setDate(o.getDate()+1),n.transform(o,"E"))),this.weekDayLabel.push(this.weekDayLabel.shift())}_prepareWeeks(){this.weeks.length=0;let n=new Date(this.selectedDate.getTime());n.setHours(0,0,0,0),n.setMonth(n.getMonth()+1),n.setDate(0);let r=n.getDay(),o=n.getDate(),s=r?7-r:0;n.setDate(1);let a=n.getDay(),l=a?a-1:6;n.setDate(-l+1);let c=Math.ceil((l+s+o)/7),d=ro.GetWeekNumber(n),u=d+c-1;for(let h=d;h<=u;h++){let f=h;d>50&&(f=ro.GetWeekNumber(n));let _=[];for(let p=1;p<=7;p++){let T=!0;h===d?T=p>l:h===u&&(T=p<=7-s);let g=n.getTime();_.push({week:f,inMonth:T,day:n.getDate(),timestamp:g,selected:this.selectedDate.getTime()===g}),n.setDate(n.getDate()+1)}this.weeks.push(_)}this._selectDays()}_selectDays(){if(this._resetSelection(),!this.selectedDate)return;let n=ro.GetWeekNumber(this.selectedDate),r=this.weeks.length;for(let o=0;o<r;o++){let s=this.weeks[o].length;for(let a=0;a<s;a++)this.weeks[o][a].inMonth&&this.view===Dn.MonthView?this.weeks[o][a].selected=!0:this.weeks[o][a].week===n&&this.view===Dn.WeekView?this.weeks[o][a].selected=!0:this.weeks[o][a].timestamp===this.selectedDate.getTime()&&this.view===Dn.WeekSelectView?this.weeks[o][a].selected=!0:this.weeks[o][a].timestamp===this.selectedDate.getTime()&&this.view===Dn.DayView&&(this.weeks[o][a].selected=!0)}}_resetSelection(){let n=this.weeks.length;for(let r=0;r<n;r++){let o=this.weeks[r].length;for(let s=0;s<o;s++)this.weeks[r][s].selected=!1}}};e.\u0275fac=function(r){return new(r||e)(Q(cl))},e.\u0275cmp=Fe({type:e,selectors:[["calendar-view"]],inputs:{view:"view",selectedDate:"selectedDate"},outputs:{selectedDateChange:"selectedDateChange"},standalone:!1,decls:8,vars:0,consts:[[1,"calendar-content"],[1,"week-day-header","week-row"],[1,"week-acronym"],[1,"week-day-label",3,"textContent"],[1,"week-row"],[1,"week-number",3,"textContent"],[1,"week-day",3,"textContent"],[1,"week-day",3,"click","textContent"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div")(2,"div",1),j(3,"div",2),Pt(4,dUt,2,3,"div",3,zt),I(),Pt(6,hUt,4,1,"div",4,o.trackByWeek,!0),I()()),r&2&&(m(4),Mt(o.weekDayLabel),m(2),Mt(o.weeks))},dependencies:[Xme],encapsulation:2});let i=e;return i})();var Fqe=(()=>{let e=class e{constructor(){this.view=Dn.ThreeDaysView,this.selectedDate=new Date,this.days=[],this.daysChange=new re,this.selectedDateChange=new re}changeSelectedDate(n){this.selectedDate=n,this.selectedDateChange.emit(this.selectedDate)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["calendar"]],inputs:{view:"view",selectedDate:"selectedDate",days:"days"},outputs:{daysChange:"daysChange",selectedDateChange:"selectedDateChange"},standalone:!1,decls:3,vars:3,consts:[[1,"sc-calendar"],[3,"selectedDateChange","selectedDate"],[3,"selectedDateChange","view","selectedDate"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"calendar-header",1),W("selectedDateChange",function(a){return o.changeSelectedDate(a)}),I(),O(2,"calendar-view",2),W("selectedDateChange",function(a){return o.changeSelectedDate(a)}),I()()),r&2&&(m(),S("selectedDate",o.selectedDate),m(),S("view",o.view)("selectedDate",o.selectedDate))},dependencies:[kqe,xqe],encapsulation:2});let i=e;return i})();var dN=class{constructor(){this.inView=!0,this.newMonth=!1,this.weekdaySelected=!1,this.datesByTheHour=[],this.events=[]}};var mA=class{constructor(){this.weekDays=[]}};var pUt=function(i,e,t,n){var r=arguments.length,o=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,e,t,n);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o},EUt=function(i,e){return function(t,n){e(t,n,i)}},xs,RC,yu=(RC=class{constructor(e){this._locale=e,xs.Locale=e}static GetDayHours(e){let t=[];if(e){let n=new Date(e);n.setHours(0,0,0,0),t.push(n);for(let r=0;r<23;r++)n=new Date(n),n.setHours(n.getHours()+1),t.push(n)}return t}static GetDaysOfWeek(e){let t=e?new Date(e):new Date;t=xs.getMonday(t);let n=[],r,o;for(let a=0;a<7;a++){let l=new dN,c=xs.GetDayHours(t);l.newMonth=t.getMonth()!==o,l.weekdaySelected=t.getDay()===e.getDay(),l.weekdayDay=t.getDate(),r={weekday:"short"},l.weekdayShort=t.toLocaleDateString(xs.Locale,r),r={weekday:"long"},l.weekdayLong=t.toLocaleDateString(xs.Locale,r),r={month:"short"},l.weekdayMonthShort=t.toLocaleDateString(xs.Locale,r),r={month:"long"},l.weekdayMonthLong=t.toLocaleDateString(xs.Locale,r),l.weekdayYear=t.getFullYear(),l.date=new Date(t),l.datesByTheHour=c,n.push(l),o=t.getMonth(),t=new Date(t),t.setDate(t.getDate()+1)}let s=new mA;return s.weekDays=n,s}static GetWorkDaysOfWeek(e){let t=e?new Date(e):new Date;t=xs.getMonday(t);let n=[],r,o;for(let a=0;a<5;a++){let l=new dN,c=xs.GetDayHours(t);l.newMonth=t.getMonth()!==o,l.weekdaySelected=t.getDay()===e.getDay(),l.weekdayDay=t.getDate(),r={weekday:"short"},l.weekdayShort=t.toLocaleDateString(xs.Locale,r),r={weekday:"long"},l.weekdayLong=t.toLocaleDateString(xs.Locale,r),r={month:"short"},l.weekdayMonthShort=t.toLocaleDateString(xs.Locale,r),r={month:"long"},l.weekdayMonthLong=t.toLocaleDateString(xs.Locale,r),l.weekdayYear=t.getFullYear(),l.date=new Date(t),l.datesByTheHour=c,n.push(l),o=t.getMonth(),t=new Date(t),t.setDate(t.getDate()+1)}let s=new mA;return s.weekDays=n,s}static GetThreeDays(e){let t;e?t=e:t=new Date;let n=[],r,o;for(let a=0;a<3;a++){let l=new dN,c=xs.GetDayHours(t);l.newMonth=t.getMonth()!==o,l.weekdaySelected=t.getDay()===e.getDay(),l.weekdayDay=t.getDate(),r={weekday:"short"},l.weekdayShort=t.toLocaleDateString(xs.Locale,r),r={weekday:"long"},l.weekdayLong=t.toLocaleDateString(xs.Locale,r),r={month:"short"},l.weekdayMonthShort=t.toLocaleDateString(xs.Locale,r),r={month:"long"},l.weekdayMonthLong=t.toLocaleDateString(xs.Locale,r),l.weekdayYear=t.getFullYear(),l.date=new Date(t),l.datesByTheHour=c,n.push(l),o=t.getMonth(),t=new Date(t),t.setDate(t.getDate()+1)}let s=new mA;return s.weekDays=n,s}static GetDaysAround(e){let t=[],n=e?new Date(e):new Date;n.setHours(0,0,0,0);let r=new Date(n);r.setDate(r.getDate()-2);for(let s=0;s<7;s++){let a=new dN,l=xs.GetDayHours(r);a.newMonth=r.getMonth()!==n.getMonth(),a.weekdaySelected=r.getDate()===n.getDate(),a.weekdayDay=r.getDate();let c={weekday:"short"};a.weekdayShort=r.toLocaleDateString(xs.Locale,c),c={weekday:"long"},a.weekdayLong=r.toLocaleDateString(xs.Locale,c),c={month:"short"},a.weekdayMonthShort=r.toLocaleDateString(xs.Locale,c),c={month:"long"},a.weekdayMonthLong=r.toLocaleDateString(xs.Locale,c),a.weekdayYear=r.getFullYear(),a.date=new Date(r),a.datesByTheHour=l,t.push(a),r.setDate(r.getDate()+1)}let o=new mA;return o.weekDays=t,o}static getMonday(e){let t=new Date(e),n=t.getDay(),r=(n===0?-6:1)-n;return t.setDate(t.getDate()+r),t.setHours(0,0,0,0),t}},xs=RC,RC.Locale=void 0,RC.Now=new Date,RC);yu=xs=pUt([EUt(0,VU(cl))],yu);var dq=class{constructor(){this.checked=!1,this.showCheckbox=!1,this.draggable=!1}};var n2=class{constructor(){this.events=[]}};var r2=class{constructor(){this.weeks=[]}get firstWeek(){if(this.weeks&&this.weeks.length>0)return this.weeks[0]}};var o2=class{constructor(){this.datesByTheHour=[],this.events=[]}};var uq=new dq,Fln=new n2,Uqe=new r2,hq=new mA,Bqe=new o2;var WF=(function(i){return i[i.Left=0]="Left",i[i.Middle=1]="Middle",i[i.Right=2]="Right",i})(WF||{});var fq=class{static FindKeyByValue(e,t){if(!e||!t)return;let n,r=!1;return e.forEach((o,s)=>{!r&&t.call(this,o)&&(n=s,r=!0)}),n}static InsertArrayItemIntoMap(e,t,n){e&&(e.has(t)?e.get(t).push(n):e.set(t,[n]))}};var Vqe=(()=>{let e=class e{get modelAsThumbState(){return this._viewsToThumb.get(this.selectedView)}constructor(){this._viewsToThumb=new Map([[Dn.DayView,WF.Left],[Dn.WeekView,WF.Middle],[Dn.MonthView,WF.Right]]),this.selectedView=Dn.WeekView,this.selectedViewChange=new re,this.CalendarView=Dn}selectView(n){this.selectedView=n,this.selectedViewChange.emit(n)}onThumbStateChange(n){this.selectedView=fq.FindKeyByValue(this._viewsToThumb,r=>r===n),this.selectedViewChange.emit(this.selectedView)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["view-select"]],inputs:{selectedView:"selectedView",selectedFirstDayOfTheWeek:"selectedFirstDayOfTheWeek"},outputs:{selectedViewChange:"selectedViewChange"},standalone:!1,decls:10,vars:15,consts:[[1,"select-wrapper"],[1,"label",3,"click"],[3,"textContent"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div",1),W("click",function(){return o.selectView(o.CalendarView.ThreeDaysView)}),j(2,"span",2),le(3,"sharedLocalize"),I(),O(4,"div",1),W("click",function(){return o.selectView(o.CalendarView.WeekWorkView)}),j(5,"span",2),le(6,"sharedLocalize"),I(),O(7,"div",1),W("click",function(){return o.selectView(o.CalendarView.WeekView)}),j(8,"span",2),le(9,"sharedLocalize"),I()()),r&2&&(m(),we("active",o.selectedView===o.CalendarView.ThreeDaysView),m(),S("textContent",ge(3,9,"THREE_DAYS_VIEW")),m(2),we("active",o.selectedView===o.CalendarView.WeekWorkView),m(),S("textContent",ge(6,11,"FIVE_DAYS_VIEW")),m(2),we("active",o.selectedView===o.CalendarView.WeekView),m(),S("textContent",ge(9,13,"WEEK_VIEW")))},dependencies:[kt],encapsulation:2});let i=e;return i})();function gUt(i,e){if(i&1){let t=de();O(0,"div",0)(1,"div",6)(2,"co-icon",7),W("click",function(){F(t);let r=R();return U(r.subUnit())}),I(),j(3,"div",8),O(4,"co-icon",9),W("click",function(){F(t);let r=R();return U(r.addUnit())}),I()()()}if(i&2){let t=R();m(2),S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft)),m(),S("textContent",t.day.description),m(),S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function AUt(i,e){if(i&1&&(O(0,"div",10),Rn(1),le(2,"date"),le(3,"sharedLocalize"),I()),i&2){let t=R(2);m(),Bh(" ",Wn(2,1,t.selectedDate,"MMMM")+" "+t.selectedDate.getFullYear()+" "+ge(3,4,"WEEK")+": "+t.getWeekNumber(t.selectedDate)," ")}}function TUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function SUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function CUt(i,e){if(i&1){let t=de();O(0,"div",12),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.setUnit(r))}),$(1,TUt,1,1,"co-icon",13),j(2,"div",14)(3,"div",15),$(4,SUt,1,1,"co-icon",16),I()}if(i&2){let t=e.$implicit,n=e.$index,r=R(2);we("selected",t.weekdaySelected),m(),ee(r.showBackButton&&n===0?1:-1),m(),S("textContent",r.capitalizeString(t.weekdayShort)),m(),S("textContent",t.weekdayDay),m(),ee(n===6?4:-1)}}function RUt(i,e){if(i&1&&(O(0,"div",1),$(1,AUt,4,6,"div",10),Pt(2,CUt,5,6,"div",11,zt),I()),i&2){let t=R();m(),ee((t.weekDays==null?null:t.weekDays.length)>0?1:-1),m(),Mt(t.weekDays)}}function OUt(i,e){if(i&1){let t=de();O(0,"div",17)(1,"view-select",20),W("selectedViewChange",function(r){F(t);let o=R(2);return U(o.changeTheView(r))}),I()()}if(i&2){let t=R(2);m(),S("selectedView",t.view)("selectedFirstDayOfTheWeek",t.selectedFirstDayOfTheWeek)}}function IUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function NUt(i,e){if(i&1&&(O(0,"div",10),j(1,"span",22),le(2,"date"),le(3,"sharedLocalize"),I()),i&2){let t=R(3);m(),S("textContent",Wn(2,1,t.selectedDate,"MMMM")+" "+t.selectedDate.getFullYear()+" "+ge(3,4,"WEEK")+": "+t.getWeekNumber(t.selectedDate))}}function vUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function DUt(i,e){if(i&1&&(O(0,"div",6),$(1,IUt,1,1,"co-icon",13),$(2,NUt,4,6,"div",10),j(3,"div",21),$(4,vUt,1,1,"co-icon",16),I()),i&2){let t=e.$implicit,n=e.$index,r=R(2);we("selected",t.weekdaySelected),m(),ee(r.showBackButton&&n===0?1:-1),m(),ee(t.newMonth?2:-1),m(),S("textContent",r.capitalizeString(t.weekdayLong)+" "+t.weekdayDay+" "+r.capitalizeString(t.weekdayMonthLong)+" "+t.weekdayYear),m(),ee(n===2?4:-1)}}function yUt(i,e){if(i&1&&(O(0,"div",2),$(1,OUt,2,2,"div",17),O(2,"div",18),Pt(3,DUt,5,6,"div",19,zt),I()()),i&2){let t=R();m(),ee(t.viewSelection?1:-1),m(2),Mt(t.weekDays)}}function bUt(i,e){if(i&1){let t=de();O(0,"div",17)(1,"view-select",20),W("selectedViewChange",function(r){F(t);let o=R(2);return U(o.changeTheView(r))}),I()()}if(i&2){let t=R(2);m(),S("selectedView",t.view)("selectedFirstDayOfTheWeek",t.selectedFirstDayOfTheWeek)}}function LUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function wUt(i,e){if(i&1&&(O(0,"div",10),j(1,"span",22),le(2,"date"),le(3,"sharedLocalize"),I()),i&2){let t=R(3);m(),S("textContent",Wn(2,1,t.selectedDate,"MMMM")+" "+t.selectedDate.getFullYear()+" "+ge(3,4,"WEEK")+": "+t.getWeekNumber(t.selectedDate))}}function PUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function MUt(i,e){if(i&1){let t=de();O(0,"div",23),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.setUnit(r))}),$(1,LUt,1,1,"co-icon",13),$(2,wUt,4,6,"div",10),O(3,"div",24),j(4,"span",22)(5,"span",22),I(),$(6,PUt,1,1,"co-icon",16),I()}if(i&2){let t=e.$implicit,n=e.$index,r=R(2);we("selected",t.weekdaySelected),m(),ee(r.showBackButton&&n===0?1:-1),m(),ee(t.newMonth?2:-1),m(2),S("textContent",r.capitalizeString(t.weekdayLong)),m(),S("textContent",t.weekdayDay+" "+r.capitalizeString(t.weekdayMonthLong)+" "+t.weekdayYear),m(),ee(n===6?6:-1)}}function kUt(i,e){if(i&1&&(O(0,"div",3),$(1,bUt,2,2,"div",17),O(2,"div",18),Pt(3,MUt,7,7,"div",19,zt),I()()),i&2){let t=R();m(),ee(t.viewSelection?1:-1),m(2),Mt(t.weekDays)}}function xUt(i,e){if(i&1){let t=de();O(0,"div",17)(1,"view-select",20),W("selectedViewChange",function(r){F(t);let o=R(2);return U(o.changeTheView(r))}),I()()}if(i&2){let t=R(2);m(),S("selectedView",t.view)("selectedFirstDayOfTheWeek",t.selectedFirstDayOfTheWeek)}}function FUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function UUt(i,e){if(i&1&&(O(0,"div",10),j(1,"span",22),le(2,"date"),le(3,"sharedLocalize"),I()),i&2){let t=R(3);m(),S("textContent",Wn(2,1,t.selectedDate,"MMMM")+" "+t.selectedDate.getFullYear()+" "+ge(3,4,"WEEK")+": "+t.getWeekNumber(t.selectedDate))}}function BUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function VUt(i,e){if(i&1&&(O(0,"div",6),$(1,FUt,1,1,"co-icon",13),$(2,UUt,4,6,"div",10),O(3,"div",24),j(4,"span",22)(5,"span",22),I(),$(6,BUt,1,1,"co-icon",16),I()),i&2){let t=e.$implicit,n=e.$index,r=R(2);we("selected",t.weekdaySelected),m(),ee(r.showBackButton&&n===0?1:-1),m(),ee(t.newMonth?2:-1),m(2),S("textContent",r.capitalizeString(t.weekdayLong)),m(),S("textContent",t.weekdayDay+" "+r.capitalizeString(t.weekdayMonthLong)+" "+t.weekdayYear),m(),ee(n===4?6:-1)}}function GUt(i,e){if(i&1&&(O(0,"div",4),$(1,xUt,2,2,"div",17),O(2,"div",18),Pt(3,VUt,7,7,"div",19,zt),I()()),i&2){let t=R();m(),ee(t.viewSelection?1:-1),m(2),Mt(t.weekDays)}}function HUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function WUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function jUt(i,e){if(i&1){let t=de();O(0,"div",23),W("click",function(){let r=F(t).$implicit,o=R(2);return U(o.setUnit(r))}),$(1,HUt,1,1,"co-icon",13),j(2,"div",26)(3,"div",21),$(4,WUt,1,1,"co-icon",16),I()}if(i&2){let t=e.$implicit,n=e.$index,r=R(2);we("selected",t.weekdaySelected)("selectable",t.events&&t.events.length>0),m(),ee(n===0&&r.showBackButton?1:-1),m(),S("textContent",t.weekdayShort),m(),S("textContent",t.weekdayDay+" "+t.weekdayMonthShort),m(),ee(n===6?4:-1)}}function zUt(i,e){if(i&1&&(O(0,"div",5),Pt(1,jUt,5,8,"div",25,zt),I()),i&2){let t=R();m(),Mt(t.weekDays)}}function YUt(i,e){if(i&1){let t=de();O(0,"co-icon",7),W("click",function(){F(t);let r=R(3);return U(r.subUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointLeft))}}function KUt(i,e){if(i&1){let t=de();O(0,"co-icon",9),W("click",function(){F(t);let r=R(3);return U(r.addUnit())}),I()}if(i&2){let t=R(3);S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function qUt(i,e){if(i&1&&(O(0,"div",6),$(1,YUt,1,1,"co-icon",13),j(2,"div",26),$(3,KUt,1,1,"co-icon",16),I()),i&2){let t=e.$implicit,n=e.$index,r=R(2);m(),ee(n===0&&r.showBackButton?1:-1),m(),S("textContent",t.weekdayShort),m(),ee(n===6?3:-1)}}function XUt(i,e){if(i&1&&(O(0,"div",5),Pt(1,qUt,4,3,"div",6,zt),I()),i&2){let t=R();m(),Mt(t.weekDays)}}var Gqe=(()=>{let e=class e{set selectedDate(n){this._selectedDate=new Date(n),this._prepareHeaderData()}get selectedDate(){return this._selectedDate}set firstAvailableDate(n){n&&(this._firstAvailableDate=new Date(n),this._prepareHeaderData())}get firstAvailableDate(){return this._firstAvailableDate}set eventsPerDay(n){this._eventsPerDay=n,this._prepareHeaderData()}constructor(n,r,o,s,a){this._locale=n,this._elementRef=r,this._renderer=o,this._ngZone=s,this.iconCacheService=a,this.icons=ot,this.viewTypes=Dn,this.scrollbarWidth=15,this.today=new Date,this.viewChange=new re,this.selectedDateChange=new re,this.rangeChange=new re,this.weekDays=[],this.day=Bqe,this.showBackButton=!0,this._eventsPerDay=[],this._onResize=()=>B(this,null,function*(){this._resizeHost()})}ngOnDestroy(){window.removeEventListener("resize",this._onResize),this._elementRef=void 0}ngOnInit(){this._ngZone.runOutsideAngular(()=>{window.addEventListener("resize",this._onResize)})}ngAfterContentChecked(){this._resizeHost()}subUnit(){if(this.selectedDate){let n=new Date(this.selectedDate);switch(this.view){case Dn.DayView:n.setDate(this.selectedDate.getDate()-1);break;case Dn.DaysAround:n.setDate(this.selectedDate.getDate()-1);break;case Dn.ThreeDaysView:n.setDate(this.selectedDate.getDate()-3);break;case Dn.WeekView:n.setDate(this.selectedDate.getDate()-7);break;case Dn.WeekWorkView:n.setDate(this.selectedDate.getDate()-5);break;case Dn.WeekSelectView:n.setDate(this.selectedDate.getDate()-7);break;case Dn.MonthView:n.setMonth(this.selectedDate.getMonth()-1);break}this.selectedDate=n,this.rangeChange.emit(this.selectedDate)}}addUnit(){if(this.selectedDate){let n=new Date(this.selectedDate);switch(this.view){case Dn.DayView:n.setDate(this.selectedDate.getDate()+1);break;case Dn.DaysAround:n.setDate(this.selectedDate.getDate()+1);break;case Dn.ThreeDaysView:n.setDate(this.selectedDate.getDate()+3);break;case Dn.WeekView:n.setDate(this.selectedDate.getDate()+7);break;case Dn.WeekWorkView:n.setDate(this.selectedDate.getDate()+5);break;case Dn.WeekSelectView:n.setDate(this.selectedDate.getDate()+7);break;case Dn.MonthView:n.setMonth(this.selectedDate.getMonth()+1);break}this.selectedDate=n,this.rangeChange.emit(this.selectedDate)}}setUnit(n){this.selectedDate=n.date,this.selectedDateChange.emit(this.selectedDate)}changeTheView(n){switch(this.view=n,!this.originalSelectedDate&&this._selectedDate&&(this.originalSelectedDate=this._selectedDate),n){case Dn.WeekView:this._selectedDate=this.selectedFirstDayOfTheWeek;break;case Dn.WeekWorkView:this._selectedDate=this.selectedFirstDayOfTheWeek;break;case Dn.ThreeDaysView:this.originalSelectedDate&&(this._selectedDate=this.originalSelectedDate,this.originalSelectedDate=void 0);break}this.viewChange.emit({view:n,date:this._selectedDate}),this._prepareHeaderData()}_resizeHost(){this._elementRef&&this._renderer.setStyle(this._elementRef.nativeElement,"width",this._elementRef.nativeElement.parentElement.clientWidth-this.scrollbarWidth+"px")}_prepareHeaderData(){if(this.selectedDate)switch(this.view){case Dn.DayView:let n=new o2;n.date=new Date(this.selectedDate);let r={year:"numeric",month:"long",day:"numeric"};n.description=this.selectedDate.toLocaleDateString(this._locale,r),this.day=n;break;case Dn.DaysAround:let o=yu.GetDaysAround(this.selectedDate);this.weekDays=o.weekDays,this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break;case Dn.ThreeDaysView:let s=yu.GetThreeDays(this.selectedDate);this.weekDays=s.weekDays,this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break;case Dn.WeekView:let a=yu.GetDaysOfWeek(this.selectedDate);this.weekDays=a.weekDays,this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break;case Dn.WeekWorkView:let l=yu.GetWorkDaysOfWeek(this.selectedDate);this.weekDays=l.weekDays,this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break;case Dn.WeekSelectView:let c=yu.GetDaysOfWeek(this.selectedDate);this.weekDays=c.weekDays,this.weekDays.forEach(u=>{let h=this._eventsPerDay&&this._eventsPerDay.length>0?this._eventsPerDay.find(f=>ro.DatesEqual(f.date,u.date)):null;h?u.events=h.events:u.weekdaySelected=!1}),this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break;case Dn.MonthView:let d=yu.GetDaysOfWeek(this.selectedDate);this.weekDays=d.weekDays,this.firstAvailableDate&&(this.showBackButton=this.weekDays.find(u=>ro.DatesEqual(this.firstAvailableDate,u.date))===void 0);break}}capitalizeString(n){return n[0].toUpperCase()+n.slice(1)}getWeekNumber(n){let r=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())),o=r.getUTCDay()||7;r.setUTCDate(r.getUTCDate()+4-o);let s=new Date(Date.UTC(r.getUTCFullYear(),0,1));return Math.ceil(((r.getTime()-s.getTime())/864e5+1)/7)}};e.\u0275fac=function(r){return new(r||e)(Q(cl),Q(ti),Q(As),Q(Nn),Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["agenda-header"]],inputs:{selectedDate:"selectedDate",selectedFirstDayOfTheWeek:"selectedFirstDayOfTheWeek",view:"view",firstAvailableDate:"firstAvailableDate",eventsPerDay:"eventsPerDay",viewSelection:"viewSelection"},outputs:{viewChange:"viewChange",selectedDateChange:"selectedDateChange",rangeChange:"rangeChange"},standalone:!1,decls:7,vars:7,consts:[[1,"agenda-header-wrapper","day-view"],[1,"agenda-header-wrapper","days-around"],[1,"agenda-header-wrapper","three-days-view"],[1,"agenda-header-wrapper","week-view"],[1,"agenda-header-wrapper","work-week-view"],[1,"agenda-header-wrapper"],[1,"week-day-label"],[1,"pointer-hover","no-user-select","sub-unit-icon","dark",3,"click","iconData"],[1,"day-description",3,"textContent"],[1,"pointer-hover","no-user-select","add-unit-icon","dark",3,"click","iconData"],[1,"month-description"],[1,"week-day-label","days-around",3,"selected"],[1,"week-day-label","days-around",3,"click"],[1,"pointer-hover","no-user-select","sub-unit-icon","dark",3,"iconData"],[1,"weekday-value","day",3,"textContent"],[1,"weekday-value","date",3,"textContent"],[1,"pointer-hover","no-user-select","add-unit-icon","dark",3,"iconData"],[1,"hour-label-placeholder"],[1,"week-view-header-wrapper"],[1,"week-day-label",3,"selected"],[3,"selectedViewChange","selectedView","selectedFirstDayOfTheWeek"],[1,"weekday-value",3,"textContent"],[3,"textContent"],[1,"week-day-label",3,"click"],[1,"weekday-value"],[1,"week-day-label",3,"selected","selectable"],[1,"weekday-description",3,"textContent"]],template:function(r,o){r&1&&($(0,gUt,5,3,"div",0),$(1,RUt,4,1,"div",1),$(2,yUt,5,1,"div",2),$(3,kUt,5,1,"div",3),$(4,GUt,5,1,"div",4),$(5,zUt,3,0,"div",5),$(6,XUt,3,0,"div",5)),r&2&&(ee(o.view===o.viewTypes.DayView?0:-1),m(),ee(o.view===o.viewTypes.DaysAround?1:-1),m(),ee(o.view===o.viewTypes.ThreeDaysView?2:-1),m(),ee(o.view===o.viewTypes.WeekView?3:-1),m(),ee(o.view===o.viewTypes.WeekWorkView?4:-1),m(),ee(o.view===o.viewTypes.WeekSelectView?5:-1),m(),ee(o.view===o.viewTypes.MonthView?6:-1))},dependencies:[ri,Vqe,Er,kt],encapsulation:2});let i=e;return i})();var OC=(()=>{let e=class e{set selectedDate(n){this._selectedDate=n,this._dateIsSet()}set eventsPerDay(n){this._eventsPerDay=n,this._eventsAreSet()}get selectedDate(){return this._selectedDate}get eventsPerDate(){return this._eventsPerDay}constructor(n,r){this.locale=n,this.iconCacheService=r,this.eventChecked=new re,this._eventsPerDay=[]}prepareViewData(){}getEventsFromDate(n){let r=[];if(this.eventsPerDate){let o=this.eventsPerDate.length;for(let s=0;s<o;s++)if(ro.DatesEqual(n,this.eventsPerDate[s].date)){r=this.eventsPerDate[s].events;break}}return r}_dateIsSet(){this.prepareViewData()}_eventsAreSet(){this.prepareViewData()}};e.\u0275fac=function(r){return new(r||e)(Q(cl),Q(yt))},e.\u0275dir=rn({type:e,inputs:{selectedDate:"selectedDate",eventsPerDay:"eventsPerDay"},outputs:{eventChecked:"eventChecked"}});let i=e;return i})();function QUt(i,e){if(i&1&&(O(0,"div",5),j(1,"div",6),I()),i&2){let t=e.$implicit;we("not-in-month",!t.inView),m(),S("textContent",t.weekdayDay)}}function JUt(i,e){if(i&1&&(O(0,"div",3),Pt(1,QUt,2,3,"div",4,zt),I()),i&2){let t=e.$implicit;m(),Mt(t.weekDays)}}var Hqe=(()=>{let e=class e extends OC{constructor(){super(...arguments),this.month=Uqe,this.firstWeekDays=[],this.weeks=[]}prepareViewData(){let n=new r2;if(this.selectedDate){let r=ro.GetFirstDayOfMonth(this.selectedDate),o=ro.GetLastDayOfMonth(this.selectedDate),s=!1,a=!0;for(;a;){s&&(a=!1);let l=yu.GetDaysOfWeek(r),c=l.weekDays.length;for(let d=0;d<c;d++)l.weekDays[d].events=this.getEventsFromDate(l.weekDays[d].date),l.weekDays[d].inView=l.weekDays[d].date.getMonth()===this.selectedDate.getMonth();n.weeks.push(l),r.setDate(r.getDate()+7),r.getTime()>=o.getTime()&&(s=!0)}this.month=n,this.firstWeekDays=this.month.firstWeek.weekDays,this.weeks=n.weeks}}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=fo(e)))(o||e)}})(),e.\u0275cmp=Fe({type:e,selectors:[["agenda-month-view"]],standalone:!1,features:[pi],decls:5,vars:0,consts:[[1,"view-wrapper"],[1,"hour-view-labels-wrapper"],[1,"weeks"],["fxLayout","row",1,"week"],[1,"week-day",3,"not-in-month"],[1,"week-day"],[1,"day",3,"textContent"]],template:function(r,o){r&1&&(O(0,"div",0),j(1,"div",1),O(2,"div",2),Pt(3,JUt,3,0,"div",3,zt),I()()),r&2&&(m(3),Mt(o.weeks))},encapsulation:2});let i=e;return i})();var eBt=["currentTime"],tBt=["*"];function iBt(i,e){if(i&1&&(O(0,"div",5),j(1,"div",6),le(2,"date"),I()),i&2){let t=R();we("show",t.showLabel),m(),S("textContent",Wn(2,3,t.date,"HH:mm"))}}function nBt(i,e){i&1&&j(0,"div",3,0)}var Wqe=(()=>{let e=class e{set date(n){this._date=n,this._checkDate(),this._checkWorkingDayStart()}get date(){return this._date}constructor(n){this._renderer=n,this.showLabel=!1,this.showCurrentTime=!1,this.currentTimeTop=0}ngOnDestroy(){this.currentTimeElement=void 0}_checkDate(){let n=new Date,r=this.date.getMinutes(),o=r+30;ro.DatesEqual(this.date,n)&&n.getHours()===this.date.getHours()&&n.getMinutes()>r&&n.getMinutes()<o&&(this.currentTimeTop=Math.max(n.getMinutes(),.01)/60*100,this._positionCurrentTime(),this.showCurrentTime=!0)}_checkWorkingDayStart(){this.id=this._date.getHours()===8&&this._date.getMinutes()===30?"dayStart":""}_positionCurrentTime(){this.currentTimeElement&&(this._renderer.setStyle(this.currentTimeElement.nativeElement,"top",this.currentTimeTop+"%"),this.currentTimeElement.nativeElement.scrollIntoView())}};e.\u0275fac=function(r){return new(r||e)(Q(As))},e.\u0275cmp=Fe({type:e,selectors:[["agenda-half-hour-cell"]],viewQuery:function(r,o){if(r&1&&qt(eBt,5),r&2){let s;xt(s=Ft())&&(o.currentTimeElement=s.first)}},inputs:{date:"date",showLabel:"showLabel"},standalone:!1,ngContentSelectors:tBt,decls:5,vars:4,consts:[["currentTime",""],[1,"cell-wrapper",3,"id"],[1,"half-hour-label",3,"show"],["id","currentTime",1,"current-time"],[1,"content-wrapper"],[1,"half-hour-label"],[3,"textContent"]],template:function(r,o){r&1&&(Mc(),O(0,"div",1),$(1,iBt,3,6,"div",2),$(2,nBt,2,0,"div",3),O(3,"div",4),Jl(4),I()()),r&2&&(S("id",d$(o.id)),m(),ee(o.showLabel?1:-1),m(),ee(o.showCurrentTime?2:-1))},dependencies:[Er],encapsulation:2});let i=e;return i})();var _q=(()=>{let e=class e{constructor(){this.onlyLabels=!1,this.noLabels=!1}set date(n){this._date=n,this._setNextHalfHour()}get date(){return this._date}_setNextHalfHour(){this.datePlushalfHour=new Date(this._date),this.datePlushalfHour.setMinutes(this.datePlushalfHour.getMinutes()+30)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["agenda-hour-cell"]],inputs:{onlyLabels:"onlyLabels",noLabels:"noLabels",date:"date"},standalone:!1,decls:3,vars:3,consts:[[1,"row-per-half-hour"],[3,"date","showLabel"],[3,"date"]],template:function(r,o){r&1&&(O(0,"div",0),j(1,"agenda-half-hour-cell",1)(2,"agenda-half-hour-cell",2),I()),r&2&&(m(),S("date",o.date)("showLabel",o.onlyLabels&&!o.noLabels),m(),S("date",o.datePlushalfHour))},dependencies:[Wqe],encapsulation:2});let i=e;return i})();var oBt=["*"];function sBt(i,e){if(i&1&&(O(0,"div",0)(1,"div",1),j(2,"agenda-hour-cell",2),I()()),i&2){let t=e.$implicit;m(2),S("date",t)}}var pq=(()=>{let e=class e{constructor(){this.datesByTheHour=[],this._date=new Date}set date(n){this._date=new Date(n),this._prepareViewData()}get date(){return this._date}_prepareViewData(){if(this.datesByTheHour.length=0,this.date){let n=new Date(this.date);n.setHours(0,0,0,0),this.datesByTheHour.push(n);for(let r=0;r<23;r++)n=new Date(n),n.setHours(n.getHours()+1),this.datesByTheHour.push(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["agenda-hour-view"]],inputs:{date:"date"},standalone:!1,ngContentSelectors:oBt,decls:3,vars:0,consts:[[1,"row-per-hour"],["fxLayout","row"],[3,"date"]],template:function(r,o){r&1&&(Mc(),Pt(0,sBt,3,1,"div",0,zt),Jl(2)),r&2&&Mt(o.datesByTheHour)},dependencies:[_q],encapsulation:2});let i=e;return i})();function aBt(i,e){if(i&1&&(O(0,"div",0)(1,"div"),j(2,"agenda-hour-cell",1),I()()),i&2){let t=e.$implicit,n=R();m(2),S("date",t)("onlyLabels",!0)("noLabels",n.noLabels)}}var Eq=(()=>{let e=class e{constructor(){this.noLabels=!1,this.datesByTheHour=[],this._date=new Date}set date(n){this._date=new Date(n),this._date.setDate(1),this._date.setMonth(1),this._date.setFullYear(1),this._prepareViewData()}get date(){return this._date}_prepareViewData(){if(this.datesByTheHour.length=0,this.date){let n=new Date(this.date);n.setHours(0,0,0,0),this.datesByTheHour.push(n);for(let r=0;r<23;r++)n=new Date(n),n.setHours(n.getHours()+1),this.datesByTheHour.push(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["agenda-hour-view-labels"]],inputs:{date:"date",noLabels:"noLabels"},standalone:!1,decls:2,vars:0,consts:[[1,"row-per-hour"],[3,"date","onlyLabels","noLabels"]],template:function(r,o){r&1&&Pt(0,aBt,3,3,"div",0,zt),r&2&&Mt(o.datesByTheHour)},dependencies:[_q],encapsulation:2});let i=e;return i})();function lBt(i,e){if(i&1&&j(0,"co-icon",3),i&2){let t=R();we("checked",t.event.checked),S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}var Kqe=(()=>{let e=class e{constructor(n,r,o){this._elementRef=n,this._renderer=r,this.iconCacheService=o,this.icons=ot,this.event=uq,this.eventChecked=new re}ngOnDestroy(){this._elementRef=void 0}ngOnInit(){let n=this.event.from.getHours(),r=this.event.from.getMinutes(),s=(n+r/60)*(this.halfHourHeight*2);this._renderer.setStyle(this._elementRef.nativeElement,"top",s+"px");let l=Math.abs(this.event.to.getTime()-this.event.from.getTime())/36e5*(this.halfHourHeight*2)-1;this._renderer.setStyle(this._elementRef.nativeElement,"height",l+"px")}checkEvent(n){this.event.checked=!this.event.checked,this.eventChecked.emit(this.event)}};e.\u0275fac=function(r){return new(r||e)(Q(ti),Q(As),Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["agenda-event"]],inputs:{event:"event",customEventObject:"customEventObject",halfHourHeight:"halfHourHeight"},outputs:{eventChecked:"eventChecked"},standalone:!1,decls:3,vars:6,consts:[[1,"agenda-event-wrapper",3,"click"],[1,"event-description",3,"textContent"],[3,"iconData","checked"],[3,"iconData"]],template:function(r,o){r&1&&(O(0,"div",0),W("click",function(a){return o.checkEvent(a)}),j(1,"div",1),$(2,lBt,1,3,"co-icon",2),I()),r&2&&(we("checkable",o.event.showCheckbox)("selected",o.event.checked),m(),S("textContent",o.event.description),m(),ee(o.event.showCheckbox?2:-1))},dependencies:[ri],encapsulation:2});let i=e;return i})();function dBt(i,e){if(i&1&&j(0,"co-icon",1),i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}function uBt(i,e){if(i&1&&j(0,"co-icon",1),i&2){let t=R();S("iconData",t.iconCacheService.getIcon(t.icons.ArrowPointRight))}}var qqe=(()=>{let e=class e{constructor(n){this.iconCacheService=n,this.icons=ot,this.event=uq,this.eventChecked=new re}checkEvent(n){this.event.checked=!this.event.checked,this.eventChecked.emit(this.event)}};e.\u0275fac=function(r){return new(r||e)(Q(yt))},e.\u0275cmp=Fe({type:e,selectors:[["agenda-select-event"]],inputs:{event:"event"},outputs:{eventChecked:"eventChecked"},standalone:!1,decls:10,vars:9,consts:[[1,"week-select-item",3,"click"],[1,"select-icon","action-color",3,"iconData"],[1,"moment-name"]],template:function(r,o){r&1&&(O(0,"div",0),W("click",function(a){return o.checkEvent(a)}),$(1,dBt,1,1,"co-icon",1),$(2,uBt,1,1,"co-icon",1),O(3,"div",2)(4,"small"),Rn(5),le(6,"date"),le(7,"uppercase"),I(),O(8,"h2"),Rn(9),I()()()),r&2&&(m(),ee(o.event.checked?-1:1),m(),ee(o.event.checked?2:-1),m(3),Ml(ge(7,7,Wn(6,4,o.event.date,"EEEE d MMMM"))),m(4),Ml(o.event.description))},dependencies:[ri,G$,Er],encapsulation:2});let i=e;return i})();function fBt(i,e){if(i&1){let t=de();O(0,"agenda-event",1),W("eventChecked",function(r){F(t);let o=R(2);return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=e.$implicit,n=R(2);S("halfHourHeight",n.halfHourHeight)("event",t)("customEventObject",n.customEventObject)}}function _Bt(i,e){if(i&1&&Pt(0,fBt,1,3,"agenda-event",0,zt),i&2){let t=R();Mt(t.events)}}function pBt(i,e){if(i&1){let t=de();O(0,"agenda-select-event",3),W("eventChecked",function(r){F(t);let o=R(2);return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=e.$implicit;S("event",t)}}function EBt(i,e){if(i&1&&Pt(0,pBt,1,1,"agenda-select-event",2,zt),i&2){let t=R();Mt(t.events)}}var s2=(()=>{let e=class e{constructor(){this.viewTypes=Dn,this.view=Dn.WeekView,this.type="",this.events=[],this.eventChecked=new re}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["agenda-events"]],inputs:{customEventObject:"customEventObject",view:"view",type:"type",events:"events",halfHourHeight:"halfHourHeight"},outputs:{eventChecked:"eventChecked"},standalone:!1,decls:2,vars:2,consts:[[3,"halfHourHeight","event","customEventObject"],[3,"eventChecked","halfHourHeight","event","customEventObject"],[3,"event"],[3,"eventChecked","event"]],template:function(r,o){r&1&&($(0,_Bt,2,0),$(1,EBt,2,0)),r&2&&(ee(o.view!==o.viewTypes.WeekSelectView?0:-1),m(),ee(o.view===o.viewTypes.WeekSelectView?1:-1))},dependencies:[Kqe,qqe],encapsulation:2});let i=e;return i})();var Xqe=(()=>{let e=class e extends OC{constructor(){super(...arguments),this.events=[]}prepareViewData(){this.eventsPerDate&&this.eventsPerDate.length>0&&(this.events=this.eventsPerDate[0].events)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=fo(e)))(o||e)}})(),e.\u0275cmp=Fe({type:e,selectors:[["agenda-day-view"]],inputs:{customEventObject:"customEventObject"},standalone:!1,features:[pi],decls:4,vars:5,consts:[[1,"view-wrapper"],[3,"date"],[3,"eventChecked","halfHourHeight","events","customEventObject"]],template:function(r,o){r&1&&(O(0,"div",0),j(1,"agenda-hour-view-labels",1),O(2,"agenda-hour-view",1)(3,"agenda-events",2),W("eventChecked",function(a){return o.eventChecked.emit(a)}),I()()()),r&2&&(m(),S("date",o.selectedDate),m(),S("date",o.selectedDate),m(),S("halfHourHeight",40)("events",o.events)("customEventObject",o.customEventObject))},dependencies:[pq,Eq,s2],encapsulation:2});let i=e;return i})();function gBt(i,e){if(i&1){let t=de();O(0,"div",2)(1,"agenda-hour-view",1)(2,"agenda-events",3),W("eventChecked",function(r){F(t);let o=R();return U(o.eventChecked.emit(r))}),I()()()}if(i&2){let t=e.$implicit,n=R();m(),S("date",t.date),m(),S("halfHourHeight",40)("events",t.events)("view",n.view)("customEventObject",n.customEventObject)}}var Zqe=(()=>{let e=class e extends OC{constructor(){super(...arguments),this.week=hq}prepareViewData(){if(this.selectedDate){let n=yu.GetDaysOfWeek(this.selectedDate),r=n.weekDays.length;for(let o=0;o<r;o++)n.weekDays[o].events=this.getEventsFromDate(n.weekDays[o].date);this.week=n}}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=fo(e)))(o||e)}})(),e.\u0275cmp=Fe({type:e,selectors:[["agenda-week-view"]],inputs:{view:"view",customEventObject:"customEventObject"},standalone:!1,features:[pi],decls:4,vars:1,consts:[[1,"view-wrapper"],[3,"date"],[1,"week-day"],[3,"eventChecked","halfHourHeight","events","view","customEventObject"]],template:function(r,o){r&1&&(O(0,"div",0),j(1,"agenda-hour-view-labels",1),Pt(2,gBt,3,5,"div",2,zt),I()),r&2&&(m(),S("date",o.selectedDate),m(),Mt(o.week.weekDays))},dependencies:[pq,Eq,s2],encapsulation:2});let i=e;return i})();function TBt(i,e){i&1&&(O(0,"div",7),j(1,"p",4),I()),i&2&&(m(),S("textContent","AGENDA_NO_PERIODS_AVAILABLE"))}function SBt(i,e){if(i&1){let t=de();O(0,"div",2)(1,"div",3),j(2,"h3",4),O(3,"div",5)(4,"agenda-events",6),W("eventChecked",function(r){F(t);let o=R(2);return U(o.eventChecked.emit(r))}),I(),$(5,TBt,2,1,"div",7),I()(),O(6,"div",8),j(7,"h3",4),O(8,"ul")(9,"li"),j(10,"co-icon",9)(11,"span",4),I(),O(12,"li"),j(13,"co-icon",9)(14,"span",4),I()()()()}if(i&2){let t=R().$implicit,n=R();m(2),S("textContent","AGENDA_CHOOSE_DELIVERY_PERIOD"),m(2),S("halfHourHeight",40)("events",t.events)("view",n.view),m(),ee(t.events.length===0?5:-1),m(2),S("textContent","AGENDA_FOR_EVERY_PERIOD"),m(3),S("iconData",n.iconCacheService.getIcon(n.icons.CheckRound)),m(),S("textContent","AGENDA_FOR_EVERY_PERIOD_REASON1"),m(2),S("iconData",n.iconCacheService.getIcon(n.icons.CheckRound)),m(),S("textContent","AGENDA_FOR_EVERY_PERIOD_REASON2")}}function CBt(i,e){if(i&1&&(O(0,"div",1),$(1,SBt,15,10,"div",2),I()),i&2){let t=e.$implicit;m(),ee(t.weekdaySelected?1:-1)}}var Qqe=(()=>{let e=class e extends OC{constructor(){super(...arguments),this.view=Dn.WeekSelectView,this.week=hq,this.icons=ot}prepareViewData(){if(this.selectedDate){let n=yu.GetDaysOfWeek(this.selectedDate),r=n.weekDays.length;for(let o=0;o<r;o++)n.weekDays[o].events=this.getEventsFromDate(n.weekDays[o].date);this.week=n}}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=fo(e)))(o||e)}})(),e.\u0275cmp=Fe({type:e,selectors:[["agenda-week-select-view"]],inputs:{view:"view"},standalone:!1,features:[pi],decls:3,vars:0,consts:[[1,"view-wrapper","week-select-view"],[1,"week-day"],[1,"week-select-container"],[1,"week-select-left"],[3,"textContent"],[1,"week-select-list","mini-scrollbar"],[3,"eventChecked","halfHourHeight","events","view"],[1,"no-events-banner"],[1,"week-select-right"],[1,"small","action-color","moment-icon",3,"iconData"]],template:function(r,o){r&1&&(O(0,"div",0),Pt(1,CBt,2,1,"div",1,zt),I()),r&2&&(m(),Mt(o.week.weekDays))},dependencies:[ri,s2],encapsulation:2});let i=e;return i})();function OBt(i,e){if(i&1){let t=de();O(0,"agenda-day-view",5),W("eventChecked",function(r){F(t);let o=R();return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=R();S("selectedDate",t.selectedDate)("customEventObject",t.customEventObject)("eventsPerDay",t.eventsPerDay)}}function IBt(i,e){if(i&1){let t=de();O(0,"agenda-week-view",6),W("eventChecked",function(r){F(t);let o=R();return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=R();S("view",t.view)("selectedDate",t.selectedDate)("customEventObject",t.customEventObject)("eventsPerDay",t.eventsPerDay)}}function NBt(i,e){if(i&1){let t=de();O(0,"agenda-week-select-view",7),W("eventChecked",function(r){F(t);let o=R();return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=R();S("view",t.view)("selectedDate",t.selectedDate)("eventsPerDay",t.eventsPerDay)}}function vBt(i,e){if(i&1){let t=de();O(0,"agenda-month-view",8),W("eventChecked",function(r){F(t);let o=R();return U(o.eventChecked.emit(r))}),I()}if(i&2){let t=R();S("selectedDate",t.selectedDate)("eventsPerDay",t.eventsPerDay)}}var Jqe=(()=>{let e=class e{constructor(){this.eventsPerDay=[],this.eventChecked=new re,this.viewTypes=Dn}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=Fe({type:e,selectors:[["agenda-view"]],inputs:{view:"view",customEventObject:"customEventObject",selectedDate:"selectedDate",eventsPerDay:"eventsPerDay"},outputs:{eventChecked:"eventChecked"},standalone:!1,decls:5,vars:1,consts:[[1,"view-wrapper","mini-scrollbar"],[3,"selectedDate","customEventObject","eventsPerDay"],[3,"view","selectedDate","customEventObject","eventsPerDay"],[3,"view","selectedDate","eventsPerDay"],[3,"selectedDate","eventsPerDay"],[3,"eventChecked","selectedDate","customEventObject","eventsPerDay"],[3,"eventChecked","view","selectedDate","customEventObject","eventsPerDay"],[3,"eventChecked","view","selectedDate","eventsPerDay"],[3,"eventChecked","selectedDate","eventsPerDay"]],template:function(r,o){if(r&1&&(O(0,"div",0),$(1,OBt,1,3,"agenda-day-view",1)(2,IBt,1,4,"agenda-week-view",2)(3,NBt,1,3,"agenda-week-select-view",3)(4,vBt,1,2,"agenda-month-view",4),I()),r&2){let s;m(),ee((s=o.view)===o.viewTypes.DayView?1:s===o.viewTypes.WeekView?2:s===o.viewTypes.WeekSelectView?3:s===o.viewTypes.MonthView?4:-1)}},dependencies:[Hqe,Xqe,Zqe,Qqe],encapsulation:2});let i=e;return i})();var yBt=["dayStart"];function bBt(i,e){if(i&1){let t=de();O(0,"calendar",8),vt("daysChange",function(r){F(t);let o=R();return Rt(o.days,r)||(o.days=r),U(r)}),W("selectedDateChange",function(r){F(t);let o=R();return U(o.doChangeSelectedDate(r))}),I()}if(i&2){let t=R();S("view",t.view),Nt("days",t.days),S("selectedDate",t.selectedDate)}}function LBt(i,e){if(i&1){let t=de();O(0,"co-button",9),W("click",function(r){F(t);let o=R();return U(o.buttonClick.emit(r))}),I()}if(i&2){let t=R();S("label",t.buttonLabel)}}var $qe=(()=>{let e=class e{set setSelectedDate(n){this.selectedDate=n,this.setFirstDayOfTheWeek(n,this.weekStartsOn)}constructor(n,r){this._changeDetector=n,this.renderer=r,this.calendarNavigation=!1,this.customEventObject=!1,this.showButton=!1,this.weekStartsOn=cE.Monday,this.buttonLabel="",this.eventsPerDay=[],this.view=Dn.ThreeDaysView,this.viewSelection=!0,this.eventChecked=new re,this.selectedDateChange=new re,this.rangeChange=new re,this.viewChange=new re,this.buttonClick=new re,this.dayNumbers={[cE.Sunday]:0,[cE.Monday]:1,[cE.Tuesday]:2,[cE.Wednesday]:3,[cE.Thursday]:4,[cE.Friday]:5,[cE.Saturday]:6},this.showClass=!0,this.days=[],this._selectedDate=new Date}doChangeSelectedDate(n,r=!1){this.selectedDate=new Date(n),r?this.rangeChange.emit(this.selectedDate):this.selectedDateChange.emit(this.selectedDate),this._changeDetector.detectChanges()}doChangeView(n){this.view=n.view,this.viewChange.emit(n)}scrollToDayStart(){if(this.dayStart!==void 0){let n=this.renderer.selectRootElement("#dayStart");n&&setTimeout(()=>{n.scrollIntoView({behavior:"instant",block:"center"})})}}setFirstDayOfTheWeek(n,r=cE.Monday){if(Number.isNaN(n.getTime()))throw new TypeError("Invalid Date");let o=new Date(n),s=this.dayNumbers[r],a=(o.getDay()-s+7)%7;o.setDate(o.getDate()-a),o.setHours(0,0,0,0),this.selectedFirstDateOfTheWeek=o}};e.\u0275fac=function(r){return new(r||e)(Q(pn),Q(As))},e.\u0275cmp=Fe({type:e,selectors:[["co-date-planning"]],viewQuery:function(r,o){if(r&1&&qt(yBt,7),r&2){let s;xt(s=Ft())&&(o.dayStart=s.first)}},hostVars:2,hostBindings:function(r,o){r&2&&we("co-date-planning",o.showClass)},inputs:{selectedDate:"selectedDate",selectedFirstDateOfTheWeek:"selectedFirstDateOfTheWeek",calendarNavigation:"calendarNavigation",customEventObject:"customEventObject",showButton:"showButton",weekStartsOn:"weekStartsOn",setSelectedDate:"setSelectedDate",firstAvailableDate:"firstAvailableDate",buttonLabel:"buttonLabel",eventsPerDay:"eventsPerDay",view:"view",viewSelection:"viewSelection"},outputs:{eventChecked:"eventChecked",selectedDateChange:"selectedDateChange",rangeChange:"rangeChange",viewChange:"viewChange",buttonClick:"buttonClick"},standalone:!1,decls:8,vars:12,consts:[[1,"sc-agenda"],[1,"content-wrapper"],[3,"view","days","selectedDate"],[1,"agenda-content-wrapper","mini-scrollbar"],[1,"agenda-content"],[3,"viewChange","selectedDateChange","rangeChange","view","firstAvailableDate","eventsPerDay","selectedDate","selectedFirstDayOfTheWeek","viewSelection"],[3,"eventChecked","view","customEventObject","selectedDate","eventsPerDay"],[1,"text-only","select-agenda-button",3,"label"],[3,"daysChange","selectedDateChange","view","days","selectedDate"],[1,"text-only","select-agenda-button",3,"click","label"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div",1),$(2,bBt,1,3,"calendar",2),O(3,"div",3)(4,"div",4)(5,"agenda-header",5),W("viewChange",function(a){return o.doChangeView(a)})("selectedDateChange",function(a){return o.doChangeSelectedDate(a)})("rangeChange",function(a){return o.doChangeSelectedDate(a,!0)}),I(),O(6,"agenda-view",6),W("eventChecked",function(a){return o.eventChecked.emit(a)}),I()()()()(),$(7,LBt,1,1,"co-button",7)),r&2&&(m(2),ee(o.calendarNavigation?2:-1),m(3),S("view",o.view)("firstAvailableDate",o.firstAvailableDate)("eventsPerDay",o.eventsPerDay)("selectedDate",o.selectedDate)("selectedFirstDayOfTheWeek",o.selectedFirstDateOfTheWeek)("viewSelection",o.viewSelection),m(),S("view",o.view)("customEventObject",o.customEventObject)("selectedDate",o.selectedDate)("eventsPerDay",o.eventsPerDay),m(),ee(o.showButton&&o.eventsPerDay.length>0?7:-1))},dependencies:[Ki,Fqe,Gqe,Jqe],encapsulation:2,data:{animation:[ao("showHideWindow",[xn("void",on({transform:"scaleY(0)"})),xn("*",on({transform:"scaleY(1)"})),qr(":enter, :leave",[Gr("200ms ease-in-out")])])]}});let i=e;return i})();var PBt=["dayStart"];function MBt(i,e){if(i&1){let t=de();O(0,"div",11)(1,"co-input-checkbox",12),W("modelChange",function(r){let o=F(t).$implicit,s=R(),a=s.$implicit,l=s.$index,c=R(2);return U(c.handleOptionSelect(r,o,a.date,l))}),I()()}if(i&2){let t=e.$implicit,n=R(3);m(),S("disabled",n.checkDisabled)("model",t.checked)("label",t.description)}}function kBt(i,e){if(i&1&&(O(0,"div",10),j(1,"p",2),le(2,"date"),Pt(3,MBt,2,3,"div",11,zt),I()),i&2){let t=e.$implicit,n=e.$index;S("id",u$("event-",n)),m(),S("textContent",dB(2,3,t.date,"EEEE dd MMMM","nl")),m(2),Mt(t.events)}}function xBt(i,e){if(i&1&&(O(0,"div",9),Pt(1,kBt,5,7,"div",10,zt),le(3,"slice"),I()),i&2){let t=R();we("horizontal-layout",!t.verticalLayout),m(),Mt(dB(3,2,t.events,0,t.limit))}}function FBt(i,e){if(i&1&&(O(0,"div",5),j(1,"h2",2),O(2,"div",13),j(3,"co-icon",14)(4,"p",2),I()()),i&2){let t=R();m(),S("textContent",t.disclaimerHeader),m(2),S("iconData",t.iconCacheService.getIcon(t.icons.CheckRound)),m(),S("textContent",t.disclaimerDescription)}}function UBt(i,e){if(i&1){let t=de();O(0,"co-button",15),W("click",function(r){F(t);let o=R();return U(o.buttonClick.emit(r))}),I()}if(i&2){let t=R();S("label",t.buttonLabel)}}var eXe=(()=>{let e=class e{set eventsPerDay(n){this._eventsPerDay=n,this.checkForMoreLoadable()}get eventsPerDay(){return this._eventsPerDay}constructor(n,r,o){this.locale=n,this.iconCacheService=r,this._changeDetector=o,this.icons=ot,this.buttonLabel="",this.headerText="",this.headerDescription="",this.disclaimerHeader="",this.disclaimerDescription="",this.loadMoreButtonText="",this.showDisclaimer=!0,this.showConfirmButton=!0,this.verticalLayout=!0,this.buttonClick=new re,this.selected=new re,this.showClass=!0,this.days=[],this.events=[],this.limit=4,this.moreLoadable=!0,this.checkDisabled=!1,this._eventsPerDay=[]}ngOnInit(){this.checkForMoreLoadable()}checkForMoreLoadable(){this.eventsPerDay&&(this.events=this.eventsPerDay,this.eventsPerDay.length<=this.limit&&(this.moreLoadable=!1),this._changeDetector.detectChanges())}handleOptionSelect(n,r,o,s){this.events.forEach(c=>{c.events.forEach(d=>d.checked=!1)});let a=document.getElementById("event-"+s),l=document.getElementsByClassName("eventOption");for(let c=0;c<l.length;c++)l[c].classList.remove("day-selected");if(n){r.checked=!0,this.selectedOption=r;let c=new n2;c.date=o,c.events.push(r),this.selected.emit(c),a?.classList.add("day-selected")}else this.selectedOption=null,this.selected.emit(null);this._changeDetector.detectChanges()}loadMore(){this.limit=this.limit+=4,this.eventsPerDay.length<=this.limit&&(this.moreLoadable=!1),this._changeDetector.detectChanges()}};e.\u0275fac=function(r){return new(r||e)(Q(cl),Q(yt),Q(pn))},e.\u0275cmp=Fe({type:e,selectors:[["co-preferred-planning"]],viewQuery:function(r,o){if(r&1&&qt(PBt,7),r&2){let s;xt(s=Ft())&&(o.dayStart=s.first)}},hostVars:2,hostBindings:function(r,o){r&2&&we("co-preferred-planning",o.showClass)},inputs:{firstAvailableDate:"firstAvailableDate",buttonLabel:"buttonLabel",headerText:"headerText",headerDescription:"headerDescription",disclaimerHeader:"disclaimerHeader",disclaimerDescription:"disclaimerDescription",loadMoreButtonText:"loadMoreButtonText",showDisclaimer:"showDisclaimer",showConfirmButton:"showConfirmButton",verticalLayout:"verticalLayout",eventsPerDay:"eventsPerDay",selectedDate:"selectedDate"},outputs:{buttonClick:"buttonClick",selected:"selected"},standalone:!1,decls:11,vars:7,consts:[[1,"co-preferred-planning"],[1,"content-wrapper"],[3,"textContent"],[1,"planning-container"],[1,"planning-options",3,"horizontal-layout"],[1,"planning-disclaimer"],[1,"load-more-container",3,"click","ngClass"],[3,"iconData"],[1,"submit-button",3,"label"],[1,"planning-options"],[1,"eventOption",3,"id"],[1,"planning-option"],[3,"modelChange","disabled","model","label"],[1,"planning-disclaimer-contents"],[1,"disclaimer-icon",3,"iconData"],[1,"submit-button",3,"click","label"]],template:function(r,o){r&1&&(O(0,"div",0)(1,"div",1),j(2,"p",2),O(3,"div",3),$(4,xBt,4,6,"div",4),$(5,FBt,5,3,"div",5),I(),O(6,"div",6),W("click",function(){return o.loadMore()}),O(7,"p"),j(8,"co-icon",7)(9,"span",2),I()()()(),$(10,UBt,1,1,"co-button",8)),r&2&&(m(2),S("textContent",o.headerDescription),m(2),ee(o.events?4:-1),m(),ee(o.showDisclaimer?5:-1),m(),S("ngClass",o.moreLoadable?"":"load-more-container-disabled"),m(2),S("iconData",o.iconCacheService.getIcon(o.icons.ArrowFatRight)),m(),S("textContent",o.loadMoreButtonText),m(),ee(o.showConfirmButton?10:-1))},dependencies:[xf,ri,Ki,gl,W$,Er],encapsulation:2,data:{animation:[ao("showHideWindow",[xn("void",on({transform:"scaleY(0)"})),xn("*",on({transform:"scaleY(1)"})),qr(":enter, :leave",[Gr("200ms ease-in-out")])])]}});let i=e;return i})();var pg=(function(){function i(){}return i.prototype.getTitle=function(){return this.title},i.prototype.setTitle=function(e){this.title=e},i.prototype.getModuleId=function(){return this.moduleId},i.prototype.setModuleId=function(e){this.moduleId=e},i.prototype.getNodeLevel=function(){return this.nodeLevel},i.prototype.setNodeLevel=function(e){this.nodeLevel=e},i.prototype.getSequence=function(){return this.sequence},i.prototype.setSequence=function(e){this.sequence=e},i.prototype.getConfigId=function(){return this.configId},i.prototype.setConfigId=function(e){this.configId=e},i.prototype.getRubricId=function(){return this.rubricId},i.prototype.setRubricId=function(e){this.rubricId=e},i.prototype.getCategoryId=function(){return this.categoryId},i.prototype.setCategoryId=function(e){this.categoryId=e},i.prototype.getParentCatId=function(){return this.parentCatId},i.prototype.setParentCatId=function(e){this.parentCatId=e},i.prototype.getFixedKey=function(){return this.fixedKey},i.prototype.setFixedKey=function(e){this.fixedKey=e},i.prototype.getCfgObjId=function(){return this.cfgObjId},i.prototype.setCfgObjId=function(e){this.cfgObjId=e},i.prototype.getCfgRights=function(){return this.cfgRights},i.prototype.setCfgRights=function(e){this.cfgRights=e},i.prototype.getVisible=function(){return this.visible},i.prototype.setVisible=function(e){this.visible=e},i.prototype.getDefaultConfig=function(){return this.defaultConfig},i.prototype.setDefaultConfig=function(e){this.defaultConfig=e},i.prototype.getSeparateInputRight=function(){return this.separateInputRight},i.prototype.setSeparateInputRight=function(e){this.separateInputRight=e},i})();var jF=class extends pg{constructor(){super(...arguments),this.subCats=[],this.headers=[]}};var mq=class extends pg{constructor(){super(...arguments),this.headers=[]}};var zF=class extends pg{constructor(){super(...arguments),this.subRubrics=[]}};var YF=class{};var Ld=(function(i){return i.K="K",i.L="L",i.Date="D",i.N="N",i.Alphanumeric="A",i.J="J",i.MultiSelect="M",i})(Ld||{});var KF=class extends pg{};var qF=class extends pg{constructor(){super(...arguments),this.rubrics=[]}};var tXe=(function(){function i(){}return i.prototype.getRubricId=function(){return this.rubricId},i.prototype.setRubricId=function(e){this.rubricId=e},i.prototype.getModuleId=function(){return this.moduleId},i.prototype.setModuleId=function(e){this.moduleId=e},i.prototype.getDescription=function(){return this.description},i.prototype.setDescription=function(e){this.description=e},i.prototype.getParentId=function(){return this.parentId},i.prototype.setParentId=function(e){this.parentId=e},i.prototype.getCfgObjId=function(){return this.cfgObjId},i.prototype.setCfgObjId=function(e){this.cfgObjId=e},i.prototype.getCfgRights=function(){return this.cfgRights},i.prototype.setCfgRights=function(e){this.cfgRights=e},i.prototype.getVisible=function(){return this.visible},i.prototype.setVisible=function(e){this.visible=e},i.prototype.getConfigObjects=function(){return this.configObjects},i.prototype.setConfigObjects=function(e){this.configObjects=e},i})();var XF=class extends tXe{constructor(){super(...arguments),this.fields=[]}};function VBt(i,e){if(i&1){let t=de();O(0,"span",10),W("click",function(){F(t);let r=R().$implicit;return U(r.visible=r.visible==="T"?"F":"T")}),I()}if(i&2){let t=R().$implicit;S("textContent",t.title)}}function GBt(i,e){if(i&1){let t=de();O(0,"span",10),W("click",function(){F(t);let r=R().$implicit;return U(r.visible=r.visible==="T"?"F":"T")}),I()}if(i&2){let t=R().$implicit;S("textContent",t.title)}}function HBt(i,e){if(i&1){let t=de();O(0,"span",10),W("click",function(){F(t);let r=R().$implicit;return U(r.visible=r.visible==="T"?"F":"T")}),I()}if(i&2){let t=R().$implicit;S("textContent",t.title)}}function WBt(i,e){if(i&1){let t=de();O(0,"span",10),W("click",function(){F(t);let r=R(3).$implicit,o=R().$implicit,s=R().$implicit,a=R();return U(a.handleRubricClicked(r,o,s))}),I()}if(i&2){let t=R().$implicit;S("textContent",t.title)}}function jBt(i,e){if(i&1&&(O(0,"div",14),$(1,WBt,1,1,"span",1),I()),i&2){let t=R().$implicit;m(),ee(t.visible==="T"?1:-1)}}function zBt(i,e){if(i&1&&(O(0,"div",13),$(1,HBt,1,1,"span",1),Pt(2,jBt,2,1,"div",14,zt),I()),i&2){let t=e.$implicit,n=R().$implicit;m(),ee(n.visible==="T"?1:-1),m(),Mt(t.headers)}}function YBt(i,e){if(i&1){let t=de();O(0,"span",10),W("click",function(){F(t);let r=R(2).$implicit,o=R().$implicit,s=R().$implicit,a=R();return U(a.handleRubricClicked(r,o,s))}),I()}if(i&2){let t=R().$implicit;S("textContent",t.title)}}function KBt(i,e){if(i&1&&(O(0,"div",14),$(1,YBt,1,1,"span",1),I()),i&2){let t=R().$implicit;m(),ee(t.visible==="T"?1:-1)}}function qBt(i,e){if(i&1&&(O(0,"div",12),$(1,GBt,1,1,"span",1),Pt(2,zBt,4,1,"div",13,zt),Pt(4,KBt,2,1,"div",14,zt),I()),i&2){let t=e.$implicit,n=R().$implicit;m(),ee(n.visible==="T"?1:-1),m(),Mt(t.subCats),m(2),Mt(t.headers)}}function XBt(i,e){if(i&1&&(O(0,"div",11),$(1,VBt,1,1,"span",1),Pt(2,qBt,6,1,"div",12,zt),I()),i&2){let t=e.$implicit,n=R().$implicit;m(),ee(n.visible==="T"?1:-1),m(),Mt(t.rubrics)}}function ZBt(i,e){if(i&1){let t=de();O(0,"div",2)(1,"span",10),W("click",function(){let r=F(t).$implicit;return U(r.visible=r.visible==="T"?"F":"T")}),I(),Pt(2,XBt,4,1,"div",11,zt),I()}if(i&2){let t=e.$implicit;m(),S("textContent",t.title),m(),Mt(t.configs)}}function QBt(i,e){if(i&1){let t=de();O(0,"div",20)(1,"co-input-text",18),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.name,r)||(o.name=r),U(r)}),I(),O(2,"co-list-of-values",21),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.fieldType,r)||(o.fieldType=r),U(r)}),I(),O(3,"co-button",17),W("click",function(){let r=F(t).$index,o=R().$index,s=R().$index,a=R().$index,l=R();return U(l.removeField(a,s,o,r))}),I()()}if(i&2){let t=e.$implicit,n=R(4);m(),S("placeholder","Field name"),Nt("model",t.name),S("maxLength",28),m(),S("collection",n.multiSelectValues),Nt("model",t.fieldType),S("displayField","name")("label","Field type")}}function JBt(i,e){if(i&1){let t=de();O(0,"div",9)(1,"co-button",17),W("click",function(){let r=F(t).$index,o=R().$index,s=R().$index,a=R();return U(a.removeHeader(s,o,r))}),I(),j(2,"br"),O(3,"co-input-text",18),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.description,r)||(o.description=r),U(r)}),I(),O(4,"div",4),j(5,"h5",1),O(6,"co-button",7),W("click",function(){let r=F(t).$index,o=R().$index,s=R().$index,a=R();return U(a.addField(s,o,r))}),I()(),Pt(7,QBt,4,7,"div",20,zt),I()}if(i&2){let t=e.$implicit;m(3),S("placeholder","Header description"),Nt("model",t.description),S("maxLength",28),m(2),S("textContent","Header fields"),m(2),Mt(t.fields)}}function $Bt(i,e){if(i&1){let t=de();O(0,"div",9)(1,"co-button",17),W("click",function(){let r=F(t).$index,o=R().$index,s=R();return U(s.removeSubTab(o,r))}),I(),j(2,"br"),O(3,"co-input-text",18),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.title,r)||(o.title=r),U(r)}),I(),O(4,"div",4),j(5,"h4",1),O(6,"co-button",7),W("click",function(){let r=F(t).$index,o=R().$index,s=R();return U(s.addHeader(o,r))}),I()(),Pt(7,JBt,9,4,"div",9,zt),I()}if(i&2){let t=e.$implicit;m(3),S("placeholder","Sub tab description"),Nt("model",t.title),S("maxLength",28),m(2),S("textContent","Sub tab headers"),m(2),Mt(t.subRubrics)}}function eVt(i,e){if(i&1){let t=de();O(0,"div",9)(1,"div",15)(2,"div",16)(3,"co-button",17),W("click",function(){let r=F(t).$index,o=R();return U(o.removeRubric(r))}),I(),j(4,"br"),O(5,"co-input-text",18),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.title,r)||(o.title=r),U(r)}),I(),O(6,"co-input-text",19),vt("modelChange",function(r){let o=F(t).$implicit;return Rt(o.categoryId,r)||(o.categoryId=r),U(r)}),I()(),O(7,"div",4),j(8,"h3",1),O(9,"co-button",7),W("click",function(){let r=F(t).$index,o=R();return U(o.addSubTab(r))}),I()(),Pt(10,$Bt,9,4,"div",9,zt),I()()}if(i&2){let t=e.$implicit;m(5),S("placeholder","Rubric name"),Nt("model",t.title),S("maxLength",28),m(),S("placeholder","Unique ID")("type","number"),Nt("model",t.categoryId),m(2),S("textContent","Rubric sub tabs"),m(2),Mt(t.headers)}}var iXe=(()=>{let e=class e{showClass(){return!0}constructor(n){this._sharedService=n,this.currentModule=new KF,this.currentConfig=new qF,this.configData=[],this.idList=[],this.multiSelectValues=[{name:"Button",value:Ld.K},{name:"LOV",value:Ld.L},{name:"Date",value:Ld.Date},{name:"Numeric",value:Ld.N},{name:"Alphanumeric",value:Ld.Alphanumeric},{name:"Yes/No",value:Ld.J},{name:"Multi select",value:Ld.MultiSelect}],this._sqlProcedure=""}ngOnInit(){this._getScreenConfigData()}addRubric(){this.currentConfig.rubrics.push(new jF)}removeRubric(n){this.currentConfig.rubrics.splice(n,1)}addSubTab(n){this.currentConfig.rubrics[n].headers.unshift(new zF)}removeSubTab(n,r){this.currentConfig.rubrics[n].headers.splice(r,1)}addHeader(n,r){this.currentConfig.rubrics[n].headers[r].subRubrics.unshift(new XF)}removeHeader(n,r,o){this.currentConfig.rubrics[n].headers[r].subRubrics.splice(o,1)}addField(n,r,o){this.currentConfig.rubrics[n].headers[r].subRubrics[o].fields.unshift(new YF)}removeField(n,r,o,s){this.currentConfig.rubrics[n].headers[r].subRubrics[o].fields.splice(s,1)}copySQLProcedure(){this._sqlProcedure="",this._defineObjectNames(),this._createProcedurePrefix(),this._createIdSymbols(),this._createIdSymbols(!1),this._createScreenConfigRubrics(),this._createObjects(),this._createScreenConfigObjects(),this._createProcedureSuffix(),this._copyToClipboard(this._sqlProcedure)}_createProcedurePrefix(){this._sqlProcedure+=`/**
|
|
235
235
|
* ${this.currentModule.title} module screen config.
|
|
236
236
|
* rubric start id: ${this.currentConfig.rubrics[0].categoryId}
|
|
237
237
|
* object start id: ${+this.currentConfig.rubrics[0].categoryId+1e3}
|