{"version":3,"sources":["node_modules/@iplab/ngx-file-upload/fesm2022/iplab-ngx-file-upload.mjs","src/app/_models/reading-list/cbl/cbl-import-result.enum.ts","src/app/reading-list/_components/step-tracker/step-tracker.component.ts","src/app/reading-list/_components/step-tracker/step-tracker.component.html","src/app/_models/reading-list/cbl/cbl-import-reason.enum.ts","src/app/_pipes/cbl-conflict-reason.pipe.ts","src/app/_pipes/cbl-import-result.pipe.ts","src/app/reading-list/_modals/import-cbl-modal/import-cbl-modal.component.ts","src/app/reading-list/_modals/import-cbl-modal/import-cbl-modal.component.html","node_modules/@angular/cdk/fesm2022/a11y.mjs","node_modules/@angular/cdk/fesm2022/drag-drop.mjs","src/app/reading-list/_components/draggable-ordered-list/draggable-ordered-list.component.ts","src/app/reading-list/_components/draggable-ordered-list/draggable-ordered-list.component.html","src/app/reading-list/_components/reading-list-item/reading-list-item.component.ts","src/app/reading-list/_components/reading-list-item/reading-list-item.component.html"],"sourcesContent":["import * as i0 from '@angular/core';\nimport { Injectable, ElementRef, inject, Renderer2, ChangeDetectorRef, Directive, Component, ChangeDetectionStrategy, Input, forwardRef, Inject, ContentChild, ViewChild, HostBinding, HostListener, Optional, Host, Self, NgModule } from '@angular/core';\nimport * as i2 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';\nimport { style, animate, stagger, query, transition, trigger } from '@angular/animations';\nimport { BehaviorSubject, Subject } from 'rxjs';\n\n// -owner-group-others-\n// -rwxrwxrwx = 0777\nfunction FileUploadIconComponent__svg_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 3)(1, \"g\");\n i0.ɵɵelement(2, \"path\", 4);\n i0.ɵɵelementEnd()();\n }\n}\nfunction FileUploadIconComponent__svg_svg_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 3)(1, \"g\");\n i0.ɵɵelement(2, \"path\", 5);\n i0.ɵɵelementEnd()();\n }\n}\nfunction FileUploadIconComponent__svg_svg_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 3)(1, \"g\");\n i0.ɵɵelement(2, \"path\", 6);\n i0.ɵɵelementEnd()();\n }\n}\nfunction FileUploadIconComponent__svg_svg_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 3)(1, \"g\");\n i0.ɵɵelement(2, \"path\", 7);\n i0.ɵɵelementEnd()();\n }\n}\nfunction FileUploadIconComponent__svg_svg_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 3)(1, \"g\");\n i0.ɵɵelement(2, \"path\", 8);\n i0.ɵɵelementEnd()();\n }\n}\nconst _c0 = [\"*\"];\nconst _c1 = [\"placeholder\"];\nconst _c2 = [\"item\"];\nconst _c3 = [\"inputRef\"];\nconst _c4 = [\"labelRef\"];\nfunction FileUploadComponent_ng_container_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction FileUploadComponent_ng_template_3_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"b\");\n i0.ɵɵtext(2, \"Drag and drop\");\n i0.ɵɵelementEnd();\n i0.ɵɵtext(3, \" files\");\n i0.ɵɵelement(4, \"br\");\n i0.ɵɵtext(5, \" or click here \");\n i0.ɵɵelementContainerEnd();\n }\n}\nfunction FileUploadComponent_ng_template_3_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"b\");\n i0.ɵɵtext(1, \"Click here\");\n i0.ɵɵelementEnd();\n i0.ɵɵtext(2, \" to\");\n i0.ɵɵelement(3, \"br\");\n i0.ɵɵtext(4, \" choose a files \");\n }\n}\nfunction FileUploadComponent_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"file-upload-drop-zone\");\n i0.ɵɵtemplate(1, FileUploadComponent_ng_template_3_ng_container_1_Template, 6, 0, \"ng-container\", 7)(2, FileUploadComponent_ng_template_3_ng_template_2_Template, 5, 0, \"ng-template\", null, 8, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const isFileDragDropAvailable_r6 = ctx.isFileDragDropAvailable;\n const _r9 = i0.ɵɵreference(3);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", isFileDragDropAvailable_r6)(\"ngIfElse\", _r9);\n }\n}\nfunction FileUploadComponent_div_7_ng_template_1_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nconst _c5 = (a0, a1, a2, a3) => ({\n $implicit: a0,\n file: a1,\n index: a2,\n control: a3\n});\nfunction FileUploadComponent_div_7_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, FileUploadComponent_div_7_ng_template_1_ng_container_0_Template, 1, 0, \"ng-container\", 2);\n }\n if (rf & 2) {\n const file_r13 = ctx.$implicit;\n const i_r14 = ctx.index;\n i0.ɵɵnextContext();\n const _r12 = i0.ɵɵreference(4);\n const ctx_r10 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r10.listItem ? ctx_r10.listItem : _r12)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction4(2, _c5, file_r13, file_r13, i_r14, ctx_r10.control));\n }\n}\nfunction FileUploadComponent_div_7_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"file-upload-list-item\", 12);\n i0.ɵɵtext(1, \"Remove\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const i_r16 = ctx.index;\n const file_r17 = ctx.file;\n const control_r18 = ctx.control;\n i0.ɵɵproperty(\"index\", i_r16)(\"file\", file_r17)(\"control\", control_r18);\n }\n}\nfunction FileUploadComponent_div_7_Template(rf, ctx) {\n if (rf & 1) {\n const _r20 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 9);\n i0.ɵɵlistener(\"@insertAnimation.done\", function FileUploadComponent_div_7_Template_div_animation_insertAnimation_done_0_listener($event) {\n i0.ɵɵrestoreView(_r20);\n const ctx_r19 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r19.animationListFinished($event));\n });\n i0.ɵɵtemplate(1, FileUploadComponent_div_7_ng_template_1_Template, 1, 7, \"ng-template\", 10);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵtemplate(3, FileUploadComponent_div_7_ng_template_3_Template, 2, 3, \"ng-template\", null, 11, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r5 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"@insertAnimation\", ctx_r5.control.size);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(2, 3, ctx_r5.control.valueChanges))(\"ngForTrackBy\", ctx_r5.trackByFn);\n }\n}\nconst _c6 = [\"overlay\"];\nconst _c7 = [\"file-drop-zone\", \"\"];\nfunction FileUploadAttributeComponent_div_1_ng_container_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction FileUploadAttributeComponent_div_1_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"file-upload-drop-zone\")(1, \"b\");\n i0.ɵɵtext(2, \"Drop\");\n i0.ɵɵelementEnd();\n i0.ɵɵtext(3, \" it here \");\n i0.ɵɵelementEnd();\n }\n}\nfunction FileUploadAttributeComponent_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 1, 2)(2, \"div\", 3);\n i0.ɵɵtemplate(3, FileUploadAttributeComponent_div_1_ng_container_3_Template, 1, 0, \"ng-container\", 4)(4, FileUploadAttributeComponent_div_1_ng_template_4_Template, 4, 0, \"ng-template\", null, 5, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const _r4 = i0.ɵɵreference(5);\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.templateRef ? ctx_r0.templateRef : _r4);\n }\n}\nconst _c8 = [\"button\"];\nconst _c9 = [\"simple\", \"\"];\nfunction SimpleFileUploadComponent_ng_template_1_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nconst _c10 = (a0, a1, a2) => ({\n $implicit: a0,\n control: a1,\n files: a2\n});\nfunction SimpleFileUploadComponent_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, SimpleFileUploadComponent_ng_template_1_ng_container_0_Template, 1, 0, \"ng-container\", 6);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n const _r2 = i0.ɵɵreference(4);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.placeholderRef ? ctx_r0.placeholderRef : _r2)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction3(2, _c10, ctx_r0.control.value, ctx_r0.control, ctx_r0.control.value));\n }\n}\nfunction SimpleFileUploadComponent_ng_template_3_ng_template_0_ng_template_0_span_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\");\n i0.ɵɵtext(1, \",\\xA0\");\n i0.ɵɵelementEnd();\n }\n}\nfunction SimpleFileUploadComponent_ng_template_3_ng_template_0_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, SimpleFileUploadComponent_ng_template_3_ng_template_0_ng_template_0_span_0_Template, 2, 0, \"span\", 12);\n i0.ɵɵelementStart(1, \"span\", 13);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const file_r14 = ctx.$implicit;\n const i_r15 = ctx.index;\n i0.ɵɵproperty(\"ngIf\", i_r15 > 0);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(file_r14.name);\n }\n}\nfunction SimpleFileUploadComponent_ng_template_3_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, SimpleFileUploadComponent_ng_template_3_ng_template_0_ng_template_0_Template, 3, 2, \"ng-template\", 11);\n }\n if (rf & 2) {\n const files_r11 = i0.ɵɵnextContext().files;\n const ctx_r12 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"ngForOf\", files_r11)(\"ngForTrackBy\", ctx_r12.trackByFn);\n }\n}\nfunction SimpleFileUploadComponent_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, SimpleFileUploadComponent_ng_template_3_ng_template_0_Template, 1, 2, \"ng-template\", 10);\n }\n if (rf & 2) {\n const files_r11 = ctx.files;\n i0.ɵɵnextContext();\n const _r4 = i0.ɵɵreference(6);\n i0.ɵɵproperty(\"ngIf\", files_r11.length)(\"ngIfElse\", _r4);\n }\n}\nfunction SimpleFileUploadComponent_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0, \" Select a file... \");\n }\n}\nfunction SimpleFileUploadComponent_ng_container_9_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction SimpleFileUploadComponent_ng_template_10_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14)(1, \"div\", 15);\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(2, \"svg\", 16)(3, \"g\");\n i0.ɵɵelement(4, \"path\", 17);\n i0.ɵɵelementEnd()()();\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelementStart(5, \"span\", 18);\n i0.ɵɵtext(6, \"Browse\");\n i0.ɵɵelementEnd()();\n }\n}\nconst _c11 = a0 => ({\n control: a0\n});\nvar FileAccess = /*#__PURE__*/function (FileAccess) {\n FileAccess[FileAccess[\"None\"] = 0] = \"None\";\n FileAccess[FileAccess[\"Read\"] = 4] = \"Read\";\n FileAccess[FileAccess[\"Write\"] = 2] = \"Write\";\n FileAccess[FileAccess[\"ReadWrite\"] = 6] = \"ReadWrite\";\n FileAccess[FileAccess[\"Execute\"] = 1] = \"Execute\";\n FileAccess[FileAccess[\"ReadWriteExecute\"] = 7] = \"ReadWriteExecute\";\n FileAccess[FileAccess[\"ExecuteRead\"] = 5] = \"ExecuteRead\";\n FileAccess[FileAccess[\"r\"] = 4] = \"r\";\n FileAccess[FileAccess[\"w\"] = 2] = \"w\";\n FileAccess[FileAccess[\"x\"] = 1] = \"x\";\n FileAccess[FileAccess[\"rw\"] = 6] = \"rw\";\n FileAccess[FileAccess[\"rwx\"] = 7] = \"rwx\";\n FileAccess[FileAccess[\"xr\"] = 5] = \"xr\";\n return FileAccess;\n}(FileAccess || {});\n/**\n * This table lists some important MIME types for the Web copied from\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types\n * http://www.iana.org/assignments/media-types/media-types.xhtml\n */\nvar FileUploadTypes = /*#__PURE__*/function (FileUploadTypes) {\n FileUploadTypes[\"arc\"] = \"application/octet-stream\";\n FileUploadTypes[\"midi\"] = \"audio/midi\";\n FileUploadTypes[\"ts\"] = \"application/typescript\";\n FileUploadTypes[\"woff2\"] = \"font/woff2\";\n FileUploadTypes[\"evy\"] = \"application/envoy\";\n FileUploadTypes[\"fif\"] = \"application/fractals\";\n FileUploadTypes[\"hta\"] = \"application/hta\";\n FileUploadTypes[\"acx\"] = \"application/internet-property-stream\";\n FileUploadTypes[\"dot\"] = \"application/msword\";\n FileUploadTypes[\"dms\"] = \"application/octet-stream\";\n FileUploadTypes[\"eps\"] = \"application/postscript\";\n FileUploadTypes[\"ps\"] = \"application/postscript\";\n FileUploadTypes[\"xla\"] = \"application/vnd.ms-excel\";\n FileUploadTypes[\"xlc\"] = \"application/vnd.ms-excel\";\n FileUploadTypes[\"xlm\"] = \"application/vnd.ms-excel\";\n FileUploadTypes[\"xlt\"] = \"application/vnd.ms-excel\";\n FileUploadTypes[\"xlw\"] = \"application/vnd.ms-excel\";\n FileUploadTypes[\"msg\"] = \"application/vnd.ms-outlook\";\n FileUploadTypes[\"sst\"] = \"application/vnd.ms-pkicertstore\";\n FileUploadTypes[\"pot\"] = \"application/vnd.ms-powerpoint\";\n FileUploadTypes[\"pps\"] = \"application/vnd.ms-powerpoint\";\n FileUploadTypes[\"wcm\"] = \"application/vnd.ms-works\";\n FileUploadTypes[\"wdb\"] = \"application/vnd.ms-works\";\n FileUploadTypes[\"wks\"] = \"application/vnd.ms-works\";\n FileUploadTypes[\"cdf\"] = \"application/x-cdf\";\n FileUploadTypes[\"tgz\"] = \"application/x-compressed\";\n FileUploadTypes[\"dcr\"] = \"application/x-director\";\n FileUploadTypes[\"dxr\"] = \"application/x-director\";\n FileUploadTypes[\"gz\"] = \"application/x-gzip\";\n FileUploadTypes[\"ins\"] = \"application/x-internet-signup\";\n FileUploadTypes[\"isp\"] = \"application/x-internet-signup\";\n FileUploadTypes[\"iii\"] = \"application/x-iphone\";\n FileUploadTypes[\"dll\"] = \"application/x-msdownload\";\n FileUploadTypes[\"m13\"] = \"application/x-msmediaview\";\n FileUploadTypes[\"m14\"] = \"application/x-msmediaview\";\n FileUploadTypes[\"pma\"] = \"application/x-perfmon\";\n FileUploadTypes[\"pmc\"] = \"application/x-perfmon\";\n FileUploadTypes[\"pmr\"] = \"application/x-perfmon\";\n FileUploadTypes[\"pmw\"] = \"application/x-perfmon\";\n FileUploadTypes[\"pfx\"] = \"application/x-pkcs12\";\n FileUploadTypes[\"spc\"] = \"application/x-pkcs7-certificates\";\n FileUploadTypes[\"p7c\"] = \"application/x-pkcs7-mime\";\n FileUploadTypes[\"texi\"] = \"application/x-texinfo\";\n FileUploadTypes[\"roff\"] = \"application/x-troff\";\n FileUploadTypes[\"tr\"] = \"application/x-troff\";\n FileUploadTypes[\"man\"] = \"application/x-troff-man\";\n FileUploadTypes[\"me\"] = \"application/x-troff-me\";\n FileUploadTypes[\"ms\"] = \"application/x-troff-ms\";\n FileUploadTypes[\"crt\"] = \"application/x-x509-ca-cert\";\n FileUploadTypes[\"pko\"] = \"application/ynd.ms-pkipko\";\n FileUploadTypes[\"snd\"] = \"audio/basic\";\n FileUploadTypes[\"rmi\"] = \"audio/mid\";\n FileUploadTypes[\"mp3\"] = \"audio/mpeg\";\n FileUploadTypes[\"aifc\"] = \"audio/x-aiff\";\n FileUploadTypes[\"aiff\"] = \"audio/x-aiff\";\n FileUploadTypes[\"ra\"] = \"audio/x-pn-realaudio\";\n FileUploadTypes[\"jpe\"] = \"image/jpeg\";\n FileUploadTypes[\"jpeg\"] = \"image/jpeg\";\n FileUploadTypes[\"jfif\"] = \"image/pipeg\";\n FileUploadTypes[\"tif\"] = \"image/tiff\";\n FileUploadTypes[\"mht\"] = \"message/rfc822\";\n FileUploadTypes[\"mhtml\"] = \"message/rfc822\";\n FileUploadTypes[\"nws\"] = \"message/rfc822\";\n FileUploadTypes[\"htm\"] = \"text/html\";\n FileUploadTypes[\"stm\"] = \"text/html\";\n FileUploadTypes[\"uls\"] = \"text/iuls\";\n FileUploadTypes[\"sct\"] = \"text/scriptlet\";\n FileUploadTypes[\"htt\"] = \"text/webviewhtml\";\n FileUploadTypes[\"htc\"] = \"text/x-component\";\n FileUploadTypes[\"mp2\"] = \"video/mpeg\";\n FileUploadTypes[\"mpa\"] = \"video/mpeg\";\n FileUploadTypes[\"mpe\"] = \"video/mpeg\";\n FileUploadTypes[\"mpg\"] = \"video/mpeg\";\n FileUploadTypes[\"mpv2\"] = \"video/mpeg\";\n FileUploadTypes[\"mov\"] = \"video/quicktime\";\n FileUploadTypes[\"lsf\"] = \"video/x-la-asf\";\n FileUploadTypes[\"lsx\"] = \"video/x-la-asf\";\n FileUploadTypes[\"asr\"] = \"video/x-ms-asf\";\n FileUploadTypes[\"asx\"] = \"video/x-ms-asf\";\n FileUploadTypes[\"flr\"] = \"x-world/x-vrml\";\n FileUploadTypes[\"vrml\"] = \"x-world/x-vrml\";\n FileUploadTypes[\"wrz\"] = \"x-world/x-vrml\";\n FileUploadTypes[\"xaf\"] = \"x-world/x-vrml\";\n FileUploadTypes[\"xof\"] = \"x-world/x-vrml\";\n FileUploadTypes[\"x3d\"] = \"application/vnd.hzn-3d-crossword\";\n FileUploadTypes[\"3gp\"] = \"video/3gpp\";\n FileUploadTypes[\"3g2\"] = \"video/3gpp2\";\n FileUploadTypes[\"mseq\"] = \"application/vnd.mseq\";\n FileUploadTypes[\"pwn\"] = \"application/vnd.3m.post-it-notes\";\n FileUploadTypes[\"plb\"] = \"application/vnd.3gpp.pic-bw-large\";\n FileUploadTypes[\"psb\"] = \"application/vnd.3gpp.pic-bw-small\";\n FileUploadTypes[\"pvb\"] = \"application/vnd.3gpp.pic-bw-var\";\n FileUploadTypes[\"tcap\"] = \"application/vnd.3gpp2.tcap\";\n FileUploadTypes[\"7z\"] = \"application/x-7z-compressed\";\n FileUploadTypes[\"abw\"] = \"application/x-abiword\";\n FileUploadTypes[\"ace\"] = \"application/x-ace-compressed\";\n FileUploadTypes[\"acc\"] = \"application/vnd.americandynamics.acc\";\n FileUploadTypes[\"acu\"] = \"application/vnd.acucobol\";\n FileUploadTypes[\"atc\"] = \"application/vnd.acucorp\";\n FileUploadTypes[\"adp\"] = \"audio/adpcm\";\n FileUploadTypes[\"aab\"] = \"application/x-authorware-bin\";\n FileUploadTypes[\"aam\"] = \"application/x-authorware-map\";\n FileUploadTypes[\"aas\"] = \"application/x-authorware-seg\";\n FileUploadTypes[\"air\"] = \"application/vnd.adobe.air-application-installer-package+zip\";\n FileUploadTypes[\"swf\"] = \"application/x-shockwave-flash\";\n FileUploadTypes[\"fxp\"] = \"application/vnd.adobe.fxp\";\n FileUploadTypes[\"pdf\"] = \"application/pdf\";\n FileUploadTypes[\"ppd\"] = \"application/vnd.cups-ppd\";\n FileUploadTypes[\"dir\"] = \"application/x-director\";\n FileUploadTypes[\"xdp\"] = \"application/vnd.adobe.xdp+xml\";\n FileUploadTypes[\"xfdf\"] = \"application/vnd.adobe.xfdf\";\n FileUploadTypes[\"aac\"] = \"audio/x-aac\";\n FileUploadTypes[\"ahead\"] = \"application/vnd.ahead.space\";\n FileUploadTypes[\"azf\"] = \"application/vnd.airzip.filesecure.azf\";\n FileUploadTypes[\"azs\"] = \"application/vnd.airzip.filesecure.azs\";\n FileUploadTypes[\"azw\"] = \"application/vnd.amazon.ebook\";\n FileUploadTypes[\"ami\"] = \"application/vnd.amiga.ami\";\n FileUploadTypes[\"apk\"] = \"application/vnd.android.package-archive\";\n FileUploadTypes[\"cii\"] = \"application/vnd.anser-web-certificate-issue-initiation\";\n FileUploadTypes[\"fti\"] = \"application/vnd.anser-web-funds-transfer-initiation\";\n FileUploadTypes[\"atx\"] = \"application/vnd.antix.game-component\";\n FileUploadTypes[\"dmg\"] = \"application/x-apple-diskimage\";\n FileUploadTypes[\"mpkg\"] = \"application/vnd.apple.installer+xml\";\n FileUploadTypes[\"aw\"] = \"application/applixware\";\n FileUploadTypes[\"les\"] = \"application/vnd.hhe.lesson-player\";\n FileUploadTypes[\"swi\"] = \"application/vnd.aristanetworks.swi\";\n FileUploadTypes[\"s\"] = \"text/x-asm\";\n FileUploadTypes[\"atomcat\"] = \"application/atomcat+xml\";\n FileUploadTypes[\"atomsvc\"] = \"application/atomsvc+xml\";\n FileUploadTypes[\"atom\"] = \"application/atom+xml\";\n FileUploadTypes[\"ac\"] = \"application/pkix-attr-cert\";\n FileUploadTypes[\"aif\"] = \"audio/x-aiff\";\n FileUploadTypes[\"avi\"] = \"video/x-msvideo\";\n FileUploadTypes[\"aep\"] = \"application/vnd.audiograph\";\n FileUploadTypes[\"dxf\"] = \"image/vnd.dxf\";\n FileUploadTypes[\"dwf\"] = \"model/vnd.dwf\";\n FileUploadTypes[\"par\"] = \"text/plain-bas\";\n FileUploadTypes[\"bcpio\"] = \"application/x-bcpio\";\n FileUploadTypes[\"bin\"] = \"application/octet-stream\";\n FileUploadTypes[\"bmp\"] = \"image/bmp\";\n FileUploadTypes[\"torrent\"] = \"application/x-bittorrent\";\n FileUploadTypes[\"cod\"] = \"application/vnd.rim.cod\";\n FileUploadTypes[\"mpm\"] = \"application/vnd.blueice.multipass\";\n FileUploadTypes[\"bmi\"] = \"application/vnd.bmi\";\n FileUploadTypes[\"sh\"] = \"application/x-sh\";\n FileUploadTypes[\"btif\"] = \"image/prs.btif\";\n FileUploadTypes[\"rep\"] = \"application/vnd.businessobjects\";\n FileUploadTypes[\"bz\"] = \"application/x-bzip\";\n FileUploadTypes[\"bz2\"] = \"application/x-bzip2\";\n FileUploadTypes[\"csh\"] = \"application/x-csh\";\n FileUploadTypes[\"c\"] = \"text/x-c\";\n FileUploadTypes[\"cdxml\"] = \"application/vnd.chemdraw+xml\";\n FileUploadTypes[\"css\"] = \"text/css\";\n FileUploadTypes[\"cdx\"] = \"chemical/x-cdx\";\n FileUploadTypes[\"cml\"] = \"chemical/x-cml\";\n FileUploadTypes[\"csml\"] = \"chemical/x-csml\";\n FileUploadTypes[\"cdbcmsg\"] = \"application/vnd.contact.cmsg\";\n FileUploadTypes[\"cla\"] = \"application/vnd.claymore\";\n FileUploadTypes[\"c4g\"] = \"application/vnd.clonk.c4group\";\n FileUploadTypes[\"sub\"] = \"image/vnd.dvb.subtitle\";\n FileUploadTypes[\"cdmia\"] = \"application/cdmi-capability\";\n FileUploadTypes[\"cdmic\"] = \"application/cdmi-container\";\n FileUploadTypes[\"cdmid\"] = \"application/cdmi-domain\";\n FileUploadTypes[\"cdmio\"] = \"application/cdmi-object\";\n FileUploadTypes[\"cdmiq\"] = \"application/cdmi-queue\";\n FileUploadTypes[\"c11amc\"] = \"application/vnd.cluetrust.cartomobile-config\";\n FileUploadTypes[\"c11amz\"] = \"application/vnd.cluetrust.cartomobile-config-pkg\";\n FileUploadTypes[\"ras\"] = \"image/x-cmu-raster\";\n FileUploadTypes[\"dae\"] = \"model/vnd.collada+xml\";\n FileUploadTypes[\"csv\"] = \"text/csv\";\n FileUploadTypes[\"cpt\"] = \"application/mac-compactpro\";\n FileUploadTypes[\"wmlc\"] = \"application/vnd.wap.wmlc\";\n FileUploadTypes[\"cgm\"] = \"image/cgm\";\n FileUploadTypes[\"ice\"] = \"x-conference/x-cooltalk\";\n FileUploadTypes[\"cmx\"] = \"image/x-cmx\";\n FileUploadTypes[\"xar\"] = \"application/vnd.xara\";\n FileUploadTypes[\"cmc\"] = \"application/vnd.cosmocaller\";\n FileUploadTypes[\"cpio\"] = \"application/x-cpio\";\n FileUploadTypes[\"clkx\"] = \"application/vnd.crick.clicker\";\n FileUploadTypes[\"clkk\"] = \"application/vnd.crick.clicker.keyboard\";\n FileUploadTypes[\"clkp\"] = \"application/vnd.crick.clicker.palette\";\n FileUploadTypes[\"clkt\"] = \"application/vnd.crick.clicker.template\";\n FileUploadTypes[\"clkw\"] = \"application/vnd.crick.clicker.wordbank\";\n FileUploadTypes[\"wbs\"] = \"application/vnd.criticaltools.wbs+xml\";\n FileUploadTypes[\"cryptonote\"] = \"application/vnd.rig.cryptonote\";\n FileUploadTypes[\"cif\"] = \"chemical/x-cif\";\n FileUploadTypes[\"cmdf\"] = \"chemical/x-cmdf\";\n FileUploadTypes[\"cu\"] = \"application/cu-seeme\";\n FileUploadTypes[\"cww\"] = \"application/prs.cww\";\n FileUploadTypes[\"curl\"] = \"text/vnd.curl\";\n FileUploadTypes[\"dcurl\"] = \"text/vnd.curl.dcurl\";\n FileUploadTypes[\"mcurl\"] = \"text/vnd.curl.mcurl\";\n FileUploadTypes[\"scurl\"] = \"text/vnd.curl.scurl\";\n FileUploadTypes[\"car\"] = \"application/vnd.curl.car\";\n FileUploadTypes[\"pcurl\"] = \"application/vnd.curl.pcurl\";\n FileUploadTypes[\"cmp\"] = \"application/vnd.yellowriver-custom-menu\";\n FileUploadTypes[\"dssc\"] = \"application/dssc+der\";\n FileUploadTypes[\"xdssc\"] = \"application/dssc+xml\";\n FileUploadTypes[\"deb\"] = \"application/x-debian-package\";\n FileUploadTypes[\"uva\"] = \"audio/vnd.dece.audio\";\n FileUploadTypes[\"uvi\"] = \"image/vnd.dece.graphic\";\n FileUploadTypes[\"uvh\"] = \"video/vnd.dece.hd\";\n FileUploadTypes[\"uvm\"] = \"video/vnd.dece.mobile\";\n FileUploadTypes[\"uvu\"] = \"video/vnd.uvvu.mp4\";\n FileUploadTypes[\"uvp\"] = \"video/vnd.dece.pd\";\n FileUploadTypes[\"uvs\"] = \"video/vnd.dece.sd\";\n FileUploadTypes[\"uvv\"] = \"video/vnd.dece.video\";\n FileUploadTypes[\"dvi\"] = \"application/x-dvi\";\n FileUploadTypes[\"seed\"] = \"application/vnd.fdsn.seed\";\n FileUploadTypes[\"dtb\"] = \"application/x-dtbook+xml\";\n FileUploadTypes[\"res\"] = \"application/x-dtbresource+xml\";\n FileUploadTypes[\"ait\"] = \"application/vnd.dvb.ait\";\n FileUploadTypes[\"svc\"] = \"application/vnd.dvb.service\";\n FileUploadTypes[\"eol\"] = \"audio/vnd.digital-winds\";\n FileUploadTypes[\"djvu\"] = \"image/vnd.djvu\";\n FileUploadTypes[\"dtd\"] = \"application/xml-dtd\";\n FileUploadTypes[\"mlp\"] = \"application/vnd.dolby.mlp\";\n FileUploadTypes[\"wad\"] = \"application/x-doom\";\n FileUploadTypes[\"dpg\"] = \"application/vnd.dpgraph\";\n FileUploadTypes[\"dra\"] = \"audio/vnd.dra\";\n FileUploadTypes[\"dfac\"] = \"application/vnd.dreamfactory\";\n FileUploadTypes[\"dts\"] = \"audio/vnd.dts\";\n FileUploadTypes[\"dtshd\"] = \"audio/vnd.dts.hd\";\n FileUploadTypes[\"dwg\"] = \"image/vnd.dwg\";\n FileUploadTypes[\"geo\"] = \"application/vnd.dynageo\";\n FileUploadTypes[\"es\"] = \"application/ecmascript\";\n FileUploadTypes[\"mag\"] = \"application/vnd.ecowin.chart\";\n FileUploadTypes[\"mmr\"] = \"image/vnd.fujixerox.edmics-mmr\";\n FileUploadTypes[\"rlc\"] = \"image/vnd.fujixerox.edmics-rlc\";\n FileUploadTypes[\"exi\"] = \"application/exi\";\n FileUploadTypes[\"mgz\"] = \"application/vnd.proteus.magazine\";\n FileUploadTypes[\"epub\"] = \"application/epub+zip\";\n FileUploadTypes[\"eml\"] = \"message/rfc822\";\n FileUploadTypes[\"nml\"] = \"application/vnd.enliven\";\n FileUploadTypes[\"xpr\"] = \"application/vnd.is-xpr\";\n FileUploadTypes[\"xif\"] = \"image/vnd.xiff\";\n FileUploadTypes[\"xfdl\"] = \"application/vnd.xfdl\";\n FileUploadTypes[\"emma\"] = \"application/emma+xml\";\n FileUploadTypes[\"ez2\"] = \"application/vnd.ezpix-album\";\n FileUploadTypes[\"ez3\"] = \"application/vnd.ezpix-package\";\n FileUploadTypes[\"fst\"] = \"image/vnd.fst\";\n FileUploadTypes[\"fvt\"] = \"video/vnd.fvt\";\n FileUploadTypes[\"fbs\"] = \"image/vnd.fastbidsheet\";\n FileUploadTypes[\"fe_launch\"] = \"application/vnd.denovo.fcselayout-link\";\n FileUploadTypes[\"f4v\"] = \"video/x-f4v\";\n FileUploadTypes[\"flv\"] = \"video/x-flv\";\n FileUploadTypes[\"fpx\"] = \"image/vnd.fpx\";\n FileUploadTypes[\"npx\"] = \"image/vnd.net-fpx\";\n FileUploadTypes[\"flx\"] = \"text/vnd.fmi.flexstor\";\n FileUploadTypes[\"fli\"] = \"video/x-fli\";\n FileUploadTypes[\"ftc\"] = \"application/vnd.fluxtime.clip\";\n FileUploadTypes[\"fdf\"] = \"application/vnd.fdf\";\n FileUploadTypes[\"f\"] = \"text/x-fortran\";\n FileUploadTypes[\"mif\"] = \"application/vnd.mif\";\n FileUploadTypes[\"fm\"] = \"application/vnd.framemaker\";\n FileUploadTypes[\"fh\"] = \"image/x-freehand\";\n FileUploadTypes[\"fsc\"] = \"application/vnd.fsc.weblaunch\";\n FileUploadTypes[\"fnc\"] = \"application/vnd.frogans.fnc\";\n FileUploadTypes[\"ltf\"] = \"application/vnd.frogans.ltf\";\n FileUploadTypes[\"ddd\"] = \"application/vnd.fujixerox.ddd\";\n FileUploadTypes[\"xdw\"] = \"application/vnd.fujixerox.docuworks\";\n FileUploadTypes[\"xbd\"] = \"application/vnd.fujixerox.docuworks.binder\";\n FileUploadTypes[\"oas\"] = \"application/vnd.fujitsu.oasys\";\n FileUploadTypes[\"oa2\"] = \"application/vnd.fujitsu.oasys2\";\n FileUploadTypes[\"oa3\"] = \"application/vnd.fujitsu.oasys3\";\n FileUploadTypes[\"fg5\"] = \"application/vnd.fujitsu.oasysgp\";\n FileUploadTypes[\"bh2\"] = \"application/vnd.fujitsu.oasysprs\";\n FileUploadTypes[\"spl\"] = \"application/x-futuresplash\";\n FileUploadTypes[\"fzs\"] = \"application/vnd.fuzzysheet\";\n FileUploadTypes[\"g3\"] = \"image/g3fax\";\n FileUploadTypes[\"gmx\"] = \"application/vnd.gmx\";\n FileUploadTypes[\"gtw\"] = \"model/vnd.gtw\";\n FileUploadTypes[\"txd\"] = \"application/vnd.genomatix.tuxedo\";\n FileUploadTypes[\"ggb\"] = \"application/vnd.geogebra.file\";\n FileUploadTypes[\"ggt\"] = \"application/vnd.geogebra.tool\";\n FileUploadTypes[\"gdl\"] = \"model/vnd.gdl\";\n FileUploadTypes[\"gex\"] = \"application/vnd.geometry-explorer\";\n FileUploadTypes[\"gxt\"] = \"application/vnd.geonext\";\n FileUploadTypes[\"g2w\"] = \"application/vnd.geoplan\";\n FileUploadTypes[\"g3w\"] = \"application/vnd.geospace\";\n FileUploadTypes[\"gsf\"] = \"application/x-font-ghostscript\";\n FileUploadTypes[\"bdf\"] = \"application/x-font-bdf\";\n FileUploadTypes[\"gtar\"] = \"application/x-gtar\";\n FileUploadTypes[\"texinfo\"] = \"application/x-texinfo\";\n FileUploadTypes[\"gnumeric\"] = \"application/x-gnumeric\";\n FileUploadTypes[\"kml\"] = \"application/vnd.google-earth.kml+xml\";\n FileUploadTypes[\"kmz\"] = \"application/vnd.google-earth.kmz\";\n FileUploadTypes[\"gqf\"] = \"application/vnd.grafeq\";\n FileUploadTypes[\"gif\"] = \"image/gif\";\n FileUploadTypes[\"gv\"] = \"text/vnd.graphviz\";\n FileUploadTypes[\"gac\"] = \"application/vnd.groove-account\";\n FileUploadTypes[\"ghf\"] = \"application/vnd.groove-help\";\n FileUploadTypes[\"gim\"] = \"application/vnd.groove-identity-message\";\n FileUploadTypes[\"grv\"] = \"application/vnd.groove-injector\";\n FileUploadTypes[\"gtm\"] = \"application/vnd.groove-tool-message\";\n FileUploadTypes[\"tpl\"] = \"application/vnd.groove-tool-template\";\n FileUploadTypes[\"vcg\"] = \"application/vnd.groove-vcard\";\n FileUploadTypes[\"h261\"] = \"video/h261\";\n FileUploadTypes[\"h263\"] = \"video/h263\";\n FileUploadTypes[\"h264\"] = \"video/h264\";\n FileUploadTypes[\"hpid\"] = \"application/vnd.hp-hpid\";\n FileUploadTypes[\"hps\"] = \"application/vnd.hp-hps\";\n FileUploadTypes[\"hdf\"] = \"application/x-hdf\";\n FileUploadTypes[\"rip\"] = \"audio/vnd.rip\";\n FileUploadTypes[\"hbci\"] = \"application/vnd.hbci\";\n FileUploadTypes[\"jlt\"] = \"application/vnd.hp-jlyt\";\n FileUploadTypes[\"pcl\"] = \"application/vnd.hp-pcl\";\n FileUploadTypes[\"hpgl\"] = \"application/vnd.hp-hpgl\";\n FileUploadTypes[\"hvs\"] = \"application/vnd.yamaha.hv-script\";\n FileUploadTypes[\"hvd\"] = \"application/vnd.yamaha.hv-dic\";\n FileUploadTypes[\"hvp\"] = \"application/vnd.yamaha.hv-voice\";\n FileUploadTypes[\"sfd-hdstx\"] = \"application/vnd.hydrostatix.sof-data\";\n FileUploadTypes[\"stk\"] = \"application/hyperstudio\";\n FileUploadTypes[\"hal\"] = \"application/vnd.hal+xml\";\n FileUploadTypes[\"html\"] = \"text/html\";\n FileUploadTypes[\"irm\"] = \"application/vnd.ibm.rights-management\";\n FileUploadTypes[\"sc\"] = \"application/vnd.ibm.secure-container\";\n FileUploadTypes[\"ics\"] = \"text/calendar\";\n FileUploadTypes[\"icc\"] = \"application/vnd.iccprofile\";\n FileUploadTypes[\"ico\"] = \"image/x-icon\";\n FileUploadTypes[\"igl\"] = \"application/vnd.igloader\";\n FileUploadTypes[\"ief\"] = \"image/ief\";\n FileUploadTypes[\"ivp\"] = \"application/vnd.immervision-ivp\";\n FileUploadTypes[\"ivu\"] = \"application/vnd.immervision-ivu\";\n FileUploadTypes[\"rif\"] = \"application/reginfo+xml\";\n FileUploadTypes[\"3dml\"] = \"text/vnd.in3d.3dml\";\n FileUploadTypes[\"spot\"] = \"text/vnd.in3d.spot\";\n FileUploadTypes[\"igs\"] = \"model/iges\";\n FileUploadTypes[\"i2g\"] = \"application/vnd.intergeo\";\n FileUploadTypes[\"cdy\"] = \"application/vnd.cinderella\";\n FileUploadTypes[\"xpw\"] = \"application/vnd.intercon.formnet\";\n FileUploadTypes[\"fcs\"] = \"application/vnd.isac.fcs\";\n FileUploadTypes[\"ipfix\"] = \"application/ipfix\";\n FileUploadTypes[\"cer\"] = \"application/pkix-cert\";\n FileUploadTypes[\"pki\"] = \"application/pkixcmp\";\n FileUploadTypes[\"crl\"] = \"application/pkix-crl\";\n FileUploadTypes[\"pkipath\"] = \"application/pkix-pkipath\";\n FileUploadTypes[\"igm\"] = \"application/vnd.insors.igm\";\n FileUploadTypes[\"rcprofile\"] = \"application/vnd.ipunplugged.rcprofile\";\n FileUploadTypes[\"irp\"] = \"application/vnd.irepository.package+xml\";\n FileUploadTypes[\"jad\"] = \"text/vnd.sun.j2me.app-descriptor\";\n FileUploadTypes[\"jar\"] = \"application/java-archive\";\n FileUploadTypes[\"class\"] = \"application/java-vm\";\n FileUploadTypes[\"jnlp\"] = \"application/x-java-jnlp-file\";\n FileUploadTypes[\"ser\"] = \"application/java-serialized-object\";\n FileUploadTypes[\"java\"] = \"text/x-java-source,java\";\n FileUploadTypes[\"js\"] = \"application/javascript\";\n FileUploadTypes[\"json\"] = \"application/json\";\n FileUploadTypes[\"joda\"] = \"application/vnd.joost.joda-archive\";\n FileUploadTypes[\"jpm\"] = \"video/jpm\";\n FileUploadTypes[\"jpg\"] = \"image/jpeg\";\n FileUploadTypes[\"pjpeg\"] = \"image/pjpeg\";\n FileUploadTypes[\"jpgv\"] = \"video/jpeg\";\n FileUploadTypes[\"ktz\"] = \"application/vnd.kahootz\";\n FileUploadTypes[\"mmd\"] = \"application/vnd.chipnuts.karaoke-mmd\";\n FileUploadTypes[\"karbon\"] = \"application/vnd.kde.karbon\";\n FileUploadTypes[\"chrt\"] = \"application/vnd.kde.kchart\";\n FileUploadTypes[\"kfo\"] = \"application/vnd.kde.kformula\";\n FileUploadTypes[\"flw\"] = \"application/vnd.kde.kivio\";\n FileUploadTypes[\"kon\"] = \"application/vnd.kde.kontour\";\n FileUploadTypes[\"kpr\"] = \"application/vnd.kde.kpresenter\";\n FileUploadTypes[\"ksp\"] = \"application/vnd.kde.kspread\";\n FileUploadTypes[\"kwd\"] = \"application/vnd.kde.kword\";\n FileUploadTypes[\"htke\"] = \"application/vnd.kenameaapp\";\n FileUploadTypes[\"kia\"] = \"application/vnd.kidspiration\";\n FileUploadTypes[\"kne\"] = \"application/vnd.kinar\";\n FileUploadTypes[\"sse\"] = \"application/vnd.kodak-descriptor\";\n FileUploadTypes[\"lasxml\"] = \"application/vnd.las.las+xml\";\n FileUploadTypes[\"latex\"] = \"application/x-latex\";\n FileUploadTypes[\"lbd\"] = \"application/vnd.llamagraphics.life-balance.desktop\";\n FileUploadTypes[\"lbe\"] = \"application/vnd.llamagraphics.life-balance.exchange+xml\";\n FileUploadTypes[\"jam\"] = \"application/vnd.jam\";\n FileUploadTypes[\"apr\"] = \"application/vnd.lotus-approach\";\n FileUploadTypes[\"pre\"] = \"application/vnd.lotus-freelance\";\n FileUploadTypes[\"nsf\"] = \"application/vnd.lotus-notes\";\n FileUploadTypes[\"org\"] = \"application/vnd.lotus-organizer\";\n FileUploadTypes[\"scm\"] = \"application/vnd.lotus-screencam\";\n FileUploadTypes[\"lwp\"] = \"application/vnd.lotus-wordpro\";\n FileUploadTypes[\"lvp\"] = \"audio/vnd.lucent.voice\";\n FileUploadTypes[\"m3u\"] = \"audio/x-mpegurl\";\n FileUploadTypes[\"m4v\"] = \"video/x-m4v\";\n FileUploadTypes[\"hqx\"] = \"application/mac-binhex40\";\n FileUploadTypes[\"portpkg\"] = \"application/vnd.macports.portpkg\";\n FileUploadTypes[\"mgp\"] = \"application/vnd.osgeo.mapguide.package\";\n FileUploadTypes[\"mrc\"] = \"application/marc\";\n FileUploadTypes[\"mrcx\"] = \"application/marcxml+xml\";\n FileUploadTypes[\"mxf\"] = \"application/mxf\";\n FileUploadTypes[\"nbp\"] = \"application/vnd.wolfram.player\";\n FileUploadTypes[\"ma\"] = \"application/mathematica\";\n FileUploadTypes[\"mathml\"] = \"application/mathml+xml\";\n FileUploadTypes[\"mbox\"] = \"application/mbox\";\n FileUploadTypes[\"mc1\"] = \"application/vnd.medcalcdata\";\n FileUploadTypes[\"mscml\"] = \"application/mediaservercontrol+xml\";\n FileUploadTypes[\"cdkey\"] = \"application/vnd.mediastation.cdkey\";\n FileUploadTypes[\"mwf\"] = \"application/vnd.mfer\";\n FileUploadTypes[\"mfm\"] = \"application/vnd.mfmp\";\n FileUploadTypes[\"msh\"] = \"model/mesh\";\n FileUploadTypes[\"mads\"] = \"application/mads+xml\";\n FileUploadTypes[\"mets\"] = \"application/mets+xml\";\n FileUploadTypes[\"mods\"] = \"application/mods+xml\";\n FileUploadTypes[\"meta4\"] = \"application/metalink4+xml\";\n FileUploadTypes[\"mcd\"] = \"application/vnd.mcd\";\n FileUploadTypes[\"flo\"] = \"application/vnd.micrografx.flo\";\n FileUploadTypes[\"igx\"] = \"application/vnd.micrografx.igx\";\n FileUploadTypes[\"es3\"] = \"application/vnd.eszigno3+xml\";\n FileUploadTypes[\"mdb\"] = \"application/x-msaccess\";\n FileUploadTypes[\"asf\"] = \"video/x-ms-asf\";\n FileUploadTypes[\"exe\"] = \"application/x-msdownload\";\n FileUploadTypes[\"cil\"] = \"application/vnd.ms-artgalry\";\n FileUploadTypes[\"cab\"] = \"application/vnd.ms-cab-compressed\";\n FileUploadTypes[\"ims\"] = \"application/vnd.ms-ims\";\n FileUploadTypes[\"application\"] = \"application/x-ms-application\";\n FileUploadTypes[\"clp\"] = \"application/x-msclip\";\n FileUploadTypes[\"mdi\"] = \"image/vnd.ms-modi\";\n FileUploadTypes[\"eot\"] = \"application/vnd.ms-fontobject\";\n FileUploadTypes[\"xls\"] = \"application/vnd.ms-excel\";\n FileUploadTypes[\"xlam\"] = \"application/vnd.ms-excel.addin.macroenabled.12\";\n FileUploadTypes[\"xlsb\"] = \"application/vnd.ms-excel.sheet.binary.macroenabled.12\";\n FileUploadTypes[\"xltm\"] = \"application/vnd.ms-excel.template.macroenabled.12\";\n FileUploadTypes[\"xlsm\"] = \"application/vnd.ms-excel.sheet.macroenabled.12\";\n FileUploadTypes[\"chm\"] = \"application/vnd.ms-htmlhelp\";\n FileUploadTypes[\"crd\"] = \"application/x-mscardfile\";\n FileUploadTypes[\"lrm\"] = \"application/vnd.ms-lrm\";\n FileUploadTypes[\"mvb\"] = \"application/x-msmediaview\";\n FileUploadTypes[\"mny\"] = \"application/x-msmoney\";\n FileUploadTypes[\"pptx\"] = \"application/vnd.openxmlformats-officedocument.presentationml.presentation\";\n FileUploadTypes[\"sldx\"] = \"application/vnd.openxmlformats-officedocument.presentationml.slide\";\n FileUploadTypes[\"ppsx\"] = \"application/vnd.openxmlformats-officedocument.presentationml.slideshow\";\n FileUploadTypes[\"potx\"] = \"application/vnd.openxmlformats-officedocument.presentationml.template\";\n FileUploadTypes[\"xlsx\"] = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n FileUploadTypes[\"xltx\"] = \"application/vnd.openxmlformats-officedocument.spreadsheetml.template\";\n FileUploadTypes[\"docx\"] = \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\";\n FileUploadTypes[\"dotx\"] = \"application/vnd.openxmlformats-officedocument.wordprocessingml.template\";\n FileUploadTypes[\"obd\"] = \"application/x-msbinder\";\n FileUploadTypes[\"thmx\"] = \"application/vnd.ms-officetheme\";\n FileUploadTypes[\"onetoc\"] = \"application/onenote\";\n FileUploadTypes[\"pya\"] = \"audio/vnd.ms-playready.media.pya\";\n FileUploadTypes[\"pyv\"] = \"video/vnd.ms-playready.media.pyv\";\n FileUploadTypes[\"ppt\"] = \"application/vnd.ms-powerpoint\";\n FileUploadTypes[\"ppa\"] = \"application/vnd.ms-powerpoint\";\n FileUploadTypes[\"ppam\"] = \"application/vnd.ms-powerpoint.addin.macroenabled.12\";\n FileUploadTypes[\"sldm\"] = \"application/vnd.ms-powerpoint.slide.macroenabled.12\";\n FileUploadTypes[\"pptm\"] = \"application/vnd.ms-powerpoint.presentation.macroenabled.12\";\n FileUploadTypes[\"ppsm\"] = \"application/vnd.ms-powerpoint.slideshow.macroenabled.12\";\n FileUploadTypes[\"potm\"] = \"application/vnd.ms-powerpoint.template.macroenabled.12\";\n FileUploadTypes[\"mpp\"] = \"application/vnd.ms-project\";\n FileUploadTypes[\"pub\"] = \"application/x-mspublisher\";\n FileUploadTypes[\"scd\"] = \"application/x-msschedule\";\n FileUploadTypes[\"xap\"] = \"application/x-silverlight-app\";\n FileUploadTypes[\"stl\"] = \"application/vnd.ms-pki.stl\";\n FileUploadTypes[\"cat\"] = \"application/vnd.ms-pki.seccat\";\n FileUploadTypes[\"vsd\"] = \"application/vnd.visio\";\n FileUploadTypes[\"vsdx\"] = \"application/vnd.visio2013\";\n FileUploadTypes[\"wm\"] = \"video/x-ms-wm\";\n FileUploadTypes[\"wma\"] = \"audio/x-ms-wma\";\n FileUploadTypes[\"wax\"] = \"audio/x-ms-wax\";\n FileUploadTypes[\"wmx\"] = \"video/x-ms-wmx\";\n FileUploadTypes[\"wmd\"] = \"application/x-ms-wmd\";\n FileUploadTypes[\"wpl\"] = \"application/vnd.ms-wpl\";\n FileUploadTypes[\"wmz\"] = \"application/x-ms-wmz\";\n FileUploadTypes[\"wmv\"] = \"video/x-ms-wmv\";\n FileUploadTypes[\"wvx\"] = \"video/x-ms-wvx\";\n FileUploadTypes[\"wmf\"] = \"application/x-msmetafile\";\n FileUploadTypes[\"trm\"] = \"application/x-msterminal\";\n FileUploadTypes[\"doc\"] = \"application/msword\";\n FileUploadTypes[\"docm\"] = \"application/vnd.ms-word.document.macroenabled.12\";\n FileUploadTypes[\"dotm\"] = \"application/vnd.ms-word.template.macroenabled.12\";\n FileUploadTypes[\"wri\"] = \"application/x-mswrite\";\n FileUploadTypes[\"wps\"] = \"application/vnd.ms-works\";\n FileUploadTypes[\"xbap\"] = \"application/x-ms-xbap\";\n FileUploadTypes[\"xps\"] = \"application/vnd.ms-xpsdocument\";\n FileUploadTypes[\"mid\"] = \"audio/midi\";\n FileUploadTypes[\"mpy\"] = \"application/vnd.ibm.minipay\";\n FileUploadTypes[\"afp\"] = \"application/vnd.ibm.modcap\";\n FileUploadTypes[\"rms\"] = \"application/vnd.jcp.javame.midlet-rms\";\n FileUploadTypes[\"tmo\"] = \"application/vnd.tmobile-livetv\";\n FileUploadTypes[\"prc\"] = \"application/x-mobipocket-ebook\";\n FileUploadTypes[\"mbk\"] = \"application/vnd.mobius.mbk\";\n FileUploadTypes[\"dis\"] = \"application/vnd.mobius.dis\";\n FileUploadTypes[\"plc\"] = \"application/vnd.mobius.plc\";\n FileUploadTypes[\"mqy\"] = \"application/vnd.mobius.mqy\";\n FileUploadTypes[\"msl\"] = \"application/vnd.mobius.msl\";\n FileUploadTypes[\"txf\"] = \"application/vnd.mobius.txf\";\n FileUploadTypes[\"daf\"] = \"application/vnd.mobius.daf\";\n FileUploadTypes[\"fly\"] = \"text/vnd.fly\";\n FileUploadTypes[\"mpc\"] = \"application/vnd.mophun.certificate\";\n FileUploadTypes[\"mpn\"] = \"application/vnd.mophun.application\";\n FileUploadTypes[\"mj2\"] = \"video/mj2\";\n FileUploadTypes[\"mpga\"] = \"audio/mpeg\";\n FileUploadTypes[\"mxu\"] = \"video/vnd.mpegurl\";\n FileUploadTypes[\"mpeg\"] = \"video/mpeg\";\n FileUploadTypes[\"m21\"] = \"application/mp21\";\n FileUploadTypes[\"mp4a\"] = \"audio/mp4\";\n FileUploadTypes[\"mp4\"] = \"video/mp4\";\n FileUploadTypes[\"m3u8\"] = \"application/vnd.apple.mpegurl\";\n FileUploadTypes[\"mus\"] = \"application/vnd.musician\";\n FileUploadTypes[\"msty\"] = \"application/vnd.muvee.style\";\n FileUploadTypes[\"mxml\"] = \"application/xv+xml\";\n FileUploadTypes[\"ngdat\"] = \"application/vnd.nokia.n-gage.data\";\n FileUploadTypes[\"n-gage\"] = \"application/vnd.nokia.n-gage.symbian.install\";\n FileUploadTypes[\"ncx\"] = \"application/x-dtbncx+xml\";\n FileUploadTypes[\"nc\"] = \"application/x-netcdf\";\n FileUploadTypes[\"nlu\"] = \"application/vnd.neurolanguage.nlu\";\n FileUploadTypes[\"dna\"] = \"application/vnd.dna\";\n FileUploadTypes[\"nnd\"] = \"application/vnd.noblenet-directory\";\n FileUploadTypes[\"nns\"] = \"application/vnd.noblenet-sealer\";\n FileUploadTypes[\"nnw\"] = \"application/vnd.noblenet-web\";\n FileUploadTypes[\"rpst\"] = \"application/vnd.nokia.radio-preset\";\n FileUploadTypes[\"rpss\"] = \"application/vnd.nokia.radio-presets\";\n FileUploadTypes[\"n3\"] = \"text/n3\";\n FileUploadTypes[\"edm\"] = \"application/vnd.novadigm.edm\";\n FileUploadTypes[\"edx\"] = \"application/vnd.novadigm.edx\";\n FileUploadTypes[\"ext\"] = \"application/vnd.novadigm.ext\";\n FileUploadTypes[\"gph\"] = \"application/vnd.flographit\";\n FileUploadTypes[\"ecelp4800\"] = \"audio/vnd.nuera.ecelp4800\";\n FileUploadTypes[\"ecelp7470\"] = \"audio/vnd.nuera.ecelp7470\";\n FileUploadTypes[\"ecelp9600\"] = \"audio/vnd.nuera.ecelp9600\";\n FileUploadTypes[\"oda\"] = \"application/oda\";\n FileUploadTypes[\"ogx\"] = \"application/ogg\";\n FileUploadTypes[\"oga\"] = \"audio/ogg\";\n FileUploadTypes[\"ogv\"] = \"video/ogg\";\n FileUploadTypes[\"dd2\"] = \"application/vnd.oma.dd2+xml\";\n FileUploadTypes[\"oth\"] = \"application/vnd.oasis.opendocument.text-web\";\n FileUploadTypes[\"opf\"] = \"application/oebps-package+xml\";\n FileUploadTypes[\"qbo\"] = \"application/vnd.intu.qbo\";\n FileUploadTypes[\"oxt\"] = \"application/vnd.openofficeorg.extension\";\n FileUploadTypes[\"osf\"] = \"application/vnd.yamaha.openscoreformat\";\n FileUploadTypes[\"weba\"] = \"audio/webm\";\n FileUploadTypes[\"webm\"] = \"video/webm\";\n FileUploadTypes[\"odc\"] = \"application/vnd.oasis.opendocument.chart\";\n FileUploadTypes[\"otc\"] = \"application/vnd.oasis.opendocument.chart-template\";\n FileUploadTypes[\"odb\"] = \"application/vnd.oasis.opendocument.database\";\n FileUploadTypes[\"odf\"] = \"application/vnd.oasis.opendocument.formula\";\n FileUploadTypes[\"odft\"] = \"application/vnd.oasis.opendocument.formula-template\";\n FileUploadTypes[\"odg\"] = \"application/vnd.oasis.opendocument.graphics\";\n FileUploadTypes[\"otg\"] = \"application/vnd.oasis.opendocument.graphics-template\";\n FileUploadTypes[\"odi\"] = \"application/vnd.oasis.opendocument.image\";\n FileUploadTypes[\"oti\"] = \"application/vnd.oasis.opendocument.image-template\";\n FileUploadTypes[\"odp\"] = \"application/vnd.oasis.opendocument.presentation\";\n FileUploadTypes[\"otp\"] = \"application/vnd.oasis.opendocument.presentation-template\";\n FileUploadTypes[\"ods\"] = \"application/vnd.oasis.opendocument.spreadsheet\";\n FileUploadTypes[\"ots\"] = \"application/vnd.oasis.opendocument.spreadsheet-template\";\n FileUploadTypes[\"odt\"] = \"application/vnd.oasis.opendocument.text\";\n FileUploadTypes[\"odm\"] = \"application/vnd.oasis.opendocument.text-master\";\n FileUploadTypes[\"ott\"] = \"application/vnd.oasis.opendocument.text-template\";\n FileUploadTypes[\"ktx\"] = \"image/ktx\";\n FileUploadTypes[\"sxc\"] = \"application/vnd.sun.xml.calc\";\n FileUploadTypes[\"stc\"] = \"application/vnd.sun.xml.calc.template\";\n FileUploadTypes[\"sxd\"] = \"application/vnd.sun.xml.draw\";\n FileUploadTypes[\"std\"] = \"application/vnd.sun.xml.draw.template\";\n FileUploadTypes[\"sxi\"] = \"application/vnd.sun.xml.impress\";\n FileUploadTypes[\"sti\"] = \"application/vnd.sun.xml.impress.template\";\n FileUploadTypes[\"sxm\"] = \"application/vnd.sun.xml.math\";\n FileUploadTypes[\"sxw\"] = \"application/vnd.sun.xml.writer\";\n FileUploadTypes[\"sxg\"] = \"application/vnd.sun.xml.writer.global\";\n FileUploadTypes[\"stw\"] = \"application/vnd.sun.xml.writer.template\";\n FileUploadTypes[\"otf\"] = \"application/x-font-otf\";\n FileUploadTypes[\"osfpvg\"] = \"application/vnd.yamaha.openscoreformat.osfpvg+xml\";\n FileUploadTypes[\"dp\"] = \"application/vnd.osgi.dp\";\n FileUploadTypes[\"pdb\"] = \"application/vnd.palm\";\n FileUploadTypes[\"p\"] = \"text/x-pascal\";\n FileUploadTypes[\"paw\"] = \"application/vnd.pawaafile\";\n FileUploadTypes[\"pclxl\"] = \"application/vnd.hp-pclxl\";\n FileUploadTypes[\"efif\"] = \"application/vnd.picsel\";\n FileUploadTypes[\"pcx\"] = \"image/x-pcx\";\n FileUploadTypes[\"psd\"] = \"image/vnd.adobe.photoshop\";\n FileUploadTypes[\"prf\"] = \"application/pics-rules\";\n FileUploadTypes[\"pic\"] = \"image/x-pict\";\n FileUploadTypes[\"chat\"] = \"application/x-chat\";\n FileUploadTypes[\"p10\"] = \"application/pkcs10\";\n FileUploadTypes[\"p12\"] = \"application/x-pkcs12\";\n FileUploadTypes[\"p7m\"] = \"application/pkcs7-mime\";\n FileUploadTypes[\"p7s\"] = \"application/pkcs7-signature\";\n FileUploadTypes[\"p7r\"] = \"application/x-pkcs7-certreqresp\";\n FileUploadTypes[\"p7b\"] = \"application/x-pkcs7-certificates\";\n FileUploadTypes[\"p8\"] = \"application/pkcs8\";\n FileUploadTypes[\"plf\"] = \"application/vnd.pocketlearn\";\n FileUploadTypes[\"pnm\"] = \"image/x-portable-anymap\";\n FileUploadTypes[\"pbm\"] = \"image/x-portable-bitmap\";\n FileUploadTypes[\"pcf\"] = \"application/x-font-pcf\";\n FileUploadTypes[\"pfr\"] = \"application/font-tdpfr\";\n FileUploadTypes[\"pgn\"] = \"application/x-chess-pgn\";\n FileUploadTypes[\"pgm\"] = \"image/x-portable-graymap\";\n FileUploadTypes[\"png\"] = \"image/png\";\n FileUploadTypes[\"ppm\"] = \"image/x-portable-pixmap\";\n FileUploadTypes[\"pskcxml\"] = \"application/pskc+xml\";\n FileUploadTypes[\"pml\"] = \"application/vnd.ctc-posml\";\n FileUploadTypes[\"ai\"] = \"application/postscript\";\n FileUploadTypes[\"pfa\"] = \"application/x-font-type1\";\n FileUploadTypes[\"pbd\"] = \"application/vnd.powerbuilder6\";\n FileUploadTypes[\"pgp\"] = \"application/pgp-encrypted\";\n FileUploadTypes[\"box\"] = \"application/vnd.previewsystems.box\";\n FileUploadTypes[\"ptid\"] = \"application/vnd.pvi.ptid1\";\n FileUploadTypes[\"pls\"] = \"application/pls+xml\";\n FileUploadTypes[\"str\"] = \"application/vnd.pg.format\";\n FileUploadTypes[\"ei6\"] = \"application/vnd.pg.osasli\";\n FileUploadTypes[\"dsc\"] = \"text/prs.lines.tag\";\n FileUploadTypes[\"psf\"] = \"application/x-font-linux-psf\";\n FileUploadTypes[\"qps\"] = \"application/vnd.publishare-delta-tree\";\n FileUploadTypes[\"wg\"] = \"application/vnd.pmi.widget\";\n FileUploadTypes[\"qxd\"] = \"application/vnd.quark.quarkxpress\";\n FileUploadTypes[\"esf\"] = \"application/vnd.epson.esf\";\n FileUploadTypes[\"msf\"] = \"application/vnd.epson.msf\";\n FileUploadTypes[\"ssf\"] = \"application/vnd.epson.ssf\";\n FileUploadTypes[\"qam\"] = \"application/vnd.epson.quickanime\";\n FileUploadTypes[\"qfx\"] = \"application/vnd.intu.qfx\";\n FileUploadTypes[\"qt\"] = \"video/quicktime\";\n FileUploadTypes[\"rar\"] = \"application/x-rar-compressed\";\n FileUploadTypes[\"ram\"] = \"audio/x-pn-realaudio\";\n FileUploadTypes[\"rmp\"] = \"audio/x-pn-realaudio-plugin\";\n FileUploadTypes[\"rsd\"] = \"application/rsd+xml\";\n FileUploadTypes[\"rm\"] = \"application/vnd.rn-realmedia\";\n FileUploadTypes[\"bed\"] = \"application/vnd.realvnc.bed\";\n FileUploadTypes[\"mxl\"] = \"application/vnd.recordare.musicxml\";\n FileUploadTypes[\"musicxml\"] = \"application/vnd.recordare.musicxml+xml\";\n FileUploadTypes[\"rnc\"] = \"application/relax-ng-compact-syntax\";\n FileUploadTypes[\"rdz\"] = \"application/vnd.data-vision.rdz\";\n FileUploadTypes[\"rdf\"] = \"application/rdf+xml\";\n FileUploadTypes[\"rp9\"] = \"application/vnd.cloanto.rp9\";\n FileUploadTypes[\"jisp\"] = \"application/vnd.jisp\";\n FileUploadTypes[\"rtf\"] = \"application/rtf\";\n FileUploadTypes[\"rtx\"] = \"text/richtext\";\n FileUploadTypes[\"link66\"] = \"application/vnd.route66.link66+xml\";\n FileUploadTypes[\"rss\"] = \"application/rss+xml,\";\n FileUploadTypes[\"shf\"] = \"application/shf+xml\";\n FileUploadTypes[\"st\"] = \"application/vnd.sailingtracker.track\";\n FileUploadTypes[\"svg\"] = \"image/svg+xml\";\n FileUploadTypes[\"sus\"] = \"application/vnd.sus-calendar\";\n FileUploadTypes[\"sru\"] = \"application/sru+xml\";\n FileUploadTypes[\"setpay\"] = \"application/set-payment-initiation\";\n FileUploadTypes[\"setreg\"] = \"application/set-registration-initiation\";\n FileUploadTypes[\"sema\"] = \"application/vnd.sema\";\n FileUploadTypes[\"semd\"] = \"application/vnd.semd\";\n FileUploadTypes[\"semf\"] = \"application/vnd.semf\";\n FileUploadTypes[\"see\"] = \"application/vnd.seemail\";\n FileUploadTypes[\"snf\"] = \"application/x-font-snf\";\n FileUploadTypes[\"spq\"] = \"application/scvp-vp-request\";\n FileUploadTypes[\"spp\"] = \"application/scvp-vp-response\";\n FileUploadTypes[\"scq\"] = \"application/scvp-cv-request\";\n FileUploadTypes[\"scs\"] = \"application/scvp-cv-response\";\n FileUploadTypes[\"sdp\"] = \"application/sdp\";\n FileUploadTypes[\"etx\"] = \"text/x-setext\";\n FileUploadTypes[\"movie\"] = \"video/x-sgi-movie\";\n FileUploadTypes[\"ifm\"] = \"application/vnd.shana.informed.formdata\";\n FileUploadTypes[\"itp\"] = \"application/vnd.shana.informed.formtemplate\";\n FileUploadTypes[\"iif\"] = \"application/vnd.shana.informed.interchange\";\n FileUploadTypes[\"ipk\"] = \"application/vnd.shana.informed.package\";\n FileUploadTypes[\"tfi\"] = \"application/thraud+xml\";\n FileUploadTypes[\"shar\"] = \"application/x-shar\";\n FileUploadTypes[\"rgb\"] = \"image/x-rgb\";\n FileUploadTypes[\"slt\"] = \"application/vnd.epson.salt\";\n FileUploadTypes[\"aso\"] = \"application/vnd.accpac.simply.aso\";\n FileUploadTypes[\"imp\"] = \"application/vnd.accpac.simply.imp\";\n FileUploadTypes[\"twd\"] = \"application/vnd.simtech-mindmapper\";\n FileUploadTypes[\"csp\"] = \"application/vnd.commonspace\";\n FileUploadTypes[\"saf\"] = \"application/vnd.yamaha.smaf-audio\";\n FileUploadTypes[\"mmf\"] = \"application/vnd.smaf\";\n FileUploadTypes[\"spf\"] = \"application/vnd.yamaha.smaf-phrase\";\n FileUploadTypes[\"teacher\"] = \"application/vnd.smart.teacher\";\n FileUploadTypes[\"svd\"] = \"application/vnd.svd\";\n FileUploadTypes[\"rq\"] = \"application/sparql-query\";\n FileUploadTypes[\"srx\"] = \"application/sparql-results+xml\";\n FileUploadTypes[\"gram\"] = \"application/srgs\";\n FileUploadTypes[\"grxml\"] = \"application/srgs+xml\";\n FileUploadTypes[\"ssml\"] = \"application/ssml+xml\";\n FileUploadTypes[\"skp\"] = \"application/vnd.koan\";\n FileUploadTypes[\"sgml\"] = \"text/sgml\";\n FileUploadTypes[\"sdc\"] = \"application/vnd.stardivision.calc\";\n FileUploadTypes[\"sda\"] = \"application/vnd.stardivision.draw\";\n FileUploadTypes[\"sdd\"] = \"application/vnd.stardivision.impress\";\n FileUploadTypes[\"smf\"] = \"application/vnd.stardivision.math\";\n FileUploadTypes[\"sdw\"] = \"application/vnd.stardivision.writer\";\n FileUploadTypes[\"sgl\"] = \"application/vnd.stardivision.writer-global\";\n FileUploadTypes[\"sm\"] = \"application/vnd.stepmania.stepchart\";\n FileUploadTypes[\"sit\"] = \"application/x-stuffit\";\n FileUploadTypes[\"sitx\"] = \"application/x-stuffitx\";\n FileUploadTypes[\"sdkm\"] = \"application/vnd.solent.sdkm+xml\";\n FileUploadTypes[\"xo\"] = \"application/vnd.olpc-sugar\";\n FileUploadTypes[\"au\"] = \"audio/basic\";\n FileUploadTypes[\"wqd\"] = \"application/vnd.wqd\";\n FileUploadTypes[\"sis\"] = \"application/vnd.symbian.install\";\n FileUploadTypes[\"smi\"] = \"application/smil+xml\";\n FileUploadTypes[\"xsm\"] = \"application/vnd.syncml+xml\";\n FileUploadTypes[\"bdm\"] = \"application/vnd.syncml.dm+wbxml\";\n FileUploadTypes[\"xdm\"] = \"application/vnd.syncml.dm+xml\";\n FileUploadTypes[\"sv4cpio\"] = \"application/x-sv4cpio\";\n FileUploadTypes[\"sv4crc\"] = \"application/x-sv4crc\";\n FileUploadTypes[\"sbml\"] = \"application/sbml+xml\";\n FileUploadTypes[\"tsv\"] = \"text/tab-separated-values\";\n FileUploadTypes[\"tiff\"] = \"image/tiff\";\n FileUploadTypes[\"tao\"] = \"application/vnd.tao.intent-module-archive\";\n FileUploadTypes[\"tar\"] = \"application/x-tar\";\n FileUploadTypes[\"tcl\"] = \"application/x-tcl\";\n FileUploadTypes[\"tex\"] = \"application/x-tex\";\n FileUploadTypes[\"tfm\"] = \"application/x-tex-tfm\";\n FileUploadTypes[\"tei\"] = \"application/tei+xml\";\n FileUploadTypes[\"txt\"] = \"text/plain\";\n FileUploadTypes[\"dxp\"] = \"application/vnd.spotfire.dxp\";\n FileUploadTypes[\"sfs\"] = \"application/vnd.spotfire.sfs\";\n FileUploadTypes[\"tsd\"] = \"application/timestamped-data\";\n FileUploadTypes[\"tpt\"] = \"application/vnd.trid.tpt\";\n FileUploadTypes[\"mxs\"] = \"application/vnd.triscape.mxs\";\n FileUploadTypes[\"t\"] = \"text/troff\";\n FileUploadTypes[\"tra\"] = \"application/vnd.trueapp\";\n FileUploadTypes[\"ttf\"] = \"application/x-font-ttf\";\n FileUploadTypes[\"ttl\"] = \"text/turtle\";\n FileUploadTypes[\"umj\"] = \"application/vnd.umajin\";\n FileUploadTypes[\"uoml\"] = \"application/vnd.uoml+xml\";\n FileUploadTypes[\"unityweb\"] = \"application/vnd.unity\";\n FileUploadTypes[\"ufd\"] = \"application/vnd.ufdl\";\n FileUploadTypes[\"uri\"] = \"text/uri-list\";\n FileUploadTypes[\"utz\"] = \"application/vnd.uiq.theme\";\n FileUploadTypes[\"ustar\"] = \"application/x-ustar\";\n FileUploadTypes[\"uu\"] = \"text/x-uuencode\";\n FileUploadTypes[\"vcs\"] = \"text/x-vcalendar\";\n FileUploadTypes[\"vcf\"] = \"text/x-vcard\";\n FileUploadTypes[\"vcd\"] = \"application/x-cdlink\";\n FileUploadTypes[\"vsf\"] = \"application/vnd.vsf\";\n FileUploadTypes[\"wrl\"] = \"model/vrml\";\n FileUploadTypes[\"vcx\"] = \"application/vnd.vcx\";\n FileUploadTypes[\"mts\"] = \"model/vnd.mts\";\n FileUploadTypes[\"vtu\"] = \"model/vnd.vtu\";\n FileUploadTypes[\"vis\"] = \"application/vnd.visionary\";\n FileUploadTypes[\"viv\"] = \"video/vnd.vivo\";\n FileUploadTypes[\"ccxml\"] = \"application/ccxml+xml,\";\n FileUploadTypes[\"vxml\"] = \"application/voicexml+xml\";\n FileUploadTypes[\"src\"] = \"application/x-wais-source\";\n FileUploadTypes[\"wbxml\"] = \"application/vnd.wap.wbxml\";\n FileUploadTypes[\"wbmp\"] = \"image/vnd.wap.wbmp\";\n FileUploadTypes[\"wav\"] = \"audio/x-wav\";\n FileUploadTypes[\"davmount\"] = \"application/davmount+xml\";\n FileUploadTypes[\"woff\"] = \"application/x-font-woff\";\n FileUploadTypes[\"wspolicy\"] = \"application/wspolicy+xml\";\n FileUploadTypes[\"webp\"] = \"image/webp\";\n FileUploadTypes[\"wtb\"] = \"application/vnd.webturbo\";\n FileUploadTypes[\"wgt\"] = \"application/widget\";\n FileUploadTypes[\"hlp\"] = \"application/winhlp\";\n FileUploadTypes[\"wml\"] = \"text/vnd.wap.wml\";\n FileUploadTypes[\"wmls\"] = \"text/vnd.wap.wmlscript\";\n FileUploadTypes[\"wmlsc\"] = \"application/vnd.wap.wmlscriptc\";\n FileUploadTypes[\"wpd\"] = \"application/vnd.wordperfect\";\n FileUploadTypes[\"stf\"] = \"application/vnd.wt.stf\";\n FileUploadTypes[\"wsdl\"] = \"application/wsdl+xml\";\n FileUploadTypes[\"xbm\"] = \"image/x-xbitmap\";\n FileUploadTypes[\"xpm\"] = \"image/x-xpixmap\";\n FileUploadTypes[\"xwd\"] = \"image/x-xwindowdump\";\n FileUploadTypes[\"der\"] = \"application/x-x509-ca-cert\";\n FileUploadTypes[\"fig\"] = \"application/x-xfig\";\n FileUploadTypes[\"xhtml\"] = \"application/xhtml+xml\";\n FileUploadTypes[\"xml\"] = \"application/xml\";\n FileUploadTypes[\"xdf\"] = \"application/xcap-diff+xml\";\n FileUploadTypes[\"xenc\"] = \"application/xenc+xml\";\n FileUploadTypes[\"xer\"] = \"application/patch-ops-error+xml\";\n FileUploadTypes[\"rl\"] = \"application/resource-lists+xml\";\n FileUploadTypes[\"rs\"] = \"application/rls-services+xml\";\n FileUploadTypes[\"rld\"] = \"application/resource-lists-diff+xml\";\n FileUploadTypes[\"xslt\"] = \"application/xslt+xml\";\n FileUploadTypes[\"xop\"] = \"application/xop+xml\";\n FileUploadTypes[\"xpi\"] = \"application/x-xpinstall\";\n FileUploadTypes[\"xspf\"] = \"application/xspf+xml\";\n FileUploadTypes[\"xul\"] = \"application/vnd.mozilla.xul+xml\";\n FileUploadTypes[\"xyz\"] = \"chemical/x-xyz\";\n FileUploadTypes[\"yaml\"] = \"text/yaml\";\n FileUploadTypes[\"yang\"] = \"application/yang\";\n FileUploadTypes[\"yin\"] = \"application/yin+xml\";\n FileUploadTypes[\"zir\"] = \"application/vnd.zul\";\n FileUploadTypes[\"zip\"] = \"application/zip\";\n return FileUploadTypes;\n}(FileUploadTypes || {});\nfunction IsNullOrEmpty(value) {\n return value == null || value.length === 0;\n}\nlet FileUploadService = /*#__PURE__*/(() => {\n class FileUploadService {\n constructor(renderer) {\n this.renderer = renderer;\n this.extensions = ['B', 'KB', 'MB', 'GB'];\n this.sizeRegex = new RegExp(`^(\\\\d+)(?:\\\\s{0,1})(${this.extensions.join('|')})?$`, 'i');\n }\n isFileDragDropAvailable() {\n const div = this.renderer.createElement('div');\n return 'draggable' in div || 'ondragstart' in div && 'ondrop' in div;\n }\n parseSize(value) {\n if (IsNullOrEmpty(value)) {\n return 0;\n }\n if (typeof value === 'number') {\n return value;\n }\n const [, size, extension] = value.match(this.sizeRegex) || [null, '0', 'B'];\n const i = IsNullOrEmpty(extension) ? 0 : this.extensions.indexOf(extension.toUpperCase());\n return parseInt(size, 10) * Math.pow(1024, i < 0 ? 0 : i);\n }\n formatSize(size) {\n return this.calculateSize(size);\n }\n calculateSize(size, extensionIndex = 0) {\n if (isNaN(size)) {\n size = 0;\n }\n if (size < 1024) {\n return `${Math.round(size * 100) / 100} ${this.extensions[extensionIndex]}`;\n }\n return this.calculateSize(size / 1024, extensionIndex + 1);\n }\n getFileType(file) {\n return Object.keys(FileUploadTypes).find(key => FileUploadTypes[key] === file.type);\n }\n static {\n this.ɵfac = function FileUploadService_Factory(t) {\n return new (t || FileUploadService)(i0.ɵɵinject(i0.Renderer2));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: FileUploadService,\n factory: FileUploadService.ɵfac\n });\n }\n }\n return FileUploadService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst InsertAnimation = trigger('insertAnimation', [transition('* => *', [query(':leave', [stagger(30, [animate('.3s', style({\n opacity: 0\n}))])], {\n optional: true\n}), query(':enter', [style({\n opacity: 0\n}), stagger(30, [animate('.3s', style({\n opacity: 1\n}))])], {\n optional: true\n})])]);\nconst ZoomAnimation = trigger('zoomAnimation', [transition('static => zoomOut', [animate(250, style({\n transform: 'translate(-50%, -50%) scale(2, 2)',\n opacity: 0\n}))]), transition('static => zoomIn', [query(':self', [style({\n transform: 'translate(-50%, -50%) scale(.2, .2)',\n opacity: 0,\n top: '50%',\n left: '50%',\n margin: 0\n}), stagger(50, [animate(250, style({\n transform: 'translate(-50%, -50%) scale(1, 1)',\n opacity: 1\n}))])])])]);\nvar STATUS = /*#__PURE__*/function (STATUS) {\n STATUS[STATUS[\"INVALID\"] = 0] = \"INVALID\";\n STATUS[STATUS[\"VALID\"] = 1] = \"VALID\";\n STATUS[STATUS[\"DISABLED\"] = 2] = \"DISABLED\";\n return STATUS;\n}(STATUS || {});\nvar FileEvent = /*#__PURE__*/function (FileEvent) {\n FileEvent[\"click\"] = \"click\";\n FileEvent[\"focus\"] = \"focus\";\n FileEvent[\"blur\"] = \"blur\";\n return FileEvent;\n}(FileEvent || {});\nclass FileUploadControl {\n constructor(configuration, validators) {\n this.files = new Map();\n this.listVisible = true;\n this.status = STATUS.VALID;\n this.errors = [];\n this.validators = [];\n this.multipleEnabled = true;\n this.nativeBehavior = false;\n this.multipleChanged = new BehaviorSubject(this.multipleEnabled);\n this.statusChanged = new Subject();\n this.eventsChanged = new Subject();\n this.discardedValue = new Subject();\n this.accept = null;\n this.discard = false;\n this.acceptChanged = new BehaviorSubject(this.accept);\n /**\n * track status `VALID`, `INVALID` or `DISABLED`\n */\n this.statusChanges = this.statusChanged.asObservable();\n /**\n * emit an event every time the value of the control\n * changes.\n * Initially returns last value\n */\n this.valueChanges = new BehaviorSubject([]);\n /**\n * @internal\n * used to trigger layout change for list visibility\n */\n this.listVisibilityChanges = new BehaviorSubject(this.listVisible);\n /**\n * track changed on accept attribute\n */\n this.acceptChanges = this.acceptChanged.asObservable();\n /**\n * emit an event every time user programmatically ask for certain event\n */\n this.eventsChanges = this.eventsChanged.asObservable();\n /**\n * track changed on multiple attribute\n */\n this.multipleChanges = this.multipleChanged.asObservable();\n /**\n * track which files were discarded\n */\n this.discardedValueChanges = this.discardedValue.asObservable();\n this.initialState(configuration);\n this.defineValidators(validators);\n }\n /**\n * set functions that determines the synchronous validity of this control.\n */\n setValidators(newValidators) {\n this.defineValidators(newValidators);\n this.validate();\n return this;\n }\n addFile(file) {\n return this.addMultipleFiles([file]);\n }\n removeFile(file) {\n if (IsNullOrEmpty(file)) {\n throw Error(`File has not been provided.`);\n }\n if (!this.disabled) {\n this.files.delete(file.name);\n this.validate();\n this.valueChanges.next(Array.from(this.files.values()));\n }\n return this;\n }\n addFiles(files) {\n return this.addMultipleFiles(Array.from(files));\n }\n get valid() {\n return this.errors.length === 0 && this.status !== STATUS.DISABLED;\n }\n get invalid() {\n return this.errors.length > 0;\n }\n getError() {\n return this.errors;\n }\n /**\n * number of uploaded files\n */\n get size() {\n return this.files.size;\n }\n /**\n * return list of Files\n */\n get value() {\n return Array.from(this.files.values());\n }\n setValue(files) {\n this.files.clear();\n if (files instanceof Array) {\n this.addMultipleFiles(files);\n } else {\n throw Error(`FormControl.setValue was provided with wrong argument type, ${files} was provided instead Array`);\n }\n return this;\n }\n /**\n * reset the control\n */\n clear() {\n this.files.clear();\n this.validate();\n this.valueChanges.next(Array.from(this.files.values()));\n return this;\n }\n get isListVisible() {\n return this.listVisible;\n }\n setListVisibility(isVisible = true) {\n this.listVisible = isVisible;\n this.listVisibilityChanges.next(this.listVisible);\n return this;\n }\n get disabled() {\n return this.status === STATUS.DISABLED;\n }\n enable(isEnabled = true) {\n this.status = isEnabled ? STATUS.VALID : STATUS.DISABLED;\n this.validate();\n this.statusChanged.next(this.status);\n return this;\n }\n disable(isDisabled = true) {\n this.status = isDisabled ? STATUS.DISABLED : STATUS.VALID;\n this.validate();\n this.statusChanged.next(this.status);\n return this;\n }\n click() {\n this.eventsChanged.next(FileEvent.click);\n return this;\n }\n focus() {\n this.eventsChanged.next(FileEvent.focus);\n return this;\n }\n blur() {\n this.eventsChanged.next(FileEvent.blur);\n return this;\n }\n /**\n * specifies the types of files that the server accepts\n *\n * ### Example\n *\n * ```\n * acceptFiles(\"file_extension|audio/*|video/*|image/*|media_type\")\n * ```\n *\n * To specify more than one value, separate the values with a comma (e.g. acceptFiles(\"audio/*,video/*,image/*\").\n *\n */\n acceptFiles(accept) {\n this.accept = accept;\n this.acceptChanged.next(this.accept);\n return this;\n }\n acceptAll() {\n this.accept = null;\n this.acceptChanged.next(this.accept);\n return this;\n }\n get isMultiple() {\n return this.multipleEnabled;\n }\n multiple(isEnabled = true) {\n this.multipleEnabled = isEnabled;\n this.multipleChanged.next(this.multipleEnabled);\n return this;\n }\n native(isNativeBehaviorEnabled = true) {\n this.nativeBehavior = isNativeBehaviorEnabled;\n return this;\n }\n discardInvalid(discard = true) {\n this.discard = discard;\n return this;\n }\n initialState(configuration = {}) {\n if (IsNullOrEmpty(configuration)) {\n return;\n }\n /**\n * Toggles discard of all invalid files\n * it depends to accept, limit, size once a file\n * dropped or selected it will be discarded if does not satisfy the constraint\n */\n this.discard = configuration.discardInvalid || this.discard;\n this.status = !!configuration.disabled ? STATUS.DISABLED : this.status;\n this.nativeBehavior = configuration.native != null ? configuration.native : this.nativeBehavior;\n if (!IsNullOrEmpty(configuration.multiple)) {\n this.multiple(configuration.multiple);\n }\n if (!IsNullOrEmpty(configuration.listVisible)) {\n this.setListVisibility(configuration.listVisible);\n }\n if (!IsNullOrEmpty(configuration.accept)) {\n this.acceptFiles(configuration.accept.join(','));\n }\n }\n defineValidators(validators) {\n if (!IsNullOrEmpty(validators)) {\n this.validators = Array.isArray(validators) ? [...validators] : [validators];\n }\n }\n /**\n * @internal\n * used to prevent valueChanges emit more times\n * when multiple files are uploaded\n */\n addMultipleFiles(files) {\n if (IsNullOrEmpty(files)) {\n this.validate();\n this.valueChanges.next(Array.from(this.files.values()));\n return this;\n }\n /**\n * native component deletes the list of files before adding new ones\n */\n if (this.nativeBehavior !== false) {\n this.files.clear();\n }\n if (!this.multipleEnabled) {\n /**\n * if multiple is disabled and one file exists\n * clear it and reupload a new one\n */\n if (this.files.size === 1) {\n this.files.clear();\n }\n // add only one file\n this.files.set(files[0].name, files[0]);\n } else {\n // replace files with same name\n files.forEach(file => this.files.set(file.name, file));\n }\n if (this.discard) {\n this.analyzeToDiscard();\n } else {\n this.validate();\n }\n this.valueChanges.next(Array.from(this.files.values()));\n return this;\n }\n /**\n * method used to discard invalid files\n */\n analyzeToDiscard() {\n const deletedFiles = [];\n const validators = [...this.validators];\n while (validators.length) {\n const validator = validators.shift();\n const error = validator(this);\n if (error) {\n this.discardFile(error, deletedFiles);\n }\n }\n if (deletedFiles.length) {\n this.discardedValue.next(deletedFiles);\n }\n }\n discardFile(error, deletedFiles) {\n const errorsKey = Object.keys(error)[0];\n const errors = error[errorsKey];\n (Array.isArray(errors) ? errors : [errors]).forEach(fileError => {\n if (fileError.file && this.files.has(fileError.file.name)) {\n deletedFiles.push(fileError);\n this.files.delete(fileError.file.name);\n } else {\n this.errors.push(error);\n }\n });\n }\n validate() {\n if (this.status !== STATUS.DISABLED) {\n const currentState = this.valid;\n this.errors = this.validators.map(validator => validator(this)).filter(isInvalid => isInvalid);\n if (currentState !== this.valid) {\n this.statusChanged.next(this.valid ? STATUS.VALID : STATUS.INVALID);\n }\n } else {\n this.errors.length = 0;\n }\n }\n}\nlet FileUploadAbstract = /*#__PURE__*/(() => {\n class FileUploadAbstract {\n constructor() {\n this.control = null;\n this.isMultiple = null;\n this.hooks = [];\n this.subscriptions = [];\n this.hostElementRef = inject(ElementRef);\n this.renderer = inject(Renderer2);\n this.cdr = inject(ChangeDetectorRef);\n this.onChange = () => {};\n }\n ngOnInit() {\n if (IsNullOrEmpty(this.control)) {\n this.control = new FileUploadControl();\n }\n this.setEvents();\n this.checkAndMarkAsDisabled();\n this.checkAndSetMultiple();\n this.connectToForm();\n }\n ngOnDestroy() {\n this.cdr.detach();\n this.hooks.forEach(hook => hook());\n this.hooks.length = 0;\n this.subscriptions.forEach(subscription => subscription.unsubscribe());\n this.subscriptions.length = 0;\n }\n setEvents() {\n this.subscriptions.push(this.control.statusChanges.subscribe(status => this.checkAndMarkAsDisabled()));\n this.subscriptions.push(this.control.eventsChanges.subscribe(event => this.triggerEvent(event)));\n this.subscriptions.push(this.control.acceptChanges.subscribe(accept => this.updateAcceptAttr(accept)));\n this.subscriptions.push(this.control.multipleChanges.subscribe(isMultiple => this.toggleMultiple(isMultiple)));\n }\n clearInputEl() {\n this.input.nativeElement.value = null;\n }\n /**\n * used to update model once state is changed through @Input\n * or in case of simple-file-upload to override user value\n */\n checkAndSetMultiple() {\n if (!this.control || this.isMultiple == null) {\n return;\n }\n const isMultiple = this.isMultiple === true || this.isMultiple === 'true';\n if (isMultiple !== this.control.isMultiple) {\n this.control.multiple(isMultiple);\n }\n }\n triggerEvent(event) {\n if (typeof this.label.nativeElement[event] === 'function') {\n this.label.nativeElement[event]();\n }\n }\n updateAcceptAttr(accept) {\n if (!IsNullOrEmpty(accept)) {\n this.renderer.setAttribute(this.input.nativeElement, 'accept', accept);\n } else {\n this.renderer.removeAttribute(this.input.nativeElement, 'accept');\n }\n }\n checkAndMarkAsDisabled() {\n if (this.control.disabled) {\n this.renderer.addClass(this.hostElementRef.nativeElement, 'disabled');\n this.renderer.setProperty(this.input.nativeElement, 'disabled', true);\n } else {\n this.renderer.removeClass(this.hostElementRef.nativeElement, 'disabled');\n this.renderer.setProperty(this.input.nativeElement, 'disabled', false);\n }\n }\n toggleMultiple(isMultiple) {\n if (isMultiple) {\n this.renderer.setAttribute(this.input.nativeElement, 'multiple', '');\n } else {\n this.renderer.removeAttribute(this.input.nativeElement, 'multiple');\n }\n }\n /**\n * ControlValueAccessor implementation\n */\n connectToForm() {\n this.subscriptions.push(this.control.valueChanges.subscribe(v => this.onChange(v)));\n }\n static {\n this.ɵfac = function FileUploadAbstract_Factory(t) {\n return new (t || FileUploadAbstract)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: FileUploadAbstract\n });\n }\n }\n return FileUploadAbstract;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FileUploadIconComponent = /*#__PURE__*/(() => {\n class FileUploadIconComponent {\n constructor(fileUploadService) {\n this.fileUploadService = fileUploadService;\n this.fileType = 'unknown';\n }\n ngOnInit() {\n this.fileType = this.fileUploadService.getFileType(this.file);\n }\n isIcon(type) {\n switch (type) {\n case 'text':\n return this.fileType === 'html' || this.fileType === 'css' || this.fileType === 'csv' || this.fileType === 'js' || this.fileType === 'pdf' || this.fileType === 'ppt' || this.fileType === 'xls' || this.fileType === 'xlsx' || this.fileType === 'xml' || this.fileType === 'doc' || this.fileType === 'txt' || this.fileType === 'docx';\n case 'audio':\n return this.fileType === 'aac' || this.fileType === 'midi' || this.fileType === 'oga' || this.fileType === 'wav' || this.fileType === 'weba';\n case 'image':\n return this.fileType === 'png' || this.fileType === 'bmp' || this.fileType === 'gif' || this.fileType === 'jpg' || this.fileType === 'svg' || this.fileType === 'webp' || this.fileType === 'ico';\n case 'video':\n return this.fileType === 'avi' || this.fileType === 'mpeg' || this.fileType === 'ogv' || this.fileType === 'webm' || this.fileType === '3gp' || this.fileType === '3g2';\n }\n }\n static {\n this.ɵfac = function FileUploadIconComponent_Factory(t) {\n return new (t || FileUploadIconComponent)(i0.ɵɵdirectiveInject(FileUploadService));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FileUploadIconComponent,\n selectors: [[\"file-upload-icon\"]],\n inputs: {\n file: \"file\"\n },\n decls: 6,\n vars: 5,\n consts: [[3, \"ngSwitch\"], [\"viewBox\", \"0 0 96 96\", 4, \"ngSwitchDefault\"], [\"viewBox\", \"0 0 96 96\", 4, \"ngSwitchCase\"], [\"viewBox\", \"0 0 96 96\"], [\"d\", \"M71.4,30.7c0.6,0.6,1.2,1.5,1.6,2.5c0.4,1.1,0.7,2.1,0.7,2.9v38.6c0,0.9-0.3,1.7-0.9,2.3\\n S71.4,78,70.5,78h-45c-0.9,0-1.7-0.3-2.3-0.9c-0.6-0.6-0.9-1.4-0.9-2.3V21.2c0-0.9,0.3-1.7,0.9-2.3c0.6-0.6,1.4-0.9,2.3-0.9h30\\n c0.9,0,1.9,0.2,2.9,0.7c1.1,0.4,1.9,1,2.5,1.6L71.4,30.7z M56.6,22.6v12.6h12.6c-0.2-0.6-0.5-1.1-0.7-1.4L57.9,23.3\\n C57.7,23,57.2,22.8,56.6,22.6z M69.4,73.7V39.4H55.5c-0.9,0-1.7-0.3-2.3-0.9c-0.6-0.6-0.9-1.4-0.9-2.3V22.3H26.6v51.4H69.4z\"], [\"d\", \"M71.4,30.7c0.6,0.6,1.2,1.5,1.6,2.5c0.4,1.1,0.7,2.1,0.7,2.9v38.6c0,0.9-0.3,1.7-0.9,2.3\\n S71.4,78,70.5,78h-45c-0.9,0-1.7-0.3-2.3-0.9c-0.6-0.6-0.9-1.4-0.9-2.3V21.2c0-0.9,0.3-1.7,0.9-2.3c0.6-0.6,1.4-0.9,2.3-0.9h30\\n c0.9,0,1.9,0.2,2.9,0.7c1.1,0.4,1.9,1,2.5,1.6L71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,56.6,22.6z M69.4,73.7V39.4H55.5c-0.9,0-1.7-0.3-2.3-0.9c-0.6-0.6-0.9-1.4-0.9-2.3V22.3H26.6v51.4H69.4z\\n M48,43.7c1.2,0,2.2,0.4,3,1.3c0.8,0.8,1.3,1.9,1.3,3v12.9c0,1.2-0.4,2.2-1.3,3c-0.8,0.8-1.9,1.3-3,1.3H35.1c-1.2,0-2.2-0.4-3-1.3\\n c-0.8-0.8-1.3-1.9-1.3-3V48c0-1.2,0.4-2.2,1.3-3c0.8-0.8,1.9-1.3,3-1.3H48z M64.5,43.8c0.4,0.2,0.7,0.5,0.7,1v19.3\\n c0,0.5-0.2,0.8-0.7,1c-0.2,0-0.3,0.1-0.4,0.1c-0.3,0-0.6-0.1-0.8-0.3l-8.9-8.9v-3l8.9-8.9c0.2-0.2,0.5-0.3,0.8-0.3\\n C64.2,43.7,64.3,43.7,64.5,43.8z\"]],\n template: function FileUploadIconComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0, 0);\n i0.ɵɵtemplate(1, FileUploadIconComponent__svg_svg_1_Template, 3, 0, \"svg\", 1)(2, FileUploadIconComponent__svg_svg_2_Template, 3, 0, \"svg\", 2)(3, FileUploadIconComponent__svg_svg_3_Template, 3, 0, \"svg\", 2)(4, FileUploadIconComponent__svg_svg_4_Template, 3, 0, \"svg\", 2)(5, FileUploadIconComponent__svg_svg_5_Template, 3, 0, \"svg\", 2);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngSwitch\", true);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngSwitchCase\", ctx.isIcon(\"image\"));\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngSwitchCase\", ctx.isIcon(\"audio\"));\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngSwitchCase\", ctx.isIcon(\"text\"));\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngSwitchCase\", ctx.isIcon(\"video\"));\n }\n },\n dependencies: [i2.NgSwitch, i2.NgSwitchCase, i2.NgSwitchDefault],\n styles: [\"[_nghost-%COMP%]{display:block;border:1px solid #eaeaea;border-radius:4px}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{fill:#909293}\"],\n changeDetection: 0\n });\n }\n }\n return FileUploadIconComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FileUploadListItemComponent = /*#__PURE__*/(() => {\n class FileUploadListItemComponent {\n constructor(fileUploadService) {\n this.fileUploadService = fileUploadService;\n }\n removeFile(file) {\n this.control.removeFile(file);\n }\n calculateSize(size) {\n return this.fileUploadService.formatSize(size);\n }\n static {\n this.ɵfac = function FileUploadListItemComponent_Factory(t) {\n return new (t || FileUploadListItemComponent)(i0.ɵɵdirectiveInject(FileUploadService));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FileUploadListItemComponent,\n selectors: [[\"file-upload-list-item\"]],\n inputs: {\n index: \"index\",\n file: \"file\",\n control: \"control\"\n },\n ngContentSelectors: _c0,\n decls: 11,\n vars: 3,\n consts: [[3, \"file\"], [1, \"file-info\"], [1, \"file-name\"], [1, \"file-buttons\"], [1, \"remove-btn\", 3, \"click\"], [\"viewBox\", \"0 0 96 96\"], [\"d\", \"M40.5,66.8V39.3c0-0.4-0.1-0.7-0.4-0.9S39.6,38,39.3,38h-2.5c-0.4,0-0.7,0.1-0.9,0.4\\n s-0.4,0.5-0.4,0.9v27.5c0,0.4,0.1,0.7,0.4,0.9s0.5,0.4,0.9,0.4h2.5c0.4,0,0.7-0.1,0.9-0.4S40.5,67.1,40.5,66.8z M50.5,66.8V39.3\\n c0-0.4-0.1-0.7-0.4-0.9S49.6,38,49.3,38h-2.5c-0.4,0-0.7,0.1-0.9,0.4s-0.4,0.5-0.4,0.9v27.5c0,0.4,0.1,0.7,0.4,0.9s0.5,0.4,0.9,0.4\\n h2.5c0.4,0,0.7-0.1,0.9-0.4S50.5,67.1,50.5,66.8z M60.5,66.8V39.3c0-0.4-0.1-0.7-0.4-0.9S59.6,38,59.3,38h-2.5\\n c-0.4,0-0.7,0.1-0.9,0.4s-0.4,0.5-0.4,0.9v27.5c0,0.4,0.1,0.7,0.4,0.9s0.5,0.4,0.9,0.4h2.5c0.4,0,0.7-0.1,0.9-0.4\\n S60.5,67.1,60.5,66.8z M39.3,28h17.5l-1.9-4.6c-0.2-0.2-0.4-0.4-0.7-0.4H41.8c-0.3,0.1-0.5,0.2-0.7,0.4L39.3,28z M75.5,29.3v2.5\\n c0,0.4-0.1,0.7-0.4,0.9S74.6,33,74.3,33h-3.8v37c0,2.2-0.6,4-1.8,5.6S66,78,64.3,78H31.8c-1.7,0-3.2-0.8-4.4-2.3s-1.8-3.4-1.8-5.5\\n V33h-3.8c-0.4,0-0.7-0.1-0.9-0.4s-0.4-0.5-0.4-0.9v-2.5c0-0.4,0.1-0.7,0.4-0.9s0.5-0.4,0.9-0.4h12.1l2.7-6.5c0.4-1,1.1-1.8,2.1-2.5\\n s2-1,3.1-1h12.5c1,0,2.1,0.3,3.1,1s1.7,1.5,2.1,2.5l2.7,6.5h12.1c0.4,0,0.7,0.1,0.9,0.4S75.5,28.9,75.5,29.3z\"]],\n template: function FileUploadListItemComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelement(0, \"file-upload-icon\", 0);\n i0.ɵɵelementStart(1, \"div\", 1)(2, \"span\", 2);\n i0.ɵɵtext(3);\n i0.ɵɵelementEnd();\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"div\", 3)(6, \"span\", 4);\n i0.ɵɵlistener(\"click\", function FileUploadListItemComponent_Template_span_click_6_listener() {\n return ctx.removeFile(ctx.file);\n });\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(7, \"svg\", 5)(8, \"g\");\n i0.ɵɵelement(9, \"path\", 6);\n i0.ɵɵelementEnd()();\n i0.ɵɵprojection(10);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"file\", ctx.file);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate(ctx.file.name);\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\" (\", ctx.calculateSize(ctx.file.size), \") \");\n }\n },\n dependencies: [FileUploadIconComponent],\n styles: [\"@charset \\\"UTF-8\\\";[_nghost-%COMP%]{display:block;font-size:14px;color:#646464}[_nghost-%COMP%]:after{clear:both;content:\\\"\\\\a0\\\";display:block;height:0;line-height:0;visibility:hidden;zoom:1}file-upload-icon[_ngcontent-%COMP%]{float:left;width:30px;height:36px;margin:0 10px 0 0}.file-info[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.remove-btn[_ngcontent-%COMP%]{font-size:12px;cursor:pointer}.remove-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{display:inline-block;vertical-align:-20%;height:18px;width:18px}\"]\n });\n }\n }\n return FileUploadListItemComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FileUploadDropZoneComponent = /*#__PURE__*/(() => {\n class FileUploadDropZoneComponent {\n static {\n this.ɵfac = function FileUploadDropZoneComponent_Factory(t) {\n return new (t || FileUploadDropZoneComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FileUploadDropZoneComponent,\n selectors: [[\"file-upload-drop-zone\"]],\n ngContentSelectors: _c0,\n decls: 6,\n vars: 0,\n consts: [[1, \"icon\"], [\"viewBox\", \"0 0 96 96\"], [\"d\", \"M62.8,68.1c0-0.6-0.2-1.1-0.6-1.5c-0.4-0.4-0.9-0.6-1.5-0.6s-1.1,0.2-1.5,0.6\\n c-0.4,0.4-0.6,0.9-0.6,1.5c0,0.6,0.2,1.1,0.6,1.5c0.4,0.4,0.9,0.6,1.5,0.6s1.1-0.2,1.5-0.6S62.8,68.7,62.8,68.1z M71.3,68.1\\n c0-0.6-0.2-1.1-0.6-1.5c-0.4-0.4-0.9-0.6-1.5-0.6c-0.6,0-1.1,0.2-1.5,0.6C67.2,67,67,67.5,67,68.1c0,0.6,0.2,1.1,0.6,1.5\\n s0.9,0.6,1.5,0.6c0.6,0,1.1-0.2,1.5-0.6C71.1,69.2,71.3,68.7,71.3,68.1z M75.5,60.7v10.6c0,0.9-0.3,1.6-0.9,2.2\\n c-0.6,0.6-1.4,0.9-2.2,0.9H23.7c-0.9,0-1.6-0.3-2.2-0.9c-0.6-0.6-0.9-1.4-0.9-2.2V60.7c0-0.9,0.3-1.6,0.9-2.2\\n c0.6-0.6,1.4-0.9,2.2-0.9h14.1c0.5,1.2,1.2,2.2,2.3,3c1.1,0.8,2.3,1.2,3.7,1.2h8.5c1.3,0,2.6-0.4,3.7-1.2c1.1-0.8,1.9-1.8,2.3-3\\n h14.1c0.9,0,1.6,0.3,2.2,0.9C75.2,59.1,75.5,59.8,75.5,60.7z M64.8,39.3c-0.4,0.9-1,1.3-2,1.3h-8.5v14.8c0,0.6-0.2,1.1-0.6,1.5\\n c-0.4,0.4-0.9,0.6-1.5,0.6h-8.5c-0.6,0-1.1-0.2-1.5-0.6c-0.4-0.4-0.6-0.9-0.6-1.5V40.6h-8.5c-0.9,0-1.6-0.4-2-1.3\\n c-0.4-0.9-0.2-1.6,0.5-2.3l14.8-14.8c0.4-0.4,0.9-0.6,1.5-0.6s1.1,0.2,1.5,0.6L64.3,37C65,37.7,65.1,38.4,64.8,39.3z\"], [1, \"upload-text\"]],\n template: function FileUploadDropZoneComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"svg\", 1)(2, \"g\");\n i0.ɵɵelement(3, \"path\", 2);\n i0.ɵɵelementEnd()()();\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelementStart(4, \"div\", 3);\n i0.ɵɵprojection(5);\n i0.ɵɵelementEnd();\n }\n },\n styles: [\"[_nghost-%COMP%]{display:block}.icon[_ngcontent-%COMP%]{height:35px;width:35px;border:1px solid #eaeaea;border-radius:4px}.icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#909293}.upload-text[_ngcontent-%COMP%]{overflow:hidden;width:auto;position:relative;padding-left:20px}.list-visible[_nghost-%COMP%] .upload-text[_ngcontent-%COMP%], .list-visible [_nghost-%COMP%] .upload-text[_ngcontent-%COMP%]{display:none}\"],\n changeDetection: 0\n });\n }\n }\n return FileUploadDropZoneComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst DRAGOVER = 'dragover';\nconst TOUCHED = 'ng-touched';\nlet FileUploadComponent = /*#__PURE__*/(() => {\n class FileUploadComponent extends FileUploadAbstract {\n set multiple(isMultiple) {\n this.isMultiple = isMultiple;\n this.checkAndSetMultiple();\n }\n constructor(fileUploadService, document) {\n super();\n this.fileUploadService = fileUploadService;\n this.document = document;\n this.control = null;\n this.animation = true;\n this.templateRef = null;\n this.listItem = null;\n this.templateContext = {\n $implicit: this.fileUploadService.isFileDragDropAvailable(),\n isFileDragDropAvailable: this.fileUploadService.isFileDragDropAvailable()\n };\n /** animation fields */\n this.zoomText = 'static';\n this.listVisible = false;\n this.onTouch = () => {\n this.renderer.addClass(this.hostElementRef.nativeElement, TOUCHED);\n };\n }\n get hasFiles() {\n return this.control.isListVisible && this.control.size > 0;\n }\n get isInvalid() {\n return !this.control.disabled && this.control.invalid;\n }\n get isAnimationDisabled() {\n return this.animation === false || this.animation === 'false';\n }\n trackByFn(index, item) {\n return item.name;\n }\n setEvents() {\n super.setEvents();\n ['drag', 'dragstart', 'dragend', 'dragover', 'dragenter', 'dragleave', 'drop'].forEach(eventName => {\n this.hooks.push(this.renderer.listen(this.document, eventName, event => this.preventDragEvents(event)));\n });\n ['dragover', 'dragenter'].forEach(eventName => {\n this.hooks.push(this.renderer.listen(this.hostElementRef.nativeElement, eventName, event => this.onDragOver(event)));\n });\n ['dragleave', 'dragend', 'drop'].forEach(eventName => {\n this.hooks.push(this.renderer.listen(this.hostElementRef.nativeElement, eventName, event => this.onDragLeave(event)));\n });\n this.subscriptions.push(this.control.valueChanges.subscribe(files => this.renderView()));\n this.subscriptions.push(this.control.listVisibilityChanges.subscribe(status => this.toggleListVisibility()));\n }\n onKeyDown(event) {\n if (event.keyCode === 13 || event.keyCode === 32) {\n event.preventDefault();\n this.control.click();\n }\n }\n preventDragEvents(event) {\n event.preventDefault();\n event.stopPropagation();\n }\n renderView() {\n if (!this.listVisible) {\n this.zoomText = this.control.isListVisible && this.control.size > 0 ? 'zoomOut' : 'static';\n }\n this.cdr.markForCheck();\n }\n showList() {\n if (this.zoomText !== 'static') {\n this.listVisible = true;\n }\n }\n hideList() {\n this.listVisible = false;\n }\n toggleListVisibility() {\n this.listVisible = this.control.isListVisible && this.control.size > 0;\n if (this.listVisible) {\n this.renderer.addClass(this.hostElementRef.nativeElement, 'list-visible');\n this.zoomText = 'static';\n }\n this.cdr.markForCheck();\n }\n /**\n * on file over add class name\n */\n onDragOver(event) {\n this.renderer.addClass(this.hostElementRef.nativeElement, DRAGOVER);\n }\n /**\n * on mouse out remove class name\n */\n onDragLeave(event) {\n this.renderer.removeClass(this.hostElementRef.nativeElement, DRAGOVER);\n }\n onDrop(event) {\n if (this.control.disabled) {\n return;\n }\n // There is some issue with DragEvent in typescript lib.dom.d.ts\n const files = event.dataTransfer.files;\n this.control.addFiles(files);\n this.onTouch();\n }\n onInputChange(event) {\n const input = event.target;\n if (!this.control.disabled && input.files.length > 0) {\n this.control.addFiles(input.files);\n this.clearInputEl();\n }\n this.onTouch();\n }\n /**\n * model -> view changes\n */\n writeValue(files) {\n if (files != null) {\n this.control.setValue(files);\n }\n }\n /**\n * register function which will be called on UI change\n * to update view -> model\n */\n registerOnChange(fn) {\n this.onChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouch = fn;\n }\n setDisabledState(isDisabled) {\n this.control.disable(isDisabled);\n }\n zoomAnimationDone(event) {\n if (this.control.isListVisible && this.control.size > 0) {\n this.showList();\n } else {\n this.hideList();\n }\n if (event.fromState === 'static' && event.toState === 'zoomOut') {\n this.renderer.addClass(this.hostElementRef.nativeElement, 'hide-text');\n } else {\n this.renderer.removeClass(this.hostElementRef.nativeElement, 'hide-text');\n }\n if (event.toState === 'zoomIn') {\n this.zoomText = 'static';\n }\n }\n animationListFinished(event) {\n if (event.toState === 'void') {\n this.zoomText = 'zoomIn';\n this.renderer.removeClass(this.hostElementRef.nativeElement, 'list-visible');\n }\n if (event.fromState === 'void') {\n this.zoomText = 'static';\n this.renderer.addClass(this.hostElementRef.nativeElement, 'list-visible');\n }\n }\n static {\n this.ɵfac = function FileUploadComponent_Factory(t) {\n return new (t || FileUploadComponent)(i0.ɵɵdirectiveInject(FileUploadService), i0.ɵɵdirectiveInject(DOCUMENT));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FileUploadComponent,\n selectors: [[\"file-upload\", 3, \"simple\", \"\"]],\n contentQueries: function FileUploadComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c1, 5);\n i0.ɵɵcontentQuery(dirIndex, _c2, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateRef = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.listItem = _t.first);\n }\n },\n viewQuery: function FileUploadComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c3, 7);\n i0.ɵɵviewQuery(_c4, 7);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.input = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.label = _t.first);\n }\n },\n hostVars: 5,\n hostBindings: function FileUploadComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"drop\", function FileUploadComponent_drop_HostBindingHandler($event) {\n return ctx.onDrop($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵsyntheticHostProperty(\"@.disabled\", ctx.isAnimationDisabled);\n i0.ɵɵclassProp(\"has-files\", ctx.hasFiles)(\"ng-invalid\", ctx.isInvalid);\n }\n },\n inputs: {\n control: \"control\",\n animation: \"animation\",\n multiple: \"multiple\"\n },\n features: [i0.ɵɵProvidersFeature([FileUploadService, {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => FileUploadComponent),\n multi: true\n }]), i0.ɵɵInheritDefinitionFeature],\n decls: 9,\n vars: 6,\n consts: [[\"tabindex\", \"0\", 1, \"upload-input\", 3, \"keydown\"], [\"labelRef\", \"\"], [4, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [\"defaultTemplate\", \"\"], [\"type\", \"file\", \"tabindex\", \"-1\", \"multiple\", \"\", 1, \"files-input\", 3, \"change\"], [\"inputRef\", \"\"], [\"class\", \"upload-list\", 4, \"ngIf\"], [4, \"ngIf\", \"ngIfElse\"], [\"isNotDragDropAvailable\", \"\"], [1, \"upload-list\"], [\"ngFor\", \"\", 3, \"ngForOf\", \"ngForTrackBy\"], [\"defaultItemTemplate\", \"\"], [3, \"index\", \"file\", \"control\"]],\n template: function FileUploadComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"label\", 0, 1);\n i0.ɵɵlistener(\"keydown\", function FileUploadComponent_Template_label_keydown_0_listener($event) {\n return ctx.onKeyDown($event);\n })(\"@zoomAnimation.done\", function FileUploadComponent_Template_label_animation_zoomAnimation_done_0_listener($event) {\n return ctx.zoomAnimationDone($event);\n });\n i0.ɵɵtemplate(2, FileUploadComponent_ng_container_2_Template, 1, 0, \"ng-container\", 2)(3, FileUploadComponent_ng_template_3_Template, 4, 2, \"ng-template\", null, 3, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementStart(5, \"input\", 4, 5);\n i0.ɵɵlistener(\"change\", function FileUploadComponent_Template_input_change_5_listener($event) {\n return ctx.onInputChange($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵtemplate(7, FileUploadComponent_div_7_Template, 5, 5, \"div\", 6);\n i0.ɵɵpipe(8, \"async\");\n }\n if (rf & 2) {\n const _r3 = i0.ɵɵreference(4);\n i0.ɵɵproperty(\"@zoomAnimation\", ctx.zoomText);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx.templateRef ? ctx.templateRef : _r3)(\"ngTemplateOutletContext\", ctx.templateContext);\n i0.ɵɵadvance(5);\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(8, 4, ctx.control.listVisibilityChanges) && ctx.control.size > 0 && ctx.listVisible);\n }\n },\n dependencies: [i2.NgForOf, i2.NgIf, i2.NgTemplateOutlet, FileUploadListItemComponent, FileUploadDropZoneComponent, i2.AsyncPipe],\n styles: [\"@charset \\\"UTF-8\\\";[_nghost-%COMP%], [_nghost-%COMP%] > *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]{overflow:hidden;display:block;background:#fafafa;padding:20px 66px 20px 20px;min-height:140px;outline:1px dashed #92b0b3;outline-offset:-10px;position:relative}[_nghost-%COMP%] .icon{float:left}.dragover[_nghost-%COMP%]{outline-width:2px}.disabled[_nghost-%COMP%]{opacity:.5;cursor:no-drop}.files-input[_ngcontent-%COMP%]{width:.1px;height:.1px;opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden}.upload-input[_ngcontent-%COMP%]:after{clear:both;content:\\\"\\\\a0\\\";display:block;height:0;line-height:0;visibility:hidden;zoom:1}.upload-input[_ngcontent-%COMP%]{cursor:pointer;display:inline-block;color:#646464;position:absolute;top:50%;left:50%;margin:0;transform:translate(-50%,-50%);outline:none}.disabled[_nghost-%COMP%] .upload-input[_ngcontent-%COMP%]{cursor:not-allowed}.list-visible[_nghost-%COMP%] .upload-input[_ngcontent-%COMP%]{top:20px;left:100%;margin-left:-20px;transform:translate(-100%);text-align:center}.hide-text[_nghost-%COMP%] .upload-input[_ngcontent-%COMP%]{opacity:0}.dragover[_nghost-%COMP%]:not(.disabled) .upload-input[_ngcontent-%COMP%], [_nghost-%COMP%]:not(.disabled) .upload-input[_ngcontent-%COMP%]:hover, [_nghost-%COMP%]:not(.disabled) .upload-input[_ngcontent-%COMP%]:focus{color:#80a9d2}.dragover[_nghost-%COMP%]:not(.disabled) .icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%], [_nghost-%COMP%]:not(.disabled) .upload-input[_ngcontent-%COMP%]:hover svg[_ngcontent-%COMP%], [_nghost-%COMP%]:not(.disabled) .upload-input[_ngcontent-%COMP%]:focus svg[_ngcontent-%COMP%]{fill:#80a9d2}file-upload-list-item[_ngcontent-%COMP%]{padding:10px 0 0}file-upload-list-item[_ngcontent-%COMP%]:first-child{padding:0}\"],\n data: {\n animation: [ZoomAnimation, InsertAnimation]\n },\n changeDetection: 0\n });\n }\n }\n return FileUploadComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FileUploadAttributeComponent = /*#__PURE__*/(() => {\n class FileUploadAttributeComponent {\n constructor(fileUploadService, hostElementRef, renderer, document) {\n this.fileUploadService = fileUploadService;\n this.hostElementRef = hostElementRef;\n this.renderer = renderer;\n this.document = document;\n this.control = null;\n this.templateRef = null;\n this.hooks = [];\n this.subscriptions = [];\n this.onTouch = () => {\n this.renderer.addClass(this.hostElementRef.nativeElement, TOUCHED);\n };\n }\n ngOnInit() {\n if (IsNullOrEmpty(this.control)) {\n this.control = new FileUploadControl();\n }\n }\n ngAfterViewInit() {\n if (this.fileUploadService.isFileDragDropAvailable()) {\n this.setEvents();\n this.checkAndMarkAsDisabled();\n }\n }\n ngOnDestroy() {\n this.hooks.forEach(hook => hook());\n this.hooks.length = 0;\n this.subscriptions.forEach(subscription => subscription.unsubscribe());\n this.subscriptions.length = 0;\n }\n get hasFiles() {\n return this.control.isListVisible && this.control.size > 0;\n }\n get isInvalid() {\n return !this.control.disabled && this.control.invalid;\n }\n setEvents() {\n ['drag', 'dragstart', 'dragend', 'dragover', 'dragenter', 'dragleave', 'drop'].forEach(eventName => {\n this.hooks.push(this.renderer.listen(this.document, eventName, event => this.preventDragEvents(event)));\n });\n ['dragover', 'dragenter'].forEach(eventName => {\n this.hooks.push(this.renderer.listen(this.hostElementRef.nativeElement, eventName, event => this.onDragOver(event)));\n });\n ['dragleave', 'dragend', 'drop'].forEach(eventName => {\n this.hooks.push(this.renderer.listen(this.hostElementRef.nativeElement, eventName, event => {\n if (this.control.disabled && eventName === 'dragleave' || eventName !== 'dragleave') {\n this.onDragLeave(event);\n }\n }));\n });\n ['dragleave'].forEach(eventName => {\n this.hooks.push(this.renderer.listen(this.overlay.nativeElement, eventName, event => this.onDragLeave(event)));\n });\n this.subscriptions.push(this.control.statusChanges.subscribe(status => this.checkAndMarkAsDisabled()));\n }\n checkAndMarkAsDisabled() {\n if (this.control.disabled) {\n this.renderer.addClass(this.hostElementRef.nativeElement, 'disabled');\n } else {\n this.renderer.removeClass(this.hostElementRef.nativeElement, 'disabled');\n }\n }\n preventDragEvents(event) {\n event.preventDefault();\n event.stopPropagation();\n }\n /**\n * on file over add class name\n */\n onDragOver(event) {\n this.renderer.addClass(this.hostElementRef.nativeElement, DRAGOVER);\n }\n /**\n * on mouse out remove class name\n */\n onDragLeave(event) {\n this.renderer.removeClass(this.hostElementRef.nativeElement, DRAGOVER);\n }\n onDrop(event) {\n if (this.control.disabled) {\n return;\n }\n const files = event.dataTransfer.files;\n this.control.addFiles(files);\n this.onTouch();\n }\n static {\n this.ɵfac = function FileUploadAttributeComponent_Factory(t) {\n return new (t || FileUploadAttributeComponent)(i0.ɵɵdirectiveInject(FileUploadService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(DOCUMENT));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: FileUploadAttributeComponent,\n selectors: [[\"\", \"file-drop-zone\", \"\"]],\n contentQueries: function FileUploadAttributeComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c1, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateRef = _t.first);\n }\n },\n viewQuery: function FileUploadAttributeComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c6, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.overlay = _t.first);\n }\n },\n hostVars: 4,\n hostBindings: function FileUploadAttributeComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"drop\", function FileUploadAttributeComponent_drop_HostBindingHandler($event) {\n return ctx.onDrop($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"has-files\", ctx.hasFiles)(\"ng-invalid\", ctx.isInvalid);\n }\n },\n inputs: {\n control: \"control\"\n },\n features: [i0.ɵɵProvidersFeature([FileUploadService])],\n attrs: _c7,\n ngContentSelectors: _c0,\n decls: 2,\n vars: 1,\n consts: [[\"class\", \"overlay\", 4, \"ngIf\"], [1, \"overlay\"], [\"overlay\", \"\"], [1, \"upload-input\"], [4, \"ngTemplateOutlet\"], [\"defaultTemplate\", \"\"]],\n template: function FileUploadAttributeComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n i0.ɵɵtemplate(1, FileUploadAttributeComponent_div_1_Template, 6, 1, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.fileUploadService.isFileDragDropAvailable());\n }\n },\n dependencies: [i2.NgIf, i2.NgTemplateOutlet, FileUploadDropZoneComponent],\n styles: [\"[_nghost-%COMP%]{position:relative;display:block}[_nghost-%COMP%] .overlay[_ngcontent-%COMP%]{display:none;background:rgba(255,255,255,.8);outline:2px dashed #92b0b3;outline-offset:-10px;position:absolute;inset:0}.dragover[_nghost-%COMP%]:not(.disabled) .overlay[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .icon{margin:0 auto 10px}[_nghost-%COMP%] .icon svg{fill:#80a9d2}.upload-input[_ngcontent-%COMP%]{pointer-events:none;cursor:pointer;display:inline-block;color:#80a9d2;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:all .15s ease-in-out}\"]\n });\n }\n }\n return FileUploadAttributeComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SimpleFileUploadComponent = /*#__PURE__*/(() => {\n class SimpleFileUploadComponent extends FileUploadAbstract {\n constructor(fileUploadService) {\n super();\n this.fileUploadService = fileUploadService;\n this.control = null;\n this.buttonRef = null;\n this.placeholderRef = null;\n this.isMultiple = null;\n this.onTouch = () => {\n this.renderer.addClass(this.hostElementRef.nativeElement, TOUCHED);\n };\n }\n get hasFiles() {\n return this.control.isListVisible && this.control.size > 0;\n }\n get isInvalid() {\n return !this.control.disabled && this.control.invalid;\n }\n onInputChange(event) {\n const input = event.target;\n if (!this.control.disabled && input.files.length > 0) {\n this.control.setValue(Array.from(input.files));\n this.clearInputEl();\n }\n this.onTouch();\n }\n /**\n * model -> view changes\n */\n writeValue(files) {\n if (files != null) {\n this.control.setValue(files);\n }\n }\n trackByFn(index, item) {\n return item.name;\n }\n /**\n * register function which will be called on UI change\n * to update view -> model\n */\n registerOnChange(fn) {\n this.onChange = fn;\n }\n registerOnTouched(fn) {\n this.onTouch = fn;\n }\n setDisabledState(isDisabled) {\n this.control.disable(isDisabled);\n }\n onKeyDown(event) {\n if (event.keyCode === 13 || event.keyCode === 32) {\n event.preventDefault();\n this.control.click();\n }\n }\n static {\n this.ɵfac = function SimpleFileUploadComponent_Factory(t) {\n return new (t || SimpleFileUploadComponent)(i0.ɵɵdirectiveInject(FileUploadService));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: SimpleFileUploadComponent,\n selectors: [[\"file-upload\", \"simple\", \"\"]],\n contentQueries: function SimpleFileUploadComponent_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, _c8, 5);\n i0.ɵɵcontentQuery(dirIndex, _c1, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.buttonRef = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.placeholderRef = _t.first);\n }\n },\n viewQuery: function SimpleFileUploadComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c3, 7);\n i0.ɵɵviewQuery(_c4, 7);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.input = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.label = _t.first);\n }\n },\n hostVars: 4,\n hostBindings: function SimpleFileUploadComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"has-files\", ctx.hasFiles)(\"ng-invalid\", ctx.isInvalid);\n }\n },\n inputs: {\n control: \"control\"\n },\n features: [i0.ɵɵProvidersFeature([FileUploadService, {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SimpleFileUploadComponent),\n multi: true\n }]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c9,\n decls: 14,\n vars: 7,\n consts: [[1, \"upload-text\"], [3, \"ngIf\"], [\"defaultPlaceholderTemplate\", \"\"], [\"emptyList\", \"\"], [\"tabindex\", \"0\", 1, \"upload-button\", 3, \"keydown\"], [\"labelRef\", \"\"], [4, \"ngTemplateOutlet\", \"ngTemplateOutletContext\"], [\"defaultButtonTemplate\", \"\"], [\"type\", \"file\", \"tabindex\", \"-1\", 1, \"files-input\", 3, \"change\"], [\"inputRef\", \"\"], [3, \"ngIf\", \"ngIfElse\"], [\"ngFor\", \"\", 3, \"ngForOf\", \"ngForTrackBy\"], [4, \"ngIf\"], [1, \"file-name\"], [1, \"button\"], [1, \"icon\"], [\"viewBox\", \"0 0 96 96\"], [\"d\", \"M62.8,68.1c0-0.6-0.2-1.1-0.6-1.5c-0.4-0.4-0.9-0.6-1.5-0.6s-1.1,0.2-1.5,0.6\\n c-0.4,0.4-0.6,0.9-0.6,1.5c0,0.6,0.2,1.1,0.6,1.5c0.4,0.4,0.9,0.6,1.5,0.6s1.1-0.2,1.5-0.6S62.8,68.7,62.8,68.1z M71.3,68.1\\n c0-0.6-0.2-1.1-0.6-1.5c-0.4-0.4-0.9-0.6-1.5-0.6c-0.6,0-1.1,0.2-1.5,0.6C67.2,67,67,67.5,67,68.1c0,0.6,0.2,1.1,0.6,1.5\\n s0.9,0.6,1.5,0.6c0.6,0,1.1-0.2,1.5-0.6C71.1,69.2,71.3,68.7,71.3,68.1z M75.5,60.7v10.6c0,0.9-0.3,1.6-0.9,2.2\\n c-0.6,0.6-1.4,0.9-2.2,0.9H23.7c-0.9,0-1.6-0.3-2.2-0.9c-0.6-0.6-0.9-1.4-0.9-2.2V60.7c0-0.9,0.3-1.6,0.9-2.2\\n c0.6-0.6,1.4-0.9,2.2-0.9h14.1c0.5,1.2,1.2,2.2,2.3,3c1.1,0.8,2.3,1.2,3.7,1.2h8.5c1.3,0,2.6-0.4,3.7-1.2c1.1-0.8,1.9-1.8,2.3-3\\n h14.1c0.9,0,1.6,0.3,2.2,0.9C75.2,59.1,75.5,59.8,75.5,60.7z M64.8,39.3c-0.4,0.9-1,1.3-2,1.3h-8.5v14.8c0,0.6-0.2,1.1-0.6,1.5\\n c-0.4,0.4-0.9,0.6-1.5,0.6h-8.5c-0.6,0-1.1-0.2-1.5-0.6c-0.4-0.4-0.6-0.9-0.6-1.5V40.6h-8.5c-0.9,0-1.6-0.4-2-1.3\\n c-0.4-0.9-0.2-1.6,0.5-2.3l14.8-14.8c0.4-0.4,0.9-0.6,1.5-0.6s1.1,0.2,1.5,0.6L64.3,37C65,37.7,65.1,38.4,64.8,39.3z\"], [1, \"button-text\"]],\n template: function SimpleFileUploadComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵtemplate(1, SimpleFileUploadComponent_ng_template_1_Template, 1, 6, \"ng-template\", 1);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵtemplate(3, SimpleFileUploadComponent_ng_template_3_Template, 1, 2, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor)(5, SimpleFileUploadComponent_ng_template_5_Template, 1, 0, \"ng-template\", null, 3, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(7, \"label\", 4, 5);\n i0.ɵɵlistener(\"keydown\", function SimpleFileUploadComponent_Template_label_keydown_7_listener($event) {\n return ctx.onKeyDown($event);\n });\n i0.ɵɵtemplate(9, SimpleFileUploadComponent_ng_container_9_Template, 1, 0, \"ng-container\", 6)(10, SimpleFileUploadComponent_ng_template_10_Template, 7, 0, \"ng-template\", null, 7, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementStart(12, \"input\", 8, 9);\n i0.ɵɵlistener(\"change\", function SimpleFileUploadComponent_Template_input_change_12_listener($event) {\n return ctx.onInputChange($event);\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const _r8 = i0.ɵɵreference(11);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(2, 3, ctx.control.valueChanges));\n i0.ɵɵadvance(8);\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx.buttonRef ? ctx.buttonRef : _r8)(\"ngTemplateOutletContext\", i0.ɵɵpureFunction1(5, _c11, ctx.control));\n }\n },\n dependencies: [i2.NgForOf, i2.NgIf, i2.NgTemplateOutlet, i2.AsyncPipe],\n styles: [\"[_nghost-%COMP%], [_nghost-%COMP%] > *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]{display:flex;line-height:1.5;color:#555;background-color:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:inset 0 4px 7px #0000000d}.disabled[_nghost-%COMP%]{opacity:.5}.files-input[_ngcontent-%COMP%]{width:.1px;height:.1px;opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden}.icon[_ngcontent-%COMP%]{height:24px;width:24px;display:inline-block}.icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{fill:#555}.upload-button[_ngcontent-%COMP%]{cursor:pointer;display:block;padding:2px 4px;background-color:#eee;border-left:1px solid #ddd;border-radius:0 4px 4px 0;min-width:100px;color:#555;margin:0;position:relative;outline:none}.upload-text[_ngcontent-%COMP%]{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%;padding:5px 10px;font-size:14px;height:30px}.button-text[_ngcontent-%COMP%]{vertical-align:middle;padding-left:10px}.disabled[_nghost-%COMP%] .upload-button[_ngcontent-%COMP%]{cursor:not-allowed}[_nghost-%COMP%]:not(.disabled) .upload-button[_ngcontent-%COMP%]:focus, [_nghost-%COMP%]:not(.disabled) .upload-button[_ngcontent-%COMP%]:hover{color:#80a9d2}[_nghost-%COMP%]:not(.disabled) .upload-button[_ngcontent-%COMP%]:focus svg[_ngcontent-%COMP%], [_nghost-%COMP%]:not(.disabled) .upload-button[_ngcontent-%COMP%]:hover svg[_ngcontent-%COMP%]{fill:#80a9d2}\"],\n changeDetection: 0\n });\n }\n }\n return SimpleFileUploadComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * function used to check file size\n */\nconst checkFileSize = (actualSize, maxSize, minSize = 0, file) => {\n return !IsNullOrEmpty(maxSize) && actualSize > maxSize || actualSize < minSize ? {\n maxSize,\n minSize,\n actual: actualSize,\n file\n } : null;\n};\nconst getFileType = (file, fileExtension) => {\n const type = file.type;\n if (!IsNullOrEmpty(type)) {\n return type;\n }\n return FileUploadTypes[fileExtension];\n};\nvar CheckType = /*#__PURE__*/function (CheckType) {\n CheckType[CheckType[\"ALLOWED\"] = 0] = \"ALLOWED\";\n CheckType[CheckType[\"NOTALLOWED\"] = 1] = \"NOTALLOWED\";\n return CheckType;\n}(CheckType || {});\nconst FILE_EXT_REG = /(^[.]\\w*)$/m;\n/**\n * function used to check file type\n *\n * #### allowedTypes\n * file_extension|audio/*|video/*|image/*|media_type\n */\nconst checkFileTypes = (file, types, checkType) => {\n const fileExtension = file.name.split('.').pop().toLowerCase();\n const fileType = getFileType(file, fileExtension);\n for (const type of types) {\n const isFound = FILE_EXT_REG.test(type) ? type === `.${fileExtension}` : new RegExp(type).test(fileType);\n if (isFound) {\n return checkType === CheckType.ALLOWED ? null : {\n notAllowedTypes: types,\n actual: fileType,\n file\n };\n }\n }\n return checkType === CheckType.ALLOWED ? {\n allowedTypes: types,\n actual: fileType,\n file\n } : null;\n};\nconst checkValueType = value => {\n if (!Array.isArray(value)) {\n throw Error(`FormControl.setValue was provided with wrong argument type, ${value} was provided instead Array`);\n }\n};\n// @dynamic\nclass FileUploadValidators {\n /**\n * Validator that compare the summary size of all files\n */\n static sizeLimit(maxSize) {\n return control => {\n const files = control.value;\n if (IsNullOrEmpty(files)) {\n return null;\n }\n checkValueType(files);\n const sum = files.map(file => file.size).reduce((a, b) => a + b, 0);\n const toLargeFiles = checkFileSize(sum, maxSize);\n return toLargeFiles ? {\n 'sizeLimit': toLargeFiles\n } : null;\n };\n }\n /**\n * Validator that validate individually file maximum size length.\n * Compare the File size in bytes\n * @dynamic\n */\n static fileSize(maxSize) {\n return control => {\n const files = control.value;\n if (IsNullOrEmpty(files)) {\n return null;\n }\n checkValueType(files);\n const toLargeFiles = files.map(file => checkFileSize(file.size, maxSize, 0, file)).filter(error => error);\n return toLargeFiles.length > 0 ? {\n 'fileSize': toLargeFiles\n } : null;\n };\n }\n /**\n * Compare the File size in bytes with max and min size limits\n * @dynamic\n */\n static sizeRange({\n minSize,\n maxSize\n }) {\n return control => {\n const files = control.value;\n if (IsNullOrEmpty(files)) {\n return null;\n }\n checkValueType(files);\n const sizeMismatch = files.map(file => checkFileSize(file.size, maxSize, minSize, file)).filter(error => error);\n return sizeMismatch.length > 0 ? {\n 'sizeRange': sizeMismatch\n } : null;\n };\n }\n /**\n * validator that requires control to have limit on files number\n * @dynamic\n */\n static filesLimit(numFiles) {\n return control => {\n const files = control.value;\n if (IsNullOrEmpty(files)) {\n return null;\n }\n checkValueType(files);\n const filesLimit = files.slice(-1 * (files.length - numFiles)).map(file => ({\n 'max': numFiles,\n 'actual': files.length,\n file\n }));\n return files.length > numFiles ? {\n 'filesLimit': filesLimit\n } : null;\n };\n }\n /**\n * validator that requires control to have limit on media types\n *\n * ##### Allowed media types are\n *\n * - file_extension - a file extension starting with the STOP character,\n * e.g: .gif, .jpg, .png, .doc\n * - audio/* - All sound files are accepted\n * - video/* - All video files are accepted\n * - image/* - All image files are accepted\n * - media_type - A valid media type, with no parameters. Look at [IANA Media Types]\n * (https://www.iana.org/assignments/media-types/media-types.xhtml) for a complete list of standard media types\n *\n * #### Example\n * `FileUploadValidators.accept([file_extension, audio/*, video/*, image/*, media_type])`\n * @dynamic\n */\n static accept(allowedFileTypes) {\n return control => {\n const files = control.value;\n if (IsNullOrEmpty(files)) {\n return null;\n }\n checkValueType(files);\n const notAllowedFiles = files.map(file => checkFileTypes(file, allowedFileTypes, CheckType.ALLOWED)).filter(error => error);\n return notAllowedFiles.length > 0 ? {\n 'fileTypes': notAllowedFiles\n } : null;\n };\n }\n /**\n * validator that requires control to have limit on media types\n *\n * ##### Not allowed media types are\n *\n * - file_extension - a file extension starting with the STOP character,\n * e.g: .gif, .jpg, .png, .doc\n * - audio/* - All sound files are accepted\n * - video/* - All video files are accepted\n * - image/* - All image files are accepted\n * - media_type - A valid media type, with no parameters. Look at [IANA Media Types]\n * (https://www.iana.org/assignments/media-types/media-types.xhtml) for a complete list of standard media types\n *\n * #### Example\n * `FileUploadValidators.reject([file_extension, audio/*, video/*, image/*, media_type])`\n * @dynamic\n */\n static reject(rejectFileTypes) {\n return control => {\n const files = control.value;\n if (IsNullOrEmpty(files)) {\n return null;\n }\n checkValueType(files);\n const notAllowedFiles = files.map(file => checkFileTypes(file, rejectFileTypes, CheckType.NOTALLOWED)).filter(error => error);\n return notAllowedFiles.length > 0 ? {\n 'fileTypes': notAllowedFiles\n } : null;\n };\n }\n}\n\n/**\n * A Directive that adds the `filesize` validator to controls marked with the\n * `filesize` attribute. The size of the file is in bytes or any other unit\n *\n * ### Example\n *\n * ```\n * \n * \n * \n * \n * \n * \n * ```\n *\n */\nlet FileSizeValidator = /*#__PURE__*/(() => {\n class FileSizeValidator {\n constructor(fileUploadService) {\n this.fileUploadService = fileUploadService;\n }\n ngOnChanges(changes) {\n if ('filesize' in changes || 'maxsize' in changes || 'minsize' in changes) {\n this._createValidator();\n if (this.onChange) {\n this.onChange();\n }\n }\n }\n validate(c) {\n return this.validator(c);\n }\n registerOnValidatorChange(fn) {\n this.onChange = fn;\n }\n _createValidator() {\n let maxSize = null;\n if (!IsNullOrEmpty(this.maxsize)) {\n maxSize = this.fileUploadService.parseSize(this.maxsize);\n } else if (!IsNullOrEmpty(this.filesize)) {\n maxSize = this.fileUploadService.parseSize(this.filesize);\n }\n const minSize = this.fileUploadService.parseSize(this.minsize);\n this.validator = FileUploadValidators.sizeRange({\n maxSize,\n minSize\n });\n }\n static {\n this.ɵfac = function FileSizeValidator_Factory(t) {\n return new (t || FileSizeValidator)(i0.ɵɵdirectiveInject(FileUploadService));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: FileSizeValidator,\n selectors: [[\"file-upload\", \"filesize\", \"\", \"formControlName\", \"\"], [\"file-upload\", \"filesize\", \"\", \"formControl\", \"\"], [\"file-upload\", \"filesize\", \"\", \"ngModel\", \"\"], [\"file-upload\", \"minsize\", \"\", \"formControlName\", \"\"], [\"file-upload\", \"minsize\", \"\", \"formControl\", \"\"], [\"file-upload\", \"minsize\", \"\", \"ngModel\", \"\"], [\"file-upload\", \"maxsize\", \"\", \"formControlName\", \"\"], [\"file-upload\", \"maxsize\", \"\", \"formControl\", \"\"], [\"file-upload\", \"maxsize\", \"\", \"ngModel\", \"\"]],\n hostVars: 3,\n hostBindings: function FileSizeValidator_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"filesize\", ctx.filesize ? ctx.filesize : null)(\"minsize\", ctx.minsize ? ctx.minsize : null)(\"maxsize\", ctx.maxsize ? ctx.maxsize : null);\n }\n },\n inputs: {\n filesize: \"filesize\",\n minsize: \"minsize\",\n maxsize: \"maxsize\"\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => FileSizeValidator),\n multi: true\n }]), i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return FileSizeValidator;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * A Directive that adds the `fileslimit` validator to controls marked with the\n * `fileslimit` attribute.\n *\n * ### Example\n *\n * ```\n * \n * \n * ```\n *\n */\nlet FilesLimitValidator = /*#__PURE__*/(() => {\n class FilesLimitValidator {\n ngOnChanges(changes) {\n if ('fileslimit' in changes) {\n this._createValidator();\n if (this.onChange) {\n this.onChange();\n }\n }\n }\n validate(c) {\n return this.fileslimit != null ? this.validator(c) : null;\n }\n registerOnValidatorChange(fn) {\n this.onChange = fn;\n }\n _createValidator() {\n this.validator = FileUploadValidators.filesLimit(typeof this.fileslimit === 'string' ? parseInt(this.fileslimit, 10) : this.fileslimit);\n }\n static {\n this.ɵfac = function FilesLimitValidator_Factory(t) {\n return new (t || FilesLimitValidator)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: FilesLimitValidator,\n selectors: [[\"file-upload\", \"fileslimit\", \"\", \"formControlName\", \"\"], [\"file-upload\", \"fileslimit\", \"\", \"formControl\", \"\"], [\"file-upload\", \"fileslimit\", \"\", \"ngModel\", \"\"]],\n hostVars: 1,\n hostBindings: function FilesLimitValidator_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"fileslimit\", ctx.fileslimit ? ctx.fileslimit : null);\n }\n },\n inputs: {\n fileslimit: \"fileslimit\"\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => FilesLimitValidator),\n multi: true\n }]), i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return FilesLimitValidator;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * A Directive that adds the `accept` validator to controls marked with the\n * `accept` attribute.\n *\n * ### Example\n *\n * ```\n * \n * \n * ```\n *\n * To specify more than one value, separate the values with a comma (e.g. .\n *\n */\nlet FilesAcceptValidator = /*#__PURE__*/(() => {\n class FilesAcceptValidator {\n ngOnChanges(changes) {\n if ('accept' in changes) {\n this._createValidator();\n if (this.onChange) {\n this.onChange();\n }\n }\n }\n validate(c) {\n return !!this.validator ? this.validator(c) : null;\n }\n registerOnValidatorChange(fn) {\n this.onChange = fn;\n }\n _createValidator() {\n if (IsNullOrEmpty(this.accept)) {\n return;\n }\n this.validator = FileUploadValidators.accept(this.accept.split(','));\n }\n static {\n this.ɵfac = function FilesAcceptValidator_Factory(t) {\n return new (t || FilesAcceptValidator)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: FilesAcceptValidator,\n selectors: [[\"file-upload\", \"accept\", \"\", \"formControlName\", \"\"], [\"file-upload\", \"accept\", \"\", \"formControl\", \"\"], [\"file-upload\", \"accept\", \"\", \"ngModel\", \"\"]],\n hostVars: 1,\n hostBindings: function FilesAcceptValidator_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"accept\", ctx.accept ? ctx.accept : null);\n }\n },\n inputs: {\n accept: \"accept\"\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => FilesAcceptValidator),\n multi: true\n }]), i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return FilesAcceptValidator;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FilesAcceptDirective = /*#__PURE__*/(() => {\n class FilesAcceptDirective {\n constructor(fileUpload, simpleFileUpload) {\n this.fileUpload = null;\n this.fileUpload = fileUpload || simpleFileUpload;\n }\n ngAfterViewInit() {\n this.setAccept(this.accept);\n }\n ngOnChanges(changes) {\n if ('accept' in changes && changes['accept'].currentValue !== changes['accept'].previousValue) {\n this.setAccept(this.accept);\n }\n }\n setAccept(accept) {\n if (this.fileUpload && this.fileUpload.control) {\n this.fileUpload.control.acceptFiles(accept);\n }\n }\n static {\n this.ɵfac = function FilesAcceptDirective_Factory(t) {\n return new (t || FilesAcceptDirective)(i0.ɵɵdirectiveInject(FileUploadComponent, 11), i0.ɵɵdirectiveInject(SimpleFileUploadComponent, 11));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: FilesAcceptDirective,\n selectors: [[\"file-upload\", \"accept\", \"\"]],\n hostVars: 1,\n hostBindings: function FilesAcceptDirective_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"accept\", ctx.accept ? ctx.accept : null);\n }\n },\n inputs: {\n accept: \"accept\"\n },\n features: [i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return FilesAcceptDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FilesDiscardDirective = /*#__PURE__*/(() => {\n class FilesDiscardDirective {\n set discard(discard) {\n if (typeof discard === 'string' && (discard === 'true' || discard === 'false')) {\n this.discardValue = JSON.parse(discard.toLowerCase());\n } else if (typeof discard === 'boolean') {\n this.discardValue = discard;\n } else {\n throw Error(`Provided value in directive [discard]=\"${discard}\" is not boolean.`);\n }\n }\n constructor(fileUpload, simpleFileUpload) {\n this.discardValue = null;\n this.fileUpload = null;\n this.fileUpload = fileUpload || simpleFileUpload;\n }\n ngAfterViewInit() {\n this.setAccept(this.discardValue);\n }\n ngOnChanges(changes) {\n if ('discard' in changes && changes['discard'].currentValue !== changes['discard'].previousValue) {\n this.setAccept(this.discardValue);\n }\n }\n setAccept(discard) {\n if (this.fileUpload && this.fileUpload.control) {\n this.fileUpload.control.discardInvalid(discard);\n }\n }\n static {\n this.ɵfac = function FilesDiscardDirective_Factory(t) {\n return new (t || FilesDiscardDirective)(i0.ɵɵdirectiveInject(FileUploadComponent, 11), i0.ɵɵdirectiveInject(SimpleFileUploadComponent, 11));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: FilesDiscardDirective,\n selectors: [[\"file-upload\", \"discard\", \"\"]],\n hostVars: 1,\n hostBindings: function FilesDiscardDirective_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"discard\", ctx.discard ? ctx.discard : null);\n }\n },\n inputs: {\n discard: \"discard\"\n },\n features: [i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return FilesDiscardDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet FilesNativeDirective = /*#__PURE__*/(() => {\n class FilesNativeDirective {\n set native(isNative) {\n if (typeof isNative === 'string' && (isNative === 'true' || isNative === 'false')) {\n this.nativeValue = JSON.parse(isNative.toLowerCase());\n } else if (typeof isNative === 'boolean') {\n this.nativeValue = isNative;\n } else {\n throw Error(`Provided value in directive [native]=\"${isNative}\" is not boolean.`);\n }\n }\n constructor(fileUpload, simpleFileUpload) {\n this.nativeValue = null;\n this.fileUpload = null;\n this.fileUpload = fileUpload || simpleFileUpload;\n }\n ngAfterViewInit() {\n this.enableNative(this.nativeValue);\n }\n ngOnChanges(changes) {\n if ('native' in changes && changes['native'].currentValue !== changes['native'].previousValue) {\n this.enableNative(this.nativeValue);\n }\n }\n enableNative(isNative) {\n if (this.fileUpload && this.fileUpload.control) {\n this.fileUpload.control.native(isNative);\n }\n }\n static {\n this.ɵfac = function FilesNativeDirective_Factory(t) {\n return new (t || FilesNativeDirective)(i0.ɵɵdirectiveInject(FileUploadComponent, 11), i0.ɵɵdirectiveInject(SimpleFileUploadComponent, 11));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: FilesNativeDirective,\n selectors: [[\"file-upload\", \"native\", \"\"]],\n hostVars: 1,\n hostBindings: function FilesNativeDirective_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"native\", ctx.native ? ctx.native : null);\n }\n },\n inputs: {\n native: \"native\"\n },\n features: [i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return FilesNativeDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/*\n * FileUpload\n *\n * By Ivan Pintar, http://www.pintar-ivan.com\n * Licensed under the MIT License\n * See https://github.com/pIvan/file-upload/blob/master/README.md\n */\nlet FileUploadModule = /*#__PURE__*/(() => {\n class FileUploadModule {\n ngDoBootstrap() {}\n static {\n this.ɵfac = function FileUploadModule_Factory(t) {\n return new (t || FileUploadModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: FileUploadModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule]\n });\n }\n }\n return FileUploadModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/*\n * Public API Surface of ngx-file-upload\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { FileSizeValidator, FileUploadAttributeComponent, FileUploadComponent, FileUploadControl, FileUploadDropZoneComponent, FileUploadListItemComponent, FileUploadModule, FileUploadService, FileUploadTypes, FileUploadValidators, FilesAcceptDirective, FilesAcceptValidator, FilesDiscardDirective, FilesLimitValidator, FilesNativeDirective, SimpleFileUploadComponent };\n","export enum CblImportResult {\r\n Fail = 0,\r\n Partial = 1,\r\n Success = 2\r\n}","import { Component, Input, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';\r\nimport {CommonModule} from \"@angular/common\";\r\n\r\n\r\nexport interface TimelineStep {\r\n title: string;\r\n active: boolean;\r\n icon: string;\r\n index: number;\r\n}\r\n\r\n\r\n@Component({\r\n selector: 'app-step-tracker',\r\n standalone: true,\r\n imports: [CommonModule],\r\n templateUrl: './step-tracker.component.html',\r\n styleUrls: ['./step-tracker.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class StepTrackerComponent {\r\n @Input() steps: Array = [];\r\n @Input() currentStep: number = 0;\r\n\r\n\r\n constructor(private readonly cdRef: ChangeDetectorRef) {}\r\n\r\n}\r\n","\r\n
\r\n
    \r\n \r\n
  • \r\n
    \r\n {{step.title}}\r\n
  • \r\n
    \r\n
\r\n
","export enum CblImportReason {\r\n ChapterMissing = 0,\r\n VolumeMissing = 1,\r\n SeriesMissing = 2,\r\n NameConflict = 3,\r\n AllSeriesMissing = 4,\r\n EmptyFile = 5,\r\n SeriesCollision = 6,\r\n AllChapterMissing = 7,\r\n Success = 8,\r\n InvalidFile = 9\r\n}","import {inject, Pipe, PipeTransform} from '@angular/core';\r\nimport { CblBookResult } from 'src/app/_models/reading-list/cbl/cbl-book-result';\r\nimport { CblImportReason } from 'src/app/_models/reading-list/cbl/cbl-import-reason.enum';\r\nimport {TranslocoService} from \"@ngneat/transloco\";\r\n\r\nconst failIcon = '';\r\nconst successIcon = '';\r\n\r\n@Pipe({\r\n name: 'cblConflictReason',\r\n standalone: true\r\n})\r\nexport class CblConflictReasonPipe implements PipeTransform {\r\n\r\n translocoService = inject(TranslocoService);\r\n\r\n transform(result: CblBookResult): string {\r\n switch (result.reason) {\r\n case CblImportReason.AllSeriesMissing:\r\n return failIcon + this.translocoService.translate('cbl-conflict-reason-pipe.all-series-missing');\r\n case CblImportReason.ChapterMissing:\r\n return failIcon + this.translocoService.translate('cbl-conflict-reason-pipe.chapter-missing', {series: result.series, chapter: result.number});\r\n case CblImportReason.EmptyFile:\r\n return failIcon + this.translocoService.translate('cbl-conflict-reason-pipe.empty-file');\r\n case CblImportReason.NameConflict:\r\n return failIcon + this.translocoService.translate('cbl-conflict-reason-pipe.chapter-missing', {readingListName: result.readingListName});\r\n case CblImportReason.SeriesCollision:\r\n return failIcon + this.translocoService.translate('cbl-conflict-reason-pipe.series-collision', {seriesLink: `${result.series}`});\r\n case CblImportReason.SeriesMissing:\r\n return failIcon + this.translocoService.translate('cbl-conflict-reason-pipe.series-missing', {series: result.series});\r\n case CblImportReason.VolumeMissing:\r\n return failIcon + this.translocoService.translate('cbl-conflict-reason-pipe.volume-missing', {series: result.series, volume: result.volume});\r\n case CblImportReason.AllChapterMissing:\r\n return failIcon + this.translocoService.translate('cbl-conflict-reason-pipe.all-chapter-missing');\r\n case CblImportReason.Success:\r\n return successIcon + this.translocoService.translate('cbl-conflict-reason-pipe.volume-missing', {series: result.series, volume: result.volume, chapter: result.number});\r\n case CblImportReason.InvalidFile:\r\n return failIcon + this.translocoService.translate('cbl-conflict-reason-pipe.invalid-file');\r\n }\r\n }\r\n\r\n}\r\n","import {inject, Pipe, PipeTransform} from '@angular/core';\r\nimport { CblImportResult } from 'src/app/_models/reading-list/cbl/cbl-import-result.enum';\r\nimport {TranslocoService} from \"@ngneat/transloco\";\r\n\r\n@Pipe({\r\n name: 'cblImportResult',\r\n standalone: true\r\n})\r\nexport class CblImportResultPipe implements PipeTransform {\r\n\r\n translocoService = inject(TranslocoService);\r\n\r\n transform(result: CblImportResult): string {\r\n switch (result) {\r\n case CblImportResult.Success:\r\n return this.translocoService.translate('cbl-import-result-pipe.success');\r\n case CblImportResult.Partial:\r\n return this.translocoService.translate('cbl-import-result-pipe.partial');\r\n case CblImportResult.Fail:\r\n return this.translocoService.translate('cbl-import-result-pipe.failure');\r\n }\r\n }\r\n}\r\n","import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, inject, ViewChild} from '@angular/core';\r\nimport {FormControl, FormGroup, ReactiveFormsModule} from '@angular/forms';\r\nimport {FileUploadModule, FileUploadValidators} from '@iplab/ngx-file-upload';\r\nimport {\r\n NgbAccordionModule, NgbAccordionToggle,\r\n NgbActiveModal\r\n} from '@ng-bootstrap/ng-bootstrap';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { forkJoin } from 'rxjs';\r\nimport { Breakpoint, UtilityService } from 'src/app/shared/_services/utility.service';\r\nimport { CblImportResult } from 'src/app/_models/reading-list/cbl/cbl-import-result.enum';\r\nimport { CblImportSummary } from 'src/app/_models/reading-list/cbl/cbl-import-summary';\r\nimport { ReadingListService } from 'src/app/_services/reading-list.service';\r\nimport {StepTrackerComponent, TimelineStep} from '../../_components/step-tracker/step-tracker.component';\r\nimport {CommonModule} from \"@angular/common\";\r\nimport {SafeHtmlPipe} from \"../../../_pipes/safe-html.pipe\";\r\nimport {CblConflictReasonPipe} from \"../../../_pipes/cbl-conflict-reason.pipe\";\r\nimport {CblImportResultPipe} from \"../../../_pipes/cbl-import-result.pipe\";\r\nimport {translate, TranslocoDirective, TranslocoService} from \"@ngneat/transloco\";\r\n\r\ninterface FileStep {\r\n fileName: string;\r\n validateSummary: CblImportSummary | undefined;\r\n dryRunSummary: CblImportSummary | undefined;\r\n finalizeSummary: CblImportSummary | undefined;\r\n}\r\n\r\nenum Step {\r\n Import = 0,\r\n Validate = 1,\r\n DryRun = 2,\r\n Finalize = 3\r\n}\r\n\r\n@Component({\r\n selector: 'app-import-cbl-modal',\r\n standalone: true,\r\n imports: [CommonModule,\r\n FileUploadModule,\r\n NgbAccordionModule,\r\n SafeHtmlPipe,\r\n CblConflictReasonPipe, ReactiveFormsModule, StepTrackerComponent, CblImportResultPipe, NgbAccordionToggle, TranslocoDirective],\r\n templateUrl: './import-cbl-modal.component.html',\r\n styleUrls: ['./import-cbl-modal.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class ImportCblModalComponent {\r\n\r\n @ViewChild('fileUpload') fileUpload!: ElementRef;\r\n\r\n fileUploadControl = new FormControl>(undefined, [\r\n FileUploadValidators.accept(['.cbl']),\r\n ]);\r\n\r\n uploadForm = new FormGroup({\r\n files: this.fileUploadControl\r\n });\r\n\r\n isLoading: boolean = false;\r\n\r\n steps: Array = [\r\n {title: translate('import-cbl-modal.import-step'), index: Step.Import, active: true, icon: 'fa-solid fa-file-arrow-up'},\r\n {title: translate('import-cbl-modal.validate-cbl-step'), index: Step.Validate, active: false, icon: 'fa-solid fa-spell-check'},\r\n {title: translate('import-cbl-modal.dry-run-step'), index: Step.DryRun, active: false, icon: 'fa-solid fa-gears'},\r\n {title: translate('import-cbl-modal.final-import-step'), index: Step.Finalize, active: false, icon: 'fa-solid fa-floppy-disk'},\r\n ];\r\n currentStepIndex = this.steps[0].index;\r\n\r\n filesToProcess: Array = [];\r\n failedFiles: Array = [];\r\n\r\n\r\n get Breakpoint() { return Breakpoint; }\r\n get Step() { return Step; }\r\n get CblImportResult() { return CblImportResult; }\r\n\r\n get NextButtonLabel() {\r\n switch(this.currentStepIndex) {\r\n case Step.DryRun:\r\n return 'import';\r\n case Step.Finalize:\r\n return 'restart'\r\n default:\r\n return 'next';\r\n }\r\n }\r\n\r\n constructor(private ngModal: NgbActiveModal, private readingListService: ReadingListService,\r\n public utilityService: UtilityService, private readonly cdRef: ChangeDetectorRef,\r\n private toastr: ToastrService) {}\r\n\r\n close() {\r\n this.ngModal.close();\r\n }\r\n\r\n nextStep() {\r\n if (this.currentStepIndex === Step.Import && !this.isFileSelected()) return;\r\n\r\n this.isLoading = true;\r\n switch (this.currentStepIndex) {\r\n case Step.Import:\r\n const files = this.uploadForm.get('files')?.value;\r\n if (!files) {\r\n this.toastr.error(translate('toasts.select-files-warning'));\r\n return;\r\n }\r\n // Load each file into filesToProcess and group their data\r\n let pages = [];\r\n for (let i = 0; i < files.length; i++) {\r\n const formData = new FormData();\r\n formData.append('cbl', files[i]);\r\n formData.append('dryRun', true + '');\r\n pages.push(this.readingListService.validateCbl(formData));\r\n }\r\n forkJoin(pages).subscribe(results => {\r\n this.filesToProcess = [];\r\n results.forEach(cblImport => {\r\n this.filesToProcess.push({\r\n fileName: cblImport.fileName,\r\n validateSummary: cblImport,\r\n dryRunSummary: undefined,\r\n finalizeSummary: undefined\r\n });\r\n });\r\n\r\n this.filesToProcess = this.filesToProcess.sort((a, b) => b.validateSummary!.success - a.validateSummary!.success);\r\n this.cdRef.markForCheck();\r\n\r\n this.currentStepIndex++;\r\n this.isLoading = false;\r\n this.cdRef.markForCheck();\r\n });\r\n break;\r\n case Step.Validate:\r\n this.failedFiles = this.filesToProcess.filter(item => item.validateSummary?.success === CblImportResult.Fail);\r\n this.filesToProcess = this.filesToProcess.filter(item => item.validateSummary?.success != CblImportResult.Fail);\r\n this.dryRun();\r\n break;\r\n case Step.DryRun:\r\n this.failedFiles.push(...this.filesToProcess.filter(item => item.dryRunSummary?.success === CblImportResult.Fail));\r\n this.filesToProcess = this.filesToProcess.filter(item => item.dryRunSummary?.success != CblImportResult.Fail);\r\n this.import();\r\n break;\r\n case Step.Finalize:\r\n // Clear the models and allow user to do another import\r\n this.uploadForm.get('files')?.setValue(undefined);\r\n this.currentStepIndex = Step.Import;\r\n this.isLoading = false;\r\n this.filesToProcess = [];\r\n this.failedFiles = [];\r\n this.cdRef.markForCheck();\r\n break;\r\n }\r\n }\r\n\r\n prevStep() {\r\n if (this.currentStepIndex === Step.Import) return;\r\n this.currentStepIndex--;\r\n }\r\n\r\n canMoveToNextStep() {\r\n switch (this.currentStepIndex) {\r\n case Step.Import:\r\n return this.isFileSelected();\r\n case Step.Validate:\r\n return this.filesToProcess.filter(item => item.validateSummary?.success != CblImportResult.Fail).length > 0;\r\n case Step.DryRun:\r\n return this.filesToProcess.filter(item => item.dryRunSummary?.success != CblImportResult.Fail).length > 0;\r\n case Step.Finalize:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n canMoveToPrevStep() {\r\n switch (this.currentStepIndex) {\r\n case Step.Import:\r\n case Step.Finalize:\r\n return false;\r\n default:\r\n return true;\r\n }\r\n }\r\n\r\n\r\n isFileSelected() {\r\n const files = this.uploadForm.get('files')?.value;\r\n if (files) return files.length > 0;\r\n return false;\r\n }\r\n\r\n\r\n dryRun() {\r\n const filenamesAllowedToProcess = this.filesToProcess.map(p => p.fileName);\r\n const files = (this.uploadForm.get('files')?.value || []).filter(f => filenamesAllowedToProcess.includes(f.name));\r\n\r\n let pages = [];\r\n for (let i = 0; i < files.length; i++) {\r\n const formData = new FormData();\r\n formData.append('cbl', files[i]);\r\n formData.append('dryRun', 'true');\r\n pages.push(this.readingListService.importCbl(formData));\r\n }\r\n forkJoin(pages).subscribe(results => {\r\n results.forEach(cblImport => {\r\n const index = this.filesToProcess.findIndex(p => p.fileName === cblImport.fileName);\r\n this.filesToProcess[index].dryRunSummary = cblImport;\r\n });\r\n this.filesToProcess = this.filesToProcess.sort((a, b) => b.dryRunSummary!.success - a.dryRunSummary!.success);\r\n\r\n this.isLoading = false;\r\n this.currentStepIndex++;\r\n this.cdRef.markForCheck();\r\n });\r\n }\r\n\r\n import() {\r\n const filenamesAllowedToProcess = this.filesToProcess.map(p => p.fileName);\r\n const files = (this.uploadForm.get('files')?.value || []).filter(f => filenamesAllowedToProcess.includes(f.name));\r\n\r\n let pages = [];\r\n for (let i = 0; i < files.length; i++) {\r\n const formData = new FormData();\r\n formData.append('cbl', files[i]);\r\n formData.append('dryRun', 'false');\r\n pages.push(this.readingListService.importCbl(formData));\r\n }\r\n forkJoin(pages).subscribe(results => {\r\n results.forEach(cblImport => {\r\n const index = this.filesToProcess.findIndex(p => p.fileName === cblImport.fileName);\r\n this.filesToProcess[index].finalizeSummary = cblImport;\r\n });\r\n\r\n this.isLoading = false;\r\n this.currentStepIndex++;\r\n this.toastr.success(translate('toasts.reading-list-imported'));\r\n this.cdRef.markForCheck();\r\n });\r\n }\r\n}\r\n","\r\n\r\n
\r\n

CBL Import

\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n \r\n
\r\n
\r\n

{{t('import-description')}}

\r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n

{{t('validate-description')}}

\r\n
\r\n\r\n
\r\n @for(fileToProcess of filesToProcess; track fileToProcess.fileName) {\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n @if(summary.results.length > 0) {\r\n
{{t('validate-warning')}}
\r\n
    \r\n
  1. \r\n
  2. \r\n
\r\n } @else {\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {{t('validate-no-issue')}}\r\n
\r\n
\r\n {{t('validate-no-issue-description')}}\r\n
\r\n }\r\n
\r\n
\r\n
\r\n }\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n

{{t('dry-run-description')}}

\r\n\r\n
\r\n @for(fileToProcess of filesToProcess; track fileToProcess.fileName) {\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n }\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n @for(fileToProcess of filesToProcess; track fileToProcess.fileName) {\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n }\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
    \r\n @for(result of summary.results; track result.order) {\r\n
  • \r\n }\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n {{success}}\r\n {{success}}\r\n {{success}}\r\n \r\n \r\n {{filename}}: ({{summary.cblName}})\r\n \r\n\r\n\r\n
\r\n
\r\n Help\r\n \r\n \r\n \r\n
\r\n\r\n\r\n\r\n
\r\n","import { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, APP_ID, Injectable, Inject, QueryList, booleanAttribute, Directive, Input, InjectionToken, Optional, EventEmitter, Output, NgModule } from '@angular/core';\nimport * as i1 from '@angular/cdk/platform';\nimport { _getFocusedElementPierceShadowDom, normalizePassiveListenerOptions, _getEventTarget, _getShadowRoot } from '@angular/cdk/platform';\nimport { Subject, Subscription, BehaviorSubject, of } from 'rxjs';\nimport { hasModifierKey, A, Z, ZERO, NINE, PAGE_DOWN, PAGE_UP, END, HOME, LEFT_ARROW, RIGHT_ARROW, UP_ARROW, DOWN_ARROW, TAB, ALT, CONTROL, MAC_META, META, SHIFT } from '@angular/cdk/keycodes';\nimport { tap, debounceTime, filter, map, take, skip, distinctUntilChanged, takeUntil } from 'rxjs/operators';\nimport * as i1$1 from '@angular/cdk/observers';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport { coerceElement } from '@angular/cdk/coercion';\nimport { BreakpointObserver } from '@angular/cdk/layout';\n\n/** IDs are delimited by an empty space, as per the spec. */\nconst ID_DELIMITER = ' ';\n/**\n * Adds the given ID to the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction addAriaReferencedId(el, attr, id) {\n const ids = getAriaReferenceIds(el, attr);\n if (ids.some(existingId => existingId.trim() == id.trim())) {\n return;\n }\n ids.push(id.trim());\n el.setAttribute(attr, ids.join(ID_DELIMITER));\n}\n/**\n * Removes the given ID from the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction removeAriaReferencedId(el, attr, id) {\n const ids = getAriaReferenceIds(el, attr);\n const filteredIds = ids.filter(val => val != id.trim());\n if (filteredIds.length) {\n el.setAttribute(attr, filteredIds.join(ID_DELIMITER));\n } else {\n el.removeAttribute(attr);\n }\n}\n/**\n * Gets the list of IDs referenced by the given ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction getAriaReferenceIds(el, attr) {\n // Get string array of all individual ids (whitespace delimited) in the attribute value\n return (el.getAttribute(attr) || '').match(/\\S+/g) || [];\n}\n\n/**\n * ID used for the body container where all messages are appended.\n * @deprecated No longer being used. To be removed.\n * @breaking-change 14.0.0\n */\nconst MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container';\n/**\n * ID prefix used for each created message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nconst CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';\n/**\n * Attribute given to each host element that is described by a message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nconst CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host';\n/** Global incremental identifier for each registered message element. */\nlet nextId = 0;\n/**\n * Utility that creates visually hidden elements with a message content. Useful for elements that\n * want to use aria-describedby to further describe themselves without adding additional visual\n * content.\n */\nlet AriaDescriber = /*#__PURE__*/(() => {\n class AriaDescriber {\n constructor(_document,\n /**\n * @deprecated To be turned into a required parameter.\n * @breaking-change 14.0.0\n */\n _platform) {\n this._platform = _platform;\n /** Map of all registered message elements that have been placed into the document. */\n this._messageRegistry = new Map();\n /** Container for all registered messages. */\n this._messagesContainer = null;\n /** Unique ID for the service. */\n this._id = `${nextId++}`;\n this._document = _document;\n this._id = inject(APP_ID) + '-' + nextId++;\n }\n describe(hostElement, message, role) {\n if (!this._canBeDescribed(hostElement, message)) {\n return;\n }\n const key = getKey(message, role);\n if (typeof message !== 'string') {\n // We need to ensure that the element has an ID.\n setMessageId(message, this._id);\n this._messageRegistry.set(key, {\n messageElement: message,\n referenceCount: 0\n });\n } else if (!this._messageRegistry.has(key)) {\n this._createMessageElement(message, role);\n }\n if (!this._isElementDescribedByMessage(hostElement, key)) {\n this._addMessageReference(hostElement, key);\n }\n }\n removeDescription(hostElement, message, role) {\n if (!message || !this._isElementNode(hostElement)) {\n return;\n }\n const key = getKey(message, role);\n if (this._isElementDescribedByMessage(hostElement, key)) {\n this._removeMessageReference(hostElement, key);\n }\n // If the message is a string, it means that it's one that we created for the\n // consumer so we can remove it safely, otherwise we should leave it in place.\n if (typeof message === 'string') {\n const registeredMessage = this._messageRegistry.get(key);\n if (registeredMessage && registeredMessage.referenceCount === 0) {\n this._deleteMessageElement(key);\n }\n }\n if (this._messagesContainer?.childNodes.length === 0) {\n this._messagesContainer.remove();\n this._messagesContainer = null;\n }\n }\n /** Unregisters all created message elements and removes the message container. */\n ngOnDestroy() {\n const describedElements = this._document.querySelectorAll(`[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}=\"${this._id}\"]`);\n for (let i = 0; i < describedElements.length; i++) {\n this._removeCdkDescribedByReferenceIds(describedElements[i]);\n describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n this._messagesContainer?.remove();\n this._messagesContainer = null;\n this._messageRegistry.clear();\n }\n /**\n * Creates a new element in the visually hidden message container element with the message\n * as its content and adds it to the message registry.\n */\n _createMessageElement(message, role) {\n const messageElement = this._document.createElement('div');\n setMessageId(messageElement, this._id);\n messageElement.textContent = message;\n if (role) {\n messageElement.setAttribute('role', role);\n }\n this._createMessagesContainer();\n this._messagesContainer.appendChild(messageElement);\n this._messageRegistry.set(getKey(message, role), {\n messageElement,\n referenceCount: 0\n });\n }\n /** Deletes the message element from the global messages container. */\n _deleteMessageElement(key) {\n this._messageRegistry.get(key)?.messageElement?.remove();\n this._messageRegistry.delete(key);\n }\n /** Creates the global container for all aria-describedby messages. */\n _createMessagesContainer() {\n if (this._messagesContainer) {\n return;\n }\n const containerClassName = 'cdk-describedby-message-container';\n const serverContainers = this._document.querySelectorAll(`.${containerClassName}[platform=\"server\"]`);\n for (let i = 0; i < serverContainers.length; i++) {\n // When going from the server to the client, we may end up in a situation where there's\n // already a container on the page, but we don't have a reference to it. Clear the\n // old container so we don't get duplicates. Doing this, instead of emptying the previous\n // container, should be slightly faster.\n serverContainers[i].remove();\n }\n const messagesContainer = this._document.createElement('div');\n // We add `visibility: hidden` in order to prevent text in this container from\n // being searchable by the browser's Ctrl + F functionality.\n // Screen-readers will still read the description for elements with aria-describedby even\n // when the description element is not visible.\n messagesContainer.style.visibility = 'hidden';\n // Even though we use `visibility: hidden`, we still apply `cdk-visually-hidden` so that\n // the description element doesn't impact page layout.\n messagesContainer.classList.add(containerClassName);\n messagesContainer.classList.add('cdk-visually-hidden');\n // @breaking-change 14.0.0 Remove null check for `_platform`.\n if (this._platform && !this._platform.isBrowser) {\n messagesContainer.setAttribute('platform', 'server');\n }\n this._document.body.appendChild(messagesContainer);\n this._messagesContainer = messagesContainer;\n }\n /** Removes all cdk-describedby messages that are hosted through the element. */\n _removeCdkDescribedByReferenceIds(element) {\n // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX\n const originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby').filter(id => id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0);\n element.setAttribute('aria-describedby', originalReferenceIds.join(' '));\n }\n /**\n * Adds a message reference to the element using aria-describedby and increments the registered\n * message's reference count.\n */\n _addMessageReference(element, key) {\n const registeredMessage = this._messageRegistry.get(key);\n // Add the aria-describedby reference and set the\n // describedby_host attribute to mark the element.\n addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, this._id);\n registeredMessage.referenceCount++;\n }\n /**\n * Removes a message reference from the element using aria-describedby\n * and decrements the registered message's reference count.\n */\n _removeMessageReference(element, key) {\n const registeredMessage = this._messageRegistry.get(key);\n registeredMessage.referenceCount--;\n removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n }\n /** Returns true if the element has been described by the provided message ID. */\n _isElementDescribedByMessage(element, key) {\n const referenceIds = getAriaReferenceIds(element, 'aria-describedby');\n const registeredMessage = this._messageRegistry.get(key);\n const messageId = registeredMessage && registeredMessage.messageElement.id;\n return !!messageId && referenceIds.indexOf(messageId) != -1;\n }\n /** Determines whether a message can be described on a particular element. */\n _canBeDescribed(element, message) {\n if (!this._isElementNode(element)) {\n return false;\n }\n if (message && typeof message === 'object') {\n // We'd have to make some assumptions about the description element's text, if the consumer\n // passed in an element. Assume that if an element is passed in, the consumer has verified\n // that it can be used as a description.\n return true;\n }\n const trimmedMessage = message == null ? '' : `${message}`.trim();\n const ariaLabel = element.getAttribute('aria-label');\n // We shouldn't set descriptions if they're exactly the same as the `aria-label` of the\n // element, because screen readers will end up reading out the same text twice in a row.\n return trimmedMessage ? !ariaLabel || ariaLabel.trim() !== trimmedMessage : false;\n }\n /** Checks whether a node is an Element node. */\n _isElementNode(element) {\n return element.nodeType === this._document.ELEMENT_NODE;\n }\n static {\n this.ɵfac = function AriaDescriber_Factory(t) {\n return new (t || AriaDescriber)(i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(i1.Platform));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AriaDescriber,\n factory: AriaDescriber.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return AriaDescriber;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** Gets a key that can be used to look messages up in the registry. */\nfunction getKey(message, role) {\n return typeof message === 'string' ? `${role || ''}/${message}` : message;\n}\n/** Assigns a unique ID to an element, if it doesn't have one already. */\nfunction setMessageId(element, serviceId) {\n if (!element.id) {\n element.id = `${CDK_DESCRIBEDBY_ID_PREFIX}-${serviceId}-${nextId++}`;\n }\n}\n\n/**\n * This class manages keyboard events for selectable lists. If you pass it a query list\n * of items, it will set the active item correctly when arrow events occur.\n */\nclass ListKeyManager {\n constructor(_items) {\n this._items = _items;\n this._activeItemIndex = -1;\n this._activeItem = null;\n this._wrap = false;\n this._letterKeyStream = new Subject();\n this._typeaheadSubscription = Subscription.EMPTY;\n this._vertical = true;\n this._allowedModifierKeys = [];\n this._homeAndEnd = false;\n this._pageUpAndDown = {\n enabled: false,\n delta: 10\n };\n /**\n * Predicate function that can be used to check whether an item should be skipped\n * by the key manager. By default, disabled items are skipped.\n */\n this._skipPredicateFn = item => item.disabled;\n // Buffer for the letters that the user has pressed when the typeahead option is turned on.\n this._pressedLetters = [];\n /**\n * Stream that emits any time the TAB key is pressed, so components can react\n * when focus is shifted off of the list.\n */\n this.tabOut = new Subject();\n /** Stream that emits whenever the active item of the list manager changes. */\n this.change = new Subject();\n // We allow for the items to be an array because, in some cases, the consumer may\n // not have access to a QueryList of the items they want to manage (e.g. when the\n // items aren't being collected via `ViewChildren` or `ContentChildren`).\n if (_items instanceof QueryList) {\n this._itemChangesSubscription = _items.changes.subscribe(newItems => {\n if (this._activeItem) {\n const itemArray = newItems.toArray();\n const newIndex = itemArray.indexOf(this._activeItem);\n if (newIndex > -1 && newIndex !== this._activeItemIndex) {\n this._activeItemIndex = newIndex;\n }\n }\n });\n }\n }\n /**\n * Sets the predicate function that determines which items should be skipped by the\n * list key manager.\n * @param predicate Function that determines whether the given item should be skipped.\n */\n skipPredicate(predicate) {\n this._skipPredicateFn = predicate;\n return this;\n }\n /**\n * Configures wrapping mode, which determines whether the active item will wrap to\n * the other end of list when there are no more items in the given direction.\n * @param shouldWrap Whether the list should wrap when reaching the end.\n */\n withWrap(shouldWrap = true) {\n this._wrap = shouldWrap;\n return this;\n }\n /**\n * Configures whether the key manager should be able to move the selection vertically.\n * @param enabled Whether vertical selection should be enabled.\n */\n withVerticalOrientation(enabled = true) {\n this._vertical = enabled;\n return this;\n }\n /**\n * Configures the key manager to move the selection horizontally.\n * Passing in `null` will disable horizontal movement.\n * @param direction Direction in which the selection can be moved.\n */\n withHorizontalOrientation(direction) {\n this._horizontal = direction;\n return this;\n }\n /**\n * Modifier keys which are allowed to be held down and whose default actions will be prevented\n * as the user is pressing the arrow keys. Defaults to not allowing any modifier keys.\n */\n withAllowedModifierKeys(keys) {\n this._allowedModifierKeys = keys;\n return this;\n }\n /**\n * Turns on typeahead mode which allows users to set the active item by typing.\n * @param debounceInterval Time to wait after the last keystroke before setting the active item.\n */\n withTypeAhead(debounceInterval = 200) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && this._items.length && this._items.some(item => typeof item.getLabel !== 'function')) {\n throw Error('ListKeyManager items in typeahead mode must implement the `getLabel` method.');\n }\n this._typeaheadSubscription.unsubscribe();\n // Debounce the presses of non-navigational keys, collect the ones that correspond to letters\n // and convert those letters back into a string. Afterwards find the first item that starts\n // with that string and select it.\n this._typeaheadSubscription = this._letterKeyStream.pipe(tap(letter => this._pressedLetters.push(letter)), debounceTime(debounceInterval), filter(() => this._pressedLetters.length > 0), map(() => this._pressedLetters.join(''))).subscribe(inputString => {\n const items = this._getItemsArray();\n // Start at 1 because we want to start searching at the item immediately\n // following the current active item.\n for (let i = 1; i < items.length + 1; i++) {\n const index = (this._activeItemIndex + i) % items.length;\n const item = items[index];\n if (!this._skipPredicateFn(item) && item.getLabel().toUpperCase().trim().indexOf(inputString) === 0) {\n this.setActiveItem(index);\n break;\n }\n }\n this._pressedLetters = [];\n });\n return this;\n }\n /** Cancels the current typeahead sequence. */\n cancelTypeahead() {\n this._pressedLetters = [];\n return this;\n }\n /**\n * Configures the key manager to activate the first and last items\n * respectively when the Home or End key is pressed.\n * @param enabled Whether pressing the Home or End key activates the first/last item.\n */\n withHomeAndEnd(enabled = true) {\n this._homeAndEnd = enabled;\n return this;\n }\n /**\n * Configures the key manager to activate every 10th, configured or first/last element in up/down direction\n * respectively when the Page-Up or Page-Down key is pressed.\n * @param enabled Whether pressing the Page-Up or Page-Down key activates the first/last item.\n * @param delta Whether pressing the Home or End key activates the first/last item.\n */\n withPageUpDown(enabled = true, delta = 10) {\n this._pageUpAndDown = {\n enabled,\n delta\n };\n return this;\n }\n setActiveItem(item) {\n const previousActiveItem = this._activeItem;\n this.updateActiveItem(item);\n if (this._activeItem !== previousActiveItem) {\n this.change.next(this._activeItemIndex);\n }\n }\n /**\n * Sets the active item depending on the key event passed in.\n * @param event Keyboard event to be used for determining which element should be active.\n */\n onKeydown(event) {\n const keyCode = event.keyCode;\n const modifiers = ['altKey', 'ctrlKey', 'metaKey', 'shiftKey'];\n const isModifierAllowed = modifiers.every(modifier => {\n return !event[modifier] || this._allowedModifierKeys.indexOf(modifier) > -1;\n });\n switch (keyCode) {\n case TAB:\n this.tabOut.next();\n return;\n case DOWN_ARROW:\n if (this._vertical && isModifierAllowed) {\n this.setNextItemActive();\n break;\n } else {\n return;\n }\n case UP_ARROW:\n if (this._vertical && isModifierAllowed) {\n this.setPreviousItemActive();\n break;\n } else {\n return;\n }\n case RIGHT_ARROW:\n if (this._horizontal && isModifierAllowed) {\n this._horizontal === 'rtl' ? this.setPreviousItemActive() : this.setNextItemActive();\n break;\n } else {\n return;\n }\n case LEFT_ARROW:\n if (this._horizontal && isModifierAllowed) {\n this._horizontal === 'rtl' ? this.setNextItemActive() : this.setPreviousItemActive();\n break;\n } else {\n return;\n }\n case HOME:\n if (this._homeAndEnd && isModifierAllowed) {\n this.setFirstItemActive();\n break;\n } else {\n return;\n }\n case END:\n if (this._homeAndEnd && isModifierAllowed) {\n this.setLastItemActive();\n break;\n } else {\n return;\n }\n case PAGE_UP:\n if (this._pageUpAndDown.enabled && isModifierAllowed) {\n const targetIndex = this._activeItemIndex - this._pageUpAndDown.delta;\n this._setActiveItemByIndex(targetIndex > 0 ? targetIndex : 0, 1);\n break;\n } else {\n return;\n }\n case PAGE_DOWN:\n if (this._pageUpAndDown.enabled && isModifierAllowed) {\n const targetIndex = this._activeItemIndex + this._pageUpAndDown.delta;\n const itemsLength = this._getItemsArray().length;\n this._setActiveItemByIndex(targetIndex < itemsLength ? targetIndex : itemsLength - 1, -1);\n break;\n } else {\n return;\n }\n default:\n if (isModifierAllowed || hasModifierKey(event, 'shiftKey')) {\n // Attempt to use the `event.key` which also maps it to the user's keyboard language,\n // otherwise fall back to resolving alphanumeric characters via the keyCode.\n if (event.key && event.key.length === 1) {\n this._letterKeyStream.next(event.key.toLocaleUpperCase());\n } else if (keyCode >= A && keyCode <= Z || keyCode >= ZERO && keyCode <= NINE) {\n this._letterKeyStream.next(String.fromCharCode(keyCode));\n }\n }\n // Note that we return here, in order to avoid preventing\n // the default action of non-navigational keys.\n return;\n }\n this._pressedLetters = [];\n event.preventDefault();\n }\n /** Index of the currently active item. */\n get activeItemIndex() {\n return this._activeItemIndex;\n }\n /** The active item. */\n get activeItem() {\n return this._activeItem;\n }\n /** Gets whether the user is currently typing into the manager using the typeahead feature. */\n isTyping() {\n return this._pressedLetters.length > 0;\n }\n /** Sets the active item to the first enabled item in the list. */\n setFirstItemActive() {\n this._setActiveItemByIndex(0, 1);\n }\n /** Sets the active item to the last enabled item in the list. */\n setLastItemActive() {\n this._setActiveItemByIndex(this._items.length - 1, -1);\n }\n /** Sets the active item to the next enabled item in the list. */\n setNextItemActive() {\n this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1);\n }\n /** Sets the active item to a previous enabled item in the list. */\n setPreviousItemActive() {\n this._activeItemIndex < 0 && this._wrap ? this.setLastItemActive() : this._setActiveItemByDelta(-1);\n }\n updateActiveItem(item) {\n const itemArray = this._getItemsArray();\n const index = typeof item === 'number' ? item : itemArray.indexOf(item);\n const activeItem = itemArray[index];\n // Explicitly check for `null` and `undefined` because other falsy values are valid.\n this._activeItem = activeItem == null ? null : activeItem;\n this._activeItemIndex = index;\n }\n /** Cleans up the key manager. */\n destroy() {\n this._typeaheadSubscription.unsubscribe();\n this._itemChangesSubscription?.unsubscribe();\n this._letterKeyStream.complete();\n this.tabOut.complete();\n this.change.complete();\n this._pressedLetters = [];\n }\n /**\n * This method sets the active item, given a list of items and the delta between the\n * currently active item and the new active item. It will calculate differently\n * depending on whether wrap mode is turned on.\n */\n _setActiveItemByDelta(delta) {\n this._wrap ? this._setActiveInWrapMode(delta) : this._setActiveInDefaultMode(delta);\n }\n /**\n * Sets the active item properly given \"wrap\" mode. In other words, it will continue to move\n * down the list until it finds an item that is not disabled, and it will wrap if it\n * encounters either end of the list.\n */\n _setActiveInWrapMode(delta) {\n const items = this._getItemsArray();\n for (let i = 1; i <= items.length; i++) {\n const index = (this._activeItemIndex + delta * i + items.length) % items.length;\n const item = items[index];\n if (!this._skipPredicateFn(item)) {\n this.setActiveItem(index);\n return;\n }\n }\n }\n /**\n * Sets the active item properly given the default mode. In other words, it will\n * continue to move down the list until it finds an item that is not disabled. If\n * it encounters either end of the list, it will stop and not wrap.\n */\n _setActiveInDefaultMode(delta) {\n this._setActiveItemByIndex(this._activeItemIndex + delta, delta);\n }\n /**\n * Sets the active item to the first enabled item starting at the index specified. If the\n * item is disabled, it will move in the fallbackDelta direction until it either\n * finds an enabled item or encounters the end of the list.\n */\n _setActiveItemByIndex(index, fallbackDelta) {\n const items = this._getItemsArray();\n if (!items[index]) {\n return;\n }\n while (this._skipPredicateFn(items[index])) {\n index += fallbackDelta;\n if (!items[index]) {\n return;\n }\n }\n this.setActiveItem(index);\n }\n /** Returns the items as an array. */\n _getItemsArray() {\n return this._items instanceof QueryList ? this._items.toArray() : this._items;\n }\n}\nclass ActiveDescendantKeyManager extends ListKeyManager {\n setActiveItem(index) {\n if (this.activeItem) {\n this.activeItem.setInactiveStyles();\n }\n super.setActiveItem(index);\n if (this.activeItem) {\n this.activeItem.setActiveStyles();\n }\n }\n}\nclass FocusKeyManager extends ListKeyManager {\n constructor() {\n super(...arguments);\n this._origin = 'program';\n }\n /**\n * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls.\n * @param origin Focus origin to be used when focusing items.\n */\n setFocusOrigin(origin) {\n this._origin = origin;\n return this;\n }\n setActiveItem(item) {\n super.setActiveItem(item);\n if (this.activeItem) {\n this.activeItem.focus(this._origin);\n }\n }\n}\n\n/**\n * Configuration for the isFocusable method.\n */\nclass IsFocusableConfig {\n constructor() {\n /**\n * Whether to count an element as focusable even if it is not currently visible.\n */\n this.ignoreVisibility = false;\n }\n}\n// The InteractivityChecker leans heavily on the ally.js accessibility utilities.\n// Methods like `isTabbable` are only covering specific edge-cases for the browsers which are\n// supported.\n/**\n * Utility for checking the interactivity of an element, such as whether it is focusable or\n * tabbable.\n */\nlet InteractivityChecker = /*#__PURE__*/(() => {\n class InteractivityChecker {\n constructor(_platform) {\n this._platform = _platform;\n }\n /**\n * Gets whether an element is disabled.\n *\n * @param element Element to be checked.\n * @returns Whether the element is disabled.\n */\n isDisabled(element) {\n // This does not capture some cases, such as a non-form control with a disabled attribute or\n // a form control inside of a disabled form, but should capture the most common cases.\n return element.hasAttribute('disabled');\n }\n /**\n * Gets whether an element is visible for the purposes of interactivity.\n *\n * This will capture states like `display: none` and `visibility: hidden`, but not things like\n * being clipped by an `overflow: hidden` parent or being outside the viewport.\n *\n * @returns Whether the element is visible.\n */\n isVisible(element) {\n return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n }\n /**\n * Gets whether an element can be reached via Tab key.\n * Assumes that the element has already been checked with isFocusable.\n *\n * @param element Element to be checked.\n * @returns Whether the element is tabbable.\n */\n isTabbable(element) {\n // Nothing is tabbable on the server 😎\n if (!this._platform.isBrowser) {\n return false;\n }\n const frameElement = getFrameElement(getWindow(element));\n if (frameElement) {\n // Frame elements inherit their tabindex onto all child elements.\n if (getTabIndexValue(frameElement) === -1) {\n return false;\n }\n // Browsers disable tabbing to an element inside of an invisible frame.\n if (!this.isVisible(frameElement)) {\n return false;\n }\n }\n let nodeName = element.nodeName.toLowerCase();\n let tabIndexValue = getTabIndexValue(element);\n if (element.hasAttribute('contenteditable')) {\n return tabIndexValue !== -1;\n }\n if (nodeName === 'iframe' || nodeName === 'object') {\n // The frame or object's content may be tabbable depending on the content, but it's\n // not possibly to reliably detect the content of the frames. We always consider such\n // elements as non-tabbable.\n return false;\n }\n // In iOS, the browser only considers some specific elements as tabbable.\n if (this._platform.WEBKIT && this._platform.IOS && !isPotentiallyTabbableIOS(element)) {\n return false;\n }\n if (nodeName === 'audio') {\n // Audio elements without controls enabled are never tabbable, regardless\n // of the tabindex attribute explicitly being set.\n if (!element.hasAttribute('controls')) {\n return false;\n }\n // Audio elements with controls are by default tabbable unless the\n // tabindex attribute is set to `-1` explicitly.\n return tabIndexValue !== -1;\n }\n if (nodeName === 'video') {\n // For all video elements, if the tabindex attribute is set to `-1`, the video\n // is not tabbable. Note: We cannot rely on the default `HTMLElement.tabIndex`\n // property as that one is set to `-1` in Chrome, Edge and Safari v13.1. The\n // tabindex attribute is the source of truth here.\n if (tabIndexValue === -1) {\n return false;\n }\n // If the tabindex is explicitly set, and not `-1` (as per check before), the\n // video element is always tabbable (regardless of whether it has controls or not).\n if (tabIndexValue !== null) {\n return true;\n }\n // Otherwise (when no explicit tabindex is set), a video is only tabbable if it\n // has controls enabled. Firefox is special as videos are always tabbable regardless\n // of whether there are controls or not.\n return this._platform.FIREFOX || element.hasAttribute('controls');\n }\n return element.tabIndex >= 0;\n }\n /**\n * Gets whether an element can be focused by the user.\n *\n * @param element Element to be checked.\n * @param config The config object with options to customize this method's behavior\n * @returns Whether the element is focusable.\n */\n isFocusable(element, config) {\n // Perform checks in order of left to most expensive.\n // Again, naive approach that does not capture many edge cases and browser quirks.\n return isPotentiallyFocusable(element) && !this.isDisabled(element) && (config?.ignoreVisibility || this.isVisible(element));\n }\n static {\n this.ɵfac = function InteractivityChecker_Factory(t) {\n return new (t || InteractivityChecker)(i0.ɵɵinject(i1.Platform));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: InteractivityChecker,\n factory: InteractivityChecker.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return InteractivityChecker;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Returns the frame element from a window object. Since browsers like MS Edge throw errors if\n * the frameElement property is being accessed from a different host address, this property\n * should be accessed carefully.\n */\nfunction getFrameElement(window) {\n try {\n return window.frameElement;\n } catch {\n return null;\n }\n}\n/** Checks whether the specified element has any geometry / rectangles. */\nfunction hasGeometry(element) {\n // Use logic from jQuery to check for an invisible element.\n // See https://github.com/jquery/jquery/blob/master/src/css/hiddenVisibleSelectors.js#L12\n return !!(element.offsetWidth || element.offsetHeight || typeof element.getClientRects === 'function' && element.getClientRects().length);\n}\n/** Gets whether an element's */\nfunction isNativeFormElement(element) {\n let nodeName = element.nodeName.toLowerCase();\n return nodeName === 'input' || nodeName === 'select' || nodeName === 'button' || nodeName === 'textarea';\n}\n/** Gets whether an element is an ``. */\nfunction isHiddenInput(element) {\n return isInputElement(element) && element.type == 'hidden';\n}\n/** Gets whether an element is an anchor that has an href attribute. */\nfunction isAnchorWithHref(element) {\n return isAnchorElement(element) && element.hasAttribute('href');\n}\n/** Gets whether an element is an input element. */\nfunction isInputElement(element) {\n return element.nodeName.toLowerCase() == 'input';\n}\n/** Gets whether an element is an anchor element. */\nfunction isAnchorElement(element) {\n return element.nodeName.toLowerCase() == 'a';\n}\n/** Gets whether an element has a valid tabindex. */\nfunction hasValidTabIndex(element) {\n if (!element.hasAttribute('tabindex') || element.tabIndex === undefined) {\n return false;\n }\n let tabIndex = element.getAttribute('tabindex');\n return !!(tabIndex && !isNaN(parseInt(tabIndex, 10)));\n}\n/**\n * Returns the parsed tabindex from the element attributes instead of returning the\n * evaluated tabindex from the browsers defaults.\n */\nfunction getTabIndexValue(element) {\n if (!hasValidTabIndex(element)) {\n return null;\n }\n // See browser issue in Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054\n const tabIndex = parseInt(element.getAttribute('tabindex') || '', 10);\n return isNaN(tabIndex) ? -1 : tabIndex;\n}\n/** Checks whether the specified element is potentially tabbable on iOS */\nfunction isPotentiallyTabbableIOS(element) {\n let nodeName = element.nodeName.toLowerCase();\n let inputType = nodeName === 'input' && element.type;\n return inputType === 'text' || inputType === 'password' || nodeName === 'select' || nodeName === 'textarea';\n}\n/**\n * Gets whether an element is potentially focusable without taking current visible/disabled state\n * into account.\n */\nfunction isPotentiallyFocusable(element) {\n // Inputs are potentially focusable *unless* they're type=\"hidden\".\n if (isHiddenInput(element)) {\n return false;\n }\n return isNativeFormElement(element) || isAnchorWithHref(element) || element.hasAttribute('contenteditable') || hasValidTabIndex(element);\n}\n/** Gets the parent window of a DOM node with regards of being inside of an iframe. */\nfunction getWindow(node) {\n // ownerDocument is null if `node` itself *is* a document.\n return node.ownerDocument && node.ownerDocument.defaultView || window;\n}\n\n/**\n * Class that allows for trapping focus within a DOM element.\n *\n * This class currently uses a relatively simple approach to focus trapping.\n * It assumes that the tab order is the same as DOM order, which is not necessarily true.\n * Things like `tabIndex > 0`, flex `order`, and shadow roots can cause the two to be misaligned.\n *\n * @deprecated Use `ConfigurableFocusTrap` instead.\n * @breaking-change 11.0.0\n */\nclass FocusTrap {\n /** Whether the focus trap is active. */\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n this._enabled = value;\n if (this._startAnchor && this._endAnchor) {\n this._toggleAnchorTabIndex(value, this._startAnchor);\n this._toggleAnchorTabIndex(value, this._endAnchor);\n }\n }\n constructor(_element, _checker, _ngZone, _document, deferAnchors = false) {\n this._element = _element;\n this._checker = _checker;\n this._ngZone = _ngZone;\n this._document = _document;\n this._hasAttached = false;\n // Event listeners for the anchors. Need to be regular functions so that we can unbind them later.\n this.startAnchorListener = () => this.focusLastTabbableElement();\n this.endAnchorListener = () => this.focusFirstTabbableElement();\n this._enabled = true;\n if (!deferAnchors) {\n this.attachAnchors();\n }\n }\n /** Destroys the focus trap by cleaning up the anchors. */\n destroy() {\n const startAnchor = this._startAnchor;\n const endAnchor = this._endAnchor;\n if (startAnchor) {\n startAnchor.removeEventListener('focus', this.startAnchorListener);\n startAnchor.remove();\n }\n if (endAnchor) {\n endAnchor.removeEventListener('focus', this.endAnchorListener);\n endAnchor.remove();\n }\n this._startAnchor = this._endAnchor = null;\n this._hasAttached = false;\n }\n /**\n * Inserts the anchors into the DOM. This is usually done automatically\n * in the constructor, but can be deferred for cases like directives with `*ngIf`.\n * @returns Whether the focus trap managed to attach successfully. This may not be the case\n * if the target element isn't currently in the DOM.\n */\n attachAnchors() {\n // If we're not on the browser, there can be no focus to trap.\n if (this._hasAttached) {\n return true;\n }\n this._ngZone.runOutsideAngular(() => {\n if (!this._startAnchor) {\n this._startAnchor = this._createAnchor();\n this._startAnchor.addEventListener('focus', this.startAnchorListener);\n }\n if (!this._endAnchor) {\n this._endAnchor = this._createAnchor();\n this._endAnchor.addEventListener('focus', this.endAnchorListener);\n }\n });\n if (this._element.parentNode) {\n this._element.parentNode.insertBefore(this._startAnchor, this._element);\n this._element.parentNode.insertBefore(this._endAnchor, this._element.nextSibling);\n this._hasAttached = true;\n }\n return this._hasAttached;\n }\n /**\n * Waits for the zone to stabilize, then focuses the first tabbable element.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusInitialElementWhenReady(options) {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusInitialElement(options)));\n });\n }\n /**\n * Waits for the zone to stabilize, then focuses\n * the first tabbable element within the focus trap region.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusFirstTabbableElementWhenReady(options) {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusFirstTabbableElement(options)));\n });\n }\n /**\n * Waits for the zone to stabilize, then focuses\n * the last tabbable element within the focus trap region.\n * @returns Returns a promise that resolves with a boolean, depending\n * on whether focus was moved successfully.\n */\n focusLastTabbableElementWhenReady(options) {\n return new Promise(resolve => {\n this._executeOnStable(() => resolve(this.focusLastTabbableElement(options)));\n });\n }\n /**\n * Get the specified boundary element of the trapped region.\n * @param bound The boundary to get (start or end of trapped region).\n * @returns The boundary element.\n */\n _getRegionBoundary(bound) {\n // Contains the deprecated version of selector, for temporary backwards comparability.\n const markers = this._element.querySelectorAll(`[cdk-focus-region-${bound}], ` + `[cdkFocusRegion${bound}], ` + `[cdk-focus-${bound}]`);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n for (let i = 0; i < markers.length; i++) {\n // @breaking-change 8.0.0\n if (markers[i].hasAttribute(`cdk-focus-${bound}`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-${bound}', ` + `use 'cdkFocusRegion${bound}' instead. The deprecated ` + `attribute will be removed in 8.0.0.`, markers[i]);\n } else if (markers[i].hasAttribute(`cdk-focus-region-${bound}`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-region-${bound}', ` + `use 'cdkFocusRegion${bound}' instead. The deprecated attribute ` + `will be removed in 8.0.0.`, markers[i]);\n }\n }\n }\n if (bound == 'start') {\n return markers.length ? markers[0] : this._getFirstTabbableElement(this._element);\n }\n return markers.length ? markers[markers.length - 1] : this._getLastTabbableElement(this._element);\n }\n /**\n * Focuses the element that should be focused when the focus trap is initialized.\n * @returns Whether focus was moved successfully.\n */\n focusInitialElement(options) {\n // Contains the deprecated version of selector, for temporary backwards comparability.\n const redirectToElement = this._element.querySelector(`[cdk-focus-initial], ` + `[cdkFocusInitial]`);\n if (redirectToElement) {\n // @breaking-change 8.0.0\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && redirectToElement.hasAttribute(`cdk-focus-initial`)) {\n console.warn(`Found use of deprecated attribute 'cdk-focus-initial', ` + `use 'cdkFocusInitial' instead. The deprecated attribute ` + `will be removed in 8.0.0`, redirectToElement);\n }\n // Warn the consumer if the element they've pointed to\n // isn't focusable, when not in production mode.\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._checker.isFocusable(redirectToElement)) {\n console.warn(`Element matching '[cdkFocusInitial]' is not focusable.`, redirectToElement);\n }\n if (!this._checker.isFocusable(redirectToElement)) {\n const focusableChild = this._getFirstTabbableElement(redirectToElement);\n focusableChild?.focus(options);\n return !!focusableChild;\n }\n redirectToElement.focus(options);\n return true;\n }\n return this.focusFirstTabbableElement(options);\n }\n /**\n * Focuses the first tabbable element within the focus trap region.\n * @returns Whether focus was moved successfully.\n */\n focusFirstTabbableElement(options) {\n const redirectToElement = this._getRegionBoundary('start');\n if (redirectToElement) {\n redirectToElement.focus(options);\n }\n return !!redirectToElement;\n }\n /**\n * Focuses the last tabbable element within the focus trap region.\n * @returns Whether focus was moved successfully.\n */\n focusLastTabbableElement(options) {\n const redirectToElement = this._getRegionBoundary('end');\n if (redirectToElement) {\n redirectToElement.focus(options);\n }\n return !!redirectToElement;\n }\n /**\n * Checks whether the focus trap has successfully been attached.\n */\n hasAttached() {\n return this._hasAttached;\n }\n /** Get the first tabbable element from a DOM subtree (inclusive). */\n _getFirstTabbableElement(root) {\n if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n return root;\n }\n const children = root.children;\n for (let i = 0; i < children.length; i++) {\n const tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE ? this._getFirstTabbableElement(children[i]) : null;\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n return null;\n }\n /** Get the last tabbable element from a DOM subtree (inclusive). */\n _getLastTabbableElement(root) {\n if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n return root;\n }\n // Iterate in reverse DOM order.\n const children = root.children;\n for (let i = children.length - 1; i >= 0; i--) {\n const tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE ? this._getLastTabbableElement(children[i]) : null;\n if (tabbableChild) {\n return tabbableChild;\n }\n }\n return null;\n }\n /** Creates an anchor element. */\n _createAnchor() {\n const anchor = this._document.createElement('div');\n this._toggleAnchorTabIndex(this._enabled, anchor);\n anchor.classList.add('cdk-visually-hidden');\n anchor.classList.add('cdk-focus-trap-anchor');\n anchor.setAttribute('aria-hidden', 'true');\n return anchor;\n }\n /**\n * Toggles the `tabindex` of an anchor, based on the enabled state of the focus trap.\n * @param isEnabled Whether the focus trap is enabled.\n * @param anchor Anchor on which to toggle the tabindex.\n */\n _toggleAnchorTabIndex(isEnabled, anchor) {\n // Remove the tabindex completely, rather than setting it to -1, because if the\n // element has a tabindex, the user might still hit it when navigating with the arrow keys.\n isEnabled ? anchor.setAttribute('tabindex', '0') : anchor.removeAttribute('tabindex');\n }\n /**\n * Toggles the`tabindex` of both anchors to either trap Tab focus or allow it to escape.\n * @param enabled: Whether the anchors should trap Tab.\n */\n toggleAnchors(enabled) {\n if (this._startAnchor && this._endAnchor) {\n this._toggleAnchorTabIndex(enabled, this._startAnchor);\n this._toggleAnchorTabIndex(enabled, this._endAnchor);\n }\n }\n /** Executes a function when the zone is stable. */\n _executeOnStable(fn) {\n if (this._ngZone.isStable) {\n fn();\n } else {\n this._ngZone.onStable.pipe(take(1)).subscribe(fn);\n }\n }\n}\n/**\n * Factory that allows easy instantiation of focus traps.\n * @deprecated Use `ConfigurableFocusTrapFactory` instead.\n * @breaking-change 11.0.0\n */\nlet FocusTrapFactory = /*#__PURE__*/(() => {\n class FocusTrapFactory {\n constructor(_checker, _ngZone, _document) {\n this._checker = _checker;\n this._ngZone = _ngZone;\n this._document = _document;\n }\n /**\n * Creates a focus-trapped region around the given element.\n * @param element The element around which focus will be trapped.\n * @param deferCaptureElements Defers the creation of focus-capturing elements to be done\n * manually by the user.\n * @returns The created focus trap instance.\n */\n create(element, deferCaptureElements = false) {\n return new FocusTrap(element, this._checker, this._ngZone, this._document, deferCaptureElements);\n }\n static {\n this.ɵfac = function FocusTrapFactory_Factory(t) {\n return new (t || FocusTrapFactory)(i0.ɵɵinject(InteractivityChecker), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(DOCUMENT));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: FocusTrapFactory,\n factory: FocusTrapFactory.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return FocusTrapFactory;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** Directive for trapping focus within a region. */\nlet CdkTrapFocus = /*#__PURE__*/(() => {\n class CdkTrapFocus {\n /** Whether the focus trap is active. */\n get enabled() {\n return this.focusTrap.enabled;\n }\n set enabled(value) {\n this.focusTrap.enabled = value;\n }\n constructor(_elementRef, _focusTrapFactory,\n /**\n * @deprecated No longer being used. To be removed.\n * @breaking-change 13.0.0\n */\n _document) {\n this._elementRef = _elementRef;\n this._focusTrapFactory = _focusTrapFactory;\n /** Previously focused element to restore focus to upon destroy when using autoCapture. */\n this._previouslyFocusedElement = null;\n this.focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement, true);\n }\n ngOnDestroy() {\n this.focusTrap.destroy();\n // If we stored a previously focused element when using autoCapture, return focus to that\n // element now that the trapped region is being destroyed.\n if (this._previouslyFocusedElement) {\n this._previouslyFocusedElement.focus();\n this._previouslyFocusedElement = null;\n }\n }\n ngAfterContentInit() {\n this.focusTrap.attachAnchors();\n if (this.autoCapture) {\n this._captureFocus();\n }\n }\n ngDoCheck() {\n if (!this.focusTrap.hasAttached()) {\n this.focusTrap.attachAnchors();\n }\n }\n ngOnChanges(changes) {\n const autoCaptureChange = changes['autoCapture'];\n if (autoCaptureChange && !autoCaptureChange.firstChange && this.autoCapture && this.focusTrap.hasAttached()) {\n this._captureFocus();\n }\n }\n _captureFocus() {\n this._previouslyFocusedElement = _getFocusedElementPierceShadowDom();\n this.focusTrap.focusInitialElementWhenReady();\n }\n static {\n this.ɵfac = function CdkTrapFocus_Factory(t) {\n return new (t || CdkTrapFocus)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(FocusTrapFactory), i0.ɵɵdirectiveInject(DOCUMENT));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkTrapFocus,\n selectors: [[\"\", \"cdkTrapFocus\", \"\"]],\n inputs: {\n enabled: [\"cdkTrapFocus\", \"enabled\", booleanAttribute],\n autoCapture: [\"cdkTrapFocusAutoCapture\", \"autoCapture\", booleanAttribute]\n },\n exportAs: [\"cdkTrapFocus\"],\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return CdkTrapFocus;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Class that allows for trapping focus within a DOM element.\n *\n * This class uses a strategy pattern that determines how it traps focus.\n * See FocusTrapInertStrategy.\n */\nclass ConfigurableFocusTrap extends FocusTrap {\n /** Whether the FocusTrap is enabled. */\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n this._enabled = value;\n if (this._enabled) {\n this._focusTrapManager.register(this);\n } else {\n this._focusTrapManager.deregister(this);\n }\n }\n constructor(_element, _checker, _ngZone, _document, _focusTrapManager, _inertStrategy, config) {\n super(_element, _checker, _ngZone, _document, config.defer);\n this._focusTrapManager = _focusTrapManager;\n this._inertStrategy = _inertStrategy;\n this._focusTrapManager.register(this);\n }\n /** Notifies the FocusTrapManager that this FocusTrap will be destroyed. */\n destroy() {\n this._focusTrapManager.deregister(this);\n super.destroy();\n }\n /** @docs-private Implemented as part of ManagedFocusTrap. */\n _enable() {\n this._inertStrategy.preventFocus(this);\n this.toggleAnchors(true);\n }\n /** @docs-private Implemented as part of ManagedFocusTrap. */\n _disable() {\n this._inertStrategy.allowFocus(this);\n this.toggleAnchors(false);\n }\n}\n\n/** The injection token used to specify the inert strategy. */\nconst FOCUS_TRAP_INERT_STRATEGY = /*#__PURE__*/new InjectionToken('FOCUS_TRAP_INERT_STRATEGY');\n\n/**\n * Lightweight FocusTrapInertStrategy that adds a document focus event\n * listener to redirect focus back inside the FocusTrap.\n */\nclass EventListenerFocusTrapInertStrategy {\n constructor() {\n /** Focus event handler. */\n this._listener = null;\n }\n /** Adds a document event listener that keeps focus inside the FocusTrap. */\n preventFocus(focusTrap) {\n // Ensure there's only one listener per document\n if (this._listener) {\n focusTrap._document.removeEventListener('focus', this._listener, true);\n }\n this._listener = e => this._trapFocus(focusTrap, e);\n focusTrap._ngZone.runOutsideAngular(() => {\n focusTrap._document.addEventListener('focus', this._listener, true);\n });\n }\n /** Removes the event listener added in preventFocus. */\n allowFocus(focusTrap) {\n if (!this._listener) {\n return;\n }\n focusTrap._document.removeEventListener('focus', this._listener, true);\n this._listener = null;\n }\n /**\n * Refocuses the first element in the FocusTrap if the focus event target was outside\n * the FocusTrap.\n *\n * This is an event listener callback. The event listener is added in runOutsideAngular,\n * so all this code runs outside Angular as well.\n */\n _trapFocus(focusTrap, event) {\n const target = event.target;\n const focusTrapRoot = focusTrap._element;\n // Don't refocus if target was in an overlay, because the overlay might be associated\n // with an element inside the FocusTrap, ex. mat-select.\n if (target && !focusTrapRoot.contains(target) && !target.closest?.('div.cdk-overlay-pane')) {\n // Some legacy FocusTrap usages have logic that focuses some element on the page\n // just before FocusTrap is destroyed. For backwards compatibility, wait\n // to be sure FocusTrap is still enabled before refocusing.\n setTimeout(() => {\n // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n focusTrap.focusFirstTabbableElement();\n }\n });\n }\n }\n}\n\n/** Injectable that ensures only the most recently enabled FocusTrap is active. */\nlet FocusTrapManager = /*#__PURE__*/(() => {\n class FocusTrapManager {\n constructor() {\n // A stack of the FocusTraps on the page. Only the FocusTrap at the\n // top of the stack is active.\n this._focusTrapStack = [];\n }\n /**\n * Disables the FocusTrap at the top of the stack, and then pushes\n * the new FocusTrap onto the stack.\n */\n register(focusTrap) {\n // Dedupe focusTraps that register multiple times.\n this._focusTrapStack = this._focusTrapStack.filter(ft => ft !== focusTrap);\n let stack = this._focusTrapStack;\n if (stack.length) {\n stack[stack.length - 1]._disable();\n }\n stack.push(focusTrap);\n focusTrap._enable();\n }\n /**\n * Removes the FocusTrap from the stack, and activates the\n * FocusTrap that is the new top of the stack.\n */\n deregister(focusTrap) {\n focusTrap._disable();\n const stack = this._focusTrapStack;\n const i = stack.indexOf(focusTrap);\n if (i !== -1) {\n stack.splice(i, 1);\n if (stack.length) {\n stack[stack.length - 1]._enable();\n }\n }\n }\n static {\n this.ɵfac = function FocusTrapManager_Factory(t) {\n return new (t || FocusTrapManager)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: FocusTrapManager,\n factory: FocusTrapManager.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return FocusTrapManager;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Factory that allows easy instantiation of configurable focus traps. */\nlet ConfigurableFocusTrapFactory = /*#__PURE__*/(() => {\n class ConfigurableFocusTrapFactory {\n constructor(_checker, _ngZone, _focusTrapManager, _document, _inertStrategy) {\n this._checker = _checker;\n this._ngZone = _ngZone;\n this._focusTrapManager = _focusTrapManager;\n this._document = _document;\n // TODO split up the strategies into different modules, similar to DateAdapter.\n this._inertStrategy = _inertStrategy || new EventListenerFocusTrapInertStrategy();\n }\n create(element, config = {\n defer: false\n }) {\n let configObject;\n if (typeof config === 'boolean') {\n configObject = {\n defer: config\n };\n } else {\n configObject = config;\n }\n return new ConfigurableFocusTrap(element, this._checker, this._ngZone, this._document, this._focusTrapManager, this._inertStrategy, configObject);\n }\n static {\n this.ɵfac = function ConfigurableFocusTrapFactory_Factory(t) {\n return new (t || ConfigurableFocusTrapFactory)(i0.ɵɵinject(InteractivityChecker), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(FocusTrapManager), i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(FOCUS_TRAP_INERT_STRATEGY, 8));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ConfigurableFocusTrapFactory,\n factory: ConfigurableFocusTrapFactory.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return ConfigurableFocusTrapFactory;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Gets whether an event could be a faked `mousedown` event dispatched by a screen reader. */\nfunction isFakeMousedownFromScreenReader(event) {\n // Some screen readers will dispatch a fake `mousedown` event when pressing enter or space on\n // a clickable element. We can distinguish these events when `event.buttons` is zero, or\n // `event.detail` is zero depending on the browser:\n // - `event.buttons` works on Firefox, but fails on Chrome.\n // - `detail` works on Chrome, but fails on Firefox.\n return event.buttons === 0 || event.detail === 0;\n}\n/** Gets whether an event could be a faked `touchstart` event dispatched by a screen reader. */\nfunction isFakeTouchstartFromScreenReader(event) {\n const touch = event.touches && event.touches[0] || event.changedTouches && event.changedTouches[0];\n // A fake `touchstart` can be distinguished from a real one by looking at the `identifier`\n // which is typically >= 0 on a real device versus -1 from a screen reader. Just to be safe,\n // we can also look at `radiusX` and `radiusY`. This behavior was observed against a Windows 10\n // device with a touch screen running NVDA v2020.4 and Firefox 85 or Chrome 88.\n return !!touch && touch.identifier === -1 && (touch.radiusX == null || touch.radiusX === 1) && (touch.radiusY == null || touch.radiusY === 1);\n}\n\n/**\n * Injectable options for the InputModalityDetector. These are shallowly merged with the default\n * options.\n */\nconst INPUT_MODALITY_DETECTOR_OPTIONS = /*#__PURE__*/new InjectionToken('cdk-input-modality-detector-options');\n/**\n * Default options for the InputModalityDetector.\n *\n * Modifier keys are ignored by default (i.e. when pressed won't cause the service to detect\n * keyboard input modality) for two reasons:\n *\n * 1. Modifier keys are commonly used with mouse to perform actions such as 'right click' or 'open\n * in new tab', and are thus less representative of actual keyboard interaction.\n * 2. VoiceOver triggers some keyboard events when linearly navigating with Control + Option (but\n * confusingly not with Caps Lock). Thus, to have parity with other screen readers, we ignore\n * these keys so as to not update the input modality.\n *\n * Note that we do not by default ignore the right Meta key on Safari because it has the same key\n * code as the ContextMenu key on other browsers. When we switch to using event.key, we can\n * distinguish between the two.\n */\nconst INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS = {\n ignoreKeys: [ALT, CONTROL, MAC_META, META, SHIFT]\n};\n/**\n * The amount of time needed to pass after a touchstart event in order for a subsequent mousedown\n * event to be attributed as mouse and not touch.\n *\n * This is the value used by AngularJS Material. Through trial and error (on iPhone 6S) they found\n * that a value of around 650ms seems appropriate.\n */\nconst TOUCH_BUFFER_MS = 650;\n/**\n * Event listener options that enable capturing and also mark the listener as passive if the browser\n * supports it.\n */\nconst modalityEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: true,\n capture: true\n});\n/**\n * Service that detects the user's input modality.\n *\n * This service does not update the input modality when a user navigates with a screen reader\n * (e.g. linear navigation with VoiceOver, object navigation / browse mode with NVDA, virtual PC\n * cursor mode with JAWS). This is in part due to technical limitations (i.e. keyboard events do not\n * fire as expected in these modes) but is also arguably the correct behavior. Navigating with a\n * screen reader is akin to visually scanning a page, and should not be interpreted as actual user\n * input interaction.\n *\n * When a user is not navigating but *interacting* with a screen reader, this service attempts to\n * update the input modality to keyboard, but in general this service's behavior is largely\n * undefined.\n */\nlet InputModalityDetector = /*#__PURE__*/(() => {\n class InputModalityDetector {\n /** The most recently detected input modality. */\n get mostRecentModality() {\n return this._modality.value;\n }\n constructor(_platform, ngZone, document, options) {\n this._platform = _platform;\n /**\n * The most recently detected input modality event target. Is null if no input modality has been\n * detected or if the associated event target is null for some unknown reason.\n */\n this._mostRecentTarget = null;\n /** The underlying BehaviorSubject that emits whenever an input modality is detected. */\n this._modality = new BehaviorSubject(null);\n /**\n * The timestamp of the last touch input modality. Used to determine whether mousedown events\n * should be attributed to mouse or touch.\n */\n this._lastTouchMs = 0;\n /**\n * Handles keydown events. Must be an arrow function in order to preserve the context when it gets\n * bound.\n */\n this._onKeydown = event => {\n // If this is one of the keys we should ignore, then ignore it and don't update the input\n // modality to keyboard.\n if (this._options?.ignoreKeys?.some(keyCode => keyCode === event.keyCode)) {\n return;\n }\n this._modality.next('keyboard');\n this._mostRecentTarget = _getEventTarget(event);\n };\n /**\n * Handles mousedown events. Must be an arrow function in order to preserve the context when it\n * gets bound.\n */\n this._onMousedown = event => {\n // Touches trigger both touch and mouse events, so we need to distinguish between mouse events\n // that were triggered via mouse vs touch. To do so, check if the mouse event occurs closely\n // after the previous touch event.\n if (Date.now() - this._lastTouchMs < TOUCH_BUFFER_MS) {\n return;\n }\n // Fake mousedown events are fired by some screen readers when controls are activated by the\n // screen reader. Attribute them to keyboard input modality.\n this._modality.next(isFakeMousedownFromScreenReader(event) ? 'keyboard' : 'mouse');\n this._mostRecentTarget = _getEventTarget(event);\n };\n /**\n * Handles touchstart events. Must be an arrow function in order to preserve the context when it\n * gets bound.\n */\n this._onTouchstart = event => {\n // Same scenario as mentioned in _onMousedown, but on touch screen devices, fake touchstart\n // events are fired. Again, attribute to keyboard input modality.\n if (isFakeTouchstartFromScreenReader(event)) {\n this._modality.next('keyboard');\n return;\n }\n // Store the timestamp of this touch event, as it's used to distinguish between mouse events\n // triggered via mouse vs touch.\n this._lastTouchMs = Date.now();\n this._modality.next('touch');\n this._mostRecentTarget = _getEventTarget(event);\n };\n this._options = {\n ...INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS,\n ...options\n };\n // Skip the first emission as it's null.\n this.modalityDetected = this._modality.pipe(skip(1));\n this.modalityChanged = this.modalityDetected.pipe(distinctUntilChanged());\n // If we're not in a browser, this service should do nothing, as there's no relevant input\n // modality to detect.\n if (_platform.isBrowser) {\n ngZone.runOutsideAngular(() => {\n document.addEventListener('keydown', this._onKeydown, modalityEventListenerOptions);\n document.addEventListener('mousedown', this._onMousedown, modalityEventListenerOptions);\n document.addEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions);\n });\n }\n }\n ngOnDestroy() {\n this._modality.complete();\n if (this._platform.isBrowser) {\n document.removeEventListener('keydown', this._onKeydown, modalityEventListenerOptions);\n document.removeEventListener('mousedown', this._onMousedown, modalityEventListenerOptions);\n document.removeEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions);\n }\n }\n static {\n this.ɵfac = function InputModalityDetector_Factory(t) {\n return new (t || InputModalityDetector)(i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(INPUT_MODALITY_DETECTOR_OPTIONS, 8));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: InputModalityDetector,\n factory: InputModalityDetector.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return InputModalityDetector;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst LIVE_ANNOUNCER_ELEMENT_TOKEN = /*#__PURE__*/new InjectionToken('liveAnnouncerElement', {\n providedIn: 'root',\n factory: LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY\n});\n/** @docs-private */\nfunction LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY() {\n return null;\n}\n/** Injection token that can be used to configure the default options for the LiveAnnouncer. */\nconst LIVE_ANNOUNCER_DEFAULT_OPTIONS = /*#__PURE__*/new InjectionToken('LIVE_ANNOUNCER_DEFAULT_OPTIONS');\nlet uniqueIds = 0;\nlet LiveAnnouncer = /*#__PURE__*/(() => {\n class LiveAnnouncer {\n constructor(elementToken, _ngZone, _document, _defaultOptions) {\n this._ngZone = _ngZone;\n this._defaultOptions = _defaultOptions;\n // We inject the live element and document as `any` because the constructor signature cannot\n // reference browser globals (HTMLElement, Document) on non-browser environments, since having\n // a class decorator causes TypeScript to preserve the constructor signature types.\n this._document = _document;\n this._liveElement = elementToken || this._createLiveElement();\n }\n announce(message, ...args) {\n const defaultOptions = this._defaultOptions;\n let politeness;\n let duration;\n if (args.length === 1 && typeof args[0] === 'number') {\n duration = args[0];\n } else {\n [politeness, duration] = args;\n }\n this.clear();\n clearTimeout(this._previousTimeout);\n if (!politeness) {\n politeness = defaultOptions && defaultOptions.politeness ? defaultOptions.politeness : 'polite';\n }\n if (duration == null && defaultOptions) {\n duration = defaultOptions.duration;\n }\n // TODO: ensure changing the politeness works on all environments we support.\n this._liveElement.setAttribute('aria-live', politeness);\n if (this._liveElement.id) {\n this._exposeAnnouncerToModals(this._liveElement.id);\n }\n // This 100ms timeout is necessary for some browser + screen-reader combinations:\n // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout.\n // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a\n // second time without clearing and then using a non-zero delay.\n // (using JAWS 17 at time of this writing).\n return this._ngZone.runOutsideAngular(() => {\n if (!this._currentPromise) {\n this._currentPromise = new Promise(resolve => this._currentResolve = resolve);\n }\n clearTimeout(this._previousTimeout);\n this._previousTimeout = setTimeout(() => {\n this._liveElement.textContent = message;\n if (typeof duration === 'number') {\n this._previousTimeout = setTimeout(() => this.clear(), duration);\n }\n this._currentResolve();\n this._currentPromise = this._currentResolve = undefined;\n }, 100);\n return this._currentPromise;\n });\n }\n /**\n * Clears the current text from the announcer element. Can be used to prevent\n * screen readers from reading the text out again while the user is going\n * through the page landmarks.\n */\n clear() {\n if (this._liveElement) {\n this._liveElement.textContent = '';\n }\n }\n ngOnDestroy() {\n clearTimeout(this._previousTimeout);\n this._liveElement?.remove();\n this._liveElement = null;\n this._currentResolve?.();\n this._currentPromise = this._currentResolve = undefined;\n }\n _createLiveElement() {\n const elementClass = 'cdk-live-announcer-element';\n const previousElements = this._document.getElementsByClassName(elementClass);\n const liveEl = this._document.createElement('div');\n // Remove any old containers. This can happen when coming in from a server-side-rendered page.\n for (let i = 0; i < previousElements.length; i++) {\n previousElements[i].remove();\n }\n liveEl.classList.add(elementClass);\n liveEl.classList.add('cdk-visually-hidden');\n liveEl.setAttribute('aria-atomic', 'true');\n liveEl.setAttribute('aria-live', 'polite');\n liveEl.id = `cdk-live-announcer-${uniqueIds++}`;\n this._document.body.appendChild(liveEl);\n return liveEl;\n }\n /**\n * Some browsers won't expose the accessibility node of the live announcer element if there is an\n * `aria-modal` and the live announcer is outside of it. This method works around the issue by\n * pointing the `aria-owns` of all modals to the live announcer element.\n */\n _exposeAnnouncerToModals(id) {\n // TODO(http://github.com/angular/components/issues/26853): consider de-duplicating this with\n // the `SnakBarContainer` and other usages.\n //\n // Note that the selector here is limited to CDK overlays at the moment in order to reduce the\n // section of the DOM we need to look through. This should cover all the cases we support, but\n // the selector can be expanded if it turns out to be too narrow.\n const modals = this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal=\"true\"]');\n for (let i = 0; i < modals.length; i++) {\n const modal = modals[i];\n const ariaOwns = modal.getAttribute('aria-owns');\n if (!ariaOwns) {\n modal.setAttribute('aria-owns', id);\n } else if (ariaOwns.indexOf(id) === -1) {\n modal.setAttribute('aria-owns', ariaOwns + ' ' + id);\n }\n }\n }\n static {\n this.ɵfac = function LiveAnnouncer_Factory(t) {\n return new (t || LiveAnnouncer)(i0.ɵɵinject(LIVE_ANNOUNCER_ELEMENT_TOKEN, 8), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(LIVE_ANNOUNCER_DEFAULT_OPTIONS, 8));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: LiveAnnouncer,\n factory: LiveAnnouncer.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return LiveAnnouncer;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * A directive that works similarly to aria-live, but uses the LiveAnnouncer to ensure compatibility\n * with a wider range of browsers and screen readers.\n */\nlet CdkAriaLive = /*#__PURE__*/(() => {\n class CdkAriaLive {\n /** The aria-live politeness level to use when announcing messages. */\n get politeness() {\n return this._politeness;\n }\n set politeness(value) {\n this._politeness = value === 'off' || value === 'assertive' ? value : 'polite';\n if (this._politeness === 'off') {\n if (this._subscription) {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n } else if (!this._subscription) {\n this._subscription = this._ngZone.runOutsideAngular(() => {\n return this._contentObserver.observe(this._elementRef).subscribe(() => {\n // Note that we use textContent here, rather than innerText, in order to avoid a reflow.\n const elementText = this._elementRef.nativeElement.textContent;\n // The `MutationObserver` fires also for attribute\n // changes which we don't want to announce.\n if (elementText !== this._previousAnnouncedText) {\n this._liveAnnouncer.announce(elementText, this._politeness, this.duration);\n this._previousAnnouncedText = elementText;\n }\n });\n });\n }\n }\n constructor(_elementRef, _liveAnnouncer, _contentObserver, _ngZone) {\n this._elementRef = _elementRef;\n this._liveAnnouncer = _liveAnnouncer;\n this._contentObserver = _contentObserver;\n this._ngZone = _ngZone;\n this._politeness = 'polite';\n }\n ngOnDestroy() {\n if (this._subscription) {\n this._subscription.unsubscribe();\n }\n }\n static {\n this.ɵfac = function CdkAriaLive_Factory(t) {\n return new (t || CdkAriaLive)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(LiveAnnouncer), i0.ɵɵdirectiveInject(i1$1.ContentObserver), i0.ɵɵdirectiveInject(i0.NgZone));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkAriaLive,\n selectors: [[\"\", \"cdkAriaLive\", \"\"]],\n inputs: {\n politeness: [\"cdkAriaLive\", \"politeness\"],\n duration: [\"cdkAriaLiveDuration\", \"duration\"]\n },\n exportAs: [\"cdkAriaLive\"]\n });\n }\n }\n return CdkAriaLive;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** InjectionToken for FocusMonitorOptions. */\nconst FOCUS_MONITOR_DEFAULT_OPTIONS = /*#__PURE__*/new InjectionToken('cdk-focus-monitor-default-options');\n/**\n * Event listener options that enable capturing and also\n * mark the listener as passive if the browser supports it.\n */\nconst captureEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: true,\n capture: true\n});\n/** Monitors mouse and keyboard events to determine the cause of focus events. */\nlet FocusMonitor = /*#__PURE__*/(() => {\n class FocusMonitor {\n constructor(_ngZone, _platform, _inputModalityDetector, /** @breaking-change 11.0.0 make document required */\n document, options) {\n this._ngZone = _ngZone;\n this._platform = _platform;\n this._inputModalityDetector = _inputModalityDetector;\n /** The focus origin that the next focus event is a result of. */\n this._origin = null;\n /** Whether the window has just been focused. */\n this._windowFocused = false;\n /**\n * Whether the origin was determined via a touch interaction. Necessary as properly attributing\n * focus events to touch interactions requires special logic.\n */\n this._originFromTouchInteraction = false;\n /** Map of elements being monitored to their info. */\n this._elementInfo = new Map();\n /** The number of elements currently being monitored. */\n this._monitoredElementCount = 0;\n /**\n * Keeps track of the root nodes to which we've currently bound a focus/blur handler,\n * as well as the number of monitored elements that they contain. We have to treat focus/blur\n * handlers differently from the rest of the events, because the browser won't emit events\n * to the document when focus moves inside of a shadow root.\n */\n this._rootNodeFocusListenerCount = new Map();\n /**\n * Event listener for `focus` events on the window.\n * Needs to be an arrow function in order to preserve the context when it gets bound.\n */\n this._windowFocusListener = () => {\n // Make a note of when the window regains focus, so we can\n // restore the origin info for the focused element.\n this._windowFocused = true;\n this._windowFocusTimeoutId = window.setTimeout(() => this._windowFocused = false);\n };\n /** Subject for stopping our InputModalityDetector subscription. */\n this._stopInputModalityDetector = new Subject();\n /**\n * Event listener for `focus` and 'blur' events on the document.\n * Needs to be an arrow function in order to preserve the context when it gets bound.\n */\n this._rootNodeFocusAndBlurListener = event => {\n const target = _getEventTarget(event);\n // We need to walk up the ancestor chain in order to support `checkChildren`.\n for (let element = target; element; element = element.parentElement) {\n if (event.type === 'focus') {\n this._onFocus(event, element);\n } else {\n this._onBlur(event, element);\n }\n }\n };\n this._document = document;\n this._detectionMode = options?.detectionMode || 0 /* FocusMonitorDetectionMode.IMMEDIATE */;\n }\n\n monitor(element, checkChildren = false) {\n const nativeElement = coerceElement(element);\n // Do nothing if we're not on the browser platform or the passed in node isn't an element.\n if (!this._platform.isBrowser || nativeElement.nodeType !== 1) {\n // Note: we don't want the observable to emit at all so we don't pass any parameters.\n return of();\n }\n // If the element is inside the shadow DOM, we need to bind our focus/blur listeners to\n // the shadow root, rather than the `document`, because the browser won't emit focus events\n // to the `document`, if focus is moving within the same shadow root.\n const rootNode = _getShadowRoot(nativeElement) || this._getDocument();\n const cachedInfo = this._elementInfo.get(nativeElement);\n // Check if we're already monitoring this element.\n if (cachedInfo) {\n if (checkChildren) {\n // TODO(COMP-318): this can be problematic, because it'll turn all non-checkChildren\n // observers into ones that behave as if `checkChildren` was turned on. We need a more\n // robust solution.\n cachedInfo.checkChildren = true;\n }\n return cachedInfo.subject;\n }\n // Create monitored element info.\n const info = {\n checkChildren: checkChildren,\n subject: new Subject(),\n rootNode\n };\n this._elementInfo.set(nativeElement, info);\n this._registerGlobalListeners(info);\n return info.subject;\n }\n stopMonitoring(element) {\n const nativeElement = coerceElement(element);\n const elementInfo = this._elementInfo.get(nativeElement);\n if (elementInfo) {\n elementInfo.subject.complete();\n this._setClasses(nativeElement);\n this._elementInfo.delete(nativeElement);\n this._removeGlobalListeners(elementInfo);\n }\n }\n focusVia(element, origin, options) {\n const nativeElement = coerceElement(element);\n const focusedElement = this._getDocument().activeElement;\n // If the element is focused already, calling `focus` again won't trigger the event listener\n // which means that the focus classes won't be updated. If that's the case, update the classes\n // directly without waiting for an event.\n if (nativeElement === focusedElement) {\n this._getClosestElementsInfo(nativeElement).forEach(([currentElement, info]) => this._originChanged(currentElement, origin, info));\n } else {\n this._setOrigin(origin);\n // `focus` isn't available on the server\n if (typeof nativeElement.focus === 'function') {\n nativeElement.focus(options);\n }\n }\n }\n ngOnDestroy() {\n this._elementInfo.forEach((_info, element) => this.stopMonitoring(element));\n }\n /** Access injected document if available or fallback to global document reference */\n _getDocument() {\n return this._document || document;\n }\n /** Use defaultView of injected document if available or fallback to global window reference */\n _getWindow() {\n const doc = this._getDocument();\n return doc.defaultView || window;\n }\n _getFocusOrigin(focusEventTarget) {\n if (this._origin) {\n // If the origin was realized via a touch interaction, we need to perform additional checks\n // to determine whether the focus origin should be attributed to touch or program.\n if (this._originFromTouchInteraction) {\n return this._shouldBeAttributedToTouch(focusEventTarget) ? 'touch' : 'program';\n } else {\n return this._origin;\n }\n }\n // If the window has just regained focus, we can restore the most recent origin from before the\n // window blurred. Otherwise, we've reached the point where we can't identify the source of the\n // focus. This typically means one of two things happened:\n //\n // 1) The element was programmatically focused, or\n // 2) The element was focused via screen reader navigation (which generally doesn't fire\n // events).\n //\n // Because we can't distinguish between these two cases, we default to setting `program`.\n if (this._windowFocused && this._lastFocusOrigin) {\n return this._lastFocusOrigin;\n }\n // If the interaction is coming from an input label, we consider it a mouse interactions.\n // This is a special case where focus moves on `click`, rather than `mousedown` which breaks\n // our detection, because all our assumptions are for `mousedown`. We need to handle this\n // special case, because it's very common for checkboxes and radio buttons.\n if (focusEventTarget && this._isLastInteractionFromInputLabel(focusEventTarget)) {\n return 'mouse';\n }\n return 'program';\n }\n /**\n * Returns whether the focus event should be attributed to touch. Recall that in IMMEDIATE mode, a\n * touch origin isn't immediately reset at the next tick (see _setOrigin). This means that when we\n * handle a focus event following a touch interaction, we need to determine whether (1) the focus\n * event was directly caused by the touch interaction or (2) the focus event was caused by a\n * subsequent programmatic focus call triggered by the touch interaction.\n * @param focusEventTarget The target of the focus event under examination.\n */\n _shouldBeAttributedToTouch(focusEventTarget) {\n // Please note that this check is not perfect. Consider the following edge case:\n //\n //
\n //
\n //
\n //\n // Suppose there is a FocusMonitor in IMMEDIATE mode attached to #parent. When the user touches\n // #child, #parent is programmatically focused. This code will attribute the focus to touch\n // instead of program. This is a relatively minor edge-case that can be worked around by using\n // focusVia(parent, 'program') to focus #parent.\n return this._detectionMode === 1 /* FocusMonitorDetectionMode.EVENTUAL */ || !!focusEventTarget?.contains(this._inputModalityDetector._mostRecentTarget);\n }\n /**\n * Sets the focus classes on the element based on the given focus origin.\n * @param element The element to update the classes on.\n * @param origin The focus origin.\n */\n _setClasses(element, origin) {\n element.classList.toggle('cdk-focused', !!origin);\n element.classList.toggle('cdk-touch-focused', origin === 'touch');\n element.classList.toggle('cdk-keyboard-focused', origin === 'keyboard');\n element.classList.toggle('cdk-mouse-focused', origin === 'mouse');\n element.classList.toggle('cdk-program-focused', origin === 'program');\n }\n /**\n * Updates the focus origin. If we're using immediate detection mode, we schedule an async\n * function to clear the origin at the end of a timeout. The duration of the timeout depends on\n * the origin being set.\n * @param origin The origin to set.\n * @param isFromInteraction Whether we are setting the origin from an interaction event.\n */\n _setOrigin(origin, isFromInteraction = false) {\n this._ngZone.runOutsideAngular(() => {\n this._origin = origin;\n this._originFromTouchInteraction = origin === 'touch' && isFromInteraction;\n // If we're in IMMEDIATE mode, reset the origin at the next tick (or in `TOUCH_BUFFER_MS` ms\n // for a touch event). We reset the origin at the next tick because Firefox focuses one tick\n // after the interaction event. We wait `TOUCH_BUFFER_MS` ms before resetting the origin for\n // a touch event because when a touch event is fired, the associated focus event isn't yet in\n // the event queue. Before doing so, clear any pending timeouts.\n if (this._detectionMode === 0 /* FocusMonitorDetectionMode.IMMEDIATE */) {\n clearTimeout(this._originTimeoutId);\n const ms = this._originFromTouchInteraction ? TOUCH_BUFFER_MS : 1;\n this._originTimeoutId = setTimeout(() => this._origin = null, ms);\n }\n });\n }\n /**\n * Handles focus events on a registered element.\n * @param event The focus event.\n * @param element The monitored element.\n */\n _onFocus(event, element) {\n // NOTE(mmalerba): We currently set the classes based on the focus origin of the most recent\n // focus event affecting the monitored element. If we want to use the origin of the first event\n // instead we should check for the cdk-focused class here and return if the element already has\n // it. (This only matters for elements that have includesChildren = true).\n // If we are not counting child-element-focus as focused, make sure that the event target is the\n // monitored element itself.\n const elementInfo = this._elementInfo.get(element);\n const focusEventTarget = _getEventTarget(event);\n if (!elementInfo || !elementInfo.checkChildren && element !== focusEventTarget) {\n return;\n }\n this._originChanged(element, this._getFocusOrigin(focusEventTarget), elementInfo);\n }\n /**\n * Handles blur events on a registered element.\n * @param event The blur event.\n * @param element The monitored element.\n */\n _onBlur(event, element) {\n // If we are counting child-element-focus as focused, make sure that we aren't just blurring in\n // order to focus another child of the monitored element.\n const elementInfo = this._elementInfo.get(element);\n if (!elementInfo || elementInfo.checkChildren && event.relatedTarget instanceof Node && element.contains(event.relatedTarget)) {\n return;\n }\n this._setClasses(element);\n this._emitOrigin(elementInfo, null);\n }\n _emitOrigin(info, origin) {\n if (info.subject.observers.length) {\n this._ngZone.run(() => info.subject.next(origin));\n }\n }\n _registerGlobalListeners(elementInfo) {\n if (!this._platform.isBrowser) {\n return;\n }\n const rootNode = elementInfo.rootNode;\n const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode) || 0;\n if (!rootNodeFocusListeners) {\n this._ngZone.runOutsideAngular(() => {\n rootNode.addEventListener('focus', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n rootNode.addEventListener('blur', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n });\n }\n this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners + 1);\n // Register global listeners when first element is monitored.\n if (++this._monitoredElementCount === 1) {\n // Note: we listen to events in the capture phase so we\n // can detect them even if the user stops propagation.\n this._ngZone.runOutsideAngular(() => {\n const window = this._getWindow();\n window.addEventListener('focus', this._windowFocusListener);\n });\n // The InputModalityDetector is also just a collection of global listeners.\n this._inputModalityDetector.modalityDetected.pipe(takeUntil(this._stopInputModalityDetector)).subscribe(modality => {\n this._setOrigin(modality, true /* isFromInteraction */);\n });\n }\n }\n\n _removeGlobalListeners(elementInfo) {\n const rootNode = elementInfo.rootNode;\n if (this._rootNodeFocusListenerCount.has(rootNode)) {\n const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode);\n if (rootNodeFocusListeners > 1) {\n this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners - 1);\n } else {\n rootNode.removeEventListener('focus', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n rootNode.removeEventListener('blur', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n this._rootNodeFocusListenerCount.delete(rootNode);\n }\n }\n // Unregister global listeners when last element is unmonitored.\n if (! --this._monitoredElementCount) {\n const window = this._getWindow();\n window.removeEventListener('focus', this._windowFocusListener);\n // Equivalently, stop our InputModalityDetector subscription.\n this._stopInputModalityDetector.next();\n // Clear timeouts for all potentially pending timeouts to prevent the leaks.\n clearTimeout(this._windowFocusTimeoutId);\n clearTimeout(this._originTimeoutId);\n }\n }\n /** Updates all the state on an element once its focus origin has changed. */\n _originChanged(element, origin, elementInfo) {\n this._setClasses(element, origin);\n this._emitOrigin(elementInfo, origin);\n this._lastFocusOrigin = origin;\n }\n /**\n * Collects the `MonitoredElementInfo` of a particular element and\n * all of its ancestors that have enabled `checkChildren`.\n * @param element Element from which to start the search.\n */\n _getClosestElementsInfo(element) {\n const results = [];\n this._elementInfo.forEach((info, currentElement) => {\n if (currentElement === element || info.checkChildren && currentElement.contains(element)) {\n results.push([currentElement, info]);\n }\n });\n return results;\n }\n /**\n * Returns whether an interaction is likely to have come from the user clicking the `label` of\n * an `input` or `textarea` in order to focus it.\n * @param focusEventTarget Target currently receiving focus.\n */\n _isLastInteractionFromInputLabel(focusEventTarget) {\n const {\n _mostRecentTarget: mostRecentTarget,\n mostRecentModality\n } = this._inputModalityDetector;\n // If the last interaction used the mouse on an element contained by one of the labels\n // of an `input`/`textarea` that is currently focused, it is very likely that the\n // user redirected focus using the label.\n if (mostRecentModality !== 'mouse' || !mostRecentTarget || mostRecentTarget === focusEventTarget || focusEventTarget.nodeName !== 'INPUT' && focusEventTarget.nodeName !== 'TEXTAREA' || focusEventTarget.disabled) {\n return false;\n }\n const labels = focusEventTarget.labels;\n if (labels) {\n for (let i = 0; i < labels.length; i++) {\n if (labels[i].contains(mostRecentTarget)) {\n return true;\n }\n }\n }\n return false;\n }\n static {\n this.ɵfac = function FocusMonitor_Factory(t) {\n return new (t || FocusMonitor)(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.Platform), i0.ɵɵinject(InputModalityDetector), i0.ɵɵinject(DOCUMENT, 8), i0.ɵɵinject(FOCUS_MONITOR_DEFAULT_OPTIONS, 8));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: FocusMonitor,\n factory: FocusMonitor.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return FocusMonitor;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Directive that determines how a particular element was focused (via keyboard, mouse, touch, or\n * programmatically) and adds corresponding classes to the element.\n *\n * There are two variants of this directive:\n * 1) cdkMonitorElementFocus: does not consider an element to be focused if one of its children is\n * focused.\n * 2) cdkMonitorSubtreeFocus: considers an element focused if it or any of its children are focused.\n */\nlet CdkMonitorFocus = /*#__PURE__*/(() => {\n class CdkMonitorFocus {\n constructor(_elementRef, _focusMonitor) {\n this._elementRef = _elementRef;\n this._focusMonitor = _focusMonitor;\n this._focusOrigin = null;\n this.cdkFocusChange = new EventEmitter();\n }\n get focusOrigin() {\n return this._focusOrigin;\n }\n ngAfterViewInit() {\n const element = this._elementRef.nativeElement;\n this._monitorSubscription = this._focusMonitor.monitor(element, element.nodeType === 1 && element.hasAttribute('cdkMonitorSubtreeFocus')).subscribe(origin => {\n this._focusOrigin = origin;\n this.cdkFocusChange.emit(origin);\n });\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n if (this._monitorSubscription) {\n this._monitorSubscription.unsubscribe();\n }\n }\n static {\n this.ɵfac = function CdkMonitorFocus_Factory(t) {\n return new (t || CdkMonitorFocus)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(FocusMonitor));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkMonitorFocus,\n selectors: [[\"\", \"cdkMonitorElementFocus\", \"\"], [\"\", \"cdkMonitorSubtreeFocus\", \"\"]],\n outputs: {\n cdkFocusChange: \"cdkFocusChange\"\n },\n exportAs: [\"cdkMonitorFocus\"]\n });\n }\n }\n return CdkMonitorFocus;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** CSS class applied to the document body when in black-on-white high-contrast mode. */\nconst BLACK_ON_WHITE_CSS_CLASS = 'cdk-high-contrast-black-on-white';\n/** CSS class applied to the document body when in white-on-black high-contrast mode. */\nconst WHITE_ON_BLACK_CSS_CLASS = 'cdk-high-contrast-white-on-black';\n/** CSS class applied to the document body when in high-contrast mode. */\nconst HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS = 'cdk-high-contrast-active';\n/**\n * Service to determine whether the browser is currently in a high-contrast-mode environment.\n *\n * Microsoft Windows supports an accessibility feature called \"High Contrast Mode\". This mode\n * changes the appearance of all applications, including web applications, to dramatically increase\n * contrast.\n *\n * IE, Edge, and Firefox currently support this mode. Chrome does not support Windows High Contrast\n * Mode. This service does not detect high-contrast mode as added by the Chrome \"High Contrast\"\n * browser extension.\n */\nlet HighContrastModeDetector = /*#__PURE__*/(() => {\n class HighContrastModeDetector {\n constructor(_platform, document) {\n this._platform = _platform;\n this._document = document;\n this._breakpointSubscription = inject(BreakpointObserver).observe('(forced-colors: active)').subscribe(() => {\n if (this._hasCheckedHighContrastMode) {\n this._hasCheckedHighContrastMode = false;\n this._applyBodyHighContrastModeCssClasses();\n }\n });\n }\n /** Gets the current high-contrast-mode for the page. */\n getHighContrastMode() {\n if (!this._platform.isBrowser) {\n return 0 /* HighContrastMode.NONE */;\n }\n // Create a test element with an arbitrary background-color that is neither black nor\n // white; high-contrast mode will coerce the color to either black or white. Also ensure that\n // appending the test element to the DOM does not affect layout by absolutely positioning it\n const testElement = this._document.createElement('div');\n testElement.style.backgroundColor = 'rgb(1,2,3)';\n testElement.style.position = 'absolute';\n this._document.body.appendChild(testElement);\n // Get the computed style for the background color, collapsing spaces to normalize between\n // browsers. Once we get this color, we no longer need the test element. Access the `window`\n // via the document so we can fake it in tests. Note that we have extra null checks, because\n // this logic will likely run during app bootstrap and throwing can break the entire app.\n const documentWindow = this._document.defaultView || window;\n const computedStyle = documentWindow && documentWindow.getComputedStyle ? documentWindow.getComputedStyle(testElement) : null;\n const computedColor = (computedStyle && computedStyle.backgroundColor || '').replace(/ /g, '');\n testElement.remove();\n switch (computedColor) {\n // Pre Windows 11 dark theme.\n case 'rgb(0,0,0)':\n // Windows 11 dark themes.\n case 'rgb(45,50,54)':\n case 'rgb(32,32,32)':\n return 2 /* HighContrastMode.WHITE_ON_BLACK */;\n // Pre Windows 11 light theme.\n case 'rgb(255,255,255)':\n // Windows 11 light theme.\n case 'rgb(255,250,239)':\n return 1 /* HighContrastMode.BLACK_ON_WHITE */;\n }\n\n return 0 /* HighContrastMode.NONE */;\n }\n\n ngOnDestroy() {\n this._breakpointSubscription.unsubscribe();\n }\n /** Applies CSS classes indicating high-contrast mode to document body (browser-only). */\n _applyBodyHighContrastModeCssClasses() {\n if (!this._hasCheckedHighContrastMode && this._platform.isBrowser && this._document.body) {\n const bodyClasses = this._document.body.classList;\n bodyClasses.remove(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, BLACK_ON_WHITE_CSS_CLASS, WHITE_ON_BLACK_CSS_CLASS);\n this._hasCheckedHighContrastMode = true;\n const mode = this.getHighContrastMode();\n if (mode === 1 /* HighContrastMode.BLACK_ON_WHITE */) {\n bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, BLACK_ON_WHITE_CSS_CLASS);\n } else if (mode === 2 /* HighContrastMode.WHITE_ON_BLACK */) {\n bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, WHITE_ON_BLACK_CSS_CLASS);\n }\n }\n }\n static {\n this.ɵfac = function HighContrastModeDetector_Factory(t) {\n return new (t || HighContrastModeDetector)(i0.ɵɵinject(i1.Platform), i0.ɵɵinject(DOCUMENT));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: HighContrastModeDetector,\n factory: HighContrastModeDetector.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return HighContrastModeDetector;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet A11yModule = /*#__PURE__*/(() => {\n class A11yModule {\n constructor(highContrastModeDetector) {\n highContrastModeDetector._applyBodyHighContrastModeCssClasses();\n }\n static {\n this.ɵfac = function A11yModule_Factory(t) {\n return new (t || A11yModule)(i0.ɵɵinject(HighContrastModeDetector));\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: A11yModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [ObserversModule]\n });\n }\n }\n return A11yModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { A11yModule, ActiveDescendantKeyManager, AriaDescriber, CDK_DESCRIBEDBY_HOST_ATTRIBUTE, CDK_DESCRIBEDBY_ID_PREFIX, CdkAriaLive, CdkMonitorFocus, CdkTrapFocus, ConfigurableFocusTrap, ConfigurableFocusTrapFactory, EventListenerFocusTrapInertStrategy, FOCUS_MONITOR_DEFAULT_OPTIONS, FOCUS_TRAP_INERT_STRATEGY, FocusKeyManager, FocusMonitor, FocusTrap, FocusTrapFactory, HighContrastModeDetector, INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS, INPUT_MODALITY_DETECTOR_OPTIONS, InputModalityDetector, InteractivityChecker, IsFocusableConfig, LIVE_ANNOUNCER_DEFAULT_OPTIONS, LIVE_ANNOUNCER_ELEMENT_TOKEN, LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY, ListKeyManager, LiveAnnouncer, MESSAGES_CONTAINER_ID, addAriaReferencedId, getAriaReferenceIds, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, removeAriaReferencedId };\n","import * as i0 from '@angular/core';\nimport { Injectable, Inject, InjectionToken, booleanAttribute, Directive, Optional, SkipSelf, Input, EventEmitter, Self, ContentChildren, ContentChild, Output, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport * as i1 from '@angular/cdk/scrolling';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport { _getEventTarget, normalizePassiveListenerOptions, _getShadowRoot } from '@angular/cdk/platform';\nimport { coerceElement, coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';\nimport { isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';\nimport { Subject, Subscription, interval, animationFrameScheduler, Observable, merge } from 'rxjs';\nimport { takeUntil, map, take, startWith, tap, switchMap } from 'rxjs/operators';\nimport * as i1$1 from '@angular/cdk/bidi';\n\n/**\n * Shallow-extends a stylesheet object with another stylesheet-like object.\n * Note that the keys in `source` have to be dash-cased.\n * @docs-private\n */\nfunction extendStyles(dest, source, importantProperties) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n const value = source[key];\n if (value) {\n dest.setProperty(key, value, importantProperties?.has(key) ? 'important' : '');\n } else {\n dest.removeProperty(key);\n }\n }\n }\n return dest;\n}\n/**\n * Toggles whether the native drag interactions should be enabled for an element.\n * @param element Element on which to toggle the drag interactions.\n * @param enable Whether the drag interactions should be enabled.\n * @docs-private\n */\nfunction toggleNativeDragInteractions(element, enable) {\n const userSelect = enable ? '' : 'none';\n extendStyles(element.style, {\n 'touch-action': enable ? '' : 'none',\n '-webkit-user-drag': enable ? '' : 'none',\n '-webkit-tap-highlight-color': enable ? '' : 'transparent',\n 'user-select': userSelect,\n '-ms-user-select': userSelect,\n '-webkit-user-select': userSelect,\n '-moz-user-select': userSelect\n });\n}\n/**\n * Toggles whether an element is visible while preserving its dimensions.\n * @param element Element whose visibility to toggle\n * @param enable Whether the element should be visible.\n * @param importantProperties Properties to be set as `!important`.\n * @docs-private\n */\nfunction toggleVisibility(element, enable, importantProperties) {\n extendStyles(element.style, {\n position: enable ? '' : 'fixed',\n top: enable ? '' : '0',\n opacity: enable ? '' : '0',\n left: enable ? '' : '-999em'\n }, importantProperties);\n}\n/**\n * Combines a transform string with an optional other transform\n * that exited before the base transform was applied.\n */\nfunction combineTransforms(transform, initialTransform) {\n return initialTransform && initialTransform != 'none' ? transform + ' ' + initialTransform : transform;\n}\n\n/** Parses a CSS time value to milliseconds. */\nfunction parseCssTimeUnitsToMs(value) {\n // Some browsers will return it in seconds, whereas others will return milliseconds.\n const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n return parseFloat(value) * multiplier;\n}\n/** Gets the transform transition duration, including the delay, of an element in milliseconds. */\nfunction getTransformTransitionDurationInMs(element) {\n const computedStyle = getComputedStyle(element);\n const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');\n // If there's no transition for `all` or `transform`, we shouldn't do anything.\n if (!property) {\n return 0;\n }\n // Get the index of the property that we're interested in and match\n // it up to the same index in `transition-delay` and `transition-duration`.\n const propertyIndex = transitionedProperties.indexOf(property);\n const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n return parseCssTimeUnitsToMs(rawDurations[propertyIndex]) + parseCssTimeUnitsToMs(rawDelays[propertyIndex]);\n}\n/** Parses out multiple values from a computed style into an array. */\nfunction parseCssPropertyValue(computedStyle, name) {\n const value = computedStyle.getPropertyValue(name);\n return value.split(',').map(part => part.trim());\n}\n\n/** Gets a mutable version of an element's bounding `ClientRect`. */\nfunction getMutableClientRect(element) {\n const clientRect = element.getBoundingClientRect();\n // We need to clone the `clientRect` here, because all the values on it are readonly\n // and we need to be able to update them. Also we can't use a spread here, because\n // the values on a `ClientRect` aren't own properties. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n return {\n top: clientRect.top,\n right: clientRect.right,\n bottom: clientRect.bottom,\n left: clientRect.left,\n width: clientRect.width,\n height: clientRect.height,\n x: clientRect.x,\n y: clientRect.y\n };\n}\n/**\n * Checks whether some coordinates are within a `ClientRect`.\n * @param clientRect ClientRect that is being checked.\n * @param x Coordinates along the X axis.\n * @param y Coordinates along the Y axis.\n */\nfunction isInsideClientRect(clientRect, x, y) {\n const {\n top,\n bottom,\n left,\n right\n } = clientRect;\n return y >= top && y <= bottom && x >= left && x <= right;\n}\n/**\n * Updates the top/left positions of a `ClientRect`, as well as their bottom/right counterparts.\n * @param clientRect `ClientRect` that should be updated.\n * @param top Amount to add to the `top` position.\n * @param left Amount to add to the `left` position.\n */\nfunction adjustClientRect(clientRect, top, left) {\n clientRect.top += top;\n clientRect.bottom = clientRect.top + clientRect.height;\n clientRect.left += left;\n clientRect.right = clientRect.left + clientRect.width;\n}\n/**\n * Checks whether the pointer coordinates are close to a ClientRect.\n * @param rect ClientRect to check against.\n * @param threshold Threshold around the ClientRect.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\nfunction isPointerNearClientRect(rect, threshold, pointerX, pointerY) {\n const {\n top,\n right,\n bottom,\n left,\n width,\n height\n } = rect;\n const xThreshold = width * threshold;\n const yThreshold = height * threshold;\n return pointerY > top - yThreshold && pointerY < bottom + yThreshold && pointerX > left - xThreshold && pointerX < right + xThreshold;\n}\n\n/** Keeps track of the scroll position and dimensions of the parents of an element. */\nclass ParentPositionTracker {\n constructor(_document) {\n this._document = _document;\n /** Cached positions of the scrollable parent elements. */\n this.positions = new Map();\n }\n /** Clears the cached positions. */\n clear() {\n this.positions.clear();\n }\n /** Caches the positions. Should be called at the beginning of a drag sequence. */\n cache(elements) {\n this.clear();\n this.positions.set(this._document, {\n scrollPosition: this.getViewportScrollPosition()\n });\n elements.forEach(element => {\n this.positions.set(element, {\n scrollPosition: {\n top: element.scrollTop,\n left: element.scrollLeft\n },\n clientRect: getMutableClientRect(element)\n });\n });\n }\n /** Handles scrolling while a drag is taking place. */\n handleScroll(event) {\n const target = _getEventTarget(event);\n const cachedPosition = this.positions.get(target);\n if (!cachedPosition) {\n return null;\n }\n const scrollPosition = cachedPosition.scrollPosition;\n let newTop;\n let newLeft;\n if (target === this._document) {\n const viewportScrollPosition = this.getViewportScrollPosition();\n newTop = viewportScrollPosition.top;\n newLeft = viewportScrollPosition.left;\n } else {\n newTop = target.scrollTop;\n newLeft = target.scrollLeft;\n }\n const topDifference = scrollPosition.top - newTop;\n const leftDifference = scrollPosition.left - newLeft;\n // Go through and update the cached positions of the scroll\n // parents that are inside the element that was scrolled.\n this.positions.forEach((position, node) => {\n if (position.clientRect && target !== node && target.contains(node)) {\n adjustClientRect(position.clientRect, topDifference, leftDifference);\n }\n });\n scrollPosition.top = newTop;\n scrollPosition.left = newLeft;\n return {\n top: topDifference,\n left: leftDifference\n };\n }\n /**\n * Gets the scroll position of the viewport. Note that we use the scrollX and scrollY directly,\n * instead of going through the `ViewportRuler`, because the first value the ruler looks at is\n * the top/left offset of the `document.documentElement` which works for most cases, but breaks\n * if the element is offset by something like the `BlockScrollStrategy`.\n */\n getViewportScrollPosition() {\n return {\n top: window.scrollY,\n left: window.scrollX\n };\n }\n}\n\n/** Creates a deep clone of an element. */\nfunction deepCloneNode(node) {\n const clone = node.cloneNode(true);\n const descendantsWithId = clone.querySelectorAll('[id]');\n const nodeName = node.nodeName.toLowerCase();\n // Remove the `id` to avoid having multiple elements with the same id on the page.\n clone.removeAttribute('id');\n for (let i = 0; i < descendantsWithId.length; i++) {\n descendantsWithId[i].removeAttribute('id');\n }\n if (nodeName === 'canvas') {\n transferCanvasData(node, clone);\n } else if (nodeName === 'input' || nodeName === 'select' || nodeName === 'textarea') {\n transferInputData(node, clone);\n }\n transferData('canvas', node, clone, transferCanvasData);\n transferData('input, textarea, select', node, clone, transferInputData);\n return clone;\n}\n/** Matches elements between an element and its clone and allows for their data to be cloned. */\nfunction transferData(selector, node, clone, callback) {\n const descendantElements = node.querySelectorAll(selector);\n if (descendantElements.length) {\n const cloneElements = clone.querySelectorAll(selector);\n for (let i = 0; i < descendantElements.length; i++) {\n callback(descendantElements[i], cloneElements[i]);\n }\n }\n}\n// Counter for unique cloned radio button names.\nlet cloneUniqueId = 0;\n/** Transfers the data of one input element to another. */\nfunction transferInputData(source, clone) {\n // Browsers throw an error when assigning the value of a file input programmatically.\n if (clone.type !== 'file') {\n clone.value = source.value;\n }\n // Radio button `name` attributes must be unique for radio button groups\n // otherwise original radio buttons can lose their checked state\n // once the clone is inserted in the DOM.\n if (clone.type === 'radio' && clone.name) {\n clone.name = `mat-clone-${clone.name}-${cloneUniqueId++}`;\n }\n}\n/** Transfers the data of one canvas element to another. */\nfunction transferCanvasData(source, clone) {\n const context = clone.getContext('2d');\n if (context) {\n // In some cases `drawImage` can throw (e.g. if the canvas size is 0x0).\n // We can't do much about it so just ignore the error.\n try {\n context.drawImage(source, 0, 0);\n } catch {}\n }\n}\n\n/** Options that can be used to bind a passive event listener. */\nconst passiveEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: true\n});\n/** Options that can be used to bind an active event listener. */\nconst activeEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: false\n});\n/**\n * Time in milliseconds for which to ignore mouse events, after\n * receiving a touch event. Used to avoid doing double work for\n * touch devices where the browser fires fake mouse events, in\n * addition to touch events.\n */\nconst MOUSE_EVENT_IGNORE_TIME = 800;\n/** Inline styles to be set as `!important` while dragging. */\nconst dragImportantProperties = /*#__PURE__*/new Set([\n// Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.\n'position']);\n/**\n * Reference to a draggable item. Used to manipulate or dispose of the item.\n */\nclass DragRef {\n /** Whether starting to drag this element is disabled. */\n get disabled() {\n return this._disabled || !!(this._dropContainer && this._dropContainer.disabled);\n }\n set disabled(value) {\n if (value !== this._disabled) {\n this._disabled = value;\n this._toggleNativeDragInteractions();\n this._handles.forEach(handle => toggleNativeDragInteractions(handle, value));\n }\n }\n constructor(element, _config, _document, _ngZone, _viewportRuler, _dragDropRegistry) {\n this._config = _config;\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n /**\n * CSS `transform` applied to the element when it isn't being dragged. We need a\n * passive transform in order for the dragged element to retain its new position\n * after the user has stopped dragging and because we need to know the relative\n * position in case they start dragging again. This corresponds to `element.style.transform`.\n */\n this._passiveTransform = {\n x: 0,\n y: 0\n };\n /** CSS `transform` that is applied to the element while it's being dragged. */\n this._activeTransform = {\n x: 0,\n y: 0\n };\n /**\n * Whether the dragging sequence has been started. Doesn't\n * necessarily mean that the element has been moved.\n */\n this._hasStartedDragging = false;\n /** Emits when the item is being moved. */\n this._moveEvents = new Subject();\n /** Subscription to pointer movement events. */\n this._pointerMoveSubscription = Subscription.EMPTY;\n /** Subscription to the event that is dispatched when the user lifts their pointer. */\n this._pointerUpSubscription = Subscription.EMPTY;\n /** Subscription to the viewport being scrolled. */\n this._scrollSubscription = Subscription.EMPTY;\n /** Subscription to the viewport being resized. */\n this._resizeSubscription = Subscription.EMPTY;\n /** Cached reference to the boundary element. */\n this._boundaryElement = null;\n /** Whether the native dragging interactions have been enabled on the root element. */\n this._nativeInteractionsEnabled = true;\n /** Elements that can be used to drag the draggable item. */\n this._handles = [];\n /** Registered handles that are currently disabled. */\n this._disabledHandles = new Set();\n /** Layout direction of the item. */\n this._direction = 'ltr';\n /**\n * Amount of milliseconds to wait after the user has put their\n * pointer down before starting to drag the element.\n */\n this.dragStartDelay = 0;\n this._disabled = false;\n /** Emits as the drag sequence is being prepared. */\n this.beforeStarted = new Subject();\n /** Emits when the user starts dragging the item. */\n this.started = new Subject();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new Subject();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new Subject();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new Subject();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new Subject();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new Subject();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = this._moveEvents;\n /** Handler for the `mousedown`/`touchstart` events. */\n this._pointerDown = event => {\n this.beforeStarted.next();\n // Delegate the event based on whether it started from a handle or the element itself.\n if (this._handles.length) {\n const targetHandle = this._getTargetHandle(event);\n if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n this._initializeDragSequence(targetHandle, event);\n }\n } else if (!this.disabled) {\n this._initializeDragSequence(this._rootElement, event);\n }\n };\n /** Handler that is invoked when the user moves their pointer after they've initiated a drag. */\n this._pointerMove = event => {\n const pointerPosition = this._getPointerPositionOnPage(event);\n if (!this._hasStartedDragging) {\n const distanceX = Math.abs(pointerPosition.x - this._pickupPositionOnPage.x);\n const distanceY = Math.abs(pointerPosition.y - this._pickupPositionOnPage.y);\n const isOverThreshold = distanceX + distanceY >= this._config.dragStartThreshold;\n // Only start dragging after the user has moved more than the minimum distance in either\n // direction. Note that this is preferable over doing something like `skip(minimumDistance)`\n // in the `pointerMove` subscription, because we're not guaranteed to have one move event\n // per pixel of movement (e.g. if the user moves their pointer quickly).\n if (isOverThreshold) {\n const isDelayElapsed = Date.now() >= this._dragStartTime + this._getDragStartDelay(event);\n const container = this._dropContainer;\n if (!isDelayElapsed) {\n this._endDragSequence(event);\n return;\n }\n // Prevent other drag sequences from starting while something in the container is still\n // being dragged. This can happen while we're waiting for the drop animation to finish\n // and can cause errors, because some elements might still be moving around.\n if (!container || !container.isDragging() && !container.isReceiving()) {\n // Prevent the default action as soon as the dragging sequence is considered as\n // \"started\" since waiting for the next event can allow the device to begin scrolling.\n event.preventDefault();\n this._hasStartedDragging = true;\n this._ngZone.run(() => this._startDragSequence(event));\n }\n }\n return;\n }\n // We prevent the default action down here so that we know that dragging has started. This is\n // important for touch devices where doing this too early can unnecessarily block scrolling,\n // if there's a dragging delay.\n event.preventDefault();\n const constrainedPointerPosition = this._getConstrainedPointerPosition(pointerPosition);\n this._hasMoved = true;\n this._lastKnownPointerPosition = pointerPosition;\n this._updatePointerDirectionDelta(constrainedPointerPosition);\n if (this._dropContainer) {\n this._updateActiveDropContainer(constrainedPointerPosition, pointerPosition);\n } else {\n // If there's a position constraint function, we want the element's top/left to be at the\n // specific position on the page. Use the initial position as a reference if that's the case.\n const offset = this.constrainPosition ? this._initialClientRect : this._pickupPositionOnPage;\n const activeTransform = this._activeTransform;\n activeTransform.x = constrainedPointerPosition.x - offset.x + this._passiveTransform.x;\n activeTransform.y = constrainedPointerPosition.y - offset.y + this._passiveTransform.y;\n this._applyRootElementTransform(activeTransform.x, activeTransform.y);\n }\n // Since this event gets fired for every pixel while dragging, we only\n // want to fire it if the consumer opted into it. Also we have to\n // re-enter the zone because we run all of the events on the outside.\n if (this._moveEvents.observers.length) {\n this._ngZone.run(() => {\n this._moveEvents.next({\n source: this,\n pointerPosition: constrainedPointerPosition,\n event,\n distance: this._getDragDistance(constrainedPointerPosition),\n delta: this._pointerDirectionDelta\n });\n });\n }\n };\n /** Handler that is invoked when the user lifts their pointer up, after initiating a drag. */\n this._pointerUp = event => {\n this._endDragSequence(event);\n };\n /** Handles a native `dragstart` event. */\n this._nativeDragStart = event => {\n if (this._handles.length) {\n const targetHandle = this._getTargetHandle(event);\n if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n event.preventDefault();\n }\n } else if (!this.disabled) {\n // Usually this isn't necessary since the we prevent the default action in `pointerDown`,\n // but some cases like dragging of links can slip through (see #24403).\n event.preventDefault();\n }\n };\n this.withRootElement(element).withParent(_config.parentDragRef || null);\n this._parentPositions = new ParentPositionTracker(_document);\n _dragDropRegistry.registerDragItem(this);\n }\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement() {\n return this._placeholder;\n }\n /** Returns the root draggable element. */\n getRootElement() {\n return this._rootElement;\n }\n /**\n * Gets the currently-visible element that represents the drag item.\n * While dragging this is the placeholder, otherwise it's the root element.\n */\n getVisibleElement() {\n return this.isDragging() ? this.getPlaceholderElement() : this.getRootElement();\n }\n /** Registers the handles that can be used to drag the element. */\n withHandles(handles) {\n this._handles = handles.map(handle => coerceElement(handle));\n this._handles.forEach(handle => toggleNativeDragInteractions(handle, this.disabled));\n this._toggleNativeDragInteractions();\n // Delete any lingering disabled handles that may have been destroyed. Note that we re-create\n // the set, rather than iterate over it and filter out the destroyed handles, because while\n // the ES spec allows for sets to be modified while they're being iterated over, some polyfills\n // use an array internally which may throw an error.\n const disabledHandles = new Set();\n this._disabledHandles.forEach(handle => {\n if (this._handles.indexOf(handle) > -1) {\n disabledHandles.add(handle);\n }\n });\n this._disabledHandles = disabledHandles;\n return this;\n }\n /**\n * Registers the template that should be used for the drag preview.\n * @param template Template that from which to stamp out the preview.\n */\n withPreviewTemplate(template) {\n this._previewTemplate = template;\n return this;\n }\n /**\n * Registers the template that should be used for the drag placeholder.\n * @param template Template that from which to stamp out the placeholder.\n */\n withPlaceholderTemplate(template) {\n this._placeholderTemplate = template;\n return this;\n }\n /**\n * Sets an alternate drag root element. The root element is the element that will be moved as\n * the user is dragging. Passing an alternate root element is useful when trying to enable\n * dragging on an element that you might not have access to.\n */\n withRootElement(rootElement) {\n const element = coerceElement(rootElement);\n if (element !== this._rootElement) {\n if (this._rootElement) {\n this._removeRootElementListeners(this._rootElement);\n }\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.addEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n element.addEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);\n });\n this._initialTransform = undefined;\n this._rootElement = element;\n }\n if (typeof SVGElement !== 'undefined' && this._rootElement instanceof SVGElement) {\n this._ownerSVGElement = this._rootElement.ownerSVGElement;\n }\n return this;\n }\n /**\n * Element to which the draggable's position will be constrained.\n */\n withBoundaryElement(boundaryElement) {\n this._boundaryElement = boundaryElement ? coerceElement(boundaryElement) : null;\n this._resizeSubscription.unsubscribe();\n if (boundaryElement) {\n this._resizeSubscription = this._viewportRuler.change(10).subscribe(() => this._containInsideBoundaryOnResize());\n }\n return this;\n }\n /** Sets the parent ref that the ref is nested in. */\n withParent(parent) {\n this._parentDragRef = parent;\n return this;\n }\n /** Removes the dragging functionality from the DOM element. */\n dispose() {\n this._removeRootElementListeners(this._rootElement);\n // Do this check before removing from the registry since it'll\n // stop being considered as dragged once it is removed.\n if (this.isDragging()) {\n // Since we move out the element to the end of the body while it's being\n // dragged, we have to make sure that it's removed if it gets destroyed.\n this._rootElement?.remove();\n }\n this._anchor?.remove();\n this._destroyPreview();\n this._destroyPlaceholder();\n this._dragDropRegistry.removeDragItem(this);\n this._removeSubscriptions();\n this.beforeStarted.complete();\n this.started.complete();\n this.released.complete();\n this.ended.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this._moveEvents.complete();\n this._handles = [];\n this._disabledHandles.clear();\n this._dropContainer = undefined;\n this._resizeSubscription.unsubscribe();\n this._parentPositions.clear();\n this._boundaryElement = this._rootElement = this._ownerSVGElement = this._placeholderTemplate = this._previewTemplate = this._anchor = this._parentDragRef = null;\n }\n /** Checks whether the element is currently being dragged. */\n isDragging() {\n return this._hasStartedDragging && this._dragDropRegistry.isDragging(this);\n }\n /** Resets a standalone drag item to its initial position. */\n reset() {\n this._rootElement.style.transform = this._initialTransform || '';\n this._activeTransform = {\n x: 0,\n y: 0\n };\n this._passiveTransform = {\n x: 0,\n y: 0\n };\n }\n /**\n * Sets a handle as disabled. While a handle is disabled, it'll capture and interrupt dragging.\n * @param handle Handle element that should be disabled.\n */\n disableHandle(handle) {\n if (!this._disabledHandles.has(handle) && this._handles.indexOf(handle) > -1) {\n this._disabledHandles.add(handle);\n toggleNativeDragInteractions(handle, true);\n }\n }\n /**\n * Enables a handle, if it has been disabled.\n * @param handle Handle element to be enabled.\n */\n enableHandle(handle) {\n if (this._disabledHandles.has(handle)) {\n this._disabledHandles.delete(handle);\n toggleNativeDragInteractions(handle, this.disabled);\n }\n }\n /** Sets the layout direction of the draggable item. */\n withDirection(direction) {\n this._direction = direction;\n return this;\n }\n /** Sets the container that the item is part of. */\n _withDropContainer(container) {\n this._dropContainer = container;\n }\n /**\n * Gets the current position in pixels the draggable outside of a drop container.\n */\n getFreeDragPosition() {\n const position = this.isDragging() ? this._activeTransform : this._passiveTransform;\n return {\n x: position.x,\n y: position.y\n };\n }\n /**\n * Sets the current position in pixels the draggable outside of a drop container.\n * @param value New position to be set.\n */\n setFreeDragPosition(value) {\n this._activeTransform = {\n x: 0,\n y: 0\n };\n this._passiveTransform.x = value.x;\n this._passiveTransform.y = value.y;\n if (!this._dropContainer) {\n this._applyRootElementTransform(value.x, value.y);\n }\n return this;\n }\n /**\n * Sets the container into which to insert the preview element.\n * @param value Container into which to insert the preview.\n */\n withPreviewContainer(value) {\n this._previewContainer = value;\n return this;\n }\n /** Updates the item's sort order based on the last-known pointer position. */\n _sortFromLastPointerPosition() {\n const position = this._lastKnownPointerPosition;\n if (position && this._dropContainer) {\n this._updateActiveDropContainer(this._getConstrainedPointerPosition(position), position);\n }\n }\n /** Unsubscribes from the global subscriptions. */\n _removeSubscriptions() {\n this._pointerMoveSubscription.unsubscribe();\n this._pointerUpSubscription.unsubscribe();\n this._scrollSubscription.unsubscribe();\n }\n /** Destroys the preview element and its ViewRef. */\n _destroyPreview() {\n this._preview?.remove();\n this._previewRef?.destroy();\n this._preview = this._previewRef = null;\n }\n /** Destroys the placeholder element and its ViewRef. */\n _destroyPlaceholder() {\n this._placeholder?.remove();\n this._placeholderRef?.destroy();\n this._placeholder = this._placeholderRef = null;\n }\n /**\n * Clears subscriptions and stops the dragging sequence.\n * @param event Browser event object that ended the sequence.\n */\n _endDragSequence(event) {\n // Note that here we use `isDragging` from the service, rather than from `this`.\n // The difference is that the one from the service reflects whether a dragging sequence\n // has been initiated, whereas the one on `this` includes whether the user has passed\n // the minimum dragging threshold.\n if (!this._dragDropRegistry.isDragging(this)) {\n return;\n }\n this._removeSubscriptions();\n this._dragDropRegistry.stopDragging(this);\n this._toggleNativeDragInteractions();\n if (this._handles) {\n this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;\n }\n if (!this._hasStartedDragging) {\n return;\n }\n this.released.next({\n source: this,\n event\n });\n if (this._dropContainer) {\n // Stop scrolling immediately, instead of waiting for the animation to finish.\n this._dropContainer._stopScrolling();\n this._animatePreviewToPlaceholder().then(() => {\n this._cleanupDragArtifacts(event);\n this._cleanupCachedDimensions();\n this._dragDropRegistry.stopDragging(this);\n });\n } else {\n // Convert the active transform into a passive one. This means that next time\n // the user starts dragging the item, its position will be calculated relatively\n // to the new passive transform.\n this._passiveTransform.x = this._activeTransform.x;\n const pointerPosition = this._getPointerPositionOnPage(event);\n this._passiveTransform.y = this._activeTransform.y;\n this._ngZone.run(() => {\n this.ended.next({\n source: this,\n distance: this._getDragDistance(pointerPosition),\n dropPoint: pointerPosition,\n event\n });\n });\n this._cleanupCachedDimensions();\n this._dragDropRegistry.stopDragging(this);\n }\n }\n /** Starts the dragging sequence. */\n _startDragSequence(event) {\n if (isTouchEvent(event)) {\n this._lastTouchEventTime = Date.now();\n }\n this._toggleNativeDragInteractions();\n const dropContainer = this._dropContainer;\n if (dropContainer) {\n const element = this._rootElement;\n const parent = element.parentNode;\n const placeholder = this._placeholder = this._createPlaceholderElement();\n const anchor = this._anchor = this._anchor || this._document.createComment('');\n // Needs to happen before the root element is moved.\n const shadowRoot = this._getShadowRoot();\n // Insert an anchor node so that we can restore the element's position in the DOM.\n parent.insertBefore(anchor, element);\n // There's no risk of transforms stacking when inside a drop container so\n // we can keep the initial transform up to date any time dragging starts.\n this._initialTransform = element.style.transform || '';\n // Create the preview after the initial transform has\n // been cached, because it can be affected by the transform.\n this._preview = this._createPreviewElement();\n // We move the element out at the end of the body and we make it hidden, because keeping it in\n // place will throw off the consumer's `:last-child` selectors. We can't remove the element\n // from the DOM completely, because iOS will stop firing all subsequent events in the chain.\n toggleVisibility(element, false, dragImportantProperties);\n this._document.body.appendChild(parent.replaceChild(placeholder, element));\n this._getPreviewInsertionPoint(parent, shadowRoot).appendChild(this._preview);\n this.started.next({\n source: this,\n event\n }); // Emit before notifying the container.\n dropContainer.start();\n this._initialContainer = dropContainer;\n this._initialIndex = dropContainer.getItemIndex(this);\n } else {\n this.started.next({\n source: this,\n event\n });\n this._initialContainer = this._initialIndex = undefined;\n }\n // Important to run after we've called `start` on the parent container\n // so that it has had time to resolve its scrollable parents.\n this._parentPositions.cache(dropContainer ? dropContainer.getScrollableParents() : []);\n }\n /**\n * Sets up the different variables and subscriptions\n * that will be necessary for the dragging sequence.\n * @param referenceElement Element that started the drag sequence.\n * @param event Browser event object that started the sequence.\n */\n _initializeDragSequence(referenceElement, event) {\n // Stop propagation if the item is inside another\n // draggable so we don't start multiple drag sequences.\n if (this._parentDragRef) {\n event.stopPropagation();\n }\n const isDragging = this.isDragging();\n const isTouchSequence = isTouchEvent(event);\n const isAuxiliaryMouseButton = !isTouchSequence && event.button !== 0;\n const rootElement = this._rootElement;\n const target = _getEventTarget(event);\n const isSyntheticEvent = !isTouchSequence && this._lastTouchEventTime && this._lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date.now();\n const isFakeEvent = isTouchSequence ? isFakeTouchstartFromScreenReader(event) : isFakeMousedownFromScreenReader(event);\n // If the event started from an element with the native HTML drag&drop, it'll interfere\n // with our own dragging (e.g. `img` tags do it by default). Prevent the default action\n // to stop it from happening. Note that preventing on `dragstart` also seems to work, but\n // it's flaky and it fails if the user drags it away quickly. Also note that we only want\n // to do this for `mousedown` since doing the same for `touchstart` will stop any `click`\n // events from firing on touch devices.\n if (target && target.draggable && event.type === 'mousedown') {\n event.preventDefault();\n }\n // Abort if the user is already dragging or is using a mouse button other than the primary one.\n if (isDragging || isAuxiliaryMouseButton || isSyntheticEvent || isFakeEvent) {\n return;\n }\n // If we've got handles, we need to disable the tap highlight on the entire root element,\n // otherwise iOS will still add it, even though all the drag interactions on the handle\n // are disabled.\n if (this._handles.length) {\n const rootStyles = rootElement.style;\n this._rootElementTapHighlight = rootStyles.webkitTapHighlightColor || '';\n rootStyles.webkitTapHighlightColor = 'transparent';\n }\n this._hasStartedDragging = this._hasMoved = false;\n // Avoid multiple subscriptions and memory leaks when multi touch\n // (isDragging check above isn't enough because of possible temporal and/or dimensional delays)\n this._removeSubscriptions();\n this._initialClientRect = this._rootElement.getBoundingClientRect();\n this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);\n this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);\n this._scrollSubscription = this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(scrollEvent => this._updateOnScroll(scrollEvent));\n if (this._boundaryElement) {\n this._boundaryRect = getMutableClientRect(this._boundaryElement);\n }\n // If we have a custom preview we can't know ahead of time how large it'll be so we position\n // it next to the cursor. The exception is when the consumer has opted into making the preview\n // the same size as the root element, in which case we do know the size.\n const previewTemplate = this._previewTemplate;\n this._pickupPositionInElement = previewTemplate && previewTemplate.template && !previewTemplate.matchSize ? {\n x: 0,\n y: 0\n } : this._getPointerPositionInElement(this._initialClientRect, referenceElement, event);\n const pointerPosition = this._pickupPositionOnPage = this._lastKnownPointerPosition = this._getPointerPositionOnPage(event);\n this._pointerDirectionDelta = {\n x: 0,\n y: 0\n };\n this._pointerPositionAtLastDirectionChange = {\n x: pointerPosition.x,\n y: pointerPosition.y\n };\n this._dragStartTime = Date.now();\n this._dragDropRegistry.startDragging(this, event);\n }\n /** Cleans up the DOM artifacts that were added to facilitate the element being dragged. */\n _cleanupDragArtifacts(event) {\n // Restore the element's visibility and insert it at its old position in the DOM.\n // It's important that we maintain the position, because moving the element around in the DOM\n // can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,\n // while moving the existing elements in all other cases.\n toggleVisibility(this._rootElement, true, dragImportantProperties);\n this._anchor.parentNode.replaceChild(this._rootElement, this._anchor);\n this._destroyPreview();\n this._destroyPlaceholder();\n this._initialClientRect = this._boundaryRect = this._previewRect = this._initialTransform = undefined;\n // Re-enter the NgZone since we bound `document` events on the outside.\n this._ngZone.run(() => {\n const container = this._dropContainer;\n const currentIndex = container.getItemIndex(this);\n const pointerPosition = this._getPointerPositionOnPage(event);\n const distance = this._getDragDistance(pointerPosition);\n const isPointerOverContainer = container._isOverContainer(pointerPosition.x, pointerPosition.y);\n this.ended.next({\n source: this,\n distance,\n dropPoint: pointerPosition,\n event\n });\n this.dropped.next({\n item: this,\n currentIndex,\n previousIndex: this._initialIndex,\n container: container,\n previousContainer: this._initialContainer,\n isPointerOverContainer,\n distance,\n dropPoint: pointerPosition,\n event\n });\n container.drop(this, currentIndex, this._initialIndex, this._initialContainer, isPointerOverContainer, distance, pointerPosition, event);\n this._dropContainer = this._initialContainer;\n });\n }\n /**\n * Updates the item's position in its drop container, or moves it\n * into a new one, depending on its current drag position.\n */\n _updateActiveDropContainer({\n x,\n y\n }, {\n x: rawX,\n y: rawY\n }) {\n // Drop container that draggable has been moved into.\n let newContainer = this._initialContainer._getSiblingContainerFromPosition(this, x, y);\n // If we couldn't find a new container to move the item into, and the item has left its\n // initial container, check whether the it's over the initial container. This handles the\n // case where two containers are connected one way and the user tries to undo dragging an\n // item into a new container.\n if (!newContainer && this._dropContainer !== this._initialContainer && this._initialContainer._isOverContainer(x, y)) {\n newContainer = this._initialContainer;\n }\n if (newContainer && newContainer !== this._dropContainer) {\n this._ngZone.run(() => {\n // Notify the old container that the item has left.\n this.exited.next({\n item: this,\n container: this._dropContainer\n });\n this._dropContainer.exit(this);\n // Notify the new container that the item has entered.\n this._dropContainer = newContainer;\n this._dropContainer.enter(this, x, y, newContainer === this._initialContainer &&\n // If we're re-entering the initial container and sorting is disabled,\n // put item the into its starting index to begin with.\n newContainer.sortingDisabled ? this._initialIndex : undefined);\n this.entered.next({\n item: this,\n container: newContainer,\n currentIndex: newContainer.getItemIndex(this)\n });\n });\n }\n // Dragging may have been interrupted as a result of the events above.\n if (this.isDragging()) {\n this._dropContainer._startScrollingIfNecessary(rawX, rawY);\n this._dropContainer._sortItem(this, x, y, this._pointerDirectionDelta);\n if (this.constrainPosition) {\n this._applyPreviewTransform(x, y);\n } else {\n this._applyPreviewTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);\n }\n }\n }\n /**\n * Creates the element that will be rendered next to the user's pointer\n * and will be used as a preview of the element that is being dragged.\n */\n _createPreviewElement() {\n const previewConfig = this._previewTemplate;\n const previewClass = this.previewClass;\n const previewTemplate = previewConfig ? previewConfig.template : null;\n let preview;\n if (previewTemplate && previewConfig) {\n // Measure the element before we've inserted the preview\n // since the insertion could throw off the measurement.\n const rootRect = previewConfig.matchSize ? this._initialClientRect : null;\n const viewRef = previewConfig.viewContainer.createEmbeddedView(previewTemplate, previewConfig.context);\n viewRef.detectChanges();\n preview = getRootNode(viewRef, this._document);\n this._previewRef = viewRef;\n if (previewConfig.matchSize) {\n matchElementSize(preview, rootRect);\n } else {\n preview.style.transform = getTransform(this._pickupPositionOnPage.x, this._pickupPositionOnPage.y);\n }\n } else {\n preview = deepCloneNode(this._rootElement);\n matchElementSize(preview, this._initialClientRect);\n if (this._initialTransform) {\n preview.style.transform = this._initialTransform;\n }\n }\n extendStyles(preview.style, {\n // It's important that we disable the pointer events on the preview, because\n // it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.\n 'pointer-events': 'none',\n // We have to reset the margin, because it can throw off positioning relative to the viewport.\n 'margin': '0',\n 'position': 'fixed',\n 'top': '0',\n 'left': '0',\n 'z-index': `${this._config.zIndex || 1000}`\n }, dragImportantProperties);\n toggleNativeDragInteractions(preview, false);\n preview.classList.add('cdk-drag-preview');\n preview.setAttribute('dir', this._direction);\n if (previewClass) {\n if (Array.isArray(previewClass)) {\n previewClass.forEach(className => preview.classList.add(className));\n } else {\n preview.classList.add(previewClass);\n }\n }\n return preview;\n }\n /**\n * Animates the preview element from its current position to the location of the drop placeholder.\n * @returns Promise that resolves when the animation completes.\n */\n _animatePreviewToPlaceholder() {\n // If the user hasn't moved yet, the transitionend event won't fire.\n if (!this._hasMoved) {\n return Promise.resolve();\n }\n const placeholderRect = this._placeholder.getBoundingClientRect();\n // Apply the class that adds a transition to the preview.\n this._preview.classList.add('cdk-drag-animating');\n // Move the preview to the placeholder position.\n this._applyPreviewTransform(placeholderRect.left, placeholderRect.top);\n // If the element doesn't have a `transition`, the `transitionend` event won't fire. Since\n // we need to trigger a style recalculation in order for the `cdk-drag-animating` class to\n // apply its style, we take advantage of the available info to figure out whether we need to\n // bind the event in the first place.\n const duration = getTransformTransitionDurationInMs(this._preview);\n if (duration === 0) {\n return Promise.resolve();\n }\n return this._ngZone.runOutsideAngular(() => {\n return new Promise(resolve => {\n const handler = event => {\n if (!event || _getEventTarget(event) === this._preview && event.propertyName === 'transform') {\n this._preview?.removeEventListener('transitionend', handler);\n resolve();\n clearTimeout(timeout);\n }\n };\n // If a transition is short enough, the browser might not fire the `transitionend` event.\n // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll\n // fire if the transition hasn't completed when it was supposed to.\n const timeout = setTimeout(handler, duration * 1.5);\n this._preview.addEventListener('transitionend', handler);\n });\n });\n }\n /** Creates an element that will be shown instead of the current element while dragging. */\n _createPlaceholderElement() {\n const placeholderConfig = this._placeholderTemplate;\n const placeholderTemplate = placeholderConfig ? placeholderConfig.template : null;\n let placeholder;\n if (placeholderTemplate) {\n this._placeholderRef = placeholderConfig.viewContainer.createEmbeddedView(placeholderTemplate, placeholderConfig.context);\n this._placeholderRef.detectChanges();\n placeholder = getRootNode(this._placeholderRef, this._document);\n } else {\n placeholder = deepCloneNode(this._rootElement);\n }\n // Stop pointer events on the preview so the user can't\n // interact with it while the preview is animating.\n placeholder.style.pointerEvents = 'none';\n placeholder.classList.add('cdk-drag-placeholder');\n return placeholder;\n }\n /**\n * Figures out the coordinates at which an element was picked up.\n * @param referenceElement Element that initiated the dragging.\n * @param event Event that initiated the dragging.\n */\n _getPointerPositionInElement(elementRect, referenceElement, event) {\n const handleElement = referenceElement === this._rootElement ? null : referenceElement;\n const referenceRect = handleElement ? handleElement.getBoundingClientRect() : elementRect;\n const point = isTouchEvent(event) ? event.targetTouches[0] : event;\n const scrollPosition = this._getViewportScrollPosition();\n const x = point.pageX - referenceRect.left - scrollPosition.left;\n const y = point.pageY - referenceRect.top - scrollPosition.top;\n return {\n x: referenceRect.left - elementRect.left + x,\n y: referenceRect.top - elementRect.top + y\n };\n }\n /** Determines the point of the page that was touched by the user. */\n _getPointerPositionOnPage(event) {\n const scrollPosition = this._getViewportScrollPosition();\n const point = isTouchEvent(event) ?\n // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\n // Also note that on real devices we're guaranteed for either `touches` or `changedTouches`\n // to have a value, but Firefox in device emulation mode has a bug where both can be empty\n // for `touchstart` and `touchend` so we fall back to a dummy object in order to avoid\n // throwing an error. The value returned here will be incorrect, but since this only\n // breaks inside a developer tool and the value is only used for secondary information,\n // we can get away with it. See https://bugzilla.mozilla.org/show_bug.cgi?id=1615824.\n event.touches[0] || event.changedTouches[0] || {\n pageX: 0,\n pageY: 0\n } : event;\n const x = point.pageX - scrollPosition.left;\n const y = point.pageY - scrollPosition.top;\n // if dragging SVG element, try to convert from the screen coordinate system to the SVG\n // coordinate system\n if (this._ownerSVGElement) {\n const svgMatrix = this._ownerSVGElement.getScreenCTM();\n if (svgMatrix) {\n const svgPoint = this._ownerSVGElement.createSVGPoint();\n svgPoint.x = x;\n svgPoint.y = y;\n return svgPoint.matrixTransform(svgMatrix.inverse());\n }\n }\n return {\n x,\n y\n };\n }\n /** Gets the pointer position on the page, accounting for any position constraints. */\n _getConstrainedPointerPosition(point) {\n const dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;\n let {\n x,\n y\n } = this.constrainPosition ? this.constrainPosition(point, this, this._initialClientRect, this._pickupPositionInElement) : point;\n if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n y = this._pickupPositionOnPage.y - (this.constrainPosition ? this._pickupPositionInElement.y : 0);\n } else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n x = this._pickupPositionOnPage.x - (this.constrainPosition ? this._pickupPositionInElement.x : 0);\n }\n if (this._boundaryRect) {\n // If not using a custom constrain we need to account for the pickup position in the element\n // otherwise we do not need to do this, as it has already been accounted for\n const {\n x: pickupX,\n y: pickupY\n } = !this.constrainPosition ? this._pickupPositionInElement : {\n x: 0,\n y: 0\n };\n const boundaryRect = this._boundaryRect;\n const {\n width: previewWidth,\n height: previewHeight\n } = this._getPreviewRect();\n const minY = boundaryRect.top + pickupY;\n const maxY = boundaryRect.bottom - (previewHeight - pickupY);\n const minX = boundaryRect.left + pickupX;\n const maxX = boundaryRect.right - (previewWidth - pickupX);\n x = clamp$1(x, minX, maxX);\n y = clamp$1(y, minY, maxY);\n }\n return {\n x,\n y\n };\n }\n /** Updates the current drag delta, based on the user's current pointer position on the page. */\n _updatePointerDirectionDelta(pointerPositionOnPage) {\n const {\n x,\n y\n } = pointerPositionOnPage;\n const delta = this._pointerDirectionDelta;\n const positionSinceLastChange = this._pointerPositionAtLastDirectionChange;\n // Amount of pixels the user has dragged since the last time the direction changed.\n const changeX = Math.abs(x - positionSinceLastChange.x);\n const changeY = Math.abs(y - positionSinceLastChange.y);\n // Because we handle pointer events on a per-pixel basis, we don't want the delta\n // to change for every pixel, otherwise anything that depends on it can look erratic.\n // To make the delta more consistent, we track how much the user has moved since the last\n // delta change and we only update it after it has reached a certain threshold.\n if (changeX > this._config.pointerDirectionChangeThreshold) {\n delta.x = x > positionSinceLastChange.x ? 1 : -1;\n positionSinceLastChange.x = x;\n }\n if (changeY > this._config.pointerDirectionChangeThreshold) {\n delta.y = y > positionSinceLastChange.y ? 1 : -1;\n positionSinceLastChange.y = y;\n }\n return delta;\n }\n /** Toggles the native drag interactions, based on how many handles are registered. */\n _toggleNativeDragInteractions() {\n if (!this._rootElement || !this._handles) {\n return;\n }\n const shouldEnable = this._handles.length > 0 || !this.isDragging();\n if (shouldEnable !== this._nativeInteractionsEnabled) {\n this._nativeInteractionsEnabled = shouldEnable;\n toggleNativeDragInteractions(this._rootElement, shouldEnable);\n }\n }\n /** Removes the manually-added event listeners from the root element. */\n _removeRootElementListeners(element) {\n element.removeEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.removeEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n element.removeEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);\n }\n /**\n * Applies a `transform` to the root element, taking into account any existing transforms on it.\n * @param x New transform value along the X axis.\n * @param y New transform value along the Y axis.\n */\n _applyRootElementTransform(x, y) {\n const transform = getTransform(x, y);\n const styles = this._rootElement.style;\n // Cache the previous transform amount only after the first drag sequence, because\n // we don't want our own transforms to stack on top of each other.\n // Should be excluded none because none + translate3d(x, y, x) is invalid css\n if (this._initialTransform == null) {\n this._initialTransform = styles.transform && styles.transform != 'none' ? styles.transform : '';\n }\n // Preserve the previous `transform` value, if there was one. Note that we apply our own\n // transform before the user's, because things like rotation can affect which direction\n // the element will be translated towards.\n styles.transform = combineTransforms(transform, this._initialTransform);\n }\n /**\n * Applies a `transform` to the preview, taking into account any existing transforms on it.\n * @param x New transform value along the X axis.\n * @param y New transform value along the Y axis.\n */\n _applyPreviewTransform(x, y) {\n // Only apply the initial transform if the preview is a clone of the original element, otherwise\n // it could be completely different and the transform might not make sense anymore.\n const initialTransform = this._previewTemplate?.template ? undefined : this._initialTransform;\n const transform = getTransform(x, y);\n this._preview.style.transform = combineTransforms(transform, initialTransform);\n }\n /**\n * Gets the distance that the user has dragged during the current drag sequence.\n * @param currentPosition Current position of the user's pointer.\n */\n _getDragDistance(currentPosition) {\n const pickupPosition = this._pickupPositionOnPage;\n if (pickupPosition) {\n return {\n x: currentPosition.x - pickupPosition.x,\n y: currentPosition.y - pickupPosition.y\n };\n }\n return {\n x: 0,\n y: 0\n };\n }\n /** Cleans up any cached element dimensions that we don't need after dragging has stopped. */\n _cleanupCachedDimensions() {\n this._boundaryRect = this._previewRect = undefined;\n this._parentPositions.clear();\n }\n /**\n * Checks whether the element is still inside its boundary after the viewport has been resized.\n * If not, the position is adjusted so that the element fits again.\n */\n _containInsideBoundaryOnResize() {\n let {\n x,\n y\n } = this._passiveTransform;\n if (x === 0 && y === 0 || this.isDragging() || !this._boundaryElement) {\n return;\n }\n // Note: don't use `_clientRectAtStart` here, because we want the latest position.\n const elementRect = this._rootElement.getBoundingClientRect();\n const boundaryRect = this._boundaryElement.getBoundingClientRect();\n // It's possible that the element got hidden away after dragging (e.g. by switching to a\n // different tab). Don't do anything in this case so we don't clear the user's position.\n if (boundaryRect.width === 0 && boundaryRect.height === 0 || elementRect.width === 0 && elementRect.height === 0) {\n return;\n }\n const leftOverflow = boundaryRect.left - elementRect.left;\n const rightOverflow = elementRect.right - boundaryRect.right;\n const topOverflow = boundaryRect.top - elementRect.top;\n const bottomOverflow = elementRect.bottom - boundaryRect.bottom;\n // If the element has become wider than the boundary, we can't\n // do much to make it fit so we just anchor it to the left.\n if (boundaryRect.width > elementRect.width) {\n if (leftOverflow > 0) {\n x += leftOverflow;\n }\n if (rightOverflow > 0) {\n x -= rightOverflow;\n }\n } else {\n x = 0;\n }\n // If the element has become taller than the boundary, we can't\n // do much to make it fit so we just anchor it to the top.\n if (boundaryRect.height > elementRect.height) {\n if (topOverflow > 0) {\n y += topOverflow;\n }\n if (bottomOverflow > 0) {\n y -= bottomOverflow;\n }\n } else {\n y = 0;\n }\n if (x !== this._passiveTransform.x || y !== this._passiveTransform.y) {\n this.setFreeDragPosition({\n y,\n x\n });\n }\n }\n /** Gets the drag start delay, based on the event type. */\n _getDragStartDelay(event) {\n const value = this.dragStartDelay;\n if (typeof value === 'number') {\n return value;\n } else if (isTouchEvent(event)) {\n return value.touch;\n }\n return value ? value.mouse : 0;\n }\n /** Updates the internal state of the draggable element when scrolling has occurred. */\n _updateOnScroll(event) {\n const scrollDifference = this._parentPositions.handleScroll(event);\n if (scrollDifference) {\n const target = _getEventTarget(event);\n // ClientRect dimensions are based on the scroll position of the page and its parent\n // node so we have to update the cached boundary ClientRect if the user has scrolled.\n if (this._boundaryRect && target !== this._boundaryElement && target.contains(this._boundaryElement)) {\n adjustClientRect(this._boundaryRect, scrollDifference.top, scrollDifference.left);\n }\n this._pickupPositionOnPage.x += scrollDifference.left;\n this._pickupPositionOnPage.y += scrollDifference.top;\n // If we're in free drag mode, we have to update the active transform, because\n // it isn't relative to the viewport like the preview inside a drop list.\n if (!this._dropContainer) {\n this._activeTransform.x -= scrollDifference.left;\n this._activeTransform.y -= scrollDifference.top;\n this._applyRootElementTransform(this._activeTransform.x, this._activeTransform.y);\n }\n }\n }\n /** Gets the scroll position of the viewport. */\n _getViewportScrollPosition() {\n return this._parentPositions.positions.get(this._document)?.scrollPosition || this._parentPositions.getViewportScrollPosition();\n }\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n _getShadowRoot() {\n if (this._cachedShadowRoot === undefined) {\n this._cachedShadowRoot = _getShadowRoot(this._rootElement);\n }\n return this._cachedShadowRoot;\n }\n /** Gets the element into which the drag preview should be inserted. */\n _getPreviewInsertionPoint(initialParent, shadowRoot) {\n const previewContainer = this._previewContainer || 'global';\n if (previewContainer === 'parent') {\n return initialParent;\n }\n if (previewContainer === 'global') {\n const documentRef = this._document;\n // We can't use the body if the user is in fullscreen mode,\n // because the preview will render under the fullscreen element.\n // TODO(crisbeto): dedupe this with the `FullscreenOverlayContainer` eventually.\n return shadowRoot || documentRef.fullscreenElement || documentRef.webkitFullscreenElement || documentRef.mozFullScreenElement || documentRef.msFullscreenElement || documentRef.body;\n }\n return coerceElement(previewContainer);\n }\n /** Lazily resolves and returns the dimensions of the preview. */\n _getPreviewRect() {\n // Cache the preview element rect if we haven't cached it already or if\n // we cached it too early before the element dimensions were computed.\n if (!this._previewRect || !this._previewRect.width && !this._previewRect.height) {\n this._previewRect = this._preview ? this._preview.getBoundingClientRect() : this._initialClientRect;\n }\n return this._previewRect;\n }\n /** Gets a handle that is the target of an event. */\n _getTargetHandle(event) {\n return this._handles.find(handle => {\n return event.target && (event.target === handle || handle.contains(event.target));\n });\n }\n}\n/**\n * Gets a 3d `transform` that can be applied to an element.\n * @param x Desired position of the element along the X axis.\n * @param y Desired position of the element along the Y axis.\n */\nfunction getTransform(x, y) {\n // Round the transforms since some browsers will\n // blur the elements for sub-pixel transforms.\n return `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;\n}\n/** Clamps a value between a minimum and a maximum. */\nfunction clamp$1(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n/** Determines whether an event is a touch event. */\nfunction isTouchEvent(event) {\n // This function is called for every pixel that the user has dragged so we need it to be\n // as fast as possible. Since we only bind mouse events and touch events, we can assume\n // that if the event's name starts with `t`, it's a touch event.\n return event.type[0] === 't';\n}\n/**\n * Gets the root HTML element of an embedded view.\n * If the root is not an HTML element it gets wrapped in one.\n */\nfunction getRootNode(viewRef, _document) {\n const rootNodes = viewRef.rootNodes;\n if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {\n return rootNodes[0];\n }\n const wrapper = _document.createElement('div');\n rootNodes.forEach(node => wrapper.appendChild(node));\n return wrapper;\n}\n/**\n * Matches the target element's size to the source's size.\n * @param target Element that needs to be resized.\n * @param sourceRect Dimensions of the source element.\n */\nfunction matchElementSize(target, sourceRect) {\n target.style.width = `${sourceRect.width}px`;\n target.style.height = `${sourceRect.height}px`;\n target.style.transform = getTransform(sourceRect.left, sourceRect.top);\n}\n\n/**\n * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nfunction moveItemInArray(array, fromIndex, toIndex) {\n const from = clamp(fromIndex, array.length - 1);\n const to = clamp(toIndex, array.length - 1);\n if (from === to) {\n return;\n }\n const target = array[from];\n const delta = to < from ? -1 : 1;\n for (let i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n array[to] = target;\n}\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nfunction transferArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n const from = clamp(currentIndex, currentArray.length - 1);\n const to = clamp(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n }\n}\n/**\n * Copies an item from one array to another, leaving it in its\n * original position in current array.\n * @param currentArray Array from which to copy the item.\n * @param targetArray Array into which is copy the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n *\n */\nfunction copyArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n const to = clamp(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray[currentIndex]);\n }\n}\n/** Clamps a number between zero and a maximum. */\nfunction clamp(value, max) {\n return Math.max(0, Math.min(max, value));\n}\n\n/**\n * Strategy that only supports sorting along a single axis.\n * Items are reordered using CSS transforms which allows for sorting to be animated.\n * @docs-private\n */\nclass SingleAxisSortStrategy {\n constructor(_element, _dragDropRegistry) {\n this._element = _element;\n this._dragDropRegistry = _dragDropRegistry;\n /** Cache of the dimensions of all the items inside the container. */\n this._itemPositions = [];\n /** Direction in which the list is oriented. */\n this.orientation = 'vertical';\n /**\n * Keeps track of the item that was last swapped with the dragged item, as well as what direction\n * the pointer was moving in when the swap occurred and whether the user's pointer continued to\n * overlap with the swapped item after the swapping occurred.\n */\n this._previousSwap = {\n drag: null,\n delta: 0,\n overlaps: false\n };\n }\n /**\n * To be called when the drag sequence starts.\n * @param items Items that are currently in the list.\n */\n start(items) {\n this.withItems(items);\n }\n /**\n * To be called when an item is being sorted.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDelta Direction in which the pointer is moving along each axis.\n */\n sort(item, pointerX, pointerY, pointerDelta) {\n const siblings = this._itemPositions;\n const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY, pointerDelta);\n if (newIndex === -1 && siblings.length > 0) {\n return null;\n }\n const isHorizontal = this.orientation === 'horizontal';\n const currentIndex = siblings.findIndex(currentItem => currentItem.drag === item);\n const siblingAtNewPosition = siblings[newIndex];\n const currentPosition = siblings[currentIndex].clientRect;\n const newPosition = siblingAtNewPosition.clientRect;\n const delta = currentIndex > newIndex ? 1 : -1;\n // How many pixels the item's placeholder should be offset.\n const itemOffset = this._getItemOffsetPx(currentPosition, newPosition, delta);\n // How many pixels all the other items should be offset.\n const siblingOffset = this._getSiblingOffsetPx(currentIndex, siblings, delta);\n // Save the previous order of the items before moving the item to its new index.\n // We use this to check whether an item has been moved as a result of the sorting.\n const oldOrder = siblings.slice();\n // Shuffle the array in place.\n moveItemInArray(siblings, currentIndex, newIndex);\n siblings.forEach((sibling, index) => {\n // Don't do anything if the position hasn't changed.\n if (oldOrder[index] === sibling) {\n return;\n }\n const isDraggedItem = sibling.drag === item;\n const offset = isDraggedItem ? itemOffset : siblingOffset;\n const elementToOffset = isDraggedItem ? item.getPlaceholderElement() : sibling.drag.getRootElement();\n // Update the offset to reflect the new position.\n sibling.offset += offset;\n // Since we're moving the items with a `transform`, we need to adjust their cached\n // client rects to reflect their new position, as well as swap their positions in the cache.\n // Note that we shouldn't use `getBoundingClientRect` here to update the cache, because the\n // elements may be mid-animation which will give us a wrong result.\n if (isHorizontal) {\n // Round the transforms since some browsers will\n // blur the elements, for sub-pixel transforms.\n elementToOffset.style.transform = combineTransforms(`translate3d(${Math.round(sibling.offset)}px, 0, 0)`, sibling.initialTransform);\n adjustClientRect(sibling.clientRect, 0, offset);\n } else {\n elementToOffset.style.transform = combineTransforms(`translate3d(0, ${Math.round(sibling.offset)}px, 0)`, sibling.initialTransform);\n adjustClientRect(sibling.clientRect, offset, 0);\n }\n });\n // Note that it's important that we do this after the client rects have been adjusted.\n this._previousSwap.overlaps = isInsideClientRect(newPosition, pointerX, pointerY);\n this._previousSwap.drag = siblingAtNewPosition.drag;\n this._previousSwap.delta = isHorizontal ? pointerDelta.x : pointerDelta.y;\n return {\n previousIndex: currentIndex,\n currentIndex: newIndex\n };\n }\n /**\n * Called when an item is being moved into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param index Index at which the item entered. If omitted, the container will try to figure it\n * out automatically.\n */\n enter(item, pointerX, pointerY, index) {\n const newIndex = index == null || index < 0 ?\n // We use the coordinates of where the item entered the drop\n // zone to figure out at which index it should be inserted.\n this._getItemIndexFromPointerPosition(item, pointerX, pointerY) : index;\n const activeDraggables = this._activeDraggables;\n const currentIndex = activeDraggables.indexOf(item);\n const placeholder = item.getPlaceholderElement();\n let newPositionReference = activeDraggables[newIndex];\n // If the item at the new position is the same as the item that is being dragged,\n // it means that we're trying to restore the item to its initial position. In this\n // case we should use the next item from the list as the reference.\n if (newPositionReference === item) {\n newPositionReference = activeDraggables[newIndex + 1];\n }\n // If we didn't find a new position reference, it means that either the item didn't start off\n // in this container, or that the item requested to be inserted at the end of the list.\n if (!newPositionReference && (newIndex == null || newIndex === -1 || newIndex < activeDraggables.length - 1) && this._shouldEnterAsFirstChild(pointerX, pointerY)) {\n newPositionReference = activeDraggables[0];\n }\n // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it\n // into another container and back again), we have to ensure that it isn't duplicated.\n if (currentIndex > -1) {\n activeDraggables.splice(currentIndex, 1);\n }\n // Don't use items that are being dragged as a reference, because\n // their element has been moved down to the bottom of the body.\n if (newPositionReference && !this._dragDropRegistry.isDragging(newPositionReference)) {\n const element = newPositionReference.getRootElement();\n element.parentElement.insertBefore(placeholder, element);\n activeDraggables.splice(newIndex, 0, item);\n } else {\n coerceElement(this._element).appendChild(placeholder);\n activeDraggables.push(item);\n }\n // The transform needs to be cleared so it doesn't throw off the measurements.\n placeholder.style.transform = '';\n // Note that usually `start` is called together with `enter` when an item goes into a new\n // container. This will cache item positions, but we need to refresh them since the amount\n // of items has changed.\n this._cacheItemPositions();\n }\n /** Sets the items that are currently part of the list. */\n withItems(items) {\n this._activeDraggables = items.slice();\n this._cacheItemPositions();\n }\n /** Assigns a sort predicate to the strategy. */\n withSortPredicate(predicate) {\n this._sortPredicate = predicate;\n }\n /** Resets the strategy to its initial state before dragging was started. */\n reset() {\n // TODO(crisbeto): may have to wait for the animations to finish.\n this._activeDraggables.forEach(item => {\n const rootElement = item.getRootElement();\n if (rootElement) {\n const initialTransform = this._itemPositions.find(p => p.drag === item)?.initialTransform;\n rootElement.style.transform = initialTransform || '';\n }\n });\n this._itemPositions = [];\n this._activeDraggables = [];\n this._previousSwap.drag = null;\n this._previousSwap.delta = 0;\n this._previousSwap.overlaps = false;\n }\n /**\n * Gets a snapshot of items currently in the list.\n * Can include items that we dragged in from another list.\n */\n getActiveItemsSnapshot() {\n return this._activeDraggables;\n }\n /** Gets the index of a specific item. */\n getItemIndex(item) {\n // Items are sorted always by top/left in the cache, however they flow differently in RTL.\n // The rest of the logic still stands no matter what orientation we're in, however\n // we need to invert the array when determining the index.\n const items = this.orientation === 'horizontal' && this.direction === 'rtl' ? this._itemPositions.slice().reverse() : this._itemPositions;\n return items.findIndex(currentItem => currentItem.drag === item);\n }\n /** Used to notify the strategy that the scroll position has changed. */\n updateOnScroll(topDifference, leftDifference) {\n // Since we know the amount that the user has scrolled we can shift all of the\n // client rectangles ourselves. This is cheaper than re-measuring everything and\n // we can avoid inconsistent behavior where we might be measuring the element before\n // its position has changed.\n this._itemPositions.forEach(({\n clientRect\n }) => {\n adjustClientRect(clientRect, topDifference, leftDifference);\n });\n // We need two loops for this, because we want all of the cached\n // positions to be up-to-date before we re-sort the item.\n this._itemPositions.forEach(({\n drag\n }) => {\n if (this._dragDropRegistry.isDragging(drag)) {\n // We need to re-sort the item manually, because the pointer move\n // events won't be dispatched while the user is scrolling.\n drag._sortFromLastPointerPosition();\n }\n });\n }\n /** Refreshes the position cache of the items and sibling containers. */\n _cacheItemPositions() {\n const isHorizontal = this.orientation === 'horizontal';\n this._itemPositions = this._activeDraggables.map(drag => {\n const elementToMeasure = drag.getVisibleElement();\n return {\n drag,\n offset: 0,\n initialTransform: elementToMeasure.style.transform || '',\n clientRect: getMutableClientRect(elementToMeasure)\n };\n }).sort((a, b) => {\n return isHorizontal ? a.clientRect.left - b.clientRect.left : a.clientRect.top - b.clientRect.top;\n });\n }\n /**\n * Gets the offset in pixels by which the item that is being dragged should be moved.\n * @param currentPosition Current position of the item.\n * @param newPosition Position of the item where the current item should be moved.\n * @param delta Direction in which the user is moving.\n */\n _getItemOffsetPx(currentPosition, newPosition, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n let itemOffset = isHorizontal ? newPosition.left - currentPosition.left : newPosition.top - currentPosition.top;\n // Account for differences in the item width/height.\n if (delta === -1) {\n itemOffset += isHorizontal ? newPosition.width - currentPosition.width : newPosition.height - currentPosition.height;\n }\n return itemOffset;\n }\n /**\n * Gets the offset in pixels by which the items that aren't being dragged should be moved.\n * @param currentIndex Index of the item currently being dragged.\n * @param siblings All of the items in the list.\n * @param delta Direction in which the user is moving.\n */\n _getSiblingOffsetPx(currentIndex, siblings, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n const currentPosition = siblings[currentIndex].clientRect;\n const immediateSibling = siblings[currentIndex + delta * -1];\n let siblingOffset = currentPosition[isHorizontal ? 'width' : 'height'] * delta;\n if (immediateSibling) {\n const start = isHorizontal ? 'left' : 'top';\n const end = isHorizontal ? 'right' : 'bottom';\n // Get the spacing between the start of the current item and the end of the one immediately\n // after it in the direction in which the user is dragging, or vice versa. We add it to the\n // offset in order to push the element to where it will be when it's inline and is influenced\n // by the `margin` of its siblings.\n if (delta === -1) {\n siblingOffset -= immediateSibling.clientRect[start] - currentPosition[end];\n } else {\n siblingOffset += currentPosition[start] - immediateSibling.clientRect[end];\n }\n }\n return siblingOffset;\n }\n /**\n * Checks if pointer is entering in the first position\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n */\n _shouldEnterAsFirstChild(pointerX, pointerY) {\n if (!this._activeDraggables.length) {\n return false;\n }\n const itemPositions = this._itemPositions;\n const isHorizontal = this.orientation === 'horizontal';\n // `itemPositions` are sorted by position while `activeDraggables` are sorted by child index\n // check if container is using some sort of \"reverse\" ordering (eg: flex-direction: row-reverse)\n const reversed = itemPositions[0].drag !== this._activeDraggables[0];\n if (reversed) {\n const lastItemRect = itemPositions[itemPositions.length - 1].clientRect;\n return isHorizontal ? pointerX >= lastItemRect.right : pointerY >= lastItemRect.bottom;\n } else {\n const firstItemRect = itemPositions[0].clientRect;\n return isHorizontal ? pointerX <= firstItemRect.left : pointerY <= firstItemRect.top;\n }\n }\n /**\n * Gets the index of an item in the drop container, based on the position of the user's pointer.\n * @param item Item that is being sorted.\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n * @param delta Direction in which the user is moving their pointer.\n */\n _getItemIndexFromPointerPosition(item, pointerX, pointerY, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n const index = this._itemPositions.findIndex(({\n drag,\n clientRect\n }) => {\n // Skip the item itself.\n if (drag === item) {\n return false;\n }\n if (delta) {\n const direction = isHorizontal ? delta.x : delta.y;\n // If the user is still hovering over the same item as last time, their cursor hasn't left\n // the item after we made the swap, and they didn't change the direction in which they're\n // dragging, we don't consider it a direction swap.\n if (drag === this._previousSwap.drag && this._previousSwap.overlaps && direction === this._previousSwap.delta) {\n return false;\n }\n }\n return isHorizontal ?\n // Round these down since most browsers report client rects with\n // sub-pixel precision, whereas the pointer coordinates are rounded to pixels.\n pointerX >= Math.floor(clientRect.left) && pointerX < Math.floor(clientRect.right) : pointerY >= Math.floor(clientRect.top) && pointerY < Math.floor(clientRect.bottom);\n });\n return index === -1 || !this._sortPredicate(index, item) ? -1 : index;\n }\n}\n\n/**\n * Proximity, as a ratio to width/height, at which a\n * dragged item will affect the drop container.\n */\nconst DROP_PROXIMITY_THRESHOLD = 0.05;\n/**\n * Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the\n * viewport. The value comes from trying it out manually until it feels right.\n */\nconst SCROLL_PROXIMITY_THRESHOLD = 0.05;\n/**\n * Reference to a drop list. Used to manipulate or dispose of the container.\n */\nclass DropListRef {\n constructor(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {\n this._dragDropRegistry = _dragDropRegistry;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n /** Whether starting a dragging sequence from this container is disabled. */\n this.disabled = false;\n /** Whether sorting items within the list is disabled. */\n this.sortingDisabled = false;\n /**\n * Whether auto-scrolling the view when the user\n * moves their pointer close to the edges is disabled.\n */\n this.autoScrollDisabled = false;\n /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n this.autoScrollStep = 2;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = () => true;\n /** Function that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = () => true;\n /** Emits right before dragging has started. */\n this.beforeStarted = new Subject();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new Subject();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new Subject();\n /** Emits when the user drops an item inside the container. */\n this.dropped = new Subject();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new Subject();\n /** Emits when a dragging sequence is started in a list connected to the current one. */\n this.receivingStarted = new Subject();\n /** Emits when a dragging sequence is stopped from a list connected to the current one. */\n this.receivingStopped = new Subject();\n /** Whether an item in the list is being dragged. */\n this._isDragging = false;\n /** Draggable items in the container. */\n this._draggables = [];\n /** Drop lists that are connected to the current one. */\n this._siblings = [];\n /** Connected siblings that currently have a dragged item. */\n this._activeSiblings = new Set();\n /** Subscription to the window being scrolled. */\n this._viewportScrollSubscription = Subscription.EMPTY;\n /** Vertical direction in which the list is currently scrolling. */\n this._verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n /** Horizontal direction in which the list is currently scrolling. */\n this._horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n /** Used to signal to the current auto-scroll sequence when to stop. */\n this._stopScrollTimers = new Subject();\n /** Shadow root of the current element. Necessary for `elementFromPoint` to resolve correctly. */\n this._cachedShadowRoot = null;\n /** Starts the interval that'll auto-scroll the element. */\n this._startScrollInterval = () => {\n this._stopScrolling();\n interval(0, animationFrameScheduler).pipe(takeUntil(this._stopScrollTimers)).subscribe(() => {\n const node = this._scrollNode;\n const scrollStep = this.autoScrollStep;\n if (this._verticalScrollDirection === 1 /* AutoScrollVerticalDirection.UP */) {\n node.scrollBy(0, -scrollStep);\n } else if (this._verticalScrollDirection === 2 /* AutoScrollVerticalDirection.DOWN */) {\n node.scrollBy(0, scrollStep);\n }\n if (this._horizontalScrollDirection === 1 /* AutoScrollHorizontalDirection.LEFT */) {\n node.scrollBy(-scrollStep, 0);\n } else if (this._horizontalScrollDirection === 2 /* AutoScrollHorizontalDirection.RIGHT */) {\n node.scrollBy(scrollStep, 0);\n }\n });\n };\n this.element = coerceElement(element);\n this._document = _document;\n this.withScrollableParents([this.element]);\n _dragDropRegistry.registerDropContainer(this);\n this._parentPositions = new ParentPositionTracker(_document);\n this._sortStrategy = new SingleAxisSortStrategy(this.element, _dragDropRegistry);\n this._sortStrategy.withSortPredicate((index, item) => this.sortPredicate(index, item, this));\n }\n /** Removes the drop list functionality from the DOM element. */\n dispose() {\n this._stopScrolling();\n this._stopScrollTimers.complete();\n this._viewportScrollSubscription.unsubscribe();\n this.beforeStarted.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this.sorted.complete();\n this.receivingStarted.complete();\n this.receivingStopped.complete();\n this._activeSiblings.clear();\n this._scrollNode = null;\n this._parentPositions.clear();\n this._dragDropRegistry.removeDropContainer(this);\n }\n /** Whether an item from this list is currently being dragged. */\n isDragging() {\n return this._isDragging;\n }\n /** Starts dragging an item. */\n start() {\n this._draggingStarted();\n this._notifyReceivingSiblings();\n }\n /**\n * Attempts to move an item into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param index Index at which the item entered. If omitted, the container will try to figure it\n * out automatically.\n */\n enter(item, pointerX, pointerY, index) {\n this._draggingStarted();\n // If sorting is disabled, we want the item to return to its starting\n // position if the user is returning it to its initial container.\n if (index == null && this.sortingDisabled) {\n index = this._draggables.indexOf(item);\n }\n this._sortStrategy.enter(item, pointerX, pointerY, index);\n // Note that this usually happens inside `_draggingStarted` as well, but the dimensions\n // can change when the sort strategy moves the item around inside `enter`.\n this._cacheParentPositions();\n // Notify siblings at the end so that the item has been inserted into the `activeDraggables`.\n this._notifyReceivingSiblings();\n this.entered.next({\n item,\n container: this,\n currentIndex: this.getItemIndex(item)\n });\n }\n /**\n * Removes an item from the container after it was dragged into another container by the user.\n * @param item Item that was dragged out.\n */\n exit(item) {\n this._reset();\n this.exited.next({\n item,\n container: this\n });\n }\n /**\n * Drops an item into this container.\n * @param item Item being dropped into the container.\n * @param currentIndex Index at which the item should be inserted.\n * @param previousIndex Index of the item when dragging started.\n * @param previousContainer Container from which the item got dragged in.\n * @param isPointerOverContainer Whether the user's pointer was over the\n * container when the item was dropped.\n * @param distance Distance the user has dragged since the start of the dragging sequence.\n * @param event Event that triggered the dropping sequence.\n *\n * @breaking-change 15.0.0 `previousIndex` and `event` parameters to become required.\n */\n drop(item, currentIndex, previousIndex, previousContainer, isPointerOverContainer, distance, dropPoint, event = {}) {\n this._reset();\n this.dropped.next({\n item,\n currentIndex,\n previousIndex,\n container: this,\n previousContainer,\n isPointerOverContainer,\n distance,\n dropPoint,\n event\n });\n }\n /**\n * Sets the draggable items that are a part of this list.\n * @param items Items that are a part of this list.\n */\n withItems(items) {\n const previousItems = this._draggables;\n this._draggables = items;\n items.forEach(item => item._withDropContainer(this));\n if (this.isDragging()) {\n const draggedItems = previousItems.filter(item => item.isDragging());\n // If all of the items being dragged were removed\n // from the list, abort the current drag sequence.\n if (draggedItems.every(item => items.indexOf(item) === -1)) {\n this._reset();\n } else {\n this._sortStrategy.withItems(this._draggables);\n }\n }\n return this;\n }\n /** Sets the layout direction of the drop list. */\n withDirection(direction) {\n this._sortStrategy.direction = direction;\n return this;\n }\n /**\n * Sets the containers that are connected to this one. When two or more containers are\n * connected, the user will be allowed to transfer items between them.\n * @param connectedTo Other containers that the current containers should be connected to.\n */\n connectedTo(connectedTo) {\n this._siblings = connectedTo.slice();\n return this;\n }\n /**\n * Sets the orientation of the container.\n * @param orientation New orientation for the container.\n */\n withOrientation(orientation) {\n // TODO(crisbeto): eventually we should be constructing the new sort strategy here based on\n // the new orientation. For now we can assume that it'll always be `SingleAxisSortStrategy`.\n this._sortStrategy.orientation = orientation;\n return this;\n }\n /**\n * Sets which parent elements are can be scrolled while the user is dragging.\n * @param elements Elements that can be scrolled.\n */\n withScrollableParents(elements) {\n const element = coerceElement(this.element);\n // We always allow the current element to be scrollable\n // so we need to ensure that it's in the array.\n this._scrollableElements = elements.indexOf(element) === -1 ? [element, ...elements] : elements.slice();\n return this;\n }\n /** Gets the scrollable parents that are registered with this drop container. */\n getScrollableParents() {\n return this._scrollableElements;\n }\n /**\n * Figures out the index of an item in the container.\n * @param item Item whose index should be determined.\n */\n getItemIndex(item) {\n return this._isDragging ? this._sortStrategy.getItemIndex(item) : this._draggables.indexOf(item);\n }\n /**\n * Whether the list is able to receive the item that\n * is currently being dragged inside a connected drop list.\n */\n isReceiving() {\n return this._activeSiblings.size > 0;\n }\n /**\n * Sorts an item inside the container based on its position.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDelta Direction in which the pointer is moving along each axis.\n */\n _sortItem(item, pointerX, pointerY, pointerDelta) {\n // Don't sort the item if sorting is disabled or it's out of range.\n if (this.sortingDisabled || !this._clientRect || !isPointerNearClientRect(this._clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n return;\n }\n const result = this._sortStrategy.sort(item, pointerX, pointerY, pointerDelta);\n if (result) {\n this.sorted.next({\n previousIndex: result.previousIndex,\n currentIndex: result.currentIndex,\n container: this,\n item\n });\n }\n }\n /**\n * Checks whether the user's pointer is close to the edges of either the\n * viewport or the drop list and starts the auto-scroll sequence.\n * @param pointerX User's pointer position along the x axis.\n * @param pointerY User's pointer position along the y axis.\n */\n _startScrollingIfNecessary(pointerX, pointerY) {\n if (this.autoScrollDisabled) {\n return;\n }\n let scrollNode;\n let verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n let horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n // Check whether we should start scrolling any of the parent containers.\n this._parentPositions.positions.forEach((position, element) => {\n // We have special handling for the `document` below. Also this would be\n // nicer with a for...of loop, but it requires changing a compiler flag.\n if (element === this._document || !position.clientRect || scrollNode) {\n return;\n }\n if (isPointerNearClientRect(position.clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n [verticalScrollDirection, horizontalScrollDirection] = getElementScrollDirections(element, position.clientRect, pointerX, pointerY);\n if (verticalScrollDirection || horizontalScrollDirection) {\n scrollNode = element;\n }\n }\n });\n // Otherwise check if we can start scrolling the viewport.\n if (!verticalScrollDirection && !horizontalScrollDirection) {\n const {\n width,\n height\n } = this._viewportRuler.getViewportSize();\n const clientRect = {\n width,\n height,\n top: 0,\n right: width,\n bottom: height,\n left: 0\n };\n verticalScrollDirection = getVerticalScrollDirection(clientRect, pointerY);\n horizontalScrollDirection = getHorizontalScrollDirection(clientRect, pointerX);\n scrollNode = window;\n }\n if (scrollNode && (verticalScrollDirection !== this._verticalScrollDirection || horizontalScrollDirection !== this._horizontalScrollDirection || scrollNode !== this._scrollNode)) {\n this._verticalScrollDirection = verticalScrollDirection;\n this._horizontalScrollDirection = horizontalScrollDirection;\n this._scrollNode = scrollNode;\n if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {\n this._ngZone.runOutsideAngular(this._startScrollInterval);\n } else {\n this._stopScrolling();\n }\n }\n }\n /** Stops any currently-running auto-scroll sequences. */\n _stopScrolling() {\n this._stopScrollTimers.next();\n }\n /** Starts the dragging sequence within the list. */\n _draggingStarted() {\n const styles = coerceElement(this.element).style;\n this.beforeStarted.next();\n this._isDragging = true;\n // We need to disable scroll snapping while the user is dragging, because it breaks automatic\n // scrolling. The browser seems to round the value based on the snapping points which means\n // that we can't increment/decrement the scroll position.\n this._initialScrollSnap = styles.msScrollSnapType || styles.scrollSnapType || '';\n styles.scrollSnapType = styles.msScrollSnapType = 'none';\n this._sortStrategy.start(this._draggables);\n this._cacheParentPositions();\n this._viewportScrollSubscription.unsubscribe();\n this._listenToScrollEvents();\n }\n /** Caches the positions of the configured scrollable parents. */\n _cacheParentPositions() {\n const element = coerceElement(this.element);\n this._parentPositions.cache(this._scrollableElements);\n // The list element is always in the `scrollableElements`\n // so we can take advantage of the cached `ClientRect`.\n this._clientRect = this._parentPositions.positions.get(element).clientRect;\n }\n /** Resets the container to its initial state. */\n _reset() {\n this._isDragging = false;\n const styles = coerceElement(this.element).style;\n styles.scrollSnapType = styles.msScrollSnapType = this._initialScrollSnap;\n this._siblings.forEach(sibling => sibling._stopReceiving(this));\n this._sortStrategy.reset();\n this._stopScrolling();\n this._viewportScrollSubscription.unsubscribe();\n this._parentPositions.clear();\n }\n /**\n * Checks whether the user's pointer is positioned over the container.\n * @param x Pointer position along the X axis.\n * @param y Pointer position along the Y axis.\n */\n _isOverContainer(x, y) {\n return this._clientRect != null && isInsideClientRect(this._clientRect, x, y);\n }\n /**\n * Figures out whether an item should be moved into a sibling\n * drop container, based on its current position.\n * @param item Drag item that is being moved.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _getSiblingContainerFromPosition(item, x, y) {\n return this._siblings.find(sibling => sibling._canReceive(item, x, y));\n }\n /**\n * Checks whether the drop list can receive the passed-in item.\n * @param item Item that is being dragged into the list.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _canReceive(item, x, y) {\n if (!this._clientRect || !isInsideClientRect(this._clientRect, x, y) || !this.enterPredicate(item, this)) {\n return false;\n }\n const elementFromPoint = this._getShadowRoot().elementFromPoint(x, y);\n // If there's no element at the pointer position, then\n // the client rect is probably scrolled out of the view.\n if (!elementFromPoint) {\n return false;\n }\n const nativeElement = coerceElement(this.element);\n // The `ClientRect`, that we're using to find the container over which the user is\n // hovering, doesn't give us any information on whether the element has been scrolled\n // out of the view or whether it's overlapping with other containers. This means that\n // we could end up transferring the item into a container that's invisible or is positioned\n // below another one. We use the result from `elementFromPoint` to get the top-most element\n // at the pointer position and to find whether it's one of the intersecting drop containers.\n return elementFromPoint === nativeElement || nativeElement.contains(elementFromPoint);\n }\n /**\n * Called by one of the connected drop lists when a dragging sequence has started.\n * @param sibling Sibling in which dragging has started.\n */\n _startReceiving(sibling, items) {\n const activeSiblings = this._activeSiblings;\n if (!activeSiblings.has(sibling) && items.every(item => {\n // Note that we have to add an exception to the `enterPredicate` for items that started off\n // in this drop list. The drag ref has logic that allows an item to return to its initial\n // container, if it has left the initial container and none of the connected containers\n // allow it to enter. See `DragRef._updateActiveDropContainer` for more context.\n return this.enterPredicate(item, this) || this._draggables.indexOf(item) > -1;\n })) {\n activeSiblings.add(sibling);\n this._cacheParentPositions();\n this._listenToScrollEvents();\n this.receivingStarted.next({\n initiator: sibling,\n receiver: this,\n items\n });\n }\n }\n /**\n * Called by a connected drop list when dragging has stopped.\n * @param sibling Sibling whose dragging has stopped.\n */\n _stopReceiving(sibling) {\n this._activeSiblings.delete(sibling);\n this._viewportScrollSubscription.unsubscribe();\n this.receivingStopped.next({\n initiator: sibling,\n receiver: this\n });\n }\n /**\n * Starts listening to scroll events on the viewport.\n * Used for updating the internal state of the list.\n */\n _listenToScrollEvents() {\n this._viewportScrollSubscription = this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(event => {\n if (this.isDragging()) {\n const scrollDifference = this._parentPositions.handleScroll(event);\n if (scrollDifference) {\n this._sortStrategy.updateOnScroll(scrollDifference.top, scrollDifference.left);\n }\n } else if (this.isReceiving()) {\n this._cacheParentPositions();\n }\n });\n }\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n _getShadowRoot() {\n if (!this._cachedShadowRoot) {\n const shadowRoot = _getShadowRoot(coerceElement(this.element));\n this._cachedShadowRoot = shadowRoot || this._document;\n }\n return this._cachedShadowRoot;\n }\n /** Notifies any siblings that may potentially receive the item. */\n _notifyReceivingSiblings() {\n const draggedItems = this._sortStrategy.getActiveItemsSnapshot().filter(item => item.isDragging());\n this._siblings.forEach(sibling => sibling._startReceiving(this, draggedItems));\n }\n}\n/**\n * Gets whether the vertical auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getVerticalScrollDirection(clientRect, pointerY) {\n const {\n top,\n bottom,\n height\n } = clientRect;\n const yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {\n return 1 /* AutoScrollVerticalDirection.UP */;\n } else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {\n return 2 /* AutoScrollVerticalDirection.DOWN */;\n }\n\n return 0 /* AutoScrollVerticalDirection.NONE */;\n}\n/**\n * Gets whether the horizontal auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerX Position of the user's pointer along the x axis.\n */\nfunction getHorizontalScrollDirection(clientRect, pointerX) {\n const {\n left,\n right,\n width\n } = clientRect;\n const xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {\n return 1 /* AutoScrollHorizontalDirection.LEFT */;\n } else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {\n return 2 /* AutoScrollHorizontalDirection.RIGHT */;\n }\n\n return 0 /* AutoScrollHorizontalDirection.NONE */;\n}\n/**\n * Gets the directions in which an element node should be scrolled,\n * assuming that the user's pointer is already within it scrollable region.\n * @param element Element for which we should calculate the scroll direction.\n * @param clientRect Bounding client rectangle of the element.\n * @param pointerX Position of the user's pointer along the x axis.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getElementScrollDirections(element, clientRect, pointerX, pointerY) {\n const computedVertical = getVerticalScrollDirection(clientRect, pointerY);\n const computedHorizontal = getHorizontalScrollDirection(clientRect, pointerX);\n let verticalScrollDirection = 0 /* AutoScrollVerticalDirection.NONE */;\n let horizontalScrollDirection = 0 /* AutoScrollHorizontalDirection.NONE */;\n // Note that we here we do some extra checks for whether the element is actually scrollable in\n // a certain direction and we only assign the scroll direction if it is. We do this so that we\n // can allow other elements to be scrolled, if the current element can't be scrolled anymore.\n // This allows us to handle cases where the scroll regions of two scrollable elements overlap.\n if (computedVertical) {\n const scrollTop = element.scrollTop;\n if (computedVertical === 1 /* AutoScrollVerticalDirection.UP */) {\n if (scrollTop > 0) {\n verticalScrollDirection = 1 /* AutoScrollVerticalDirection.UP */;\n }\n } else if (element.scrollHeight - scrollTop > element.clientHeight) {\n verticalScrollDirection = 2 /* AutoScrollVerticalDirection.DOWN */;\n }\n }\n\n if (computedHorizontal) {\n const scrollLeft = element.scrollLeft;\n if (computedHorizontal === 1 /* AutoScrollHorizontalDirection.LEFT */) {\n if (scrollLeft > 0) {\n horizontalScrollDirection = 1 /* AutoScrollHorizontalDirection.LEFT */;\n }\n } else if (element.scrollWidth - scrollLeft > element.clientWidth) {\n horizontalScrollDirection = 2 /* AutoScrollHorizontalDirection.RIGHT */;\n }\n }\n\n return [verticalScrollDirection, horizontalScrollDirection];\n}\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: false,\n capture: true\n});\n/**\n * Service that keeps track of all the drag item and drop container\n * instances, and manages global event listeners on the `document`.\n * @docs-private\n */\n// Note: this class is generic, rather than referencing CdkDrag and CdkDropList directly, in order\n// to avoid circular imports. If we were to reference them here, importing the registry into the\n// classes that are registering themselves will introduce a circular import.\nlet DragDropRegistry = /*#__PURE__*/(() => {\n class DragDropRegistry {\n constructor(_ngZone, _document) {\n this._ngZone = _ngZone;\n /** Registered drop container instances. */\n this._dropInstances = new Set();\n /** Registered drag item instances. */\n this._dragInstances = new Set();\n /** Drag item instances that are currently being dragged. */\n this._activeDragInstances = [];\n /** Keeps track of the event listeners that we've bound to the `document`. */\n this._globalListeners = new Map();\n /**\n * Predicate function to check if an item is being dragged. Moved out into a property,\n * because it'll be called a lot and we don't want to create a new function every time.\n */\n this._draggingPredicate = item => item.isDragging();\n /**\n * Emits the `touchmove` or `mousemove` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerMove = new Subject();\n /**\n * Emits the `touchend` or `mouseup` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerUp = new Subject();\n /**\n * Emits when the viewport has been scrolled while the user is dragging an item.\n * @deprecated To be turned into a private member. Use the `scrolled` method instead.\n * @breaking-change 13.0.0\n */\n this.scroll = new Subject();\n /**\n * Event listener that will prevent the default browser action while the user is dragging.\n * @param event Event whose default action should be prevented.\n */\n this._preventDefaultWhileDragging = event => {\n if (this._activeDragInstances.length > 0) {\n event.preventDefault();\n }\n };\n /** Event listener for `touchmove` that is bound even if no dragging is happening. */\n this._persistentTouchmoveListener = event => {\n if (this._activeDragInstances.length > 0) {\n // Note that we only want to prevent the default action after dragging has actually started.\n // Usually this is the same time at which the item is added to the `_activeDragInstances`,\n // but it could be pushed back if the user has set up a drag delay or threshold.\n if (this._activeDragInstances.some(this._draggingPredicate)) {\n event.preventDefault();\n }\n this.pointerMove.next(event);\n }\n };\n this._document = _document;\n }\n /** Adds a drop container to the registry. */\n registerDropContainer(drop) {\n if (!this._dropInstances.has(drop)) {\n this._dropInstances.add(drop);\n }\n }\n /** Adds a drag item instance to the registry. */\n registerDragItem(drag) {\n this._dragInstances.add(drag);\n // The `touchmove` event gets bound once, ahead of time, because WebKit\n // won't preventDefault on a dynamically-added `touchmove` listener.\n // See https://bugs.webkit.org/show_bug.cgi?id=184250.\n if (this._dragInstances.size === 1) {\n this._ngZone.runOutsideAngular(() => {\n // The event handler has to be explicitly active,\n // because newer browsers make it passive by default.\n this._document.addEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);\n });\n }\n }\n /** Removes a drop container from the registry. */\n removeDropContainer(drop) {\n this._dropInstances.delete(drop);\n }\n /** Removes a drag item instance from the registry. */\n removeDragItem(drag) {\n this._dragInstances.delete(drag);\n this.stopDragging(drag);\n if (this._dragInstances.size === 0) {\n this._document.removeEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);\n }\n }\n /**\n * Starts the dragging sequence for a drag instance.\n * @param drag Drag instance which is being dragged.\n * @param event Event that initiated the dragging.\n */\n startDragging(drag, event) {\n // Do not process the same drag twice to avoid memory leaks and redundant listeners\n if (this._activeDragInstances.indexOf(drag) > -1) {\n return;\n }\n this._activeDragInstances.push(drag);\n if (this._activeDragInstances.length === 1) {\n const isTouchEvent = event.type.startsWith('touch');\n // We explicitly bind __active__ listeners here, because newer browsers will default to\n // passive ones for `mousemove` and `touchmove`. The events need to be active, because we\n // use `preventDefault` to prevent the page from scrolling while the user is dragging.\n this._globalListeners.set(isTouchEvent ? 'touchend' : 'mouseup', {\n handler: e => this.pointerUp.next(e),\n options: true\n }).set('scroll', {\n handler: e => this.scroll.next(e),\n // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't\n // the document. See https://github.com/angular/components/issues/17144.\n options: true\n })\n // Preventing the default action on `mousemove` isn't enough to disable text selection\n // on Safari so we need to prevent the selection event as well. Alternatively this can\n // be done by setting `user-select: none` on the `body`, however it has causes a style\n // recalculation which can be expensive on pages with a lot of elements.\n .set('selectstart', {\n handler: this._preventDefaultWhileDragging,\n options: activeCapturingEventOptions\n });\n // We don't have to bind a move event for touch drag sequences, because\n // we already have a persistent global one bound from `registerDragItem`.\n if (!isTouchEvent) {\n this._globalListeners.set('mousemove', {\n handler: e => this.pointerMove.next(e),\n options: activeCapturingEventOptions\n });\n }\n this._ngZone.runOutsideAngular(() => {\n this._globalListeners.forEach((config, name) => {\n this._document.addEventListener(name, config.handler, config.options);\n });\n });\n }\n }\n /** Stops dragging a drag item instance. */\n stopDragging(drag) {\n const index = this._activeDragInstances.indexOf(drag);\n if (index > -1) {\n this._activeDragInstances.splice(index, 1);\n if (this._activeDragInstances.length === 0) {\n this._clearGlobalListeners();\n }\n }\n }\n /** Gets whether a drag item instance is currently being dragged. */\n isDragging(drag) {\n return this._activeDragInstances.indexOf(drag) > -1;\n }\n /**\n * Gets a stream that will emit when any element on the page is scrolled while an item is being\n * dragged.\n * @param shadowRoot Optional shadow root that the current dragging sequence started from.\n * Top-level listeners won't pick up events coming from the shadow DOM so this parameter can\n * be used to include an additional top-level listener at the shadow root level.\n */\n scrolled(shadowRoot) {\n const streams = [this.scroll];\n if (shadowRoot && shadowRoot !== this._document) {\n // Note that this is basically the same as `fromEvent` from rxjs, but we do it ourselves,\n // because we want to guarantee that the event is bound outside of the `NgZone`. With\n // `fromEvent` it'll only happen if the subscription is outside the `NgZone`.\n streams.push(new Observable(observer => {\n return this._ngZone.runOutsideAngular(() => {\n const eventOptions = true;\n const callback = event => {\n if (this._activeDragInstances.length) {\n observer.next(event);\n }\n };\n shadowRoot.addEventListener('scroll', callback, eventOptions);\n return () => {\n shadowRoot.removeEventListener('scroll', callback, eventOptions);\n };\n });\n }));\n }\n return merge(...streams);\n }\n ngOnDestroy() {\n this._dragInstances.forEach(instance => this.removeDragItem(instance));\n this._dropInstances.forEach(instance => this.removeDropContainer(instance));\n this._clearGlobalListeners();\n this.pointerMove.complete();\n this.pointerUp.complete();\n }\n /** Clears out the global event listeners from the `document`. */\n _clearGlobalListeners() {\n this._globalListeners.forEach((config, name) => {\n this._document.removeEventListener(name, config.handler, config.options);\n });\n this._globalListeners.clear();\n }\n static {\n this.ɵfac = function DragDropRegistry_Factory(t) {\n return new (t || DragDropRegistry)(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(DOCUMENT));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DragDropRegistry,\n factory: DragDropRegistry.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DragDropRegistry;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Default configuration to be used when creating a `DragRef`. */\nconst DEFAULT_CONFIG = {\n dragStartThreshold: 5,\n pointerDirectionChangeThreshold: 5\n};\n/**\n * Service that allows for drag-and-drop functionality to be attached to DOM elements.\n */\nlet DragDrop = /*#__PURE__*/(() => {\n class DragDrop {\n constructor(_document, _ngZone, _viewportRuler, _dragDropRegistry) {\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n }\n /**\n * Turns an element into a draggable item.\n * @param element Element to which to attach the dragging functionality.\n * @param config Object used to configure the dragging behavior.\n */\n createDrag(element, config = DEFAULT_CONFIG) {\n return new DragRef(element, config, this._document, this._ngZone, this._viewportRuler, this._dragDropRegistry);\n }\n /**\n * Turns an element into a drop list.\n * @param element Element to which to attach the drop list functionality.\n */\n createDropList(element) {\n return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);\n }\n static {\n this.ɵfac = function DragDrop_Factory(t) {\n return new (t || DragDrop)(i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.ViewportRuler), i0.ɵɵinject(DragDropRegistry));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DragDrop,\n factory: DragDrop.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DragDrop;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used for a `CdkDrag` to provide itself as a parent to the\n * drag-specific child directive (`CdkDragHandle`, `CdkDragPreview` etc.). Used primarily\n * to avoid circular imports.\n * @docs-private\n */\nconst CDK_DRAG_PARENT = /*#__PURE__*/new InjectionToken('CDK_DRAG_PARENT');\n\n/**\n * Asserts that a particular node is an element.\n * @param node Node to be checked.\n * @param name Name to attach to the error message.\n */\nfunction assertElementNode(node, name) {\n if (node.nodeType !== 1) {\n throw Error(`${name} must be attached to an element node. ` + `Currently attached to \"${node.nodeName}\".`);\n }\n}\n\n/**\n * Injection token that can be used to reference instances of `CdkDragHandle`. It serves as\n * alternative token to the actual `CdkDragHandle` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_HANDLE = /*#__PURE__*/new InjectionToken('CdkDragHandle');\n/** Handle that can be used to drag a CdkDrag instance. */\nlet CdkDragHandle = /*#__PURE__*/(() => {\n class CdkDragHandle {\n /** Whether starting to drag through this handle is disabled. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = value;\n this._stateChanges.next(this);\n }\n constructor(element, parentDrag) {\n this.element = element;\n /** Emits when the state of the handle has changed. */\n this._stateChanges = new Subject();\n this._disabled = false;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDragHandle');\n }\n this._parentDrag = parentDrag;\n }\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n static {\n this.ɵfac = function CdkDragHandle_Factory(t) {\n return new (t || CdkDragHandle)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CDK_DRAG_PARENT, 12));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragHandle,\n selectors: [[\"\", \"cdkDragHandle\", \"\"]],\n hostAttrs: [1, \"cdk-drag-handle\"],\n inputs: {\n disabled: [\"cdkDragHandleDisabled\", \"disabled\", booleanAttribute]\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_HANDLE,\n useExisting: CdkDragHandle\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDragHandle;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as\n * alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_PLACEHOLDER = /*#__PURE__*/new InjectionToken('CdkDragPlaceholder');\n/**\n * Element that will be used as a template for the placeholder of a CdkDrag when\n * it is being dragged. The placeholder is displayed in place of the element being dragged.\n */\nlet CdkDragPlaceholder = /*#__PURE__*/(() => {\n class CdkDragPlaceholder {\n constructor(templateRef) {\n this.templateRef = templateRef;\n }\n static {\n this.ɵfac = function CdkDragPlaceholder_Factory(t) {\n return new (t || CdkDragPlaceholder)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragPlaceholder,\n selectors: [[\"ng-template\", \"cdkDragPlaceholder\", \"\"]],\n inputs: {\n data: \"data\"\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PLACEHOLDER,\n useExisting: CdkDragPlaceholder\n }])]\n });\n }\n }\n return CdkDragPlaceholder;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPreview`. It serves as\n * alternative token to the actual `CdkDragPreview` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_PREVIEW = /*#__PURE__*/new InjectionToken('CdkDragPreview');\n/**\n * Element that will be used as a template for the preview\n * of a CdkDrag when it is being dragged.\n */\nlet CdkDragPreview = /*#__PURE__*/(() => {\n class CdkDragPreview {\n constructor(templateRef) {\n this.templateRef = templateRef;\n /** Whether the preview should preserve the same size as the item that is being dragged. */\n this.matchSize = false;\n }\n static {\n this.ɵfac = function CdkDragPreview_Factory(t) {\n return new (t || CdkDragPreview)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragPreview,\n selectors: [[\"ng-template\", \"cdkDragPreview\", \"\"]],\n inputs: {\n data: \"data\",\n matchSize: [\"matchSize\", \"matchSize\", booleanAttribute]\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PREVIEW,\n useExisting: CdkDragPreview\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDragPreview;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to configure the\n * behavior of the drag&drop-related components.\n */\nconst CDK_DRAG_CONFIG = /*#__PURE__*/new InjectionToken('CDK_DRAG_CONFIG');\nconst DRAG_HOST_CLASS = 'cdk-drag';\n/**\n * Injection token that can be used to reference instances of `CdkDropList`. It serves as\n * alternative token to the actual `CdkDropList` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DROP_LIST = /*#__PURE__*/new InjectionToken('CdkDropList');\n/** Element that can be moved inside a CdkDropList container. */\nlet CdkDrag = /*#__PURE__*/(() => {\n class CdkDrag {\n static {\n this._dragInstances = [];\n }\n /** Whether starting to drag this element is disabled. */\n get disabled() {\n return this._disabled || this.dropContainer && this.dropContainer.disabled;\n }\n set disabled(value) {\n this._disabled = value;\n this._dragRef.disabled = this._disabled;\n }\n constructor( /** Element that the draggable is attached to. */\n element, /** Droppable container that the draggable is a part of. */\n dropContainer,\n /**\n * @deprecated `_document` parameter no longer being used and will be removed.\n * @breaking-change 12.0.0\n */\n _document, _ngZone, _viewContainerRef, config, _dir, dragDrop, _changeDetectorRef, _selfHandle, _parentDrag) {\n this.element = element;\n this.dropContainer = dropContainer;\n this._ngZone = _ngZone;\n this._viewContainerRef = _viewContainerRef;\n this._dir = _dir;\n this._changeDetectorRef = _changeDetectorRef;\n this._selfHandle = _selfHandle;\n this._parentDrag = _parentDrag;\n this._destroyed = new Subject();\n /** Emits when the user starts dragging the item. */\n this.started = new EventEmitter();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new EventEmitter();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new EventEmitter();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new EventEmitter();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new EventEmitter();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new EventEmitter();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = new Observable(observer => {\n const subscription = this._dragRef.moved.pipe(map(movedEvent => ({\n source: this,\n pointerPosition: movedEvent.pointerPosition,\n event: movedEvent.event,\n delta: movedEvent.delta,\n distance: movedEvent.distance\n }))).subscribe(observer);\n return () => {\n subscription.unsubscribe();\n };\n });\n this._dragRef = dragDrop.createDrag(element, {\n dragStartThreshold: config && config.dragStartThreshold != null ? config.dragStartThreshold : 5,\n pointerDirectionChangeThreshold: config && config.pointerDirectionChangeThreshold != null ? config.pointerDirectionChangeThreshold : 5,\n zIndex: config?.zIndex\n });\n this._dragRef.data = this;\n // We have to keep track of the drag instances in order to be able to match an element to\n // a drag instance. We can't go through the global registry of `DragRef`, because the root\n // element could be different.\n CdkDrag._dragInstances.push(this);\n if (config) {\n this._assignDefaults(config);\n }\n // Note that usually the container is assigned when the drop list is picks up the item, but in\n // some cases (mainly transplanted views with OnPush, see #18341) we may end up in a situation\n // where there are no items on the first change detection pass, but the items get picked up as\n // soon as the user triggers another pass by dragging. This is a problem, because the item would\n // have to switch from standalone mode to drag mode in the middle of the dragging sequence which\n // is too late since the two modes save different kinds of information. We work around it by\n // assigning the drop container both from here and the list.\n if (dropContainer) {\n this._dragRef._withDropContainer(dropContainer._dropListRef);\n dropContainer.addItem(this);\n }\n this._syncInputs(this._dragRef);\n this._handleEvents(this._dragRef);\n }\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement() {\n return this._dragRef.getPlaceholderElement();\n }\n /** Returns the root draggable element. */\n getRootElement() {\n return this._dragRef.getRootElement();\n }\n /** Resets a standalone drag item to its initial position. */\n reset() {\n this._dragRef.reset();\n }\n /**\n * Gets the pixel coordinates of the draggable outside of a drop container.\n */\n getFreeDragPosition() {\n return this._dragRef.getFreeDragPosition();\n }\n /**\n * Sets the current position in pixels the draggable outside of a drop container.\n * @param value New position to be set.\n */\n setFreeDragPosition(value) {\n this._dragRef.setFreeDragPosition(value);\n }\n ngAfterViewInit() {\n // Normally this isn't in the zone, but it can cause major performance regressions for apps\n // using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.\n this._ngZone.runOutsideAngular(() => {\n // We need to wait for the zone to stabilize, in order for the reference\n // element to be in the proper place in the DOM. This is mostly relevant\n // for draggable elements inside portals since they get stamped out in\n // their original DOM position and then they get transferred to the portal.\n this._ngZone.onStable.pipe(take(1), takeUntil(this._destroyed)).subscribe(() => {\n this._updateRootElement();\n this._setupHandlesListener();\n if (this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n });\n });\n }\n ngOnChanges(changes) {\n const rootSelectorChange = changes['rootElementSelector'];\n const positionChange = changes['freeDragPosition'];\n // We don't have to react to the first change since it's being\n // handled in `ngAfterViewInit` where it needs to be deferred.\n if (rootSelectorChange && !rootSelectorChange.firstChange) {\n this._updateRootElement();\n }\n // Skip the first change since it's being handled in `ngAfterViewInit`.\n if (positionChange && !positionChange.firstChange && this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n }\n ngOnDestroy() {\n if (this.dropContainer) {\n this.dropContainer.removeItem(this);\n }\n const index = CdkDrag._dragInstances.indexOf(this);\n if (index > -1) {\n CdkDrag._dragInstances.splice(index, 1);\n }\n // Unnecessary in most cases, but used to avoid extra change detections with `zone-paths-rxjs`.\n this._ngZone.runOutsideAngular(() => {\n this._destroyed.next();\n this._destroyed.complete();\n this._dragRef.dispose();\n });\n }\n /** Syncs the root element with the `DragRef`. */\n _updateRootElement() {\n const element = this.element.nativeElement;\n let rootElement = element;\n if (this.rootElementSelector) {\n rootElement = element.closest !== undefined ? element.closest(this.rootElementSelector) :\n // Comment tag doesn't have closest method, so use parent's one.\n element.parentElement?.closest(this.rootElementSelector);\n }\n if (rootElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n assertElementNode(rootElement, 'cdkDrag');\n }\n this._dragRef.withRootElement(rootElement || element);\n }\n /** Gets the boundary element, based on the `boundaryElement` value. */\n _getBoundaryElement() {\n const boundary = this.boundaryElement;\n if (!boundary) {\n return null;\n }\n if (typeof boundary === 'string') {\n return this.element.nativeElement.closest(boundary);\n }\n return coerceElement(boundary);\n }\n /** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */\n _syncInputs(ref) {\n ref.beforeStarted.subscribe(() => {\n if (!ref.isDragging()) {\n const dir = this._dir;\n const dragStartDelay = this.dragStartDelay;\n const placeholder = this._placeholderTemplate ? {\n template: this._placeholderTemplate.templateRef,\n context: this._placeholderTemplate.data,\n viewContainer: this._viewContainerRef\n } : null;\n const preview = this._previewTemplate ? {\n template: this._previewTemplate.templateRef,\n context: this._previewTemplate.data,\n matchSize: this._previewTemplate.matchSize,\n viewContainer: this._viewContainerRef\n } : null;\n ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.dragStartDelay = typeof dragStartDelay === 'object' && dragStartDelay ? dragStartDelay : coerceNumberProperty(dragStartDelay);\n ref.constrainPosition = this.constrainPosition;\n ref.previewClass = this.previewClass;\n ref.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(placeholder).withPreviewTemplate(preview).withPreviewContainer(this.previewContainer || 'global');\n if (dir) {\n ref.withDirection(dir.value);\n }\n }\n });\n // This only needs to be resolved once.\n ref.beforeStarted.pipe(take(1)).subscribe(() => {\n // If we managed to resolve a parent through DI, use it.\n if (this._parentDrag) {\n ref.withParent(this._parentDrag._dragRef);\n return;\n }\n // Otherwise fall back to resolving the parent by looking up the DOM. This can happen if\n // the item was projected into another item by something like `ngTemplateOutlet`.\n let parent = this.element.nativeElement.parentElement;\n while (parent) {\n if (parent.classList.contains(DRAG_HOST_CLASS)) {\n ref.withParent(CdkDrag._dragInstances.find(drag => {\n return drag.element.nativeElement === parent;\n })?._dragRef || null);\n break;\n }\n parent = parent.parentElement;\n }\n });\n }\n /** Handles the events from the underlying `DragRef`. */\n _handleEvents(ref) {\n ref.started.subscribe(startEvent => {\n this.started.emit({\n source: this,\n event: startEvent.event\n });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n this._changeDetectorRef.markForCheck();\n });\n ref.released.subscribe(releaseEvent => {\n this.released.emit({\n source: this,\n event: releaseEvent.event\n });\n });\n ref.ended.subscribe(endEvent => {\n this.ended.emit({\n source: this,\n distance: endEvent.distance,\n dropPoint: endEvent.dropPoint,\n event: endEvent.event\n });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(enterEvent => {\n this.entered.emit({\n container: enterEvent.container.data,\n item: this,\n currentIndex: enterEvent.currentIndex\n });\n });\n ref.exited.subscribe(exitEvent => {\n this.exited.emit({\n container: exitEvent.container.data,\n item: this\n });\n });\n ref.dropped.subscribe(dropEvent => {\n this.dropped.emit({\n previousIndex: dropEvent.previousIndex,\n currentIndex: dropEvent.currentIndex,\n previousContainer: dropEvent.previousContainer.data,\n container: dropEvent.container.data,\n isPointerOverContainer: dropEvent.isPointerOverContainer,\n item: this,\n distance: dropEvent.distance,\n dropPoint: dropEvent.dropPoint,\n event: dropEvent.event\n });\n });\n }\n /** Assigns the default input values based on a provided config object. */\n _assignDefaults(config) {\n const {\n lockAxis,\n dragStartDelay,\n constrainPosition,\n previewClass,\n boundaryElement,\n draggingDisabled,\n rootElementSelector,\n previewContainer\n } = config;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.dragStartDelay = dragStartDelay || 0;\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n if (constrainPosition) {\n this.constrainPosition = constrainPosition;\n }\n if (previewClass) {\n this.previewClass = previewClass;\n }\n if (boundaryElement) {\n this.boundaryElement = boundaryElement;\n }\n if (rootElementSelector) {\n this.rootElementSelector = rootElementSelector;\n }\n if (previewContainer) {\n this.previewContainer = previewContainer;\n }\n }\n /** Sets up the listener that syncs the handles with the drag ref. */\n _setupHandlesListener() {\n // Listen for any newly-added handles.\n this._handles.changes.pipe(startWith(this._handles),\n // Sync the new handles with the DragRef.\n tap(handles => {\n const childHandleElements = handles.filter(handle => handle._parentDrag === this).map(handle => handle.element);\n // Usually handles are only allowed to be a descendant of the drag element, but if\n // the consumer defined a different drag root, we should allow the drag element\n // itself to be a handle too.\n if (this._selfHandle && this.rootElementSelector) {\n childHandleElements.push(this.element);\n }\n this._dragRef.withHandles(childHandleElements);\n }),\n // Listen if the state of any of the handles changes.\n switchMap(handles => {\n return merge(...handles.map(item => {\n return item._stateChanges.pipe(startWith(item));\n }));\n }), takeUntil(this._destroyed)).subscribe(handleInstance => {\n // Enabled/disable the handle that changed in the DragRef.\n const dragRef = this._dragRef;\n const handle = handleInstance.element.nativeElement;\n handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);\n });\n }\n static {\n this.ɵfac = function CdkDrag_Factory(t) {\n return new (t || CdkDrag)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CDK_DROP_LIST, 12), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(CDK_DRAG_CONFIG, 8), i0.ɵɵdirectiveInject(i1$1.Directionality, 8), i0.ɵɵdirectiveInject(DragDrop), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(CDK_DRAG_HANDLE, 10), i0.ɵɵdirectiveInject(CDK_DRAG_PARENT, 12));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDrag,\n selectors: [[\"\", \"cdkDrag\", \"\"]],\n contentQueries: function CdkDrag_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, CDK_DRAG_PREVIEW, 5);\n i0.ɵɵcontentQuery(dirIndex, CDK_DRAG_PLACEHOLDER, 5);\n i0.ɵɵcontentQuery(dirIndex, CDK_DRAG_HANDLE, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._previewTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._placeholderTemplate = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._handles = _t);\n }\n },\n hostAttrs: [1, \"cdk-drag\"],\n hostVars: 4,\n hostBindings: function CdkDrag_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"cdk-drag-disabled\", ctx.disabled)(\"cdk-drag-dragging\", ctx._dragRef.isDragging());\n }\n },\n inputs: {\n data: [\"cdkDragData\", \"data\"],\n lockAxis: [\"cdkDragLockAxis\", \"lockAxis\"],\n rootElementSelector: [\"cdkDragRootElement\", \"rootElementSelector\"],\n boundaryElement: [\"cdkDragBoundary\", \"boundaryElement\"],\n dragStartDelay: [\"cdkDragStartDelay\", \"dragStartDelay\"],\n freeDragPosition: [\"cdkDragFreeDragPosition\", \"freeDragPosition\"],\n disabled: [\"cdkDragDisabled\", \"disabled\", booleanAttribute],\n constrainPosition: [\"cdkDragConstrainPosition\", \"constrainPosition\"],\n previewClass: [\"cdkDragPreviewClass\", \"previewClass\"],\n previewContainer: [\"cdkDragPreviewContainer\", \"previewContainer\"]\n },\n outputs: {\n started: \"cdkDragStarted\",\n released: \"cdkDragReleased\",\n ended: \"cdkDragEnded\",\n entered: \"cdkDragEntered\",\n exited: \"cdkDragExited\",\n dropped: \"cdkDragDropped\",\n moved: \"cdkDragMoved\"\n },\n exportAs: [\"cdkDrag\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PARENT,\n useExisting: CdkDrag\n }]), i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return CdkDrag;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDropListGroup`. It serves as\n * alternative token to the actual `CdkDropListGroup` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DROP_LIST_GROUP = /*#__PURE__*/new InjectionToken('CdkDropListGroup');\n/**\n * Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList`\n * elements that are placed inside a `cdkDropListGroup` will be connected to each other\n * automatically. Can be used as an alternative to the `cdkDropListConnectedTo` input\n * from `cdkDropList`.\n */\nlet CdkDropListGroup = /*#__PURE__*/(() => {\n class CdkDropListGroup {\n constructor() {\n /** Drop lists registered inside the group. */\n this._items = new Set();\n /** Whether starting a dragging sequence from inside this group is disabled. */\n this.disabled = false;\n }\n ngOnDestroy() {\n this._items.clear();\n }\n static {\n this.ɵfac = function CdkDropListGroup_Factory(t) {\n return new (t || CdkDropListGroup)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDropListGroup,\n selectors: [[\"\", \"cdkDropListGroup\", \"\"]],\n inputs: {\n disabled: [\"cdkDropListGroupDisabled\", \"disabled\", booleanAttribute]\n },\n exportAs: [\"cdkDropListGroup\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DROP_LIST_GROUP,\n useExisting: CdkDropListGroup\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDropListGroup;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Counter used to generate unique ids for drop zones. */\nlet _uniqueIdCounter = 0;\n/** Container that wraps a set of draggable items. */\nlet CdkDropList = /*#__PURE__*/(() => {\n class CdkDropList {\n /** Keeps track of the drop lists that are currently on the page. */\n static {\n this._dropLists = [];\n }\n /** Whether starting a dragging sequence from this container is disabled. */\n get disabled() {\n return this._disabled || !!this._group && this._group.disabled;\n }\n set disabled(value) {\n // Usually we sync the directive and ref state right before dragging starts, in order to have\n // a single point of failure and to avoid having to use setters for everything. `disabled` is\n // a special case, because it can prevent the `beforeStarted` event from firing, which can lock\n // the user in a disabled state, so we also need to sync it as it's being set.\n this._dropListRef.disabled = this._disabled = value;\n }\n constructor( /** Element that the drop list is attached to. */\n element, dragDrop, _changeDetectorRef, _scrollDispatcher, _dir, _group, config) {\n this.element = element;\n this._changeDetectorRef = _changeDetectorRef;\n this._scrollDispatcher = _scrollDispatcher;\n this._dir = _dir;\n this._group = _group;\n /** Emits when the list has been destroyed. */\n this._destroyed = new Subject();\n /**\n * Other draggable containers that this container is connected to and into which the\n * container's items can be transferred. Can either be references to other drop containers,\n * or their unique IDs.\n */\n this.connectedTo = [];\n /**\n * Unique ID for the drop zone. Can be used as a reference\n * in the `connectedTo` of another `CdkDropList`.\n */\n this.id = `cdk-drop-list-${_uniqueIdCounter++}`;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = () => true;\n /** Functions that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = () => true;\n /** Emits when the user drops an item inside the container. */\n this.dropped = new EventEmitter();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new EventEmitter();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new EventEmitter();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new EventEmitter();\n /**\n * Keeps track of the items that are registered with this container. Historically we used to\n * do this with a `ContentChildren` query, however queries don't handle transplanted views very\n * well which means that we can't handle cases like dragging the headers of a `mat-table`\n * correctly. What we do instead is to have the items register themselves with the container\n * and then we sort them based on their position in the DOM.\n */\n this._unsortedItems = new Set();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDropList');\n }\n this._dropListRef = dragDrop.createDropList(element);\n this._dropListRef.data = this;\n if (config) {\n this._assignDefaults(config);\n }\n this._dropListRef.enterPredicate = (drag, drop) => {\n return this.enterPredicate(drag.data, drop.data);\n };\n this._dropListRef.sortPredicate = (index, drag, drop) => {\n return this.sortPredicate(index, drag.data, drop.data);\n };\n this._setupInputSyncSubscription(this._dropListRef);\n this._handleEvents(this._dropListRef);\n CdkDropList._dropLists.push(this);\n if (_group) {\n _group._items.add(this);\n }\n }\n /** Registers an items with the drop list. */\n addItem(item) {\n this._unsortedItems.add(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n }\n /** Removes an item from the drop list. */\n removeItem(item) {\n this._unsortedItems.delete(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n }\n /** Gets the registered items in the list, sorted by their position in the DOM. */\n getSortedItems() {\n return Array.from(this._unsortedItems).sort((a, b) => {\n const documentPosition = a._dragRef.getVisibleElement().compareDocumentPosition(b._dragRef.getVisibleElement());\n // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n // tslint:disable-next-line:no-bitwise\n return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n });\n }\n ngOnDestroy() {\n const index = CdkDropList._dropLists.indexOf(this);\n if (index > -1) {\n CdkDropList._dropLists.splice(index, 1);\n }\n if (this._group) {\n this._group._items.delete(this);\n }\n this._unsortedItems.clear();\n this._dropListRef.dispose();\n this._destroyed.next();\n this._destroyed.complete();\n }\n /** Syncs the inputs of the CdkDropList with the options of the underlying DropListRef. */\n _setupInputSyncSubscription(ref) {\n if (this._dir) {\n this._dir.change.pipe(startWith(this._dir.value), takeUntil(this._destroyed)).subscribe(value => ref.withDirection(value));\n }\n ref.beforeStarted.subscribe(() => {\n const siblings = coerceArray(this.connectedTo).map(drop => {\n if (typeof drop === 'string') {\n const correspondingDropList = CdkDropList._dropLists.find(list => list.id === drop);\n if (!correspondingDropList && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n console.warn(`CdkDropList could not find connected drop list with id \"${drop}\"`);\n }\n return correspondingDropList;\n }\n return drop;\n });\n if (this._group) {\n this._group._items.forEach(drop => {\n if (siblings.indexOf(drop) === -1) {\n siblings.push(drop);\n }\n });\n }\n // Note that we resolve the scrollable parents here so that we delay the resolution\n // as long as possible, ensuring that the element is in its final place in the DOM.\n if (!this._scrollableParentsResolved) {\n const scrollableParents = this._scrollDispatcher.getAncestorScrollContainers(this.element).map(scrollable => scrollable.getElementRef().nativeElement);\n this._dropListRef.withScrollableParents(scrollableParents);\n // Only do this once since it involves traversing the DOM and the parents\n // shouldn't be able to change without the drop list being destroyed.\n this._scrollableParentsResolved = true;\n }\n ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.sortingDisabled = this.sortingDisabled;\n ref.autoScrollDisabled = this.autoScrollDisabled;\n ref.autoScrollStep = coerceNumberProperty(this.autoScrollStep, 2);\n ref.connectedTo(siblings.filter(drop => drop && drop !== this).map(list => list._dropListRef)).withOrientation(this.orientation);\n });\n }\n /** Handles events from the underlying DropListRef. */\n _handleEvents(ref) {\n ref.beforeStarted.subscribe(() => {\n this._syncItemsWithRef();\n this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(event => {\n this.entered.emit({\n container: this,\n item: event.item.data,\n currentIndex: event.currentIndex\n });\n });\n ref.exited.subscribe(event => {\n this.exited.emit({\n container: this,\n item: event.item.data\n });\n this._changeDetectorRef.markForCheck();\n });\n ref.sorted.subscribe(event => {\n this.sorted.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n container: this,\n item: event.item.data\n });\n });\n ref.dropped.subscribe(dropEvent => {\n this.dropped.emit({\n previousIndex: dropEvent.previousIndex,\n currentIndex: dropEvent.currentIndex,\n previousContainer: dropEvent.previousContainer.data,\n container: dropEvent.container.data,\n item: dropEvent.item.data,\n isPointerOverContainer: dropEvent.isPointerOverContainer,\n distance: dropEvent.distance,\n dropPoint: dropEvent.dropPoint,\n event: dropEvent.event\n });\n // Mark for check since all of these events run outside of change\n // detection and we're not guaranteed for something else to have triggered it.\n this._changeDetectorRef.markForCheck();\n });\n merge(ref.receivingStarted, ref.receivingStopped).subscribe(() => this._changeDetectorRef.markForCheck());\n }\n /** Assigns the default input values based on a provided config object. */\n _assignDefaults(config) {\n const {\n lockAxis,\n draggingDisabled,\n sortingDisabled,\n listAutoScrollDisabled,\n listOrientation\n } = config;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.sortingDisabled = sortingDisabled == null ? false : sortingDisabled;\n this.autoScrollDisabled = listAutoScrollDisabled == null ? false : listAutoScrollDisabled;\n this.orientation = listOrientation || 'vertical';\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n }\n /** Syncs up the registered drag items with underlying drop list ref. */\n _syncItemsWithRef() {\n this._dropListRef.withItems(this.getSortedItems().map(item => item._dragRef));\n }\n static {\n this.ɵfac = function CdkDropList_Factory(t) {\n return new (t || CdkDropList)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(DragDrop), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.ScrollDispatcher), i0.ɵɵdirectiveInject(i1$1.Directionality, 8), i0.ɵɵdirectiveInject(CDK_DROP_LIST_GROUP, 12), i0.ɵɵdirectiveInject(CDK_DRAG_CONFIG, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDropList,\n selectors: [[\"\", \"cdkDropList\", \"\"], [\"cdk-drop-list\"]],\n hostAttrs: [1, \"cdk-drop-list\"],\n hostVars: 7,\n hostBindings: function CdkDropList_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"id\", ctx.id);\n i0.ɵɵclassProp(\"cdk-drop-list-disabled\", ctx.disabled)(\"cdk-drop-list-dragging\", ctx._dropListRef.isDragging())(\"cdk-drop-list-receiving\", ctx._dropListRef.isReceiving());\n }\n },\n inputs: {\n connectedTo: [\"cdkDropListConnectedTo\", \"connectedTo\"],\n data: [\"cdkDropListData\", \"data\"],\n orientation: [\"cdkDropListOrientation\", \"orientation\"],\n id: \"id\",\n lockAxis: [\"cdkDropListLockAxis\", \"lockAxis\"],\n disabled: [\"cdkDropListDisabled\", \"disabled\", booleanAttribute],\n sortingDisabled: [\"cdkDropListSortingDisabled\", \"sortingDisabled\", booleanAttribute],\n enterPredicate: [\"cdkDropListEnterPredicate\", \"enterPredicate\"],\n sortPredicate: [\"cdkDropListSortPredicate\", \"sortPredicate\"],\n autoScrollDisabled: [\"cdkDropListAutoScrollDisabled\", \"autoScrollDisabled\", booleanAttribute],\n autoScrollStep: [\"cdkDropListAutoScrollStep\", \"autoScrollStep\"]\n },\n outputs: {\n dropped: \"cdkDropListDropped\",\n entered: \"cdkDropListEntered\",\n exited: \"cdkDropListExited\",\n sorted: \"cdkDropListSorted\"\n },\n exportAs: [\"cdkDropList\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([\n // Prevent child drop lists from picking up the same group as their parent.\n {\n provide: CDK_DROP_LIST_GROUP,\n useValue: undefined\n }, {\n provide: CDK_DROP_LIST,\n useExisting: CdkDropList\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDropList;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst DRAG_DROP_DIRECTIVES = [CdkDropList, CdkDropListGroup, CdkDrag, CdkDragHandle, CdkDragPreview, CdkDragPlaceholder];\nlet DragDropModule = /*#__PURE__*/(() => {\n class DragDropModule {\n static {\n this.ɵfac = function DragDropModule_Factory(t) {\n return new (t || DragDropModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: DragDropModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DragDrop],\n imports: [CdkScrollableModule]\n });\n }\n }\n return DragDropModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CDK_DRAG_CONFIG, CDK_DRAG_HANDLE, CDK_DRAG_PARENT, CDK_DRAG_PLACEHOLDER, CDK_DRAG_PREVIEW, CDK_DROP_LIST, CDK_DROP_LIST_GROUP, CdkDrag, CdkDragHandle, CdkDragPlaceholder, CdkDragPreview, CdkDropList, CdkDropListGroup, DragDrop, DragDropModule, DragDropRegistry, DragRef, DropListRef, copyArrayItem, moveItemInArray, transferArrayItem };\n","import { CdkDragDrop, moveItemInArray, CdkDropList, CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';\r\nimport {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ContentChild, DestroyRef,\r\n EventEmitter,\r\n inject,\r\n Input,\r\n Output,\r\n TemplateRef,\r\n TrackByFunction\r\n} from '@angular/core';\r\nimport { VirtualScrollerModule } from '@iharbeck/ngx-virtual-scroller';\r\nimport {NgIf, NgFor, NgTemplateOutlet, NgClass} from '@angular/common';\r\nimport {TranslocoDirective} from \"@ngneat/transloco\";\r\nimport {BulkSelectionService} from \"../../../cards/bulk-selection.service\";\r\nimport {SeriesCardComponent} from \"../../../cards/series-card/series-card.component\";\r\nimport {FormsModule} from \"@angular/forms\";\r\nimport {takeUntilDestroyed} from \"@angular/core/rxjs-interop\";\r\n\r\nexport interface IndexUpdateEvent {\r\n fromPosition: number;\r\n toPosition: number;\r\n item: any;\r\n fromAccessibilityMode: boolean;\r\n}\r\n\r\nexport interface ItemRemoveEvent {\r\n position: number;\r\n item: any;\r\n}\r\n\r\n@Component({\r\n selector: 'app-draggable-ordered-list',\r\n templateUrl: './draggable-ordered-list.component.html',\r\n styleUrls: ['./draggable-ordered-list.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n imports: [NgIf, VirtualScrollerModule, NgFor, NgTemplateOutlet, CdkDropList, CdkDrag,\r\n CdkDragHandle, TranslocoDirective, NgClass, SeriesCardComponent, FormsModule]\r\n})\r\nexport class DraggableOrderedListComponent {\r\n\r\n /**\r\n * After this many elements, drag and drop is disabled and we use a virtualized list instead\r\n */\r\n @Input() virtualizeAfter = 100;\r\n @Input() accessibilityMode: boolean = false;\r\n /**\r\n * Shows the remove button on the list item\r\n */\r\n @Input() showRemoveButton: boolean = true;\r\n @Input() items: Array = [];\r\n /**\r\n * Parent scroll for virtualize pagination\r\n */\r\n @Input() parentScroll!: Element | Window;\r\n /**\r\n * Disables drag and drop functionality. Useful if a filter is present which will skew actual index.\r\n */\r\n @Input() disabled: boolean = false;\r\n /**\r\n * When enabled, draggability is disabled and a checkbox renders instead of order box or drag handle\r\n */\r\n @Input() bulkMode: boolean = false;\r\n @Input() trackByIdentity: TrackByFunction = (index: number, item: any) => `${item.id}_${item.order}_${item.title}`;\r\n /**\r\n * After an item is re-ordered, you MUST reload from backend the new data. This is because accessibility mode will use item.order which needs to be in sync.\r\n */\r\n @Output() orderUpdated: EventEmitter = new EventEmitter();\r\n @Output() itemRemove: EventEmitter = new EventEmitter();\r\n @ContentChild('draggableItem') itemTemplate!: TemplateRef;\r\n\r\n public readonly bulkSelectionService = inject(BulkSelectionService);\r\n public readonly destroyRef = inject(DestroyRef);\r\n\r\n get BufferAmount() {\r\n return Math.min(this.items.length / 20, 20);\r\n }\r\n\r\n constructor(private readonly cdRef: ChangeDetectorRef) {\r\n this.bulkSelectionService.selections$.pipe(\r\n takeUntilDestroyed(this.destroyRef)\r\n ).subscribe((s) => {\r\n this.cdRef.markForCheck()\r\n });\r\n }\r\n\r\n drop(event: CdkDragDrop) {\r\n if (event.previousIndex === event.currentIndex) return;\r\n moveItemInArray(this.items, event.previousIndex, event.currentIndex);\r\n this.orderUpdated.emit({\r\n fromPosition: event.previousIndex,\r\n toPosition: event.currentIndex,\r\n item: event.item.data,\r\n fromAccessibilityMode: false\r\n });\r\n this.cdRef.markForCheck();\r\n }\r\n\r\n updateIndex(previousIndex: number, item: any) {\r\n // get the new value of the input\r\n const inputElem = document.querySelector('#reorder-' + previousIndex);\r\n const newIndex = parseInt(inputElem.value, 10);\r\n if (item.order === newIndex) return;\r\n moveItemInArray(this.items, item.order, newIndex);\r\n this.orderUpdated.emit({\r\n fromPosition: item.order,\r\n toPosition: newIndex,\r\n item: item,\r\n fromAccessibilityMode: true\r\n });\r\n this.cdRef.markForCheck();\r\n }\r\n\r\n removeItem(item: any, position: number) {\r\n this.itemRemove.emit({\r\n position: item!.order,\r\n item\r\n });\r\n this.cdRef.markForCheck();\r\n }\r\n\r\n selectItem(updatedVal: Event, index: number) {\r\n const boolVal = (updatedVal.target as HTMLInputElement).value == 'true';\r\n\r\n this.bulkSelectionService.handleCardSelection('sideNavStream', index, this.items.length, boolVal);\r\n this.cdRef.markForCheck();\r\n }\r\n}\r\n","\r\n\r\n virtualizeAfter; else dragList\">\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
0 ? 'example-list list-group-flush' : ''}}\" (cdkDropListDropped)=\"drop($event)\">\r\n
\r\n
\r\n \r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n \r\n\r\n

\r\n {{t('instructions-alt')}}\r\n

\r\n\r\n\r\n
\r\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport { LibraryType } from 'src/app/_models/library/library';\r\nimport { MangaFormat } from 'src/app/_models/manga-format';\r\nimport { ReadingListItem } from 'src/app/_models/reading-list';\r\nimport { ImageService } from 'src/app/_services/image.service';\r\nimport { MangaFormatIconPipe } from '../../../_pipes/manga-format-icon.pipe';\r\nimport { MangaFormatPipe } from '../../../_pipes/manga-format.pipe';\r\nimport { NgbProgressbar } from '@ng-bootstrap/ng-bootstrap';\r\nimport { NgIf, DatePipe } from '@angular/common';\r\nimport { ImageComponent } from '../../../shared/image/image.component';\r\nimport {TranslocoDirective} from \"@ngneat/transloco\";\r\n\r\n@Component({\r\n selector: 'app-reading-list-item',\r\n templateUrl: './reading-list-item.component.html',\r\n styleUrls: ['./reading-list-item.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n imports: [ImageComponent, NgIf, NgbProgressbar, DatePipe, MangaFormatPipe, MangaFormatIconPipe, TranslocoDirective]\r\n})\r\nexport class ReadingListItemComponent {\r\n\r\n @Input({required: true}) item!: ReadingListItem;\r\n @Input() position: number = 0;\r\n @Input() libraryTypes: {[key: number]: LibraryType} = {};\r\n /**\r\n * If the Reading List is promoted or not\r\n */\r\n @Input() promoted: boolean = false;\r\n\r\n @Output() read: EventEmitter = new EventEmitter();\r\n @Output() remove: EventEmitter = new EventEmitter();\r\n\r\n get MangaFormat(): typeof MangaFormat {\r\n return MangaFormat;\r\n }\r\n\r\n constructor(public imageService: ImageService) { }\r\n\r\n readChapter(item: ReadingListItem) {\r\n this.read.emit(item);\r\n }\r\n\r\n\r\n}\r\n","\r\n
\r\n
\r\n \r\n 0\">\r\n
\r\n
\r\n
0 && item.pagesRead !== item.pagesTotal\">\r\n

\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n {{item.title}}\r\n
\r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n {{formatString}} \r\n \r\n\r\n {{item.seriesName}}\r\n
\r\n\r\n \r\n\r\n
\r\n Released: {{item.releaseDate | date:'longDate'}}\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n"],"mappings":"ymDAUA,SAASA,GAA4CC,EAAIC,EAAK,CACxDD,EAAK,IACJE,GAAe,EACfC,EAAe,EAAG,MAAO,CAAC,EAAE,EAAG,GAAG,EAClCC,EAAU,E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A,EAAA,CAAA,EAAA,OAAA,SAAA,mBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,QAAA,YAAA,EAAA,MAAA,EAAA,CAAA,EAAA,gBAAA,EAAA,CAAA,EAAA,iBAAA,EAAA,CAAA,OAAA,UAAA,SAAA,MAAA,EAAA,QAAA,KAAA,EAAA,CAAA,cAAA,OAAA,EAAA,QAAA,QAAA,EAAA,MAAA,EAAA,CAAA,EAAA,iBAAA,EAAA,CAAA,cAAA,OAAA,EAAA,OAAA,EAAA,CAAA,EAAA,OAAA,MAAA,CAAA,EAAAC,SAAA,SAAAC,EAAAC,EAAA,CAAAD,EAAA,GCpBrCxD,EAAA,EAAA0D,GAAA,GAAA,GAAA,eAAA,CAAA,OAAiCrE,EAAA,gBAAA,mBAAA,iBDkBrBsE,GAAgBC,GAAMC,GAAgBC,GAAUC,GAAiBC,GAAqBC,EAAkB,EAAAC,OAAA,CAAA;8xDAAA,EAAAC,gBAAA,CAAA,CAAA,EAE9G,IAAO7B,EAAP8B,SAAO9B,CAAwB,GAAA","names":["FileUploadIconComponent__svg_svg_1_Template","rf","ctx","ɵɵnamespaceSVG","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","FileUploadIconComponent__svg_svg_2_Template","FileUploadIconComponent__svg_svg_3_Template","FileUploadIconComponent__svg_svg_4_Template","FileUploadIconComponent__svg_svg_5_Template","_c0","_c1","_c2","_c3","_c4","FileUploadComponent_ng_container_2_Template","ɵɵelementContainer","FileUploadComponent_ng_template_3_ng_container_1_Template","ɵɵelementContainerStart","ɵɵtext","ɵɵelementContainerEnd","FileUploadComponent_ng_template_3_ng_template_2_Template","FileUploadComponent_ng_template_3_Template","ɵɵtemplate","ɵɵtemplateRefExtractor","isFileDragDropAvailable_r6","_r9","ɵɵreference","ɵɵadvance","ɵɵproperty","FileUploadComponent_div_7_ng_template_1_ng_container_0_Template","_c5","a0","a1","a2","a3","FileUploadComponent_div_7_ng_template_1_Template","file_r13","i_r14","ɵɵnextContext","_r12","ctx_r10","ɵɵpureFunction4","FileUploadComponent_div_7_ng_template_3_Template","i_r16","file_r17","control_r18","FileUploadComponent_div_7_Template","_r20","ɵɵgetCurrentView","ɵɵlistener","$event","ɵɵrestoreView","ctx_r19","ɵɵresetView","ɵɵpipe","ctx_r5","ɵɵpipeBind1","FileUploadTypes","IsNullOrEmpty","value","FileUploadService","_FileUploadService","renderer","div","size","extension","i","extensionIndex","file","key","t","ɵɵinject","Renderer2","ɵɵdefineInjectable","InsertAnimation","trigger","transition","query","stagger","animate","style","ZoomAnimation","STATUS","FileEvent","FileUploadControl","configuration","validators","BehaviorSubject","Subject","newValidators","files","isVisible","isEnabled","isDisabled","accept","isNativeBehaviorEnabled","discard","deletedFiles","error","errorsKey","errors","fileError","currentState","validator","isInvalid","FileUploadAbstract","_FileUploadAbstract","inject","ElementRef","ChangeDetectorRef","hook","subscription","status","event","isMultiple","v","ɵɵdefineDirective","FileUploadIconComponent","_FileUploadIconComponent","fileUploadService","type","ɵɵdirectiveInject","ɵɵdefineComponent","rf","ctx","ɵɵelementContainerStart","ɵɵtemplate","FileUploadIconComponent__svg_svg_1_Template","FileUploadIconComponent__svg_svg_2_Template","FileUploadIconComponent__svg_svg_3_Template","FileUploadIconComponent__svg_svg_4_Template","FileUploadIconComponent__svg_svg_5_Template","ɵɵelementContainerEnd","ɵɵproperty","ɵɵadvance","NgSwitch","NgSwitchCase","NgSwitchDefault","FileUploadListItemComponent","_FileUploadListItemComponent","_c0","ɵɵprojectionDef","ɵɵelement","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵlistener","ɵɵnamespaceSVG","ɵɵprojection","ɵɵtextInterpolate","ɵɵtextInterpolate1","FileUploadDropZoneComponent","_FileUploadDropZoneComponent","ɵɵnamespaceHTML","DRAGOVER","TOUCHED","FileUploadComponent","_FileUploadComponent","document","index","item","eventName","input","fn","DOCUMENT","dirIndex","ɵɵcontentQuery","_c1","_c2","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵviewQuery","_c3","_c4","$event","ɵɵsyntheticHostProperty","ɵɵclassProp","ɵɵProvidersFeature","NG_VALUE_ACCESSOR","forwardRef","ɵɵInheritDefinitionFeature","FileUploadComponent_ng_container_2_Template","FileUploadComponent_ng_template_3_Template","ɵɵtemplateRefExtractor","FileUploadComponent_div_7_Template","ɵɵpipe","_r3","ɵɵreference","ɵɵpipeBind1","NgForOf","NgIf","NgTemplateOutlet","AsyncPipe","checkFileSize","actualSize","maxSize","minSize","file","IsNullOrEmpty","getFileType","fileExtension","type","FileUploadTypes","CheckType","FILE_EXT_REG","checkFileTypes","types","checkType","fileType","checkValueType","value","FileUploadValidators","control","files","sum","a","b","toLargeFiles","error","sizeMismatch","numFiles","filesLimit","allowedFileTypes","notAllowedFiles","rejectFileTypes","FileUploadModule","_FileUploadModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","CblImportResult","ɵɵelementContainerStart","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","ɵɵtext","ɵɵelementContainerEnd","ɵɵadvance","ɵɵproperty","ɵɵpureFunction1","_c0","step_r1","index","ctx_r0","currentStep","ɵɵclassMap","icon","ɵɵtextInterpolate1","title","StepTrackerComponent","constructor","cdRef","steps","ɵɵdirectiveInject","ChangeDetectorRef","selectors","inputs","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","ɵɵtemplate","StepTrackerComponent_ng_container_2_Template","CommonModule","NgClass","NgForOf","styles","changeDetection","_StepTrackerComponent","CblImportReason","failIcon","successIcon","CblConflictReasonPipe","constructor","translocoService","inject","TranslocoService","transform","result","reason","CblImportReason","AllSeriesMissing","translate","ChapterMissing","series","chapter","number","EmptyFile","NameConflict","readingListName","SeriesCollision","seriesLink","libraryId","seriesId","SeriesMissing","VolumeMissing","volume","AllChapterMissing","Success","InvalidFile","pure","standalone","_CblConflictReasonPipe","CblImportResultPipe","constructor","translocoService","inject","TranslocoService","transform","result","CblImportResult","Success","translate","Partial","Fail","pure","standalone","_CblImportResultPipe","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵelement","ɵɵadvance","ɵɵtextInterpolate","t_r1","ɵɵproperty","ctx_r2","uploadForm","ɵɵpipeBind1","result_r23","ɵɵsanitizeHtml","ɵɵtemplate","ImportCblModalComponent_ng_container_0_ng_container_10_For_7_div_0_Conditional_6_li_3_Template","summary_r19","results","ɵɵtextInterpolate1","ɵɵelementContainer","ImportCblModalComponent_ng_container_0_ng_container_10_For_7_div_0_Conditional_6_Template","ImportCblModalComponent_ng_container_0_ng_container_10_For_7_div_0_Conditional_7_Template","_r9","ɵɵpureFunction2","_c2","fileToProcess_r13","fileName","ɵɵconditional","length","ImportCblModalComponent_ng_container_0_ng_container_10_For_7_div_0_Template","validateSummary","ɵɵelementContainerStart","ɵɵrepeaterCreate","ImportCblModalComponent_ng_container_0_ng_container_10_For_7_Template","_forTrack1","ɵɵelementContainerEnd","ɵɵrepeater","ctx_r3","filesToProcess","summary_r37","fileToProcess_r31","_r7","ɵɵpureFunction1","_c3","ImportCblModalComponent_ng_container_0_ng_container_11_For_7_div_0_Template","dryRunSummary","ImportCblModalComponent_ng_container_0_ng_container_11_For_7_Template","ctx_r4","summary_r48","fileToProcess_r42","ImportCblModalComponent_ng_container_0_ng_container_12_For_5_div_0_Template","finalizeSummary","ImportCblModalComponent_ng_container_0_ng_container_12_For_5_Template","ctx_r5","ɵɵpropertyInterpolate2","result_r52","order","ImportCblModalComponent_ng_container_0_ng_template_13_For_2_Template","_forTrack4","summary_r50","success_r61","ImportCblModalComponent_ng_container_0_ng_template_15_ng_container_0_span_2_Template","ImportCblModalComponent_ng_container_0_ng_template_15_ng_container_0_span_3_Template","ImportCblModalComponent_ng_container_0_ng_template_15_ng_container_0_span_4_Template","summary_r58","success","ctx_r59","CblImportResult","Success","Fail","Partial","cblName","ImportCblModalComponent_ng_container_0_ng_template_15_ng_container_0_Template","ImportCblModalComponent_ng_container_0_ng_template_15_span_4_Template","filename_r57","ɵɵlistener","ɵɵrestoreView","_r71","ctx_r70","ɵɵnextContext","ɵɵresetView","close","ImportCblModalComponent_ng_container_0_div_9_Template","ImportCblModalComponent_ng_container_0_ng_container_10_Template","ImportCblModalComponent_ng_container_0_ng_container_11_Template","ImportCblModalComponent_ng_container_0_ng_container_12_Template","ImportCblModalComponent_ng_container_0_ng_template_13_Template","ɵɵtemplateRefExtractor","ImportCblModalComponent_ng_container_0_ng_template_15_Template","ctx_r72","ctx_r73","prevStep","ctx_r74","nextStep","ctx_r0","steps","currentStepIndex","Step","Import","Validate","DryRun","Finalize","canMoveToPrevStep","canMoveToNextStep","NextButtonLabel","ImportCblModalComponent","Breakpoint","constructor","ngModal","readingListService","utilityService","cdRef","toastr","fileUploadControl","FormControl","undefined","FileUploadValidators","accept","FormGroup","files","isLoading","title","translate","index","active","icon","failedFiles","isFileSelected","get","value","error","pages","i","formData","FormData","append","push","validateCbl","forkJoin","subscribe","forEach","cblImport","sort","a","b","markForCheck","filter","item","dryRun","import","setValue","filenamesAllowedToProcess","map","p","f","includes","name","importCbl","findIndex","ɵɵdirectiveInject","NgbActiveModal","ReadingListService","UtilityService","ChangeDetectorRef","ToastrService","selectors","viewQuery","rf","ctx","ImportCblModalComponent_ng_container_0_Template","CommonModule","NgForOf","NgIf","NgTemplateOutlet","NgSwitch","NgSwitchCase","FileUploadModule","FileUploadComponent","NgbAccordionModule","NgbAccordionButton","NgbAccordionDirective","NgbAccordionItem","NgbAccordionHeader","NgbAccordionBody","NgbAccordionCollapse","SafeHtmlPipe","CblConflictReasonPipe","ReactiveFormsModule","ɵNgNoValidate","NgControlStatus","NgControlStatusGroup","FormGroupDirective","FormControlName","StepTrackerComponent","CblImportResultPipe","TranslocoDirective","styles","changeDetection","_ImportCblModalComponent","isFakeMousedownFromScreenReader","event","isFakeTouchstartFromScreenReader","touch","extendStyles","dest","source","importantProperties","key","value","toggleNativeDragInteractions","element","enable","userSelect","toggleVisibility","combineTransforms","transform","initialTransform","parseCssTimeUnitsToMs","multiplier","getTransformTransitionDurationInMs","computedStyle","transitionedProperties","parseCssPropertyValue","property","prop","propertyIndex","rawDurations","rawDelays","name","part","getMutableClientRect","clientRect","isInsideClientRect","x","y","top","bottom","left","right","adjustClientRect","isPointerNearClientRect","rect","threshold","pointerX","pointerY","width","height","xThreshold","yThreshold","ParentPositionTracker","_document","elements","event","target","_getEventTarget","cachedPosition","scrollPosition","newTop","newLeft","viewportScrollPosition","topDifference","leftDifference","position","node","deepCloneNode","clone","descendantsWithId","nodeName","i","transferCanvasData","transferInputData","transferData","selector","callback","descendantElements","cloneElements","cloneUniqueId","context","passiveEventListenerOptions","normalizePassiveListenerOptions","activeEventListenerOptions","MOUSE_EVENT_IGNORE_TIME","dragImportantProperties","DragRef","handle","_config","_ngZone","_viewportRuler","_dragDropRegistry","Subject","Subscription","targetHandle","pointerPosition","distanceX","distanceY","isDelayElapsed","container","constrainedPointerPosition","offset","activeTransform","handles","coerceElement","disabledHandles","template","rootElement","boundaryElement","parent","direction","isTouchEvent","dropContainer","placeholder","anchor","shadowRoot","referenceElement","isDragging","isTouchSequence","isAuxiliaryMouseButton","isSyntheticEvent","isFakeEvent","isFakeTouchstartFromScreenReader","isFakeMousedownFromScreenReader","rootStyles","scrollEvent","previewTemplate","currentIndex","distance","isPointerOverContainer","rawX","rawY","newContainer","previewConfig","previewClass","preview","rootRect","viewRef","getRootNode","matchElementSize","getTransform","className","placeholderRect","duration","resolve","handler","timeout","placeholderConfig","placeholderTemplate","elementRect","handleElement","referenceRect","point","svgMatrix","svgPoint","dropContainerLock","pickupX","pickupY","boundaryRect","previewWidth","previewHeight","minY","maxY","minX","maxX","clamp$1","pointerPositionOnPage","delta","positionSinceLastChange","changeX","changeY","shouldEnable","styles","currentPosition","pickupPosition","leftOverflow","rightOverflow","topOverflow","bottomOverflow","scrollDifference","_getShadowRoot","initialParent","previewContainer","documentRef","min","max","rootNodes","wrapper","sourceRect","moveItemInArray","array","fromIndex","toIndex","from","clamp","to","clamp","value","max","SingleAxisSortStrategy","_element","_dragDropRegistry","items","item","pointerX","pointerY","pointerDelta","siblings","newIndex","isHorizontal","currentIndex","currentItem","siblingAtNewPosition","currentPosition","newPosition","delta","itemOffset","siblingOffset","oldOrder","moveItemInArray","sibling","index","isDraggedItem","offset","elementToOffset","combineTransforms","adjustClientRect","isInsideClientRect","activeDraggables","placeholder","newPositionReference","element","coerceElement","predicate","rootElement","initialTransform","p","topDifference","leftDifference","clientRect","drag","elementToMeasure","getMutableClientRect","a","b","immediateSibling","start","end","itemPositions","lastItemRect","firstItemRect","direction","DROP_PROXIMITY_THRESHOLD","SCROLL_PROXIMITY_THRESHOLD","DropListRef","_document","_ngZone","_viewportRuler","Subject","Subscription","interval","animationFrameScheduler","takeUntil","node","scrollStep","ParentPositionTracker","previousIndex","previousContainer","isPointerOverContainer","distance","dropPoint","event","previousItems","connectedTo","orientation","elements","isPointerNearClientRect","result","scrollNode","verticalScrollDirection","horizontalScrollDirection","position","getElementScrollDirections","width","height","getVerticalScrollDirection","getHorizontalScrollDirection","styles","x","y","elementFromPoint","nativeElement","activeSiblings","scrollDifference","shadowRoot","_getShadowRoot","draggedItems","top","bottom","yThreshold","left","right","xThreshold","computedVertical","computedHorizontal","scrollTop","scrollLeft","activeCapturingEventOptions","normalizePassiveListenerOptions","DragDropRegistry","_DragDropRegistry","drop","isTouchEvent","e","config","name","streams","Observable","observer","callback","merge","instance","t","ɵɵinject","NgZone","DOCUMENT","ɵɵdefineInjectable","DEFAULT_CONFIG","DragDrop","_DragDrop","DragRef","ViewportRuler","CDK_DRAG_PARENT","InjectionToken","CDK_DRAG_HANDLE","InjectionToken","CdkDragHandle","_CdkDragHandle","value","element","parentDrag","Subject","t","ɵɵdirectiveInject","ElementRef","CDK_DRAG_PARENT","ɵɵdefineDirective","booleanAttribute","ɵɵProvidersFeature","ɵɵInputTransformsFeature","CDK_DRAG_PLACEHOLDER","CDK_DRAG_PREVIEW","InjectionToken","CDK_DRAG_CONFIG","InjectionToken","DRAG_HOST_CLASS","CDK_DROP_LIST","CdkDrag","_CdkDrag","value","element","dropContainer","_document","_ngZone","_viewContainerRef","config","_dir","dragDrop","_changeDetectorRef","_selfHandle","_parentDrag","Subject","EventEmitter","Observable","observer","subscription","map","movedEvent","take","takeUntil","changes","rootSelectorChange","positionChange","index","rootElement","boundary","coerceElement","ref","dir","dragStartDelay","placeholder","preview","coerceNumberProperty","parent","drag","startEvent","releaseEvent","endEvent","enterEvent","exitEvent","dropEvent","lockAxis","constrainPosition","previewClass","boundaryElement","draggingDisabled","rootElementSelector","previewContainer","startWith","tap","handles","childHandleElements","handle","switchMap","merge","item","handleInstance","dragRef","t","ɵɵdirectiveInject","ElementRef","DOCUMENT","NgZone","ViewContainerRef","Directionality","DragDrop","ChangeDetectorRef","CDK_DRAG_HANDLE","CDK_DRAG_PARENT","ɵɵdefineDirective","rf","ctx","dirIndex","ɵɵcontentQuery","CDK_DRAG_PREVIEW","CDK_DRAG_PLACEHOLDER","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵclassProp","booleanAttribute","ɵɵProvidersFeature","ɵɵInputTransformsFeature","ɵɵNgOnChangesFeature","CDK_DROP_LIST_GROUP","_uniqueIdCounter","CdkDropList","_CdkDropList","value","element","dragDrop","_changeDetectorRef","_scrollDispatcher","_dir","_group","config","Subject","EventEmitter","drag","drop","index","item","a","b","ref","startWith","takeUntil","siblings","coerceArray","correspondingDropList","list","scrollableParents","scrollable","coerceNumberProperty","event","dropEvent","merge","lockAxis","draggingDisabled","sortingDisabled","listAutoScrollDisabled","listOrientation","t","ɵɵdirectiveInject","ElementRef","DragDrop","ChangeDetectorRef","ScrollDispatcher","Directionality","CDK_DROP_LIST_GROUP","CDK_DRAG_CONFIG","ɵɵdefineDirective","rf","ctx","ɵɵattribute","ɵɵclassProp","booleanAttribute","ɵɵProvidersFeature","CDK_DROP_LIST","ɵɵInputTransformsFeature","ɵɵelementStart","ɵɵelementContainer","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","_r6","ɵɵpureFunction2","_c1","item_r11","i_r12","ctx_r10","itemTemplate","_c2","_r8","ɵɵelementContainerStart","ɵɵtemplate","DraggableOrderedListComponent_ng_container_0_ng_container_1_div_4_Template","ɵɵelementContainerEnd","ctx_r2","items","BufferAmount","parentScroll","_r9","viewPortItems","trackByIdentity","item_r14","ctx_r13","accessibilityMode","disabled","bulkMode","_c3","i_r15","ɵɵlistener","$event","ɵɵrestoreView","_r17","ctx_r16","ɵɵnextContext","ɵɵresetView","drop","DraggableOrderedListComponent_ng_container_0_ng_template_2_div_1_Template","ɵɵclassMap","ctx_r3","length","ɵɵtext","_r27","ctx_r26","idx_r19","idx","item_r18","$implicit","ctx_r25","updateIndex","ctx_r29","ctx_r28","ɵɵpropertyInterpolate1","ɵɵtextInterpolate","t_r1","ctx_r23","order","_r34","ctx_r32","selectItem","ctx_r24","bulkSelectionService","isCardSelected","ɵɵpureFunction0","_c4","DraggableOrderedListComponent_ng_container_0_ng_template_4_div_1_ng_container_1_Template","DraggableOrderedListComponent_ng_container_0_ng_template_4_div_1_ng_container_2_Template","_c5","ctx_r21","ɵɵelement","DraggableOrderedListComponent_ng_container_0_ng_template_4_div_1_Template","DraggableOrderedListComponent_ng_container_0_ng_template_4_i_2_Template","ctx_r5","isVirtualized_r20","_r42","ctx_r41","item_r37","idx_r38","ctx_r40","removeItem","ctx_r39","ɵɵattributeInterpolate1","DraggableOrderedListComponent_ng_container_0_ng_template_6_button_0_Template","ctx_r7","showRemoveButton","DraggableOrderedListComponent_ng_container_0_ng_container_1_Template","DraggableOrderedListComponent_ng_container_0_ng_template_2_Template","ɵɵtemplateRefExtractor","DraggableOrderedListComponent_ng_container_0_ng_template_4_Template","DraggableOrderedListComponent_ng_container_0_ng_template_6_Template","ctx_r0","virtualizeAfter","_r4","ɵɵtextInterpolate1","DraggableOrderedListComponent","Math","min","constructor","cdRef","index","item","id","title","orderUpdated","EventEmitter","itemRemove","inject","BulkSelectionService","destroyRef","DestroyRef","selections$","pipe","takeUntilDestroyed","subscribe","s","markForCheck","event","previousIndex","currentIndex","moveItemInArray","emit","fromPosition","toPosition","data","fromAccessibilityMode","inputElem","document","querySelector","newIndex","parseInt","value","position","updatedVal","boolVal","target","handleCardSelection","ɵɵdirectiveInject","ChangeDetectorRef","selectors","contentQueries","rf","ctx","dirIndex","DraggableOrderedListComponent_ng_container_0_Template","NgIf","VirtualScrollerModule","VirtualScrollerComponent","NgFor","NgTemplateOutlet","CdkDropList","CdkDrag","CdkDragHandle","TranslocoDirective","NgClass","FormsModule","CheckboxControlValueAccessor","NgControlStatus","NgModel","styles","changeDetection","_DraggableOrderedListComponent","ɵɵelementContainerStart","ɵɵelement","ɵɵelementContainerEnd","ɵɵelementStart","ɵɵelementEnd","ɵɵadvance","ɵɵproperty","ctx_r3","item","pagesRead","pagesTotal","ɵɵclassMapInterpolate1","ɵɵpipeBind1","ctx_r7","seriesFormat","ɵɵpropertyInterpolate","formatString_r6","ɵɵtemplate","ReadingListItemComponent_ng_container_0_ng_container_22_i_1_Template","ɵɵtext","ctx_r4","MangaFormat","UNKNOWN","ɵɵtextInterpolate","ɵɵtextInterpolate1","ɵɵpipeBind2","ctx_r5","releaseDate","ReadingListItemComponent_ng_container_0_ng_container_4_Template","ReadingListItemComponent_ng_container_0_div_5_Template","ɵɵlistener","ɵɵrestoreView","_r10","ctx_r9","ɵɵnextContext","ɵɵresetView","remove","emit","ctx_r11","readChapter","ReadingListItemComponent_ng_container_0_ng_container_22_Template","ReadingListItemComponent_ng_container_0_div_26_Template","ctx_r0","imageService","getChapterCoverImage","chapterId","ɵɵpropertyInterpolate1","position","title","t_r1","ɵɵpropertyInterpolate2","libraryId","seriesId","ɵɵsanitizeUrl","seriesName","ReadingListItemComponent","constructor","libraryTypes","promoted","read","EventEmitter","ɵɵdirectiveInject","ImageService","selectors","inputs","outputs","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","ReadingListItemComponent_ng_container_0_Template","ImageComponent","NgIf","NgbProgressbar","DatePipe","MangaFormatPipe","MangaFormatIconPipe","TranslocoDirective","styles","changeDetection","_ReadingListItemComponent"],"x_google_ignoreList":[0,9,10]}